html_url
stringlengths
48
51
title
stringlengths
5
268
comments
stringlengths
70
51.8k
body
stringlengths
0
29.8k
comment_length
int64
16
1.52k
text
stringlengths
164
54.1k
embeddings
sequence
https://github.com/huggingface/datasets/issues/546
Very slow data loading on large dataset
Also, @agemagician you have to follow the step I indicate in my previous message [here](https://github.com/huggingface/nlp/issues/546#issuecomment-684648927) to use the new text loading script. Just doing `pip install git+https://github.com/huggingface/nlp.git@07d92a82b7594498ff702f3cca55c074e2052257` like you did won't use the new script (they are not inside the library but hosted on our hub).
I made a simple python script to check the NLP library speed, which loads 1.1 TB of textual data. It has been 8 hours and still, it is on the loading steps. It does work when the text dataset size is small about 1 GB, but it doesn't scale. It also uses a single thread during the data loading step. ``` train_files = glob.glob("xxx/*.txt",recursive=True) random.shuffle(train_files) print(train_files) dataset = nlp.load_dataset('text', data_files=train_files, name="customDataset", version="1.0.0", cache_dir="xxx/nlp") ``` Is there something that I am missing ?
46
Very slow data loading on large dataset I made a simple python script to check the NLP library speed, which loads 1.1 TB of textual data. It has been 8 hours and still, it is on the loading steps. It does work when the text dataset size is small about 1 GB, but it doesn't scale. It also uses a single thread during the data loading step. ``` train_files = glob.glob("xxx/*.txt",recursive=True) random.shuffle(train_files) print(train_files) dataset = nlp.load_dataset('text', data_files=train_files, name="customDataset", version="1.0.0", cache_dir="xxx/nlp") ``` Is there something that I am missing ? Also, @agemagician you have to follow the step I indicate in my previous message [here](https://github.com/huggingface/nlp/issues/546#issuecomment-684648927) to use the new text loading script. Just doing `pip install git+https://github.com/huggingface/nlp.git@07d92a82b7594498ff702f3cca55c074e2052257` like you did won't use the new script (they are not inside the library but hosted on our hub).
[ -0.15381386876106262, -0.21949529647827148, -0.09504812955856323, 0.1538359671831131, -0.023924849927425385, 0.04571424424648285, 0.13598911464214325, 0.4179363548755646, 0.3139534592628479, -0.17685763537883759, 0.13525356352329254, 0.24177968502044678, -0.1323709934949875, 0.25707149505615234, 0.2852425277233124, 0.09127330780029297, -0.06616585701704025, 0.25908270478248596, 0.009013690054416656, -0.11743128299713135, 0.10521073639392853, 0.09475622326135635, -0.2691371738910675, -0.22679810225963593, -0.1341269314289093, 0.0427633672952652, -0.017961930483579636, 0.08099012076854706, -0.10784337669610977, -0.2789710760116577, 0.046664007008075714, 0.11923520267009735, -0.013505486771464348, 0.23861730098724365, -0.00011882156832143664, -0.2400168776512146, 0.41640007495880127, 0.08766476809978485, -0.20838047564029694, -0.14136682450771332, 0.38763248920440674, -0.5893994569778442, 0.2217419147491455, -0.09763657301664352, -0.06585513055324554, 0.04191793501377106, 0.06417310237884521, -0.0316154807806015, 0.01413792371749878, 0.08136065304279327, 0.1186159998178482, -0.06969143450260162, -0.19549591839313507, 0.24579079449176788, 0.0393083281815052, 0.21788962185382843, 0.010326819494366646, 0.3551199436187744, 0.4591071605682373, -0.20802408456802368, -0.2608436644077301, 0.05748550966382027, -0.15766867995262146, 0.11577652394771576, 0.2842017710208893, 0.053822215646505356, -0.15532299876213074, -0.07959673553705215, 0.10410784184932709, 0.31649550795555115, 0.5134062170982361, -0.1090567484498024, 0.012629210017621517, -0.4890185296535492, 0.014009089209139347, -0.23250478506088257, 0.23639297485351562, 0.22359654307365417, -0.23138737678527832, -0.2666046917438507, -0.4041787087917328, -0.30509284138679504, -0.06249658390879631, 0.21655958890914917, 0.17701302468776703, 0.06900892406702042, -0.07537983357906342, 0.11085119098424911, 0.2798573076725006, 0.014891382306814194, -0.12176168709993362, -0.02624307945370674, 0.24198538064956665, 0.43803638219833374, -0.3837113082408905, -0.1077050119638443, 0.11445283144712448, 0.24360620975494385, 0.10717939585447311, 0.13310638070106506, 0.052222173660993576, 0.037273306399583817, -0.18372009694576263, -0.021672993898391724, 0.26549407839775085, 0.42677006125450134, -0.13901367783546448, -0.1967364400625229, 0.37856197357177734, -0.05780133232474327, -0.10652509331703186, 0.2549194395542145, -0.1018863394856453, -0.14702218770980835, -0.062426596879959106, -0.41202229261398315, -0.15413114428520203, -0.4001075029373169, -0.08972440659999847, -0.11552604287862778, 0.10081138461828232, -0.28475627303123474, 0.08348232507705688, 0.21249130368232727, -0.3558650314807892, 0.28917959332466125, 0.11085876822471619, -0.09329314529895782, -0.39051011204719543, 0.11061476916074753, -0.09735099971294403, 0.0845341756939888, -0.15648962557315826, 0.2319568693637848, 0.5620113611221313, -0.11519566178321838, 0.19867326319217682, 0.15854419767856598, -0.18029019236564636, -0.16540470719337463, -0.30629950761795044, -0.28189530968666077, -0.12202077358961105, -0.03475486859679222, -0.04561683535575867, 0.22783151268959045, 0.031926125288009644, 0.2941400408744812, -0.3541758060455322, 0.12217923998832703, -0.3604920506477356, -0.15908019244670868, 0.00838363915681839, 0.11739940196275711, -0.44118231534957886, -0.40412792563438416, -0.2906882166862488, 0.4033409059047699, -0.06574707478284836, -0.18364468216896057, -0.25099125504493713, -0.05348888784646988, -0.3046068549156189, 0.026560280472040176, 0.14590853452682495, 0.2639089822769165, -0.06654372811317444, -0.09972904622554779, -0.07433085888624191, 0.33393654227256775, 0.3001454174518585, 0.5857622027397156, -0.1756269633769989, 0.27705883979797363, -0.1778501272201538, 0.013464637100696564, 0.4331527352333069, 0.028708335012197495, -0.3839412033557892, 0.49486514925956726, -0.255127489566803, 0.09369815140962601, 0.17920292913913727, 0.34303018450737, -0.021170668303966522, -0.12654849886894226, 0.2647033929824829, 0.5780929327011108, 0.21083803474903107, 0.21182715892791748, -0.49294227361679077, -0.16918472945690155, 0.25495731830596924, 0.43439149856567383, -0.14434418082237244, -0.04019574075937271, -0.07403218001127243, 0.10217485576868057, 0.4322357773780823, 0.17868836224079132, -0.11599824577569962, 0.3622053265571594, -0.18376649916172028, 0.12985877692699432, 0.03510906919836998, 0.13907372951507568, -0.12452539056539536, 0.15717020630836487, 0.17116118967533112, 0.1409958451986313, 0.34273236989974976, 0.15879927575588226, -0.24997040629386902, -0.2745952308177948, 0.11448927223682404, 0.1902356594800949, -0.024614349007606506, -0.04320261627435684, 0.10913094878196716, 0.20251384377479553, -0.2353191077709198, 0.3263877034187317, -0.14438936114311218, -0.16016417741775513, -0.41436389088630676, -0.06262435764074326, 0.22596776485443115, -0.1562427431344986, 0.3617384433746338, 0.3640153110027313, -0.11994516104459763, -0.03927084058523178, -0.10090617835521698, -0.043930768966674805, -0.3276136517524719, 0.27875426411628723, 0.04623281583189964, 0.06307435780763626, 0.02544972486793995, -0.020510587841272354, 0.37178245186805725, 0.1491745412349701, 0.2595146596431732, -0.360009104013443, -0.21612510085105896, 0.3663826584815979, -0.23713035881519318, 0.2518213391304016, 0.14921891689300537, -0.4946310222148895, 0.0410461500287056, -0.14009204506874084, 0.18565009534358978, 0.2630786895751953, 0.9809722304344177, 0.04918878525495529, 0.5438917875289917, 0.23748604953289032, -0.18602678179740906, 0.01353318989276886, 0.47330567240715027, -0.0671331137418747, -0.16128137707710266, 0.5493711233139038, -0.09727885574102402, -0.33915767073631287, -0.0454709455370903, -0.185588076710701, 0.39586174488067627, 0.2632412016391754, 0.02710041031241417, 0.13468077778816223, -0.03314065560698509, -0.24517114460468292, 0.19363805651664734, -0.15514996647834778, 0.17237307131290436, 0.1338728666305542, 0.32420358061790466, 0.09771556407213211, -0.4654928743839264, -0.17088092863559723, -0.09207591414451599, 0.3634907305240631, -0.1205449104309082, -0.014735977165400982, -0.07540058344602585, -0.3507576286792755, -0.2301575094461441, -0.03628301993012428, -0.3193763494491577, -0.1914115995168686, 0.012655366212129593, 0.10606745630502701, 0.41862720251083374, -0.1617037057876587, 0.039876144379377365, 0.13019534945487976, -0.23563437163829803, -0.446917861700058, -0.3646009564399719, -0.10230571031570435, -0.3111700117588043, -0.022149424999952316, 0.2604717016220093, 0.24914053082466125, 0.3346453905105591, 0.13702036440372467, -0.22284531593322754, 0.26803526282310486, -0.14851884543895721, -0.21244290471076965, -0.10456927120685577, -0.009521011263132095, -0.15039026737213135, 0.2072906792163849, 0.20304498076438904, 0.017159275710582733, 0.10383468866348267, -0.40427103638648987, -0.023115195333957672, 0.1369466483592987, -0.025765540078282356, 0.011045611463487148, -0.0730469822883606, -0.2641478478908539, -0.2755768597126007, -0.2684978246688843, 0.5474094748497009, 0.15861760079860687, 0.18906250596046448, 0.2368088960647583, -0.22278255224227905, 0.2654802203178406, 0.04992871358990669, 0.2723817527294159, -0.039103712886571884, -0.1843661069869995, 0.26535889506340027, 0.2940632402896881, -0.20373015105724335, -0.20064567029476166, 0.10703159868717194, 0.1367928832769394, -0.08888736367225647, -0.74859219789505, 0.24116267263889313, -0.4384430944919586, -0.0879482552409172, -0.05700799822807312, 0.1646118462085724, 0.2118796408176422, -0.28269875049591064, -0.05072659254074097, 0.2520311772823334, -0.22701901197433472, -0.005145631730556488, -0.019231274724006653, 0.1749122589826584, -0.13998383283615112, 0.47120755910873413, -0.07114368677139282, 0.05669073760509491, 0.19884537160396576, -0.08085916936397552, 0.21974381804466248, -0.037841565907001495, 0.1163274347782135, -0.22276639938354492, -0.25270596146583557, 0.20825935900211334, -0.09712332487106323, -0.04056515544652939, 0.34726905822753906, 0.10875022411346436, -0.37805140018463135, -0.30607837438583374, -0.17860914766788483, -0.0703594833612442, -0.08417902141809464, 0.16302980482578278, -0.28725099563598633, -0.1635902225971222, -0.02807791158556938, -0.12374506145715714, -0.21753130853176117, -0.7590798139572144, -0.10721130669116974, 0.18784499168395996, 0.1177787259221077, 0.00677202083170414, -0.16374215483665466, 0.026665624231100082, -0.8222569227218628, 0.10975461453199387, -0.24074357748031616, 0.3917474150657654, 0.0051588453352451324, -0.15898005664348602, 0.3964155316352844, -0.16955658793449402, 0.2948716878890991, 0.3480381965637207, 0.10492239892482758, 0.14051026105880737, -0.13829603791236877, -0.4310268759727478, -0.018494026735424995, -0.10264148563146591, 0.20427800714969635, 0.6005525588989258, 0.3204460144042969, -0.2217429280281067, -0.13756674528121948, 0.14106062054634094, 0.26884695887565613, -0.029687028378248215, -0.6407162547111511, -0.38503292202949524, -0.20390236377716064, 0.017687497660517693, 0.05262777581810951, -0.26209214329719543, 0.16650716960430145, -0.1924748420715332, 0.0582241453230381, 0.10801766067743301, -0.08369557559490204, 0.24402488768100739, -0.04855700582265854, -0.23788321018218994, 0.11796148121356964, 0.32902792096138, -0.02061733603477478, 0.2147843986749649, -0.522540807723999, 0.4845500886440277, 0.2467738538980484, 0.19441545009613037, -0.0512726753950119, 0.10317180305719376, 0.42544806003570557, 0.3236653208732605, 0.12855051457881927, 0.11097179353237152, -0.2379469871520996, 0.23177893459796906, -0.293509304523468, -0.0006205127574503422, 0.13918370008468628, -0.006611538119614124, -0.3307594358921051, -0.3948574960231781, 0.8833647966384888, 0.1604800969362259, 0.08622069656848907, 0.3740404546260834, -0.3879634737968445, 0.010138850659132004, 0.1129833459854126, -0.3719645142555237, 0.8148231506347656, -0.43147122859954834, 0.2765326499938965, -0.05907360464334488, 0.08776398003101349, 0.3967081904411316, -0.10427483916282654, 0.020974261686205864, -0.4423857629299164, 0.09228432923555374, 0.2870863974094391, -0.015130650252103806, -0.11735189706087112, 0.19402630627155304, -0.18583925068378448, 0.4905821979045868, 0.3192146420478821, -0.26949524879455566, -0.15220953524112701, 0.7354374527931213, -0.17492608726024628, -0.21673941612243652, -0.6459864377975464, 0.0870799720287323, -0.3232802152633667, 0.5647565722465515, 0.032059166580438614, 0.10082171857357025, -0.053155526518821716, -0.08774690330028534, -0.276162326335907, 0.1468389928340912, -0.015917588025331497, -0.1591116040945053, -0.02536909654736519, -0.27589696645736694, 0.23732811212539673, 0.09974782168865204, -0.1956414431333542, 0.2086951583623886, -0.25877103209495544, 0.11356969177722931, -0.41598179936408997, 0.17003211379051208, 0.5306607484817505, 0.04249028488993645, 0.1286766529083252, -0.19986560940742493, -0.02506846934556961, -0.21985086798667908, 0.023512858897447586, -0.1915745884180069, -0.10134194046258926, 0.13278406858444214, 0.0029754526913166046, 0.06692593544721603, -0.2910997271537781, 0.2608255445957184, 0.10937392711639404, 0.021202530711889267, 0.050393156707286835, 0.4311574101448059, 0.04537403583526611, 0.3068491816520691, 0.04730512574315071, -0.38767555356025696, -0.052299682050943375, 0.5366803407669067, 0.1274879276752472, -0.219469353556633, 0.4549713432788849, 0.3048580288887024, -0.11948425322771072, -0.12401223927736282, -0.08437648415565491, -0.05912728235125542, -0.25330039858818054, 0.054355692118406296, 0.20506511628627777, 0.07015292346477509, 0.24561139941215515, 0.08745262026786804, -0.17025066912174225, -0.1359894573688507, 0.06091783568263054, -0.4060441553592682, -0.38844358921051025, 0.02030806615948677, -0.027972381561994553, -0.056535329669713974, 0.027112968266010284, 0.00021583586931228638, 0.25533273816108704, 0.30674102902412415, -0.1939477026462555, 0.15681563317775726, 0.030194943770766258, 0.05726684257388115, 0.1338684856891632, -0.30199432373046875, 0.09967721253633499, 0.1949744075536728, 0.08779699355363846, -0.10485658049583435, 0.12842941284179688, -0.20244765281677246, 0.06405776739120483, 0.16298983991146088, -0.05176381766796112, 0.014652297832071781, -0.0578785203397274, -0.24191848933696747, -0.061942461878061295, -0.19977740943431854, -0.06470268964767456, -0.05728022754192352, -0.032185934484004974, -0.020148560404777527, -0.04096314683556557, -0.03840678185224533, 0.03759261220693588, 0.20648740231990814, -0.41800644993782043, 0.24508321285247803, 0.13087297976016998, -0.019478552043437958, 0.2973194718360901, 0.08065851032733917, -0.5015330910682678, -0.07537146657705307, 0.18770602345466614, 0.17607641220092773, 0.11984416842460632, -0.1874101758003235, 0.08782714605331421, -0.022226111963391304, 0.2007058560848236, 0.5044083595275879, 0.019726328551769257, -0.2055373191833496, 0.17356669902801514, 0.07937972992658615, -0.199790820479393, 0.057518742978572845, 0.2935539782047272, 0.16564875841140747, -0.09710259735584259, 0.18101555109024048, 0.1531108319759369, 0.03391990810632706, -0.2126956433057785, -0.2405848503112793, 0.39714109897613525, -0.21158087253570557, -0.2819991409778595, 0.03338731825351715, 0.16315649449825287, -0.21900291740894318, 0.19687402248382568, 0.10788257420063019, 0.0027401745319366455, 0.3443060517311096, 0.1866300106048584, 0.2403712421655655, -0.008709393441677094, 0.4980353116989136, -0.4289357364177704, -0.2252035290002823, -0.220661923289299, 0.49126940965652466, 0.14811824262142181, 0.12974901497364044, -0.07653594017028809, 0.36885613203048706, -0.09342656284570694, 0.020044924691319466, -0.20589864253997803, 0.12134334444999695, -0.030521951615810394, -0.09827105700969696, 0.17946656048297882, 0.10057222098112106, -0.2097427248954773, 0.2337903380393982, -0.292344331741333, 0.07265512645244598, -0.07792253792285919, 0.29153215885162354, -0.07861290872097015, -0.4484066069126129, -0.016952600330114365, -0.03457473963499069, 0.26628559827804565, -0.15131375193595886, 0.20166638493537903, -0.28489047288894653, 0.093389131128788, 0.08070944249629974, 0.23647791147232056, 0.2884945571422577, 0.3609555959701538, 0.0017202282324433327, 0.09925535321235657, -0.18424424529075623, 0.012881768867373466, -0.18702110648155212, 0.44304701685905457, 0.21761518716812134, 0.40960246324539185, 0.0002736654132604599, -0.04851395636796951, -0.09078995138406754, 0.15899142622947693, -0.1634996235370636, -0.2090650349855423, -0.13264234364032745, 0.34910351037979126, 0.212804913520813, -0.2817462980747223, -0.6433496475219727, 0.08833936601877213, -0.29937294125556946, -0.192555770277977, 0.12429735064506531, -0.03904654458165169, -0.04000759869813919, -0.1342175006866455, 0.03405825048685074, -0.2491408884525299, 0.6754311323165894, 0.39817550778388977, 0.367007315158844, -0.08540226519107819, -0.24255621433258057, -0.5165574550628662, -0.14793828129768372, -0.22204464673995972, -0.10682856291532516, 0.09413545578718185, 0.23498304188251495, 0.010815709829330444, 0.04940769448876381, -0.4032295346260071, 0.10616379231214523, -0.07948397099971771, -0.20237970352172852, -0.2679606080055237, 0.07470552623271942, -0.2873663306236267, 0.09084804356098175, -0.13992008566856384, -0.13936874270439148, 0.017887581139802933, -0.2966470420360565, -0.10486716777086258, -0.16119876503944397, 0.18332718312740326, -0.09555096924304962, 0.4189101457595825, 0.21837551891803741, -0.01688849739730358, 0.37276363372802734, 0.02748444676399231, -0.10510748624801636, -0.40401965379714966, 0.05993261560797691, -0.20969229936599731, 0.20132404565811157, 0.09084562212228775, -0.027828821912407875, -0.045841559767723083, 0.26395779848098755, 0.09529941529035568, 0.2681603729724884, -0.26441770792007446, 0.014308344572782516, 0.09219661355018616, -0.3141654431819916, -0.009551361203193665, 0.3425391912460327, -0.0030009904876351357, 0.48366579413414, -0.029604434967041016, -0.0528523325920105, -0.5216860771179199, 0.03403247892856598, 0.34581297636032104, -0.28061443567276, -0.037005241960287094, -0.17298370599746704, 0.3743341565132141, 0.0503036268055439, 0.21372289955615997, -0.46864497661590576, -0.028809666633605957, 0.23717980086803436, 0.1576632559299469, -0.002075785771012306, 0.5520824790000916, -0.0635300874710083, -0.13727237284183502, 0.017243336886167526, 0.20218296349048615, -0.06142643094062805, -0.10734736919403076, -0.28373822569847107, -0.15309640765190125 ]
https://github.com/huggingface/datasets/issues/546
Very slow data loading on large dataset
No problem, I will regenerate it. This will make us see if we solved both issues and now both the data generation step, as well as the hashing step, is fast.
I made a simple python script to check the NLP library speed, which loads 1.1 TB of textual data. It has been 8 hours and still, it is on the loading steps. It does work when the text dataset size is small about 1 GB, but it doesn't scale. It also uses a single thread during the data loading step. ``` train_files = glob.glob("xxx/*.txt",recursive=True) random.shuffle(train_files) print(train_files) dataset = nlp.load_dataset('text', data_files=train_files, name="customDataset", version="1.0.0", cache_dir="xxx/nlp") ``` Is there something that I am missing ?
31
Very slow data loading on large dataset I made a simple python script to check the NLP library speed, which loads 1.1 TB of textual data. It has been 8 hours and still, it is on the loading steps. It does work when the text dataset size is small about 1 GB, but it doesn't scale. It also uses a single thread during the data loading step. ``` train_files = glob.glob("xxx/*.txt",recursive=True) random.shuffle(train_files) print(train_files) dataset = nlp.load_dataset('text', data_files=train_files, name="customDataset", version="1.0.0", cache_dir="xxx/nlp") ``` Is there something that I am missing ? No problem, I will regenerate it. This will make us see if we solved both issues and now both the data generation step, as well as the hashing step, is fast.
[ -0.15192145109176636, -0.14883334934711456, -0.1157124936580658, 0.23963715136051178, 0.03762223571538925, 0.04945742338895798, 0.13784201443195343, 0.4157028794288635, 0.22574345767498016, -0.220219686627388, 0.18117380142211914, 0.20846256613731384, -0.1486450731754303, 0.2225392609834671, 0.24005205929279327, 0.1334550678730011, -0.010643184185028076, 0.23847536742687225, -0.03943809121847153, -0.1812114119529724, 0.08482244610786438, -0.016461005434393883, -0.19852757453918457, -0.27750974893569946, -0.21739561855793, -0.05643045902252197, -0.005537653341889381, 0.08891807496547699, -0.1562841683626175, -0.24680931866168976, -0.0427505262196064, 0.06521940231323242, -0.05122002586722374, 0.140825092792511, -0.00011632763926172629, -0.24559751152992249, 0.4251793622970581, 0.11352381110191345, -0.1921709030866623, -0.07293356955051422, 0.22161319851875305, -0.6238462328910828, 0.08916812390089035, -0.0979594737291336, -0.020534848794341087, -0.038910992443561554, 0.06685876846313477, -0.075063556432724, 0.04844888672232628, 0.036764658987522125, 0.11410635709762573, -0.18239568173885345, -0.22298486530780792, 0.273491770029068, 0.09735821187496185, 0.20331549644470215, -0.007811563089489937, 0.4100631773471832, 0.3281129002571106, -0.18224367499351501, -0.24255290627479553, 0.031110886484384537, -0.15267173945903778, 0.06863103806972504, 0.2688608169555664, 0.0768638327717781, -0.03807518631219864, -0.1262122094631195, 0.11728360503911972, 0.2772984802722931, 0.514214038848877, -0.07431702315807343, -0.08183260262012482, -0.35538458824157715, 0.04077876731753349, -0.18291231989860535, 0.3108656406402588, 0.2620798647403717, -0.24317780137062073, -0.2519623339176178, -0.3767656087875366, -0.3107427954673767, -0.03588888421654701, 0.16916540265083313, 0.19694870710372925, -0.017299622297286987, 0.015426910482347012, 0.11155444383621216, 0.2200424075126648, -0.023808393627405167, -0.009839433245360851, -0.08474767953157425, 0.21524889767169952, 0.38410860300064087, -0.33909881114959717, -0.04868843033909798, 0.08064049482345581, 0.22370418906211853, 0.09899894148111343, 0.1023348718881607, 0.09832240641117096, 0.08239835500717163, -0.05744952708482742, -0.00018354877829551697, 0.19469983875751495, 0.22656188905239105, -0.1181398555636406, -0.21565228700637817, 0.3537079691886902, -0.24148909747600555, -0.2157764434814453, 0.29243946075439453, -0.15023550391197205, -0.16439567506313324, 0.022365257143974304, -0.3545992076396942, -0.26405489444732666, -0.3176328241825104, 0.017532015219330788, -0.062174439430236816, -0.017875734716653824, -0.3224642872810364, 0.08623863011598587, 0.23777660727500916, -0.41925284266471863, 0.15546971559524536, -0.0714033991098404, -0.13021612167358398, -0.2981186509132385, 0.12771554291248322, -0.17378053069114685, 0.09129834175109863, -0.22900542616844177, 0.2068089246749878, 0.5647189617156982, -0.11098147928714752, 0.16045817732810974, 0.22255560755729675, -0.23606933653354645, -0.12502670288085938, -0.2276325821876526, -0.3216453790664673, -0.05506806820631027, -0.07393485307693481, -0.026682686060667038, 0.21627439558506012, -0.02513347938656807, 0.3782805800437927, -0.3872930109500885, 0.18446090817451477, -0.3624761700630188, -0.13486410677433014, 0.09355970472097397, 0.14242035150527954, -0.4249195456504822, -0.2871731221675873, -0.15412697196006775, 0.36903315782546997, -0.018694914877414703, -0.17099958658218384, -0.31643107533454895, -0.010747816413640976, -0.16855362057685852, -0.09055473655462265, 0.1508936583995819, 0.18974286317825317, -0.09137225151062012, 0.02871359884738922, -0.042800746858119965, 0.3228209614753723, 0.3777253329753876, 0.5567447543144226, -0.2224964201450348, 0.2703520655632019, -0.18188084661960602, 0.03935384750366211, 0.5186575651168823, 0.15848998725414276, -0.43701058626174927, 0.5346630811691284, -0.20848137140274048, 0.021886860951781273, 0.20988953113555908, 0.35640382766723633, 0.020329004153609276, -0.023173723369836807, 0.3230539560317993, 0.6156222224235535, 0.1618906706571579, 0.24828773736953735, -0.5206920504570007, -0.1039235070347786, 0.3324398994445801, 0.37310442328453064, -0.10811342298984528, -0.00008603185415267944, 0.030773580074310303, 0.1343967169523239, 0.41539299488067627, 0.11565898358821869, -0.06392213702201843, 0.33381539583206177, -0.14796721935272217, -0.046184226870536804, 0.027616582810878754, 0.15992993116378784, -0.11347299069166183, 0.1602136194705963, 0.16079863905906677, 0.15956157445907593, 0.24638934433460236, 0.15369437634944916, -0.1623043715953827, -0.28081852197647095, 0.10979907214641571, 0.2023734152317047, -0.013055941089987755, -0.08124130964279175, 0.05703725293278694, 0.1287440061569214, -0.14150632917881012, 0.3597146272659302, -0.22775322198867798, -0.1650281548500061, -0.38170742988586426, -0.033908117562532425, 0.23008382320404053, -0.18218766152858734, 0.39488789439201355, 0.30992984771728516, -0.13147318363189697, -0.01846911571919918, -0.10392028093338013, -0.16027754545211792, -0.2824913561344147, 0.23525500297546387, 0.09227605909109116, 0.1354861855506897, 0.0085610905662179, -0.09697625041007996, 0.439117968082428, 0.02764531783759594, 0.22389554977416992, -0.40004104375839233, -0.19801360368728638, 0.48233675956726074, -0.27699604630470276, 0.15355940163135529, 0.08935214579105377, -0.4861759543418884, 0.16519153118133545, -0.15094755589962006, 0.21427586674690247, 0.28875210881233215, 0.8977123498916626, 0.08711658418178558, 0.6330671906471252, 0.3522445857524872, -0.08977538347244263, 0.05871496722102165, 0.5588104128837585, 0.0003705564886331558, -0.2278020679950714, 0.4814254343509674, -0.11750463396310806, -0.4113427996635437, -0.0957975909113884, -0.11453092098236084, 0.34239035844802856, 0.2279917448759079, 0.05525766685605049, 0.08778169751167297, -0.024490654468536377, -0.2676410675048828, 0.2117273360490799, -0.194985494017601, 0.21955062448978424, 0.18122953176498413, 0.31462299823760986, 0.0641857460141182, -0.4541725814342499, -0.16063740849494934, 0.08189649134874344, 0.4434019923210144, -0.08801193535327911, -0.08378187566995621, -0.0655638799071312, -0.2384915053844452, -0.1835366189479828, 0.04231341555714607, -0.3184972405433655, -0.21161916851997375, -0.008189819753170013, 0.07855699956417084, 0.3982805013656616, -0.12015870958566666, 0.08631636202335358, 0.047001913189888, -0.22224940359592438, -0.42938077449798584, -0.32449251413345337, -0.17802344262599945, -0.263309508562088, -0.0021642446517944336, 0.3373178541660309, 0.24333973228931427, 0.35798972845077515, 0.15306341648101807, -0.27249276638031006, 0.20258359611034393, -0.13507115840911865, -0.20829784870147705, -0.0527460053563118, 0.030691102147102356, -0.16511470079421997, 0.1683889627456665, 0.11880616843700409, -0.05618640035390854, 0.11841556429862976, -0.3244408369064331, -0.10425788164138794, 0.17822758853435516, -0.04255560413002968, 0.021689996123313904, -0.023198002949357033, -0.269768089056015, -0.24572141468524933, -0.2183191329240799, 0.4573231339454651, 0.07185377180576324, 0.20804327726364136, 0.1711168885231018, -0.19839955866336823, 0.1929030865430832, 0.059141017496585846, 0.2377711832523346, -0.03465009480714798, -0.3612537086009979, 0.3110784590244293, 0.27329590916633606, -0.2055792212486267, -0.21296270191669464, -0.000386776402592659, 0.1451837569475174, 0.15923582017421722, -0.6935851573944092, 0.3073454797267914, -0.40948182344436646, 0.0009771734476089478, -0.025076761841773987, 0.11693035066127777, 0.12803129851818085, -0.19066479802131653, -0.08381899446249008, 0.24923491477966309, -0.16036134958267212, 0.04238859936594963, -0.03490274399518967, 0.20694848895072937, -0.09722799062728882, 0.4938475787639618, -0.03725763410329819, 0.18779879808425903, 0.1699875295162201, -0.12379303574562073, 0.13052381575107574, 0.007146056741476059, 0.03342568874359131, -0.1676991581916809, -0.24540561437606812, 0.20369191467761993, -0.09006014466285706, -0.08771216124296188, 0.2772505581378937, 0.05230284854769707, -0.4173792600631714, -0.24775075912475586, -0.18114151060581207, -0.18736353516578674, -0.09182321280241013, 0.2865213453769684, -0.5284754037857056, -0.04810573160648346, 0.03734136000275612, -0.12612418830394745, -0.29165416955947876, -0.7598497271537781, -0.07954926788806915, 0.06658579409122467, 0.16413167119026184, -0.0017776580061763525, -0.15575146675109863, -0.020095303654670715, -0.8061315417289734, 0.0416656956076622, -0.15938027203083038, 0.4539014399051666, 0.043504562228918076, -0.12042692303657532, 0.3541281223297119, -0.20136995613574982, 0.38186269998550415, 0.2417016327381134, 0.2068859040737152, 0.07983832061290741, -0.20996809005737305, -0.2572871446609497, 0.01963100954890251, -0.08977983146905899, 0.2821126878261566, 0.5096004009246826, 0.336542010307312, -0.28040584921836853, -0.16950221359729767, 0.03579328954219818, 0.24598804116249084, -0.021690532565116882, -0.5882358551025391, -0.2670217752456665, -0.10949550569057465, 0.07674889266490936, 0.04463276267051697, -0.36090388894081116, 0.21830831468105316, -0.20518465340137482, 0.015370957553386688, -0.007032288238406181, 0.000939464196562767, 0.32999753952026367, 0.0006129704415798187, -0.22780391573905945, 0.040411099791526794, 0.45934444665908813, -0.1085028350353241, 0.27468252182006836, -0.4829610586166382, 0.41731584072113037, 0.2848145067691803, 0.1655389964580536, -0.11025773733854294, 0.044088564813137054, 0.4188215732574463, 0.29158085584640503, 0.08361905813217163, 0.06069023162126541, -0.17677968740463257, 0.16070763766765594, -0.23046435415744781, 0.004792113322764635, 0.1330130398273468, 0.014437255449593067, -0.46782684326171875, -0.4470434784889221, 0.8200923204421997, 0.18402227759361267, 0.07564175128936768, 0.4255051016807556, -0.4305794835090637, 0.06491927057504654, 0.1462245136499405, -0.30743053555488586, 0.83724445104599, -0.45231860876083374, 0.21271675825119019, -0.1174653097987175, 0.11256170272827148, 0.40334269404411316, -0.11719266325235367, 0.02328520268201828, -0.5333126187324524, 0.012679420411586761, 0.31595489382743835, -0.09369650483131409, -0.09823230654001236, 0.3226335644721985, -0.07205437123775482, 0.35860177874565125, 0.3544495701789856, -0.20241045951843262, -0.10471754521131516, 0.7358264327049255, -0.09643904864788055, -0.22773253917694092, -0.6106959581375122, 0.09263957291841507, -0.316128671169281, 0.368295818567276, 0.012418773025274277, 0.028361650183796883, -0.09096871316432953, 0.00021884962916374207, -0.24895019829273224, 0.19648274779319763, 0.022293617948889732, -0.012973174452781677, -0.0664421021938324, -0.32692986726760864, 0.1552102267742157, 0.025880567729473114, -0.11961419880390167, 0.23877879977226257, -0.2393491566181183, 0.15719299018383026, -0.3865928053855896, 0.19561703503131866, 0.5479061603546143, 0.018488798290491104, 0.1701096147298813, -0.24761560559272766, -0.015464581549167633, -0.17946022748947144, -0.03500574454665184, -0.2775331139564514, -0.13224872946739197, 0.09840866923332214, -0.021979011595249176, 0.1278962790966034, -0.29488444328308105, 0.24702848494052887, -0.013396915048360825, -0.04881644248962402, 0.06244697421789169, 0.48366111516952515, 0.03404359519481659, 0.3923459053039551, 0.07933445274829865, -0.38641366362571716, -0.047124650329351425, 0.5738094449043274, 0.17459338903427124, -0.183954119682312, 0.42025426030158997, 0.2087322622537613, -0.19226782023906708, -0.16151678562164307, -0.04720166698098183, -0.1382567286491394, -0.16561339795589447, 0.0393199622631073, 0.12037160247564316, 0.0757087767124176, 0.2407543808221817, -0.024227235466241837, -0.0969848781824112, -0.09983355551958084, 0.11197200417518616, -0.444823682308197, -0.3277880847454071, 0.025197084993124008, -0.03193466737866402, -0.07860004901885986, -0.028430752456188202, 0.08766505122184753, 0.18836858868598938, 0.4070281684398651, -0.2081248164176941, 0.18605783581733704, 0.039907097816467285, 0.13966208696365356, 0.037450723350048065, -0.3408956825733185, 0.06098887324333191, 0.20016436278820038, 0.12733718752861023, -0.0768771767616272, 0.11266279220581055, -0.22160091996192932, 0.07839682698249817, 0.16191546618938446, -0.016179170459508896, 0.036028243601322174, -0.005704969633370638, -0.22852428257465363, -0.13367904722690582, -0.12885074317455292, -0.133219912648201, -0.02446994185447693, -0.027154304087162018, -0.07013174891471863, 0.03740135580301285, 0.06307440996170044, -0.028954453766345978, 0.2631283402442932, -0.4573264420032501, 0.17902304232120514, 0.04081963375210762, 0.0016275756061077118, 0.2796969413757324, -0.015045896172523499, -0.5266519784927368, -0.11424154788255692, 0.14300647377967834, 0.09165136516094208, 0.26679545640945435, -0.14705248177051544, 0.0916663408279419, 0.010162768885493279, 0.21621468663215637, 0.4975883364677429, 0.12790359556674957, -0.226385235786438, 0.20404905080795288, 0.07544732093811035, -0.21077169477939606, -0.02118123322725296, 0.27621355652809143, 0.07334676384925842, -0.11900462210178375, 0.10313902795314789, 0.11933451890945435, 0.050564736127853394, -0.374442458152771, -0.33140242099761963, 0.3522186279296875, -0.31754231452941895, -0.31915798783302307, 0.05853738263249397, 0.14174726605415344, -0.19466666877269745, 0.26226338744163513, 0.12322930991649628, -0.02859707921743393, 0.5310928821563721, 0.21043074131011963, 0.30367544293403625, 0.09588031470775604, 0.4896484315395355, -0.3807525336742401, -0.24187467992305756, -0.1851475089788437, 0.527212917804718, 0.07345573604106903, 0.06618361920118332, -0.12918327748775482, 0.30425727367401123, 0.02955523133277893, 0.036418162286281586, -0.22617313265800476, 0.11820253729820251, -0.05062068998813629, -0.05778425559401512, 0.20260149240493774, 0.08189142495393753, -0.2065410614013672, 0.2879892587661743, -0.3173884451389313, 0.08860432356595993, 0.06954607367515564, 0.3331952691078186, 0.0021913722157478333, -0.3964422941207886, 0.13592278957366943, -0.01964152231812477, 0.24422895908355713, -0.21842341125011444, 0.09842516481876373, -0.31115424633026123, 0.0590205155313015, 0.025630712509155273, 0.13959896564483643, 0.22335626184940338, 0.37800490856170654, -0.032432056963443756, 0.040934592485427856, -0.08810074627399445, -0.055177681148052216, -0.2662889361381531, 0.5282583832740784, 0.21886204183101654, 0.42170649766921997, 0.04433564469218254, -0.036029376089572906, -0.11945345997810364, 0.08055289089679718, -0.0876426100730896, -0.17814002931118011, 0.007476417347788811, 0.29601335525512695, 0.2574980854988098, -0.3041257858276367, -0.48000088334083557, 0.09821555018424988, -0.29882708191871643, -0.38711926341056824, 0.18555206060409546, -0.05638376250863075, -0.04527536779642105, -0.11753718554973602, 0.04961603879928589, -0.3259603977203369, 0.7584059238433838, 0.4055696725845337, 0.36719146370887756, -0.17118671536445618, -0.22736027836799622, -0.4747665226459503, -0.10689236968755722, -0.1883239895105362, -0.03905057907104492, 0.03622199967503548, 0.31191492080688477, 0.11163696646690369, 0.0585506372153759, -0.5351693034172058, 0.21614116430282593, -0.16054348647594452, -0.04927399754524231, -0.29087844491004944, 0.1094958484172821, -0.3576452136039734, 0.07391200959682465, -0.19179567694664001, -0.2154424786567688, 0.1510278284549713, -0.27206137776374817, -0.06324725598096848, -0.16668446362018585, 0.01751868426799774, 0.017663098871707916, 0.45374205708503723, 0.33307334780693054, 0.016374599188566208, 0.41213640570640564, -0.04829895868897438, -0.09972712397575378, -0.36843833327293396, 0.04485555738210678, -0.14813029766082764, 0.3600817918777466, 0.11968320608139038, -0.024329544976353645, 0.00525614432990551, 0.36505189538002014, 0.13447465002536774, 0.25959908962249756, -0.35195422172546387, 0.027103345841169357, 0.050963252782821655, -0.2954760491847992, 0.05573859065771103, 0.3249186873435974, -0.003918942995369434, 0.4142495095729828, -0.0009484030306339264, -0.12473300844430923, -0.49263668060302734, 0.028345460072159767, 0.27434664964675903, -0.3181944191455841, -0.03278711810708046, -0.18311017751693726, 0.33100834488868713, 0.06202217563986778, 0.26656198501586914, -0.3928835690021515, -0.03503458946943283, 0.2672193646430969, 0.02939850464463234, 0.025035586208105087, 0.512706458568573, 0.060304075479507446, -0.10705383121967316, -0.026385243982076645, 0.033988770097494125, -0.1410609781742096, -0.16332976520061493, -0.34315818548202515, -0.15465155243873596 ]
https://github.com/huggingface/datasets/issues/546
Very slow data loading on large dataset
Ok so now the text files won't be hashed. I also updated #548 to include this change. Let us know if it helps @agemagician :)
I made a simple python script to check the NLP library speed, which loads 1.1 TB of textual data. It has been 8 hours and still, it is on the loading steps. It does work when the text dataset size is small about 1 GB, but it doesn't scale. It also uses a single thread during the data loading step. ``` train_files = glob.glob("xxx/*.txt",recursive=True) random.shuffle(train_files) print(train_files) dataset = nlp.load_dataset('text', data_files=train_files, name="customDataset", version="1.0.0", cache_dir="xxx/nlp") ``` Is there something that I am missing ?
25
Very slow data loading on large dataset I made a simple python script to check the NLP library speed, which loads 1.1 TB of textual data. It has been 8 hours and still, it is on the loading steps. It does work when the text dataset size is small about 1 GB, but it doesn't scale. It also uses a single thread during the data loading step. ``` train_files = glob.glob("xxx/*.txt",recursive=True) random.shuffle(train_files) print(train_files) dataset = nlp.load_dataset('text', data_files=train_files, name="customDataset", version="1.0.0", cache_dir="xxx/nlp") ``` Is there something that I am missing ? Ok so now the text files won't be hashed. I also updated #548 to include this change. Let us know if it helps @agemagician :)
[ -0.1468626856803894, -0.16774806380271912, -0.11598919332027435, 0.25076302886009216, 0.011674724519252777, 0.12867343425750732, 0.20286066830158234, 0.43605655431747437, 0.2853424549102783, -0.21578554809093475, 0.14113609492778778, 0.18515819311141968, -0.17779101431369781, 0.17726349830627441, 0.21012096107006073, 0.17294864356517792, -0.03739521652460098, 0.23075076937675476, 0.06646312773227692, -0.1615091860294342, 0.07386371493339539, 0.015255287289619446, -0.23794236779212952, -0.26963508129119873, -0.18590927124023438, 0.008016860112547874, 0.010822812095284462, 0.045906659215688705, -0.15816952288150787, -0.24185657501220703, -0.04022980481386185, 0.1110755205154419, -0.0026755807921290398, 0.22691375017166138, -0.00011888030712725595, -0.22309476137161255, 0.43243712186813354, 0.09956519305706024, -0.16449159383773804, -0.07872222363948822, 0.24738359451293945, -0.5807961821556091, 0.1536240428686142, -0.11152511835098267, -0.027973990887403488, -0.02428698167204857, 0.084989033639431, -0.09085097908973694, 0.009199932217597961, 0.09363853931427002, 0.09567103534936905, -0.15014679729938507, -0.2433134764432907, 0.2775411605834961, 0.1566743552684784, 0.15840570628643036, 0.017857221886515617, 0.37683331966400146, 0.3840212821960449, -0.19829045236110687, -0.23796924948692322, 0.06910154223442078, -0.20443645119667053, 0.06711569428443909, 0.28229454159736633, 0.06955006718635559, -0.0627487525343895, -0.10675573348999023, 0.08471120148897171, 0.29038283228874207, 0.5367579460144043, -0.08199121803045273, -0.014514196664094925, -0.41577568650245667, -0.03339342400431633, -0.1956961452960968, 0.2631210684776306, 0.22123439610004425, -0.1917857825756073, -0.25987452268600464, -0.42695948481559753, -0.27120092511177063, -0.03465889394283295, 0.18712490797042847, 0.16976715624332428, 0.012553438544273376, 0.018082670867443085, 0.1133255809545517, 0.23460790514945984, -0.005795612931251526, -0.030342601239681244, -0.1031939685344696, 0.22667743265628815, 0.4136865735054016, -0.3679285943508148, -0.07998812198638916, 0.08147735893726349, 0.20511215925216675, 0.07566779851913452, 0.11086446791887283, 0.07748182117938995, 0.10881181061267853, -0.1353551149368286, 0.0001643635332584381, 0.22678257524967194, 0.30418482422828674, -0.10983886569738388, -0.17085345089435577, 0.3388782739639282, -0.19789598882198334, -0.23929645121097565, 0.22616326808929443, -0.1341170370578766, -0.19490110874176025, 0.04093380644917488, -0.39112868905067444, -0.2186795175075531, -0.3882545232772827, -0.016174037009477615, -0.10214138776063919, -0.011792641133069992, -0.2803955376148224, 0.0991441011428833, 0.23281773924827576, -0.37147071957588196, 0.18828359246253967, 0.025662966072559357, -0.12134464085102081, -0.3319729268550873, 0.11761804670095444, -0.1348506510257721, 0.06482574343681335, -0.20036442577838898, 0.2102784961462021, 0.5573925971984863, -0.10811255872249603, 0.15495336055755615, 0.14075574278831482, -0.1908709853887558, -0.12359696626663208, -0.24517972767353058, -0.3195987045764923, -0.05171620100736618, -0.03913217410445213, -0.06039971485733986, 0.23936106264591217, 0.01708490028977394, 0.2906761169433594, -0.38097164034843445, 0.14627781510353088, -0.3813512921333313, -0.09174706041812897, 0.07153603434562683, 0.12550202012062073, -0.41163545846939087, -0.3418380916118622, -0.1967478096485138, 0.3686617910861969, -0.015102110803127289, -0.22974543273448944, -0.2660706341266632, -0.07077228277921677, -0.2337770313024521, -0.02217407338321209, 0.1182166263461113, 0.2390013039112091, -0.11176563799381256, 0.0041153281927108765, -0.07029452919960022, 0.335003525018692, 0.29341843724250793, 0.5889781713485718, -0.19779688119888306, 0.2587461769580841, -0.20769426226615906, 0.0664704442024231, 0.45339757204055786, 0.07939253747463226, -0.4505614638328552, 0.5086811780929565, -0.22727251052856445, 0.02621130831539631, 0.23603543639183044, 0.409668892621994, 0.019048430025577545, -0.0865275114774704, 0.3309935927391052, 0.5486655831336975, 0.20940850675106049, 0.1983357071876526, -0.5275840759277344, -0.10457887500524521, 0.31666189432144165, 0.4256463348865509, -0.07329604029655457, -0.04204172641038895, 0.03419991955161095, 0.11104490607976913, 0.4546038508415222, 0.19743278622627258, -0.09503477066755295, 0.3816903829574585, -0.14140449464321136, 0.02899158000946045, 0.042062848806381226, 0.1356697976589203, -0.07668901234865189, 0.1253722608089447, 0.180087611079216, 0.10448595881462097, 0.2555919885635376, 0.15861786901950836, -0.17950403690338135, -0.2985091805458069, 0.06880281865596771, 0.19660954177379608, -0.041799791157245636, -0.0983961820602417, -0.006332729011774063, 0.18945607542991638, -0.1755666434764862, 0.32495322823524475, -0.22636808454990387, -0.1705375462770462, -0.3540983200073242, -0.05081399530172348, 0.26187723875045776, -0.16586673259735107, 0.3487640917301178, 0.26912009716033936, -0.12802842259407043, -0.02146427147090435, -0.09568586945533752, -0.15536919236183167, -0.2626422643661499, 0.216246098279953, 0.07985039055347443, 0.1474856287240982, -0.0038790497928857803, -0.06865862011909485, 0.42774227261543274, 0.14166779816150665, 0.2356414645910263, -0.39453884959220886, -0.2611125707626343, 0.4239822030067444, -0.2399430125951767, 0.1925334930419922, 0.10004067420959473, -0.5276628136634827, 0.09527963399887085, -0.14994759857654572, 0.17924924194812775, 0.3012719452381134, 0.9152830243110657, 0.07489754259586334, 0.5796507596969604, 0.3361263573169708, -0.09656324982643127, 0.0237034410238266, 0.5802979469299316, -0.01359577476978302, -0.23074552416801453, 0.5299872756004333, -0.13764312863349915, -0.3367544710636139, -0.09074534475803375, -0.15967720746994019, 0.3672909140586853, 0.25842756032943726, 0.061242327094078064, 0.08319183439016342, -0.006759366951882839, -0.274586021900177, 0.18608441948890686, -0.17484919726848602, 0.15555913746356964, 0.18420925736427307, 0.3061494529247284, 0.06723880767822266, -0.4513901472091675, -0.19006314873695374, 0.011135539039969444, 0.3954624533653259, -0.12191669642925262, -0.06007426977157593, -0.06220603734254837, -0.2860003411769867, -0.19992591440677643, 0.01162765547633171, -0.3100387454032898, -0.2185942679643631, 0.03912125527858734, 0.09453743696212769, 0.4434693157672882, -0.14058804512023926, 0.023784033954143524, 0.09197935461997986, -0.14609341323375702, -0.504612922668457, -0.3176472783088684, -0.12407264113426208, -0.30575212836265564, -0.035673223435878754, 0.3436006009578705, 0.20662705600261688, 0.28578585386276245, 0.1580764502286911, -0.23934736847877502, 0.21406851708889008, -0.1337425708770752, -0.24649834632873535, -0.0655808225274086, 0.007495963014662266, -0.19849702715873718, 0.1913428157567978, 0.15130484104156494, -0.02543552964925766, 0.07045629620552063, -0.3434506058692932, -0.049898989498615265, 0.16916856169700623, 0.014174193143844604, 0.02518499456346035, -0.035394616425037384, -0.2966691255569458, -0.2575838267803192, -0.19428005814552307, 0.5056713819503784, 0.12826906144618988, 0.19183120131492615, 0.23334062099456787, -0.15644113719463348, 0.2238164246082306, 0.013096856884658337, 0.19607090950012207, -0.01030086912214756, -0.33550602197647095, 0.3539389967918396, 0.31497877836227417, -0.19098986685276031, -0.18451331555843353, 0.07846001535654068, 0.0577201247215271, 0.06487853825092316, -0.7292472720146179, 0.3334602117538452, -0.42472371459007263, -0.058950476348400116, -0.0232270285487175, 0.07632596790790558, 0.182900071144104, -0.21815676987171173, -0.06535378098487854, 0.26498541235923767, -0.14226756989955902, 0.05476033687591553, -0.04145455360412598, 0.24598625302314758, -0.14906328916549683, 0.4429360330104828, -0.041602592915296555, 0.13107487559318542, 0.14293746650218964, -0.12760010361671448, 0.1752120703458786, -0.046957775950431824, 0.08783507347106934, -0.20858177542686462, -0.2550736367702484, 0.16399434208869934, -0.06988401710987091, -0.12261765450239182, 0.32860904932022095, 0.11173329502344131, -0.41022416949272156, -0.25732478499412537, -0.1881212443113327, -0.1360914558172226, -0.0913286879658699, 0.23390080034732819, -0.4632796049118042, -0.16952040791511536, -0.00023831240832805634, -0.12345068156719208, -0.27063673734664917, -0.8070902824401855, -0.08997669816017151, 0.19391611218452454, 0.11349035799503326, -0.012487354688346386, -0.14162759482860565, 0.05727485567331314, -0.7214735150337219, 0.09164661169052124, -0.22558483481407166, 0.4330693483352661, 0.009503591805696487, -0.15304945409297943, 0.36581581830978394, -0.14164304733276367, 0.34537723660469055, 0.2615410387516022, 0.21581017971038818, 0.1648535132408142, -0.14570875465869904, -0.30581483244895935, -0.060659199953079224, -0.13598059117794037, 0.2373659759759903, 0.5244669914245605, 0.39552152156829834, -0.15960565209388733, -0.12556229531764984, 0.032196179032325745, 0.26632869243621826, -0.04552578553557396, -0.6147640347480774, -0.34003371000289917, -0.1236438900232315, 0.08393601328134537, 0.05487985163927078, -0.25616684556007385, 0.16415943205356598, -0.2225334495306015, 0.0019965507090091705, 0.016044439747929573, -0.0569869801402092, 0.3316154479980469, -0.06495025008916855, -0.19724717736244202, 0.048390943557024, 0.38289424777030945, -0.10954174399375916, 0.2603672742843628, -0.5135042667388916, 0.4005383253097534, 0.28782185912132263, 0.1498519480228424, -0.09819193929433823, 0.01584993675351143, 0.42333248257637024, 0.28826528787612915, 0.05661189183592796, 0.10329629480838776, -0.19017355144023895, 0.20385807752609253, -0.20708046853542328, 0.03658119589090347, 0.15522801876068115, 0.037307582795619965, -0.45359471440315247, -0.4440160393714905, 0.8658823370933533, 0.20045839250087738, 0.05230781435966492, 0.44137394428253174, -0.48908329010009766, 0.007625207304954529, 0.16461843252182007, -0.32551053166389465, 0.896266758441925, -0.5091386437416077, 0.2615792751312256, -0.17172685265541077, 0.15434318780899048, 0.363510400056839, -0.2261977642774582, 0.04696204140782356, -0.478266179561615, -0.012827794067561626, 0.27977317571640015, -0.055813081562519073, -0.10937818139791489, 0.29662954807281494, -0.08402930200099945, 0.4026572108268738, 0.303719162940979, -0.18165454268455505, -0.13500355184078217, 0.7126306295394897, -0.12465811520814896, -0.14955654740333557, -0.5936137437820435, 0.07178343087434769, -0.2490154653787613, 0.45046940445899963, 0.02904193103313446, 0.05514953285455704, -0.11243648082017899, -0.03634544834494591, -0.2671850919723511, 0.1421431303024292, 0.04127711057662964, -0.06837358325719833, -0.1079096794128418, -0.27448034286499023, 0.16170354187488556, 0.13410188257694244, -0.19706891477108002, 0.24542734026908875, -0.27132678031921387, 0.14792530238628387, -0.38874948024749756, 0.179672509431839, 0.5466575026512146, 0.02696758508682251, 0.12330613285303116, -0.20265954732894897, -0.03715766221284866, -0.22631162405014038, -0.003736178856343031, -0.2732934355735779, -0.16862523555755615, 0.14592613279819489, -0.025448501110076904, 0.07752949744462967, -0.3267635703086853, 0.2190428525209427, -0.01498505100607872, 0.019493021070957184, 0.03934018313884735, 0.4278939366340637, 0.05730414763092995, 0.4107723534107208, 0.07817992568016052, -0.43282103538513184, -0.03417069837450981, 0.6329448223114014, 0.1193465143442154, -0.17157696187496185, 0.4617881774902344, 0.24623964726924896, -0.18512581288814545, -0.14396268129348755, -0.031644344329833984, -0.0844547301530838, -0.11854958534240723, 0.04574321582913399, 0.13802067935466766, 0.13272051513195038, 0.23383739590644836, -0.01586746796965599, -0.13403260707855225, -0.12100064009428024, 0.06793497502803802, -0.4891679584980011, -0.33221435546875, 0.007663920521736145, -0.03549816086888313, -0.04952916130423546, -0.04551297426223755, 0.03946537524461746, 0.2536677122116089, 0.2950511872768402, -0.18402227759361267, 0.23376180231571198, 0.010318228974938393, 0.10745783895254135, 0.04717965051531792, -0.2894692122936249, 0.07753410935401917, 0.1480063796043396, 0.09947410970926285, -0.08814118802547455, 0.17344145476818085, -0.19988858699798584, 0.07834278047084808, 0.17719323933124542, -0.022231515496969223, 0.06849995255470276, -0.02605774626135826, -0.2911947965621948, -0.09031727910041809, -0.138387531042099, -0.14630448818206787, 0.033383019268512726, -0.02042493224143982, -0.018738940358161926, -0.006201747804880142, 0.018319062888622284, -0.017955854535102844, 0.2220657765865326, -0.4845610558986664, 0.21268878877162933, 0.11889603734016418, -0.043444834649562836, 0.31197360157966614, 0.06829160451889038, -0.5019714832305908, -0.11395057290792465, 0.16378697752952576, 0.12045880407094955, 0.1987321972846985, -0.17132842540740967, 0.14280809462070465, -0.0002147126942873001, 0.24728816747665405, 0.5397861003875732, 0.046588264405727386, -0.23438948392868042, 0.2082853615283966, 0.07020822912454605, -0.23240651190280914, 0.012842975556850433, 0.3182407021522522, 0.12216369807720184, -0.1434263437986374, 0.09904663264751434, 0.10683499276638031, 0.04939298331737518, -0.3408558964729309, -0.2861550450325012, 0.41407299041748047, -0.2528637647628784, -0.29830360412597656, 0.06199547275900841, 0.17948836088180542, -0.2136215716600418, 0.24529728293418884, 0.11345687508583069, -0.048568762838840485, 0.5281428098678589, 0.16927975416183472, 0.2819335162639618, 0.02983635477721691, 0.49908462166786194, -0.459150105714798, -0.2564746141433716, -0.17323191463947296, 0.5806374549865723, 0.1013701930642128, 0.08646783977746964, -0.10499854385852814, 0.32126709818840027, 0.01337207481265068, 0.06642021983861923, -0.15773268043994904, 0.11021934449672699, -0.01875646784901619, -0.07045607268810272, 0.22362399101257324, 0.047238804399967194, -0.20659033954143524, 0.24587318301200867, -0.27088356018066406, 0.11156737804412842, -0.01270245760679245, 0.36986833810806274, -0.038898736238479614, -0.36575087904930115, 0.09760084003210068, -0.023298069834709167, 0.26597321033477783, -0.21682770550251007, 0.09475449472665787, -0.30537211894989014, 0.10463344305753708, 0.1304858773946762, 0.13342337310314178, 0.24834507703781128, 0.3836374580860138, -0.024740155786275864, 0.11806312203407288, -0.17083041369915009, -0.052513573318719864, -0.21678590774536133, 0.4916272759437561, 0.2272070348262787, 0.41880834102630615, 0.03207043558359146, -0.04440329596400261, -0.0905757024884224, 0.19354146718978882, -0.17245125770568848, -0.18696369230747223, -0.07218244671821594, 0.2947709262371063, 0.275770902633667, -0.3323742747306824, -0.5637335777282715, 0.06036031246185303, -0.30466997623443604, -0.3551770746707916, 0.2188630849123001, -0.011658157221972942, -0.0033618053421378136, -0.08659975230693817, 0.02950698509812355, -0.2765633761882782, 0.6839315891265869, 0.40795648097991943, 0.393464058637619, -0.14500692486763, -0.18290360271930695, -0.5345118045806885, -0.11903291195631027, -0.2366606593132019, -0.0726824477314949, 0.040612634271383286, 0.2603270709514618, 0.07884400337934494, 0.029218360781669617, -0.44307607412338257, 0.22487565875053406, -0.15402190387248993, -0.09114184975624084, -0.30240246653556824, 0.11167339980602264, -0.343050479888916, 0.136799618601799, -0.17146338522434235, -0.1733541488647461, 0.10393494367599487, -0.27317512035369873, -0.09434370696544647, -0.184381902217865, 0.09138885140419006, -0.009915556758642197, 0.4788241982460022, 0.30283021926879883, -0.05682159215211868, 0.4388091266155243, -0.003832140937447548, -0.06849411875009537, -0.37775903940200806, 0.10482099652290344, -0.17908942699432373, 0.25246086716651917, 0.11820775270462036, -0.06535123288631439, -0.04883533716201782, 0.3246188461780548, 0.1262119859457016, 0.2831220328807831, -0.3425391912460327, 0.019398119300603867, 0.0338452085852623, -0.3557538092136383, 0.04840927571058273, 0.357324481010437, -0.03672914206981659, 0.42299148440361023, -0.024178825318813324, -0.10414204746484756, -0.4996809959411621, 0.03551255911588669, 0.3133939802646637, -0.3360889256000519, -0.040069397538900375, -0.14422325789928436, 0.3503614068031311, 0.06573010981082916, 0.3043917715549469, -0.43820059299468994, -0.03263666480779648, 0.3086370527744293, 0.09364723414182663, 0.02481362596154213, 0.4935055673122406, 0.050289325416088104, -0.0830155611038208, -0.009890453889966011, 0.06707790493965149, -0.09369073808193207, -0.08600496500730515, -0.37884286046028137, -0.17762698233127594 ]
https://github.com/huggingface/datasets/issues/539
[Dataset] `NonMatchingChecksumError` due to an update in the LinCE benchmark data
Hi @gaguilar If you want to take care of this, it very simple, you just need to regenerate the `dataset_infos.json` file as indicated [in the doc](https://huggingface.co/nlp/share_dataset.html#adding-metadata) by [installing from source](https://huggingface.co/nlp/installation.html#installing-from-source) and running the following command from the root of the repo: ```bash python nlp-cli test ./datasets/lince --save_infos --all_configs ``` And then you can open a pull-request with the updated json file. Otherwise we'll do it sometime this week.
Hi, There is a `NonMatchingChecksumError` error for the `lid_msaea` (language identification for Modern Standard Arabic - Egyptian Arabic) dataset from the LinCE benchmark due to a minor update on that dataset. How can I update the checksum of the library to solve this issue? The error is below and it also appears in the [nlp viewer](https://huggingface.co/nlp/viewer/?dataset=lince&config=lid_msaea): ```python import nlp nlp.load_dataset('lince', 'lid_msaea') ``` Output: ``` NonMatchingChecksumError: ['https://ritual.uh.edu/lince/libaccess/eyJ1c2VybmFtZSI6ICJodWdnaW5nZmFjZSBubHAiLCAidXNlcl9pZCI6IDExMSwgImVtYWlsIjogImR1bW15QGVtYWlsLmNvbSJ9/lid_msaea.zip'] Traceback: File "/home/sasha/streamlit/lib/streamlit/ScriptRunner.py", line 322, in _run_script exec(code, module.__dict__) File "/home/sasha/nlp-viewer/run.py", line 196, in <module> dts, fail = get(str(option.id), str(conf_option.name) if conf_option else None) File "/home/sasha/streamlit/lib/streamlit/caching.py", line 591, in wrapped_func return get_or_create_cached_value() File "/home/sasha/streamlit/lib/streamlit/caching.py", line 575, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/home/sasha/nlp-viewer/run.py", line 150, in get builder_instance.download_and_prepare() File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/builder.py", line 432, in download_and_prepare download_config.force_download = download_mode == FORCE_REDOWNLOAD File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/builder.py", line 469, in _download_and_prepare File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/utils/info_utils.py", line 36, in verify_checksums raise NonMatchingChecksumError(str(bad_urls)) ``` Thank you in advance! @lhoestq
68
[Dataset] `NonMatchingChecksumError` due to an update in the LinCE benchmark data Hi, There is a `NonMatchingChecksumError` error for the `lid_msaea` (language identification for Modern Standard Arabic - Egyptian Arabic) dataset from the LinCE benchmark due to a minor update on that dataset. How can I update the checksum of the library to solve this issue? The error is below and it also appears in the [nlp viewer](https://huggingface.co/nlp/viewer/?dataset=lince&config=lid_msaea): ```python import nlp nlp.load_dataset('lince', 'lid_msaea') ``` Output: ``` NonMatchingChecksumError: ['https://ritual.uh.edu/lince/libaccess/eyJ1c2VybmFtZSI6ICJodWdnaW5nZmFjZSBubHAiLCAidXNlcl9pZCI6IDExMSwgImVtYWlsIjogImR1bW15QGVtYWlsLmNvbSJ9/lid_msaea.zip'] Traceback: File "/home/sasha/streamlit/lib/streamlit/ScriptRunner.py", line 322, in _run_script exec(code, module.__dict__) File "/home/sasha/nlp-viewer/run.py", line 196, in <module> dts, fail = get(str(option.id), str(conf_option.name) if conf_option else None) File "/home/sasha/streamlit/lib/streamlit/caching.py", line 591, in wrapped_func return get_or_create_cached_value() File "/home/sasha/streamlit/lib/streamlit/caching.py", line 575, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/home/sasha/nlp-viewer/run.py", line 150, in get builder_instance.download_and_prepare() File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/builder.py", line 432, in download_and_prepare download_config.force_download = download_mode == FORCE_REDOWNLOAD File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/builder.py", line 469, in _download_and_prepare File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/utils/info_utils.py", line 36, in verify_checksums raise NonMatchingChecksumError(str(bad_urls)) ``` Thank you in advance! @lhoestq Hi @gaguilar If you want to take care of this, it very simple, you just need to regenerate the `dataset_infos.json` file as indicated [in the doc](https://huggingface.co/nlp/share_dataset.html#adding-metadata) by [installing from source](https://huggingface.co/nlp/installation.html#installing-from-source) and running the following command from the root of the repo: ```bash python nlp-cli test ./datasets/lince --save_infos --all_configs ``` And then you can open a pull-request with the updated json file. Otherwise we'll do it sometime this week.
[ -0.06165393814444542, 0.4437035322189331, -0.05816148966550827, 0.06641753762960434, -0.30721110105514526, 0.11532733589410782, -0.2732497751712799, 0.5395026803016663, -0.0016360227018594742, -0.11965854465961456, 0.0857626423239708, 0.2251156121492386, 0.07897729426622391, -0.1222938522696495, 0.006191069260239601, 0.1934707760810852, 0.032150380313396454, 0.09338535368442535, 0.09870143234729767, 0.039390191435813904, -0.205377459526062, 0.21487759053707123, -0.0574839748442173, -0.2985471487045288, 0.08935591578483582, -0.0041811782866716385, 0.0692201554775238, 0.018289931118488312, 0.1299762725830078, -0.419452041387558, 0.32060572504997253, 0.27932730317115784, 0.00039007700979709625, 0.13242408633232117, -0.00012728053843602538, -0.06949442625045776, 0.32102376222610474, -0.09197413921356201, -0.2670391798019409, -0.08463487029075623, 0.0034755878150463104, -0.4629065692424774, -0.061304181814193726, -0.2885448634624481, 0.16378843784332275, 0.23998774588108063, 0.10291270911693573, -0.4139178395271301, -0.09509623050689697, 0.18512843549251556, 0.10833649337291718, 0.5190726518630981, 0.0809718668460846, 0.33804938197135925, 0.2563707232475281, -0.4211411476135254, 0.03065878339111805, 0.38378384709358215, 0.33936890959739685, -0.13668952882289886, -0.4413134455680847, 0.3681643605232239, -0.3522351384162903, 0.04231233149766922, -0.016172058880329132, -0.3124469518661499, 0.019456520676612854, -0.0667773187160492, 0.3025442361831665, 0.1907629668712616, 0.3051871955394745, -0.4455224871635437, -0.20084813237190247, 0.006710052490234375, -0.2116420716047287, -0.11551754176616669, 0.4846942126750946, 0.10112147033214569, -0.030153993517160416, -0.1416909098625183, -0.09938150644302368, -0.04329968988895416, 0.10721907019615173, 0.21369308233261108, 0.34747079014778137, 0.4857041537761688, 0.24315296113491058, 0.11189211905002594, 0.16246835887432098, 0.005549568682909012, 0.5039781928062439, -0.09321172535419464, -0.14118097722530365, 0.1578635722398758, -0.36755284667015076, -0.1388428807258606, 0.07539568841457367, 0.3629106283187866, 0.1303824484348297, 0.4638711214065552, 0.5369113683700562, 0.2476576268672943, -0.18832047283649445, 0.1930723488330841, -0.1384766846895218, 0.28713518381118774, 0.40599849820137024, -0.12461727112531662, 0.14412632584571838, 0.4248977601528168, 0.025601666420698166, 0.06522573530673981, 0.11555198580026627, -0.2771502137184143, 0.31354737281799316, 0.40610364079475403, 0.08268070220947266, -0.41328877210617065, -0.22718992829322815, 0.3078274130821228, -0.1956929862499237, -0.3644895553588867, 0.21199890971183777, 0.16440457105636597, -0.3546675741672516, 0.226300448179245, 0.14750348031520844, 0.008584672585129738, -0.12396425753831863, -0.5568838119506836, -0.0674787312746048, 0.2780531346797943, -0.18736571073532104, 0.15605878829956055, 0.23459197580814362, -0.37512457370758057, 0.4669344127178192, -0.3525469899177551, 0.02260712906718254, -0.09441795945167542, 0.27523085474967957, -0.15363644063472748, 0.0063328370451927185, 0.28647613525390625, -0.07403850555419922, -0.14445170760154724, 0.18421828746795654, 0.14519117772579193, -0.33005446195602417, 0.28021693229675293, 0.13535557687282562, -0.14139236509799957, -0.17406506836414337, -0.023136388510465622, -0.411746084690094, -0.23531261086463928, 0.27285003662109375, -0.0858842134475708, 0.3909685015678406, -0.6479687094688416, 0.052248481661081314, -0.03885196894407272, -0.24484775960445404, -0.19848233461380005, -0.12503229081630707, 0.034012436866760254, -0.17526425421237946, 0.08893629908561707, -0.20650184154510498, 0.12185515463352203, 0.3018306791782379, 0.18271636962890625, 0.05906929448246956, -0.24885088205337524, -0.110288105905056, 0.13236068189144135, 0.24910062551498413, -0.3191211521625519, -0.6921528577804565, -0.07975687086582184, 0.10157798230648041, 0.32537636160850525, 0.23453620076179504, 0.43619590997695923, -0.16287845373153687, -0.2904229164123535, -0.03131783753633499, 0.18858180940151215, -0.03506336361169815, -0.07146778702735901, -0.3921252191066742, -0.1106409952044487, 0.5248121023178101, 0.09533776342868805, 0.053419679403305054, -0.026163987815380096, 0.10340819507837296, -0.005115959327667952, 0.2173568606376648, 0.03851165249943733, 0.011879953555762768, 0.05429999530315399, 0.06861279904842377, 0.034847553819417953, 0.07417161017656326, -0.036987483501434326, -0.4227674901485443, 0.11043154448270798, -0.26659488677978516, 0.27912452816963196, 0.08412569016218185, -0.14726032316684723, -0.07985629141330719, -0.20101016759872437, 0.008967209607362747, 0.05174924433231354, 0.0013115853071212769, 0.3164535164833069, 0.144540935754776, -0.09321410953998566, 0.005674600601196289, 0.03690958023071289, -0.2276383936405182, -0.010218137875199318, -0.5147672295570374, 0.29301995038986206, -0.06927136331796646, -0.22261841595172882, 0.22677156329154968, 0.2620922923088074, 0.1244557797908783, -0.06765206903219223, -0.35147252678871155, 0.37990909814834595, -0.04928894713521004, -0.1394280046224594, 0.023319637402892113, 0.4658004641532898, -0.19021444022655487, -0.19288578629493713, 0.2801753580570221, 0.7407281398773193, -0.017889559268951416, -0.047074154019355774, 0.1881551444530487, 0.4245467782020569, -0.00473221018910408, 0.15632376074790955, -0.0887768566608429, 0.17856770753860474, 0.15826943516731262, -0.2391059249639511, -0.25672927498817444, -0.09417940676212311, 0.49438753724098206, -0.148961141705513, 0.17895318567752838, 0.04577741399407387, -0.18429487943649292, -0.08529152721166611, 0.35075613856315613, 0.01911799982190132, 0.07007266581058502, 0.24720412492752075, 0.10558821260929108, -0.30845579504966736, 0.15196605026721954, 0.3498341143131256, 0.22861036658287048, -0.01664832979440689, 0.0065649449825286865, 0.25714629888534546, -0.07077319920063019, 0.005967855453491211, 0.009097777307033539, 0.020341556519269943, 0.2311234325170517, 0.43810319900512695, 0.27085229754447937, 0.04216814041137695, -0.45378386974334717, -0.2937001883983612, -0.08233264088630676, 0.335682213306427, -0.09858612716197968, 0.041234031319618225, -0.2519592344760895, -0.36696818470954895, -0.16165249049663544, -0.3328652083873749, -0.5280536413192749, -0.34717023372650146, 0.005613410845398903, 0.3331269323825836, -0.03366457298398018, 0.3375820815563202, -0.26073169708251953, -0.04151026904582977, -0.2104504108428955, -0.055516861379146576, -0.03978912532329559, -0.30358028411865234, -0.348183274269104, -0.10054910182952881, 0.6255893111228943, 0.12261985242366791, 0.32562872767448425, -0.263363242149353, -0.03863564878702164, -0.43590667843818665, -0.448839396238327, -0.22839799523353577, -0.055763065814971924, 0.06804277747869492, 0.35166969895362854, 0.09112119674682617, -0.020585108548402786, -0.32822155952453613, 0.1320410668849945, -0.09370829164981842, -0.14450609683990479, 0.07342684268951416, -0.17423227429389954, 0.17821086943149567, 0.11711609363555908, -0.16284090280532837, -0.057215556502342224, -0.226532444357872, -0.04317086935043335, -0.1390308141708374, 0.36250394582748413, 0.024344488978385925, -0.3539900779724121, -0.06593123078346252, 0.06048930063843727, 0.44281893968582153, -0.11278247833251953, -0.5371185541152954, 0.18386204540729523, 0.11534304916858673, -0.1968846619129181, 0.09280890226364136, -0.16934950649738312, 0.6429793834686279, -0.09232611209154129, -0.5097294449806213, -0.06906019151210785, -0.10175587236881256, -0.06448626518249512, -0.009577035903930664, -0.031216470524668694, 0.4292154610157013, -0.021502703428268433, -0.0031930506229400635, -0.2097126841545105, -0.44826430082321167, 0.10873149335384369, 0.006746549159288406, 0.43732500076293945, 0.07364848256111145, 0.3563733994960785, 0.17065131664276123, 0.07888692617416382, 0.16019827127456665, -0.16299042105674744, 0.415808767080307, 0.4866502285003662, 0.1476307213306427, 0.04280375316739082, -0.09886708110570908, -0.10265794396400452, -0.03582288324832916, -0.04710083082318306, 0.08121365308761597, -0.05706410855054855, -0.18822790682315826, -0.11694245040416718, -0.35590240359306335, -0.32912832498550415, -0.2423395812511444, 0.17436112463474274, -0.30966857075691223, 0.3644336760044098, 0.23938977718353271, -0.10587602108716965, -0.33166399598121643, -0.4202772080898285, 0.1958700269460678, 0.30601635575294495, -0.1326768696308136, -0.006000161170959473, -0.5504577159881592, -0.34876328706741333, -0.1723354458808899, 0.7032870650291443, 0.22439222037792206, 0.6603326797485352, 0.08066500723361969, -0.06683745980262756, 0.019584879279136658, -0.1764274388551712, 0.09314774721860886, -0.3652164041996002, 0.2800976634025574, 0.15811221301555634, 0.0958506166934967, -0.03390445187687874, -0.20328985154628754, 0.10980536043643951, 0.28632208704948425, 0.48858505487442017, -0.1781415343284607, -0.2392447590827942, -0.12164049595594406, 0.2182544320821762, 0.2945373058319092, -0.03114541992545128, -0.2273666262626648, -0.4379228949546814, -0.2903137505054474, -0.11430102586746216, -0.03573096543550491, -0.25439348816871643, 0.32062584161758423, 0.24632342159748077, 0.17749141156673431, 0.1452328860759735, -0.22669565677642822, 0.31361401081085205, -0.0948362946510315, 0.21401286125183105, 0.3180743455886841, 0.11955277621746063, -0.34624698758125305, 0.13024422526359558, -0.09419412165880203, 0.2956394851207733, -0.1126081794500351, -0.13753646612167358, -0.07348105311393738, 0.2040027379989624, 0.08796313405036926, 0.19109594821929932, 0.20056290924549103, 0.27375510334968567, 0.45173266530036926, -0.105831578373909, 0.16070790588855743, -0.19018296897411346, -0.0732436254620552, 0.1468067616224289, -0.24909260869026184, -0.24110853672027588, 0.26253172755241394, 0.19314147531986237, -0.03871983662247658, 0.34186211228370667, -0.40288078784942627, -0.10043224692344666, 0.2029746025800705, 0.4714301526546478, 1.0572535991668701, 0.02014390006661415, 0.058087002485990524, -0.050939835608005524, -0.18986906111240387, 0.02852569706737995, -0.09339398145675659, 0.2850465774536133, -0.4167393445968628, -0.47781041264533997, -0.01997470296919346, -0.11916658282279968, 0.31333935260772705, -0.2553504705429077, -0.21679985523223877, 0.4146580100059509, -0.025734733790159225, -0.45365673303604126, 0.13335126638412476, 0.2383013367652893, -0.4250650703907013, -0.057177092880010605, -0.10145875811576843, 0.032799214124679565, -0.34121906757354736, 0.36487674713134766, -0.1134907528758049, 0.04065924137830734, 0.17856808006763458, -0.3359900712966919, -0.3500402569770813, 0.0750797912478447, -0.0747920349240303, 0.06081628054380417, 0.32936516404151917, 0.12809760868549347, -0.05952572077512741, -0.11966852843761444, 0.3529456853866577, 0.08385038375854492, 0.08821786940097809, 0.04688214138150215, 0.49015501141548157, -0.06657493114471436, 0.3549167811870575, 0.2023564726114273, 0.33996641635894775, -0.1613617241382599, -0.12934474647045135, 0.09182959049940109, -0.12358055263757706, -0.513731062412262, 0.3060738742351532, -0.21946246922016144, 0.0945611447095871, 0.02289963886141777, -0.17699265480041504, 0.20545729994773865, -0.07130470871925354, -0.24828198552131653, 0.027857262641191483, 0.19890128076076508, -0.3135833740234375, 0.11569391191005707, -0.08070473372936249, -0.24981246888637543, -0.0033667422831058502, 0.4579550623893738, 0.39281249046325684, -0.2363055795431137, 0.3262063264846802, 0.030298110097646713, -0.10589104145765305, -0.12048862129449844, -0.23058223724365234, -0.19164536893367767, -0.29235345125198364, 0.10834620893001556, -0.08226751536130905, -0.07591850310564041, -0.12719939649105072, 0.5551502704620361, 0.26746752858161926, 0.6689738631248474, -0.12501157820224762, -0.4986170530319214, -0.10510625690221786, 0.15334853529930115, 0.06950540840625763, 0.13672903180122375, -0.289669930934906, 0.07201159745454788, -0.06327790021896362, -0.013914188370108604, -0.1498125046491623, 0.053056396543979645, -0.26794111728668213, 0.1874876320362091, -0.007938405498862267, 0.16731858253479004, -0.04824838787317276, 0.15395794808864594, -0.05416373908519745, -0.009022988379001617, -0.2440916895866394, -0.01071367971599102, -0.0693432092666626, 0.17674404382705688, 0.07977335155010223, -0.033264391124248505, -0.1182667464017868, -0.30675792694091797, -0.09690248966217041, -0.059747114777565, -0.43434736132621765, -0.020065827295184135, -0.13040244579315186, 0.2618316411972046, -0.07121440768241882, 0.012517057359218597, 0.1222652941942215, -0.013018224388360977, -0.3334139585494995, -0.19523553550243378, -0.09814252704381943, 0.12568160891532898, -0.012360752560198307, -0.013481713831424713, 0.21438603103160858, 0.05884172022342682, -0.2207690328359604, -0.10993776470422745, -0.049514368176460266, 0.004310522228479385, -0.05855681002140045, 0.41812828183174133, 0.16684898734092712, 0.306729793548584, 0.04853370040655136, -0.32711049914360046, 0.3589344620704651, 0.07165255397558212, -0.5490008592605591, 0.04691733792424202, 0.22389227151870728, -0.018331915140151978, 0.006380848586559296, 0.07339046895503998, 0.23784157633781433, -0.1913512647151947, 0.6728567481040955, 0.06865430623292923, -0.05610629543662071, -0.3147749900817871, 0.3004767894744873, 0.1758287101984024, 0.048854853957891464, 0.08036913722753525, 0.15353290736675262, -0.2527369558811188, 0.03324176371097565, -0.28835898637771606, -0.04437787085771561, 0.4211077392101288, 0.05685792118310928, 0.30547013878822327, -0.45726075768470764, -0.29892370104789734, 0.22597679495811462, 0.4199060797691345, 0.4424130916595459, 0.0849669873714447, 0.2154003381729126, 0.5814493298530579, 0.025228872895240784, 0.039473626762628555, -0.26168084144592285, 0.11910879611968994, 0.059615254402160645, 0.007893582805991173, -0.1638844758272171, -0.01999898999929428, -0.08299422264099121, 0.03707334026694298, 0.13500021398067474, 0.38414525985717773, 0.2583816647529602, 0.03942016884684563, -0.04288797080516815, -0.31361421942710876, -0.4687742590904236, 0.051150210201740265, -0.14957666397094727, -0.09216795861721039, 0.33794134855270386, 0.31146079301834106, -0.01827406883239746, 0.04654671624302864, 0.36627209186553955, 0.26074567437171936, 0.14950302243232727, -0.032306257635354996, -0.09897343814373016, -0.1910017877817154, 0.1689157485961914, -0.016010358929634094, 0.45436039566993713, 0.3557749092578888, -0.014698028564453125, 0.054887425154447556, -0.09714438766241074, -0.020403584465384483, 0.35644933581352234, -0.1523539423942566, -0.09702526032924652, 0.18462534248828888, 0.36775341629981995, 0.04126439988613129, 0.13558754324913025, -0.2689227759838104, 0.20201632380485535, -0.2849612832069397, -0.2672584652900696, 0.0389271080493927, -0.031243357807397842, -0.05350729823112488, -0.028683487325906754, 0.027109432965517044, -0.18500909209251404, 0.3126624822616577, 0.4369834363460541, -0.13649621605873108, -0.32390230894088745, -0.6861956119537354, -0.6801729202270508, 0.3550529479980469, -0.019459981471300125, -0.15672054886817932, -0.0008685784414410591, -0.11914371699094772, -0.04719459265470505, 0.09273988753557205, 0.33343636989593506, -0.09944339841604233, -0.12623360753059387, -0.11146479845046997, -0.13374793529510498, 0.08345845341682434, 0.166285902261734, -0.1219961941242218, -0.03190965950489044, -0.20201504230499268, -0.12747947871685028, 0.07519388943910599, -0.014412637799978256, -0.20275770127773285, -0.2078401744365692, -0.09228502213954926, 0.6266992092132568, 0.2511221170425415, 0.143814817070961, 0.5188575983047485, 0.003394629806280136, -0.1690070629119873, -0.15814761817455292, -0.1688823252916336, -0.12161777168512344, 0.304930180311203, 0.020193230360746384, 0.6660857200622559, -0.1472449153661728, 0.47691670060157776, -0.1770949512720108, 0.550335705280304, -0.16308583319187164, -0.11710280179977417, -0.38099727034568787, 0.27511775493621826, -0.14887499809265137, 0.33620718121528625, -0.05285409092903137, 0.16105368733406067, 0.3596596419811249, 0.44328024983406067, -0.6372894644737244, -0.09754998981952667, 0.6288663744926453, -0.3102293610572815, -0.22254887223243713, -0.13556523621082306, 0.2629567086696625, -0.3097360134124756, -0.36727842688560486, -0.46218371391296387, -0.19922319054603577, 0.1436506062746048, 0.2374664545059204, -0.09129594266414642, 0.18907815217971802, -0.4163108766078949, 0.15619200468063354, 0.01356051117181778, -0.08438070118427277, 0.061295054852962494, -0.3806409537792206, -0.2585660219192505, -0.2395603209733963 ]
https://github.com/huggingface/datasets/issues/539
[Dataset] `NonMatchingChecksumError` due to an update in the LinCE benchmark data
Hi @thomwolf Thanks for the details! I just created a PR with the updated `dataset_infos.json` file (#550).
Hi, There is a `NonMatchingChecksumError` error for the `lid_msaea` (language identification for Modern Standard Arabic - Egyptian Arabic) dataset from the LinCE benchmark due to a minor update on that dataset. How can I update the checksum of the library to solve this issue? The error is below and it also appears in the [nlp viewer](https://huggingface.co/nlp/viewer/?dataset=lince&config=lid_msaea): ```python import nlp nlp.load_dataset('lince', 'lid_msaea') ``` Output: ``` NonMatchingChecksumError: ['https://ritual.uh.edu/lince/libaccess/eyJ1c2VybmFtZSI6ICJodWdnaW5nZmFjZSBubHAiLCAidXNlcl9pZCI6IDExMSwgImVtYWlsIjogImR1bW15QGVtYWlsLmNvbSJ9/lid_msaea.zip'] Traceback: File "/home/sasha/streamlit/lib/streamlit/ScriptRunner.py", line 322, in _run_script exec(code, module.__dict__) File "/home/sasha/nlp-viewer/run.py", line 196, in <module> dts, fail = get(str(option.id), str(conf_option.name) if conf_option else None) File "/home/sasha/streamlit/lib/streamlit/caching.py", line 591, in wrapped_func return get_or_create_cached_value() File "/home/sasha/streamlit/lib/streamlit/caching.py", line 575, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/home/sasha/nlp-viewer/run.py", line 150, in get builder_instance.download_and_prepare() File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/builder.py", line 432, in download_and_prepare download_config.force_download = download_mode == FORCE_REDOWNLOAD File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/builder.py", line 469, in _download_and_prepare File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/utils/info_utils.py", line 36, in verify_checksums raise NonMatchingChecksumError(str(bad_urls)) ``` Thank you in advance! @lhoestq
17
[Dataset] `NonMatchingChecksumError` due to an update in the LinCE benchmark data Hi, There is a `NonMatchingChecksumError` error for the `lid_msaea` (language identification for Modern Standard Arabic - Egyptian Arabic) dataset from the LinCE benchmark due to a minor update on that dataset. How can I update the checksum of the library to solve this issue? The error is below and it also appears in the [nlp viewer](https://huggingface.co/nlp/viewer/?dataset=lince&config=lid_msaea): ```python import nlp nlp.load_dataset('lince', 'lid_msaea') ``` Output: ``` NonMatchingChecksumError: ['https://ritual.uh.edu/lince/libaccess/eyJ1c2VybmFtZSI6ICJodWdnaW5nZmFjZSBubHAiLCAidXNlcl9pZCI6IDExMSwgImVtYWlsIjogImR1bW15QGVtYWlsLmNvbSJ9/lid_msaea.zip'] Traceback: File "/home/sasha/streamlit/lib/streamlit/ScriptRunner.py", line 322, in _run_script exec(code, module.__dict__) File "/home/sasha/nlp-viewer/run.py", line 196, in <module> dts, fail = get(str(option.id), str(conf_option.name) if conf_option else None) File "/home/sasha/streamlit/lib/streamlit/caching.py", line 591, in wrapped_func return get_or_create_cached_value() File "/home/sasha/streamlit/lib/streamlit/caching.py", line 575, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/home/sasha/nlp-viewer/run.py", line 150, in get builder_instance.download_and_prepare() File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/builder.py", line 432, in download_and_prepare download_config.force_download = download_mode == FORCE_REDOWNLOAD File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/builder.py", line 469, in _download_and_prepare File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/utils/info_utils.py", line 36, in verify_checksums raise NonMatchingChecksumError(str(bad_urls)) ``` Thank you in advance! @lhoestq Hi @thomwolf Thanks for the details! I just created a PR with the updated `dataset_infos.json` file (#550).
[ -0.06165393814444542, 0.4437035322189331, -0.05816148966550827, 0.06641753762960434, -0.30721110105514526, 0.11532733589410782, -0.2732497751712799, 0.5395026803016663, -0.0016360227018594742, -0.11965854465961456, 0.0857626423239708, 0.2251156121492386, 0.07897729426622391, -0.1222938522696495, 0.006191069260239601, 0.1934707760810852, 0.032150380313396454, 0.09338535368442535, 0.09870143234729767, 0.039390191435813904, -0.205377459526062, 0.21487759053707123, -0.0574839748442173, -0.2985471487045288, 0.08935591578483582, -0.0041811782866716385, 0.0692201554775238, 0.018289931118488312, 0.1299762725830078, -0.419452041387558, 0.32060572504997253, 0.27932730317115784, 0.00039007700979709625, 0.13242408633232117, -0.00012728053843602538, -0.06949442625045776, 0.32102376222610474, -0.09197413921356201, -0.2670391798019409, -0.08463487029075623, 0.0034755878150463104, -0.4629065692424774, -0.061304181814193726, -0.2885448634624481, 0.16378843784332275, 0.23998774588108063, 0.10291270911693573, -0.4139178395271301, -0.09509623050689697, 0.18512843549251556, 0.10833649337291718, 0.5190726518630981, 0.0809718668460846, 0.33804938197135925, 0.2563707232475281, -0.4211411476135254, 0.03065878339111805, 0.38378384709358215, 0.33936890959739685, -0.13668952882289886, -0.4413134455680847, 0.3681643605232239, -0.3522351384162903, 0.04231233149766922, -0.016172058880329132, -0.3124469518661499, 0.019456520676612854, -0.0667773187160492, 0.3025442361831665, 0.1907629668712616, 0.3051871955394745, -0.4455224871635437, -0.20084813237190247, 0.006710052490234375, -0.2116420716047287, -0.11551754176616669, 0.4846942126750946, 0.10112147033214569, -0.030153993517160416, -0.1416909098625183, -0.09938150644302368, -0.04329968988895416, 0.10721907019615173, 0.21369308233261108, 0.34747079014778137, 0.4857041537761688, 0.24315296113491058, 0.11189211905002594, 0.16246835887432098, 0.005549568682909012, 0.5039781928062439, -0.09321172535419464, -0.14118097722530365, 0.1578635722398758, -0.36755284667015076, -0.1388428807258606, 0.07539568841457367, 0.3629106283187866, 0.1303824484348297, 0.4638711214065552, 0.5369113683700562, 0.2476576268672943, -0.18832047283649445, 0.1930723488330841, -0.1384766846895218, 0.28713518381118774, 0.40599849820137024, -0.12461727112531662, 0.14412632584571838, 0.4248977601528168, 0.025601666420698166, 0.06522573530673981, 0.11555198580026627, -0.2771502137184143, 0.31354737281799316, 0.40610364079475403, 0.08268070220947266, -0.41328877210617065, -0.22718992829322815, 0.3078274130821228, -0.1956929862499237, -0.3644895553588867, 0.21199890971183777, 0.16440457105636597, -0.3546675741672516, 0.226300448179245, 0.14750348031520844, 0.008584672585129738, -0.12396425753831863, -0.5568838119506836, -0.0674787312746048, 0.2780531346797943, -0.18736571073532104, 0.15605878829956055, 0.23459197580814362, -0.37512457370758057, 0.4669344127178192, -0.3525469899177551, 0.02260712906718254, -0.09441795945167542, 0.27523085474967957, -0.15363644063472748, 0.0063328370451927185, 0.28647613525390625, -0.07403850555419922, -0.14445170760154724, 0.18421828746795654, 0.14519117772579193, -0.33005446195602417, 0.28021693229675293, 0.13535557687282562, -0.14139236509799957, -0.17406506836414337, -0.023136388510465622, -0.411746084690094, -0.23531261086463928, 0.27285003662109375, -0.0858842134475708, 0.3909685015678406, -0.6479687094688416, 0.052248481661081314, -0.03885196894407272, -0.24484775960445404, -0.19848233461380005, -0.12503229081630707, 0.034012436866760254, -0.17526425421237946, 0.08893629908561707, -0.20650184154510498, 0.12185515463352203, 0.3018306791782379, 0.18271636962890625, 0.05906929448246956, -0.24885088205337524, -0.110288105905056, 0.13236068189144135, 0.24910062551498413, -0.3191211521625519, -0.6921528577804565, -0.07975687086582184, 0.10157798230648041, 0.32537636160850525, 0.23453620076179504, 0.43619590997695923, -0.16287845373153687, -0.2904229164123535, -0.03131783753633499, 0.18858180940151215, -0.03506336361169815, -0.07146778702735901, -0.3921252191066742, -0.1106409952044487, 0.5248121023178101, 0.09533776342868805, 0.053419679403305054, -0.026163987815380096, 0.10340819507837296, -0.005115959327667952, 0.2173568606376648, 0.03851165249943733, 0.011879953555762768, 0.05429999530315399, 0.06861279904842377, 0.034847553819417953, 0.07417161017656326, -0.036987483501434326, -0.4227674901485443, 0.11043154448270798, -0.26659488677978516, 0.27912452816963196, 0.08412569016218185, -0.14726032316684723, -0.07985629141330719, -0.20101016759872437, 0.008967209607362747, 0.05174924433231354, 0.0013115853071212769, 0.3164535164833069, 0.144540935754776, -0.09321410953998566, 0.005674600601196289, 0.03690958023071289, -0.2276383936405182, -0.010218137875199318, -0.5147672295570374, 0.29301995038986206, -0.06927136331796646, -0.22261841595172882, 0.22677156329154968, 0.2620922923088074, 0.1244557797908783, -0.06765206903219223, -0.35147252678871155, 0.37990909814834595, -0.04928894713521004, -0.1394280046224594, 0.023319637402892113, 0.4658004641532898, -0.19021444022655487, -0.19288578629493713, 0.2801753580570221, 0.7407281398773193, -0.017889559268951416, -0.047074154019355774, 0.1881551444530487, 0.4245467782020569, -0.00473221018910408, 0.15632376074790955, -0.0887768566608429, 0.17856770753860474, 0.15826943516731262, -0.2391059249639511, -0.25672927498817444, -0.09417940676212311, 0.49438753724098206, -0.148961141705513, 0.17895318567752838, 0.04577741399407387, -0.18429487943649292, -0.08529152721166611, 0.35075613856315613, 0.01911799982190132, 0.07007266581058502, 0.24720412492752075, 0.10558821260929108, -0.30845579504966736, 0.15196605026721954, 0.3498341143131256, 0.22861036658287048, -0.01664832979440689, 0.0065649449825286865, 0.25714629888534546, -0.07077319920063019, 0.005967855453491211, 0.009097777307033539, 0.020341556519269943, 0.2311234325170517, 0.43810319900512695, 0.27085229754447937, 0.04216814041137695, -0.45378386974334717, -0.2937001883983612, -0.08233264088630676, 0.335682213306427, -0.09858612716197968, 0.041234031319618225, -0.2519592344760895, -0.36696818470954895, -0.16165249049663544, -0.3328652083873749, -0.5280536413192749, -0.34717023372650146, 0.005613410845398903, 0.3331269323825836, -0.03366457298398018, 0.3375820815563202, -0.26073169708251953, -0.04151026904582977, -0.2104504108428955, -0.055516861379146576, -0.03978912532329559, -0.30358028411865234, -0.348183274269104, -0.10054910182952881, 0.6255893111228943, 0.12261985242366791, 0.32562872767448425, -0.263363242149353, -0.03863564878702164, -0.43590667843818665, -0.448839396238327, -0.22839799523353577, -0.055763065814971924, 0.06804277747869492, 0.35166969895362854, 0.09112119674682617, -0.020585108548402786, -0.32822155952453613, 0.1320410668849945, -0.09370829164981842, -0.14450609683990479, 0.07342684268951416, -0.17423227429389954, 0.17821086943149567, 0.11711609363555908, -0.16284090280532837, -0.057215556502342224, -0.226532444357872, -0.04317086935043335, -0.1390308141708374, 0.36250394582748413, 0.024344488978385925, -0.3539900779724121, -0.06593123078346252, 0.06048930063843727, 0.44281893968582153, -0.11278247833251953, -0.5371185541152954, 0.18386204540729523, 0.11534304916858673, -0.1968846619129181, 0.09280890226364136, -0.16934950649738312, 0.6429793834686279, -0.09232611209154129, -0.5097294449806213, -0.06906019151210785, -0.10175587236881256, -0.06448626518249512, -0.009577035903930664, -0.031216470524668694, 0.4292154610157013, -0.021502703428268433, -0.0031930506229400635, -0.2097126841545105, -0.44826430082321167, 0.10873149335384369, 0.006746549159288406, 0.43732500076293945, 0.07364848256111145, 0.3563733994960785, 0.17065131664276123, 0.07888692617416382, 0.16019827127456665, -0.16299042105674744, 0.415808767080307, 0.4866502285003662, 0.1476307213306427, 0.04280375316739082, -0.09886708110570908, -0.10265794396400452, -0.03582288324832916, -0.04710083082318306, 0.08121365308761597, -0.05706410855054855, -0.18822790682315826, -0.11694245040416718, -0.35590240359306335, -0.32912832498550415, -0.2423395812511444, 0.17436112463474274, -0.30966857075691223, 0.3644336760044098, 0.23938977718353271, -0.10587602108716965, -0.33166399598121643, -0.4202772080898285, 0.1958700269460678, 0.30601635575294495, -0.1326768696308136, -0.006000161170959473, -0.5504577159881592, -0.34876328706741333, -0.1723354458808899, 0.7032870650291443, 0.22439222037792206, 0.6603326797485352, 0.08066500723361969, -0.06683745980262756, 0.019584879279136658, -0.1764274388551712, 0.09314774721860886, -0.3652164041996002, 0.2800976634025574, 0.15811221301555634, 0.0958506166934967, -0.03390445187687874, -0.20328985154628754, 0.10980536043643951, 0.28632208704948425, 0.48858505487442017, -0.1781415343284607, -0.2392447590827942, -0.12164049595594406, 0.2182544320821762, 0.2945373058319092, -0.03114541992545128, -0.2273666262626648, -0.4379228949546814, -0.2903137505054474, -0.11430102586746216, -0.03573096543550491, -0.25439348816871643, 0.32062584161758423, 0.24632342159748077, 0.17749141156673431, 0.1452328860759735, -0.22669565677642822, 0.31361401081085205, -0.0948362946510315, 0.21401286125183105, 0.3180743455886841, 0.11955277621746063, -0.34624698758125305, 0.13024422526359558, -0.09419412165880203, 0.2956394851207733, -0.1126081794500351, -0.13753646612167358, -0.07348105311393738, 0.2040027379989624, 0.08796313405036926, 0.19109594821929932, 0.20056290924549103, 0.27375510334968567, 0.45173266530036926, -0.105831578373909, 0.16070790588855743, -0.19018296897411346, -0.0732436254620552, 0.1468067616224289, -0.24909260869026184, -0.24110853672027588, 0.26253172755241394, 0.19314147531986237, -0.03871983662247658, 0.34186211228370667, -0.40288078784942627, -0.10043224692344666, 0.2029746025800705, 0.4714301526546478, 1.0572535991668701, 0.02014390006661415, 0.058087002485990524, -0.050939835608005524, -0.18986906111240387, 0.02852569706737995, -0.09339398145675659, 0.2850465774536133, -0.4167393445968628, -0.47781041264533997, -0.01997470296919346, -0.11916658282279968, 0.31333935260772705, -0.2553504705429077, -0.21679985523223877, 0.4146580100059509, -0.025734733790159225, -0.45365673303604126, 0.13335126638412476, 0.2383013367652893, -0.4250650703907013, -0.057177092880010605, -0.10145875811576843, 0.032799214124679565, -0.34121906757354736, 0.36487674713134766, -0.1134907528758049, 0.04065924137830734, 0.17856808006763458, -0.3359900712966919, -0.3500402569770813, 0.0750797912478447, -0.0747920349240303, 0.06081628054380417, 0.32936516404151917, 0.12809760868549347, -0.05952572077512741, -0.11966852843761444, 0.3529456853866577, 0.08385038375854492, 0.08821786940097809, 0.04688214138150215, 0.49015501141548157, -0.06657493114471436, 0.3549167811870575, 0.2023564726114273, 0.33996641635894775, -0.1613617241382599, -0.12934474647045135, 0.09182959049940109, -0.12358055263757706, -0.513731062412262, 0.3060738742351532, -0.21946246922016144, 0.0945611447095871, 0.02289963886141777, -0.17699265480041504, 0.20545729994773865, -0.07130470871925354, -0.24828198552131653, 0.027857262641191483, 0.19890128076076508, -0.3135833740234375, 0.11569391191005707, -0.08070473372936249, -0.24981246888637543, -0.0033667422831058502, 0.4579550623893738, 0.39281249046325684, -0.2363055795431137, 0.3262063264846802, 0.030298110097646713, -0.10589104145765305, -0.12048862129449844, -0.23058223724365234, -0.19164536893367767, -0.29235345125198364, 0.10834620893001556, -0.08226751536130905, -0.07591850310564041, -0.12719939649105072, 0.5551502704620361, 0.26746752858161926, 0.6689738631248474, -0.12501157820224762, -0.4986170530319214, -0.10510625690221786, 0.15334853529930115, 0.06950540840625763, 0.13672903180122375, -0.289669930934906, 0.07201159745454788, -0.06327790021896362, -0.013914188370108604, -0.1498125046491623, 0.053056396543979645, -0.26794111728668213, 0.1874876320362091, -0.007938405498862267, 0.16731858253479004, -0.04824838787317276, 0.15395794808864594, -0.05416373908519745, -0.009022988379001617, -0.2440916895866394, -0.01071367971599102, -0.0693432092666626, 0.17674404382705688, 0.07977335155010223, -0.033264391124248505, -0.1182667464017868, -0.30675792694091797, -0.09690248966217041, -0.059747114777565, -0.43434736132621765, -0.020065827295184135, -0.13040244579315186, 0.2618316411972046, -0.07121440768241882, 0.012517057359218597, 0.1222652941942215, -0.013018224388360977, -0.3334139585494995, -0.19523553550243378, -0.09814252704381943, 0.12568160891532898, -0.012360752560198307, -0.013481713831424713, 0.21438603103160858, 0.05884172022342682, -0.2207690328359604, -0.10993776470422745, -0.049514368176460266, 0.004310522228479385, -0.05855681002140045, 0.41812828183174133, 0.16684898734092712, 0.306729793548584, 0.04853370040655136, -0.32711049914360046, 0.3589344620704651, 0.07165255397558212, -0.5490008592605591, 0.04691733792424202, 0.22389227151870728, -0.018331915140151978, 0.006380848586559296, 0.07339046895503998, 0.23784157633781433, -0.1913512647151947, 0.6728567481040955, 0.06865430623292923, -0.05610629543662071, -0.3147749900817871, 0.3004767894744873, 0.1758287101984024, 0.048854853957891464, 0.08036913722753525, 0.15353290736675262, -0.2527369558811188, 0.03324176371097565, -0.28835898637771606, -0.04437787085771561, 0.4211077392101288, 0.05685792118310928, 0.30547013878822327, -0.45726075768470764, -0.29892370104789734, 0.22597679495811462, 0.4199060797691345, 0.4424130916595459, 0.0849669873714447, 0.2154003381729126, 0.5814493298530579, 0.025228872895240784, 0.039473626762628555, -0.26168084144592285, 0.11910879611968994, 0.059615254402160645, 0.007893582805991173, -0.1638844758272171, -0.01999898999929428, -0.08299422264099121, 0.03707334026694298, 0.13500021398067474, 0.38414525985717773, 0.2583816647529602, 0.03942016884684563, -0.04288797080516815, -0.31361421942710876, -0.4687742590904236, 0.051150210201740265, -0.14957666397094727, -0.09216795861721039, 0.33794134855270386, 0.31146079301834106, -0.01827406883239746, 0.04654671624302864, 0.36627209186553955, 0.26074567437171936, 0.14950302243232727, -0.032306257635354996, -0.09897343814373016, -0.1910017877817154, 0.1689157485961914, -0.016010358929634094, 0.45436039566993713, 0.3557749092578888, -0.014698028564453125, 0.054887425154447556, -0.09714438766241074, -0.020403584465384483, 0.35644933581352234, -0.1523539423942566, -0.09702526032924652, 0.18462534248828888, 0.36775341629981995, 0.04126439988613129, 0.13558754324913025, -0.2689227759838104, 0.20201632380485535, -0.2849612832069397, -0.2672584652900696, 0.0389271080493927, -0.031243357807397842, -0.05350729823112488, -0.028683487325906754, 0.027109432965517044, -0.18500909209251404, 0.3126624822616577, 0.4369834363460541, -0.13649621605873108, -0.32390230894088745, -0.6861956119537354, -0.6801729202270508, 0.3550529479980469, -0.019459981471300125, -0.15672054886817932, -0.0008685784414410591, -0.11914371699094772, -0.04719459265470505, 0.09273988753557205, 0.33343636989593506, -0.09944339841604233, -0.12623360753059387, -0.11146479845046997, -0.13374793529510498, 0.08345845341682434, 0.166285902261734, -0.1219961941242218, -0.03190965950489044, -0.20201504230499268, -0.12747947871685028, 0.07519388943910599, -0.014412637799978256, -0.20275770127773285, -0.2078401744365692, -0.09228502213954926, 0.6266992092132568, 0.2511221170425415, 0.143814817070961, 0.5188575983047485, 0.003394629806280136, -0.1690070629119873, -0.15814761817455292, -0.1688823252916336, -0.12161777168512344, 0.304930180311203, 0.020193230360746384, 0.6660857200622559, -0.1472449153661728, 0.47691670060157776, -0.1770949512720108, 0.550335705280304, -0.16308583319187164, -0.11710280179977417, -0.38099727034568787, 0.27511775493621826, -0.14887499809265137, 0.33620718121528625, -0.05285409092903137, 0.16105368733406067, 0.3596596419811249, 0.44328024983406067, -0.6372894644737244, -0.09754998981952667, 0.6288663744926453, -0.3102293610572815, -0.22254887223243713, -0.13556523621082306, 0.2629567086696625, -0.3097360134124756, -0.36727842688560486, -0.46218371391296387, -0.19922319054603577, 0.1436506062746048, 0.2374664545059204, -0.09129594266414642, 0.18907815217971802, -0.4163108766078949, 0.15619200468063354, 0.01356051117181778, -0.08438070118427277, 0.061295054852962494, -0.3806409537792206, -0.2585660219192505, -0.2395603209733963 ]
https://github.com/huggingface/datasets/issues/537
[Dataset] RACE dataset Checksums error
`NonMatchingChecksumError` means that the checksum of the downloaded file is not the expected one. Either the file you downloaded was corrupted along the way, or the host updated the file. Could you try to clear your cache and run `load_dataset` again ? If the error is still there, it means that there was an update in the data, and we may have to update the expected checksum value.
Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ```
68
[Dataset] RACE dataset Checksums error Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ``` `NonMatchingChecksumError` means that the checksum of the downloaded file is not the expected one. Either the file you downloaded was corrupted along the way, or the host updated the file. Could you try to clear your cache and run `load_dataset` again ? If the error is still there, it means that there was an update in the data, and we may have to update the expected checksum value.
[ -0.34844112396240234, 0.3749223053455353, -0.022354725748300552, 0.24240729212760925, 0.23337355256080627, 0.05917973071336746, 0.2440313696861267, 0.4674775004386902, 0.25530850887298584, -0.14036871492862701, -0.06672588735818863, -0.09044574946165085, -0.3057553470134735, 0.1228693500161171, 0.05359365791082382, -0.008857935667037964, -0.09771131724119186, 0.03190863877534866, -0.18952760100364685, 0.056694395840168, -0.11616259813308716, -0.06432294100522995, -0.10317434370517731, 0.015848569571971893, -0.09173476696014404, -0.11988212913274765, 0.20697690546512604, 0.18997061252593994, -0.2297091782093048, -0.4579509198665619, 0.29750725626945496, 0.15182943642139435, 0.2854934632778168, 0.4001207947731018, -0.00011804338282672688, 0.11986832320690155, 0.4619453549385071, -0.08787781745195389, -0.48453202843666077, -0.311126172542572, -0.24440157413482666, -0.0946979969739914, 0.027988815680146217, -0.16255292296409607, -0.17545372247695923, 0.3403492867946625, 0.12001661956310272, -0.30931293964385986, 0.24259839951992035, 0.41590335965156555, 0.18145562708377838, 0.4850333631038666, -0.09837734699249268, 0.14193104207515717, 0.2775052487850189, 0.04056191444396973, -0.09773342311382294, 0.4429738521575928, 0.08838381618261337, -0.2895759046077728, -0.06818308681249619, 0.18272489309310913, -0.18681438267230988, 0.2293173223733902, 0.23732340335845947, -0.03105970472097397, 0.05004965141415596, -0.14728061854839325, 0.017266692593693733, 0.30445533990859985, 0.22847574949264526, -0.4627501666545868, -0.26277366280555725, -0.1982944905757904, -0.07209320366382599, -0.6634255051612854, 0.3091942071914673, 0.20114414393901825, -0.23901820182800293, -0.14253170788288116, -0.5278372764587402, 0.09062118828296661, -0.0025057345628738403, 0.11699523776769638, 0.17898784577846527, 0.41054269671440125, 0.24873730540275574, 0.10010027885437012, 0.12086102366447449, 0.0906592458486557, 0.15093423426151276, -0.238460510969162, -0.11240728199481964, 0.22808626294136047, -0.5045993328094482, -0.167716383934021, 0.16447176039218903, 0.18750356137752533, 0.03138522058725357, 0.37995725870132446, 0.14186906814575195, 0.0847267135977745, 0.07321252673864365, 0.09112634509801865, 0.22446967661380768, 0.13872608542442322, 0.1841387301683426, 0.2849820554256439, 0.38463497161865234, 0.171773299574852, 0.20626650750637054, 0.1484004259109497, -0.07115954905748367, -0.1690816581249237, 0.09673912823200226, 0.09956406056880951, -0.07241462916135788, -0.3175649046897888, -0.5501679182052612, 0.2802395522594452, 0.059162966907024384, -0.10879044979810715, 0.3846679925918579, 0.25689083337783813, -0.20694544911384583, -0.36978602409362793, 0.09914502501487732, 0.2307717353105545, -0.28127947449684143, -0.028578177094459534, -0.1864866316318512, 0.2175769805908203, -0.3917299509048462, -0.05313635617494583, 0.340781569480896, -0.05468301102519035, 0.393104612827301, -0.1745661050081253, 0.08942577987909317, 0.23510298132896423, 0.16521482169628143, -0.28333577513694763, -0.37273702025413513, 0.45117607712745667, 0.07212218642234802, -0.06092698872089386, 0.2574208974838257, -0.1946481317281723, -0.3575667142868042, -0.045344240963459015, -0.02272239327430725, -0.15415267646312714, -0.26946085691452026, 0.1336430311203003, -0.5319491624832153, -0.1265994906425476, -0.10478831082582474, -0.09807473421096802, 0.46590226888656616, -0.22180770337581635, 0.07207523286342621, -0.23559711873531342, -0.4272306561470032, -0.21139298379421234, 0.20537951588630676, 0.2566947340965271, -0.2136310189962387, -0.046541791409254074, -0.22151097655296326, -0.08493994176387787, 0.3301588296890259, 0.25363653898239136, -0.15344266593456268, 0.2487075924873352, -0.23720385134220123, 0.15973655879497528, 0.42824554443359375, -0.0966891422867775, -0.37750518321990967, 0.06357766687870026, 0.042048096656799316, 0.029366450384259224, -0.029479630291461945, 0.11225497722625732, -0.014248741790652275, -0.0672748014330864, 0.19054806232452393, 0.3296670913696289, -0.14359945058822632, -0.15678368508815765, -0.2640848457813263, 0.04020059108734131, 0.45298951864242554, 0.3493305444717407, 0.27533242106437683, -0.1353892982006073, 0.06522879749536514, 0.1668531745672226, 0.11538312584161758, 0.05736817419528961, 0.08876844495534897, 0.16630293428897858, 0.1947505921125412, -0.0009249597787857056, -0.3076634109020233, -0.19340366125106812, -0.42848509550094604, 0.29855209589004517, -0.4023682177066803, 0.34421831369400024, -0.005205854773521423, 0.11636482179164886, -0.2743449807167053, -0.0884462520480156, -0.07797923684120178, -0.03498121723532677, 0.055248238146305084, -0.036268122494220734, 0.11863680183887482, -0.15758129954338074, -0.12165966629981995, 0.45969468355178833, -0.3044731020927429, 0.030605139210820198, -0.2032380998134613, 0.558939516544342, -0.24940742552280426, -0.3483187258243561, 0.18164637684822083, 0.16782760620117188, -0.07485552877187729, -0.08874106407165527, -0.14644348621368408, 0.4584696590900421, 0.1846817433834076, -0.21150223910808563, 0.06761538982391357, 0.2728215157985687, 0.2086808979511261, 0.04574481025338173, 0.11333982646465302, 0.34857094287872314, -0.010380327701568604, -0.10622403025627136, -0.2250293791294098, 0.5668240785598755, -0.13564950227737427, 0.10987255722284317, -0.019480492919683456, 0.1030002236366272, 0.16478806734085083, -0.1018061712384224, -0.14664803445339203, -0.0287134051322937, 0.5365939140319824, 0.19544321298599243, 0.23871241509914398, 0.09663517773151398, -0.3509831726551056, -0.15099510550498962, 0.5099388957023621, 0.09742490947246552, 0.03750104457139969, 0.32718679308891296, 0.16450496017932892, -0.2205292284488678, 0.15254178643226624, 0.03627096489071846, 0.5619987845420837, 0.04485609754920006, -0.0008597299456596375, 0.31477224826812744, -0.3628350496292114, -0.05698217824101448, 0.06653134524822235, -0.15806680917739868, 0.3175261914730072, 0.3234219253063202, 0.05797530338168144, 0.06124774366617203, -0.3958384096622467, -0.22885052859783173, 0.10429241508245468, 0.49896907806396484, -0.2964092195034027, 0.06617459654808044, -0.32618895173072815, -0.11477735638618469, -0.08881616592407227, -0.1403394341468811, -0.5619559288024902, -0.22504936158657074, 0.0893946960568428, 0.3187950849533081, 0.0905735194683075, 0.3506728410720825, -0.4854868948459625, -0.008452564477920532, 0.12749192118644714, -0.31420812010765076, -0.012965630739927292, -0.15581637620925903, -0.2733369767665863, 0.03552570566534996, 0.7237204909324646, 0.09635528177022934, 0.38426175713539124, 0.05504655838012695, -0.2218772917985916, -0.049138203263282776, -0.3143675625324249, -0.022367514669895172, -0.22954581677913666, 0.338960736989975, 0.33197569847106934, 0.11001875251531601, -0.16040925681591034, -0.2559404969215393, 0.29941025376319885, -0.04354734718799591, -0.19576749205589294, 0.19448710978031158, -0.06588907539844513, -0.0019956224132329226, -0.1117202639579773, -0.012107796967029572, -0.1920270174741745, -0.22158180177211761, -0.1455167680978775, 0.19787289202213287, 0.32105857133865356, 0.31960242986679077, 0.029359180480241776, 0.15036359429359436, 0.0955185666680336, -0.028705013915896416, -0.17967292666435242, -0.3023669719696045, 0.35497087240219116, 0.06890799105167389, -0.4053298532962799, -0.2147282510995865, -0.10069292038679123, 0.23059312999248505, 0.10188798606395721, -0.5546714663505554, 0.13958409428596497, -0.03376389294862747, 0.09827661514282227, 0.16175943613052368, -0.018858959898352623, 0.4739736318588257, -0.03888576105237007, 0.056006208062171936, -0.19784551858901978, -0.24565063416957855, 0.13559143245220184, 0.16168168187141418, 0.656341016292572, -0.054541073739528656, 0.4591037333011627, -0.1254962980747223, 0.5254040360450745, 0.27985644340515137, -0.17634131014347076, 0.3539975583553314, 0.2002418488264084, 0.27365216612815857, -0.15349358320236206, -0.29143351316452026, 0.28552111983299255, -0.049538761377334595, -0.18259859085083008, 0.01159154623746872, -0.08290626108646393, -0.20050263404846191, -0.18693473935127258, 0.3586069941520691, -0.15216295421123505, -0.20322325825691223, 0.07590395957231522, -0.41920754313468933, 0.1117391586303711, 0.12383735179901123, 0.041789375245571136, -0.2293190062046051, -0.20974200963974, -0.03425142914056778, 0.3359273076057434, -0.02935531735420227, 0.034108687192201614, -0.5879097580909729, -0.20724597573280334, -0.27618876099586487, 0.3000997304916382, -0.02280256897211075, 0.508247971534729, -0.12710316479206085, -0.02217748388648033, 0.10229584574699402, -0.19119255244731903, 0.18797552585601807, -0.4306774139404297, 0.1604577600955963, 0.24858981370925903, 0.1959751397371292, -0.21747331321239471, -0.3243359327316284, -0.19718049466609955, 0.08993641287088394, 0.3619171679019928, 0.23904265463352203, -0.4133509695529938, -0.17956306040287018, 0.30761197209358215, -0.17722128331661224, -0.031756527721881866, -0.2116963416337967, -0.5768941640853882, -0.3119819164276123, -0.24553754925727844, 0.10727937519550323, -0.10115213692188263, 0.30959799885749817, -0.09589996188879013, 0.2520926296710968, 0.11115652322769165, 0.12002349644899368, 0.31183362007141113, -0.025878122076392174, 0.12496191263198853, 0.2003539502620697, 0.24292540550231934, -0.2824971377849579, -0.03049875795841217, 0.13725054264068604, 0.4655218720436096, -0.003039054572582245, 0.1497270166873932, 0.24621695280075073, 0.10327208042144775, 0.0787181630730629, 0.13542461395263672, 0.10898066312074661, 0.004826962947845459, 0.2942678928375244, 0.10802282392978668, -0.16814273595809937, 0.21240393817424774, 0.15131446719169617, -0.03763354942202568, -0.257049560546875, -0.4218555986881256, 0.38398271799087524, 0.09387697279453278, 0.07863110303878784, 0.5386751890182495, -0.1991012841463089, -0.22749143838882446, 0.1776130348443985, 0.4289579689502716, 0.7838948965072632, -0.04624692350625992, 0.05058927834033966, 0.2714208960533142, -0.38851964473724365, 0.17343159019947052, -0.12780776619911194, 0.21388424932956696, -0.41400811076164246, -0.2300037294626236, -0.11476030200719833, -0.23700708150863647, 0.28672054409980774, 0.0709187388420105, 0.02105090394616127, 0.2501493990421295, 0.06376709043979645, 0.21348240971565247, 0.047311216592788696, 0.3004763722419739, -0.2035636156797409, -0.0009062588214874268, -0.24380379915237427, 0.1599237024784088, -0.2949711084365845, 0.38419151306152344, -0.18277078866958618, -0.14167876541614532, -0.22529862821102142, -0.22979624569416046, -0.5931192636489868, 0.04207363724708557, -0.03454965353012085, 0.1219121664762497, 0.16120672225952148, -0.29703620076179504, 0.25363242626190186, -0.012544374912977219, 0.30524197220802307, 0.21494899690151215, -0.21897633373737335, 0.032076895236968994, 0.15962615609169006, 0.06327731162309647, 0.1346653550863266, 0.05774526298046112, 0.38575848937034607, -0.21142718195915222, -0.2823190987110138, -0.050300657749176025, -0.06938286870718002, -0.5146651268005371, 0.28684505820274353, -0.17235037684440613, 0.08005081862211227, -0.06218165531754494, -0.08365039527416229, 0.013984724879264832, 0.030454907566308975, -0.19595319032669067, 0.12615986168384552, 0.06693527102470398, -0.07483415305614471, 0.25189143419265747, -0.12572342157363892, -0.145521879196167, -0.19352097809314728, 0.3756963014602661, 0.13732698559761047, 0.016508616507053375, 0.4529261291027069, 0.2720402181148529, -0.1528954952955246, -0.23041841387748718, -0.10563923418521881, 0.17864146828651428, 0.024784564971923828, -0.014817711897194386, -0.1295316070318222, -0.08423911035060883, -0.18298642337322235, 0.11873934417963028, 0.2865351438522339, 0.09984201937913895, 0.29272961616516113, -0.5119158029556274, -0.500837504863739, 0.21920211613178253, -0.19762033224105835, 0.19259247183799744, -0.4042050540447235, 0.3515554666519165, -0.0026993323117494583, 0.005204550921916962, -0.29805055260658264, -0.17890556156635284, -0.46185222268104553, 0.11093533784151077, 0.07292626798152924, -0.20211732387542725, -0.056052353233098984, -0.18825988471508026, 0.11967451870441437, -0.1352253258228302, -0.39186495542526245, -0.1660434901714325, -0.1048925369977951, 0.15863268077373505, 0.008799846284091473, -0.35638850927352905, 0.1701889932155609, -0.14885090291500092, -0.2751871347427368, -0.015598665922880173, -0.22451667487621307, 0.008407332003116608, -0.05161077529191971, 0.15267160534858704, 0.2826908528804779, -0.022928595542907715, 0.015927042812108994, -0.1590150147676468, -0.1738787591457367, 0.05742880329489708, 0.022622020915150642, 0.1774999052286148, 0.18285156786441803, 0.04825466871261597, -0.21040675044059753, 0.11559082567691803, -0.10320267081260681, 0.0354527086019516, 0.2705412805080414, -0.3210698366165161, -0.11032538115978241, -0.005624228157103062, 0.4704589247703552, 0.5312496423721313, -0.12883226573467255, -0.19564397633075714, 0.2631404399871826, 0.1443779468536377, -0.49278658628463745, 0.09607472270727158, 0.10323348641395569, 0.08222409337759018, -0.05519691854715347, 0.13458992540836334, 0.19727280735969543, 0.2342779040336609, 0.017212025821208954, 0.17556437849998474, 0.16435517370700836, -0.24930690228939056, 0.07969200611114502, 0.3898661434650421, -0.08018765598535538, -0.0386279933154583, 0.3764920234680176, -0.1423220932483673, -0.01267128437757492, -0.03430818021297455, 0.10679085552692413, 0.2860962748527527, -0.19196343421936035, 0.053792525082826614, -0.4108021557331085, -0.4486483931541443, -0.1012226790189743, 0.3432515859603882, 0.003610961139202118, -0.019260689616203308, -0.027801379561424255, 0.2828315496444702, -0.18289615213871002, -0.057875555008649826, -0.22661474347114563, 0.10527901351451874, 0.02386452630162239, -0.07182084023952484, -0.4027283191680908, -0.12966862320899963, -0.22797159850597382, 0.1654793620109558, 0.0540967658162117, 0.12623806297779083, 0.30887365341186523, 0.10035088658332825, -0.21291930973529816, -0.32959094643592834, 0.11712585389614105, 0.3001697361469269, -0.3030855655670166, -0.27915334701538086, 0.3936848044395447, 0.21286585927009583, 0.015566322952508926, -0.22718405723571777, 0.3640894293785095, 0.32361704111099243, 0.3887958526611328, -0.25147899985313416, -0.2520092725753784, 0.07659713178873062, 0.029905790463089943, -0.08270549774169922, 0.49782103300094604, 0.3275834918022156, 0.09987244009971619, 0.20966650545597076, 0.07944726198911667, -0.09566184133291245, 0.196631520986557, -0.08401544392108917, -0.2941378057003021, 0.003598742187023163, 0.66038978099823, 0.17177657783031464, 0.0049779340624809265, -0.0732264369726181, 0.030812308192253113, -0.19097575545310974, -0.0409565195441246, 0.3082464933395386, 0.19755084812641144, 0.18334731459617615, -0.09985415637493134, 0.04419054090976715, -0.14104220271110535, 0.6444207429885864, 0.23497642576694489, 0.11403755843639374, -0.4878852963447571, -0.3304448425769806, -0.6936571598052979, -0.08192954212427139, -0.2694920301437378, -0.11176718026399612, 0.10536281764507294, 0.20483891665935516, -0.04462885111570358, 0.061834193766117096, 0.1968584805727005, 0.023293208330869675, -0.18391941487789154, -0.03172372281551361, -0.3047984838485718, 0.1097688376903534, -0.25892573595046997, 0.03148168325424194, -0.15424664318561554, -0.3109227120876312, 0.14406824111938477, 0.0020714495331048965, 0.03308291733264923, -0.11797523498535156, -0.03531460464000702, 0.2205830067396164, 0.31187233328819275, 0.2911403775215149, 0.0490066334605217, 0.6657664775848389, 0.11455970257520676, -0.13747572898864746, -0.36198487877845764, -0.1498401165008545, -0.4374692738056183, 0.14098960161209106, -0.1612320840358734, 0.6160258054733276, 0.033211857080459595, -0.13893626630306244, -0.3363068103790283, 0.5645506381988525, 0.09023940563201904, -0.34583333134651184, -0.08555883914232254, -0.03030369244515896, -0.17860263586044312, 0.23081430792808533, -0.04407994821667671, 0.004095062613487244, 0.2179861217737198, 0.45437031984329224, -0.4882110357284546, -0.16455356776714325, 0.5545018911361694, -0.07181645184755325, -0.27013176679611206, -0.1823340505361557, 0.15750551223754883, -0.09625934809446335, -0.16538254916667938, -0.7271353602409363, -0.026330485939979553, 0.2373393177986145, -0.1326826512813568, -0.26211732625961304, 0.23795285820960999, -0.11398620903491974, 0.1122620552778244, 0.053602587431669235, 0.21327054500579834, -0.33638593554496765, -0.33697509765625, -0.16340894997119904, -0.19360709190368652 ]
https://github.com/huggingface/datasets/issues/537
[Dataset] RACE dataset Checksums error
I just cleared the cache an run it again. The error persists ): ``` nlp (master) $ rm -rf /Users/abarbosa/.cache/huggingface/ nlp (master) $ python Python 3.8.5 (default, Aug 5 2020, 03:39:04) [Clang 10.0.0 ] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import nlp >>> dataset = nlp.load_dataset("race") Downloading: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.39k/4.39k [00:00<00:00, 661kB/s] Downloading: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.81k/1.81k [00:00<00:00, 644kB/s] Using custom data configuration default Downloading and preparing dataset race/default (download: 84.52 MiB, generated: 132.61 MiB, post-processed: Unknown size, total: 217.13 MiB) to /Users/abarbosa/.cache/huggingface/datasets/race/default/0.1.0/5461327f1a83549ca0d845a3159c806d2baf4f8d0d8f7d657157ce7cdf3899c2... Downloading: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 25.4M/25.4M [01:03<00:00, 401kB/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/abarbosa/Documents/nlp/src/nlp/load.py", line 550, in load_dataset builder_instance.download_and_prepare( File "/Users/abarbosa/Documents/nlp/src/nlp/builder.py", line 471, in download_and_prepare self._download_and_prepare( File "/Users/abarbosa/Documents/nlp/src/nlp/builder.py", line 530, in _download_and_prepare verify_checksums( File "/Users/abarbosa/Documents/nlp/src/nlp/utils/info_utils.py", line 38, in verify_checksums raise NonMatchingChecksumError(error_msg + str(bad_urls)) nlp.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] >>> ```
Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ```
147
[Dataset] RACE dataset Checksums error Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ``` I just cleared the cache an run it again. The error persists ): ``` nlp (master) $ rm -rf /Users/abarbosa/.cache/huggingface/ nlp (master) $ python Python 3.8.5 (default, Aug 5 2020, 03:39:04) [Clang 10.0.0 ] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import nlp >>> dataset = nlp.load_dataset("race") Downloading: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.39k/4.39k [00:00<00:00, 661kB/s] Downloading: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.81k/1.81k [00:00<00:00, 644kB/s] Using custom data configuration default Downloading and preparing dataset race/default (download: 84.52 MiB, generated: 132.61 MiB, post-processed: Unknown size, total: 217.13 MiB) to /Users/abarbosa/.cache/huggingface/datasets/race/default/0.1.0/5461327f1a83549ca0d845a3159c806d2baf4f8d0d8f7d657157ce7cdf3899c2... Downloading: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 25.4M/25.4M [01:03<00:00, 401kB/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/abarbosa/Documents/nlp/src/nlp/load.py", line 550, in load_dataset builder_instance.download_and_prepare( File "/Users/abarbosa/Documents/nlp/src/nlp/builder.py", line 471, in download_and_prepare self._download_and_prepare( File "/Users/abarbosa/Documents/nlp/src/nlp/builder.py", line 530, in _download_and_prepare verify_checksums( File "/Users/abarbosa/Documents/nlp/src/nlp/utils/info_utils.py", line 38, in verify_checksums raise NonMatchingChecksumError(error_msg + str(bad_urls)) nlp.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] >>> ```
[ -0.34844112396240234, 0.3749223053455353, -0.022354725748300552, 0.24240729212760925, 0.23337355256080627, 0.05917973071336746, 0.2440313696861267, 0.4674775004386902, 0.25530850887298584, -0.14036871492862701, -0.06672588735818863, -0.09044574946165085, -0.3057553470134735, 0.1228693500161171, 0.05359365791082382, -0.008857935667037964, -0.09771131724119186, 0.03190863877534866, -0.18952760100364685, 0.056694395840168, -0.11616259813308716, -0.06432294100522995, -0.10317434370517731, 0.015848569571971893, -0.09173476696014404, -0.11988212913274765, 0.20697690546512604, 0.18997061252593994, -0.2297091782093048, -0.4579509198665619, 0.29750725626945496, 0.15182943642139435, 0.2854934632778168, 0.4001207947731018, -0.00011804338282672688, 0.11986832320690155, 0.4619453549385071, -0.08787781745195389, -0.48453202843666077, -0.311126172542572, -0.24440157413482666, -0.0946979969739914, 0.027988815680146217, -0.16255292296409607, -0.17545372247695923, 0.3403492867946625, 0.12001661956310272, -0.30931293964385986, 0.24259839951992035, 0.41590335965156555, 0.18145562708377838, 0.4850333631038666, -0.09837734699249268, 0.14193104207515717, 0.2775052487850189, 0.04056191444396973, -0.09773342311382294, 0.4429738521575928, 0.08838381618261337, -0.2895759046077728, -0.06818308681249619, 0.18272489309310913, -0.18681438267230988, 0.2293173223733902, 0.23732340335845947, -0.03105970472097397, 0.05004965141415596, -0.14728061854839325, 0.017266692593693733, 0.30445533990859985, 0.22847574949264526, -0.4627501666545868, -0.26277366280555725, -0.1982944905757904, -0.07209320366382599, -0.6634255051612854, 0.3091942071914673, 0.20114414393901825, -0.23901820182800293, -0.14253170788288116, -0.5278372764587402, 0.09062118828296661, -0.0025057345628738403, 0.11699523776769638, 0.17898784577846527, 0.41054269671440125, 0.24873730540275574, 0.10010027885437012, 0.12086102366447449, 0.0906592458486557, 0.15093423426151276, -0.238460510969162, -0.11240728199481964, 0.22808626294136047, -0.5045993328094482, -0.167716383934021, 0.16447176039218903, 0.18750356137752533, 0.03138522058725357, 0.37995725870132446, 0.14186906814575195, 0.0847267135977745, 0.07321252673864365, 0.09112634509801865, 0.22446967661380768, 0.13872608542442322, 0.1841387301683426, 0.2849820554256439, 0.38463497161865234, 0.171773299574852, 0.20626650750637054, 0.1484004259109497, -0.07115954905748367, -0.1690816581249237, 0.09673912823200226, 0.09956406056880951, -0.07241462916135788, -0.3175649046897888, -0.5501679182052612, 0.2802395522594452, 0.059162966907024384, -0.10879044979810715, 0.3846679925918579, 0.25689083337783813, -0.20694544911384583, -0.36978602409362793, 0.09914502501487732, 0.2307717353105545, -0.28127947449684143, -0.028578177094459534, -0.1864866316318512, 0.2175769805908203, -0.3917299509048462, -0.05313635617494583, 0.340781569480896, -0.05468301102519035, 0.393104612827301, -0.1745661050081253, 0.08942577987909317, 0.23510298132896423, 0.16521482169628143, -0.28333577513694763, -0.37273702025413513, 0.45117607712745667, 0.07212218642234802, -0.06092698872089386, 0.2574208974838257, -0.1946481317281723, -0.3575667142868042, -0.045344240963459015, -0.02272239327430725, -0.15415267646312714, -0.26946085691452026, 0.1336430311203003, -0.5319491624832153, -0.1265994906425476, -0.10478831082582474, -0.09807473421096802, 0.46590226888656616, -0.22180770337581635, 0.07207523286342621, -0.23559711873531342, -0.4272306561470032, -0.21139298379421234, 0.20537951588630676, 0.2566947340965271, -0.2136310189962387, -0.046541791409254074, -0.22151097655296326, -0.08493994176387787, 0.3301588296890259, 0.25363653898239136, -0.15344266593456268, 0.2487075924873352, -0.23720385134220123, 0.15973655879497528, 0.42824554443359375, -0.0966891422867775, -0.37750518321990967, 0.06357766687870026, 0.042048096656799316, 0.029366450384259224, -0.029479630291461945, 0.11225497722625732, -0.014248741790652275, -0.0672748014330864, 0.19054806232452393, 0.3296670913696289, -0.14359945058822632, -0.15678368508815765, -0.2640848457813263, 0.04020059108734131, 0.45298951864242554, 0.3493305444717407, 0.27533242106437683, -0.1353892982006073, 0.06522879749536514, 0.1668531745672226, 0.11538312584161758, 0.05736817419528961, 0.08876844495534897, 0.16630293428897858, 0.1947505921125412, -0.0009249597787857056, -0.3076634109020233, -0.19340366125106812, -0.42848509550094604, 0.29855209589004517, -0.4023682177066803, 0.34421831369400024, -0.005205854773521423, 0.11636482179164886, -0.2743449807167053, -0.0884462520480156, -0.07797923684120178, -0.03498121723532677, 0.055248238146305084, -0.036268122494220734, 0.11863680183887482, -0.15758129954338074, -0.12165966629981995, 0.45969468355178833, -0.3044731020927429, 0.030605139210820198, -0.2032380998134613, 0.558939516544342, -0.24940742552280426, -0.3483187258243561, 0.18164637684822083, 0.16782760620117188, -0.07485552877187729, -0.08874106407165527, -0.14644348621368408, 0.4584696590900421, 0.1846817433834076, -0.21150223910808563, 0.06761538982391357, 0.2728215157985687, 0.2086808979511261, 0.04574481025338173, 0.11333982646465302, 0.34857094287872314, -0.010380327701568604, -0.10622403025627136, -0.2250293791294098, 0.5668240785598755, -0.13564950227737427, 0.10987255722284317, -0.019480492919683456, 0.1030002236366272, 0.16478806734085083, -0.1018061712384224, -0.14664803445339203, -0.0287134051322937, 0.5365939140319824, 0.19544321298599243, 0.23871241509914398, 0.09663517773151398, -0.3509831726551056, -0.15099510550498962, 0.5099388957023621, 0.09742490947246552, 0.03750104457139969, 0.32718679308891296, 0.16450496017932892, -0.2205292284488678, 0.15254178643226624, 0.03627096489071846, 0.5619987845420837, 0.04485609754920006, -0.0008597299456596375, 0.31477224826812744, -0.3628350496292114, -0.05698217824101448, 0.06653134524822235, -0.15806680917739868, 0.3175261914730072, 0.3234219253063202, 0.05797530338168144, 0.06124774366617203, -0.3958384096622467, -0.22885052859783173, 0.10429241508245468, 0.49896907806396484, -0.2964092195034027, 0.06617459654808044, -0.32618895173072815, -0.11477735638618469, -0.08881616592407227, -0.1403394341468811, -0.5619559288024902, -0.22504936158657074, 0.0893946960568428, 0.3187950849533081, 0.0905735194683075, 0.3506728410720825, -0.4854868948459625, -0.008452564477920532, 0.12749192118644714, -0.31420812010765076, -0.012965630739927292, -0.15581637620925903, -0.2733369767665863, 0.03552570566534996, 0.7237204909324646, 0.09635528177022934, 0.38426175713539124, 0.05504655838012695, -0.2218772917985916, -0.049138203263282776, -0.3143675625324249, -0.022367514669895172, -0.22954581677913666, 0.338960736989975, 0.33197569847106934, 0.11001875251531601, -0.16040925681591034, -0.2559404969215393, 0.29941025376319885, -0.04354734718799591, -0.19576749205589294, 0.19448710978031158, -0.06588907539844513, -0.0019956224132329226, -0.1117202639579773, -0.012107796967029572, -0.1920270174741745, -0.22158180177211761, -0.1455167680978775, 0.19787289202213287, 0.32105857133865356, 0.31960242986679077, 0.029359180480241776, 0.15036359429359436, 0.0955185666680336, -0.028705013915896416, -0.17967292666435242, -0.3023669719696045, 0.35497087240219116, 0.06890799105167389, -0.4053298532962799, -0.2147282510995865, -0.10069292038679123, 0.23059312999248505, 0.10188798606395721, -0.5546714663505554, 0.13958409428596497, -0.03376389294862747, 0.09827661514282227, 0.16175943613052368, -0.018858959898352623, 0.4739736318588257, -0.03888576105237007, 0.056006208062171936, -0.19784551858901978, -0.24565063416957855, 0.13559143245220184, 0.16168168187141418, 0.656341016292572, -0.054541073739528656, 0.4591037333011627, -0.1254962980747223, 0.5254040360450745, 0.27985644340515137, -0.17634131014347076, 0.3539975583553314, 0.2002418488264084, 0.27365216612815857, -0.15349358320236206, -0.29143351316452026, 0.28552111983299255, -0.049538761377334595, -0.18259859085083008, 0.01159154623746872, -0.08290626108646393, -0.20050263404846191, -0.18693473935127258, 0.3586069941520691, -0.15216295421123505, -0.20322325825691223, 0.07590395957231522, -0.41920754313468933, 0.1117391586303711, 0.12383735179901123, 0.041789375245571136, -0.2293190062046051, -0.20974200963974, -0.03425142914056778, 0.3359273076057434, -0.02935531735420227, 0.034108687192201614, -0.5879097580909729, -0.20724597573280334, -0.27618876099586487, 0.3000997304916382, -0.02280256897211075, 0.508247971534729, -0.12710316479206085, -0.02217748388648033, 0.10229584574699402, -0.19119255244731903, 0.18797552585601807, -0.4306774139404297, 0.1604577600955963, 0.24858981370925903, 0.1959751397371292, -0.21747331321239471, -0.3243359327316284, -0.19718049466609955, 0.08993641287088394, 0.3619171679019928, 0.23904265463352203, -0.4133509695529938, -0.17956306040287018, 0.30761197209358215, -0.17722128331661224, -0.031756527721881866, -0.2116963416337967, -0.5768941640853882, -0.3119819164276123, -0.24553754925727844, 0.10727937519550323, -0.10115213692188263, 0.30959799885749817, -0.09589996188879013, 0.2520926296710968, 0.11115652322769165, 0.12002349644899368, 0.31183362007141113, -0.025878122076392174, 0.12496191263198853, 0.2003539502620697, 0.24292540550231934, -0.2824971377849579, -0.03049875795841217, 0.13725054264068604, 0.4655218720436096, -0.003039054572582245, 0.1497270166873932, 0.24621695280075073, 0.10327208042144775, 0.0787181630730629, 0.13542461395263672, 0.10898066312074661, 0.004826962947845459, 0.2942678928375244, 0.10802282392978668, -0.16814273595809937, 0.21240393817424774, 0.15131446719169617, -0.03763354942202568, -0.257049560546875, -0.4218555986881256, 0.38398271799087524, 0.09387697279453278, 0.07863110303878784, 0.5386751890182495, -0.1991012841463089, -0.22749143838882446, 0.1776130348443985, 0.4289579689502716, 0.7838948965072632, -0.04624692350625992, 0.05058927834033966, 0.2714208960533142, -0.38851964473724365, 0.17343159019947052, -0.12780776619911194, 0.21388424932956696, -0.41400811076164246, -0.2300037294626236, -0.11476030200719833, -0.23700708150863647, 0.28672054409980774, 0.0709187388420105, 0.02105090394616127, 0.2501493990421295, 0.06376709043979645, 0.21348240971565247, 0.047311216592788696, 0.3004763722419739, -0.2035636156797409, -0.0009062588214874268, -0.24380379915237427, 0.1599237024784088, -0.2949711084365845, 0.38419151306152344, -0.18277078866958618, -0.14167876541614532, -0.22529862821102142, -0.22979624569416046, -0.5931192636489868, 0.04207363724708557, -0.03454965353012085, 0.1219121664762497, 0.16120672225952148, -0.29703620076179504, 0.25363242626190186, -0.012544374912977219, 0.30524197220802307, 0.21494899690151215, -0.21897633373737335, 0.032076895236968994, 0.15962615609169006, 0.06327731162309647, 0.1346653550863266, 0.05774526298046112, 0.38575848937034607, -0.21142718195915222, -0.2823190987110138, -0.050300657749176025, -0.06938286870718002, -0.5146651268005371, 0.28684505820274353, -0.17235037684440613, 0.08005081862211227, -0.06218165531754494, -0.08365039527416229, 0.013984724879264832, 0.030454907566308975, -0.19595319032669067, 0.12615986168384552, 0.06693527102470398, -0.07483415305614471, 0.25189143419265747, -0.12572342157363892, -0.145521879196167, -0.19352097809314728, 0.3756963014602661, 0.13732698559761047, 0.016508616507053375, 0.4529261291027069, 0.2720402181148529, -0.1528954952955246, -0.23041841387748718, -0.10563923418521881, 0.17864146828651428, 0.024784564971923828, -0.014817711897194386, -0.1295316070318222, -0.08423911035060883, -0.18298642337322235, 0.11873934417963028, 0.2865351438522339, 0.09984201937913895, 0.29272961616516113, -0.5119158029556274, -0.500837504863739, 0.21920211613178253, -0.19762033224105835, 0.19259247183799744, -0.4042050540447235, 0.3515554666519165, -0.0026993323117494583, 0.005204550921916962, -0.29805055260658264, -0.17890556156635284, -0.46185222268104553, 0.11093533784151077, 0.07292626798152924, -0.20211732387542725, -0.056052353233098984, -0.18825988471508026, 0.11967451870441437, -0.1352253258228302, -0.39186495542526245, -0.1660434901714325, -0.1048925369977951, 0.15863268077373505, 0.008799846284091473, -0.35638850927352905, 0.1701889932155609, -0.14885090291500092, -0.2751871347427368, -0.015598665922880173, -0.22451667487621307, 0.008407332003116608, -0.05161077529191971, 0.15267160534858704, 0.2826908528804779, -0.022928595542907715, 0.015927042812108994, -0.1590150147676468, -0.1738787591457367, 0.05742880329489708, 0.022622020915150642, 0.1774999052286148, 0.18285156786441803, 0.04825466871261597, -0.21040675044059753, 0.11559082567691803, -0.10320267081260681, 0.0354527086019516, 0.2705412805080414, -0.3210698366165161, -0.11032538115978241, -0.005624228157103062, 0.4704589247703552, 0.5312496423721313, -0.12883226573467255, -0.19564397633075714, 0.2631404399871826, 0.1443779468536377, -0.49278658628463745, 0.09607472270727158, 0.10323348641395569, 0.08222409337759018, -0.05519691854715347, 0.13458992540836334, 0.19727280735969543, 0.2342779040336609, 0.017212025821208954, 0.17556437849998474, 0.16435517370700836, -0.24930690228939056, 0.07969200611114502, 0.3898661434650421, -0.08018765598535538, -0.0386279933154583, 0.3764920234680176, -0.1423220932483673, -0.01267128437757492, -0.03430818021297455, 0.10679085552692413, 0.2860962748527527, -0.19196343421936035, 0.053792525082826614, -0.4108021557331085, -0.4486483931541443, -0.1012226790189743, 0.3432515859603882, 0.003610961139202118, -0.019260689616203308, -0.027801379561424255, 0.2828315496444702, -0.18289615213871002, -0.057875555008649826, -0.22661474347114563, 0.10527901351451874, 0.02386452630162239, -0.07182084023952484, -0.4027283191680908, -0.12966862320899963, -0.22797159850597382, 0.1654793620109558, 0.0540967658162117, 0.12623806297779083, 0.30887365341186523, 0.10035088658332825, -0.21291930973529816, -0.32959094643592834, 0.11712585389614105, 0.3001697361469269, -0.3030855655670166, -0.27915334701538086, 0.3936848044395447, 0.21286585927009583, 0.015566322952508926, -0.22718405723571777, 0.3640894293785095, 0.32361704111099243, 0.3887958526611328, -0.25147899985313416, -0.2520092725753784, 0.07659713178873062, 0.029905790463089943, -0.08270549774169922, 0.49782103300094604, 0.3275834918022156, 0.09987244009971619, 0.20966650545597076, 0.07944726198911667, -0.09566184133291245, 0.196631520986557, -0.08401544392108917, -0.2941378057003021, 0.003598742187023163, 0.66038978099823, 0.17177657783031464, 0.0049779340624809265, -0.0732264369726181, 0.030812308192253113, -0.19097575545310974, -0.0409565195441246, 0.3082464933395386, 0.19755084812641144, 0.18334731459617615, -0.09985415637493134, 0.04419054090976715, -0.14104220271110535, 0.6444207429885864, 0.23497642576694489, 0.11403755843639374, -0.4878852963447571, -0.3304448425769806, -0.6936571598052979, -0.08192954212427139, -0.2694920301437378, -0.11176718026399612, 0.10536281764507294, 0.20483891665935516, -0.04462885111570358, 0.061834193766117096, 0.1968584805727005, 0.023293208330869675, -0.18391941487789154, -0.03172372281551361, -0.3047984838485718, 0.1097688376903534, -0.25892573595046997, 0.03148168325424194, -0.15424664318561554, -0.3109227120876312, 0.14406824111938477, 0.0020714495331048965, 0.03308291733264923, -0.11797523498535156, -0.03531460464000702, 0.2205830067396164, 0.31187233328819275, 0.2911403775215149, 0.0490066334605217, 0.6657664775848389, 0.11455970257520676, -0.13747572898864746, -0.36198487877845764, -0.1498401165008545, -0.4374692738056183, 0.14098960161209106, -0.1612320840358734, 0.6160258054733276, 0.033211857080459595, -0.13893626630306244, -0.3363068103790283, 0.5645506381988525, 0.09023940563201904, -0.34583333134651184, -0.08555883914232254, -0.03030369244515896, -0.17860263586044312, 0.23081430792808533, -0.04407994821667671, 0.004095062613487244, 0.2179861217737198, 0.45437031984329224, -0.4882110357284546, -0.16455356776714325, 0.5545018911361694, -0.07181645184755325, -0.27013176679611206, -0.1823340505361557, 0.15750551223754883, -0.09625934809446335, -0.16538254916667938, -0.7271353602409363, -0.026330485939979553, 0.2373393177986145, -0.1326826512813568, -0.26211732625961304, 0.23795285820960999, -0.11398620903491974, 0.1122620552778244, 0.053602587431669235, 0.21327054500579834, -0.33638593554496765, -0.33697509765625, -0.16340894997119904, -0.19360709190368652 ]
https://github.com/huggingface/datasets/issues/537
[Dataset] RACE dataset Checksums error
Dealing with the same issue please update the checksum on nlp library end. The data seems to have changed on their end.
Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ```
22
[Dataset] RACE dataset Checksums error Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ``` Dealing with the same issue please update the checksum on nlp library end. The data seems to have changed on their end.
[ -0.34844112396240234, 0.3749223053455353, -0.022354725748300552, 0.24240729212760925, 0.23337355256080627, 0.05917973071336746, 0.2440313696861267, 0.4674775004386902, 0.25530850887298584, -0.14036871492862701, -0.06672588735818863, -0.09044574946165085, -0.3057553470134735, 0.1228693500161171, 0.05359365791082382, -0.008857935667037964, -0.09771131724119186, 0.03190863877534866, -0.18952760100364685, 0.056694395840168, -0.11616259813308716, -0.06432294100522995, -0.10317434370517731, 0.015848569571971893, -0.09173476696014404, -0.11988212913274765, 0.20697690546512604, 0.18997061252593994, -0.2297091782093048, -0.4579509198665619, 0.29750725626945496, 0.15182943642139435, 0.2854934632778168, 0.4001207947731018, -0.00011804338282672688, 0.11986832320690155, 0.4619453549385071, -0.08787781745195389, -0.48453202843666077, -0.311126172542572, -0.24440157413482666, -0.0946979969739914, 0.027988815680146217, -0.16255292296409607, -0.17545372247695923, 0.3403492867946625, 0.12001661956310272, -0.30931293964385986, 0.24259839951992035, 0.41590335965156555, 0.18145562708377838, 0.4850333631038666, -0.09837734699249268, 0.14193104207515717, 0.2775052487850189, 0.04056191444396973, -0.09773342311382294, 0.4429738521575928, 0.08838381618261337, -0.2895759046077728, -0.06818308681249619, 0.18272489309310913, -0.18681438267230988, 0.2293173223733902, 0.23732340335845947, -0.03105970472097397, 0.05004965141415596, -0.14728061854839325, 0.017266692593693733, 0.30445533990859985, 0.22847574949264526, -0.4627501666545868, -0.26277366280555725, -0.1982944905757904, -0.07209320366382599, -0.6634255051612854, 0.3091942071914673, 0.20114414393901825, -0.23901820182800293, -0.14253170788288116, -0.5278372764587402, 0.09062118828296661, -0.0025057345628738403, 0.11699523776769638, 0.17898784577846527, 0.41054269671440125, 0.24873730540275574, 0.10010027885437012, 0.12086102366447449, 0.0906592458486557, 0.15093423426151276, -0.238460510969162, -0.11240728199481964, 0.22808626294136047, -0.5045993328094482, -0.167716383934021, 0.16447176039218903, 0.18750356137752533, 0.03138522058725357, 0.37995725870132446, 0.14186906814575195, 0.0847267135977745, 0.07321252673864365, 0.09112634509801865, 0.22446967661380768, 0.13872608542442322, 0.1841387301683426, 0.2849820554256439, 0.38463497161865234, 0.171773299574852, 0.20626650750637054, 0.1484004259109497, -0.07115954905748367, -0.1690816581249237, 0.09673912823200226, 0.09956406056880951, -0.07241462916135788, -0.3175649046897888, -0.5501679182052612, 0.2802395522594452, 0.059162966907024384, -0.10879044979810715, 0.3846679925918579, 0.25689083337783813, -0.20694544911384583, -0.36978602409362793, 0.09914502501487732, 0.2307717353105545, -0.28127947449684143, -0.028578177094459534, -0.1864866316318512, 0.2175769805908203, -0.3917299509048462, -0.05313635617494583, 0.340781569480896, -0.05468301102519035, 0.393104612827301, -0.1745661050081253, 0.08942577987909317, 0.23510298132896423, 0.16521482169628143, -0.28333577513694763, -0.37273702025413513, 0.45117607712745667, 0.07212218642234802, -0.06092698872089386, 0.2574208974838257, -0.1946481317281723, -0.3575667142868042, -0.045344240963459015, -0.02272239327430725, -0.15415267646312714, -0.26946085691452026, 0.1336430311203003, -0.5319491624832153, -0.1265994906425476, -0.10478831082582474, -0.09807473421096802, 0.46590226888656616, -0.22180770337581635, 0.07207523286342621, -0.23559711873531342, -0.4272306561470032, -0.21139298379421234, 0.20537951588630676, 0.2566947340965271, -0.2136310189962387, -0.046541791409254074, -0.22151097655296326, -0.08493994176387787, 0.3301588296890259, 0.25363653898239136, -0.15344266593456268, 0.2487075924873352, -0.23720385134220123, 0.15973655879497528, 0.42824554443359375, -0.0966891422867775, -0.37750518321990967, 0.06357766687870026, 0.042048096656799316, 0.029366450384259224, -0.029479630291461945, 0.11225497722625732, -0.014248741790652275, -0.0672748014330864, 0.19054806232452393, 0.3296670913696289, -0.14359945058822632, -0.15678368508815765, -0.2640848457813263, 0.04020059108734131, 0.45298951864242554, 0.3493305444717407, 0.27533242106437683, -0.1353892982006073, 0.06522879749536514, 0.1668531745672226, 0.11538312584161758, 0.05736817419528961, 0.08876844495534897, 0.16630293428897858, 0.1947505921125412, -0.0009249597787857056, -0.3076634109020233, -0.19340366125106812, -0.42848509550094604, 0.29855209589004517, -0.4023682177066803, 0.34421831369400024, -0.005205854773521423, 0.11636482179164886, -0.2743449807167053, -0.0884462520480156, -0.07797923684120178, -0.03498121723532677, 0.055248238146305084, -0.036268122494220734, 0.11863680183887482, -0.15758129954338074, -0.12165966629981995, 0.45969468355178833, -0.3044731020927429, 0.030605139210820198, -0.2032380998134613, 0.558939516544342, -0.24940742552280426, -0.3483187258243561, 0.18164637684822083, 0.16782760620117188, -0.07485552877187729, -0.08874106407165527, -0.14644348621368408, 0.4584696590900421, 0.1846817433834076, -0.21150223910808563, 0.06761538982391357, 0.2728215157985687, 0.2086808979511261, 0.04574481025338173, 0.11333982646465302, 0.34857094287872314, -0.010380327701568604, -0.10622403025627136, -0.2250293791294098, 0.5668240785598755, -0.13564950227737427, 0.10987255722284317, -0.019480492919683456, 0.1030002236366272, 0.16478806734085083, -0.1018061712384224, -0.14664803445339203, -0.0287134051322937, 0.5365939140319824, 0.19544321298599243, 0.23871241509914398, 0.09663517773151398, -0.3509831726551056, -0.15099510550498962, 0.5099388957023621, 0.09742490947246552, 0.03750104457139969, 0.32718679308891296, 0.16450496017932892, -0.2205292284488678, 0.15254178643226624, 0.03627096489071846, 0.5619987845420837, 0.04485609754920006, -0.0008597299456596375, 0.31477224826812744, -0.3628350496292114, -0.05698217824101448, 0.06653134524822235, -0.15806680917739868, 0.3175261914730072, 0.3234219253063202, 0.05797530338168144, 0.06124774366617203, -0.3958384096622467, -0.22885052859783173, 0.10429241508245468, 0.49896907806396484, -0.2964092195034027, 0.06617459654808044, -0.32618895173072815, -0.11477735638618469, -0.08881616592407227, -0.1403394341468811, -0.5619559288024902, -0.22504936158657074, 0.0893946960568428, 0.3187950849533081, 0.0905735194683075, 0.3506728410720825, -0.4854868948459625, -0.008452564477920532, 0.12749192118644714, -0.31420812010765076, -0.012965630739927292, -0.15581637620925903, -0.2733369767665863, 0.03552570566534996, 0.7237204909324646, 0.09635528177022934, 0.38426175713539124, 0.05504655838012695, -0.2218772917985916, -0.049138203263282776, -0.3143675625324249, -0.022367514669895172, -0.22954581677913666, 0.338960736989975, 0.33197569847106934, 0.11001875251531601, -0.16040925681591034, -0.2559404969215393, 0.29941025376319885, -0.04354734718799591, -0.19576749205589294, 0.19448710978031158, -0.06588907539844513, -0.0019956224132329226, -0.1117202639579773, -0.012107796967029572, -0.1920270174741745, -0.22158180177211761, -0.1455167680978775, 0.19787289202213287, 0.32105857133865356, 0.31960242986679077, 0.029359180480241776, 0.15036359429359436, 0.0955185666680336, -0.028705013915896416, -0.17967292666435242, -0.3023669719696045, 0.35497087240219116, 0.06890799105167389, -0.4053298532962799, -0.2147282510995865, -0.10069292038679123, 0.23059312999248505, 0.10188798606395721, -0.5546714663505554, 0.13958409428596497, -0.03376389294862747, 0.09827661514282227, 0.16175943613052368, -0.018858959898352623, 0.4739736318588257, -0.03888576105237007, 0.056006208062171936, -0.19784551858901978, -0.24565063416957855, 0.13559143245220184, 0.16168168187141418, 0.656341016292572, -0.054541073739528656, 0.4591037333011627, -0.1254962980747223, 0.5254040360450745, 0.27985644340515137, -0.17634131014347076, 0.3539975583553314, 0.2002418488264084, 0.27365216612815857, -0.15349358320236206, -0.29143351316452026, 0.28552111983299255, -0.049538761377334595, -0.18259859085083008, 0.01159154623746872, -0.08290626108646393, -0.20050263404846191, -0.18693473935127258, 0.3586069941520691, -0.15216295421123505, -0.20322325825691223, 0.07590395957231522, -0.41920754313468933, 0.1117391586303711, 0.12383735179901123, 0.041789375245571136, -0.2293190062046051, -0.20974200963974, -0.03425142914056778, 0.3359273076057434, -0.02935531735420227, 0.034108687192201614, -0.5879097580909729, -0.20724597573280334, -0.27618876099586487, 0.3000997304916382, -0.02280256897211075, 0.508247971534729, -0.12710316479206085, -0.02217748388648033, 0.10229584574699402, -0.19119255244731903, 0.18797552585601807, -0.4306774139404297, 0.1604577600955963, 0.24858981370925903, 0.1959751397371292, -0.21747331321239471, -0.3243359327316284, -0.19718049466609955, 0.08993641287088394, 0.3619171679019928, 0.23904265463352203, -0.4133509695529938, -0.17956306040287018, 0.30761197209358215, -0.17722128331661224, -0.031756527721881866, -0.2116963416337967, -0.5768941640853882, -0.3119819164276123, -0.24553754925727844, 0.10727937519550323, -0.10115213692188263, 0.30959799885749817, -0.09589996188879013, 0.2520926296710968, 0.11115652322769165, 0.12002349644899368, 0.31183362007141113, -0.025878122076392174, 0.12496191263198853, 0.2003539502620697, 0.24292540550231934, -0.2824971377849579, -0.03049875795841217, 0.13725054264068604, 0.4655218720436096, -0.003039054572582245, 0.1497270166873932, 0.24621695280075073, 0.10327208042144775, 0.0787181630730629, 0.13542461395263672, 0.10898066312074661, 0.004826962947845459, 0.2942678928375244, 0.10802282392978668, -0.16814273595809937, 0.21240393817424774, 0.15131446719169617, -0.03763354942202568, -0.257049560546875, -0.4218555986881256, 0.38398271799087524, 0.09387697279453278, 0.07863110303878784, 0.5386751890182495, -0.1991012841463089, -0.22749143838882446, 0.1776130348443985, 0.4289579689502716, 0.7838948965072632, -0.04624692350625992, 0.05058927834033966, 0.2714208960533142, -0.38851964473724365, 0.17343159019947052, -0.12780776619911194, 0.21388424932956696, -0.41400811076164246, -0.2300037294626236, -0.11476030200719833, -0.23700708150863647, 0.28672054409980774, 0.0709187388420105, 0.02105090394616127, 0.2501493990421295, 0.06376709043979645, 0.21348240971565247, 0.047311216592788696, 0.3004763722419739, -0.2035636156797409, -0.0009062588214874268, -0.24380379915237427, 0.1599237024784088, -0.2949711084365845, 0.38419151306152344, -0.18277078866958618, -0.14167876541614532, -0.22529862821102142, -0.22979624569416046, -0.5931192636489868, 0.04207363724708557, -0.03454965353012085, 0.1219121664762497, 0.16120672225952148, -0.29703620076179504, 0.25363242626190186, -0.012544374912977219, 0.30524197220802307, 0.21494899690151215, -0.21897633373737335, 0.032076895236968994, 0.15962615609169006, 0.06327731162309647, 0.1346653550863266, 0.05774526298046112, 0.38575848937034607, -0.21142718195915222, -0.2823190987110138, -0.050300657749176025, -0.06938286870718002, -0.5146651268005371, 0.28684505820274353, -0.17235037684440613, 0.08005081862211227, -0.06218165531754494, -0.08365039527416229, 0.013984724879264832, 0.030454907566308975, -0.19595319032669067, 0.12615986168384552, 0.06693527102470398, -0.07483415305614471, 0.25189143419265747, -0.12572342157363892, -0.145521879196167, -0.19352097809314728, 0.3756963014602661, 0.13732698559761047, 0.016508616507053375, 0.4529261291027069, 0.2720402181148529, -0.1528954952955246, -0.23041841387748718, -0.10563923418521881, 0.17864146828651428, 0.024784564971923828, -0.014817711897194386, -0.1295316070318222, -0.08423911035060883, -0.18298642337322235, 0.11873934417963028, 0.2865351438522339, 0.09984201937913895, 0.29272961616516113, -0.5119158029556274, -0.500837504863739, 0.21920211613178253, -0.19762033224105835, 0.19259247183799744, -0.4042050540447235, 0.3515554666519165, -0.0026993323117494583, 0.005204550921916962, -0.29805055260658264, -0.17890556156635284, -0.46185222268104553, 0.11093533784151077, 0.07292626798152924, -0.20211732387542725, -0.056052353233098984, -0.18825988471508026, 0.11967451870441437, -0.1352253258228302, -0.39186495542526245, -0.1660434901714325, -0.1048925369977951, 0.15863268077373505, 0.008799846284091473, -0.35638850927352905, 0.1701889932155609, -0.14885090291500092, -0.2751871347427368, -0.015598665922880173, -0.22451667487621307, 0.008407332003116608, -0.05161077529191971, 0.15267160534858704, 0.2826908528804779, -0.022928595542907715, 0.015927042812108994, -0.1590150147676468, -0.1738787591457367, 0.05742880329489708, 0.022622020915150642, 0.1774999052286148, 0.18285156786441803, 0.04825466871261597, -0.21040675044059753, 0.11559082567691803, -0.10320267081260681, 0.0354527086019516, 0.2705412805080414, -0.3210698366165161, -0.11032538115978241, -0.005624228157103062, 0.4704589247703552, 0.5312496423721313, -0.12883226573467255, -0.19564397633075714, 0.2631404399871826, 0.1443779468536377, -0.49278658628463745, 0.09607472270727158, 0.10323348641395569, 0.08222409337759018, -0.05519691854715347, 0.13458992540836334, 0.19727280735969543, 0.2342779040336609, 0.017212025821208954, 0.17556437849998474, 0.16435517370700836, -0.24930690228939056, 0.07969200611114502, 0.3898661434650421, -0.08018765598535538, -0.0386279933154583, 0.3764920234680176, -0.1423220932483673, -0.01267128437757492, -0.03430818021297455, 0.10679085552692413, 0.2860962748527527, -0.19196343421936035, 0.053792525082826614, -0.4108021557331085, -0.4486483931541443, -0.1012226790189743, 0.3432515859603882, 0.003610961139202118, -0.019260689616203308, -0.027801379561424255, 0.2828315496444702, -0.18289615213871002, -0.057875555008649826, -0.22661474347114563, 0.10527901351451874, 0.02386452630162239, -0.07182084023952484, -0.4027283191680908, -0.12966862320899963, -0.22797159850597382, 0.1654793620109558, 0.0540967658162117, 0.12623806297779083, 0.30887365341186523, 0.10035088658332825, -0.21291930973529816, -0.32959094643592834, 0.11712585389614105, 0.3001697361469269, -0.3030855655670166, -0.27915334701538086, 0.3936848044395447, 0.21286585927009583, 0.015566322952508926, -0.22718405723571777, 0.3640894293785095, 0.32361704111099243, 0.3887958526611328, -0.25147899985313416, -0.2520092725753784, 0.07659713178873062, 0.029905790463089943, -0.08270549774169922, 0.49782103300094604, 0.3275834918022156, 0.09987244009971619, 0.20966650545597076, 0.07944726198911667, -0.09566184133291245, 0.196631520986557, -0.08401544392108917, -0.2941378057003021, 0.003598742187023163, 0.66038978099823, 0.17177657783031464, 0.0049779340624809265, -0.0732264369726181, 0.030812308192253113, -0.19097575545310974, -0.0409565195441246, 0.3082464933395386, 0.19755084812641144, 0.18334731459617615, -0.09985415637493134, 0.04419054090976715, -0.14104220271110535, 0.6444207429885864, 0.23497642576694489, 0.11403755843639374, -0.4878852963447571, -0.3304448425769806, -0.6936571598052979, -0.08192954212427139, -0.2694920301437378, -0.11176718026399612, 0.10536281764507294, 0.20483891665935516, -0.04462885111570358, 0.061834193766117096, 0.1968584805727005, 0.023293208330869675, -0.18391941487789154, -0.03172372281551361, -0.3047984838485718, 0.1097688376903534, -0.25892573595046997, 0.03148168325424194, -0.15424664318561554, -0.3109227120876312, 0.14406824111938477, 0.0020714495331048965, 0.03308291733264923, -0.11797523498535156, -0.03531460464000702, 0.2205830067396164, 0.31187233328819275, 0.2911403775215149, 0.0490066334605217, 0.6657664775848389, 0.11455970257520676, -0.13747572898864746, -0.36198487877845764, -0.1498401165008545, -0.4374692738056183, 0.14098960161209106, -0.1612320840358734, 0.6160258054733276, 0.033211857080459595, -0.13893626630306244, -0.3363068103790283, 0.5645506381988525, 0.09023940563201904, -0.34583333134651184, -0.08555883914232254, -0.03030369244515896, -0.17860263586044312, 0.23081430792808533, -0.04407994821667671, 0.004095062613487244, 0.2179861217737198, 0.45437031984329224, -0.4882110357284546, -0.16455356776714325, 0.5545018911361694, -0.07181645184755325, -0.27013176679611206, -0.1823340505361557, 0.15750551223754883, -0.09625934809446335, -0.16538254916667938, -0.7271353602409363, -0.026330485939979553, 0.2373393177986145, -0.1326826512813568, -0.26211732625961304, 0.23795285820960999, -0.11398620903491974, 0.1122620552778244, 0.053602587431669235, 0.21327054500579834, -0.33638593554496765, -0.33697509765625, -0.16340894997119904, -0.19360709190368652 ]
https://github.com/huggingface/datasets/issues/537
[Dataset] RACE dataset Checksums error
We have a discussion on this datasets here: https://github.com/huggingface/nlp/pull/540 Feel free to participate if you have some opinion on the scope of data which should be included in this dataset.
Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ```
30
[Dataset] RACE dataset Checksums error Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ``` We have a discussion on this datasets here: https://github.com/huggingface/nlp/pull/540 Feel free to participate if you have some opinion on the scope of data which should be included in this dataset.
[ -0.34844112396240234, 0.3749223053455353, -0.022354725748300552, 0.24240729212760925, 0.23337355256080627, 0.05917973071336746, 0.2440313696861267, 0.4674775004386902, 0.25530850887298584, -0.14036871492862701, -0.06672588735818863, -0.09044574946165085, -0.3057553470134735, 0.1228693500161171, 0.05359365791082382, -0.008857935667037964, -0.09771131724119186, 0.03190863877534866, -0.18952760100364685, 0.056694395840168, -0.11616259813308716, -0.06432294100522995, -0.10317434370517731, 0.015848569571971893, -0.09173476696014404, -0.11988212913274765, 0.20697690546512604, 0.18997061252593994, -0.2297091782093048, -0.4579509198665619, 0.29750725626945496, 0.15182943642139435, 0.2854934632778168, 0.4001207947731018, -0.00011804338282672688, 0.11986832320690155, 0.4619453549385071, -0.08787781745195389, -0.48453202843666077, -0.311126172542572, -0.24440157413482666, -0.0946979969739914, 0.027988815680146217, -0.16255292296409607, -0.17545372247695923, 0.3403492867946625, 0.12001661956310272, -0.30931293964385986, 0.24259839951992035, 0.41590335965156555, 0.18145562708377838, 0.4850333631038666, -0.09837734699249268, 0.14193104207515717, 0.2775052487850189, 0.04056191444396973, -0.09773342311382294, 0.4429738521575928, 0.08838381618261337, -0.2895759046077728, -0.06818308681249619, 0.18272489309310913, -0.18681438267230988, 0.2293173223733902, 0.23732340335845947, -0.03105970472097397, 0.05004965141415596, -0.14728061854839325, 0.017266692593693733, 0.30445533990859985, 0.22847574949264526, -0.4627501666545868, -0.26277366280555725, -0.1982944905757904, -0.07209320366382599, -0.6634255051612854, 0.3091942071914673, 0.20114414393901825, -0.23901820182800293, -0.14253170788288116, -0.5278372764587402, 0.09062118828296661, -0.0025057345628738403, 0.11699523776769638, 0.17898784577846527, 0.41054269671440125, 0.24873730540275574, 0.10010027885437012, 0.12086102366447449, 0.0906592458486557, 0.15093423426151276, -0.238460510969162, -0.11240728199481964, 0.22808626294136047, -0.5045993328094482, -0.167716383934021, 0.16447176039218903, 0.18750356137752533, 0.03138522058725357, 0.37995725870132446, 0.14186906814575195, 0.0847267135977745, 0.07321252673864365, 0.09112634509801865, 0.22446967661380768, 0.13872608542442322, 0.1841387301683426, 0.2849820554256439, 0.38463497161865234, 0.171773299574852, 0.20626650750637054, 0.1484004259109497, -0.07115954905748367, -0.1690816581249237, 0.09673912823200226, 0.09956406056880951, -0.07241462916135788, -0.3175649046897888, -0.5501679182052612, 0.2802395522594452, 0.059162966907024384, -0.10879044979810715, 0.3846679925918579, 0.25689083337783813, -0.20694544911384583, -0.36978602409362793, 0.09914502501487732, 0.2307717353105545, -0.28127947449684143, -0.028578177094459534, -0.1864866316318512, 0.2175769805908203, -0.3917299509048462, -0.05313635617494583, 0.340781569480896, -0.05468301102519035, 0.393104612827301, -0.1745661050081253, 0.08942577987909317, 0.23510298132896423, 0.16521482169628143, -0.28333577513694763, -0.37273702025413513, 0.45117607712745667, 0.07212218642234802, -0.06092698872089386, 0.2574208974838257, -0.1946481317281723, -0.3575667142868042, -0.045344240963459015, -0.02272239327430725, -0.15415267646312714, -0.26946085691452026, 0.1336430311203003, -0.5319491624832153, -0.1265994906425476, -0.10478831082582474, -0.09807473421096802, 0.46590226888656616, -0.22180770337581635, 0.07207523286342621, -0.23559711873531342, -0.4272306561470032, -0.21139298379421234, 0.20537951588630676, 0.2566947340965271, -0.2136310189962387, -0.046541791409254074, -0.22151097655296326, -0.08493994176387787, 0.3301588296890259, 0.25363653898239136, -0.15344266593456268, 0.2487075924873352, -0.23720385134220123, 0.15973655879497528, 0.42824554443359375, -0.0966891422867775, -0.37750518321990967, 0.06357766687870026, 0.042048096656799316, 0.029366450384259224, -0.029479630291461945, 0.11225497722625732, -0.014248741790652275, -0.0672748014330864, 0.19054806232452393, 0.3296670913696289, -0.14359945058822632, -0.15678368508815765, -0.2640848457813263, 0.04020059108734131, 0.45298951864242554, 0.3493305444717407, 0.27533242106437683, -0.1353892982006073, 0.06522879749536514, 0.1668531745672226, 0.11538312584161758, 0.05736817419528961, 0.08876844495534897, 0.16630293428897858, 0.1947505921125412, -0.0009249597787857056, -0.3076634109020233, -0.19340366125106812, -0.42848509550094604, 0.29855209589004517, -0.4023682177066803, 0.34421831369400024, -0.005205854773521423, 0.11636482179164886, -0.2743449807167053, -0.0884462520480156, -0.07797923684120178, -0.03498121723532677, 0.055248238146305084, -0.036268122494220734, 0.11863680183887482, -0.15758129954338074, -0.12165966629981995, 0.45969468355178833, -0.3044731020927429, 0.030605139210820198, -0.2032380998134613, 0.558939516544342, -0.24940742552280426, -0.3483187258243561, 0.18164637684822083, 0.16782760620117188, -0.07485552877187729, -0.08874106407165527, -0.14644348621368408, 0.4584696590900421, 0.1846817433834076, -0.21150223910808563, 0.06761538982391357, 0.2728215157985687, 0.2086808979511261, 0.04574481025338173, 0.11333982646465302, 0.34857094287872314, -0.010380327701568604, -0.10622403025627136, -0.2250293791294098, 0.5668240785598755, -0.13564950227737427, 0.10987255722284317, -0.019480492919683456, 0.1030002236366272, 0.16478806734085083, -0.1018061712384224, -0.14664803445339203, -0.0287134051322937, 0.5365939140319824, 0.19544321298599243, 0.23871241509914398, 0.09663517773151398, -0.3509831726551056, -0.15099510550498962, 0.5099388957023621, 0.09742490947246552, 0.03750104457139969, 0.32718679308891296, 0.16450496017932892, -0.2205292284488678, 0.15254178643226624, 0.03627096489071846, 0.5619987845420837, 0.04485609754920006, -0.0008597299456596375, 0.31477224826812744, -0.3628350496292114, -0.05698217824101448, 0.06653134524822235, -0.15806680917739868, 0.3175261914730072, 0.3234219253063202, 0.05797530338168144, 0.06124774366617203, -0.3958384096622467, -0.22885052859783173, 0.10429241508245468, 0.49896907806396484, -0.2964092195034027, 0.06617459654808044, -0.32618895173072815, -0.11477735638618469, -0.08881616592407227, -0.1403394341468811, -0.5619559288024902, -0.22504936158657074, 0.0893946960568428, 0.3187950849533081, 0.0905735194683075, 0.3506728410720825, -0.4854868948459625, -0.008452564477920532, 0.12749192118644714, -0.31420812010765076, -0.012965630739927292, -0.15581637620925903, -0.2733369767665863, 0.03552570566534996, 0.7237204909324646, 0.09635528177022934, 0.38426175713539124, 0.05504655838012695, -0.2218772917985916, -0.049138203263282776, -0.3143675625324249, -0.022367514669895172, -0.22954581677913666, 0.338960736989975, 0.33197569847106934, 0.11001875251531601, -0.16040925681591034, -0.2559404969215393, 0.29941025376319885, -0.04354734718799591, -0.19576749205589294, 0.19448710978031158, -0.06588907539844513, -0.0019956224132329226, -0.1117202639579773, -0.012107796967029572, -0.1920270174741745, -0.22158180177211761, -0.1455167680978775, 0.19787289202213287, 0.32105857133865356, 0.31960242986679077, 0.029359180480241776, 0.15036359429359436, 0.0955185666680336, -0.028705013915896416, -0.17967292666435242, -0.3023669719696045, 0.35497087240219116, 0.06890799105167389, -0.4053298532962799, -0.2147282510995865, -0.10069292038679123, 0.23059312999248505, 0.10188798606395721, -0.5546714663505554, 0.13958409428596497, -0.03376389294862747, 0.09827661514282227, 0.16175943613052368, -0.018858959898352623, 0.4739736318588257, -0.03888576105237007, 0.056006208062171936, -0.19784551858901978, -0.24565063416957855, 0.13559143245220184, 0.16168168187141418, 0.656341016292572, -0.054541073739528656, 0.4591037333011627, -0.1254962980747223, 0.5254040360450745, 0.27985644340515137, -0.17634131014347076, 0.3539975583553314, 0.2002418488264084, 0.27365216612815857, -0.15349358320236206, -0.29143351316452026, 0.28552111983299255, -0.049538761377334595, -0.18259859085083008, 0.01159154623746872, -0.08290626108646393, -0.20050263404846191, -0.18693473935127258, 0.3586069941520691, -0.15216295421123505, -0.20322325825691223, 0.07590395957231522, -0.41920754313468933, 0.1117391586303711, 0.12383735179901123, 0.041789375245571136, -0.2293190062046051, -0.20974200963974, -0.03425142914056778, 0.3359273076057434, -0.02935531735420227, 0.034108687192201614, -0.5879097580909729, -0.20724597573280334, -0.27618876099586487, 0.3000997304916382, -0.02280256897211075, 0.508247971534729, -0.12710316479206085, -0.02217748388648033, 0.10229584574699402, -0.19119255244731903, 0.18797552585601807, -0.4306774139404297, 0.1604577600955963, 0.24858981370925903, 0.1959751397371292, -0.21747331321239471, -0.3243359327316284, -0.19718049466609955, 0.08993641287088394, 0.3619171679019928, 0.23904265463352203, -0.4133509695529938, -0.17956306040287018, 0.30761197209358215, -0.17722128331661224, -0.031756527721881866, -0.2116963416337967, -0.5768941640853882, -0.3119819164276123, -0.24553754925727844, 0.10727937519550323, -0.10115213692188263, 0.30959799885749817, -0.09589996188879013, 0.2520926296710968, 0.11115652322769165, 0.12002349644899368, 0.31183362007141113, -0.025878122076392174, 0.12496191263198853, 0.2003539502620697, 0.24292540550231934, -0.2824971377849579, -0.03049875795841217, 0.13725054264068604, 0.4655218720436096, -0.003039054572582245, 0.1497270166873932, 0.24621695280075073, 0.10327208042144775, 0.0787181630730629, 0.13542461395263672, 0.10898066312074661, 0.004826962947845459, 0.2942678928375244, 0.10802282392978668, -0.16814273595809937, 0.21240393817424774, 0.15131446719169617, -0.03763354942202568, -0.257049560546875, -0.4218555986881256, 0.38398271799087524, 0.09387697279453278, 0.07863110303878784, 0.5386751890182495, -0.1991012841463089, -0.22749143838882446, 0.1776130348443985, 0.4289579689502716, 0.7838948965072632, -0.04624692350625992, 0.05058927834033966, 0.2714208960533142, -0.38851964473724365, 0.17343159019947052, -0.12780776619911194, 0.21388424932956696, -0.41400811076164246, -0.2300037294626236, -0.11476030200719833, -0.23700708150863647, 0.28672054409980774, 0.0709187388420105, 0.02105090394616127, 0.2501493990421295, 0.06376709043979645, 0.21348240971565247, 0.047311216592788696, 0.3004763722419739, -0.2035636156797409, -0.0009062588214874268, -0.24380379915237427, 0.1599237024784088, -0.2949711084365845, 0.38419151306152344, -0.18277078866958618, -0.14167876541614532, -0.22529862821102142, -0.22979624569416046, -0.5931192636489868, 0.04207363724708557, -0.03454965353012085, 0.1219121664762497, 0.16120672225952148, -0.29703620076179504, 0.25363242626190186, -0.012544374912977219, 0.30524197220802307, 0.21494899690151215, -0.21897633373737335, 0.032076895236968994, 0.15962615609169006, 0.06327731162309647, 0.1346653550863266, 0.05774526298046112, 0.38575848937034607, -0.21142718195915222, -0.2823190987110138, -0.050300657749176025, -0.06938286870718002, -0.5146651268005371, 0.28684505820274353, -0.17235037684440613, 0.08005081862211227, -0.06218165531754494, -0.08365039527416229, 0.013984724879264832, 0.030454907566308975, -0.19595319032669067, 0.12615986168384552, 0.06693527102470398, -0.07483415305614471, 0.25189143419265747, -0.12572342157363892, -0.145521879196167, -0.19352097809314728, 0.3756963014602661, 0.13732698559761047, 0.016508616507053375, 0.4529261291027069, 0.2720402181148529, -0.1528954952955246, -0.23041841387748718, -0.10563923418521881, 0.17864146828651428, 0.024784564971923828, -0.014817711897194386, -0.1295316070318222, -0.08423911035060883, -0.18298642337322235, 0.11873934417963028, 0.2865351438522339, 0.09984201937913895, 0.29272961616516113, -0.5119158029556274, -0.500837504863739, 0.21920211613178253, -0.19762033224105835, 0.19259247183799744, -0.4042050540447235, 0.3515554666519165, -0.0026993323117494583, 0.005204550921916962, -0.29805055260658264, -0.17890556156635284, -0.46185222268104553, 0.11093533784151077, 0.07292626798152924, -0.20211732387542725, -0.056052353233098984, -0.18825988471508026, 0.11967451870441437, -0.1352253258228302, -0.39186495542526245, -0.1660434901714325, -0.1048925369977951, 0.15863268077373505, 0.008799846284091473, -0.35638850927352905, 0.1701889932155609, -0.14885090291500092, -0.2751871347427368, -0.015598665922880173, -0.22451667487621307, 0.008407332003116608, -0.05161077529191971, 0.15267160534858704, 0.2826908528804779, -0.022928595542907715, 0.015927042812108994, -0.1590150147676468, -0.1738787591457367, 0.05742880329489708, 0.022622020915150642, 0.1774999052286148, 0.18285156786441803, 0.04825466871261597, -0.21040675044059753, 0.11559082567691803, -0.10320267081260681, 0.0354527086019516, 0.2705412805080414, -0.3210698366165161, -0.11032538115978241, -0.005624228157103062, 0.4704589247703552, 0.5312496423721313, -0.12883226573467255, -0.19564397633075714, 0.2631404399871826, 0.1443779468536377, -0.49278658628463745, 0.09607472270727158, 0.10323348641395569, 0.08222409337759018, -0.05519691854715347, 0.13458992540836334, 0.19727280735969543, 0.2342779040336609, 0.017212025821208954, 0.17556437849998474, 0.16435517370700836, -0.24930690228939056, 0.07969200611114502, 0.3898661434650421, -0.08018765598535538, -0.0386279933154583, 0.3764920234680176, -0.1423220932483673, -0.01267128437757492, -0.03430818021297455, 0.10679085552692413, 0.2860962748527527, -0.19196343421936035, 0.053792525082826614, -0.4108021557331085, -0.4486483931541443, -0.1012226790189743, 0.3432515859603882, 0.003610961139202118, -0.019260689616203308, -0.027801379561424255, 0.2828315496444702, -0.18289615213871002, -0.057875555008649826, -0.22661474347114563, 0.10527901351451874, 0.02386452630162239, -0.07182084023952484, -0.4027283191680908, -0.12966862320899963, -0.22797159850597382, 0.1654793620109558, 0.0540967658162117, 0.12623806297779083, 0.30887365341186523, 0.10035088658332825, -0.21291930973529816, -0.32959094643592834, 0.11712585389614105, 0.3001697361469269, -0.3030855655670166, -0.27915334701538086, 0.3936848044395447, 0.21286585927009583, 0.015566322952508926, -0.22718405723571777, 0.3640894293785095, 0.32361704111099243, 0.3887958526611328, -0.25147899985313416, -0.2520092725753784, 0.07659713178873062, 0.029905790463089943, -0.08270549774169922, 0.49782103300094604, 0.3275834918022156, 0.09987244009971619, 0.20966650545597076, 0.07944726198911667, -0.09566184133291245, 0.196631520986557, -0.08401544392108917, -0.2941378057003021, 0.003598742187023163, 0.66038978099823, 0.17177657783031464, 0.0049779340624809265, -0.0732264369726181, 0.030812308192253113, -0.19097575545310974, -0.0409565195441246, 0.3082464933395386, 0.19755084812641144, 0.18334731459617615, -0.09985415637493134, 0.04419054090976715, -0.14104220271110535, 0.6444207429885864, 0.23497642576694489, 0.11403755843639374, -0.4878852963447571, -0.3304448425769806, -0.6936571598052979, -0.08192954212427139, -0.2694920301437378, -0.11176718026399612, 0.10536281764507294, 0.20483891665935516, -0.04462885111570358, 0.061834193766117096, 0.1968584805727005, 0.023293208330869675, -0.18391941487789154, -0.03172372281551361, -0.3047984838485718, 0.1097688376903534, -0.25892573595046997, 0.03148168325424194, -0.15424664318561554, -0.3109227120876312, 0.14406824111938477, 0.0020714495331048965, 0.03308291733264923, -0.11797523498535156, -0.03531460464000702, 0.2205830067396164, 0.31187233328819275, 0.2911403775215149, 0.0490066334605217, 0.6657664775848389, 0.11455970257520676, -0.13747572898864746, -0.36198487877845764, -0.1498401165008545, -0.4374692738056183, 0.14098960161209106, -0.1612320840358734, 0.6160258054733276, 0.033211857080459595, -0.13893626630306244, -0.3363068103790283, 0.5645506381988525, 0.09023940563201904, -0.34583333134651184, -0.08555883914232254, -0.03030369244515896, -0.17860263586044312, 0.23081430792808533, -0.04407994821667671, 0.004095062613487244, 0.2179861217737198, 0.45437031984329224, -0.4882110357284546, -0.16455356776714325, 0.5545018911361694, -0.07181645184755325, -0.27013176679611206, -0.1823340505361557, 0.15750551223754883, -0.09625934809446335, -0.16538254916667938, -0.7271353602409363, -0.026330485939979553, 0.2373393177986145, -0.1326826512813568, -0.26211732625961304, 0.23795285820960999, -0.11398620903491974, 0.1122620552778244, 0.053602587431669235, 0.21327054500579834, -0.33638593554496765, -0.33697509765625, -0.16340894997119904, -0.19360709190368652 ]
https://github.com/huggingface/datasets/issues/537
[Dataset] RACE dataset Checksums error
At least for me, the file that was downloaded from CMU isn't the complete dataset, but a small subset of it (~25MB vs ~85MB). I've previously downloaded the dataset directly, so for my personal needs I could just swap out the corrupted file with the correct one. Perhaps you could host it like you do for the Wikipedia and BookCorpus datasets.
Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ```
61
[Dataset] RACE dataset Checksums error Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ``` At least for me, the file that was downloaded from CMU isn't the complete dataset, but a small subset of it (~25MB vs ~85MB). I've previously downloaded the dataset directly, so for my personal needs I could just swap out the corrupted file with the correct one. Perhaps you could host it like you do for the Wikipedia and BookCorpus datasets.
[ -0.34844112396240234, 0.3749223053455353, -0.022354725748300552, 0.24240729212760925, 0.23337355256080627, 0.05917973071336746, 0.2440313696861267, 0.4674775004386902, 0.25530850887298584, -0.14036871492862701, -0.06672588735818863, -0.09044574946165085, -0.3057553470134735, 0.1228693500161171, 0.05359365791082382, -0.008857935667037964, -0.09771131724119186, 0.03190863877534866, -0.18952760100364685, 0.056694395840168, -0.11616259813308716, -0.06432294100522995, -0.10317434370517731, 0.015848569571971893, -0.09173476696014404, -0.11988212913274765, 0.20697690546512604, 0.18997061252593994, -0.2297091782093048, -0.4579509198665619, 0.29750725626945496, 0.15182943642139435, 0.2854934632778168, 0.4001207947731018, -0.00011804338282672688, 0.11986832320690155, 0.4619453549385071, -0.08787781745195389, -0.48453202843666077, -0.311126172542572, -0.24440157413482666, -0.0946979969739914, 0.027988815680146217, -0.16255292296409607, -0.17545372247695923, 0.3403492867946625, 0.12001661956310272, -0.30931293964385986, 0.24259839951992035, 0.41590335965156555, 0.18145562708377838, 0.4850333631038666, -0.09837734699249268, 0.14193104207515717, 0.2775052487850189, 0.04056191444396973, -0.09773342311382294, 0.4429738521575928, 0.08838381618261337, -0.2895759046077728, -0.06818308681249619, 0.18272489309310913, -0.18681438267230988, 0.2293173223733902, 0.23732340335845947, -0.03105970472097397, 0.05004965141415596, -0.14728061854839325, 0.017266692593693733, 0.30445533990859985, 0.22847574949264526, -0.4627501666545868, -0.26277366280555725, -0.1982944905757904, -0.07209320366382599, -0.6634255051612854, 0.3091942071914673, 0.20114414393901825, -0.23901820182800293, -0.14253170788288116, -0.5278372764587402, 0.09062118828296661, -0.0025057345628738403, 0.11699523776769638, 0.17898784577846527, 0.41054269671440125, 0.24873730540275574, 0.10010027885437012, 0.12086102366447449, 0.0906592458486557, 0.15093423426151276, -0.238460510969162, -0.11240728199481964, 0.22808626294136047, -0.5045993328094482, -0.167716383934021, 0.16447176039218903, 0.18750356137752533, 0.03138522058725357, 0.37995725870132446, 0.14186906814575195, 0.0847267135977745, 0.07321252673864365, 0.09112634509801865, 0.22446967661380768, 0.13872608542442322, 0.1841387301683426, 0.2849820554256439, 0.38463497161865234, 0.171773299574852, 0.20626650750637054, 0.1484004259109497, -0.07115954905748367, -0.1690816581249237, 0.09673912823200226, 0.09956406056880951, -0.07241462916135788, -0.3175649046897888, -0.5501679182052612, 0.2802395522594452, 0.059162966907024384, -0.10879044979810715, 0.3846679925918579, 0.25689083337783813, -0.20694544911384583, -0.36978602409362793, 0.09914502501487732, 0.2307717353105545, -0.28127947449684143, -0.028578177094459534, -0.1864866316318512, 0.2175769805908203, -0.3917299509048462, -0.05313635617494583, 0.340781569480896, -0.05468301102519035, 0.393104612827301, -0.1745661050081253, 0.08942577987909317, 0.23510298132896423, 0.16521482169628143, -0.28333577513694763, -0.37273702025413513, 0.45117607712745667, 0.07212218642234802, -0.06092698872089386, 0.2574208974838257, -0.1946481317281723, -0.3575667142868042, -0.045344240963459015, -0.02272239327430725, -0.15415267646312714, -0.26946085691452026, 0.1336430311203003, -0.5319491624832153, -0.1265994906425476, -0.10478831082582474, -0.09807473421096802, 0.46590226888656616, -0.22180770337581635, 0.07207523286342621, -0.23559711873531342, -0.4272306561470032, -0.21139298379421234, 0.20537951588630676, 0.2566947340965271, -0.2136310189962387, -0.046541791409254074, -0.22151097655296326, -0.08493994176387787, 0.3301588296890259, 0.25363653898239136, -0.15344266593456268, 0.2487075924873352, -0.23720385134220123, 0.15973655879497528, 0.42824554443359375, -0.0966891422867775, -0.37750518321990967, 0.06357766687870026, 0.042048096656799316, 0.029366450384259224, -0.029479630291461945, 0.11225497722625732, -0.014248741790652275, -0.0672748014330864, 0.19054806232452393, 0.3296670913696289, -0.14359945058822632, -0.15678368508815765, -0.2640848457813263, 0.04020059108734131, 0.45298951864242554, 0.3493305444717407, 0.27533242106437683, -0.1353892982006073, 0.06522879749536514, 0.1668531745672226, 0.11538312584161758, 0.05736817419528961, 0.08876844495534897, 0.16630293428897858, 0.1947505921125412, -0.0009249597787857056, -0.3076634109020233, -0.19340366125106812, -0.42848509550094604, 0.29855209589004517, -0.4023682177066803, 0.34421831369400024, -0.005205854773521423, 0.11636482179164886, -0.2743449807167053, -0.0884462520480156, -0.07797923684120178, -0.03498121723532677, 0.055248238146305084, -0.036268122494220734, 0.11863680183887482, -0.15758129954338074, -0.12165966629981995, 0.45969468355178833, -0.3044731020927429, 0.030605139210820198, -0.2032380998134613, 0.558939516544342, -0.24940742552280426, -0.3483187258243561, 0.18164637684822083, 0.16782760620117188, -0.07485552877187729, -0.08874106407165527, -0.14644348621368408, 0.4584696590900421, 0.1846817433834076, -0.21150223910808563, 0.06761538982391357, 0.2728215157985687, 0.2086808979511261, 0.04574481025338173, 0.11333982646465302, 0.34857094287872314, -0.010380327701568604, -0.10622403025627136, -0.2250293791294098, 0.5668240785598755, -0.13564950227737427, 0.10987255722284317, -0.019480492919683456, 0.1030002236366272, 0.16478806734085083, -0.1018061712384224, -0.14664803445339203, -0.0287134051322937, 0.5365939140319824, 0.19544321298599243, 0.23871241509914398, 0.09663517773151398, -0.3509831726551056, -0.15099510550498962, 0.5099388957023621, 0.09742490947246552, 0.03750104457139969, 0.32718679308891296, 0.16450496017932892, -0.2205292284488678, 0.15254178643226624, 0.03627096489071846, 0.5619987845420837, 0.04485609754920006, -0.0008597299456596375, 0.31477224826812744, -0.3628350496292114, -0.05698217824101448, 0.06653134524822235, -0.15806680917739868, 0.3175261914730072, 0.3234219253063202, 0.05797530338168144, 0.06124774366617203, -0.3958384096622467, -0.22885052859783173, 0.10429241508245468, 0.49896907806396484, -0.2964092195034027, 0.06617459654808044, -0.32618895173072815, -0.11477735638618469, -0.08881616592407227, -0.1403394341468811, -0.5619559288024902, -0.22504936158657074, 0.0893946960568428, 0.3187950849533081, 0.0905735194683075, 0.3506728410720825, -0.4854868948459625, -0.008452564477920532, 0.12749192118644714, -0.31420812010765076, -0.012965630739927292, -0.15581637620925903, -0.2733369767665863, 0.03552570566534996, 0.7237204909324646, 0.09635528177022934, 0.38426175713539124, 0.05504655838012695, -0.2218772917985916, -0.049138203263282776, -0.3143675625324249, -0.022367514669895172, -0.22954581677913666, 0.338960736989975, 0.33197569847106934, 0.11001875251531601, -0.16040925681591034, -0.2559404969215393, 0.29941025376319885, -0.04354734718799591, -0.19576749205589294, 0.19448710978031158, -0.06588907539844513, -0.0019956224132329226, -0.1117202639579773, -0.012107796967029572, -0.1920270174741745, -0.22158180177211761, -0.1455167680978775, 0.19787289202213287, 0.32105857133865356, 0.31960242986679077, 0.029359180480241776, 0.15036359429359436, 0.0955185666680336, -0.028705013915896416, -0.17967292666435242, -0.3023669719696045, 0.35497087240219116, 0.06890799105167389, -0.4053298532962799, -0.2147282510995865, -0.10069292038679123, 0.23059312999248505, 0.10188798606395721, -0.5546714663505554, 0.13958409428596497, -0.03376389294862747, 0.09827661514282227, 0.16175943613052368, -0.018858959898352623, 0.4739736318588257, -0.03888576105237007, 0.056006208062171936, -0.19784551858901978, -0.24565063416957855, 0.13559143245220184, 0.16168168187141418, 0.656341016292572, -0.054541073739528656, 0.4591037333011627, -0.1254962980747223, 0.5254040360450745, 0.27985644340515137, -0.17634131014347076, 0.3539975583553314, 0.2002418488264084, 0.27365216612815857, -0.15349358320236206, -0.29143351316452026, 0.28552111983299255, -0.049538761377334595, -0.18259859085083008, 0.01159154623746872, -0.08290626108646393, -0.20050263404846191, -0.18693473935127258, 0.3586069941520691, -0.15216295421123505, -0.20322325825691223, 0.07590395957231522, -0.41920754313468933, 0.1117391586303711, 0.12383735179901123, 0.041789375245571136, -0.2293190062046051, -0.20974200963974, -0.03425142914056778, 0.3359273076057434, -0.02935531735420227, 0.034108687192201614, -0.5879097580909729, -0.20724597573280334, -0.27618876099586487, 0.3000997304916382, -0.02280256897211075, 0.508247971534729, -0.12710316479206085, -0.02217748388648033, 0.10229584574699402, -0.19119255244731903, 0.18797552585601807, -0.4306774139404297, 0.1604577600955963, 0.24858981370925903, 0.1959751397371292, -0.21747331321239471, -0.3243359327316284, -0.19718049466609955, 0.08993641287088394, 0.3619171679019928, 0.23904265463352203, -0.4133509695529938, -0.17956306040287018, 0.30761197209358215, -0.17722128331661224, -0.031756527721881866, -0.2116963416337967, -0.5768941640853882, -0.3119819164276123, -0.24553754925727844, 0.10727937519550323, -0.10115213692188263, 0.30959799885749817, -0.09589996188879013, 0.2520926296710968, 0.11115652322769165, 0.12002349644899368, 0.31183362007141113, -0.025878122076392174, 0.12496191263198853, 0.2003539502620697, 0.24292540550231934, -0.2824971377849579, -0.03049875795841217, 0.13725054264068604, 0.4655218720436096, -0.003039054572582245, 0.1497270166873932, 0.24621695280075073, 0.10327208042144775, 0.0787181630730629, 0.13542461395263672, 0.10898066312074661, 0.004826962947845459, 0.2942678928375244, 0.10802282392978668, -0.16814273595809937, 0.21240393817424774, 0.15131446719169617, -0.03763354942202568, -0.257049560546875, -0.4218555986881256, 0.38398271799087524, 0.09387697279453278, 0.07863110303878784, 0.5386751890182495, -0.1991012841463089, -0.22749143838882446, 0.1776130348443985, 0.4289579689502716, 0.7838948965072632, -0.04624692350625992, 0.05058927834033966, 0.2714208960533142, -0.38851964473724365, 0.17343159019947052, -0.12780776619911194, 0.21388424932956696, -0.41400811076164246, -0.2300037294626236, -0.11476030200719833, -0.23700708150863647, 0.28672054409980774, 0.0709187388420105, 0.02105090394616127, 0.2501493990421295, 0.06376709043979645, 0.21348240971565247, 0.047311216592788696, 0.3004763722419739, -0.2035636156797409, -0.0009062588214874268, -0.24380379915237427, 0.1599237024784088, -0.2949711084365845, 0.38419151306152344, -0.18277078866958618, -0.14167876541614532, -0.22529862821102142, -0.22979624569416046, -0.5931192636489868, 0.04207363724708557, -0.03454965353012085, 0.1219121664762497, 0.16120672225952148, -0.29703620076179504, 0.25363242626190186, -0.012544374912977219, 0.30524197220802307, 0.21494899690151215, -0.21897633373737335, 0.032076895236968994, 0.15962615609169006, 0.06327731162309647, 0.1346653550863266, 0.05774526298046112, 0.38575848937034607, -0.21142718195915222, -0.2823190987110138, -0.050300657749176025, -0.06938286870718002, -0.5146651268005371, 0.28684505820274353, -0.17235037684440613, 0.08005081862211227, -0.06218165531754494, -0.08365039527416229, 0.013984724879264832, 0.030454907566308975, -0.19595319032669067, 0.12615986168384552, 0.06693527102470398, -0.07483415305614471, 0.25189143419265747, -0.12572342157363892, -0.145521879196167, -0.19352097809314728, 0.3756963014602661, 0.13732698559761047, 0.016508616507053375, 0.4529261291027069, 0.2720402181148529, -0.1528954952955246, -0.23041841387748718, -0.10563923418521881, 0.17864146828651428, 0.024784564971923828, -0.014817711897194386, -0.1295316070318222, -0.08423911035060883, -0.18298642337322235, 0.11873934417963028, 0.2865351438522339, 0.09984201937913895, 0.29272961616516113, -0.5119158029556274, -0.500837504863739, 0.21920211613178253, -0.19762033224105835, 0.19259247183799744, -0.4042050540447235, 0.3515554666519165, -0.0026993323117494583, 0.005204550921916962, -0.29805055260658264, -0.17890556156635284, -0.46185222268104553, 0.11093533784151077, 0.07292626798152924, -0.20211732387542725, -0.056052353233098984, -0.18825988471508026, 0.11967451870441437, -0.1352253258228302, -0.39186495542526245, -0.1660434901714325, -0.1048925369977951, 0.15863268077373505, 0.008799846284091473, -0.35638850927352905, 0.1701889932155609, -0.14885090291500092, -0.2751871347427368, -0.015598665922880173, -0.22451667487621307, 0.008407332003116608, -0.05161077529191971, 0.15267160534858704, 0.2826908528804779, -0.022928595542907715, 0.015927042812108994, -0.1590150147676468, -0.1738787591457367, 0.05742880329489708, 0.022622020915150642, 0.1774999052286148, 0.18285156786441803, 0.04825466871261597, -0.21040675044059753, 0.11559082567691803, -0.10320267081260681, 0.0354527086019516, 0.2705412805080414, -0.3210698366165161, -0.11032538115978241, -0.005624228157103062, 0.4704589247703552, 0.5312496423721313, -0.12883226573467255, -0.19564397633075714, 0.2631404399871826, 0.1443779468536377, -0.49278658628463745, 0.09607472270727158, 0.10323348641395569, 0.08222409337759018, -0.05519691854715347, 0.13458992540836334, 0.19727280735969543, 0.2342779040336609, 0.017212025821208954, 0.17556437849998474, 0.16435517370700836, -0.24930690228939056, 0.07969200611114502, 0.3898661434650421, -0.08018765598535538, -0.0386279933154583, 0.3764920234680176, -0.1423220932483673, -0.01267128437757492, -0.03430818021297455, 0.10679085552692413, 0.2860962748527527, -0.19196343421936035, 0.053792525082826614, -0.4108021557331085, -0.4486483931541443, -0.1012226790189743, 0.3432515859603882, 0.003610961139202118, -0.019260689616203308, -0.027801379561424255, 0.2828315496444702, -0.18289615213871002, -0.057875555008649826, -0.22661474347114563, 0.10527901351451874, 0.02386452630162239, -0.07182084023952484, -0.4027283191680908, -0.12966862320899963, -0.22797159850597382, 0.1654793620109558, 0.0540967658162117, 0.12623806297779083, 0.30887365341186523, 0.10035088658332825, -0.21291930973529816, -0.32959094643592834, 0.11712585389614105, 0.3001697361469269, -0.3030855655670166, -0.27915334701538086, 0.3936848044395447, 0.21286585927009583, 0.015566322952508926, -0.22718405723571777, 0.3640894293785095, 0.32361704111099243, 0.3887958526611328, -0.25147899985313416, -0.2520092725753784, 0.07659713178873062, 0.029905790463089943, -0.08270549774169922, 0.49782103300094604, 0.3275834918022156, 0.09987244009971619, 0.20966650545597076, 0.07944726198911667, -0.09566184133291245, 0.196631520986557, -0.08401544392108917, -0.2941378057003021, 0.003598742187023163, 0.66038978099823, 0.17177657783031464, 0.0049779340624809265, -0.0732264369726181, 0.030812308192253113, -0.19097575545310974, -0.0409565195441246, 0.3082464933395386, 0.19755084812641144, 0.18334731459617615, -0.09985415637493134, 0.04419054090976715, -0.14104220271110535, 0.6444207429885864, 0.23497642576694489, 0.11403755843639374, -0.4878852963447571, -0.3304448425769806, -0.6936571598052979, -0.08192954212427139, -0.2694920301437378, -0.11176718026399612, 0.10536281764507294, 0.20483891665935516, -0.04462885111570358, 0.061834193766117096, 0.1968584805727005, 0.023293208330869675, -0.18391941487789154, -0.03172372281551361, -0.3047984838485718, 0.1097688376903534, -0.25892573595046997, 0.03148168325424194, -0.15424664318561554, -0.3109227120876312, 0.14406824111938477, 0.0020714495331048965, 0.03308291733264923, -0.11797523498535156, -0.03531460464000702, 0.2205830067396164, 0.31187233328819275, 0.2911403775215149, 0.0490066334605217, 0.6657664775848389, 0.11455970257520676, -0.13747572898864746, -0.36198487877845764, -0.1498401165008545, -0.4374692738056183, 0.14098960161209106, -0.1612320840358734, 0.6160258054733276, 0.033211857080459595, -0.13893626630306244, -0.3363068103790283, 0.5645506381988525, 0.09023940563201904, -0.34583333134651184, -0.08555883914232254, -0.03030369244515896, -0.17860263586044312, 0.23081430792808533, -0.04407994821667671, 0.004095062613487244, 0.2179861217737198, 0.45437031984329224, -0.4882110357284546, -0.16455356776714325, 0.5545018911361694, -0.07181645184755325, -0.27013176679611206, -0.1823340505361557, 0.15750551223754883, -0.09625934809446335, -0.16538254916667938, -0.7271353602409363, -0.026330485939979553, 0.2373393177986145, -0.1326826512813568, -0.26211732625961304, 0.23795285820960999, -0.11398620903491974, 0.1122620552778244, 0.053602587431669235, 0.21327054500579834, -0.33638593554496765, -0.33697509765625, -0.16340894997119904, -0.19360709190368652 ]
https://github.com/huggingface/datasets/issues/537
[Dataset] RACE dataset Checksums error
> At least for me, the file that was downloaded from CMU isn't the complete dataset, but a small subset of it (~25MB vs ~85MB). I've previously downloaded the dataset directly, so for my personal needs I could just swap out the corrupted file with the correct one. Perhaps you could host it like you do for the Wikipedia and BookCorpus datasets. Could you upload this please?
Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ```
67
[Dataset] RACE dataset Checksums error Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ``` > At least for me, the file that was downloaded from CMU isn't the complete dataset, but a small subset of it (~25MB vs ~85MB). I've previously downloaded the dataset directly, so for my personal needs I could just swap out the corrupted file with the correct one. Perhaps you could host it like you do for the Wikipedia and BookCorpus datasets. Could you upload this please?
[ -0.34844112396240234, 0.3749223053455353, -0.022354725748300552, 0.24240729212760925, 0.23337355256080627, 0.05917973071336746, 0.2440313696861267, 0.4674775004386902, 0.25530850887298584, -0.14036871492862701, -0.06672588735818863, -0.09044574946165085, -0.3057553470134735, 0.1228693500161171, 0.05359365791082382, -0.008857935667037964, -0.09771131724119186, 0.03190863877534866, -0.18952760100364685, 0.056694395840168, -0.11616259813308716, -0.06432294100522995, -0.10317434370517731, 0.015848569571971893, -0.09173476696014404, -0.11988212913274765, 0.20697690546512604, 0.18997061252593994, -0.2297091782093048, -0.4579509198665619, 0.29750725626945496, 0.15182943642139435, 0.2854934632778168, 0.4001207947731018, -0.00011804338282672688, 0.11986832320690155, 0.4619453549385071, -0.08787781745195389, -0.48453202843666077, -0.311126172542572, -0.24440157413482666, -0.0946979969739914, 0.027988815680146217, -0.16255292296409607, -0.17545372247695923, 0.3403492867946625, 0.12001661956310272, -0.30931293964385986, 0.24259839951992035, 0.41590335965156555, 0.18145562708377838, 0.4850333631038666, -0.09837734699249268, 0.14193104207515717, 0.2775052487850189, 0.04056191444396973, -0.09773342311382294, 0.4429738521575928, 0.08838381618261337, -0.2895759046077728, -0.06818308681249619, 0.18272489309310913, -0.18681438267230988, 0.2293173223733902, 0.23732340335845947, -0.03105970472097397, 0.05004965141415596, -0.14728061854839325, 0.017266692593693733, 0.30445533990859985, 0.22847574949264526, -0.4627501666545868, -0.26277366280555725, -0.1982944905757904, -0.07209320366382599, -0.6634255051612854, 0.3091942071914673, 0.20114414393901825, -0.23901820182800293, -0.14253170788288116, -0.5278372764587402, 0.09062118828296661, -0.0025057345628738403, 0.11699523776769638, 0.17898784577846527, 0.41054269671440125, 0.24873730540275574, 0.10010027885437012, 0.12086102366447449, 0.0906592458486557, 0.15093423426151276, -0.238460510969162, -0.11240728199481964, 0.22808626294136047, -0.5045993328094482, -0.167716383934021, 0.16447176039218903, 0.18750356137752533, 0.03138522058725357, 0.37995725870132446, 0.14186906814575195, 0.0847267135977745, 0.07321252673864365, 0.09112634509801865, 0.22446967661380768, 0.13872608542442322, 0.1841387301683426, 0.2849820554256439, 0.38463497161865234, 0.171773299574852, 0.20626650750637054, 0.1484004259109497, -0.07115954905748367, -0.1690816581249237, 0.09673912823200226, 0.09956406056880951, -0.07241462916135788, -0.3175649046897888, -0.5501679182052612, 0.2802395522594452, 0.059162966907024384, -0.10879044979810715, 0.3846679925918579, 0.25689083337783813, -0.20694544911384583, -0.36978602409362793, 0.09914502501487732, 0.2307717353105545, -0.28127947449684143, -0.028578177094459534, -0.1864866316318512, 0.2175769805908203, -0.3917299509048462, -0.05313635617494583, 0.340781569480896, -0.05468301102519035, 0.393104612827301, -0.1745661050081253, 0.08942577987909317, 0.23510298132896423, 0.16521482169628143, -0.28333577513694763, -0.37273702025413513, 0.45117607712745667, 0.07212218642234802, -0.06092698872089386, 0.2574208974838257, -0.1946481317281723, -0.3575667142868042, -0.045344240963459015, -0.02272239327430725, -0.15415267646312714, -0.26946085691452026, 0.1336430311203003, -0.5319491624832153, -0.1265994906425476, -0.10478831082582474, -0.09807473421096802, 0.46590226888656616, -0.22180770337581635, 0.07207523286342621, -0.23559711873531342, -0.4272306561470032, -0.21139298379421234, 0.20537951588630676, 0.2566947340965271, -0.2136310189962387, -0.046541791409254074, -0.22151097655296326, -0.08493994176387787, 0.3301588296890259, 0.25363653898239136, -0.15344266593456268, 0.2487075924873352, -0.23720385134220123, 0.15973655879497528, 0.42824554443359375, -0.0966891422867775, -0.37750518321990967, 0.06357766687870026, 0.042048096656799316, 0.029366450384259224, -0.029479630291461945, 0.11225497722625732, -0.014248741790652275, -0.0672748014330864, 0.19054806232452393, 0.3296670913696289, -0.14359945058822632, -0.15678368508815765, -0.2640848457813263, 0.04020059108734131, 0.45298951864242554, 0.3493305444717407, 0.27533242106437683, -0.1353892982006073, 0.06522879749536514, 0.1668531745672226, 0.11538312584161758, 0.05736817419528961, 0.08876844495534897, 0.16630293428897858, 0.1947505921125412, -0.0009249597787857056, -0.3076634109020233, -0.19340366125106812, -0.42848509550094604, 0.29855209589004517, -0.4023682177066803, 0.34421831369400024, -0.005205854773521423, 0.11636482179164886, -0.2743449807167053, -0.0884462520480156, -0.07797923684120178, -0.03498121723532677, 0.055248238146305084, -0.036268122494220734, 0.11863680183887482, -0.15758129954338074, -0.12165966629981995, 0.45969468355178833, -0.3044731020927429, 0.030605139210820198, -0.2032380998134613, 0.558939516544342, -0.24940742552280426, -0.3483187258243561, 0.18164637684822083, 0.16782760620117188, -0.07485552877187729, -0.08874106407165527, -0.14644348621368408, 0.4584696590900421, 0.1846817433834076, -0.21150223910808563, 0.06761538982391357, 0.2728215157985687, 0.2086808979511261, 0.04574481025338173, 0.11333982646465302, 0.34857094287872314, -0.010380327701568604, -0.10622403025627136, -0.2250293791294098, 0.5668240785598755, -0.13564950227737427, 0.10987255722284317, -0.019480492919683456, 0.1030002236366272, 0.16478806734085083, -0.1018061712384224, -0.14664803445339203, -0.0287134051322937, 0.5365939140319824, 0.19544321298599243, 0.23871241509914398, 0.09663517773151398, -0.3509831726551056, -0.15099510550498962, 0.5099388957023621, 0.09742490947246552, 0.03750104457139969, 0.32718679308891296, 0.16450496017932892, -0.2205292284488678, 0.15254178643226624, 0.03627096489071846, 0.5619987845420837, 0.04485609754920006, -0.0008597299456596375, 0.31477224826812744, -0.3628350496292114, -0.05698217824101448, 0.06653134524822235, -0.15806680917739868, 0.3175261914730072, 0.3234219253063202, 0.05797530338168144, 0.06124774366617203, -0.3958384096622467, -0.22885052859783173, 0.10429241508245468, 0.49896907806396484, -0.2964092195034027, 0.06617459654808044, -0.32618895173072815, -0.11477735638618469, -0.08881616592407227, -0.1403394341468811, -0.5619559288024902, -0.22504936158657074, 0.0893946960568428, 0.3187950849533081, 0.0905735194683075, 0.3506728410720825, -0.4854868948459625, -0.008452564477920532, 0.12749192118644714, -0.31420812010765076, -0.012965630739927292, -0.15581637620925903, -0.2733369767665863, 0.03552570566534996, 0.7237204909324646, 0.09635528177022934, 0.38426175713539124, 0.05504655838012695, -0.2218772917985916, -0.049138203263282776, -0.3143675625324249, -0.022367514669895172, -0.22954581677913666, 0.338960736989975, 0.33197569847106934, 0.11001875251531601, -0.16040925681591034, -0.2559404969215393, 0.29941025376319885, -0.04354734718799591, -0.19576749205589294, 0.19448710978031158, -0.06588907539844513, -0.0019956224132329226, -0.1117202639579773, -0.012107796967029572, -0.1920270174741745, -0.22158180177211761, -0.1455167680978775, 0.19787289202213287, 0.32105857133865356, 0.31960242986679077, 0.029359180480241776, 0.15036359429359436, 0.0955185666680336, -0.028705013915896416, -0.17967292666435242, -0.3023669719696045, 0.35497087240219116, 0.06890799105167389, -0.4053298532962799, -0.2147282510995865, -0.10069292038679123, 0.23059312999248505, 0.10188798606395721, -0.5546714663505554, 0.13958409428596497, -0.03376389294862747, 0.09827661514282227, 0.16175943613052368, -0.018858959898352623, 0.4739736318588257, -0.03888576105237007, 0.056006208062171936, -0.19784551858901978, -0.24565063416957855, 0.13559143245220184, 0.16168168187141418, 0.656341016292572, -0.054541073739528656, 0.4591037333011627, -0.1254962980747223, 0.5254040360450745, 0.27985644340515137, -0.17634131014347076, 0.3539975583553314, 0.2002418488264084, 0.27365216612815857, -0.15349358320236206, -0.29143351316452026, 0.28552111983299255, -0.049538761377334595, -0.18259859085083008, 0.01159154623746872, -0.08290626108646393, -0.20050263404846191, -0.18693473935127258, 0.3586069941520691, -0.15216295421123505, -0.20322325825691223, 0.07590395957231522, -0.41920754313468933, 0.1117391586303711, 0.12383735179901123, 0.041789375245571136, -0.2293190062046051, -0.20974200963974, -0.03425142914056778, 0.3359273076057434, -0.02935531735420227, 0.034108687192201614, -0.5879097580909729, -0.20724597573280334, -0.27618876099586487, 0.3000997304916382, -0.02280256897211075, 0.508247971534729, -0.12710316479206085, -0.02217748388648033, 0.10229584574699402, -0.19119255244731903, 0.18797552585601807, -0.4306774139404297, 0.1604577600955963, 0.24858981370925903, 0.1959751397371292, -0.21747331321239471, -0.3243359327316284, -0.19718049466609955, 0.08993641287088394, 0.3619171679019928, 0.23904265463352203, -0.4133509695529938, -0.17956306040287018, 0.30761197209358215, -0.17722128331661224, -0.031756527721881866, -0.2116963416337967, -0.5768941640853882, -0.3119819164276123, -0.24553754925727844, 0.10727937519550323, -0.10115213692188263, 0.30959799885749817, -0.09589996188879013, 0.2520926296710968, 0.11115652322769165, 0.12002349644899368, 0.31183362007141113, -0.025878122076392174, 0.12496191263198853, 0.2003539502620697, 0.24292540550231934, -0.2824971377849579, -0.03049875795841217, 0.13725054264068604, 0.4655218720436096, -0.003039054572582245, 0.1497270166873932, 0.24621695280075073, 0.10327208042144775, 0.0787181630730629, 0.13542461395263672, 0.10898066312074661, 0.004826962947845459, 0.2942678928375244, 0.10802282392978668, -0.16814273595809937, 0.21240393817424774, 0.15131446719169617, -0.03763354942202568, -0.257049560546875, -0.4218555986881256, 0.38398271799087524, 0.09387697279453278, 0.07863110303878784, 0.5386751890182495, -0.1991012841463089, -0.22749143838882446, 0.1776130348443985, 0.4289579689502716, 0.7838948965072632, -0.04624692350625992, 0.05058927834033966, 0.2714208960533142, -0.38851964473724365, 0.17343159019947052, -0.12780776619911194, 0.21388424932956696, -0.41400811076164246, -0.2300037294626236, -0.11476030200719833, -0.23700708150863647, 0.28672054409980774, 0.0709187388420105, 0.02105090394616127, 0.2501493990421295, 0.06376709043979645, 0.21348240971565247, 0.047311216592788696, 0.3004763722419739, -0.2035636156797409, -0.0009062588214874268, -0.24380379915237427, 0.1599237024784088, -0.2949711084365845, 0.38419151306152344, -0.18277078866958618, -0.14167876541614532, -0.22529862821102142, -0.22979624569416046, -0.5931192636489868, 0.04207363724708557, -0.03454965353012085, 0.1219121664762497, 0.16120672225952148, -0.29703620076179504, 0.25363242626190186, -0.012544374912977219, 0.30524197220802307, 0.21494899690151215, -0.21897633373737335, 0.032076895236968994, 0.15962615609169006, 0.06327731162309647, 0.1346653550863266, 0.05774526298046112, 0.38575848937034607, -0.21142718195915222, -0.2823190987110138, -0.050300657749176025, -0.06938286870718002, -0.5146651268005371, 0.28684505820274353, -0.17235037684440613, 0.08005081862211227, -0.06218165531754494, -0.08365039527416229, 0.013984724879264832, 0.030454907566308975, -0.19595319032669067, 0.12615986168384552, 0.06693527102470398, -0.07483415305614471, 0.25189143419265747, -0.12572342157363892, -0.145521879196167, -0.19352097809314728, 0.3756963014602661, 0.13732698559761047, 0.016508616507053375, 0.4529261291027069, 0.2720402181148529, -0.1528954952955246, -0.23041841387748718, -0.10563923418521881, 0.17864146828651428, 0.024784564971923828, -0.014817711897194386, -0.1295316070318222, -0.08423911035060883, -0.18298642337322235, 0.11873934417963028, 0.2865351438522339, 0.09984201937913895, 0.29272961616516113, -0.5119158029556274, -0.500837504863739, 0.21920211613178253, -0.19762033224105835, 0.19259247183799744, -0.4042050540447235, 0.3515554666519165, -0.0026993323117494583, 0.005204550921916962, -0.29805055260658264, -0.17890556156635284, -0.46185222268104553, 0.11093533784151077, 0.07292626798152924, -0.20211732387542725, -0.056052353233098984, -0.18825988471508026, 0.11967451870441437, -0.1352253258228302, -0.39186495542526245, -0.1660434901714325, -0.1048925369977951, 0.15863268077373505, 0.008799846284091473, -0.35638850927352905, 0.1701889932155609, -0.14885090291500092, -0.2751871347427368, -0.015598665922880173, -0.22451667487621307, 0.008407332003116608, -0.05161077529191971, 0.15267160534858704, 0.2826908528804779, -0.022928595542907715, 0.015927042812108994, -0.1590150147676468, -0.1738787591457367, 0.05742880329489708, 0.022622020915150642, 0.1774999052286148, 0.18285156786441803, 0.04825466871261597, -0.21040675044059753, 0.11559082567691803, -0.10320267081260681, 0.0354527086019516, 0.2705412805080414, -0.3210698366165161, -0.11032538115978241, -0.005624228157103062, 0.4704589247703552, 0.5312496423721313, -0.12883226573467255, -0.19564397633075714, 0.2631404399871826, 0.1443779468536377, -0.49278658628463745, 0.09607472270727158, 0.10323348641395569, 0.08222409337759018, -0.05519691854715347, 0.13458992540836334, 0.19727280735969543, 0.2342779040336609, 0.017212025821208954, 0.17556437849998474, 0.16435517370700836, -0.24930690228939056, 0.07969200611114502, 0.3898661434650421, -0.08018765598535538, -0.0386279933154583, 0.3764920234680176, -0.1423220932483673, -0.01267128437757492, -0.03430818021297455, 0.10679085552692413, 0.2860962748527527, -0.19196343421936035, 0.053792525082826614, -0.4108021557331085, -0.4486483931541443, -0.1012226790189743, 0.3432515859603882, 0.003610961139202118, -0.019260689616203308, -0.027801379561424255, 0.2828315496444702, -0.18289615213871002, -0.057875555008649826, -0.22661474347114563, 0.10527901351451874, 0.02386452630162239, -0.07182084023952484, -0.4027283191680908, -0.12966862320899963, -0.22797159850597382, 0.1654793620109558, 0.0540967658162117, 0.12623806297779083, 0.30887365341186523, 0.10035088658332825, -0.21291930973529816, -0.32959094643592834, 0.11712585389614105, 0.3001697361469269, -0.3030855655670166, -0.27915334701538086, 0.3936848044395447, 0.21286585927009583, 0.015566322952508926, -0.22718405723571777, 0.3640894293785095, 0.32361704111099243, 0.3887958526611328, -0.25147899985313416, -0.2520092725753784, 0.07659713178873062, 0.029905790463089943, -0.08270549774169922, 0.49782103300094604, 0.3275834918022156, 0.09987244009971619, 0.20966650545597076, 0.07944726198911667, -0.09566184133291245, 0.196631520986557, -0.08401544392108917, -0.2941378057003021, 0.003598742187023163, 0.66038978099823, 0.17177657783031464, 0.0049779340624809265, -0.0732264369726181, 0.030812308192253113, -0.19097575545310974, -0.0409565195441246, 0.3082464933395386, 0.19755084812641144, 0.18334731459617615, -0.09985415637493134, 0.04419054090976715, -0.14104220271110535, 0.6444207429885864, 0.23497642576694489, 0.11403755843639374, -0.4878852963447571, -0.3304448425769806, -0.6936571598052979, -0.08192954212427139, -0.2694920301437378, -0.11176718026399612, 0.10536281764507294, 0.20483891665935516, -0.04462885111570358, 0.061834193766117096, 0.1968584805727005, 0.023293208330869675, -0.18391941487789154, -0.03172372281551361, -0.3047984838485718, 0.1097688376903534, -0.25892573595046997, 0.03148168325424194, -0.15424664318561554, -0.3109227120876312, 0.14406824111938477, 0.0020714495331048965, 0.03308291733264923, -0.11797523498535156, -0.03531460464000702, 0.2205830067396164, 0.31187233328819275, 0.2911403775215149, 0.0490066334605217, 0.6657664775848389, 0.11455970257520676, -0.13747572898864746, -0.36198487877845764, -0.1498401165008545, -0.4374692738056183, 0.14098960161209106, -0.1612320840358734, 0.6160258054733276, 0.033211857080459595, -0.13893626630306244, -0.3363068103790283, 0.5645506381988525, 0.09023940563201904, -0.34583333134651184, -0.08555883914232254, -0.03030369244515896, -0.17860263586044312, 0.23081430792808533, -0.04407994821667671, 0.004095062613487244, 0.2179861217737198, 0.45437031984329224, -0.4882110357284546, -0.16455356776714325, 0.5545018911361694, -0.07181645184755325, -0.27013176679611206, -0.1823340505361557, 0.15750551223754883, -0.09625934809446335, -0.16538254916667938, -0.7271353602409363, -0.026330485939979553, 0.2373393177986145, -0.1326826512813568, -0.26211732625961304, 0.23795285820960999, -0.11398620903491974, 0.1122620552778244, 0.053602587431669235, 0.21327054500579834, -0.33638593554496765, -0.33697509765625, -0.16340894997119904, -0.19360709190368652 ]
https://github.com/huggingface/datasets/issues/537
[Dataset] RACE dataset Checksums error
> > At least for me, the file that was downloaded from CMU isn't the complete dataset, but a small subset of it (~25MB vs ~85MB). I've previously downloaded the dataset directly, so for my personal needs I could just swap out the corrupted file with the correct one. Perhaps you could host it like you do for the Wikipedia and BookCorpus datasets. > > Could you upload this please? Not sure if I can upload it according to their license ("You agree not to reproduce, duplicate, copy, sell, trade, resell or exploit for any commercial purpose, any portion of the contexts and any portion of derived data.").
Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ```
108
[Dataset] RACE dataset Checksums error Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ``` > > At least for me, the file that was downloaded from CMU isn't the complete dataset, but a small subset of it (~25MB vs ~85MB). I've previously downloaded the dataset directly, so for my personal needs I could just swap out the corrupted file with the correct one. Perhaps you could host it like you do for the Wikipedia and BookCorpus datasets. > > Could you upload this please? Not sure if I can upload it according to their license ("You agree not to reproduce, duplicate, copy, sell, trade, resell or exploit for any commercial purpose, any portion of the contexts and any portion of derived data.").
[ -0.34844112396240234, 0.3749223053455353, -0.022354725748300552, 0.24240729212760925, 0.23337355256080627, 0.05917973071336746, 0.2440313696861267, 0.4674775004386902, 0.25530850887298584, -0.14036871492862701, -0.06672588735818863, -0.09044574946165085, -0.3057553470134735, 0.1228693500161171, 0.05359365791082382, -0.008857935667037964, -0.09771131724119186, 0.03190863877534866, -0.18952760100364685, 0.056694395840168, -0.11616259813308716, -0.06432294100522995, -0.10317434370517731, 0.015848569571971893, -0.09173476696014404, -0.11988212913274765, 0.20697690546512604, 0.18997061252593994, -0.2297091782093048, -0.4579509198665619, 0.29750725626945496, 0.15182943642139435, 0.2854934632778168, 0.4001207947731018, -0.00011804338282672688, 0.11986832320690155, 0.4619453549385071, -0.08787781745195389, -0.48453202843666077, -0.311126172542572, -0.24440157413482666, -0.0946979969739914, 0.027988815680146217, -0.16255292296409607, -0.17545372247695923, 0.3403492867946625, 0.12001661956310272, -0.30931293964385986, 0.24259839951992035, 0.41590335965156555, 0.18145562708377838, 0.4850333631038666, -0.09837734699249268, 0.14193104207515717, 0.2775052487850189, 0.04056191444396973, -0.09773342311382294, 0.4429738521575928, 0.08838381618261337, -0.2895759046077728, -0.06818308681249619, 0.18272489309310913, -0.18681438267230988, 0.2293173223733902, 0.23732340335845947, -0.03105970472097397, 0.05004965141415596, -0.14728061854839325, 0.017266692593693733, 0.30445533990859985, 0.22847574949264526, -0.4627501666545868, -0.26277366280555725, -0.1982944905757904, -0.07209320366382599, -0.6634255051612854, 0.3091942071914673, 0.20114414393901825, -0.23901820182800293, -0.14253170788288116, -0.5278372764587402, 0.09062118828296661, -0.0025057345628738403, 0.11699523776769638, 0.17898784577846527, 0.41054269671440125, 0.24873730540275574, 0.10010027885437012, 0.12086102366447449, 0.0906592458486557, 0.15093423426151276, -0.238460510969162, -0.11240728199481964, 0.22808626294136047, -0.5045993328094482, -0.167716383934021, 0.16447176039218903, 0.18750356137752533, 0.03138522058725357, 0.37995725870132446, 0.14186906814575195, 0.0847267135977745, 0.07321252673864365, 0.09112634509801865, 0.22446967661380768, 0.13872608542442322, 0.1841387301683426, 0.2849820554256439, 0.38463497161865234, 0.171773299574852, 0.20626650750637054, 0.1484004259109497, -0.07115954905748367, -0.1690816581249237, 0.09673912823200226, 0.09956406056880951, -0.07241462916135788, -0.3175649046897888, -0.5501679182052612, 0.2802395522594452, 0.059162966907024384, -0.10879044979810715, 0.3846679925918579, 0.25689083337783813, -0.20694544911384583, -0.36978602409362793, 0.09914502501487732, 0.2307717353105545, -0.28127947449684143, -0.028578177094459534, -0.1864866316318512, 0.2175769805908203, -0.3917299509048462, -0.05313635617494583, 0.340781569480896, -0.05468301102519035, 0.393104612827301, -0.1745661050081253, 0.08942577987909317, 0.23510298132896423, 0.16521482169628143, -0.28333577513694763, -0.37273702025413513, 0.45117607712745667, 0.07212218642234802, -0.06092698872089386, 0.2574208974838257, -0.1946481317281723, -0.3575667142868042, -0.045344240963459015, -0.02272239327430725, -0.15415267646312714, -0.26946085691452026, 0.1336430311203003, -0.5319491624832153, -0.1265994906425476, -0.10478831082582474, -0.09807473421096802, 0.46590226888656616, -0.22180770337581635, 0.07207523286342621, -0.23559711873531342, -0.4272306561470032, -0.21139298379421234, 0.20537951588630676, 0.2566947340965271, -0.2136310189962387, -0.046541791409254074, -0.22151097655296326, -0.08493994176387787, 0.3301588296890259, 0.25363653898239136, -0.15344266593456268, 0.2487075924873352, -0.23720385134220123, 0.15973655879497528, 0.42824554443359375, -0.0966891422867775, -0.37750518321990967, 0.06357766687870026, 0.042048096656799316, 0.029366450384259224, -0.029479630291461945, 0.11225497722625732, -0.014248741790652275, -0.0672748014330864, 0.19054806232452393, 0.3296670913696289, -0.14359945058822632, -0.15678368508815765, -0.2640848457813263, 0.04020059108734131, 0.45298951864242554, 0.3493305444717407, 0.27533242106437683, -0.1353892982006073, 0.06522879749536514, 0.1668531745672226, 0.11538312584161758, 0.05736817419528961, 0.08876844495534897, 0.16630293428897858, 0.1947505921125412, -0.0009249597787857056, -0.3076634109020233, -0.19340366125106812, -0.42848509550094604, 0.29855209589004517, -0.4023682177066803, 0.34421831369400024, -0.005205854773521423, 0.11636482179164886, -0.2743449807167053, -0.0884462520480156, -0.07797923684120178, -0.03498121723532677, 0.055248238146305084, -0.036268122494220734, 0.11863680183887482, -0.15758129954338074, -0.12165966629981995, 0.45969468355178833, -0.3044731020927429, 0.030605139210820198, -0.2032380998134613, 0.558939516544342, -0.24940742552280426, -0.3483187258243561, 0.18164637684822083, 0.16782760620117188, -0.07485552877187729, -0.08874106407165527, -0.14644348621368408, 0.4584696590900421, 0.1846817433834076, -0.21150223910808563, 0.06761538982391357, 0.2728215157985687, 0.2086808979511261, 0.04574481025338173, 0.11333982646465302, 0.34857094287872314, -0.010380327701568604, -0.10622403025627136, -0.2250293791294098, 0.5668240785598755, -0.13564950227737427, 0.10987255722284317, -0.019480492919683456, 0.1030002236366272, 0.16478806734085083, -0.1018061712384224, -0.14664803445339203, -0.0287134051322937, 0.5365939140319824, 0.19544321298599243, 0.23871241509914398, 0.09663517773151398, -0.3509831726551056, -0.15099510550498962, 0.5099388957023621, 0.09742490947246552, 0.03750104457139969, 0.32718679308891296, 0.16450496017932892, -0.2205292284488678, 0.15254178643226624, 0.03627096489071846, 0.5619987845420837, 0.04485609754920006, -0.0008597299456596375, 0.31477224826812744, -0.3628350496292114, -0.05698217824101448, 0.06653134524822235, -0.15806680917739868, 0.3175261914730072, 0.3234219253063202, 0.05797530338168144, 0.06124774366617203, -0.3958384096622467, -0.22885052859783173, 0.10429241508245468, 0.49896907806396484, -0.2964092195034027, 0.06617459654808044, -0.32618895173072815, -0.11477735638618469, -0.08881616592407227, -0.1403394341468811, -0.5619559288024902, -0.22504936158657074, 0.0893946960568428, 0.3187950849533081, 0.0905735194683075, 0.3506728410720825, -0.4854868948459625, -0.008452564477920532, 0.12749192118644714, -0.31420812010765076, -0.012965630739927292, -0.15581637620925903, -0.2733369767665863, 0.03552570566534996, 0.7237204909324646, 0.09635528177022934, 0.38426175713539124, 0.05504655838012695, -0.2218772917985916, -0.049138203263282776, -0.3143675625324249, -0.022367514669895172, -0.22954581677913666, 0.338960736989975, 0.33197569847106934, 0.11001875251531601, -0.16040925681591034, -0.2559404969215393, 0.29941025376319885, -0.04354734718799591, -0.19576749205589294, 0.19448710978031158, -0.06588907539844513, -0.0019956224132329226, -0.1117202639579773, -0.012107796967029572, -0.1920270174741745, -0.22158180177211761, -0.1455167680978775, 0.19787289202213287, 0.32105857133865356, 0.31960242986679077, 0.029359180480241776, 0.15036359429359436, 0.0955185666680336, -0.028705013915896416, -0.17967292666435242, -0.3023669719696045, 0.35497087240219116, 0.06890799105167389, -0.4053298532962799, -0.2147282510995865, -0.10069292038679123, 0.23059312999248505, 0.10188798606395721, -0.5546714663505554, 0.13958409428596497, -0.03376389294862747, 0.09827661514282227, 0.16175943613052368, -0.018858959898352623, 0.4739736318588257, -0.03888576105237007, 0.056006208062171936, -0.19784551858901978, -0.24565063416957855, 0.13559143245220184, 0.16168168187141418, 0.656341016292572, -0.054541073739528656, 0.4591037333011627, -0.1254962980747223, 0.5254040360450745, 0.27985644340515137, -0.17634131014347076, 0.3539975583553314, 0.2002418488264084, 0.27365216612815857, -0.15349358320236206, -0.29143351316452026, 0.28552111983299255, -0.049538761377334595, -0.18259859085083008, 0.01159154623746872, -0.08290626108646393, -0.20050263404846191, -0.18693473935127258, 0.3586069941520691, -0.15216295421123505, -0.20322325825691223, 0.07590395957231522, -0.41920754313468933, 0.1117391586303711, 0.12383735179901123, 0.041789375245571136, -0.2293190062046051, -0.20974200963974, -0.03425142914056778, 0.3359273076057434, -0.02935531735420227, 0.034108687192201614, -0.5879097580909729, -0.20724597573280334, -0.27618876099586487, 0.3000997304916382, -0.02280256897211075, 0.508247971534729, -0.12710316479206085, -0.02217748388648033, 0.10229584574699402, -0.19119255244731903, 0.18797552585601807, -0.4306774139404297, 0.1604577600955963, 0.24858981370925903, 0.1959751397371292, -0.21747331321239471, -0.3243359327316284, -0.19718049466609955, 0.08993641287088394, 0.3619171679019928, 0.23904265463352203, -0.4133509695529938, -0.17956306040287018, 0.30761197209358215, -0.17722128331661224, -0.031756527721881866, -0.2116963416337967, -0.5768941640853882, -0.3119819164276123, -0.24553754925727844, 0.10727937519550323, -0.10115213692188263, 0.30959799885749817, -0.09589996188879013, 0.2520926296710968, 0.11115652322769165, 0.12002349644899368, 0.31183362007141113, -0.025878122076392174, 0.12496191263198853, 0.2003539502620697, 0.24292540550231934, -0.2824971377849579, -0.03049875795841217, 0.13725054264068604, 0.4655218720436096, -0.003039054572582245, 0.1497270166873932, 0.24621695280075073, 0.10327208042144775, 0.0787181630730629, 0.13542461395263672, 0.10898066312074661, 0.004826962947845459, 0.2942678928375244, 0.10802282392978668, -0.16814273595809937, 0.21240393817424774, 0.15131446719169617, -0.03763354942202568, -0.257049560546875, -0.4218555986881256, 0.38398271799087524, 0.09387697279453278, 0.07863110303878784, 0.5386751890182495, -0.1991012841463089, -0.22749143838882446, 0.1776130348443985, 0.4289579689502716, 0.7838948965072632, -0.04624692350625992, 0.05058927834033966, 0.2714208960533142, -0.38851964473724365, 0.17343159019947052, -0.12780776619911194, 0.21388424932956696, -0.41400811076164246, -0.2300037294626236, -0.11476030200719833, -0.23700708150863647, 0.28672054409980774, 0.0709187388420105, 0.02105090394616127, 0.2501493990421295, 0.06376709043979645, 0.21348240971565247, 0.047311216592788696, 0.3004763722419739, -0.2035636156797409, -0.0009062588214874268, -0.24380379915237427, 0.1599237024784088, -0.2949711084365845, 0.38419151306152344, -0.18277078866958618, -0.14167876541614532, -0.22529862821102142, -0.22979624569416046, -0.5931192636489868, 0.04207363724708557, -0.03454965353012085, 0.1219121664762497, 0.16120672225952148, -0.29703620076179504, 0.25363242626190186, -0.012544374912977219, 0.30524197220802307, 0.21494899690151215, -0.21897633373737335, 0.032076895236968994, 0.15962615609169006, 0.06327731162309647, 0.1346653550863266, 0.05774526298046112, 0.38575848937034607, -0.21142718195915222, -0.2823190987110138, -0.050300657749176025, -0.06938286870718002, -0.5146651268005371, 0.28684505820274353, -0.17235037684440613, 0.08005081862211227, -0.06218165531754494, -0.08365039527416229, 0.013984724879264832, 0.030454907566308975, -0.19595319032669067, 0.12615986168384552, 0.06693527102470398, -0.07483415305614471, 0.25189143419265747, -0.12572342157363892, -0.145521879196167, -0.19352097809314728, 0.3756963014602661, 0.13732698559761047, 0.016508616507053375, 0.4529261291027069, 0.2720402181148529, -0.1528954952955246, -0.23041841387748718, -0.10563923418521881, 0.17864146828651428, 0.024784564971923828, -0.014817711897194386, -0.1295316070318222, -0.08423911035060883, -0.18298642337322235, 0.11873934417963028, 0.2865351438522339, 0.09984201937913895, 0.29272961616516113, -0.5119158029556274, -0.500837504863739, 0.21920211613178253, -0.19762033224105835, 0.19259247183799744, -0.4042050540447235, 0.3515554666519165, -0.0026993323117494583, 0.005204550921916962, -0.29805055260658264, -0.17890556156635284, -0.46185222268104553, 0.11093533784151077, 0.07292626798152924, -0.20211732387542725, -0.056052353233098984, -0.18825988471508026, 0.11967451870441437, -0.1352253258228302, -0.39186495542526245, -0.1660434901714325, -0.1048925369977951, 0.15863268077373505, 0.008799846284091473, -0.35638850927352905, 0.1701889932155609, -0.14885090291500092, -0.2751871347427368, -0.015598665922880173, -0.22451667487621307, 0.008407332003116608, -0.05161077529191971, 0.15267160534858704, 0.2826908528804779, -0.022928595542907715, 0.015927042812108994, -0.1590150147676468, -0.1738787591457367, 0.05742880329489708, 0.022622020915150642, 0.1774999052286148, 0.18285156786441803, 0.04825466871261597, -0.21040675044059753, 0.11559082567691803, -0.10320267081260681, 0.0354527086019516, 0.2705412805080414, -0.3210698366165161, -0.11032538115978241, -0.005624228157103062, 0.4704589247703552, 0.5312496423721313, -0.12883226573467255, -0.19564397633075714, 0.2631404399871826, 0.1443779468536377, -0.49278658628463745, 0.09607472270727158, 0.10323348641395569, 0.08222409337759018, -0.05519691854715347, 0.13458992540836334, 0.19727280735969543, 0.2342779040336609, 0.017212025821208954, 0.17556437849998474, 0.16435517370700836, -0.24930690228939056, 0.07969200611114502, 0.3898661434650421, -0.08018765598535538, -0.0386279933154583, 0.3764920234680176, -0.1423220932483673, -0.01267128437757492, -0.03430818021297455, 0.10679085552692413, 0.2860962748527527, -0.19196343421936035, 0.053792525082826614, -0.4108021557331085, -0.4486483931541443, -0.1012226790189743, 0.3432515859603882, 0.003610961139202118, -0.019260689616203308, -0.027801379561424255, 0.2828315496444702, -0.18289615213871002, -0.057875555008649826, -0.22661474347114563, 0.10527901351451874, 0.02386452630162239, -0.07182084023952484, -0.4027283191680908, -0.12966862320899963, -0.22797159850597382, 0.1654793620109558, 0.0540967658162117, 0.12623806297779083, 0.30887365341186523, 0.10035088658332825, -0.21291930973529816, -0.32959094643592834, 0.11712585389614105, 0.3001697361469269, -0.3030855655670166, -0.27915334701538086, 0.3936848044395447, 0.21286585927009583, 0.015566322952508926, -0.22718405723571777, 0.3640894293785095, 0.32361704111099243, 0.3887958526611328, -0.25147899985313416, -0.2520092725753784, 0.07659713178873062, 0.029905790463089943, -0.08270549774169922, 0.49782103300094604, 0.3275834918022156, 0.09987244009971619, 0.20966650545597076, 0.07944726198911667, -0.09566184133291245, 0.196631520986557, -0.08401544392108917, -0.2941378057003021, 0.003598742187023163, 0.66038978099823, 0.17177657783031464, 0.0049779340624809265, -0.0732264369726181, 0.030812308192253113, -0.19097575545310974, -0.0409565195441246, 0.3082464933395386, 0.19755084812641144, 0.18334731459617615, -0.09985415637493134, 0.04419054090976715, -0.14104220271110535, 0.6444207429885864, 0.23497642576694489, 0.11403755843639374, -0.4878852963447571, -0.3304448425769806, -0.6936571598052979, -0.08192954212427139, -0.2694920301437378, -0.11176718026399612, 0.10536281764507294, 0.20483891665935516, -0.04462885111570358, 0.061834193766117096, 0.1968584805727005, 0.023293208330869675, -0.18391941487789154, -0.03172372281551361, -0.3047984838485718, 0.1097688376903534, -0.25892573595046997, 0.03148168325424194, -0.15424664318561554, -0.3109227120876312, 0.14406824111938477, 0.0020714495331048965, 0.03308291733264923, -0.11797523498535156, -0.03531460464000702, 0.2205830067396164, 0.31187233328819275, 0.2911403775215149, 0.0490066334605217, 0.6657664775848389, 0.11455970257520676, -0.13747572898864746, -0.36198487877845764, -0.1498401165008545, -0.4374692738056183, 0.14098960161209106, -0.1612320840358734, 0.6160258054733276, 0.033211857080459595, -0.13893626630306244, -0.3363068103790283, 0.5645506381988525, 0.09023940563201904, -0.34583333134651184, -0.08555883914232254, -0.03030369244515896, -0.17860263586044312, 0.23081430792808533, -0.04407994821667671, 0.004095062613487244, 0.2179861217737198, 0.45437031984329224, -0.4882110357284546, -0.16455356776714325, 0.5545018911361694, -0.07181645184755325, -0.27013176679611206, -0.1823340505361557, 0.15750551223754883, -0.09625934809446335, -0.16538254916667938, -0.7271353602409363, -0.026330485939979553, 0.2373393177986145, -0.1326826512813568, -0.26211732625961304, 0.23795285820960999, -0.11398620903491974, 0.1122620552778244, 0.053602587431669235, 0.21327054500579834, -0.33638593554496765, -0.33697509765625, -0.16340894997119904, -0.19360709190368652 ]
https://github.com/huggingface/datasets/issues/534
`list_datasets()` is broken.
Thanks for reporting ! This has been fixed in #475 and the fix will be available in the next release
version = '0.4.0' `list_datasets()` is broken. It results in the following error : ``` In [3]: nlp.list_datasets() Out[3]: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/core/formatters.py in __call__(self, obj) 700 type_pprinters=self.type_printers, 701 deferred_pprinters=self.deferred_printers) --> 702 printer.pretty(obj) 703 printer.flush() 704 return stream.getvalue() ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in pretty(self, obj) 375 if cls in self.type_pprinters: 376 # printer registered in self.type_pprinters --> 377 return self.type_pprinters[cls](obj, self, cycle) 378 else: 379 # deferred printer ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in inner(obj, p, cycle) 553 p.text(',') 554 p.breakable() --> 555 p.pretty(x) 556 if len(obj) == 1 and type(obj) is tuple: 557 # Special case for 1-item tuples. ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in pretty(self, obj) 392 if cls is not object \ 393 and callable(cls.__dict__.get('__repr__')): --> 394 return _repr_pprint(obj, self, cycle) 395 396 return _default_pprint(obj, self, cycle) ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle) 698 """A pprint that just redirects to the normal repr function.""" 699 # Find newlines and replace them with p.break_() --> 700 output = repr(obj) 701 lines = output.splitlines() 702 with p.group(): ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/nlp/hf_api.py in __repr__(self) 110 111 def __repr__(self): --> 112 single_line_description = self.description.replace("\n", "") 113 return f"nlp.ObjectInfo(id='{self.id}', description='{single_line_description}', files={self.siblings})" 114 AttributeError: 'NoneType' object has no attribute 'replace' ```
20
`list_datasets()` is broken. version = '0.4.0' `list_datasets()` is broken. It results in the following error : ``` In [3]: nlp.list_datasets() Out[3]: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/core/formatters.py in __call__(self, obj) 700 type_pprinters=self.type_printers, 701 deferred_pprinters=self.deferred_printers) --> 702 printer.pretty(obj) 703 printer.flush() 704 return stream.getvalue() ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in pretty(self, obj) 375 if cls in self.type_pprinters: 376 # printer registered in self.type_pprinters --> 377 return self.type_pprinters[cls](obj, self, cycle) 378 else: 379 # deferred printer ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in inner(obj, p, cycle) 553 p.text(',') 554 p.breakable() --> 555 p.pretty(x) 556 if len(obj) == 1 and type(obj) is tuple: 557 # Special case for 1-item tuples. ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in pretty(self, obj) 392 if cls is not object \ 393 and callable(cls.__dict__.get('__repr__')): --> 394 return _repr_pprint(obj, self, cycle) 395 396 return _default_pprint(obj, self, cycle) ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle) 698 """A pprint that just redirects to the normal repr function.""" 699 # Find newlines and replace them with p.break_() --> 700 output = repr(obj) 701 lines = output.splitlines() 702 with p.group(): ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/nlp/hf_api.py in __repr__(self) 110 111 def __repr__(self): --> 112 single_line_description = self.description.replace("\n", "") 113 return f"nlp.ObjectInfo(id='{self.id}', description='{single_line_description}', files={self.siblings})" 114 AttributeError: 'NoneType' object has no attribute 'replace' ``` Thanks for reporting ! This has been fixed in #475 and the fix will be available in the next release
[ -0.292550653219223, 0.12877151370048523, -0.11031751334667206, 0.25301188230514526, 0.15474051237106323, 0.06974904984235764, 0.3828652501106262, 0.4221465289592743, -0.07663927972316742, -0.049440816044807434, -0.1751880794763565, 0.44312572479248047, -0.24997688829898834, -0.03118169493973255, -0.06707007437944412, -0.4052233397960663, -0.07869657129049301, 0.3645739257335663, 0.053065039217472076, 0.1719866245985031, -0.17752748727798462, 0.30130621790885925, -0.29152393341064453, 0.10996575653553009, 0.0032133592758327723, -0.3575330376625061, -0.03938331827521324, -0.09531419724225998, -0.27385830879211426, -0.6101930737495422, 0.20504888892173767, 0.041320621967315674, 0.14576153457164764, 0.19178834557533264, -0.00010700909479055554, -0.10003720223903656, 0.3466986417770386, 0.12097419798374176, -0.4599768817424774, -0.10701505839824677, -0.34847307205200195, -0.16369646787643433, 0.15418389439582825, -0.15770667791366577, 0.21771669387817383, -0.2989490330219269, 0.04924534261226654, -0.03240859508514404, 0.14280544221401215, 0.4736906588077545, 0.2920953035354614, 0.13833622634410858, 0.33629339933395386, -0.09874716401100159, 0.13899224996566772, 0.12206222116947174, -0.2137821614742279, 0.13783764839172363, 0.20053759217262268, -0.16441933810710907, 0.1876346468925476, 0.31565552949905396, -0.1838984489440918, 0.042884934693574905, 0.0808459222316742, -0.10268574208021164, -0.0092906653881073, -0.2145702838897705, 0.17601138353347778, 0.0995594710111618, 0.41642823815345764, -0.2796159088611603, -0.3078484535217285, 0.01646389812231064, 0.05896972119808197, -0.7774244546890259, 0.10819230228662491, 0.022412573918700218, 0.03581291064620018, 0.019903618842363358, -0.3528313636779785, -0.06587672233581543, -0.23182350397109985, 0.46734875440597534, -0.0962102934718132, 0.28989192843437195, -0.11402947455644608, 0.01713109016418457, -0.09819875657558441, -0.08689653873443604, 0.01780509389936924, 0.10389795899391174, -0.27755308151245117, -0.006324521265923977, -0.16923347115516663, -0.16421647369861603, 0.21143341064453125, 0.09028351306915283, -0.004250532016158104, 0.4375264048576355, -0.04162951558828354, -0.11782129853963852, 0.00635006558150053, 0.151893749833107, 0.18831412494182587, 0.15841586887836456, 0.26876625418663025, 0.35437384247779846, 0.11753953993320465, 0.261976033449173, 0.16576868295669556, -0.06741905957460403, 0.1508331447839737, -0.2813044488430023, 0.18612419068813324, 0.010315492749214172, 0.34960126876831055, -0.11064544320106506, -0.2098473608493805, 0.2666293680667877, -0.1843724548816681, -0.07587141543626785, 0.09608111530542374, 0.20468568801879883, -0.0793883204460144, 0.2663098871707916, 0.11560572683811188, -0.03025302290916443, -0.1726301610469818, -0.09308147430419922, 0.008996805176138878, 0.08788256347179413, -0.029435990378260612, -0.06444811075925827, 0.03495825454592705, -0.060572754591703415, 0.2429809868335724, -0.12089469283819199, 0.17796698212623596, 0.019754469394683838, 0.18389298021793365, -0.4000000059604645, 0.1542438417673111, 0.22312729060649872, -0.15937933325767517, 0.17881380021572113, 0.29237696528434753, -0.41195380687713623, -0.10744684189558029, -0.17146259546279907, -0.07674769312143326, -0.21049514412879944, -0.4990212917327881, 0.22669433057308197, 0.1809675395488739, -0.01940954476594925, -0.09617049247026443, -0.12992557883262634, 0.3491958677768707, -0.26216161251068115, 0.03786768764257431, -0.5697957873344421, -0.09911612421274185, -0.13392065465450287, 0.17210495471954346, 0.3000335097312927, -0.3002193570137024, 0.16772596538066864, -0.23912136256694794, -0.051318321377038956, 0.009572803974151611, 0.22391770780086517, -0.19830581545829773, 0.2528690695762634, -0.1809738427400589, -0.058921635150909424, 0.29443761706352234, -0.13723619282245636, -0.23017460107803345, 0.27957722544670105, 0.2491772323846817, -0.06802559643983841, -0.22279083728790283, -0.07555515319108963, 0.268979012966156, 0.04815944656729698, 0.2397182732820511, 0.13334837555885315, 0.007656333968043327, -0.15227028727531433, -0.1668652445077896, -0.09344643354415894, 0.38139545917510986, -0.14420203864574432, 0.13378940522670746, 0.1369587779045105, -0.01578287035226822, 0.11347401142120361, 0.14682213962078094, -0.1264292299747467, -0.05563875287771225, 0.19052033126354218, 0.2522139847278595, 0.17140312492847443, 0.05427056550979614, -0.3509204089641571, -0.4462568163871765, -0.07970145344734192, -0.20402126014232635, 0.06523574888706207, -0.29569822549819946, 0.1840091198682785, -0.22990605235099792, 0.15984876453876495, -0.1872384250164032, -0.2770100235939026, 0.19925296306610107, 0.22110456228256226, 0.06912994384765625, -0.05601818487048149, -0.11475719511508942, -0.054079167544841766, -0.06894448399543762, 0.08153479546308517, -0.4202457368373871, 0.34309279918670654, -0.2603990137577057, -0.2390134632587433, 0.06445524841547012, 0.09657714515924454, 0.19953575730323792, -0.13619987666606903, -0.2320544421672821, 0.44032377004623413, 0.16500575840473175, -0.2004144936800003, -0.16229352355003357, 0.07711288332939148, 0.1574232578277588, -0.18584541976451874, 0.022000622004270554, 0.32022902369499207, 0.09834037721157074, 0.057860784232616425, -0.0076144784688949585, 0.2805495262145996, -0.1693383902311325, 0.16881771385669708, 0.22620616853237152, 0.37312930822372437, 0.260748952627182, 0.10233645141124725, -0.08860542625188828, -0.2534474730491638, 0.48792362213134766, 0.03397347778081894, 0.2914647161960602, -0.21568433940410614, -0.5336609482765198, 0.07603249698877335, 0.30737000703811646, 0.1480705440044403, 0.14222633838653564, -0.01006833091378212, -0.10575921088457108, 0.0769602581858635, 0.2739715278148651, 0.10938777029514313, 0.3183998763561249, 0.07144341617822647, -0.2827419936656952, -0.06643205881118774, -0.26872164011001587, -0.1903400421142578, 0.2828252911567688, 0.04252520576119423, 0.16018258035182953, 0.14224457740783691, 0.26644623279571533, 0.03769587352871895, -0.3858793079853058, -0.42343443632125854, -0.05695014446973801, 0.3714587688446045, -0.1407541185617447, 0.26434841752052307, -0.34914228320121765, -0.42491990327835083, -0.29604923725128174, -0.23880507051944733, -0.24059873819351196, -0.36234721541404724, -0.096066415309906, 0.1309029459953308, 0.030626777559518814, 0.23544935882091522, -0.14950592815876007, -0.06302948296070099, 0.16271443665027618, 0.10250786691904068, -0.04525059461593628, -0.16869905591011047, -0.26265954971313477, 0.11364935338497162, 0.19557128846645355, -0.08308347314596176, 0.37678930163383484, -0.04221957549452782, -0.16256408393383026, -0.2199975550174713, -0.403624951839447, 0.11204074323177338, -0.06806323677301407, 0.1988324522972107, 0.505158543586731, 0.09498078376054764, -0.04357685521245003, -0.15640445053577423, 0.4378070831298828, -0.056366927921772, 0.1829485297203064, 0.1709960550069809, -0.05450919270515442, -0.3030063807964325, -0.16428014636039734, -0.43812379240989685, -0.17215512692928314, -0.17508919537067413, 0.1431848108768463, 0.3657175600528717, 0.36710602045059204, 0.5672651529312134, 0.04867313429713249, 0.16272470355033875, -0.14983846247196198, 0.16978032886981964, -0.03847704455256462, 0.09263275563716888, 0.18278011679649353, -0.29756906628608704, -0.4033004343509674, -0.2050924152135849, 0.11071136593818665, 0.05348608270287514, -0.010926734656095505, -0.43359172344207764, -0.15617217123508453, -0.23163999617099762, 0.20163366198539734, -0.05612020939588547, 0.015757083892822266, 0.29224592447280884, 0.14454080164432526, -0.0896594300866127, -0.023003382608294487, -0.004104014486074448, -0.06878135353326797, -0.18581807613372803, 0.16218575835227966, 0.024800408631563187, 0.29223009943962097, -0.011563848704099655, 0.2237013876438141, 0.3424479067325592, -0.2151799350976944, 0.12797169387340546, -0.10847819596529007, 0.451419860124588, -0.15784654021263123, -0.4963955879211426, 0.2596539556980133, -0.08340801298618317, -0.0708971619606018, 0.11180023849010468, -0.09960880130529404, -0.2902059853076935, -0.1338142603635788, 0.37414517998695374, -0.008920151740312576, -0.07099174708127975, 0.08307653665542603, -0.18503613770008087, 0.3181610405445099, 0.002634922042489052, 0.2742581367492676, -0.15908491611480713, -0.24117285013198853, -0.12724322080612183, 0.11992910504341125, -0.009803995490074158, -0.119879812002182, -0.5893699526786804, -0.3102949559688568, -0.24743852019309998, 0.34073755145072937, 0.18132644891738892, 0.7312636971473694, -0.0435708612203598, 0.19152390956878662, -0.23228688538074493, -0.0519203245639801, 0.21755385398864746, -0.3263428509235382, -0.1254742294549942, 0.5302122235298157, -0.030700232833623886, -0.11857017129659653, -0.10655541718006134, -0.40471991896629333, 0.3956192135810852, 0.10589909553527832, 0.22190667688846588, -0.03872915357351303, -0.05288274586200714, 0.3625885248184204, 0.17712044715881348, -0.14309248328208923, 0.09082586318254471, -0.06234860420227051, -0.08927711844444275, -0.1557334065437317, -0.11809473484754562, -0.19276466965675354, 0.14662614464759827, -0.004909438546746969, 0.1919081211090088, -0.13920627534389496, -0.12576928734779358, -0.07489156723022461, 0.12339439988136292, 0.12369506806135178, 0.0033255042508244514, -0.04216339439153671, -0.09841437637805939, 0.2123972326517105, 0.1988953799009323, 0.11181406676769257, -0.3817194998264313, -0.22046589851379395, -0.10410436242818832, -0.08071210235357285, 0.24077197909355164, 0.07381550967693329, -0.25338736176490784, 0.0336991511285305, -0.09349707514047623, 0.11508358269929886, -0.0288713201880455, -0.2338203340768814, 0.5240258574485779, 0.025187935680150986, -0.3135373592376709, -0.4343078136444092, 0.20669317245483398, 0.01360456645488739, 0.10500894486904144, 0.38966843485832214, -0.20681340992450714, -0.3086208999156952, 0.18927925825119019, 0.11393177509307861, 0.6405627131462097, 0.08514954894781113, 0.0652170404791832, 0.25406795740127563, -0.09355983138084412, 0.6293433308601379, 0.15466727316379547, 0.24022997915744781, -0.357170045375824, -0.2086239606142044, -0.08031115680932999, -0.1555122435092926, 0.47335582971572876, 0.050789330154657364, -0.3131190538406372, 0.25050726532936096, -0.03918447345495224, 0.13852371275424957, 0.03598187491297722, 0.2781999707221985, 0.07781826704740524, -0.1967805176973343, -0.5601495504379272, 0.18382206559181213, -0.23240743577480316, -0.08739222586154938, -0.3194414973258972, 0.0811048075556755, 0.17071887850761414, -0.16562879085540771, -0.441344678401947, 0.13465136289596558, -0.12111905962228775, 0.3450773358345032, 0.3261594772338867, -0.39755332469940186, 0.13711217045783997, 0.13286738097667694, -0.02635829895734787, 0.28179579973220825, -0.14866827428340912, -0.08614630997180939, -0.045101359486579895, -0.1509847193956375, 0.09906504303216934, 0.11682865023612976, 0.4106485843658447, -0.027518507093191147, 0.0686400756239891, 0.1827409565448761, 0.0321693941950798, -0.12843279540538788, -0.091136634349823, -0.025914780795574188, 0.14049562811851501, -0.27324047684669495, -0.13999797403812408, -0.0654594749212265, -0.1451398879289627, -0.3277779817581177, 0.1606895476579666, 0.17875975370407104, -0.14308810234069824, 0.22354114055633545, -0.06401719152927399, 0.026612453162670135, -0.02067088708281517, 0.19979225099086761, 0.054547131061553955, -0.05422855168581009, 0.46663135290145874, 0.44355887174606323, -0.21838079392910004, -0.36946842074394226, 0.05517735332250595, -0.16083796322345734, -0.3175576627254486, 0.26678165793418884, -0.18791517615318298, 0.1919146031141281, -0.06241777911782265, 0.18550290167331696, -0.10841511189937592, 0.23292499780654907, 0.020110640674829483, -0.6296340823173523, -0.10271388292312622, 0.004685662686824799, 0.15996737778186798, 0.16828669607639313, 0.02112751081585884, 0.16334940493106842, 0.06236158311367035, 0.1665322482585907, -0.3393383026123047, -0.09286702424287796, -0.2718755602836609, 0.1751081347465515, 0.06238901615142822, 0.0062937065958976746, 0.02124004252254963, -0.042583905160427094, 0.18289180099964142, 0.110740527510643, -0.06930141896009445, -0.27716460824012756, -0.22560906410217285, 0.07434897869825363, 0.17181098461151123, -0.507412314414978, 0.0664316862821579, -0.0953744500875473, -0.2018556296825409, -0.220929354429245, -0.19388040900230408, 0.006028428673744202, -0.12225213646888733, 0.3884963095188141, -0.09179887175559998, -0.019553661346435547, 0.0311298668384552, 0.08886147290468216, -0.06399492919445038, 0.18225157260894775, 0.09069035202264786, 0.3359926640987396, 0.15526948869228363, -0.022312112152576447, -0.478773295879364, 0.08815659582614899, -0.16123567521572113, 0.055116817355155945, 0.47940632700920105, -0.5633708238601685, -0.024488231167197227, -0.048291463404893875, 0.5955430269241333, 0.3907868564128876, -0.20837490260601044, 0.08408665657043457, 0.2443300187587738, 0.20777356624603271, -0.3391141891479492, -0.11194507777690887, 0.28470954298973083, 0.18617594242095947, 0.045492444187402725, 0.07996821403503418, 0.003847382962703705, -0.05951422452926636, -0.11826232075691223, 0.02986733987927437, 0.15436860918998718, -0.528725802898407, 0.23317591845989227, 0.32937443256378174, 0.17265260219573975, -0.002644568681716919, 0.16628608107566833, 0.13393723964691162, 0.1855645775794983, 0.33697807788848877, 0.0011738240718841553, 0.267928808927536, 0.23552945256233215, 0.0644422397017479, 0.23633229732513428, -0.1297551542520523, 0.07060164958238602, 0.1460016518831253, 0.21532303094863892, 0.20685207843780518, 0.09030329436063766, 0.30386224389076233, -0.3223177194595337, -0.09234999120235443, 0.027767105028033257, 0.22071059048175812, -0.11797251552343369, -0.03284085541963577, -0.22266653180122375, -0.06824587285518646, -0.14851748943328857, 0.004387401044368744, -0.24591219425201416, -0.0806647390127182, 0.5146119594573975, 0.1833418607711792, -0.1658661812543869, -0.8891286849975586, 0.21642449498176575, 0.15443235635757446, 0.06471489369869232, -0.3147202432155609, 0.2495405524969101, 0.17108309268951416, 0.04372256249189377, -0.22348332405090332, 0.7008240818977356, 0.5018444061279297, 0.39416542649269104, 0.18253375589847565, -0.04886391758918762, -0.26822271943092346, -0.10425039380788803, 0.0419573076069355, 0.17004099488258362, 0.11232855916023254, 0.059584878385066986, 0.3015957176685333, 0.13330121338367462, -0.14904509484767914, 0.29885366559028625, 0.2556346356868744, 0.03756067156791687, -0.09930628538131714, 0.47312238812446594, -0.04707358032464981, -0.24652716517448425, -0.13555708527565002, -0.03011006861925125, -0.3524828553199768, 0.115392304956913, 0.5406097769737244, 0.2814173698425293, 0.057111285626888275, -0.08858533203601837, 0.126794695854187, 0.12675566971302032, 0.40314027667045593, 0.47555285692214966, 0.3269430100917816, -0.17958347499370575, -0.19375306367874146, -0.2992212176322937, 0.1575983464717865, -0.2197689414024353, -0.046095024794340134, 0.1135367602109909, 0.05974768102169037, -0.0773715153336525, 0.2345728725194931, 0.02741268277168274, 0.09454085677862167, -0.024896420538425446, 0.05686049535870552, -0.3780338168144226, -0.11624929308891296, 0.28671449422836304, 0.02705628238618374, -0.027843374758958817, -0.19641432166099548, 0.15120765566825867, -0.12865287065505981, 0.11261654645204544, -0.3674304485321045, -0.06514134258031845, -0.10941645503044128, 0.20972691476345062, 0.03127622604370117, 0.43173110485076904, 0.2470494508743286, -0.030963899567723274, -0.2971608638763428, -0.28831934928894043, -0.43772920966148376, -0.18340003490447998, 0.5462120771408081, 0.13803386688232422, 0.533626914024353, -0.16277995705604553, -0.2439771443605423, -0.41129857301712036, 0.4331112205982208, -0.3177209496498108, -0.05559190735220909, -0.22259557247161865, 0.20778286457061768, -0.2010597586631775, -0.06663934886455536, 0.03291349485516548, 0.28390154242515564, -0.04168710112571716, 0.2112431675195694, -0.4552682638168335, -0.2773837447166443, 0.259721964597702, -0.7163979411125183, -0.3755803406238556, -0.138202503323555, 0.10006572306156158, -0.033319033682346344, -0.1368517279624939, -0.3827456831932068, -0.060679469257593155, 0.3364989161491394, -0.13957920670509338, -0.2957064211368561, 0.0730350986123085, 0.15607279539108276, 0.14176799356937408, -0.09391950815916061, 0.6182781457901001, 0.0997413620352745, -0.31694287061691284, 0.09987542033195496, -0.05986467003822327 ]
https://github.com/huggingface/datasets/issues/534
`list_datasets()` is broken.
What you can do instead to get the list of the datasets is call ```python print([dataset.id for dataset in nlp.list_datasets()]) ```
version = '0.4.0' `list_datasets()` is broken. It results in the following error : ``` In [3]: nlp.list_datasets() Out[3]: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/core/formatters.py in __call__(self, obj) 700 type_pprinters=self.type_printers, 701 deferred_pprinters=self.deferred_printers) --> 702 printer.pretty(obj) 703 printer.flush() 704 return stream.getvalue() ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in pretty(self, obj) 375 if cls in self.type_pprinters: 376 # printer registered in self.type_pprinters --> 377 return self.type_pprinters[cls](obj, self, cycle) 378 else: 379 # deferred printer ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in inner(obj, p, cycle) 553 p.text(',') 554 p.breakable() --> 555 p.pretty(x) 556 if len(obj) == 1 and type(obj) is tuple: 557 # Special case for 1-item tuples. ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in pretty(self, obj) 392 if cls is not object \ 393 and callable(cls.__dict__.get('__repr__')): --> 394 return _repr_pprint(obj, self, cycle) 395 396 return _default_pprint(obj, self, cycle) ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle) 698 """A pprint that just redirects to the normal repr function.""" 699 # Find newlines and replace them with p.break_() --> 700 output = repr(obj) 701 lines = output.splitlines() 702 with p.group(): ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/nlp/hf_api.py in __repr__(self) 110 111 def __repr__(self): --> 112 single_line_description = self.description.replace("\n", "") 113 return f"nlp.ObjectInfo(id='{self.id}', description='{single_line_description}', files={self.siblings})" 114 AttributeError: 'NoneType' object has no attribute 'replace' ```
21
`list_datasets()` is broken. version = '0.4.0' `list_datasets()` is broken. It results in the following error : ``` In [3]: nlp.list_datasets() Out[3]: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/core/formatters.py in __call__(self, obj) 700 type_pprinters=self.type_printers, 701 deferred_pprinters=self.deferred_printers) --> 702 printer.pretty(obj) 703 printer.flush() 704 return stream.getvalue() ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in pretty(self, obj) 375 if cls in self.type_pprinters: 376 # printer registered in self.type_pprinters --> 377 return self.type_pprinters[cls](obj, self, cycle) 378 else: 379 # deferred printer ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in inner(obj, p, cycle) 553 p.text(',') 554 p.breakable() --> 555 p.pretty(x) 556 if len(obj) == 1 and type(obj) is tuple: 557 # Special case for 1-item tuples. ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in pretty(self, obj) 392 if cls is not object \ 393 and callable(cls.__dict__.get('__repr__')): --> 394 return _repr_pprint(obj, self, cycle) 395 396 return _default_pprint(obj, self, cycle) ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle) 698 """A pprint that just redirects to the normal repr function.""" 699 # Find newlines and replace them with p.break_() --> 700 output = repr(obj) 701 lines = output.splitlines() 702 with p.group(): ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/nlp/hf_api.py in __repr__(self) 110 111 def __repr__(self): --> 112 single_line_description = self.description.replace("\n", "") 113 return f"nlp.ObjectInfo(id='{self.id}', description='{single_line_description}', files={self.siblings})" 114 AttributeError: 'NoneType' object has no attribute 'replace' ``` What you can do instead to get the list of the datasets is call ```python print([dataset.id for dataset in nlp.list_datasets()]) ```
[ -0.292550653219223, 0.12877151370048523, -0.11031751334667206, 0.25301188230514526, 0.15474051237106323, 0.06974904984235764, 0.3828652501106262, 0.4221465289592743, -0.07663927972316742, -0.049440816044807434, -0.1751880794763565, 0.44312572479248047, -0.24997688829898834, -0.03118169493973255, -0.06707007437944412, -0.4052233397960663, -0.07869657129049301, 0.3645739257335663, 0.053065039217472076, 0.1719866245985031, -0.17752748727798462, 0.30130621790885925, -0.29152393341064453, 0.10996575653553009, 0.0032133592758327723, -0.3575330376625061, -0.03938331827521324, -0.09531419724225998, -0.27385830879211426, -0.6101930737495422, 0.20504888892173767, 0.041320621967315674, 0.14576153457164764, 0.19178834557533264, -0.00010700909479055554, -0.10003720223903656, 0.3466986417770386, 0.12097419798374176, -0.4599768817424774, -0.10701505839824677, -0.34847307205200195, -0.16369646787643433, 0.15418389439582825, -0.15770667791366577, 0.21771669387817383, -0.2989490330219269, 0.04924534261226654, -0.03240859508514404, 0.14280544221401215, 0.4736906588077545, 0.2920953035354614, 0.13833622634410858, 0.33629339933395386, -0.09874716401100159, 0.13899224996566772, 0.12206222116947174, -0.2137821614742279, 0.13783764839172363, 0.20053759217262268, -0.16441933810710907, 0.1876346468925476, 0.31565552949905396, -0.1838984489440918, 0.042884934693574905, 0.0808459222316742, -0.10268574208021164, -0.0092906653881073, -0.2145702838897705, 0.17601138353347778, 0.0995594710111618, 0.41642823815345764, -0.2796159088611603, -0.3078484535217285, 0.01646389812231064, 0.05896972119808197, -0.7774244546890259, 0.10819230228662491, 0.022412573918700218, 0.03581291064620018, 0.019903618842363358, -0.3528313636779785, -0.06587672233581543, -0.23182350397109985, 0.46734875440597534, -0.0962102934718132, 0.28989192843437195, -0.11402947455644608, 0.01713109016418457, -0.09819875657558441, -0.08689653873443604, 0.01780509389936924, 0.10389795899391174, -0.27755308151245117, -0.006324521265923977, -0.16923347115516663, -0.16421647369861603, 0.21143341064453125, 0.09028351306915283, -0.004250532016158104, 0.4375264048576355, -0.04162951558828354, -0.11782129853963852, 0.00635006558150053, 0.151893749833107, 0.18831412494182587, 0.15841586887836456, 0.26876625418663025, 0.35437384247779846, 0.11753953993320465, 0.261976033449173, 0.16576868295669556, -0.06741905957460403, 0.1508331447839737, -0.2813044488430023, 0.18612419068813324, 0.010315492749214172, 0.34960126876831055, -0.11064544320106506, -0.2098473608493805, 0.2666293680667877, -0.1843724548816681, -0.07587141543626785, 0.09608111530542374, 0.20468568801879883, -0.0793883204460144, 0.2663098871707916, 0.11560572683811188, -0.03025302290916443, -0.1726301610469818, -0.09308147430419922, 0.008996805176138878, 0.08788256347179413, -0.029435990378260612, -0.06444811075925827, 0.03495825454592705, -0.060572754591703415, 0.2429809868335724, -0.12089469283819199, 0.17796698212623596, 0.019754469394683838, 0.18389298021793365, -0.4000000059604645, 0.1542438417673111, 0.22312729060649872, -0.15937933325767517, 0.17881380021572113, 0.29237696528434753, -0.41195380687713623, -0.10744684189558029, -0.17146259546279907, -0.07674769312143326, -0.21049514412879944, -0.4990212917327881, 0.22669433057308197, 0.1809675395488739, -0.01940954476594925, -0.09617049247026443, -0.12992557883262634, 0.3491958677768707, -0.26216161251068115, 0.03786768764257431, -0.5697957873344421, -0.09911612421274185, -0.13392065465450287, 0.17210495471954346, 0.3000335097312927, -0.3002193570137024, 0.16772596538066864, -0.23912136256694794, -0.051318321377038956, 0.009572803974151611, 0.22391770780086517, -0.19830581545829773, 0.2528690695762634, -0.1809738427400589, -0.058921635150909424, 0.29443761706352234, -0.13723619282245636, -0.23017460107803345, 0.27957722544670105, 0.2491772323846817, -0.06802559643983841, -0.22279083728790283, -0.07555515319108963, 0.268979012966156, 0.04815944656729698, 0.2397182732820511, 0.13334837555885315, 0.007656333968043327, -0.15227028727531433, -0.1668652445077896, -0.09344643354415894, 0.38139545917510986, -0.14420203864574432, 0.13378940522670746, 0.1369587779045105, -0.01578287035226822, 0.11347401142120361, 0.14682213962078094, -0.1264292299747467, -0.05563875287771225, 0.19052033126354218, 0.2522139847278595, 0.17140312492847443, 0.05427056550979614, -0.3509204089641571, -0.4462568163871765, -0.07970145344734192, -0.20402126014232635, 0.06523574888706207, -0.29569822549819946, 0.1840091198682785, -0.22990605235099792, 0.15984876453876495, -0.1872384250164032, -0.2770100235939026, 0.19925296306610107, 0.22110456228256226, 0.06912994384765625, -0.05601818487048149, -0.11475719511508942, -0.054079167544841766, -0.06894448399543762, 0.08153479546308517, -0.4202457368373871, 0.34309279918670654, -0.2603990137577057, -0.2390134632587433, 0.06445524841547012, 0.09657714515924454, 0.19953575730323792, -0.13619987666606903, -0.2320544421672821, 0.44032377004623413, 0.16500575840473175, -0.2004144936800003, -0.16229352355003357, 0.07711288332939148, 0.1574232578277588, -0.18584541976451874, 0.022000622004270554, 0.32022902369499207, 0.09834037721157074, 0.057860784232616425, -0.0076144784688949585, 0.2805495262145996, -0.1693383902311325, 0.16881771385669708, 0.22620616853237152, 0.37312930822372437, 0.260748952627182, 0.10233645141124725, -0.08860542625188828, -0.2534474730491638, 0.48792362213134766, 0.03397347778081894, 0.2914647161960602, -0.21568433940410614, -0.5336609482765198, 0.07603249698877335, 0.30737000703811646, 0.1480705440044403, 0.14222633838653564, -0.01006833091378212, -0.10575921088457108, 0.0769602581858635, 0.2739715278148651, 0.10938777029514313, 0.3183998763561249, 0.07144341617822647, -0.2827419936656952, -0.06643205881118774, -0.26872164011001587, -0.1903400421142578, 0.2828252911567688, 0.04252520576119423, 0.16018258035182953, 0.14224457740783691, 0.26644623279571533, 0.03769587352871895, -0.3858793079853058, -0.42343443632125854, -0.05695014446973801, 0.3714587688446045, -0.1407541185617447, 0.26434841752052307, -0.34914228320121765, -0.42491990327835083, -0.29604923725128174, -0.23880507051944733, -0.24059873819351196, -0.36234721541404724, -0.096066415309906, 0.1309029459953308, 0.030626777559518814, 0.23544935882091522, -0.14950592815876007, -0.06302948296070099, 0.16271443665027618, 0.10250786691904068, -0.04525059461593628, -0.16869905591011047, -0.26265954971313477, 0.11364935338497162, 0.19557128846645355, -0.08308347314596176, 0.37678930163383484, -0.04221957549452782, -0.16256408393383026, -0.2199975550174713, -0.403624951839447, 0.11204074323177338, -0.06806323677301407, 0.1988324522972107, 0.505158543586731, 0.09498078376054764, -0.04357685521245003, -0.15640445053577423, 0.4378070831298828, -0.056366927921772, 0.1829485297203064, 0.1709960550069809, -0.05450919270515442, -0.3030063807964325, -0.16428014636039734, -0.43812379240989685, -0.17215512692928314, -0.17508919537067413, 0.1431848108768463, 0.3657175600528717, 0.36710602045059204, 0.5672651529312134, 0.04867313429713249, 0.16272470355033875, -0.14983846247196198, 0.16978032886981964, -0.03847704455256462, 0.09263275563716888, 0.18278011679649353, -0.29756906628608704, -0.4033004343509674, -0.2050924152135849, 0.11071136593818665, 0.05348608270287514, -0.010926734656095505, -0.43359172344207764, -0.15617217123508453, -0.23163999617099762, 0.20163366198539734, -0.05612020939588547, 0.015757083892822266, 0.29224592447280884, 0.14454080164432526, -0.0896594300866127, -0.023003382608294487, -0.004104014486074448, -0.06878135353326797, -0.18581807613372803, 0.16218575835227966, 0.024800408631563187, 0.29223009943962097, -0.011563848704099655, 0.2237013876438141, 0.3424479067325592, -0.2151799350976944, 0.12797169387340546, -0.10847819596529007, 0.451419860124588, -0.15784654021263123, -0.4963955879211426, 0.2596539556980133, -0.08340801298618317, -0.0708971619606018, 0.11180023849010468, -0.09960880130529404, -0.2902059853076935, -0.1338142603635788, 0.37414517998695374, -0.008920151740312576, -0.07099174708127975, 0.08307653665542603, -0.18503613770008087, 0.3181610405445099, 0.002634922042489052, 0.2742581367492676, -0.15908491611480713, -0.24117285013198853, -0.12724322080612183, 0.11992910504341125, -0.009803995490074158, -0.119879812002182, -0.5893699526786804, -0.3102949559688568, -0.24743852019309998, 0.34073755145072937, 0.18132644891738892, 0.7312636971473694, -0.0435708612203598, 0.19152390956878662, -0.23228688538074493, -0.0519203245639801, 0.21755385398864746, -0.3263428509235382, -0.1254742294549942, 0.5302122235298157, -0.030700232833623886, -0.11857017129659653, -0.10655541718006134, -0.40471991896629333, 0.3956192135810852, 0.10589909553527832, 0.22190667688846588, -0.03872915357351303, -0.05288274586200714, 0.3625885248184204, 0.17712044715881348, -0.14309248328208923, 0.09082586318254471, -0.06234860420227051, -0.08927711844444275, -0.1557334065437317, -0.11809473484754562, -0.19276466965675354, 0.14662614464759827, -0.004909438546746969, 0.1919081211090088, -0.13920627534389496, -0.12576928734779358, -0.07489156723022461, 0.12339439988136292, 0.12369506806135178, 0.0033255042508244514, -0.04216339439153671, -0.09841437637805939, 0.2123972326517105, 0.1988953799009323, 0.11181406676769257, -0.3817194998264313, -0.22046589851379395, -0.10410436242818832, -0.08071210235357285, 0.24077197909355164, 0.07381550967693329, -0.25338736176490784, 0.0336991511285305, -0.09349707514047623, 0.11508358269929886, -0.0288713201880455, -0.2338203340768814, 0.5240258574485779, 0.025187935680150986, -0.3135373592376709, -0.4343078136444092, 0.20669317245483398, 0.01360456645488739, 0.10500894486904144, 0.38966843485832214, -0.20681340992450714, -0.3086208999156952, 0.18927925825119019, 0.11393177509307861, 0.6405627131462097, 0.08514954894781113, 0.0652170404791832, 0.25406795740127563, -0.09355983138084412, 0.6293433308601379, 0.15466727316379547, 0.24022997915744781, -0.357170045375824, -0.2086239606142044, -0.08031115680932999, -0.1555122435092926, 0.47335582971572876, 0.050789330154657364, -0.3131190538406372, 0.25050726532936096, -0.03918447345495224, 0.13852371275424957, 0.03598187491297722, 0.2781999707221985, 0.07781826704740524, -0.1967805176973343, -0.5601495504379272, 0.18382206559181213, -0.23240743577480316, -0.08739222586154938, -0.3194414973258972, 0.0811048075556755, 0.17071887850761414, -0.16562879085540771, -0.441344678401947, 0.13465136289596558, -0.12111905962228775, 0.3450773358345032, 0.3261594772338867, -0.39755332469940186, 0.13711217045783997, 0.13286738097667694, -0.02635829895734787, 0.28179579973220825, -0.14866827428340912, -0.08614630997180939, -0.045101359486579895, -0.1509847193956375, 0.09906504303216934, 0.11682865023612976, 0.4106485843658447, -0.027518507093191147, 0.0686400756239891, 0.1827409565448761, 0.0321693941950798, -0.12843279540538788, -0.091136634349823, -0.025914780795574188, 0.14049562811851501, -0.27324047684669495, -0.13999797403812408, -0.0654594749212265, -0.1451398879289627, -0.3277779817581177, 0.1606895476579666, 0.17875975370407104, -0.14308810234069824, 0.22354114055633545, -0.06401719152927399, 0.026612453162670135, -0.02067088708281517, 0.19979225099086761, 0.054547131061553955, -0.05422855168581009, 0.46663135290145874, 0.44355887174606323, -0.21838079392910004, -0.36946842074394226, 0.05517735332250595, -0.16083796322345734, -0.3175576627254486, 0.26678165793418884, -0.18791517615318298, 0.1919146031141281, -0.06241777911782265, 0.18550290167331696, -0.10841511189937592, 0.23292499780654907, 0.020110640674829483, -0.6296340823173523, -0.10271388292312622, 0.004685662686824799, 0.15996737778186798, 0.16828669607639313, 0.02112751081585884, 0.16334940493106842, 0.06236158311367035, 0.1665322482585907, -0.3393383026123047, -0.09286702424287796, -0.2718755602836609, 0.1751081347465515, 0.06238901615142822, 0.0062937065958976746, 0.02124004252254963, -0.042583905160427094, 0.18289180099964142, 0.110740527510643, -0.06930141896009445, -0.27716460824012756, -0.22560906410217285, 0.07434897869825363, 0.17181098461151123, -0.507412314414978, 0.0664316862821579, -0.0953744500875473, -0.2018556296825409, -0.220929354429245, -0.19388040900230408, 0.006028428673744202, -0.12225213646888733, 0.3884963095188141, -0.09179887175559998, -0.019553661346435547, 0.0311298668384552, 0.08886147290468216, -0.06399492919445038, 0.18225157260894775, 0.09069035202264786, 0.3359926640987396, 0.15526948869228363, -0.022312112152576447, -0.478773295879364, 0.08815659582614899, -0.16123567521572113, 0.055116817355155945, 0.47940632700920105, -0.5633708238601685, -0.024488231167197227, -0.048291463404893875, 0.5955430269241333, 0.3907868564128876, -0.20837490260601044, 0.08408665657043457, 0.2443300187587738, 0.20777356624603271, -0.3391141891479492, -0.11194507777690887, 0.28470954298973083, 0.18617594242095947, 0.045492444187402725, 0.07996821403503418, 0.003847382962703705, -0.05951422452926636, -0.11826232075691223, 0.02986733987927437, 0.15436860918998718, -0.528725802898407, 0.23317591845989227, 0.32937443256378174, 0.17265260219573975, -0.002644568681716919, 0.16628608107566833, 0.13393723964691162, 0.1855645775794983, 0.33697807788848877, 0.0011738240718841553, 0.267928808927536, 0.23552945256233215, 0.0644422397017479, 0.23633229732513428, -0.1297551542520523, 0.07060164958238602, 0.1460016518831253, 0.21532303094863892, 0.20685207843780518, 0.09030329436063766, 0.30386224389076233, -0.3223177194595337, -0.09234999120235443, 0.027767105028033257, 0.22071059048175812, -0.11797251552343369, -0.03284085541963577, -0.22266653180122375, -0.06824587285518646, -0.14851748943328857, 0.004387401044368744, -0.24591219425201416, -0.0806647390127182, 0.5146119594573975, 0.1833418607711792, -0.1658661812543869, -0.8891286849975586, 0.21642449498176575, 0.15443235635757446, 0.06471489369869232, -0.3147202432155609, 0.2495405524969101, 0.17108309268951416, 0.04372256249189377, -0.22348332405090332, 0.7008240818977356, 0.5018444061279297, 0.39416542649269104, 0.18253375589847565, -0.04886391758918762, -0.26822271943092346, -0.10425039380788803, 0.0419573076069355, 0.17004099488258362, 0.11232855916023254, 0.059584878385066986, 0.3015957176685333, 0.13330121338367462, -0.14904509484767914, 0.29885366559028625, 0.2556346356868744, 0.03756067156791687, -0.09930628538131714, 0.47312238812446594, -0.04707358032464981, -0.24652716517448425, -0.13555708527565002, -0.03011006861925125, -0.3524828553199768, 0.115392304956913, 0.5406097769737244, 0.2814173698425293, 0.057111285626888275, -0.08858533203601837, 0.126794695854187, 0.12675566971302032, 0.40314027667045593, 0.47555285692214966, 0.3269430100917816, -0.17958347499370575, -0.19375306367874146, -0.2992212176322937, 0.1575983464717865, -0.2197689414024353, -0.046095024794340134, 0.1135367602109909, 0.05974768102169037, -0.0773715153336525, 0.2345728725194931, 0.02741268277168274, 0.09454085677862167, -0.024896420538425446, 0.05686049535870552, -0.3780338168144226, -0.11624929308891296, 0.28671449422836304, 0.02705628238618374, -0.027843374758958817, -0.19641432166099548, 0.15120765566825867, -0.12865287065505981, 0.11261654645204544, -0.3674304485321045, -0.06514134258031845, -0.10941645503044128, 0.20972691476345062, 0.03127622604370117, 0.43173110485076904, 0.2470494508743286, -0.030963899567723274, -0.2971608638763428, -0.28831934928894043, -0.43772920966148376, -0.18340003490447998, 0.5462120771408081, 0.13803386688232422, 0.533626914024353, -0.16277995705604553, -0.2439771443605423, -0.41129857301712036, 0.4331112205982208, -0.3177209496498108, -0.05559190735220909, -0.22259557247161865, 0.20778286457061768, -0.2010597586631775, -0.06663934886455536, 0.03291349485516548, 0.28390154242515564, -0.04168710112571716, 0.2112431675195694, -0.4552682638168335, -0.2773837447166443, 0.259721964597702, -0.7163979411125183, -0.3755803406238556, -0.138202503323555, 0.10006572306156158, -0.033319033682346344, -0.1368517279624939, -0.3827456831932068, -0.060679469257593155, 0.3364989161491394, -0.13957920670509338, -0.2957064211368561, 0.0730350986123085, 0.15607279539108276, 0.14176799356937408, -0.09391950815916061, 0.6182781457901001, 0.0997413620352745, -0.31694287061691284, 0.09987542033195496, -0.05986467003822327 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
Could you try to run `dataset = load_dataset("text", data_files=file_path, split="train")` once before calling the script ? It looks like several processes try to create the dataset in arrow format at the same time. If the dataset is already created it should be fine
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
43
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` Could you try to run `dataset = load_dataset("text", data_files=file_path, split="train")` once before calling the script ? It looks like several processes try to create the dataset in arrow format at the same time. If the dataset is already created it should be fine
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
Thanks! I tested on 328MB text data on `n1-standard-8 (8 vCPUs, 30 GB memory)`. The main script ran without any issue, but it seems to require a huge space in the drive. As suggested, I ran the following script before running the pre-training command with `xla_spawn.py`. ```python from nlp import load_dataset file_path="your_file_name" load_dataset("text", data_files=file_path, split="train") ``` This will create `text-train.arrow` under the default cache directory. Then, I run the script with `xla_spawn.py`. It will load data from the cached file. My understanding is that there's no other way but to do this two-step process with the current version (0.4) of `nlp`. During another caching process that happens in the main script: ``` 08/26/2020 09:19:51 - INFO - nlp.utils.info_utils - All the checksums matched successfully for post processing resources 08/26/2020 09:19:53 - INFO - nlp.arrow_dataset - Caching processed dataset at /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d/cache-f90f341e5308a7469 8d872bcc88f9c0e.arrow ``` `nlp` generates a temporary file per core, each of which is three times larger than the original text data. If each process is actually writing on the disk, you will need a huge amount of space in your drive. (Maybe I'm missing something.) ``` -rw-r--r-- 1 ***** ***** 674 Aug 26 09:19 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 26 09:19 LICENSE -rw-r--r-- 1 ***** ***** 332M Aug 26 09:10 text-train.arrow -rw------- 1 ***** ***** 940M Aug 26 09:31 tmp0k43sazw -rw------- 1 ***** ***** 940M Aug 26 09:31 tmp7sxs9mj5 -rw------- 1 ***** ***** 939M Aug 26 09:31 tmpbbiqw2vp -rw------- 1 ***** ***** 937M Aug 26 09:31 tmpjxb5ptyu -rw------- 1 ***** ***** 933M Aug 26 09:31 tmpk3hkdh0e -rw------- 1 ***** ***** 944M Aug 26 09:31 tmpnoalwftz -rw------- 1 ***** ***** 931M Aug 26 09:31 tmpuxdr_dz3 -rw------- 1 ***** ***** 945M Aug 26 09:31 tmpxjyuy6dk ``` After the caching process, they seem to be merged into one file. ``` -rw------- 1 ***** ***** 989M Aug 26 09:32 cache-f90f341e5308a74698d872bcc88f9c0e.arrow -rw-r--r-- 1 ***** ***** 674 Aug 26 09:19 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 26 09:19 LICENSE -rw-r--r-- 1 ***** ***** 332M Aug 26 09:10 text-train.arrow ```
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
336
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` Thanks! I tested on 328MB text data on `n1-standard-8 (8 vCPUs, 30 GB memory)`. The main script ran without any issue, but it seems to require a huge space in the drive. As suggested, I ran the following script before running the pre-training command with `xla_spawn.py`. ```python from nlp import load_dataset file_path="your_file_name" load_dataset("text", data_files=file_path, split="train") ``` This will create `text-train.arrow` under the default cache directory. Then, I run the script with `xla_spawn.py`. It will load data from the cached file. My understanding is that there's no other way but to do this two-step process with the current version (0.4) of `nlp`. During another caching process that happens in the main script: ``` 08/26/2020 09:19:51 - INFO - nlp.utils.info_utils - All the checksums matched successfully for post processing resources 08/26/2020 09:19:53 - INFO - nlp.arrow_dataset - Caching processed dataset at /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d/cache-f90f341e5308a7469 8d872bcc88f9c0e.arrow ``` `nlp` generates a temporary file per core, each of which is three times larger than the original text data. If each process is actually writing on the disk, you will need a huge amount of space in your drive. (Maybe I'm missing something.) ``` -rw-r--r-- 1 ***** ***** 674 Aug 26 09:19 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 26 09:19 LICENSE -rw-r--r-- 1 ***** ***** 332M Aug 26 09:10 text-train.arrow -rw------- 1 ***** ***** 940M Aug 26 09:31 tmp0k43sazw -rw------- 1 ***** ***** 940M Aug 26 09:31 tmp7sxs9mj5 -rw------- 1 ***** ***** 939M Aug 26 09:31 tmpbbiqw2vp -rw------- 1 ***** ***** 937M Aug 26 09:31 tmpjxb5ptyu -rw------- 1 ***** ***** 933M Aug 26 09:31 tmpk3hkdh0e -rw------- 1 ***** ***** 944M Aug 26 09:31 tmpnoalwftz -rw------- 1 ***** ***** 931M Aug 26 09:31 tmpuxdr_dz3 -rw------- 1 ***** ***** 945M Aug 26 09:31 tmpxjyuy6dk ``` After the caching process, they seem to be merged into one file. ``` -rw------- 1 ***** ***** 989M Aug 26 09:32 cache-f90f341e5308a74698d872bcc88f9c0e.arrow -rw-r--r-- 1 ***** ***** 674 Aug 26 09:19 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 26 09:19 LICENSE -rw-r--r-- 1 ***** ***** 332M Aug 26 09:10 text-train.arrow ```
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
Again it looks like every process tries to tokenize the full dataset at the same time. If you do the tokenization before calling `xla_spawn.py` once, then each process will then use the tokenized cached file `cache-f90f341e5308a74698d872bcc88f9c0e.arrow` and not recompute it. Not sure if there's a better way to do that cc @julien-c @thomwolf
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
53
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` Again it looks like every process tries to tokenize the full dataset at the same time. If you do the tokenization before calling `xla_spawn.py` once, then each process will then use the tokenized cached file `cache-f90f341e5308a74698d872bcc88f9c0e.arrow` and not recompute it. Not sure if there's a better way to do that cc @julien-c @thomwolf
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
I wrote a separate script just for preparing a cached file, including tokenization. Each process did use the tokenized cached file. Currently I'm testing the pipeline on 24GB text data. It took about 1.5 hour to create a cached file on `n1-highmem-16 (16 vCPUs, 104 GB memory)`. I assume loading this cached file in the main script with `xla_spawn.py` won't be an issue (even if there are 8 processes). ``` total 98G drwxr-xr-x 2 ***** ***** 4.0K Aug 26 13:38 . drwxr-xr-x 3 ***** ***** 4.0K Aug 26 12:24 .. -rw------- 1 ***** ***** 74G Aug 26 13:38 cache-a7aa04134ba7b1aff5d9710f14a4e334.arrow -rw-r--r-- 1 ***** ***** 681 Aug 26 12:24 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 26 12:24 LICENSE -rw-r--r-- 1 ***** ***** 25G Aug 26 12:24 text-train.arrow ```
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
127
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` I wrote a separate script just for preparing a cached file, including tokenization. Each process did use the tokenized cached file. Currently I'm testing the pipeline on 24GB text data. It took about 1.5 hour to create a cached file on `n1-highmem-16 (16 vCPUs, 104 GB memory)`. I assume loading this cached file in the main script with `xla_spawn.py` won't be an issue (even if there are 8 processes). ``` total 98G drwxr-xr-x 2 ***** ***** 4.0K Aug 26 13:38 . drwxr-xr-x 3 ***** ***** 4.0K Aug 26 12:24 .. -rw------- 1 ***** ***** 74G Aug 26 13:38 cache-a7aa04134ba7b1aff5d9710f14a4e334.arrow -rw-r--r-- 1 ***** ***** 681 Aug 26 12:24 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 26 12:24 LICENSE -rw-r--r-- 1 ***** ***** 25G Aug 26 12:24 text-train.arrow ```
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
Sorry, I thought it was working, but actually the second call doesn't use the cached file that was generated separately, and it will generate another cache-****.arrorw file with a different name. If I run the training script again (with `xla_spawn.py`), it will use the second cached file, which was generated by the training script itself in the previous run. ``` drwxr-xr-x 2 ***** ***** 4.0K Aug 26 15:35 . drwxr-xr-x 3 ***** ***** 4.0K Aug 26 15:29 .. -rw------- 1 ***** ***** 99M Aug 26 15:35 cache-0d77dfce704493dbe63f071eed6a5431.arrow -rw------- 1 ***** ***** 99M Aug 26 15:29 cache-69633651476e943b93c89ace715f9487.arrow -rw-r--r-- 1 ***** ***** 670 Aug 26 15:33 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 26 15:33 LICENSE -rw-r--r-- 1 ***** ***** 33M Aug 26 15:29 text-train.arrow ```
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
124
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` Sorry, I thought it was working, but actually the second call doesn't use the cached file that was generated separately, and it will generate another cache-****.arrorw file with a different name. If I run the training script again (with `xla_spawn.py`), it will use the second cached file, which was generated by the training script itself in the previous run. ``` drwxr-xr-x 2 ***** ***** 4.0K Aug 26 15:35 . drwxr-xr-x 3 ***** ***** 4.0K Aug 26 15:29 .. -rw------- 1 ***** ***** 99M Aug 26 15:35 cache-0d77dfce704493dbe63f071eed6a5431.arrow -rw------- 1 ***** ***** 99M Aug 26 15:29 cache-69633651476e943b93c89ace715f9487.arrow -rw-r--r-- 1 ***** ***** 670 Aug 26 15:33 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 26 15:33 LICENSE -rw-r--r-- 1 ***** ***** 33M Aug 26 15:29 text-train.arrow ```
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
So if I understand correctly it means that the cached file generated by your separated script is different by the one used by the training script ?
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
27
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` So if I understand correctly it means that the cached file generated by your separated script is different by the one used by the training script ?
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
Yes. 1. `cache-69633651476e943b93c89ace715f9487.arrow` was generated with a separate script. 2. I ran the entire script with `xla_spawn.py`. 3. `cache-69633651476e943b93c89ace715f9487.arrow` is not used. 4. `cache-0d77dfce704493dbe63f071eed6a5431.arrow` is created. 5. training starts... Now, if I kill the process at step 5, and do the step 2 again, it will use `cache-0d77dfce704493dbe63f071eed6a5431.arrow` (cached file created at step 4) without any issue. I used the following to generate the first cached file. ```python dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) ```
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
85
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` Yes. 1. `cache-69633651476e943b93c89ace715f9487.arrow` was generated with a separate script. 2. I ran the entire script with `xla_spawn.py`. 3. `cache-69633651476e943b93c89ace715f9487.arrow` is not used. 4. `cache-0d77dfce704493dbe63f071eed6a5431.arrow` is created. 5. training starts... Now, if I kill the process at step 5, and do the step 2 again, it will use `cache-0d77dfce704493dbe63f071eed6a5431.arrow` (cached file created at step 4) without any issue. I used the following to generate the first cached file. ```python dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) ```
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
1. Here's the log from the first step. ``` Downloading and preparing dataset text/default-e84dd29acc4ad9ef (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Dataset text downloaded and prepared to /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d. Subsequent calls will reuse this data. ``` There's a file named `cache-7b1440ba7077af0f0d9035b5a55d01fc.arrow`, so it did create a cached file. ``` drwxr-xr-x 2 ***** ***** 4.0K Aug 26 15:59 . drwxr-xr-x 3 ***** ***** 4.0K Aug 26 15:58 .. -rw------- 1 ***** ***** 99M Aug 26 15:59 cache-7b1440ba7077af0f0d9035b5a55d01fc.arrow -rw-r--r-- 1 ***** ***** 670 Aug 26 15:58 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 26 15:58 LICENSE -rw-r--r-- 1 ***** ***** 33M Aug 26 15:58 text-train.arrow ``` 2. Ideally, `cache-7b1440ba7077af0f0d9035b5a55d01fc.arrow` should be used in `run_language_modeling.py` (modified version using `nlp`) with `xla_spawn.py`. But it looks like it's creating a new cached file. ``` 08/26/2020 16:13:03 - INFO - filelock - Lock 139635836351096 released on /home/*****/.cache/huggingface/datasets/3e34209a2741375a1db1ff03bf1abba1a9bd0e6016912d3ead0114b9d1ca2685.202fa4f84f552bff1f5400ae012663839c61efb3de068c6c8722d34ac0ea6192 .py.lock 08/26/2020 16:13:03 - WARNING - nlp.builder - Using custom data configuration default 08/26/2020 16:13:03 - INFO - nlp.builder - Overwrite dataset info from restored data version. 08/26/2020 16:13:03 - INFO - nlp.info - Loading Dataset info from /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d 08/26/2020 16:13:03 - INFO - nlp.builder - Reusing dataset text (/home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/26/2020 16:13:03 - INFO - nlp.builder - Constructing Dataset for split train, from /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d 08/26/2020 16:13:03 - INFO - nlp.utils.info_utils - All the checksums matched successfully for post processing resources 08/26/2020 16:13:03 - INFO - nlp.builder - Overwrite dataset info from restored data version. 08/26/2020 16:13:03 - INFO - nlp.info - Loading Dataset info from /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d 08/26/2020 16:13:03 - INFO - nlp.builder - Reusing dataset text (/home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/26/2020 16:13:03 - INFO - nlp.builder - Constructing Dataset for split train, from /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d 08/26/2020 16:13:03 - INFO - nlp.utils.info_utils - All the checksums matched successfully for post processing resources 08/26/2020 16:13:05 - INFO - nlp.arrow_dataset - Caching processed dataset at /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d/cache-0d77dfce704493dbe 63f071eed6a5431.arrow ^M 0%| | 0/100 [00:00<?, ?it/s]08/26/2020 16:13:05 - INFO - nlp.arrow_dataset - Caching processed dataset at /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6 fe661fe4d070d380d/cache-0d77dfce704493dbe63f071eed6a5431.arrow ``` There are two cached files in the directory: ``` drwxr-xr-x 2 ***** ***** 4.0K Aug 26 16:14 . drwxr-xr-x 3 ***** ***** 4.0K Aug 26 15:58 .. -rw------- 1 ***** ***** 99M Aug 26 16:14 cache-0d77dfce704493dbe63f071eed6a5431.arrow -rw------- 1 ***** ***** 99M Aug 26 15:59 cache-7b1440ba7077af0f0d9035b5a55d01fc.arrow -rw-r--r-- 1 ***** ***** 670 Aug 26 16:13 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 26 16:13 LICENSE -rw-r--r-- 1 ***** ***** 33M Aug 26 15:58 text-train.arrow ``` If I kill the process, and run it again, it will use the second cached file. ``` 08/26/2020 16:19:52 - WARNING - nlp.builder - Using custom data configuration default 08/26/2020 16:19:52 - INFO - nlp.builder - Overwrite dataset info from restored data version. 08/26/2020 16:19:52 - INFO - nlp.info - Loading Dataset info from /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d 08/26/2020 16:19:52 - INFO - nlp.builder - Reusing dataset text (/home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/26/2020 16:19:52 - INFO - nlp.builder - Constructing Dataset for split train, from /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d 08/26/2020 16:19:52 - INFO - nlp.utils.info_utils - All the checksums matched successfully for post processing resources 08/26/2020 16:19:53 - INFO - nlp.arrow_dataset - Loading cached processed dataset at /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d/cache-0d77dfce70 4493dbe63f071eed6a5431.arrow 08/26/2020 16:19:53 - INFO - nlp.arrow_dataset - Set __getitem__(key) output type to torch for ['input_ids'] columns (when key is int or slice) and don't output other (un-formatted) columns. ```
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
539
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` 1. Here's the log from the first step. ``` Downloading and preparing dataset text/default-e84dd29acc4ad9ef (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Dataset text downloaded and prepared to /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d. Subsequent calls will reuse this data. ``` There's a file named `cache-7b1440ba7077af0f0d9035b5a55d01fc.arrow`, so it did create a cached file. ``` drwxr-xr-x 2 ***** ***** 4.0K Aug 26 15:59 . drwxr-xr-x 3 ***** ***** 4.0K Aug 26 15:58 .. -rw------- 1 ***** ***** 99M Aug 26 15:59 cache-7b1440ba7077af0f0d9035b5a55d01fc.arrow -rw-r--r-- 1 ***** ***** 670 Aug 26 15:58 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 26 15:58 LICENSE -rw-r--r-- 1 ***** ***** 33M Aug 26 15:58 text-train.arrow ``` 2. Ideally, `cache-7b1440ba7077af0f0d9035b5a55d01fc.arrow` should be used in `run_language_modeling.py` (modified version using `nlp`) with `xla_spawn.py`. But it looks like it's creating a new cached file. ``` 08/26/2020 16:13:03 - INFO - filelock - Lock 139635836351096 released on /home/*****/.cache/huggingface/datasets/3e34209a2741375a1db1ff03bf1abba1a9bd0e6016912d3ead0114b9d1ca2685.202fa4f84f552bff1f5400ae012663839c61efb3de068c6c8722d34ac0ea6192 .py.lock 08/26/2020 16:13:03 - WARNING - nlp.builder - Using custom data configuration default 08/26/2020 16:13:03 - INFO - nlp.builder - Overwrite dataset info from restored data version. 08/26/2020 16:13:03 - INFO - nlp.info - Loading Dataset info from /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d 08/26/2020 16:13:03 - INFO - nlp.builder - Reusing dataset text (/home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/26/2020 16:13:03 - INFO - nlp.builder - Constructing Dataset for split train, from /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d 08/26/2020 16:13:03 - INFO - nlp.utils.info_utils - All the checksums matched successfully for post processing resources 08/26/2020 16:13:03 - INFO - nlp.builder - Overwrite dataset info from restored data version. 08/26/2020 16:13:03 - INFO - nlp.info - Loading Dataset info from /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d 08/26/2020 16:13:03 - INFO - nlp.builder - Reusing dataset text (/home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/26/2020 16:13:03 - INFO - nlp.builder - Constructing Dataset for split train, from /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d 08/26/2020 16:13:03 - INFO - nlp.utils.info_utils - All the checksums matched successfully for post processing resources 08/26/2020 16:13:05 - INFO - nlp.arrow_dataset - Caching processed dataset at /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d/cache-0d77dfce704493dbe 63f071eed6a5431.arrow ^M 0%| | 0/100 [00:00<?, ?it/s]08/26/2020 16:13:05 - INFO - nlp.arrow_dataset - Caching processed dataset at /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6 fe661fe4d070d380d/cache-0d77dfce704493dbe63f071eed6a5431.arrow ``` There are two cached files in the directory: ``` drwxr-xr-x 2 ***** ***** 4.0K Aug 26 16:14 . drwxr-xr-x 3 ***** ***** 4.0K Aug 26 15:58 .. -rw------- 1 ***** ***** 99M Aug 26 16:14 cache-0d77dfce704493dbe63f071eed6a5431.arrow -rw------- 1 ***** ***** 99M Aug 26 15:59 cache-7b1440ba7077af0f0d9035b5a55d01fc.arrow -rw-r--r-- 1 ***** ***** 670 Aug 26 16:13 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 26 16:13 LICENSE -rw-r--r-- 1 ***** ***** 33M Aug 26 15:58 text-train.arrow ``` If I kill the process, and run it again, it will use the second cached file. ``` 08/26/2020 16:19:52 - WARNING - nlp.builder - Using custom data configuration default 08/26/2020 16:19:52 - INFO - nlp.builder - Overwrite dataset info from restored data version. 08/26/2020 16:19:52 - INFO - nlp.info - Loading Dataset info from /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d 08/26/2020 16:19:52 - INFO - nlp.builder - Reusing dataset text (/home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/26/2020 16:19:52 - INFO - nlp.builder - Constructing Dataset for split train, from /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d 08/26/2020 16:19:52 - INFO - nlp.utils.info_utils - All the checksums matched successfully for post processing resources 08/26/2020 16:19:53 - INFO - nlp.arrow_dataset - Loading cached processed dataset at /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d/cache-0d77dfce70 4493dbe63f071eed6a5431.arrow 08/26/2020 16:19:53 - INFO - nlp.arrow_dataset - Set __getitem__(key) output type to torch for ['input_ids'] columns (when key is int or slice) and don't output other (un-formatted) columns. ```
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
Thanks for all the details. The two cached files are supposed to be the same. I suspect that the caching has a problem with the tokenizer. Which tokenizer did you use ?
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
32
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` Thanks for all the details. The two cached files are supposed to be the same. I suspect that the caching has a problem with the tokenizer. Which tokenizer did you use ?
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
I trained a byte-level BPE tokenizer on my data with `tokenziers` library following this [example](https://github.com/huggingface/tokenizers/blob/master/bindings/python/examples/train_bytelevel_bpe.py). And I put these model files in a directory named `"model_name"`. I also put config.json, which is the original RoBERTa config file. ```bash %ls model_name config.json merges.txt vocab.json ``` [This](https://github.com/huggingface/transformers/blob/4bd7be9a4268221d2a0000c7e8033aaeb365c03b/examples/language-modeling/run_language_modeling.py#L196) is the line where `run_language_modeling.py` loads the tokenier. ```python tokenizer = AutoTokenizer.from_pretrained(model_args.tokenizer_name, cache_dir=model_args.cache_dir) ``` I use `"model_name"` for `model_args.tokenizer_name`. I don't specify `model_args.cache_dir`. It is 'None' by default.
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
73
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` I trained a byte-level BPE tokenizer on my data with `tokenziers` library following this [example](https://github.com/huggingface/tokenizers/blob/master/bindings/python/examples/train_bytelevel_bpe.py). And I put these model files in a directory named `"model_name"`. I also put config.json, which is the original RoBERTa config file. ```bash %ls model_name config.json merges.txt vocab.json ``` [This](https://github.com/huggingface/transformers/blob/4bd7be9a4268221d2a0000c7e8033aaeb365c03b/examples/language-modeling/run_language_modeling.py#L196) is the line where `run_language_modeling.py` loads the tokenier. ```python tokenizer = AutoTokenizer.from_pretrained(model_args.tokenizer_name, cache_dir=model_args.cache_dir) ``` I use `"model_name"` for `model_args.tokenizer_name`. I don't specify `model_args.cache_dir`. It is 'None' by default.
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
In my separated script for caching, I'm using `use_fast=True` when initializing a tokenizer. ```python tokenizer = AutoTokenizer.from_pretrained(args.config_name, use_fast=True) ``` I wasn't using that option in the main script. That could be the reason...
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
33
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` In my separated script for caching, I'm using `use_fast=True` when initializing a tokenizer. ```python tokenizer = AutoTokenizer.from_pretrained(args.config_name, use_fast=True) ``` I wasn't using that option in the main script. That could be the reason...
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
Yea it could definitely explain why you have two different cache files. Let me know if using the same tokenizers on both sides fixes the issue
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
26
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` Yea it could definitely explain why you have two different cache files. Let me know if using the same tokenizers on both sides fixes the issue
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
It still creates a new file even if I remove `use_fast=True`... Here's the script used to create a cached file. ```python #!/usr/bin/env python3 import argparse from transformers import AutoTokenizer from nlp import load_dataset def main(): parser = argparse.ArgumentParser(description='description') parser.add_argument('--config_name', type=str, help='Pretrained config name or path if not the same as model_name') parser.add_argument('--data_file', type=str, help='The input data file (a text file).') parser.add_argument('--block_size', type=int, default=-1, help='The training dataset will be truncated in block of this size for training') args = parser.parse_args() tokenizer = AutoTokenizer.from_pretrained(args.config_name) dataset = load_dataset("text", data_files=args.data_file, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) if __name__ == "__main__": main() ``` Here's how the data is loaded in the modified `run_language_modeling.py`. [[original function](https://github.com/huggingface/transformers/blob/971d1802d009d9996b36a34a34477cee849ef39f/examples/language-modeling/run_language_modeling.py#L128-L135)] ```python def get_dataset(args: DataTrainingArguments, tokenizer: PreTrainedTokenizer, evaluate=False): file_path = args.eval_data_file if evaluate else args.train_data_file split = "validation" if evaluate else "train" if args.line_by_line: # return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset else: return TextDataset( tokenizer=tokenizer, file_path=file_path, block_size=args.block_size, overwrite_cache=args.overwrite_cache ) ``` Probably I don't need this part in the main script, ```python dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) ``` and simply do this? ```python dataset = load_dataset("text", data_files=file_path, split="train") return dataset ```
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
207
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` It still creates a new file even if I remove `use_fast=True`... Here's the script used to create a cached file. ```python #!/usr/bin/env python3 import argparse from transformers import AutoTokenizer from nlp import load_dataset def main(): parser = argparse.ArgumentParser(description='description') parser.add_argument('--config_name', type=str, help='Pretrained config name or path if not the same as model_name') parser.add_argument('--data_file', type=str, help='The input data file (a text file).') parser.add_argument('--block_size', type=int, default=-1, help='The training dataset will be truncated in block of this size for training') args = parser.parse_args() tokenizer = AutoTokenizer.from_pretrained(args.config_name) dataset = load_dataset("text", data_files=args.data_file, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) if __name__ == "__main__": main() ``` Here's how the data is loaded in the modified `run_language_modeling.py`. [[original function](https://github.com/huggingface/transformers/blob/971d1802d009d9996b36a34a34477cee849ef39f/examples/language-modeling/run_language_modeling.py#L128-L135)] ```python def get_dataset(args: DataTrainingArguments, tokenizer: PreTrainedTokenizer, evaluate=False): file_path = args.eval_data_file if evaluate else args.train_data_file split = "validation" if evaluate else "train" if args.line_by_line: # return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset else: return TextDataset( tokenizer=tokenizer, file_path=file_path, block_size=args.block_size, overwrite_cache=args.overwrite_cache ) ``` Probably I don't need this part in the main script, ```python dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) ``` and simply do this? ```python dataset = load_dataset("text", data_files=file_path, split="train") return dataset ```
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
You need this part in the main script or it will use the dataset that is not tokenized
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
18
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` You need this part in the main script or it will use the dataset that is not tokenized
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
I can see that the tokenizer in `run_language_modeling.py` is not instantiated the same way as in your separated script. Indeed we can see L196: ```python tokenizer = AutoTokenizer.from_pretrained(model_args.tokenizer_name, cache_dir=model_args.cache_dir) ``` Could you try to make it so they are instantiated the exact same way please ?
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
46
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` I can see that the tokenizer in `run_language_modeling.py` is not instantiated the same way as in your separated script. Indeed we can see L196: ```python tokenizer = AutoTokenizer.from_pretrained(model_args.tokenizer_name, cache_dir=model_args.cache_dir) ``` Could you try to make it so they are instantiated the exact same way please ?
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
I updated my separated script, but it's creating a cached file again. If I don't use the `model_args.cache_dir`, both will get `None`, so they should be the same. ```python #!/usr/bin/env python3 import argparse from transformers import AutoTokenizer from nlp import load_dataset def main(): parser = argparse.ArgumentParser(description='description') parser.add_argument('--tokenizer_name', type=str, help='Pretrained tokenizer name or path if not the same as model_name') parser.add_argument('--data_file', type=str, help='The input data file (a text file).') parser.add_argument('--cache_dir', type=str, default=None, help='Where do you want to store the pretrained models downloaded from s3') parser.add_argument('--block_size', type=int, default=-1, help='The training dataset will be truncated in block of this size for training') model_args = parser.parse_args() tokenizer = AutoTokenizer.from_pretrained(model_args.tokenizer_name, cache_dir=model_args.cache_dir) dataset = load_dataset("text", data_files=model_args.data_file, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=model_args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) if __name__ == "__main__": main() ``` Is there a way to specify the cache file to load, and skip the re-computation?
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
143
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` I updated my separated script, but it's creating a cached file again. If I don't use the `model_args.cache_dir`, both will get `None`, so they should be the same. ```python #!/usr/bin/env python3 import argparse from transformers import AutoTokenizer from nlp import load_dataset def main(): parser = argparse.ArgumentParser(description='description') parser.add_argument('--tokenizer_name', type=str, help='Pretrained tokenizer name or path if not the same as model_name') parser.add_argument('--data_file', type=str, help='The input data file (a text file).') parser.add_argument('--cache_dir', type=str, default=None, help='Where do you want to store the pretrained models downloaded from s3') parser.add_argument('--block_size', type=int, default=-1, help='The training dataset will be truncated in block of this size for training') model_args = parser.parse_args() tokenizer = AutoTokenizer.from_pretrained(model_args.tokenizer_name, cache_dir=model_args.cache_dir) dataset = load_dataset("text", data_files=model_args.data_file, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=model_args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) if __name__ == "__main__": main() ``` Is there a way to specify the cache file to load, and skip the re-computation?
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
Could you also check that the `args.block_size` used in the lambda function is the same as well ?
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
18
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` Could you also check that the `args.block_size` used in the lambda function is the same as well ?
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
Here's a minimal working example to reproduce this issue. Assumption: - You have access to TPU. - You have installed `transformers` and `nlp`. - You have tokenizer files (`config.json`, `merges.txt`, `vocab.json`) under the directory named `model_name`. - You have `xla_spawn.py` (Download from https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py). - You have saved the following script as `prepare_cached_dataset.py`. ```python #!/usr/bin/env python3 import argparse from transformers import AutoTokenizer from nlp import load_dataset def main(): parser = argparse.ArgumentParser(description='description') parser.add_argument('--tokenizer_name', type=str, help='Pretrained tokenizer name or path if not the same as model_name') parser.add_argument('--data_file', type=str, help='The input data file (a text file).') parser.add_argument('--cache_dir', type=str, default=None, help='Where do you want to store the pretrained models downloaded from s3') parser.add_argument('--block_size', type=int, default=-1, help='The training dataset will be truncated in block of this size for training') parser.add_argument('--tpu_num_cores', type=int, default=1, help='Number of TPU cores to use (1 or 8). For xla_apwan.py') model_args = parser.parse_args() tokenizer = AutoTokenizer.from_pretrained(model_args.tokenizer_name, cache_dir=model_args.cache_dir, use_fast=True) dataset = load_dataset("text", data_files=model_args.data_file, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=model_args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) def _mp_fn(index): # For xla_spawn (TPUs) main() if __name__ == "__main__": main() ``` - Run the following command. Replace `your_training_data` with some text file. ```bash export TRAIN_DATA=your_training_data python prepare_cached_dataset.py \ --tokenizer_name=model_name \ --block_size=512 \ --data_file=$TRAIN_DATA ``` - Check the cached directory. ```bash ls -lha /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d total 132M drwxr-xr-x 2 ***** ***** 4.0K Aug 28 13:08 . drwxr-xr-x 3 ***** ***** 4.0K Aug 28 13:08 .. -rw------- 1 ***** ***** 99M Aug 28 13:08 cache-bfc7cb0702426d19242db5e8c079f04b.arrow -rw-r--r-- 1 ***** ***** 670 Aug 28 13:08 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 28 13:08 LICENSE -rw-r--r-- 1 ***** ***** 33M Aug 28 13:08 text-train.arrow ``` - Run the same script again. (The output should be just `Using custom data configuration default`.) ``` python prepare_cached_dataset.py \ --tokenizer_name=model_name \ --block_size=512 \ --data_file=$TRAIN_DATA ``` - Check the cached directory. ```bash ls -lha /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d total 132M drwxr-xr-x 2 ***** ***** 4.0K Aug 28 13:08 . drwxr-xr-x 3 ***** ***** 4.0K Aug 28 13:08 .. -rw------- 1 ***** ***** 99M Aug 28 13:08 cache-bfc7cb0702426d19242db5e8c079f04b.arrow -rw-r--r-- 1 ***** ***** 670 Aug 28 13:20 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 28 13:20 LICENSE -rw-r--r-- 1 ***** ***** 33M Aug 28 13:08 text-train.arrow ``` - The cached file (`cache-bfc7cb0702426d19242db5e8c079f04b.arrow`) is reused. - Now, run this script with `xla_spawn.py`. Ideally, it should reuse the cached file, however, you will see each process is creating a cache file again. ```bash python xla_spawn.py --num_cores 8 \ prepare_cached_dataset.py \ --tokenizer_name=model_name \ --block_size=512 \ --data_file=$TRAIN_DATA ``` - Check the cached directory. There are two arrrow files. ```bash ls -lha /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d total 230M drwxr-xr-x 2 ***** ***** 4.0K Aug 28 13:25 . drwxr-xr-x 3 ***** ***** 4.0K Aug 28 13:08 .. -rw------- 1 ***** ***** 99M Aug 28 13:08 cache-bfc7cb0702426d19242db5e8c079f04b.arrow -rw------- 1 ***** ***** 99M Aug 28 13:25 cache-e0e2313e49c8a110aafcc8133154c19a.arrow -rw-r--r-- 1 ***** ***** 670 Aug 28 13:24 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 28 13:24 LICENSE -rw-r--r-- 1 ***** ***** 33M Aug 28 13:08 text-train.arrow ```
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
482
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` Here's a minimal working example to reproduce this issue. Assumption: - You have access to TPU. - You have installed `transformers` and `nlp`. - You have tokenizer files (`config.json`, `merges.txt`, `vocab.json`) under the directory named `model_name`. - You have `xla_spawn.py` (Download from https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py). - You have saved the following script as `prepare_cached_dataset.py`. ```python #!/usr/bin/env python3 import argparse from transformers import AutoTokenizer from nlp import load_dataset def main(): parser = argparse.ArgumentParser(description='description') parser.add_argument('--tokenizer_name', type=str, help='Pretrained tokenizer name or path if not the same as model_name') parser.add_argument('--data_file', type=str, help='The input data file (a text file).') parser.add_argument('--cache_dir', type=str, default=None, help='Where do you want to store the pretrained models downloaded from s3') parser.add_argument('--block_size', type=int, default=-1, help='The training dataset will be truncated in block of this size for training') parser.add_argument('--tpu_num_cores', type=int, default=1, help='Number of TPU cores to use (1 or 8). For xla_apwan.py') model_args = parser.parse_args() tokenizer = AutoTokenizer.from_pretrained(model_args.tokenizer_name, cache_dir=model_args.cache_dir, use_fast=True) dataset = load_dataset("text", data_files=model_args.data_file, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=model_args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) def _mp_fn(index): # For xla_spawn (TPUs) main() if __name__ == "__main__": main() ``` - Run the following command. Replace `your_training_data` with some text file. ```bash export TRAIN_DATA=your_training_data python prepare_cached_dataset.py \ --tokenizer_name=model_name \ --block_size=512 \ --data_file=$TRAIN_DATA ``` - Check the cached directory. ```bash ls -lha /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d total 132M drwxr-xr-x 2 ***** ***** 4.0K Aug 28 13:08 . drwxr-xr-x 3 ***** ***** 4.0K Aug 28 13:08 .. -rw------- 1 ***** ***** 99M Aug 28 13:08 cache-bfc7cb0702426d19242db5e8c079f04b.arrow -rw-r--r-- 1 ***** ***** 670 Aug 28 13:08 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 28 13:08 LICENSE -rw-r--r-- 1 ***** ***** 33M Aug 28 13:08 text-train.arrow ``` - Run the same script again. (The output should be just `Using custom data configuration default`.) ``` python prepare_cached_dataset.py \ --tokenizer_name=model_name \ --block_size=512 \ --data_file=$TRAIN_DATA ``` - Check the cached directory. ```bash ls -lha /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d total 132M drwxr-xr-x 2 ***** ***** 4.0K Aug 28 13:08 . drwxr-xr-x 3 ***** ***** 4.0K Aug 28 13:08 .. -rw------- 1 ***** ***** 99M Aug 28 13:08 cache-bfc7cb0702426d19242db5e8c079f04b.arrow -rw-r--r-- 1 ***** ***** 670 Aug 28 13:20 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 28 13:20 LICENSE -rw-r--r-- 1 ***** ***** 33M Aug 28 13:08 text-train.arrow ``` - The cached file (`cache-bfc7cb0702426d19242db5e8c079f04b.arrow`) is reused. - Now, run this script with `xla_spawn.py`. Ideally, it should reuse the cached file, however, you will see each process is creating a cache file again. ```bash python xla_spawn.py --num_cores 8 \ prepare_cached_dataset.py \ --tokenizer_name=model_name \ --block_size=512 \ --data_file=$TRAIN_DATA ``` - Check the cached directory. There are two arrrow files. ```bash ls -lha /home/*****/.cache/huggingface/datasets/text/default-e84dd29acc4ad9ef/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d total 230M drwxr-xr-x 2 ***** ***** 4.0K Aug 28 13:25 . drwxr-xr-x 3 ***** ***** 4.0K Aug 28 13:08 .. -rw------- 1 ***** ***** 99M Aug 28 13:08 cache-bfc7cb0702426d19242db5e8c079f04b.arrow -rw------- 1 ***** ***** 99M Aug 28 13:25 cache-e0e2313e49c8a110aafcc8133154c19a.arrow -rw-r--r-- 1 ***** ***** 670 Aug 28 13:24 dataset_info.json -rw-r--r-- 1 ***** ***** 0 Aug 28 13:24 LICENSE -rw-r--r-- 1 ***** ***** 33M Aug 28 13:08 text-train.arrow ```
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/532
File exists error when used with TPU
I ended up specifying the `cache_file_name` argument when I call `map` function. ```python dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True, cache_file_name=cache_file_name) ``` Note: - `text` dataset in `nlp` does not strip `"\n"`. If you want the same output as in [`LineByLineTextDataset`](https://github.com/huggingface/transformers/blob/afc4ece462ad83a090af620ff4da099a0272e171/src/transformers/data/datasets/language_modeling.py#L88-L111), you would need to create your own dataset class where you replace `line` to `line.strip()` [here](https://github.com/huggingface/nlp/blob/master/datasets/text/text.py#L35).
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
59
File exists error when used with TPU Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ``` I ended up specifying the `cache_file_name` argument when I call `map` function. ```python dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True, cache_file_name=cache_file_name) ``` Note: - `text` dataset in `nlp` does not strip `"\n"`. If you want the same output as in [`LineByLineTextDataset`](https://github.com/huggingface/transformers/blob/afc4ece462ad83a090af620ff4da099a0272e171/src/transformers/data/datasets/language_modeling.py#L88-L111), you would need to create your own dataset class where you replace `line` to `line.strip()` [here](https://github.com/huggingface/nlp/blob/master/datasets/text/text.py#L35).
[ -0.07983776926994324, -0.14423392713069916, 0.14691787958145142, 0.10474859178066254, 0.23922370374202728, -0.18302640318870544, 0.524798572063446, 0.25875237584114075, -0.27690333127975464, 0.14120540022850037, 0.10993073880672455, -0.2591760456562042, -0.03965620696544647, -0.2304336577653885, 0.27454453706741333, -0.19792164862155914, 0.19622591137886047, 0.32097679376602173, -0.19095849990844727, -0.0990930050611496, -0.09472674131393433, 0.29280370473861694, -0.041868891566991806, 0.1614845246076584, -0.679123044013977, 0.14131735265254974, -0.18307949602603912, 0.2864961326122284, 0.1081085205078125, -0.30614593625068665, 0.1703537106513977, 0.06269858777523041, 0.2858565151691437, 0.5413052439689636, -0.0001269419299205765, 0.3936149477958679, 0.19480496644973755, -0.25277265906333923, -0.05959676206111908, -0.16414575278759003, 0.3079848885536194, -0.03249291330575943, 0.07161076366901398, -0.11299369484186172, -0.12933602929115295, 0.10144419223070145, 0.34177064895629883, 0.004101179540157318, 0.47132742404937744, 0.253804475069046, -0.011197146028280258, 0.7012701034545898, 0.0628262460231781, -0.18662452697753906, -0.021889477968215942, 0.279674232006073, -0.10074315220117569, 0.12284959852695465, 0.3792981505393982, -0.24681662023067474, 0.05209274962544441, 0.09281669557094574, 0.22088997066020966, -0.20923618972301483, -0.08014708012342453, 0.24557845294475555, 0.4375517666339874, -0.08007311820983887, 0.016403907909989357, 0.22476020455360413, 0.21141263842582703, -0.2419928014278412, -0.4570934772491455, -0.4064099192619324, -0.008726331405341625, -0.3136442005634308, 0.5325063467025757, 0.1598007082939148, -0.2045145332813263, 0.27584198117256165, -0.06761367619037628, -0.00358675979077816, -0.03819337114691734, -0.056038133800029755, 0.11500771343708038, 0.29272300004959106, 0.11431585252285004, -0.019800320267677307, -0.04027789458632469, 0.07669472694396973, -0.2098604142665863, -0.08977775275707245, 0.138093039393425, 0.3785311281681061, -0.23911194503307343, -0.253088116645813, -0.1679154336452484, -0.5764265060424805, -0.1399088203907013, 0.017064211890101433, -0.011771977879106998, -0.35828882455825806, -0.2725009322166443, 0.0793670266866684, 0.5551711320877075, 0.17522162199020386, -0.18730396032333374, 0.045078832656145096, 0.04712502658367157, 0.10278747975826263, -0.1314999759197235, -0.08404721319675446, -0.3446531593799591, -0.23173990845680237, -0.2921248972415924, -0.09940239042043686, 0.041931189596652985, 0.08656644821166992, -0.03012981079518795, -0.17014209926128387, -0.3134409487247467, 0.08874287456274033, 0.15426582098007202, 0.09399688988924026, 0.1844557821750641, 0.33482351899147034, 0.44950300455093384, 0.012692678719758987, -0.5675527453422546, -0.3265126645565033, -0.19464249908924103, -0.10329116880893707, -0.39785271883010864, -0.04394365847110748, 0.24426119029521942, -0.11689813435077667, 0.28834858536720276, -0.26038694381713867, 0.27654409408569336, -0.07804644852876663, -0.1356097012758255, -0.08732737600803375, 0.04911138489842415, 0.36198529601097107, -0.060504764318466187, -0.10394198447465897, 0.04959600046277046, -0.3493095636367798, -0.18177072703838348, 0.3404088318347931, -0.16993874311447144, -0.3592527210712433, 0.03147166594862938, 0.018451932817697525, -0.10310519486665726, 0.061226677149534225, 0.1891767382621765, 0.0949116051197052, 0.5039546489715576, -0.541641354560852, -0.06288569420576096, 0.01210322231054306, -0.30746275186538696, 0.1219957172870636, 0.17852425575256348, 0.5345862507820129, -0.008131217211484909, -0.1637236624956131, -0.14485177397727966, -0.35432615876197815, 0.023880504071712494, 0.47700628638267517, -0.11616165935993195, 0.4217160642147064, -0.27567294239997864, 0.19752226769924164, 0.2805542051792145, -0.34855517745018005, -0.04875732958316803, 0.29193490743637085, -0.2538609504699707, -0.17221181094646454, 0.16699853539466858, -0.2795720100402832, -0.29119205474853516, -0.30798083543777466, 0.06372096389532089, 0.05106385052204132, -0.0008884388953447342, 0.0401974692940712, -0.26024624705314636, -0.11938002705574036, -0.4364042282104492, 0.1627895087003708, 0.0766468197107315, 0.1036471426486969, -0.09204276651144028, 0.6391341090202332, 0.2819697856903076, 0.059562548995018005, 0.28971830010414124, -0.007305562496185303, 0.14703528583049774, 0.11780761182308197, -0.08998636156320572, 0.13485345244407654, 0.008560284972190857, 0.10452953726053238, -0.03177653253078461, 0.39920103549957275, -0.00990719348192215, -0.06524530053138733, 0.264710396528244, 0.17422044277191162, 0.00906389206647873, -0.3494713306427002, -0.06047145277261734, 0.024123169481754303, -0.17900051176548004, 0.14900372922420502, -0.30809977650642395, 0.03289327025413513, -0.1788245439529419, 0.0819593071937561, -0.22772818803787231, 0.2888811230659485, -0.12374959141016006, -0.25704601407051086, -0.10843075811862946, 0.38963478803634644, -0.4102819859981537, 0.026016009971499443, -0.06656952202320099, 0.3695501387119293, -0.14946553111076355, 0.21674752235412598, 0.07019630074501038, 0.2750687003135681, 0.4112747311592102, 0.10220678150653839, -0.1609392613172531, 0.270415335893631, 0.07338492572307587, -0.027739521116018295, -0.1982131004333496, 0.20008349418640137, 0.08434781432151794, -0.08787257224321365, 0.457655131816864, -0.1464756727218628, 0.18579672276973724, -0.08601607382297516, -0.011557038873434067, -0.1726844310760498, 0.15852601826190948, 0.3137044906616211, 0.07976885139942169, 0.2871513366699219, -0.2362147718667984, -0.32266274094581604, 0.48514267802238464, -0.10818322002887726, 0.08468285948038101, 0.12357675284147263, 0.05675825476646423, 0.004567362368106842, -0.09964465349912643, 0.10381649434566498, 0.7618494033813477, 0.03037283569574356, 0.07468440383672714, 0.2042749524116516, 0.0024271979928016663, -0.4016209542751312, 0.31457456946372986, 0.019969839602708817, 0.14789915084838867, 0.36035633087158203, 0.04564700648188591, 0.13582351803779602, -0.22017109394073486, -0.20864197611808777, 0.012513527646660805, 0.10766999423503876, -0.33809199929237366, -0.03057047724723816, -0.12948182225227356, -0.2260112166404724, -0.6135125160217285, 0.37388595938682556, -0.21475842595100403, 0.030070284381508827, 0.185993030667305, -0.15213674306869507, -0.37981605529785156, 0.22763565182685852, 0.24274995923042297, 0.41204434633255005, -0.04003468155860901, -0.10047133266925812, 0.2312813103199005, -0.25328731536865234, -0.413809210062027, -0.07163143157958984, 0.18341064453125, -0.18398217856884003, -0.1943468302488327, -0.18559250235557556, 0.05169595777988434, 0.1973850131034851, -0.2839449346065521, 0.2684099078178406, 0.14963337779045105, 0.012864844873547554, 0.061101797968149185, -0.022094719111919403, -0.0020253174006938934, -0.33884555101394653, 0.3798144459724426, -0.3485738933086395, -0.3173537254333496, -0.011660137213766575, 0.23638422787189484, -0.11020934581756592, -0.31552669405937195, -0.34238335490226746, -0.014464987441897392, -0.27460116147994995, 0.12984603643417358, -0.03748777136206627, 0.21619859337806702, 0.4914862811565399, 0.3568272888660431, 0.16636207699775696, -0.15252622961997986, -0.19840626418590546, 0.15357491374015808, -0.26590773463249207, 0.029519906267523766, -0.22067053616046906, -0.23147882521152496, 0.005899693816900253, -0.22144052386283875, 0.3120182752609253, 0.05770616978406906, -0.2935744524002075, -0.203081414103508, 0.12792596220970154, -0.11662900447845459, 0.10981391370296478, 0.3292253911495209, 0.5302073955535889, 0.034647002816200256, -0.09248428791761398, -0.059445105493068695, -0.012162657454609871, 0.4074864983558655, -0.023123089224100113, 0.3068991005420685, 0.018185388296842575, 0.21833452582359314, 0.14592444896697998, 0.7025522589683533, 0.23155933618545532, -0.08314651250839233, 0.1190381571650505, -0.03451868146657944, 0.3092693090438843, -0.25308749079704285, 0.055553071200847626, 0.023594003170728683, 0.28669846057891846, -0.059413205832242966, 0.5606921315193176, 0.1877897083759308, -0.0019269604235887527, -0.21921144425868988, 0.0443904884159565, -0.10453999042510986, -0.37893757224082947, 0.3051448464393616, 0.015506966039538383, 0.502689778804779, -0.10644885897636414, -0.2906707525253296, 0.10979454219341278, 0.0504855252802372, -0.16469703614711761, 0.493009090423584, 0.15739765763282776, 0.09625007212162018, 0.015695784240961075, 0.043591540306806564, -0.19542068243026733, -0.09421737492084503, 0.17727766931056976, 0.5306166410446167, -0.24244043231010437, -0.29748111963272095, 0.15511399507522583, 0.13653428852558136, 0.1886739730834961, -0.027781518176198006, -0.19245009124279022, -0.01621946133673191, -0.31381967663764954, -0.19200004637241364, 0.020692873746156693, -0.019026633352041245, -0.2417091578245163, 0.40245598554611206, 0.5562252998352051, -0.10238616168498993, -0.4468144178390503, 0.08318378031253815, -0.22281137108802795, -0.15952788293361664, -0.25309911370277405, -0.49399837851524353, -0.2606782019138336, -0.4263852834701538, -0.0009274110198020935, 0.17537693679332733, 0.0783526673913002, -0.04562940448522568, 0.43155884742736816, -0.11515167355537415, -0.021490102633833885, -0.017686963081359863, -0.0781208872795105, 0.055507585406303406, -0.22893519699573517, 0.10361367464065552, 0.28591853380203247, 0.02246854081749916, -0.11998243629932404, 0.2650676369667053, -0.07067641615867615, -0.14861521124839783, 0.040293458849191666, 0.09242556989192963, 0.3039664328098297, 0.5088418126106262, -0.02220584824681282, -0.046116240322589874, 0.3289165794849396, -0.033121414482593536, -0.39468345046043396, -0.06681516021490097, 0.129123717546463, -0.24726378917694092, -0.07798974215984344, -0.24809858202934265, 0.28463810682296753, -0.012613289058208466, 0.07817845046520233, -0.009110160171985626, -0.13036003708839417, -0.39140892028808594, 0.3210020661354065, -0.09690441936254501, 1.0393942594528198, -0.008401945233345032, 0.6120118498802185, 0.381850928068161, 0.11267703771591187, 0.3598700761795044, -0.4737098217010498, 0.3548019528388977, -0.2686956524848938, -0.2874268889427185, -0.015140830539166927, -0.0034191831946372986, 0.22829166054725647, 0.5558606386184692, -0.19656601548194885, 0.04781747981905937, 0.5781374573707581, 0.1090812236070633, 0.26794689893722534, 0.12112368643283844, -0.10756584256887436, -0.3451637625694275, -0.3952367305755615, -0.1394961178302765, 0.22835130989551544, 0.4478606581687927, -0.11055805534124374, -0.22784897685050964, -0.07495434582233429, -0.07939444482326508, -0.06094934791326523, 0.06130930036306381, -0.22407084703445435, 0.06248154863715172, 0.50275057554245, 0.01887243241071701, 0.29750826954841614, 0.37346845865249634, 0.16822491586208344, 0.1691642701625824, -0.07241805642843246, 0.4037237763404846, -0.10062482208013535, -0.024205293506383896, -0.16720755398273468, 0.05615442991256714, 0.33364614844322205, -0.15726947784423828, -0.1032654270529747, -0.2670709490776062, -0.2405526041984558, -0.21159324049949646, -0.06522934883832932, -0.15520808100700378, -0.12097501754760742, -0.03919399157166481, -0.09706801176071167, 0.3202841877937317, -0.3403373956680298, 0.06869249045848846, 0.034571804106235504, 0.08110494911670685, -0.3682992160320282, -0.3365429937839508, -0.11376151442527771, -0.15862193703651428, 0.03434896841645241, 0.4634488523006439, 0.014319369569420815, -0.07092905044555664, 0.5357794761657715, 0.10478493571281433, 0.0940946638584137, -0.19019830226898193, 0.0638120248913765, 0.12962155044078827, -0.8252719044685364, 0.2144869714975357, 0.15498945116996765, -0.2786579728126526, 0.11838439851999283, 0.30023932456970215, 0.2092139571905136, -0.20258638262748718, 0.04382302984595299, -0.2727164030075073, -0.41228780150413513, 0.15113377571105957, -0.27087754011154175, 0.08149052411317825, 0.2648312449455261, 0.6853189468383789, 0.3507692813873291, 0.05349694937467575, -0.14975294470787048, -0.017896661534905434, -0.27382755279541016, 0.17232054471969604, 0.17171324789524078, -0.17611178755760193, 0.257440984249115, -0.047372784465551376, -0.12644575536251068, 0.2257915586233139, -0.23927688598632812, 0.03205706551671028, -0.07980222254991531, 0.23393000662326813, 0.32331782579421997, -0.08934687823057175, 0.2869097888469696, 0.13969872891902924, -0.10932706296443939, -0.14904117584228516, 0.1398930549621582, -0.11061937361955643, -0.14816683530807495, 0.20825029909610748, 0.2583068907260895, 0.24233627319335938, -0.3391041159629822, -0.12347321212291718, -0.06135980784893036, 0.08703920245170593, 0.3047020435333252, -0.16912662982940674, -0.17740988731384277, -0.05030298978090286, -0.036733850836753845, 0.19912026822566986, -0.05489930510520935, 0.16631180047988892, 0.19989004731178284, -0.305477499961853, -0.0036396346986293793, -0.08244702219963074, 0.23885226249694824, -0.11462627351284027, -0.22898800671100616, -0.10106457769870758, 0.46548765897750854, 0.005684860050678253, -0.27086305618286133, 0.33762040734291077, 0.08646020293235779, -0.10253579169511795, -0.13980016112327576, 0.25745323300361633, 0.18262118101119995, 0.009457916021347046, -0.0797463208436966, 0.4228537380695343, 0.06862018257379532, -0.5925226807594299, 0.26102522015571594, 0.5560616850852966, 0.17005500197410583, 0.4229315221309662, -0.04921921342611313, -0.10608947277069092, 0.15307754278182983, 0.3082461953163147, -0.1963421106338501, 0.16782863438129425, -0.04047618806362152, 0.1585051268339157, 0.11199253797531128, -0.5258694887161255, -0.262784481048584, 0.2734743654727936, 0.04128911346197128, -0.03135812282562256, -0.23075330257415771, 0.4621385633945465, -0.4583755433559418, 0.21529224514961243, -0.20826378464698792, 0.24608762562274933, -0.1853477954864502, -0.2498948574066162, -0.06685047596693039, -0.07912477850914001, -0.28407683968544006, 0.034546177834272385, 0.09293824434280396, 0.19961753487586975, -0.11738480627536774, 0.1672765612602234, 0.15288867056369781, -0.3911099135875702, -0.2510307729244232, -0.010940495878458023, 0.20410341024398804, -0.12205511331558228, 0.45206883549690247, 0.18904872238636017, -0.09543408453464508, 0.25515246391296387, 0.48105061054229736, 0.24504035711288452, 0.26646870374679565, 0.16094514727592468, -0.005442727357149124, -0.26345694065093994, 0.1757069081068039, 0.032056331634521484, 0.38735827803611755, 0.497679740190506, 0.3165093958377838, 0.07175032794475555, -0.11946926265954971, -0.0642399862408638, -0.04277994856238365, 0.18717703223228455, -0.18992827832698822, -0.341801255941391, 0.8261860609054565, -0.10912418365478516, -0.13197147846221924, -0.013355456292629242, 0.11825191974639893, -0.43186989426612854, 0.31414487957954407, 0.3554549813270569, -0.0011692882981151342, 0.14974689483642578, -0.14967919886112213, -0.0445801243185997, 0.2240774780511856, 0.406202495098114, 0.2843130826950073, -0.3281782567501068, -0.24289780855178833, -0.20610268414020538, -0.5585108995437622, 0.027015089988708496, 0.04611191526055336, 0.24930617213249207, -0.034973662346601486, 0.007934659719467163, -0.06810595840215683, 0.049721673130989075, -0.34196966886520386, -0.3155044913291931, 0.0513186901807785, -0.18206632137298584, -0.1156262755393982, -0.12446297705173492, -0.20460335910320282, 0.04607237130403519, 0.06539122015237808, -0.270229309797287, -0.2537825405597687, 0.04980410635471344, -0.026444636285305023, 0.042256925255060196, 0.14931759238243103, 0.19252745807170868, 0.18141473829746246, -0.07116375863552094, 0.08841516822576523, 0.06766872107982635, 0.23108059167861938, 0.07282932847738266, -0.39859387278556824, -0.11429863423109055, -0.36129453778266907, 0.0032337307929992676, 0.0695546567440033, 0.49534013867378235, -0.40004977583885193, 0.047414105385541916, -0.29027259349823, -0.2899898588657379, -0.07521460950374603, -0.27819323539733887, -0.2372085601091385, -0.013987984508275986, -0.08273132890462875, 0.12225379049777985, 0.41288870573043823, 0.41699111461639404, -0.10424463450908661, -0.10762385278940201, -0.5772279500961304, -0.36036375164985657, 0.31000202894210815, -0.5592368841171265, -0.08740606158971786, 0.12024834752082825, -0.065582275390625, 0.025223348289728165, 0.13288916647434235, -0.642411470413208, 0.07065188139677048, 0.10750291496515274, 0.19377553462982178, -0.3184123933315277, 0.05374215170741081, 0.06116828694939613, -0.2190912663936615, 0.10695190727710724, 0.3757651448249817, 0.011092981323599815, -0.42086049914360046, 0.10008573532104492, -0.17570145428180695 ]
https://github.com/huggingface/datasets/issues/525
wmt download speed example
Thanks for creating the issue :) The download link for wmt-en-de raw looks like a mirror. We should use that instead of the current url. Is this mirror official ? Also it looks like for `ro-en` it tried to download other languages. If we manage to only download the one that is asked it'd be cool Also cc @patrickvonplaten
Continuing from the slack 1.0 roadmap thread w @lhoestq , I realized the slow downloads is only a thing sometimes. Here are a few examples, I suspect there are multiple issues. All commands were run from the same gcp us-central-1f machine. ``` import nlp nlp.load_dataset('wmt16', 'de-en') ``` Downloads at 49.1 KB/S Whereas ``` pip install gdown # download from google drive !gdown https://drive.google.com/uc?id=1iO7um-HWoNoRKDtw27YUSgyeubn9uXqj ``` Downloads at 127 MB/s. (The file is a copy of wmt-en-de raw). ``` nlp.load_dataset('wmt16', 'ro-en') ``` goes at 27 MB/s, much faster. if we wget the same data from s3 is the same download speed, but ¼ the file size: ``` wget https://s3.amazonaws.com/datasets.huggingface.co/translation/wmt_en_ro_packed_200_rand.tgz ``` Finally, ``` nlp.load_dataset('wmt19', 'zh-en') ``` Starts fast, but broken. (duplicate of #493 )
59
wmt download speed example Continuing from the slack 1.0 roadmap thread w @lhoestq , I realized the slow downloads is only a thing sometimes. Here are a few examples, I suspect there are multiple issues. All commands were run from the same gcp us-central-1f machine. ``` import nlp nlp.load_dataset('wmt16', 'de-en') ``` Downloads at 49.1 KB/S Whereas ``` pip install gdown # download from google drive !gdown https://drive.google.com/uc?id=1iO7um-HWoNoRKDtw27YUSgyeubn9uXqj ``` Downloads at 127 MB/s. (The file is a copy of wmt-en-de raw). ``` nlp.load_dataset('wmt16', 'ro-en') ``` goes at 27 MB/s, much faster. if we wget the same data from s3 is the same download speed, but ¼ the file size: ``` wget https://s3.amazonaws.com/datasets.huggingface.co/translation/wmt_en_ro_packed_200_rand.tgz ``` Finally, ``` nlp.load_dataset('wmt19', 'zh-en') ``` Starts fast, but broken. (duplicate of #493 ) Thanks for creating the issue :) The download link for wmt-en-de raw looks like a mirror. We should use that instead of the current url. Is this mirror official ? Also it looks like for `ro-en` it tried to download other languages. If we manage to only download the one that is asked it'd be cool Also cc @patrickvonplaten
[ -0.03669196367263794, -0.2923784852027893, 0.03856447711586952, 0.2077888697385788, 0.026341881603002548, -0.12157826870679855, 0.13951346278190613, 0.17278973758220673, 0.12272369861602783, -0.024007216095924377, 0.107138991355896, 0.44866666197776794, -0.07468300312757492, 0.07595489174127579, 0.26610708236694336, -0.09708145260810852, -0.017897672951221466, -0.08351758122444153, -0.5572071075439453, -0.2656836211681366, 0.07419557869434357, 0.3135089576244354, -0.10486651211977005, 0.03795013949275017, 0.010972109623253345, 0.180978924036026, -0.0905233770608902, 0.012872040271759033, -0.45721763372421265, -0.232566699385643, 0.09013868868350983, 0.17370037734508514, -0.049870193004608154, 0.18332049250602722, -0.0001086784977815114, -0.12804746627807617, 0.4216494560241699, -0.037563107907772064, -0.4472942650318146, -0.3175245523452759, -0.5728065371513367, -0.5532031655311584, -0.14771056175231934, -0.06081940233707428, 0.18575745820999146, -0.06019007787108421, 0.003948930650949478, 0.08885888755321503, 0.16877758502960205, 0.008592457510530949, 0.208749458193779, 0.24603402614593506, -0.3822530508041382, -0.13065074384212494, 0.5218654274940491, 0.025350328534841537, -0.23183758556842804, 0.48639270663261414, 0.393105685710907, 0.15960834920406342, 0.09226715564727783, 0.40005773305892944, -0.15442898869514465, 0.28643426299095154, 0.11286473274230957, 0.09454450756311417, 0.36128780245780945, -0.1099044680595398, 0.016580132767558098, 0.568859338760376, 0.3632163405418396, 0.15892557799816132, -0.39248862862586975, -0.2711538076400757, -0.005172596778720617, -0.21936362981796265, 0.10539830476045609, 0.3335309326648712, -0.312844842672348, 0.08950954675674438, -0.6589967012405396, -0.038894444704055786, 0.08594301342964172, 0.29392799735069275, 0.0006862245500087738, 0.6809971332550049, -0.09530526399612427, 0.045633841305971146, 0.08981962502002716, -0.048464179039001465, 0.012170577421784401, -0.34992820024490356, 0.0040096379816532135, 0.034817472100257874, 0.03841281309723854, -0.0830787941813469, 0.15072765946388245, -0.025307603180408478, 0.015157114714384079, 0.029827794060111046, -0.12121729552745819, 0.24146997928619385, 0.2694714367389679, -0.004359818994998932, 0.2079111784696579, 0.3571494519710541, -0.18000656366348267, -0.1756746917963028, 0.16284476220607758, 0.07527043670415878, 0.22687530517578125, 0.2538914978504181, -0.22766456007957458, -0.06773334741592407, -0.4933914840221405, -0.027607746422290802, -0.09817484021186829, -0.07902220636606216, -0.2791444659233093, -0.23971617221832275, 0.02820885181427002, -0.19650346040725708, -0.1278359442949295, 0.18904012441635132, -0.25328493118286133, 0.2782037854194641, -0.1491142064332962, 0.045209888368844986, -0.22841134667396545, -0.10674656182527542, -0.03009219653904438, -0.0015250109136104584, -0.2437833994626999, 0.00518407765775919, 0.31449589133262634, 0.21607759594917297, 0.319248765707016, 0.1389925628900528, -0.2071339637041092, -0.08756202459335327, 0.06872494518756866, 0.11659294366836548, -0.01688884198665619, -0.015576045960187912, -0.16576741635799408, 0.46622833609580994, -0.118636354804039, 0.19731847941875458, -0.3519091010093689, 0.11868087202310562, -0.3961489498615265, -0.18219827115535736, 0.09339290857315063, 0.18161073327064514, -0.3348976969718933, -0.26206132769584656, -0.03941374272108078, 0.3635921776294708, -0.32028692960739136, 0.23904955387115479, -0.0523420050740242, -0.04847661405801773, -0.25435736775398254, -0.033507075160741806, 0.0671500489115715, 0.4082648754119873, -0.16026535630226135, -0.192474827170372, -0.20346473157405853, 0.19125841557979584, 0.489845871925354, 0.45220762491226196, -0.20858502388000488, 0.09418702125549316, -0.2111026495695114, 0.037609122693538666, 0.16444654762744904, -0.15473672747612, -0.20687618851661682, 0.6244186758995056, -0.44535690546035767, 0.13125663995742798, 0.14685839414596558, 0.021251725032925606, 0.18016062676906586, -0.10966566950082779, 0.1793660819530487, 0.518201470375061, 0.011540252715349197, 0.10220756381750107, -0.48620983958244324, -0.4059293270111084, 0.2895371913909912, 0.011824734508991241, -0.18522149324417114, -0.13932561874389648, -0.028748884797096252, 0.1552162617444992, 0.3241948187351227, -0.06786732375621796, 0.0529375895857811, 0.017825355753302574, -0.10401442646980286, -0.36177605390548706, -0.0266502033919096, 0.27348771691322327, -0.20591765642166138, 0.32349440455436707, -0.07264529168605804, 0.309057354927063, 0.23075984418392181, 0.20148183405399323, -0.22004875540733337, -0.18663544952869415, 0.03626946732401848, -0.0984998345375061, 0.11686092615127563, 0.08042252063751221, -0.05656507611274719, 0.09124098718166351, 0.1351679563522339, 0.023779232054948807, 0.01334424503147602, 0.0601704902946949, 0.37008532881736755, -0.12423111498355865, 0.01698899269104004, -0.07408201694488525, 0.2616158723831177, -0.0662727877497673, 0.12051916122436523, -0.07009876519441605, -0.18161454796791077, 0.11768975108861923, -0.08399462699890137, 0.7728496193885803, 0.2703161835670471, 0.06028979271650314, 0.2631721496582031, -0.34085699915885925, 0.46706101298332214, 0.48817890882492065, 0.15348756313323975, -0.05674125999212265, -0.29760870337486267, 0.6317285299301147, -0.06658877432346344, 0.14528200030326843, 0.25758683681488037, 0.06770917773246765, 0.005737217143177986, -0.0056523606181144714, -0.24570845067501068, -0.01851527765393257, 0.476482629776001, 0.12038904428482056, -0.09620705246925354, 0.12733177840709686, 0.13130025565624237, 0.25475165247917175, 0.6354770064353943, -0.17355240881443024, 0.05432720109820366, 0.2032872438430786, -0.302875280380249, -0.4658341705799103, 0.2684462070465088, 0.3569942116737366, 0.29439932107925415, 0.1340404599905014, 0.5332388281822205, 0.14862792193889618, -0.017714761197566986, -0.2474832832813263, 0.4499847888946533, 0.09999417513608932, -0.3430024981498718, 0.06357346475124359, -0.010590288788080215, -0.012200270779430866, -0.26864224672317505, 0.2848038375377655, 0.042879097163677216, 0.014984476380050182, -0.11760568618774414, 0.07203713804483414, -0.49340444803237915, -0.25700822472572327, -0.30330967903137207, -0.26985520124435425, -0.2456459403038025, -0.3047161102294922, 0.05021531507372856, -0.1831904500722885, -0.13014718890190125, 0.030114272609353065, 0.32930493354797363, 0.062010109424591064, -0.36022964119911194, 0.17995482683181763, -0.17370079457759857, -0.10286064445972443, -0.4780779480934143, 0.03543004021048546, 0.24300892651081085, 0.1615816056728363, 0.3787635564804077, -0.3717290759086609, -0.11133592575788498, -0.0512106791138649, -0.3588235378265381, 0.17469468712806702, -0.049420684576034546, 0.20545844733715057, 0.011334814131259918, -0.013956420123577118, -0.24444285035133362, 0.07171516120433807, -0.024967096745967865, -0.3179236054420471, 0.12418225407600403, 0.038813699036836624, -0.24736745655536652, -0.0790557861328125, -0.25075486302375793, -0.5002610683441162, -0.2906685769557953, -0.08137498795986176, 0.2634066343307495, -0.1414368450641632, 0.19354800879955292, 0.29221999645233154, -0.15138009190559387, 0.3148862421512604, -0.08314452320337296, 0.18522226810455322, -0.11992660164833069, -0.43021783232688904, 0.3204386830329895, -0.06027504801750183, -0.2669699192047119, 0.3288846015930176, 0.11262086033821106, 0.07168786227703094, 0.03907717391848564, -0.41805797815322876, 0.30238789319992065, -0.0928383469581604, -0.043109774589538574, 0.44182106852531433, 0.16174452006816864, 0.17226450145244598, -0.07781444489955902, -0.02933722734451294, -0.06504765152931213, -0.32913506031036377, -0.08737503737211227, 0.35010984539985657, 0.26562944054603577, -0.2338140606880188, -0.00858645886182785, 0.3358731269836426, 0.541242778301239, 0.11235091090202332, 0.31090420484542847, 0.04786575585603714, 0.19838564097881317, -0.10894672572612762, 0.2531500458717346, 0.018918460234999657, 0.3179725706577301, -0.20496150851249695, -0.05896656960248947, 0.34758812189102173, 0.21133720874786377, -0.352901816368103, -0.13163286447525024, 0.17037250101566315, 0.07320992648601532, -0.23858702182769775, -0.014665203168988228, -0.06938963383436203, -0.10376215726137161, 0.1401764154434204, 0.09542126208543777, -0.18754695355892181, -0.25856027007102966, 0.05892939493060112, 0.30687272548675537, -0.09149423986673355, 0.12343846261501312, 0.03847217187285423, 0.04000111296772957, -0.4884071946144104, -0.15770812332630157, 0.03746257349848747, 0.31673476099967957, 0.055204007774591446, 0.005232974886894226, 0.18847008049488068, -0.15654690563678741, 0.04617663472890854, -0.21201041340827942, 0.11495113372802734, -0.05345546081662178, -0.2566121816635132, -0.47161027789115906, -0.3695569932460785, -0.32729989290237427, -0.4731151759624481, 0.4219295084476471, 0.011108428239822388, -0.16688913106918335, -0.12436210364103317, 0.16251200437545776, 0.1825747936964035, 0.020801279693841934, 0.0075441645458340645, 0.019482288509607315, -0.5261369347572327, -0.027747204527258873, -0.11284481734037399, -0.23034460842609406, -0.16886146366596222, -0.08429863303899765, 0.08263193070888519, 0.3962235152721405, 0.3614593744277954, -0.01803954690694809, -0.007324478588998318, 0.008588315919041634, 0.04376046732068062, 0.17329271137714386, 0.10108320415019989, 0.3227296471595764, -0.2572556734085083, 0.4116538166999817, 0.25148382782936096, 0.1263498067855835, -0.08514970541000366, -0.01449053268879652, 0.09626080095767975, 0.6376781463623047, 0.14101554453372955, 0.11475874483585358, -0.16402578353881836, 0.12802480161190033, -0.21740570664405823, 0.12392333149909973, 0.44137799739837646, -0.058934275060892105, -0.027707597240805626, -0.23848170042037964, 0.35438743233680725, -0.018696824088692665, -0.1848834604024887, 0.030665328726172447, -0.46433472633361816, -0.10616458207368851, -0.15531092882156372, 0.16501010954380035, 1.2208105325698853, -0.08291555941104889, 0.28923702239990234, 0.2155919373035431, -0.41710323095321655, 0.548462450504303, -0.11151564866304398, -0.11393889784812927, 0.12131822109222412, 0.4160410165786743, 0.025753119960427284, 0.08164830505847931, 0.14428868889808655, 0.0930328220129013, -0.43817728757858276, 0.29137226939201355, 0.2732534408569336, 0.21487565338611603, 0.2208138406276703, 0.32662302255630493, -0.1780339777469635, -0.2599664628505707, 0.00818637665361166, 0.14605149626731873, -0.03963179886341095, 0.40489527583122253, -0.0165239330381155, -0.19326846301555634, -0.13027626276016235, -0.14704671502113342, -0.5490789413452148, 0.08874808251857758, -0.1451568305492401, -0.17270037531852722, -0.382144957780838, -0.34440696239471436, 0.16872692108154297, -0.27248623967170715, -0.12597313523292542, 0.15099911391735077, -0.2945030629634857, 0.20498162508010864, -0.3947577476501465, 0.2506488561630249, 0.33493730425834656, -0.16523189842700958, -0.12209472060203552, -0.3081343472003937, -0.16255848109722137, -0.27685946226119995, 0.06077033281326294, 0.27322667837142944, -0.2541179955005646, -0.21723593771457672, -0.10655902326107025, 0.526174008846283, 0.001600995659828186, 0.31986868381500244, -0.06872153282165527, -0.23940056562423706, 0.16806957125663757, 0.1484866440296173, -0.2169904112815857, 0.34049615263938904, 0.0559050589799881, -0.2652062177658081, -0.32849395275115967, 0.45594388246536255, -0.12758281826972961, -0.09587541222572327, 0.20583121478557587, 0.23294253647327423, -0.1831432431936264, -0.2538061738014221, -0.07101020961999893, -0.3330273926258087, -0.2490786612033844, 0.03776499629020691, -0.23135562241077423, -0.028726890683174133, -0.03126966953277588, 0.22399413585662842, 0.42302680015563965, 0.04528301954269409, -0.04346378892660141, -0.14921805262565613, -0.019306277856230736, 0.1178317740559578, 0.09305573999881744, 0.03696570545434952, -0.5231834053993225, -0.20036707818508148, 0.18255071341991425, 0.11600872874259949, -0.31402719020843506, 0.1554565578699112, -0.01740461215376854, -0.016228098422288895, 0.10545919090509415, -0.1625567078590393, 0.10206036269664764, 0.11322325468063354, 0.057503148913383484, -0.2987833023071289, -0.13248802721500397, -0.19510263204574585, -0.04764217883348465, 0.13750654458999634, 0.05062861740589142, -0.6086702942848206, 0.4174441397190094, -0.1578952819108963, -0.010383378714323044, 0.02801026776432991, 0.061262961477041245, 0.08695895224809647, -0.19467101991176605, 0.23161812126636505, 0.021386492997407913, 0.12679877877235413, -0.11318410933017731, 0.15499433875083923, -0.08744332194328308, 0.437624454498291, 0.1472373902797699, 0.08596258610486984, 0.4909374415874481, -0.07602390646934509, 0.0008730335393920541, -0.08674315363168716, -0.08542962372303009, 0.30446621775627136, 0.6014096140861511, -0.05127590894699097, 0.3350890278816223, -0.021994052454829216, 0.15483835339546204, 0.3572497069835663, -0.012053275480866432, -0.16450536251068115, 0.38254421949386597, 0.17690975964069366, -0.004785139113664627, -0.2509576678276062, 0.0224985983222723, 0.15117761492729187, -0.11743833124637604, 0.08117517828941345, 0.21709439158439636, 0.11626075208187103, -0.15771500766277313, -0.12682168185710907, 0.18197676539421082, 0.03905202075839043, 0.007162679452449083, 0.34076640009880066, 0.04600377753376961, 0.2685067057609558, -0.2568444013595581, -0.07546071708202362, 0.002627044916152954, -0.11395344138145447, -0.052569590508937836, 0.2767496705055237, 0.14380934834480286, 0.6271650195121765, -0.03963484615087509, -0.18900708854198456, -0.07264634966850281, 0.4148309528827667, -0.11950214207172394, 0.20510774850845337, 0.1833915412425995, -0.10661781579256058, -0.04278019815683365, -0.15086854994297028, -0.3581848442554474, 0.3616633415222168, 0.062404658645391464, -0.3463214039802551, -0.1909942924976349, -0.10273543000221252, -0.34629788994789124, 0.36814936995506287, -0.36977115273475647, 0.07077716290950775, -0.0027183815836906433, 0.33903348445892334, 0.0976688489317894, -0.3586309254169464, -0.337080180644989, -0.4636326730251312, 0.16837036609649658, -0.25577351450920105, 0.1014714315533638, -0.14618070423603058, 0.07105877250432968, -0.1298067569732666, 0.187608003616333, 0.0947517678141594, 0.27159303426742554, -0.19667315483093262, -0.12965147197246552, 0.1028234213590622, 0.08746759593486786, -0.1183476522564888, 0.42097654938697815, 0.1580832451581955, 0.15025530755519867, 0.1274959295988083, 0.014859631657600403, -0.25820180773735046, 0.10207900404930115, -0.22037316858768463, -0.8334538340568542, -0.231272891163826, 0.3081341087818146, -0.06558406352996826, 0.0679112896323204, -0.3168424665927887, 0.038859374821186066, -0.23222818970680237, -0.07145129889249802, 0.48182350397109985, 0.024645598605275154, 0.18474894762039185, -0.05797151103615761, 0.07405595481395721, -0.14564594626426697, 0.5916483998298645, 0.2572515606880188, 0.2669021487236023, -0.3744661211967468, -0.23747915029525757, -0.3805502653121948, 0.029199838638305664, -0.2586587071418762, 0.07007955759763718, 0.09539446234703064, 0.06814618408679962, -0.03467743843793869, 0.42117613554000854, -0.03408519923686981, 0.6065481305122375, -0.12401854991912842, 0.04285022243857384, -0.11375078558921814, -0.12345416843891144, 0.12844392657279968, 0.06536133587360382, -0.15366914868354797, -0.21950873732566833, 0.22541050612926483, -0.06767896562814713, -0.0850578248500824, -0.12791697680950165, 0.23487991094589233, 0.15305815637111664, 0.2696559727191925, 0.1503939926624298, 0.04014658182859421, 0.3597574234008789, 0.09100297838449478, -0.3492448031902313, -0.42591673135757446, -0.04004795849323273, -0.08754058182239532, 0.04706704616546631, -0.4361444413661957, -0.04217889904975891, 0.11697765439748764, 0.2007259577512741, -0.257218599319458, 0.08766201883554459, -0.08609561622142792, 0.15060800313949585, -0.1392778754234314, 0.04631111025810242, -0.2297099530696869, 0.16709734499454498, 0.04483506828546524, 0.2075975239276886, -0.13091717660427094, -0.025499269366264343, -0.34527379274368286, -0.033851802349090576, 0.2426207810640335, -0.21077340841293335, -0.17629747092723846, -0.3393891453742981, 0.2527185082435608, -0.21348118782043457, 0.19590182602405548, -0.028439417481422424, -0.0017706602811813354, 0.19800744950771332, -0.01867145672440529, -0.21384990215301514, 0.3829641044139862, 0.24464130401611328, -0.2085777074098587, 0.05273224785923958, 0.3852640688419342, 0.03743903338909149, -0.2234349101781845, -0.106009840965271, -0.20936304330825806 ]
https://github.com/huggingface/datasets/issues/525
wmt download speed example
Shall we host the files ourselves or it is fine to use this mirror in your opinion ?
Continuing from the slack 1.0 roadmap thread w @lhoestq , I realized the slow downloads is only a thing sometimes. Here are a few examples, I suspect there are multiple issues. All commands were run from the same gcp us-central-1f machine. ``` import nlp nlp.load_dataset('wmt16', 'de-en') ``` Downloads at 49.1 KB/S Whereas ``` pip install gdown # download from google drive !gdown https://drive.google.com/uc?id=1iO7um-HWoNoRKDtw27YUSgyeubn9uXqj ``` Downloads at 127 MB/s. (The file is a copy of wmt-en-de raw). ``` nlp.load_dataset('wmt16', 'ro-en') ``` goes at 27 MB/s, much faster. if we wget the same data from s3 is the same download speed, but ¼ the file size: ``` wget https://s3.amazonaws.com/datasets.huggingface.co/translation/wmt_en_ro_packed_200_rand.tgz ``` Finally, ``` nlp.load_dataset('wmt19', 'zh-en') ``` Starts fast, but broken. (duplicate of #493 )
18
wmt download speed example Continuing from the slack 1.0 roadmap thread w @lhoestq , I realized the slow downloads is only a thing sometimes. Here are a few examples, I suspect there are multiple issues. All commands were run from the same gcp us-central-1f machine. ``` import nlp nlp.load_dataset('wmt16', 'de-en') ``` Downloads at 49.1 KB/S Whereas ``` pip install gdown # download from google drive !gdown https://drive.google.com/uc?id=1iO7um-HWoNoRKDtw27YUSgyeubn9uXqj ``` Downloads at 127 MB/s. (The file is a copy of wmt-en-de raw). ``` nlp.load_dataset('wmt16', 'ro-en') ``` goes at 27 MB/s, much faster. if we wget the same data from s3 is the same download speed, but ¼ the file size: ``` wget https://s3.amazonaws.com/datasets.huggingface.co/translation/wmt_en_ro_packed_200_rand.tgz ``` Finally, ``` nlp.load_dataset('wmt19', 'zh-en') ``` Starts fast, but broken. (duplicate of #493 ) Shall we host the files ourselves or it is fine to use this mirror in your opinion ?
[ -0.09701813757419586, -0.2302703559398651, 0.07600058615207672, 0.2327999770641327, -0.19301675260066986, -0.15169766545295715, 0.40992677211761475, 0.06606151908636093, 0.25848570466041565, 0.04765794426202774, -0.05514255166053772, 0.26849862933158875, -0.16810402274131775, 0.03842886537313461, 0.20937742292881012, 0.05159653723239899, 0.0763443261384964, 0.03416304290294647, -0.6077139377593994, -0.26282504200935364, 0.10519073903560638, 0.16494955122470856, -0.03958440572023392, -0.05449908971786499, -0.09689053893089294, 0.204951211810112, -0.06591241806745529, 0.01960514485836029, -0.37452661991119385, -0.1257733851671219, 0.1418091207742691, 0.257188618183136, 0.0026759859174489975, 0.3433762490749359, -0.00011197744606761262, 0.02174863964319229, 0.34402376413345337, -0.011989166028797626, -0.39461272954940796, -0.13402919471263885, -0.5043623447418213, -0.5133446455001831, -0.09806263446807861, -0.06785190850496292, 0.044488631188869476, -0.13361713290214539, -0.003103123977780342, 0.0976153314113617, 0.26080378890037537, -0.11994870007038116, 0.15313337743282318, 0.37643322348594666, -0.5539968609809875, -0.06286179274320602, 0.5288304090499878, 0.012058958411216736, -0.1928020864725113, 0.7288000583648682, 0.4486640393733978, 0.2702374756336212, 0.0053201839327812195, 0.3857802748680115, -0.2627516984939575, 0.24171721935272217, 0.21826621890068054, 0.1437622606754303, 0.31190651655197144, 0.08356629312038422, -0.20409348607063293, 0.45651599764823914, 0.34463101625442505, 0.11955862492322922, -0.51755291223526, -0.39799028635025024, -0.008607868105173111, -0.08084864914417267, 0.16892185807228088, 0.3056771457195282, -0.18934108316898346, 0.30142742395401, -0.6494137048721313, -0.2435516119003296, 0.0007556155323982239, 0.2693096101284027, -0.03114863485097885, 0.5902035236358643, -0.07538143545389175, 0.13420900702476501, -0.11568039655685425, 0.08638054132461548, 0.13339000940322876, -0.37445536255836487, 0.05008099228143692, -0.15546397864818573, 0.13463464379310608, -0.21575620770454407, 0.03981538116931915, -0.2851392924785614, -0.13351652026176453, 0.20309075713157654, 0.00323446374386549, 0.08648049831390381, 0.12607188522815704, 0.09527736902236938, 0.18271218240261078, 0.3722538650035858, -0.3179149031639099, -0.10644974559545517, 0.18429775536060333, 0.018992219120264053, 0.24282795190811157, 0.15557861328125, -0.160438671708107, -0.040925249457359314, -0.5879222750663757, -0.08689198642969131, -0.11657993495464325, -0.10829485952854156, -0.17722856998443604, -0.11111229658126831, 0.13980653882026672, -0.18248574435710907, -0.09642710536718369, 0.10452770441770554, -0.11547525972127914, 0.3642374277114868, -0.05780814588069916, 0.04341413825750351, -0.1267213374376297, -0.1380360722541809, -0.007710453122854233, -0.0665883719921112, -0.09350408613681793, 0.08641811460256577, 0.36128610372543335, 0.15569648146629333, 0.307578444480896, 0.015651769936084747, 0.04000326246023178, 0.1399877518415451, 0.14014072716236115, 0.10325291752815247, -0.03990180045366287, 0.10062486678361893, -0.15183715522289276, 0.39221155643463135, -0.24518568813800812, 0.33856648206710815, -0.3105310797691345, 0.03236883506178856, -0.33930307626724243, -0.3392117917537689, 0.09038415551185608, 0.14009250700473785, -0.2683837413787842, -0.172541081905365, -0.1806364357471466, 0.13733163475990295, -0.39190807938575745, 0.06458885967731476, -0.07695630937814713, -0.0070265233516693115, -0.2558465600013733, -0.06967074424028397, -0.032681312412023544, 0.3766859173774719, -0.10346116125583649, 0.014795206487178802, -0.02116444893181324, 0.2590467631816864, 0.4362422823905945, 0.5246814489364624, -0.2769944667816162, 0.1391407698392868, -0.1622263640165329, 0.06900648772716522, 0.055894337594509125, -0.24305351078510284, -0.2646182179450989, 0.6330520510673523, -0.5914652943611145, -0.0062273722141981125, 0.31969088315963745, 0.03749809041619301, 0.2989462614059448, -0.211032435297966, 0.24499382078647614, 0.526723325252533, 0.11266691982746124, 0.08090412616729736, -0.494119793176651, -0.4558442234992981, 0.24128949642181396, 0.16321329772472382, -0.20869077742099762, -0.10271088033914566, -0.05073065310716629, 0.23611170053482056, 0.22483700513839722, -0.13604916632175446, -0.009261708706617355, -0.13007913529872894, -0.09109415113925934, -0.3411998748779297, -0.1972523182630539, 0.29722610116004944, -0.18487221002578735, 0.281655490398407, 0.017286285758018494, 0.25020724534988403, 0.341869980096817, 0.08030997961759567, -0.09423410147428513, -0.24763058125972748, 0.08730143308639526, -0.0315808542072773, 0.03780573606491089, 0.13518141210079193, -0.05668741092085838, -0.06866402179002762, 0.00525253638625145, 0.12434957176446915, -0.02649100311100483, 0.15908609330654144, 0.3992730975151062, -0.04660011827945709, 0.02005184441804886, 0.017221251502633095, 0.2545694410800934, -0.09759793430566788, 0.03731769323348999, -0.14047878980636597, -0.0191667340695858, 0.12818384170532227, -0.22726649045944214, 0.8664555549621582, 0.3883666396141052, -0.009144797921180725, 0.40691202878952026, -0.354885458946228, 0.5632669925689697, 0.49188753962516785, 0.09385217726230621, -0.08013009279966354, -0.30978378653526306, 0.5304611921310425, -0.019540030509233475, 0.14191530644893646, 0.24774490296840668, -0.011015801690518856, -0.15251654386520386, 0.09780095517635345, -0.25066351890563965, -0.06538856774568558, 0.4053530991077423, 0.1671312302350998, 0.004525426775217056, 0.2160794585943222, 0.07757525146007538, 0.188859760761261, 0.4810043275356293, -0.18254584074020386, -0.009744293987751007, 0.061779893934726715, -0.18718647956848145, -0.38090959191322327, 0.3489968776702881, 0.3133150041103363, 0.415940523147583, 0.20655281841754913, 0.4286350607872009, 0.17479394376277924, 0.09320268034934998, -0.25605469942092896, 0.4070369601249695, 0.08215231448411942, -0.345816045999527, 0.13803571462631226, 0.060451943427324295, 0.018793871626257896, -0.23055696487426758, 0.17809545993804932, 0.0391177162528038, -0.1586550772190094, -0.1597524881362915, 0.054265737533569336, -0.27963516116142273, -0.1378205120563507, -0.3862886130809784, -0.13637688755989075, -0.23324257135391235, -0.23188501596450806, 0.029698699712753296, -0.03649143502116203, -0.2091926634311676, -0.10936414450407028, 0.30594602227211, 0.17756345868110657, -0.5119211077690125, 0.05215681344270706, -0.17409995198249817, -0.038771264255046844, -0.3981325030326843, -0.0045333076268434525, 0.24098791182041168, 0.08395544439554214, 0.4800805151462555, -0.2831428050994873, -0.0959874838590622, -0.12809017300605774, -0.27296343445777893, 0.11727564036846161, 0.0654713436961174, 0.14258980751037598, 0.04506921395659447, 0.020989589393138885, -0.1486756056547165, 0.02228449285030365, -0.05853604897856712, -0.29189547896385193, 0.15927815437316895, -0.08766866475343704, -0.21131548285484314, -0.05012853071093559, -0.24770976603031158, -0.5144856572151184, -0.29219651222229004, -0.10585823655128479, 0.16347193717956543, -0.19778774678707123, 0.21334193646907806, 0.17127104103565216, -0.1417776495218277, 0.19478429853916168, -0.11911222338676453, 0.15871958434581757, -0.05976245552301407, -0.5474860072135925, 0.2177075445652008, -0.021554259583353996, -0.24994070827960968, 0.1782253235578537, 0.22670571506023407, -0.0758671909570694, 0.13303335011005402, -0.4908929467201233, 0.2066098153591156, 0.08896028250455856, -0.0867544636130333, 0.5087796449661255, 0.25042086839675903, 0.1344643086194992, -0.04273263365030289, -0.012821167707443237, -0.028697950765490532, -0.24317368865013123, -0.05931433290243149, 0.4615965485572815, 0.08924877643585205, -0.0717787966132164, -0.034424059092998505, 0.2145269811153412, 0.7158351540565491, 0.11231057345867157, 0.2709052264690399, 0.07343684881925583, 0.1690087467432022, -0.044221434742212296, 0.10329028964042664, -0.045069269835948944, 0.32282161712646484, -0.09157338738441467, -0.198136568069458, 0.3320978879928589, 0.16051417589187622, -0.31404781341552734, -0.2965778708457947, -0.06910180300474167, -0.08369334042072296, -0.2231551557779312, -0.02860022522509098, 0.034623920917510986, -0.039155907928943634, 0.215292289853096, 0.03516697883605957, -0.15307274460792542, -0.1862274706363678, 0.05101945996284485, 0.20826320350170135, 0.02328762412071228, 0.12143746018409729, 0.1869954615831375, 0.017449526116251945, -0.5837161540985107, -0.15143896639347076, -0.06040877476334572, 0.4268859624862671, 0.11968106031417847, -0.00530807301402092, 0.20039796829223633, -0.15781493484973907, 0.10501128435134888, -0.17542946338653564, 0.17739979922771454, -0.26102226972579956, -0.29202669858932495, -0.5091147422790527, -0.27129101753234863, -0.22930215299129486, -0.49545884132385254, 0.3333492875099182, 0.17741888761520386, -0.20931962132453918, -0.0772733986377716, 0.10024940222501755, 0.17987936735153198, -0.029948879033327103, -0.04713137820363045, 0.09033341705799103, -0.4981129467487335, -0.05428990721702576, -0.23471203446388245, -0.24491389095783234, -0.23598156869411469, 0.10323705524206161, 0.1892072558403015, 0.3253818154335022, 0.35599079728126526, 0.057747673243284225, 0.06547389924526215, -0.11206292361021042, 0.007731098681688309, 0.18319424986839294, 0.16418731212615967, 0.5088058710098267, -0.27141767740249634, 0.5144899487495422, 0.3122371435165405, 0.2775200605392456, -0.12949302792549133, -0.05805892124772072, 0.10917659848928452, 0.7778970003128052, 0.1361853927373886, -0.09574215859174728, -0.22264112532138824, 0.09114429354667664, -0.26528969407081604, 0.0761786475777626, 0.2636013925075531, -0.15871043503284454, 0.04670415818691254, -0.18563969433307648, 0.4024975299835205, 0.04457977041602135, -0.11124975234270096, -0.12837672233581543, -0.3259797692298889, -0.057922713458538055, 0.02642945945262909, 0.17863303422927856, 1.2413947582244873, -0.05126652866601944, 0.5479637980461121, 0.339853972196579, -0.37310683727264404, 0.6129074096679688, -0.3549613952636719, -0.21058809757232666, 0.11112165451049805, 0.4099706709384918, -0.08889110386371613, 0.010173831135034561, 0.14154736697673798, 0.13837164640426636, -0.19264738261699677, 0.32144129276275635, 0.3675503730773926, 0.2141028344631195, 0.10162302106618881, 0.4243985414505005, -0.17620249092578888, -0.27231302857398987, 0.11687522381544113, 0.04606802761554718, -0.07695955038070679, 0.3434005677700043, -0.08703500777482986, -0.22363533079624176, -0.15827099978923798, -0.17835205793380737, -0.3901979923248291, 0.025266770273447037, 0.024397553876042366, -0.09449400752782822, -0.4595494270324707, -0.35070353746414185, 0.1282491683959961, -0.4450734257698059, -0.2020016759634018, 0.17822518944740295, -0.27749747037887573, 0.0638347715139389, -0.41136816143989563, 0.28094616532325745, 0.3688462972640991, -0.1442648023366928, -0.06729945540428162, -0.3414596915245056, -0.15937918424606323, -0.24395817518234253, 0.11444616317749023, 0.0914490818977356, -0.1264481544494629, -0.190773144364357, -0.129167839884758, 0.45854660868644714, -0.14219443500041962, 0.3873191177845001, -0.1405366063117981, -0.14387501776218414, 0.10809820890426636, 0.08515053987503052, -0.23220700025558472, 0.2715301513671875, 0.020810863003134727, -0.27245211601257324, -0.39840441942214966, 0.5281152129173279, 0.01618299074470997, 0.02251506969332695, 0.1650780588388443, 0.20411516726016998, -0.12292803078889847, -0.21849724650382996, -0.05968698486685753, -0.3233782649040222, -0.2938450276851654, -0.027012083679437637, -0.21065880358219147, -0.08809804916381836, -0.10556477308273315, 0.12503696978092194, 0.5591651797294617, 0.045698292553424835, -0.07060910761356354, -0.06985326111316681, -0.03597637265920639, 0.14902295172214508, 0.11372891068458557, 0.11399641633033752, -0.24476957321166992, -0.15706545114517212, 0.05390683561563492, -0.09215289354324341, -0.2827047109603882, 0.09094933420419693, 0.07527835667133331, -0.017633654177188873, 0.10126640647649765, -0.13673609495162964, 0.06630405783653259, 0.07769154012203217, 0.015134373679757118, -0.2517245411872864, -0.16396160423755646, -0.13778026401996613, 0.042820196598768234, 0.1708701252937317, 0.13624247908592224, -0.5324272513389587, 0.33179783821105957, -0.22876788675785065, -0.13820379972457886, 0.11053930222988129, 0.11443273723125458, 0.10197439044713974, -0.14397239685058594, 0.15647614002227783, 0.0012163333594799042, 0.01482771709561348, -0.2591879367828369, 0.4146895110607147, -0.001963406801223755, 0.368050754070282, -0.048614535480737686, 0.06441572308540344, 0.44466066360473633, -0.049510471522808075, -0.042819928377866745, -0.06978706270456314, -0.16632945835590363, 0.4053020477294922, 0.6680971384048462, -0.08274148404598236, 0.3558436930179596, 0.09007464349269867, 0.2813586890697479, 0.34200698137283325, -0.02426001988351345, -0.22786372900009155, 0.3319772183895111, 0.11441367864608765, -0.057264409959316254, -0.2742282748222351, 0.1136651337146759, 0.24607157707214355, -0.11596141755580902, 0.147976815700531, 0.31085604429244995, 0.11803486943244934, -0.4081677794456482, -0.05669928342103958, 0.1665666550397873, 0.2172151356935501, -0.07330551743507385, 0.3288072347640991, 0.07305559515953064, 0.29563000798225403, -0.28827863931655884, 0.06510375440120697, -0.027211420238018036, 0.007230773568153381, -0.06443292647600174, 0.32540255784988403, 0.13354822993278503, 0.5295650959014893, -0.015241608023643494, -0.21733792126178741, -0.006776999682188034, 0.3404945731163025, 0.04727400466799736, 0.18294642865657806, 0.11535453796386719, -0.16291174292564392, -0.09132447838783264, -0.16813138127326965, -0.31845980882644653, 0.3788336217403412, 0.09954681247472763, -0.22799959778785706, -0.1665639728307724, 0.01827811449766159, -0.20238620042800903, 0.4663451611995697, -0.4102459251880646, -0.03353253751993179, -0.061046212911605835, 0.4058506488800049, 0.1479465663433075, -0.22613774240016937, -0.18393370509147644, -0.48432889580726624, 0.17001190781593323, -0.2348320037126541, 0.09721092134714127, -0.12647761404514313, 0.026240915060043335, 0.03915223479270935, 0.40132951736450195, 0.07526243478059769, 0.15747204422950745, -0.1435377299785614, -0.05344557389616966, -0.008783169090747833, 0.08221407234668732, -0.21743223071098328, 0.29649946093559265, 0.02062658965587616, 0.09962199628353119, 0.1984223872423172, 0.012280914932489395, -0.1984616219997406, 0.029301807284355164, -0.2606433033943176, -0.7363996505737305, -0.29514551162719727, 0.29052895307540894, -0.10363265872001648, -0.04965921491384506, -0.2225225269794464, 0.06448724865913391, -0.3825041651725769, -0.034769296646118164, 0.6124903559684753, 0.11320497840642929, 0.21086034178733826, -0.01996954157948494, 0.032223302870988846, -0.2134580761194229, 0.6463639140129089, 0.2980586588382721, 0.24599096179008484, -0.32122915983200073, -0.14146889746189117, -0.34628963470458984, 0.06554348021745682, -0.2151900827884674, 0.10302673280239105, 0.046852100640535355, 0.08008243888616562, 0.005316704511642456, 0.4956411123275757, -0.09437762200832367, 0.6934797167778015, -0.33456072211265564, 0.00040369853377342224, 0.010086335241794586, -0.13521628081798553, 0.005213849246501923, 0.09816537797451019, -0.17354002594947815, -0.262440949678421, 0.1998813897371292, 0.039197638630867004, -0.11498343199491501, -0.08446209132671356, 0.2595464587211609, 0.14016519486904144, 0.19900839030742645, 0.2034505158662796, -0.0767742320895195, 0.2250250279903412, 0.10662750154733658, -0.32222360372543335, -0.40036022663116455, -0.05258706957101822, -0.1452839970588684, -0.042584024369716644, -0.3721712827682495, -0.00407128781080246, 0.03235102444887161, 0.31060442328453064, -0.1983383595943451, -0.02824518457055092, -0.08535119891166687, 0.14471207559108734, -0.10807866603136063, 0.009967992082238197, -0.43532973527908325, 0.07901233434677124, 0.10220727324485779, 0.26616308093070984, -0.1070331335067749, -0.24842150509357452, -0.38060760498046875, -0.08802805095911026, 0.303405225276947, -0.2912921905517578, -0.051053039729595184, -0.2912955582141876, 0.3219892382621765, -0.1367408037185669, 0.1849551647901535, -0.0974544808268547, 0.04356823116540909, 0.11835487186908722, -0.10401798039674759, -0.17076942324638367, 0.2843354344367981, 0.21031098067760468, -0.29424548149108887, 0.008649136871099472, 0.39048147201538086, -0.16794872283935547, -0.2728070020675659, -0.26958999037742615, -0.10566533356904984 ]
https://github.com/huggingface/datasets/issues/525
wmt download speed example
Should we add an argument in `load_dataset` to override some URL with a custom URL (e.g. mirror) or a local path? This could also be used to provide local files instead of the original files as requested by some users (e.g. when you made a dataset with the same format than SQuAD and what to use it instead of the official dataset files).
Continuing from the slack 1.0 roadmap thread w @lhoestq , I realized the slow downloads is only a thing sometimes. Here are a few examples, I suspect there are multiple issues. All commands were run from the same gcp us-central-1f machine. ``` import nlp nlp.load_dataset('wmt16', 'de-en') ``` Downloads at 49.1 KB/S Whereas ``` pip install gdown # download from google drive !gdown https://drive.google.com/uc?id=1iO7um-HWoNoRKDtw27YUSgyeubn9uXqj ``` Downloads at 127 MB/s. (The file is a copy of wmt-en-de raw). ``` nlp.load_dataset('wmt16', 'ro-en') ``` goes at 27 MB/s, much faster. if we wget the same data from s3 is the same download speed, but ¼ the file size: ``` wget https://s3.amazonaws.com/datasets.huggingface.co/translation/wmt_en_ro_packed_200_rand.tgz ``` Finally, ``` nlp.load_dataset('wmt19', 'zh-en') ``` Starts fast, but broken. (duplicate of #493 )
63
wmt download speed example Continuing from the slack 1.0 roadmap thread w @lhoestq , I realized the slow downloads is only a thing sometimes. Here are a few examples, I suspect there are multiple issues. All commands were run from the same gcp us-central-1f machine. ``` import nlp nlp.load_dataset('wmt16', 'de-en') ``` Downloads at 49.1 KB/S Whereas ``` pip install gdown # download from google drive !gdown https://drive.google.com/uc?id=1iO7um-HWoNoRKDtw27YUSgyeubn9uXqj ``` Downloads at 127 MB/s. (The file is a copy of wmt-en-de raw). ``` nlp.load_dataset('wmt16', 'ro-en') ``` goes at 27 MB/s, much faster. if we wget the same data from s3 is the same download speed, but ¼ the file size: ``` wget https://s3.amazonaws.com/datasets.huggingface.co/translation/wmt_en_ro_packed_200_rand.tgz ``` Finally, ``` nlp.load_dataset('wmt19', 'zh-en') ``` Starts fast, but broken. (duplicate of #493 ) Should we add an argument in `load_dataset` to override some URL with a custom URL (e.g. mirror) or a local path? This could also be used to provide local files instead of the original files as requested by some users (e.g. when you made a dataset with the same format than SQuAD and what to use it instead of the official dataset files).
[ -0.14017336070537567, -0.0430658683180809, 0.0662451833486557, 0.05067257210612297, 0.06020572409033775, -0.1812300980091095, 0.24890641868114471, 0.11193409562110901, 0.11344009637832642, -0.01377241313457489, 0.06607075780630112, 0.5972369313240051, -0.05767281353473663, 0.045457981526851654, 0.23065486550331116, 0.05317920818924904, -0.12691277265548706, -0.06802341341972351, -0.5435417890548706, -0.1649617850780487, -0.008448764681816101, 0.15391598641872406, -0.028686631470918655, -0.08532322943210602, -0.0160794910043478, 0.16350167989730835, -0.05226972699165344, 0.1442733108997345, -0.3232899010181427, -0.422385573387146, 0.12298467755317688, 0.2223760038614273, 0.02906661108136177, 0.23887154459953308, -0.00010916731844190508, -0.03485551103949547, 0.3812180757522583, -0.027762439101934433, -0.5606544613838196, -0.20624621212482452, -0.5388449430465698, -0.5287116169929504, -0.051506005227565765, -0.1500377506017685, 0.13389018177986145, 0.020179951563477516, 0.02946466952562332, -0.0525277778506279, 0.21644358336925507, 0.03954543173313141, 0.17847637832164764, 0.366182804107666, -0.5167109370231628, -0.09384749084711075, 0.4847782552242279, 0.0027495920658111572, -0.22343148291110992, 0.4499031603336334, 0.47521069645881653, 0.1483817994594574, -0.013992354273796082, 0.30623096227645874, -0.20248298346996307, 0.3198314607143402, 0.2504802644252777, 0.09229696542024612, 0.286659836769104, 0.01724095642566681, -0.07952968031167984, 0.575032114982605, 0.42279720306396484, 0.062404483556747437, -0.5002782344818115, -0.36499613523483276, 0.11893605440855026, -0.15213215351104736, 0.1861516535282135, 0.2799290120601654, -0.33165910840034485, 0.12485046684741974, -0.5772382616996765, -0.017152994871139526, -0.008623514324426651, 0.30529993772506714, 0.07511831820011139, 0.6365691423416138, -0.029803141951560974, 0.08897644281387329, 0.05195841193199158, 0.02312684990465641, 0.06005646660923958, -0.3546416461467743, 0.12903949618339539, 0.02544809877872467, -0.06409639120101929, -0.1827630251646042, 0.14500342309474945, -0.1434667408466339, 0.05565562844276428, 0.04831107705831528, 0.03757227212190628, 0.23586967587471008, 0.2863415777683258, 0.04162067547440529, 0.2809542715549469, 0.18802408874034882, -0.24906101822853088, -0.19664748013019562, 0.19533000886440277, -0.06474563479423523, 0.1743028610944748, 0.19425490498542786, -0.1582818478345871, -0.099594846367836, -0.40251463651657104, -0.12999477982521057, 0.004997387528419495, 0.04453248903155327, -0.2315443456172943, -0.3442457616329193, 0.16343361139297485, -0.154338076710701, -0.029556632041931152, 0.23836329579353333, -0.23196473717689514, 0.20096439123153687, -0.2369828075170517, 0.027346299961209297, -0.24277567863464355, -0.08671209216117859, -0.07746892422437668, -0.07589180767536163, -0.16863563656806946, 0.13351015746593475, 0.40170174837112427, 0.1725013703107834, 0.32061633467674255, -0.012399550527334213, -0.22002439200878143, 0.05058576166629791, 0.16511991620063782, 0.14334118366241455, -0.05754711478948593, -0.047981809824705124, -0.06098001077771187, 0.35644540190696716, -0.1713733971118927, 0.15293967723846436, -0.36981841921806335, 0.15848718583583832, -0.4505820870399475, -0.30007991194725037, 0.00989784486591816, 0.1790202260017395, -0.3993918299674988, -0.3566007912158966, -0.13633745908737183, 0.3336695730686188, -0.4130515158176422, 0.1365329474210739, -0.1254848837852478, 0.059328675270080566, -0.30182093381881714, -0.034045618027448654, 0.05079711973667145, 0.46874916553497314, -0.2249717116355896, -0.19608788192272186, -0.19316793978214264, 0.2358483523130417, 0.3037911653518677, 0.4155178666114807, -0.37794214487075806, 0.10802336782217026, -0.18425606191158295, 0.05719734728336334, 0.3586399555206299, -0.3323920965194702, -0.28377747535705566, 0.5307899713516235, -0.5233163237571716, 0.06174580752849579, 0.20246410369873047, 0.12161525338888168, 0.2539977431297302, -0.12799426913261414, 0.08275251090526581, 0.6500004529953003, -0.02709748037159443, 0.19779372215270996, -0.45891502499580383, -0.4428386986255646, 0.2827780246734619, 0.15337152779102325, -0.25880423188209534, -0.0776047334074974, 0.06412921100854874, 0.26335638761520386, 0.2396988570690155, -0.07354329526424408, 0.01138048805296421, -0.0566631481051445, -0.06333683431148529, -0.34524357318878174, -0.13621507585048676, 0.33867019414901733, -0.42802664637565613, 0.3024764955043793, -0.07308990508317947, 0.3111577332019806, 0.19862806797027588, 0.05261971801519394, -0.13037364184856415, -0.20486074686050415, -0.02200305089354515, -0.045568328350782394, 0.07817454636096954, 0.2087106555700302, -0.001031041145324707, -0.03297093138098717, 0.05327354744076729, -0.019054142758250237, -0.06923036277294159, 0.12888319790363312, 0.3759292960166931, -0.038798749446868896, 0.03377894312143326, -0.08094258606433868, 0.35717976093292236, -0.039247751235961914, 0.10403312742710114, -0.05172932520508766, -0.14568427205085754, 0.23418262600898743, -0.13728781044483185, 0.7774739265441895, 0.35424157977104187, 0.005649209022521973, 0.27824822068214417, -0.2661021947860718, 0.4801734685897827, 0.45081302523612976, 0.09034763276576996, -0.004709038883447647, -0.4777362048625946, 0.5367772579193115, -0.1658913791179657, 0.2051069140434265, 0.2896351218223572, -0.008783292025327682, 0.08562356978654861, 0.027763810008764267, -0.3223406970500946, -0.04956828057765961, 0.2209581434726715, 0.18098653852939606, 0.06235535070300102, 0.19577161967754364, 0.1109708696603775, 0.30446186661720276, 0.6227397918701172, -0.17185699939727783, 0.0422482043504715, 0.21578273177146912, -0.24993392825126648, -0.5171293616294861, 0.30280202627182007, 0.35690802335739136, 0.4761771559715271, 0.24747765064239502, 0.43102067708969116, 0.07372111082077026, -0.06365739554166794, -0.2712908685207367, 0.3826603889465332, 0.12653499841690063, -0.3748040199279785, 0.05539989098906517, 0.1359218806028366, -0.023742813616991043, -0.2967225909233093, 0.1882198005914688, 0.08414623886346817, 0.022842269390821457, -0.18878187239170074, 0.09438048303127289, -0.48161011934280396, -0.2449493706226349, -0.34615179896354675, -0.17995670437812805, -0.28553205728530884, -0.338003933429718, 0.062053434550762177, -0.10938036441802979, -0.18837928771972656, 0.08076063543558121, 0.2616911828517914, 0.2746511995792389, -0.3171338140964508, -0.03985968232154846, -0.11238032579421997, -0.12139299511909485, -0.3910534083843231, 0.02534109354019165, 0.2653014063835144, 0.20310214161872864, 0.3739599585533142, -0.25554174184799194, -0.06857021152973175, -0.1352086365222931, -0.32519811391830444, 0.1363385021686554, 0.09601046144962311, 0.34355252981185913, 0.11095824837684631, 0.10490719974040985, -0.15087725222110748, -0.06544192880392075, 0.04447227343916893, -0.25338950753211975, 0.17065617442131042, -0.1076088547706604, -0.23721863329410553, -0.010976478457450867, -0.19559328258037567, -0.5634587407112122, -0.32954564690589905, -0.21692728996276855, 0.18906131386756897, -0.08163018524646759, 0.1998172551393509, 0.3314262628555298, -0.03653056174516678, 0.36039426922798157, -0.13590261340141296, 0.09948693215847015, -0.1641942858695984, -0.5906575918197632, 0.3921245038509369, -0.17213061451911926, -0.21186356246471405, 0.22148948907852173, 0.07357919961214066, 0.10240700840950012, 0.0603676363825798, -0.4876340627670288, 0.14731447398662567, 0.008639644831418991, 0.007447503507137299, 0.3440043330192566, 0.20928308367729187, 0.19797775149345398, -0.12263166159391403, -0.019642207771539688, -0.05731966346502304, -0.3735269010066986, -0.059936217963695526, 0.42585718631744385, 0.2736261487007141, -0.17242854833602905, 0.004230193793773651, 0.24956926703453064, 0.6213102340698242, 0.008626556023955345, 0.24012546241283417, 0.15062136948108673, 0.08873090893030167, 0.039537154138088226, 0.25444161891937256, 0.011128662154078484, 0.44170141220092773, -0.09438717365264893, 0.009734086692333221, 0.37154054641723633, 0.2294643223285675, -0.30942481756210327, -0.11975231766700745, 0.08566997945308685, 0.041376009583473206, -0.3028287887573242, 0.06658051908016205, 0.0872151181101799, -0.16537168622016907, 0.20366205275058746, 0.10217659920454025, -0.3788696229457855, -0.22872713208198547, 0.0009725885465741158, 0.36643195152282715, -0.01128184050321579, 0.1826781928539276, -0.1534879356622696, 0.14952942728996277, -0.5660699009895325, -0.11060453951358795, 0.0032996844965964556, 0.29136189818382263, 0.16977110505104065, -0.01292949914932251, 0.07228884100914001, -0.08175745606422424, 0.1548691987991333, -0.2576472759246826, 0.08386586606502533, -0.1553104668855667, -0.18872226774692535, -0.5956746339797974, -0.2519667446613312, -0.1097404733300209, -0.3701529800891876, 0.3256342113018036, 0.16339170932769775, -0.15367718040943146, -0.2543475329875946, 0.2115941047668457, 0.09529939293861389, 0.014308881014585495, -0.0936385840177536, 0.0478193573653698, -0.5150458812713623, -0.1141292154788971, -0.14538660645484924, -0.271537184715271, -0.14087873697280884, 0.026902955025434494, -0.06706210970878601, 0.2952202260494232, 0.3303218483924866, -0.09174759685993195, 0.07811892032623291, 0.012416771613061428, 0.20651932060718536, 0.21166707575321198, 0.10495813935995102, 0.35756686329841614, -0.21634753048419952, 0.4708116948604584, 0.10690575838088989, 0.03593181446194649, -0.007817531004548073, -0.07418530434370041, 0.12179478257894516, 0.6792545318603516, 0.14385689795017242, 0.08940581977367401, -0.17109769582748413, 0.08278767764568329, -0.27170923352241516, 0.2893833816051483, 0.32669997215270996, -0.17932140827178955, 0.06423494219779968, -0.3848206102848053, 0.34397879242897034, -0.07261133193969727, -0.10754367709159851, 0.12653064727783203, -0.3777018189430237, -0.12388931214809418, -0.05491040274500847, 0.2150653898715973, 1.1090857982635498, -0.1453065723180771, 0.35994064807891846, 0.3286299705505371, -0.3125869631767273, 0.672041654586792, -0.11286746710538864, -0.10411934554576874, 0.13235540688037872, 0.39639002084732056, 0.0688304677605629, 0.0030712969601154327, 0.14139136672019958, 0.3241005539894104, -0.31431251764297485, 0.31081944704055786, 0.32653719186782837, 0.27816352248191833, 0.12736448645591736, 0.5954557657241821, -0.16241884231567383, -0.4131704866886139, -0.13401013612747192, 0.17108716070652008, -0.1431819051504135, 0.2317885458469391, 0.0013283351436257362, -0.15867164731025696, -0.0011412762105464935, -0.13032294809818268, -0.3256801962852478, -0.0010127518326044083, -0.24057745933532715, -0.19928555190563202, -0.3163979947566986, -0.35034120082855225, 0.1740938276052475, -0.17776907980442047, -0.2547171711921692, 0.17850981652736664, -0.3482360243797302, 0.24971504509449005, -0.49574899673461914, 0.28951096534729004, 0.23193423449993134, -0.1472209095954895, -0.06927959620952606, -0.2525033950805664, -0.15650810301303864, -0.23931875824928284, 0.092519111931324, -0.09747929871082306, -0.09123776853084564, -0.24527151882648468, -0.05579821765422821, 0.3949812948703766, -0.11765460669994354, 0.20389530062675476, -0.15659406781196594, -0.24929635226726532, 0.15748116374015808, 0.11436533182859421, -0.16297709941864014, 0.39604294300079346, 0.10693827271461487, -0.261446475982666, -0.34136533737182617, 0.48854056000709534, -0.27654871344566345, -0.06152413785457611, 0.2336365431547165, 0.1557386815547943, -0.11100613325834274, -0.24711593985557556, -0.03626970201730728, -0.24580201506614685, -0.16223688423633575, 0.023578215390443802, -0.23577117919921875, -0.058137305080890656, 0.026501106098294258, 0.21301095187664032, 0.32742905616760254, 0.15676331520080566, -0.02553580142557621, -0.15409299731254578, -0.04287439584732056, 0.11590215563774109, 0.13282740116119385, 0.09013228863477707, -0.3304203450679779, -0.12854711711406708, 0.07399175316095352, 0.035834699869155884, -0.3404170870780945, 0.13314326107501984, 0.0018461067229509354, 0.054097481071949005, 0.08850941807031631, -0.12532436847686768, 0.1922048032283783, 0.0758357048034668, 0.03790157288312912, -0.25743699073791504, -0.16257162392139435, -0.20888647437095642, -0.1289771944284439, 0.12888449430465698, 0.027929315343499184, -0.5542573928833008, 0.2583652436733246, -0.25480028986930847, -0.04656415060162544, -0.04231353849172592, 0.11379681527614594, 0.094385527074337, -0.21497075259685516, 0.1778300553560257, -0.019665170460939407, 0.023774992674589157, -0.11172331124544144, 0.18661750853061676, -0.011371463537216187, 0.3861461281776428, 0.1349959373474121, 0.2166288048028946, 0.35780856013298035, -0.033559780567884445, 0.02622455358505249, -0.03449980169534683, -0.03373308479785919, 0.41420549154281616, 0.538556694984436, -0.09029607474803925, 0.2103462815284729, 0.13770878314971924, 0.1006854847073555, 0.35483890771865845, -0.06789727509021759, -0.14348620176315308, 0.3465029299259186, 0.17630258202552795, 0.01504489779472351, -0.3085137605667114, 0.049649644643068314, 0.10412976145744324, 0.015357483178377151, 0.11244097352027893, 0.18856056034564972, 0.1076684296131134, -0.2401643842458725, -0.10561608523130417, 0.3327113091945648, 0.08693243563175201, -0.0052427081391215324, 0.2966090440750122, -0.11178139597177505, 0.13121718168258667, -0.17094692587852478, 0.004249930381774902, 0.04535689577460289, -0.02724820375442505, -0.07708274573087692, 0.28653836250305176, 0.08815434575080872, 0.5736846923828125, -0.10399337857961655, -0.15353848040103912, -0.03026839718222618, 0.41117584705352783, -0.11799921095371246, 0.2317502200603485, 0.19159772992134094, -0.03419514000415802, -0.08633455634117126, -0.1675744354724884, -0.16137072443962097, 0.2868344485759735, 0.08923941850662231, -0.3066070079803467, -0.3026074469089508, -0.1101238876581192, -0.2407025247812271, 0.34164321422576904, -0.3660486340522766, -0.08026890456676483, -0.053052470088005066, 0.2778150141239166, 0.15374533832073212, -0.262226939201355, -0.13939327001571655, -0.36665982007980347, 0.09901300817728043, -0.25274550914764404, 0.08384977281093597, -0.13089847564697266, 0.12439874559640884, 0.022407934069633484, 0.15037225186824799, 0.11365194618701935, 0.2444446086883545, -0.16793616116046906, -0.09520228207111359, 0.09475977718830109, 0.06101808696985245, -0.22606541216373444, 0.22888481616973877, 0.050159040838479996, -0.01930183917284012, 0.23275336623191833, 0.0663522407412529, -0.22151419520378113, 0.011934138834476471, -0.17736177146434784, -0.7652965188026428, -0.28185969591140747, 0.2427925169467926, 0.08952680230140686, 0.018609046936035156, -0.26291537284851074, 0.11943213641643524, -0.15812203288078308, -0.05757954716682434, 0.5074000358581543, 0.005701456218957901, 0.20132827758789062, -0.07595972716808319, 0.08242481201887131, -0.14246995747089386, 0.6969800591468811, 0.10670819133520126, 0.17563506960868835, -0.369518905878067, -0.15318819880485535, -0.5551537275314331, 0.020267702639102936, -0.17598767578601837, 0.043942660093307495, 0.18192487955093384, 0.2019895613193512, -0.09273704141378403, 0.5005356669425964, -0.08321736752986908, 0.5214192867279053, -0.07953044772148132, -0.01513981819152832, -0.12873023748397827, -0.20673176646232605, 0.05401981621980667, 0.11995898187160492, -0.056597206741571426, -0.28933027386665344, 0.16449186205863953, 0.017260361462831497, -0.10560690611600876, -0.13854855298995972, 0.1957022249698639, 0.13954824209213257, 0.19057758152484894, 0.18744853138923645, -0.08670683205127716, 0.29684484004974365, 0.09340227395296097, -0.2792477309703827, -0.4411051869392395, -0.10138681530952454, -0.20709116756916046, -0.026208318769931793, -0.42294564843177795, -0.0029900819063186646, 0.060951389372348785, 0.21482697129249573, -0.32193613052368164, 0.05426163971424103, -0.05948735773563385, 0.14819897711277008, -0.08242935687303543, 0.11722328513860703, -0.2113017737865448, 0.195990189909935, -0.012026950716972351, 0.19648092985153198, -0.09042458236217499, -0.0009055398404598236, -0.27575650811195374, 0.007015440613031387, 0.29893064498901367, -0.2603600323200226, -0.12069161236286163, -0.36429423093795776, 0.2702485918998718, -0.20711350440979004, 0.2036072462797165, -0.11410105228424072, 0.03228235989809036, 0.23793792724609375, -0.022225774824619293, -0.19975925981998444, 0.39959415793418884, 0.14312021434307098, -0.12321066856384277, 0.02378610149025917, 0.260997474193573, 0.04809759557247162, -0.14972075819969177, -0.16548651456832886, -0.1931336373090744 ]
https://github.com/huggingface/datasets/issues/525
wmt download speed example
@lhoestq I think we should host it ourselves. I'll put the subset of wmt (without preprocessed files) that we need on s3 and post a link over the weekend.
Continuing from the slack 1.0 roadmap thread w @lhoestq , I realized the slow downloads is only a thing sometimes. Here are a few examples, I suspect there are multiple issues. All commands were run from the same gcp us-central-1f machine. ``` import nlp nlp.load_dataset('wmt16', 'de-en') ``` Downloads at 49.1 KB/S Whereas ``` pip install gdown # download from google drive !gdown https://drive.google.com/uc?id=1iO7um-HWoNoRKDtw27YUSgyeubn9uXqj ``` Downloads at 127 MB/s. (The file is a copy of wmt-en-de raw). ``` nlp.load_dataset('wmt16', 'ro-en') ``` goes at 27 MB/s, much faster. if we wget the same data from s3 is the same download speed, but ¼ the file size: ``` wget https://s3.amazonaws.com/datasets.huggingface.co/translation/wmt_en_ro_packed_200_rand.tgz ``` Finally, ``` nlp.load_dataset('wmt19', 'zh-en') ``` Starts fast, but broken. (duplicate of #493 )
29
wmt download speed example Continuing from the slack 1.0 roadmap thread w @lhoestq , I realized the slow downloads is only a thing sometimes. Here are a few examples, I suspect there are multiple issues. All commands were run from the same gcp us-central-1f machine. ``` import nlp nlp.load_dataset('wmt16', 'de-en') ``` Downloads at 49.1 KB/S Whereas ``` pip install gdown # download from google drive !gdown https://drive.google.com/uc?id=1iO7um-HWoNoRKDtw27YUSgyeubn9uXqj ``` Downloads at 127 MB/s. (The file is a copy of wmt-en-de raw). ``` nlp.load_dataset('wmt16', 'ro-en') ``` goes at 27 MB/s, much faster. if we wget the same data from s3 is the same download speed, but ¼ the file size: ``` wget https://s3.amazonaws.com/datasets.huggingface.co/translation/wmt_en_ro_packed_200_rand.tgz ``` Finally, ``` nlp.load_dataset('wmt19', 'zh-en') ``` Starts fast, but broken. (duplicate of #493 ) @lhoestq I think we should host it ourselves. I'll put the subset of wmt (without preprocessed files) that we need on s3 and post a link over the weekend.
[ -0.2155657559633255, -0.1206226721405983, -0.02049279771745205, 0.13008564710617065, 0.06581585109233856, -0.1955839991569519, 0.20022335648536682, 0.18015515804290771, 0.14339829981327057, 0.1119239404797554, -0.03411073982715607, 0.4751237630844116, -0.17757010459899902, 0.2044602781534195, 0.20675283670425415, 0.09629568457603455, -0.007072895765304565, 0.018381595611572266, -0.5470448732376099, -0.13751812279224396, 0.08619862794876099, 0.21792183816432953, -0.0510404147207737, -0.1955759972333908, -0.030069386586546898, 0.16575808823108673, -0.1316433846950531, 0.07272005826234818, -0.4188368618488312, -0.26307204365730286, 0.118056520819664, 0.26562556624412537, 0.06480038911104202, 0.30280452966690063, -0.00010203287092735991, -0.11063209176063538, 0.26327750086784363, -0.03248203173279762, -0.444392591714859, -0.1743226796388626, -0.5166605114936829, -0.5105951428413391, -0.22154748439788818, 0.009143166244029999, -0.060806892812252045, -0.014990861527621746, -0.006533173844218254, -0.013224352151155472, 0.22974759340286255, 0.004442214034497738, 0.23284763097763062, 0.35984158515930176, -0.4252636432647705, -0.08449308574199677, 0.4815315902233124, 0.004927389323711395, -0.24982473254203796, 0.400951087474823, 0.3564249277114868, 0.07960715144872665, 0.011352509260177612, 0.470013290643692, -0.256106972694397, 0.27874696254730225, 0.20317867398262024, 0.02280336432158947, 0.22856342792510986, -0.002850577235221863, -0.1551722288131714, 0.5608808398246765, 0.3373488485813141, 0.10654229670763016, -0.5177890062332153, -0.2909380793571472, 0.04937116429209709, -0.2340981364250183, 0.10288779437541962, 0.2994500696659088, -0.32472023367881775, 0.12009719014167786, -0.5581653714179993, -0.09297703206539154, -0.025520391762256622, 0.2339278757572174, 0.010210365056991577, 0.7002004384994507, -0.1331143081188202, -0.008421249687671661, -0.020417731255292892, -0.018013659864664078, 0.09471434354782104, -0.19426044821739197, 0.057159699499607086, -0.07698281109333038, 0.04180537909269333, -0.23533834517002106, 0.1806425154209137, -0.1294098198413849, -0.05803738906979561, 0.11328085511922836, -0.13388434052467346, 0.16598930954933167, 0.4308975636959076, 0.021482840180397034, 0.18530260026454926, 0.18462319672107697, -0.2198336124420166, -0.3102082312107086, 0.21385018527507782, 0.10626751184463501, 0.20717619359493256, 0.1935541331768036, -0.22165100276470184, -0.0671728253364563, -0.49913719296455383, -0.03341669589281082, -0.047771453857421875, -0.03272155672311783, -0.17349998652935028, -0.27338361740112305, 0.19394981861114502, -0.16172006726264954, -0.1389792561531067, 0.23104748129844666, -0.22839131951332092, 0.2743041515350342, -0.1372375637292862, 0.04489459842443466, -0.12531651556491852, -0.13506530225276947, -0.08523191511631012, 0.025962915271520615, -0.16042691469192505, 0.06280237436294556, 0.417849063873291, 0.115115225315094, 0.2968910038471222, 0.04820534586906433, -0.1270548552274704, 0.062315233051776886, 0.12181296944618225, 0.24790211021900177, 0.007463395595550537, 0.030176060274243355, -0.042483046650886536, 0.23638679087162018, -0.2150467485189438, 0.2390695959329605, -0.3477388322353363, -0.06096714735031128, -0.20030906796455383, -0.2398066520690918, -0.037585437297821045, 0.2353380024433136, -0.33097636699676514, -0.28092578053474426, -0.016603298485279083, 0.29848843812942505, -0.3401366174221039, 0.2245851457118988, -0.07544455677270889, 0.04809875041246414, -0.22227488458156586, -0.017494548112154007, 0.04959544539451599, 0.36183595657348633, -0.060106463730335236, -0.02217138558626175, -0.16725924611091614, 0.3471522033214569, 0.41152527928352356, 0.3610861897468567, -0.17185945808887482, -0.03566877543926239, -0.1001429334282875, 0.1138964295387268, 0.11490226536989212, -0.21242032945156097, -0.15975575149059296, 0.5290466547012329, -0.42726588249206543, -0.05125201866030693, 0.19807937741279602, 0.03772677853703499, 0.14510422945022583, -0.19891543686389923, 0.10155145823955536, 0.6101765632629395, 0.01470849197357893, 0.08964812755584717, -0.40382102131843567, -0.40238457918167114, 0.2538384795188904, 0.11339414119720459, -0.2388017326593399, -0.225760817527771, -0.0191059410572052, 0.26528510451316833, 0.203847736120224, -0.09479308128356934, 0.039912961423397064, -0.06023068726062775, -0.00042750313878059387, -0.3014591336250305, -0.2138356864452362, 0.14861878752708435, -0.15866747498512268, 0.2525821030139923, 0.03180231899023056, 0.371297687292099, 0.2999783754348755, 0.06602178514003754, -0.07792248576879501, -0.15696574747562408, 0.08435197174549103, -0.09436695277690887, 0.1866597682237625, 0.26465508341789246, 0.07091546058654785, -0.09102895110845566, -0.01944528892636299, -0.17462341487407684, 0.12479372322559357, 0.04711775854229927, 0.34643808007240295, -0.2572750449180603, -0.04420442879199982, -0.0858548954129219, 0.44265633821487427, -0.02859867364168167, -0.021258078515529633, 0.01656600460410118, -0.05402388423681259, 0.10771925002336502, -0.1630096435546875, 0.7219822406768799, 0.26254045963287354, 0.09021691977977753, 0.12764500081539154, -0.18879544734954834, 0.4084600508213043, 0.34766751527786255, 0.04646629840135574, 0.055166907608509064, -0.34675106406211853, 0.5725198984146118, -0.04782218858599663, 0.1236317902803421, 0.18679964542388916, 0.1262730062007904, 0.019504496827721596, 0.05510302260518074, -0.22338196635246277, -0.07705219089984894, 0.3090643286705017, 0.020819490775465965, -0.13429798185825348, 0.1040964350104332, 0.03518681973218918, 0.28546398878097534, 0.6748993396759033, -0.16313901543617249, 0.13686907291412354, 0.10200059413909912, -0.24262982606887817, -0.5028501749038696, 0.3370279371738434, 0.26678407192230225, 0.2922971844673157, 0.20827525854110718, 0.547103762626648, 0.12390279024839401, 0.11337124556303024, -0.2837965488433838, 0.44165000319480896, 0.030794277787208557, -0.24003836512565613, 0.052026621997356415, 0.06438000500202179, 0.00978112407028675, -0.2793465256690979, 0.20933237671852112, -0.04167583957314491, -0.04751042276620865, -0.06961125880479813, 0.1332091987133026, -0.39337608218193054, -0.20829278230667114, -0.1213209480047226, -0.24659787118434906, -0.26042112708091736, -0.23512886464595795, 0.1347326934337616, -0.08013935387134552, -0.1687461882829666, -0.005505148321390152, 0.3391525447368622, 0.19282889366149902, -0.34166213870048523, 0.08591470867395401, -0.20801767706871033, -0.1062612310051918, -0.32793179154396057, 0.13550281524658203, 0.25953149795532227, 0.07965471595525742, 0.46320807933807373, -0.25620242953300476, -0.06778643280267715, 0.0012307269498705864, -0.30102378129959106, 0.1154055967926979, -0.06365162879228592, 0.2974291145801544, 0.17638728022575378, 0.08498452603816986, -0.22263605892658234, 0.07821844518184662, -0.03788677975535393, -0.2860146164894104, 0.053793370723724365, -0.0335327684879303, -0.1982930451631546, -0.14981238543987274, -0.24018000066280365, -0.4638533294200897, -0.23471201956272125, -0.1960783302783966, 0.2384762316942215, -0.14575015008449554, 0.11542291194200516, 0.16345050930976868, -0.13212427496910095, 0.20780804753303528, -0.08887091279029846, 0.19993126392364502, -0.17227652668952942, -0.5507379770278931, 0.3365275263786316, -0.12265799194574356, -0.2967384457588196, 0.29504072666168213, 0.18039818108081818, 0.1631668210029602, 0.02762415073812008, -0.4810866713523865, 0.21602554619312286, 0.07554768770933151, -0.012278355658054352, 0.4312326908111572, 0.18110330402851105, 0.26144081354141235, -0.05251223221421242, -0.1331833153963089, -0.11690331250429153, -0.25472864508628845, -0.19033896923065186, 0.3488098084926605, 0.08758582174777985, -0.2828303277492523, -0.052592672407627106, 0.3150901198387146, 0.44030076265335083, 0.035259801894426346, 0.2692221403121948, 0.14531394839286804, 0.19005036354064941, 0.020595382899045944, 0.18139737844467163, 0.018843887373805046, 0.4231959283351898, -0.06334821879863739, -0.013291680254042149, 0.32362693548202515, 0.12919831275939941, -0.3245406150817871, -0.2914400100708008, 0.053932998329401016, 0.05429109185934067, -0.19914723932743073, 0.0365896001458168, 0.03283730149269104, -0.0825021043419838, 0.2604837119579315, 0.11365199834108353, -0.13148117065429688, -0.2285272181034088, 0.10836336016654968, 0.2110729217529297, 0.023159652948379517, 0.17713390290737152, 0.05340825393795967, 0.07871855795383453, -0.6460830569267273, -0.11115002632141113, -0.04961203411221504, 0.24599237740039825, 0.08043622970581055, -0.10452868789434433, 0.0938572809100151, -0.2556418776512146, 0.05225403606891632, -0.2582131028175354, 0.11349000781774521, -0.08361120522022247, -0.2604781985282898, -0.4620938003063202, -0.23249654471874237, -0.31294679641723633, -0.4964562654495239, 0.27883073687553406, 0.15031194686889648, -0.1244366466999054, -0.2181072235107422, 0.03995111957192421, 0.06150783225893974, 0.03280945494771004, -0.003907585516571999, 0.0036891810595989227, -0.5525988936424255, -0.10092447698116302, -0.08752105385065079, -0.1910010576248169, -0.11185583472251892, 0.10912210494279861, 0.10320587456226349, 0.23992818593978882, 0.40195682644844055, -0.005946353077888489, 0.16351814568042755, -0.14075985550880432, 0.14617083966732025, 0.15380261838436127, 0.03551619499921799, 0.3521115779876709, -0.24274930357933044, 0.42053693532943726, 0.25502732396125793, 0.13329410552978516, -0.010099608451128006, 0.04255954176187515, 0.10450568050146103, 0.5606141090393066, 0.13369101285934448, 0.036102063953876495, -0.1573220044374466, 0.19712060689926147, -0.4761056900024414, 0.16357439756393433, 0.31961506605148315, -0.09636697918176651, 0.10286643356084824, -0.23058485984802246, 0.24541297554969788, -0.12273387610912323, -0.056103598326444626, -0.08227965235710144, -0.41997861862182617, -0.04708539694547653, -0.030516386032104492, 0.3228858709335327, 1.0876442193984985, -0.05486128479242325, 0.4298867881298065, 0.41722169518470764, -0.262969970703125, 0.6519916653633118, -0.1784089207649231, -0.05688319355249405, 0.0626893937587738, 0.42597824335098267, 0.037770457565784454, 0.12246529757976532, -0.030047565698623657, 0.18869753181934357, -0.336374431848526, 0.2806861996650696, 0.39329683780670166, 0.14046382904052734, 0.0706053078174591, 0.482943594455719, -0.2904086709022522, -0.3686584532260895, -0.13120579719543457, 0.21646694839000702, -0.11904957890510559, 0.3661721646785736, -0.005299304611980915, -0.23522713780403137, -0.00964706763625145, -0.04829048365354538, -0.38884472846984863, 0.1304735541343689, -0.025181857869029045, -0.1556478589773178, -0.4032440185546875, -0.20593532919883728, 0.14701642096042633, -0.2993979752063751, -0.17543496191501617, 0.2969129979610443, -0.30612635612487793, 0.13654831051826477, -0.3737156093120575, 0.10658205300569534, 0.34723740816116333, -0.1877138912677765, -0.09407328814268112, -0.39460206031799316, -0.08604785799980164, -0.32693400979042053, 0.1791287064552307, 0.09742426872253418, -0.07376797497272491, -0.21690107882022858, -0.08565908670425415, 0.40467262268066406, 0.00042211776599287987, 0.2502935528755188, -0.04478289186954498, -0.26488739252090454, 0.21454691886901855, 0.13847878575325012, -0.22824080288410187, 0.3342370390892029, 0.07637152075767517, -0.17680427432060242, -0.36210891604423523, 0.4076478183269501, -0.13570758700370789, -0.05482528358697891, 0.10949497669935226, 0.351875901222229, -0.18964697420597076, -0.35850369930267334, -0.04070987552404404, -0.2579800486564636, -0.16106754541397095, 0.08266080915927887, -0.05155728757381439, -0.13868878781795502, 0.04476703330874443, 0.1471681296825409, 0.4218546152114868, -0.06385638564825058, -0.025434359908103943, -0.10777750611305237, -0.0039009125903248787, 0.017871148884296417, 0.15655332803726196, 0.1169300377368927, -0.2704853117465973, -0.21781012415885925, 0.014318032190203667, 0.10083410143852234, -0.40752676129341125, 0.006537714507430792, -0.003057662397623062, -0.03129832446575165, -0.02041354402899742, -0.2406109869480133, 0.19107775390148163, 0.12390673160552979, 0.10615310072898865, -0.2774292826652527, -0.18068665266036987, -0.25699833035469055, -0.07784420251846313, 0.10511413961648941, 0.040019530802965164, -0.5048256516456604, 0.4163048267364502, -0.1469416618347168, -0.22527088224887848, -0.06224542111158371, 0.1531938910484314, 0.06532951444387436, -0.18514566123485565, 0.18931613862514496, 0.010625403374433517, 0.03155648708343506, -0.12948356568813324, 0.15552949905395508, 0.025407932698726654, 0.34313997626304626, -0.017462557181715965, 0.13705894351005554, 0.49841952323913574, -0.1367763876914978, 0.09796027094125748, -0.06041110306978226, -0.13923604786396027, 0.3413683772087097, 0.6376530528068542, -0.09238192439079285, 0.13324140012264252, 0.0038227378390729427, 0.22703884541988373, 0.3653765320777893, 0.07293633371591568, -0.10534430295228958, 0.33412542939186096, 0.24909523129463196, -0.08066169917583466, -0.2883710563182831, -0.18418116867542267, 0.15036344528198242, -0.04760465770959854, 0.07492782920598984, 0.12784332036972046, 0.08452823758125305, -0.2489469200372696, -0.04646240174770355, 0.0413445383310318, 0.14206641912460327, -0.088227778673172, 0.23525142669677734, -0.040843166410923004, 0.08067530393600464, -0.22515887022018433, 0.003834696486592293, 0.002238951623439789, -0.07128268480300903, 0.04972347989678383, 0.28623339533805847, 0.07578141987323761, 0.5007500648498535, -0.12571027874946594, -0.1692751795053482, -0.007724277675151825, 0.3311449885368347, -0.013400331139564514, 0.24838218092918396, 0.10648448765277863, -0.1253100335597992, -0.12224952131509781, -0.19407297670841217, -0.26963353157043457, 0.41150015592575073, 0.02554486319422722, -0.29438814520835876, -0.16619287431240082, -0.005486235022544861, -0.20191015303134918, 0.46000197529792786, -0.2653142511844635, -0.019463956356048584, -0.07621936500072479, 0.3743448853492737, 0.18998491764068604, -0.16101901233196259, -0.2972484529018402, -0.3647535741329193, 0.1751014143228531, -0.29166996479034424, 0.0634530633687973, -0.015132330358028412, 0.0053439512848854065, -0.10558171570301056, 0.1762615442276001, 0.22197531163692474, 0.1720629781484604, -0.29524266719818115, -0.016761548817157745, 0.021341688930988312, 0.00786835141479969, -0.21928587555885315, 0.3557492792606354, 0.06867814064025879, 0.1814691424369812, 0.18291540443897247, 0.09352822601795197, -0.25864484906196594, 0.03094431199133396, -0.28134962916374207, -0.6952266693115234, -0.0633431002497673, 0.1894446611404419, 0.041611455380916595, 0.09271328896284103, -0.31855499744415283, 0.2004052698612213, -0.2808114290237427, -0.03472849726676941, 0.46591484546661377, 0.02504529431462288, 0.15040266513824463, -0.1765357404947281, 0.1219724714756012, -0.12052436172962189, 0.7277305126190186, 0.2135390192270279, 0.24806079268455505, -0.21980078518390656, -0.20198756456375122, -0.35920846462249756, -0.005202673375606537, -0.1304279863834381, 0.030393065884709358, -0.043606504797935486, 0.23440949618816376, 0.016917645931243896, 0.48018622398376465, -0.25244593620300293, 0.5650551915168762, -0.15608173608779907, 0.1449369192123413, -0.06844974309206009, 0.033407531678676605, 0.13151903450489044, 0.08864400535821915, -0.05650480464100838, -0.23384034633636475, 0.18331880867481232, -0.024879232048988342, -0.0018767043948173523, -0.15569569170475006, 0.23224884271621704, 0.16460900008678436, 0.22848768532276154, 0.15110954642295837, -0.029681259766221046, 0.14839297533035278, -0.033979885280132294, -0.45194482803344727, -0.4413382411003113, 0.006254476960748434, -0.18309533596038818, -0.022167205810546875, -0.2848106324672699, 0.043706610798835754, 0.10468225181102753, 0.26130932569503784, -0.29442423582077026, 0.08858102560043335, -0.1664050817489624, 0.27714595198631287, 0.012628834694623947, 0.05091121792793274, -0.32580694556236267, 0.2498871386051178, 0.0871124118566513, 0.15415620803833008, -0.07729765772819519, -0.19146431982517242, -0.42865580320358276, -0.15903937816619873, 0.3215027451515198, -0.3492080569267273, -0.17363962531089783, -0.35175198316574097, 0.1742372065782547, -0.17913222312927246, 0.11633028090000153, -0.14381730556488037, 0.14577817916870117, 0.08965720981359482, 0.07861147820949554, -0.15258777141571045, 0.4270350933074951, 0.12518422305583954, -0.1900881826877594, -0.013503776863217354, 0.4377385973930359, -0.038946427404880524, -0.1823374480009079, -0.26866862177848816, -0.23822829127311707 ]
https://github.com/huggingface/datasets/issues/525
wmt download speed example
Is there a solution yet? The download speed is still too slow. 60-70kbps download for wmt16 and around 100kbps for wmt19. @sshleifer
Continuing from the slack 1.0 roadmap thread w @lhoestq , I realized the slow downloads is only a thing sometimes. Here are a few examples, I suspect there are multiple issues. All commands were run from the same gcp us-central-1f machine. ``` import nlp nlp.load_dataset('wmt16', 'de-en') ``` Downloads at 49.1 KB/S Whereas ``` pip install gdown # download from google drive !gdown https://drive.google.com/uc?id=1iO7um-HWoNoRKDtw27YUSgyeubn9uXqj ``` Downloads at 127 MB/s. (The file is a copy of wmt-en-de raw). ``` nlp.load_dataset('wmt16', 'ro-en') ``` goes at 27 MB/s, much faster. if we wget the same data from s3 is the same download speed, but ¼ the file size: ``` wget https://s3.amazonaws.com/datasets.huggingface.co/translation/wmt_en_ro_packed_200_rand.tgz ``` Finally, ``` nlp.load_dataset('wmt19', 'zh-en') ``` Starts fast, but broken. (duplicate of #493 )
22
wmt download speed example Continuing from the slack 1.0 roadmap thread w @lhoestq , I realized the slow downloads is only a thing sometimes. Here are a few examples, I suspect there are multiple issues. All commands were run from the same gcp us-central-1f machine. ``` import nlp nlp.load_dataset('wmt16', 'de-en') ``` Downloads at 49.1 KB/S Whereas ``` pip install gdown # download from google drive !gdown https://drive.google.com/uc?id=1iO7um-HWoNoRKDtw27YUSgyeubn9uXqj ``` Downloads at 127 MB/s. (The file is a copy of wmt-en-de raw). ``` nlp.load_dataset('wmt16', 'ro-en') ``` goes at 27 MB/s, much faster. if we wget the same data from s3 is the same download speed, but ¼ the file size: ``` wget https://s3.amazonaws.com/datasets.huggingface.co/translation/wmt_en_ro_packed_200_rand.tgz ``` Finally, ``` nlp.load_dataset('wmt19', 'zh-en') ``` Starts fast, but broken. (duplicate of #493 ) Is there a solution yet? The download speed is still too slow. 60-70kbps download for wmt16 and around 100kbps for wmt19. @sshleifer
[ -0.19230441749095917, -0.2106531858444214, 0.03816958889365196, 0.16115030646324158, 0.09751428663730621, -0.15854740142822266, 0.19040514528751373, 0.15333987772464752, 0.12041471898555756, 0.0007965564727783203, 0.0680532157421112, 0.4522772431373596, -0.14242921769618988, 0.11495473235845566, 0.13798029720783234, -0.019072599709033966, -0.03160715848207474, -0.016465678811073303, -0.5539649724960327, -0.1806613802909851, 0.12438099086284637, 0.22410418093204498, -0.045468609780073166, -0.11345568299293518, 0.01325589045882225, 0.15714484453201294, -0.0064901914447546005, -0.05268273502588272, -0.4414256513118744, -0.24387933313846588, 0.1700967252254486, 0.2271818220615387, -0.08149401098489761, 0.22662797570228577, -0.00010947174450848252, -0.10073167830705643, 0.35733461380004883, 0.021991288289427757, -0.47191137075424194, -0.2320847064256668, -0.44332000613212585, -0.531978964805603, -0.18518558144569397, 0.012383565306663513, 0.06894434988498688, -0.002164428122341633, -0.007084542885422707, 0.1026332676410675, 0.14975231885910034, -0.06189579516649246, 0.19087402522563934, 0.35016486048698425, -0.3927140235900879, -0.08030488342046738, 0.529025137424469, 0.05387593060731888, -0.31799647212028503, 0.40864354372024536, 0.4026590585708618, 0.06477804481983185, 0.028435513377189636, 0.3826521635055542, -0.20179598033428192, 0.35203295946121216, 0.15505917370319366, 0.12551578879356384, 0.33141228556632996, 0.05010981485247612, -0.09199851006269455, 0.5831673741340637, 0.31319499015808105, 0.18315112590789795, -0.49715593457221985, -0.3578053414821625, 0.06339924782514572, -0.270096093416214, 0.08031686395406723, 0.2856515347957611, -0.42431774735450745, 0.0002224557101726532, -0.6766803860664368, -0.009958810172975063, 0.06519056856632233, 0.27727997303009033, -0.04812140390276909, 0.6662288904190063, -0.12064845860004425, 0.02153557911515236, 0.11179124563932419, -0.07646942138671875, 0.030359413474798203, -0.27813655138015747, 0.06985552608966827, -0.005714758299291134, -0.06222119554877281, -0.12939521670341492, 0.1594756841659546, -0.03026352822780609, -0.0472639799118042, 0.03397390991449356, -0.09910310059785843, 0.2560757100582123, 0.3124379515647888, -0.04743252694606781, 0.2130231261253357, 0.3228142261505127, -0.260637104511261, -0.19272944331169128, 0.23966947197914124, 0.14919736981391907, 0.15603117644786835, 0.22991502285003662, -0.15879881381988525, -0.07815100252628326, -0.4115276634693146, -0.11844072490930557, -0.0473966971039772, 0.003734823316335678, -0.3469018042087555, -0.25621455907821655, 0.10567034035921097, -0.1855098158121109, -0.09414410591125488, 0.23175713419914246, -0.25384995341300964, 0.3382095396518707, -0.11817847192287445, 0.0032471176236867905, -0.254743754863739, -0.12604907155036926, -0.05354202166199684, -0.08288367092609406, -0.1512463092803955, 0.06785282492637634, 0.4028179943561554, 0.15260685980319977, 0.22171613574028015, 0.14954152703285217, -0.25637638568878174, 0.024426065385341644, 0.13671669363975525, 0.1140647828578949, -0.0522737130522728, 0.021151695400476456, -0.1438652127981186, 0.4553886353969574, -0.1439696103334427, 0.223311647772789, -0.37186193466186523, 0.0244956873357296, -0.353834331035614, -0.0992957353591919, 0.06835358589887619, 0.17656655609607697, -0.3634001612663269, -0.31258633732795715, -0.07749611884355545, 0.3425290584564209, -0.3256634473800659, 0.21135148406028748, -0.14572039246559143, -0.07411447912454605, -0.3165718615055084, -0.008863932453095913, 0.07093392312526703, 0.3774990439414978, -0.05081000179052353, -0.1849673092365265, -0.2460453361272812, 0.28986772894859314, 0.48334136605262756, 0.4508240222930908, -0.1895451545715332, 0.04143400117754936, -0.17663408815860748, 0.07140089571475983, 0.11945995688438416, -0.16182580590248108, -0.24677994847297668, 0.5846033096313477, -0.3631797432899475, 0.10262297838926315, 0.22729507088661194, 0.08977290242910385, 0.1548347920179367, -0.18846745789051056, 0.12603238224983215, 0.5456566214561462, -0.016722844913601875, 0.14330366253852844, -0.43777310848236084, -0.46201515197753906, 0.4027627110481262, 0.03532261401414871, -0.25368747115135193, -0.17117375135421753, -0.03189745545387268, 0.16601622104644775, 0.2982516288757324, -0.0939549058675766, 0.06022343039512634, -0.007716245949268341, -0.07925114035606384, -0.4218626022338867, -0.10646271705627441, 0.2571689486503601, -0.30712419748306274, 0.3156720995903015, -0.029869500547647476, 0.2846215069293976, 0.2721889913082123, 0.1418255865573883, -0.1290600299835205, -0.19952568411827087, 0.06066060811281204, -0.05417683348059654, 0.10896056890487671, 0.18214911222457886, -0.014147723093628883, 0.009242881089448929, 0.15362077951431274, -0.07052859663963318, 0.12775683403015137, 0.05345362424850464, 0.30991023778915405, -0.14562970399856567, 0.06760105490684509, -0.09704114496707916, 0.37845972180366516, -0.09252285212278366, 0.016675639897584915, 0.0030205189250409603, -0.1428608000278473, 0.035102296620607376, -0.1620597094297409, 0.8205013275146484, 0.16363243758678436, 0.05569951981306076, 0.22636720538139343, -0.20335760712623596, 0.418957382440567, 0.46148383617401123, 0.13750538229942322, -0.058321114629507065, -0.3883250653743744, 0.6559357643127441, -0.03348700329661369, 0.20815712213516235, 0.2344062179327011, 0.02539411000907421, -0.010891987010836601, 0.033126574009656906, -0.1978796422481537, -0.026673536747694016, 0.4525543451309204, 0.028711900115013123, -0.0495549701154232, 0.13351669907569885, 0.12211324274539948, 0.33728957176208496, 0.6990543603897095, -0.0764462798833847, 0.08024956285953522, 0.16116690635681152, -0.244098961353302, -0.4479448199272156, 0.283208966255188, 0.33462023735046387, 0.4011628031730652, 0.1236724853515625, 0.47939053177833557, 0.09828555583953857, 0.014997852966189384, -0.2614244222640991, 0.453869491815567, 0.0683598443865776, -0.31486526131629944, 0.06914159655570984, 0.05582469329237938, -0.04075699672102928, -0.32035186886787415, 0.3138861060142517, 0.03237437456846237, 0.03953656554222107, -0.17110083997249603, 0.10684392601251602, -0.5006795525550842, -0.2801327109336853, -0.2517419755458832, -0.22078880667686462, -0.2238316535949707, -0.3181200623512268, 0.007651122286915779, -0.029656250029802322, -0.15306153893470764, -0.026114581152796745, 0.30232569575309753, 0.09738800674676895, -0.3252888321876526, 0.19807949662208557, -0.25252076983451843, -0.02476981095969677, -0.361787885427475, 0.032517995685338974, 0.25612151622772217, 0.13635139167308807, 0.37044939398765564, -0.27083224058151245, -0.18322846293449402, -0.013192238286137581, -0.32526400685310364, 0.08138109743595123, -0.004451055079698563, 0.309969425201416, 0.08699330687522888, 0.05356829985976219, -0.2448790818452835, 0.02585681900382042, 0.04413244128227234, -0.3550925552845001, 0.046103209257125854, -0.0059969183057546616, -0.22569124400615692, -0.05819767341017723, -0.2201519012451172, -0.41047945618629456, -0.2594750225543976, -0.1429174244403839, 0.25944361090660095, -0.14391081035137177, 0.13737237453460693, 0.2676984369754791, -0.24050076305866241, 0.21548347175121307, -0.06777141243219376, 0.17648768424987793, -0.11950207501649857, -0.40751275420188904, 0.35214126110076904, -0.04693898186087608, -0.25538352131843567, 0.2142435610294342, 0.13343922793865204, 0.07730591297149658, 0.053856223821640015, -0.3868005871772766, 0.35856032371520996, -0.13622747361660004, -0.04135748744010925, 0.4282898008823395, 0.21883341670036316, 0.18715180456638336, -0.1434076428413391, -0.03988847881555557, -0.08423496782779694, -0.33091214299201965, -0.15045127272605896, 0.3599238395690918, 0.1746113896369934, -0.2924560308456421, -0.013914220035076141, 0.33365774154663086, 0.42549240589141846, 0.1031937301158905, 0.20846694707870483, 0.12428699433803558, 0.168588325381279, -0.08072307705879211, 0.2745336592197418, -0.026540519669651985, 0.3414583206176758, -0.15843263268470764, -0.006102612242102623, 0.3130585849285126, 0.13148647546768188, -0.28134262561798096, -0.1579693853855133, 0.15093523263931274, 0.15226751565933228, -0.2612183094024658, -0.035605475306510925, 0.02051495760679245, -0.11448074132204056, 0.23566672205924988, 0.1436474621295929, -0.19432856142520905, -0.3548482656478882, 0.029680877923965454, 0.15593034029006958, -0.08762241154909134, 0.12472111731767654, 0.05220085754990578, 0.11584997177124023, -0.6414433121681213, -0.11473451554775238, 0.06032747030258179, 0.34190309047698975, 0.18266747891902924, -0.04282518848776817, 0.1333046406507492, -0.18157002329826355, 0.07173920422792435, -0.15349026024341583, 0.20296604931354523, -0.03837107867002487, -0.29175978899002075, -0.5185973048210144, -0.3812626600265503, -0.24963736534118652, -0.4734684228897095, 0.34500250220298767, 0.12635309994220734, -0.1400882750749588, -0.18537071347236633, 0.11250700801610947, 0.16541501879692078, 0.023246292024850845, -0.043245043605566025, -0.008831899613142014, -0.4730161130428314, 0.040526703000068665, -0.13780134916305542, -0.28837692737579346, -0.10904984176158905, -0.02727527730166912, -0.005579616874456406, 0.32685211300849915, 0.29500100016593933, -0.019519641995429993, 0.03090641275048256, -0.014820078387856483, 0.1408235877752304, 0.2824573516845703, 0.027866940945386887, 0.31565162539482117, -0.24936217069625854, 0.4222191274166107, 0.25640052556991577, 0.13883300125598907, 0.017125288024544716, 0.041495583951473236, 0.06534023582935333, 0.6348182559013367, 0.13930734992027283, 0.19148972630500793, -0.1340208202600479, 0.20489075779914856, -0.3286886513233185, 0.08561962097883224, 0.41983580589294434, -0.09227795153856277, 0.031512875109910965, -0.1679934710264206, 0.3272453844547272, -0.04327373206615448, -0.06820471584796906, -0.01956816017627716, -0.4723750948905945, -0.03894967585802078, -0.1813565045595169, 0.1990225911140442, 1.0325300693511963, -0.10322947800159454, 0.36068224906921387, 0.24627205729484558, -0.3267301321029663, 0.6611089110374451, -0.0010676048696041107, -0.04636279493570328, 0.07931250333786011, 0.3475838303565979, 0.07806994020938873, 0.07139287889003754, 0.100694440305233, 0.08530162274837494, -0.3384716212749481, 0.3028825521469116, 0.2931588292121887, 0.23418256640434265, 0.12501242756843567, 0.3649475574493408, -0.2309810221195221, -0.30353859066963196, -0.0039910245686769485, 0.14760643243789673, -0.14628510177135468, 0.43849873542785645, 0.01120736449956894, -0.21274834871292114, -0.08081726729869843, -0.082734614610672, -0.4961405396461487, 0.07814820855855942, -0.179117351770401, -0.1322704553604126, -0.3198830485343933, -0.30727630853652954, 0.13821640610694885, -0.31257209181785583, -0.18231715261936188, 0.15937891602516174, -0.3063558340072632, 0.20157527923583984, -0.4997557997703552, 0.3228513300418854, 0.3548263609409332, -0.2214936465024948, -0.12075921893119812, -0.3069574236869812, -0.020191624760627747, -0.36736464500427246, 0.11219129711389542, 0.17904344201087952, -0.14026020467281342, -0.1554659903049469, -0.11744923889636993, 0.4760383665561676, 0.025615572929382324, 0.25368624925613403, 0.0014981143176555634, -0.2755518853664398, 0.1603965014219284, 0.1830122172832489, -0.15112094581127167, 0.42490625381469727, 0.030691999942064285, -0.25309059023857117, -0.30226096510887146, 0.5446181297302246, -0.17125698924064636, -0.07620319724082947, 0.2353506237268448, 0.23786644637584686, -0.20183971524238586, -0.25675928592681885, -0.03530754894018173, -0.23825712502002716, -0.2796834111213684, 0.13129770755767822, -0.20136258006095886, 0.01628553867340088, 0.10165761411190033, 0.27919650077819824, 0.2899501621723175, -0.018442407250404358, -0.028155915439128876, -0.15019120275974274, 0.02542261593043804, 0.0378241166472435, 0.06316240131855011, 0.04639485850930214, -0.4493817090988159, -0.2314697653055191, 0.07303539663553238, 0.16621237993240356, -0.30181559920310974, 0.07279602438211441, 0.053425222635269165, -0.037006400525569916, 0.046818170696496964, -0.23044738173484802, 0.16487762331962585, 0.09832727909088135, 0.06274402141571045, -0.2889098525047302, -0.10009665787220001, -0.2096276581287384, -0.09449814260005951, 0.14222809672355652, 0.009396973997354507, -0.6041990518569946, 0.4268813729286194, -0.12095128744840622, -0.07048101723194122, -0.049162112176418304, 0.06335145235061646, 0.13220664858818054, -0.18956808745861053, 0.1917339265346527, 0.004371006041765213, 0.14083488285541534, -0.11953714489936829, 0.17818881571292877, -0.050223588943481445, 0.3720967173576355, 0.11735949665307999, 0.11875667423009872, 0.53053879737854, -0.04672319442033768, 0.0031670345924794674, -0.17425483465194702, -0.129912868142128, 0.2519773542881012, 0.6152693629264832, -0.10116761922836304, 0.21664497256278992, 0.03128539025783539, 0.1953362673521042, 0.4234860837459564, 0.018662897869944572, -0.1360410749912262, 0.3578154742717743, 0.1634838581085205, -0.007625041529536247, -0.30448785424232483, -0.07116518914699554, 0.1949170082807541, -0.14360688626766205, 0.06865860521793365, 0.2110060751438141, 0.10867467522621155, -0.21506600081920624, -0.1451815366744995, 0.20161603391170502, 0.04813294857740402, 0.028395505622029305, 0.3459685742855072, 0.03908707574009895, 0.16165685653686523, -0.2308824062347412, -0.0689186155796051, 0.02176693081855774, -0.09431090950965881, -0.013187624514102936, 0.21981433033943176, 0.08970997482538223, 0.60773104429245, -0.10973941534757614, -0.215264230966568, -0.07430651783943176, 0.426831990480423, -0.12615549564361572, 0.2197943925857544, 0.2022067904472351, -0.11724970489740372, -0.04721474647521973, -0.2399030327796936, -0.28133341670036316, 0.39143308997154236, 0.04042471945285797, -0.33399373292922974, -0.18449683487415314, -0.00898810476064682, -0.32528162002563477, 0.4570537209510803, -0.3683610260486603, 0.055663712322711945, -0.012478873133659363, 0.36785733699798584, 0.12088049203157425, -0.3303731381893158, -0.3447903096675873, -0.4250260293483734, 0.22622230648994446, -0.251473069190979, 0.053890906274318695, -0.1363188773393631, 0.01555013656616211, -0.11118154227733612, 0.2048870027065277, 0.14337831735610962, 0.251720666885376, -0.13157334923744202, -0.10681360960006714, 0.055251289159059525, 0.05174677073955536, -0.18262970447540283, 0.3563983142375946, 0.1094769686460495, 0.16143088042736053, 0.13961929082870483, 0.0032208748161792755, -0.2617652118206024, 0.05046527832746506, -0.2575356960296631, -0.7597655653953552, -0.21485315263271332, 0.25914236903190613, -0.09974776208400726, 0.10272722691297531, -0.31102585792541504, 0.13421793282032013, -0.14539951086044312, -0.019284073263406754, 0.442372590303421, -0.01466140616685152, 0.20505905151367188, -0.10462362319231033, 0.0775274932384491, -0.12766258418560028, 0.6228082180023193, 0.14382784068584442, 0.17339950799942017, -0.3027561604976654, -0.20982572436332703, -0.43609312176704407, -0.04350417107343674, -0.20791780948638916, 0.12015797197818756, 0.09331648796796799, 0.13452363014221191, -0.05409688502550125, 0.40374135971069336, -0.0514867901802063, 0.612637996673584, -0.06783401966094971, 0.04768511280417442, -0.10627752542495728, -0.15287350118160248, 0.13377487659454346, -0.052877336740493774, -0.0957043394446373, -0.30048424005508423, 0.23285287618637085, -0.10571218281984329, -0.09857376664876938, -0.17859439551830292, 0.274679958820343, 0.08288420736789703, 0.3282949924468994, 0.14849674701690674, 0.06907869130373001, 0.32208070158958435, 0.05489480495452881, -0.37687692046165466, -0.4569464325904846, -0.028891315683722496, -0.1553303301334381, 0.05267537012696266, -0.36764538288116455, -0.033174529671669006, 0.11079245805740356, 0.2575424313545227, -0.31008628010749817, 0.03150363266468048, -0.14564764499664307, 0.24975287914276123, -0.05611978471279144, 0.12145370990037918, -0.2628324627876282, 0.21970535814762115, 0.07602337747812271, 0.0962245985865593, -0.09019023180007935, -0.07874412089586258, -0.42434096336364746, -0.05822893977165222, 0.2731250524520874, -0.2771427631378174, -0.09974920749664307, -0.4166165888309479, 0.23954658210277557, -0.15942880511283875, 0.18615537881851196, -0.020302072167396545, 0.04827053099870682, 0.15617044270038605, 0.005462523549795151, -0.16778779029846191, 0.4472098648548126, 0.22002165019512177, -0.20765483379364014, 0.0784497857093811, 0.47886428236961365, 0.09058384597301483, -0.23129484057426453, -0.16781727969646454, -0.1623738706111908 ]
https://github.com/huggingface/datasets/issues/519
[BUG] Metrics throwing new error on master since 0.4.0
Update - maybe this is only failing on bleu because I was not tokenizing inputs to the metric
The following error occurs when passing in references of type `List[List[str]]` to metrics like bleu. Wasn't happening on 0.4.0 but happening now on master. ``` File "/usr/local/lib/python3.7/site-packages/nlp/metric.py", line 226, in compute self.add_batch(predictions=predictions, references=references) File "/usr/local/lib/python3.7/site-packages/nlp/metric.py", line 242, in add_batch batch = self.info.features.encode_batch(batch) File "/usr/local/lib/python3.7/site-packages/nlp/features.py", line 527, in encode_batch encoded_batch[key] = [encode_nested_example(self[key], cast_to_python_objects(obj)) for obj in column] File "/usr/local/lib/python3.7/site-packages/nlp/features.py", line 527, in <listcomp> encoded_batch[key] = [encode_nested_example(self[key], cast_to_python_objects(obj)) for obj in column] File "/usr/local/lib/python3.7/site-packages/nlp/features.py", line 456, in encode_nested_example raise ValueError("Got a string but expected a list instead: '{}'".format(obj)) ```
18
[BUG] Metrics throwing new error on master since 0.4.0 The following error occurs when passing in references of type `List[List[str]]` to metrics like bleu. Wasn't happening on 0.4.0 but happening now on master. ``` File "/usr/local/lib/python3.7/site-packages/nlp/metric.py", line 226, in compute self.add_batch(predictions=predictions, references=references) File "/usr/local/lib/python3.7/site-packages/nlp/metric.py", line 242, in add_batch batch = self.info.features.encode_batch(batch) File "/usr/local/lib/python3.7/site-packages/nlp/features.py", line 527, in encode_batch encoded_batch[key] = [encode_nested_example(self[key], cast_to_python_objects(obj)) for obj in column] File "/usr/local/lib/python3.7/site-packages/nlp/features.py", line 527, in <listcomp> encoded_batch[key] = [encode_nested_example(self[key], cast_to_python_objects(obj)) for obj in column] File "/usr/local/lib/python3.7/site-packages/nlp/features.py", line 456, in encode_nested_example raise ValueError("Got a string but expected a list instead: '{}'".format(obj)) ``` Update - maybe this is only failing on bleu because I was not tokenizing inputs to the metric
[ -0.10627424716949463, -0.00729002058506012, 0.0222177654504776, 0.2218201905488968, 0.3199828863143921, -0.08042693138122559, 0.17598026990890503, 0.3901976943016052, 0.034304577857255936, 0.17569869756698608, -0.08454231172800064, 0.2548739016056061, -0.4288853406906128, 0.07199884206056595, -0.028758786618709564, -0.08164681494235992, -0.0013920515775680542, 0.002474755048751831, -0.07583612203598022, -0.07483460009098053, -0.4520992934703827, 0.14372752606868744, -0.19709409773349762, 0.011039234697818756, 0.028892507776618004, 0.09177156537771225, -0.17969344556331635, 0.037820398807525635, -0.22701352834701538, -0.6951414346694946, 0.08429504930973053, -0.10586704313755035, 0.028665974736213684, 0.5098217129707336, -0.00011643955804174766, 0.004817396402359009, 0.5615225434303284, -0.09699802100658417, -0.27574121952056885, -0.6296268105506897, -0.11947157979011536, -0.37859857082366943, 0.21231922507286072, -0.05515959858894348, -0.1251203864812851, -0.42118319869041443, -0.1600915640592575, -0.024570349603891373, -0.2853536605834961, 0.5097926259040833, 0.18269680440425873, 0.31709548830986023, -0.19702716171741486, -0.370269238948822, 0.1295906901359558, -0.44351351261138916, -0.05420868098735809, 0.2791591286659241, 0.06880224496126175, 0.08936279267072678, -0.35659101605415344, 0.2778957188129425, -0.16722041368484497, 0.09771664440631866, 0.4126299321651459, -0.05994417518377304, 0.7112182974815369, -0.016946446150541306, -0.024426840245723724, 0.06830478459596634, 0.2693001925945282, -0.05940558761358261, -0.3265310823917389, 0.1645631194114685, -0.01240361388772726, -0.5957029461860657, 0.13811618089675903, -0.03366536647081375, -0.10208435356616974, -0.2063249796628952, -0.3794079124927521, -0.15625658631324768, -0.007180497050285339, 0.2209165096282959, -0.27121227979660034, 0.3870181143283844, -0.1360197812318802, -0.09984976798295975, 0.5003243684768677, -0.03880784660577774, 0.18009160459041595, -0.06163744628429413, -0.3171216547489166, -0.055230844765901566, -0.2707432508468628, -0.10922524333000183, 0.09497953206300735, 0.22276607155799866, -0.031682346016168594, -0.011990450322628021, 0.03493480011820793, -0.0800451934337616, 0.05220497027039528, 0.13842926919460297, 0.3684632182121277, 0.4071958363056183, 0.21653145551681519, -0.14212699234485626, 0.22754035890102386, 0.27070197463035583, 0.08339452743530273, -0.0756213515996933, 0.29688841104507446, -0.2845103442668915, -0.06796782463788986, 0.3694421350955963, 0.09759686887264252, -0.2575008273124695, -0.35487356781959534, 0.1660369336605072, -0.2789395749568939, -0.0550793893635273, 0.40453311800956726, 0.4178313910961151, -0.3578879237174988, 0.266899049282074, 0.21662352979183197, 0.3325396776199341, -0.03265918791294098, -0.004147769883275032, -0.16723884642124176, 0.00012400932610034943, -0.30074310302734375, -0.1598050594329834, -0.12828141450881958, -0.3283575475215912, 0.37113723158836365, 0.10494869202375412, 0.4938412308692932, -0.1525193452835083, -0.1196289137005806, -0.09512442350387573, 0.08396712690591812, 0.1391262412071228, 0.03611798211932182, -0.11843311786651611, 0.25836801528930664, -0.40679919719696045, 0.093779556453228, 0.13757850229740143, -0.3253026008605957, -0.1255250722169876, -0.03800063580274582, 0.13573363423347473, -0.1714637130498886, 0.13310614228248596, -0.24971917271614075, 0.15192830562591553, 0.1851925104856491, 0.0763440877199173, -0.2300550937652588, -0.23652870953083038, -0.21120131015777588, -0.2743981182575226, 0.0838535875082016, -0.06754279136657715, -0.07198957353830338, -0.06433696299791336, -0.004745653364807367, 0.2580302655696869, 0.0987982451915741, 0.16287966072559357, 0.06019067391753197, 0.19474539160728455, -0.11992853879928589, -0.40762948989868164, 0.22812938690185547, -0.4222307801246643, -0.08469895273447037, 0.03304128721356392, -0.10038166493177414, -0.1777203232049942, 0.018492475152015686, -0.08796561509370804, 0.13593743741512299, -0.2058127075433731, 0.5759725570678711, -0.23679997026920319, -0.042704030871391296, -0.12519530951976776, -0.32188886404037476, -0.22534051537513733, 0.020086461678147316, -0.11748246848583221, 0.43515387177467346, 0.3503580689430237, 0.04711027443408966, 0.4298739731311798, 0.010137349367141724, -0.3278264105319977, -0.01303679309785366, 0.2420763224363327, 0.3168126344680786, -0.28888535499572754, 0.23730139434337616, -0.058906570076942444, -0.01436394453048706, -0.03805079683661461, -0.137143075466156, 0.29379981756210327, 0.055415794253349304, 0.013485755771398544, -0.1908237338066101, 0.04316488653421402, 0.055289376527071, 0.2678285539150238, 0.12592552602291107, -0.04286271333694458, -0.2989116609096527, 0.2762344479560852, 0.00674862414598465, -0.3360517621040344, -0.26500552892684937, 0.05838519334793091, 0.2053065001964569, 0.09221203625202179, -0.12586607038974762, -0.2059829831123352, 0.10465174913406372, 0.3960458040237427, 0.31069281697273254, 0.05608499050140381, -0.1756466031074524, 0.11786194890737534, 0.2674851715564728, -0.2520051598548889, -0.07857156544923782, 0.44763725996017456, 0.4362248182296753, -0.013738714158535004, 0.032524947077035904, 0.49914661049842834, 0.09856011718511581, -0.12661562860012054, 0.2538805305957794, 0.4040437936782837, 0.07487007975578308, 0.1763356775045395, 0.08788992464542389, 0.25620776414871216, 0.09642432630062103, 0.08887463808059692, 0.04628048092126846, -0.21345873177051544, 0.30342891812324524, -0.23958013951778412, -0.012470804154872894, -0.3341287076473236, -0.027353983372449875, -0.06802505999803543, 0.43892818689346313, 0.17979180812835693, 0.18115539848804474, 0.08236312121152878, -0.04615199565887451, -0.04858042299747467, -0.14819680154323578, -0.06491918116807938, 0.35599225759506226, 0.08304357528686523, 0.13236135244369507, 0.3042527139186859, 0.0315917544066906, -0.2434699982404709, 0.22994038462638855, 0.19005337357521057, -0.2009667456150055, -0.014352180063724518, 0.18859142065048218, -0.1266465187072754, 0.15894588828086853, 0.13494807481765747, -0.05898568034172058, 0.3524663746356964, -0.3869655132293701, -0.025272078812122345, -0.3195982873439789, 0.2235093116760254, -0.04659343138337135, -0.2895767390727997, -0.2419300675392151, -0.3839183747768402, 0.07856588810682297, 0.5633406639099121, -0.17215043306350708, 0.28367769718170166, 0.22502395510673523, 0.2812367081642151, 0.06644944101572037, 0.42728209495544434, 0.2186664640903473, -0.3022623658180237, -0.12050769478082657, 0.045539360493421555, 0.20077647268772125, -0.3718578815460205, 0.1317172646522522, 0.062104903161525726, 0.05194728076457977, -0.3125462532043457, -0.4706140160560608, 0.09568634629249573, 0.048727892339229584, 0.517386794090271, 0.3060542941093445, -0.16742627322673798, -0.19227443635463715, 0.031092647463083267, 0.28993046283721924, -0.036148637533187866, -0.09089202433824539, 0.21102987229824066, -0.24173183739185333, -0.08629139512777328, -0.32499030232429504, -0.08338592201471329, -0.0758282020688057, -0.42119044065475464, -0.08455897867679596, 0.130145862698555, 0.1021910160779953, 0.1177109032869339, 0.0031332699581980705, 0.3794729709625244, 0.3393111526966095, -0.2537635266780853, -0.13138028979301453, 0.027813013643026352, -0.12835243344306946, -0.2453273981809616, -0.5491191148757935, -0.07311062514781952, 0.224143385887146, 0.22581106424331665, -0.06597628444433212, -0.3508487939834595, -0.731879711151123, 0.3000258803367615, -0.0032862387597560883, 0.1589716374874115, 0.1296350061893463, -0.06819342076778412, 0.12628273665905, -0.17812731862068176, -0.22505995631217957, -0.03522356599569321, 0.10252397507429123, 0.03313600644469261, 0.24100401997566223, 0.17882487177848816, -0.03498050570487976, 0.36864426732063293, 0.705915629863739, 0.22699399292469025, -0.23795528709888458, 0.3036690652370453, 0.13537105917930603, 0.40721625089645386, -0.02642674744129181, -0.30889928340911865, -0.17354059219360352, 0.10254792869091034, -0.16019517183303833, 0.3309653401374817, -0.16206815838813782, -0.13691413402557373, -0.054162729531526566, -0.05185997113585472, 0.29310253262519836, -0.03365154564380646, -0.04685567319393158, -0.4473397433757782, 0.054236188530921936, -0.005066202953457832, 0.18373394012451172, -0.19278168678283691, -0.2258317768573761, -0.024995572865009308, 0.19855645298957825, -0.08773765712976456, -0.10205599665641785, -0.07569587230682373, -0.5518887042999268, -0.22230270504951477, 0.42702704668045044, 0.2587655186653137, 0.3232920169830322, -0.26602989435195923, 0.1894879937171936, -0.11090759932994843, -0.08322029560804367, 0.41325974464416504, -0.36800897121429443, -0.23972024023532867, 0.09161268174648285, 0.021740660071372986, -0.1438005119562149, 0.11614227294921875, -0.1778072565793991, 0.16607095301151276, 0.3169519007205963, 0.3760712742805481, -0.025173939764499664, -0.27883824706077576, -0.035963885486125946, -0.011321323923766613, -0.05352882668375969, 0.10291770100593567, -0.16768956184387207, -0.41243067383766174, 0.045076340436935425, 0.29237082600593567, -0.06524556130170822, 0.29041895270347595, -0.17085868120193481, 0.06266370415687561, 0.030139759182929993, 0.10090173035860062, -0.0013063326478004456, -0.13614122569561005, 0.11805283278226852, -0.18024888634681702, 0.007808726280927658, 0.020471997559070587, 0.03190327808260918, 0.45502057671546936, 0.00601012259721756, -0.2917795777320862, -0.18130579590797424, 0.1308014690876007, -0.1310534030199051, 0.24439454078674316, 0.2665778696537018, -0.2280220091342926, 0.15382634103298187, 0.05995775759220123, 0.12827423214912415, -0.03262540325522423, -0.27807554602622986, 0.18868328630924225, 0.1657051146030426, -0.29180797934532166, -0.28905123472213745, 0.21404233574867249, 0.19211451709270477, 0.003977030515670776, 0.33379414677619934, -0.14594514667987823, -0.3020857870578766, 0.2901756763458252, 0.25808924436569214, 0.7199819087982178, 0.1772867888212204, 0.06216134503483772, 0.26781201362609863, -0.024807734414935112, 0.33696502447128296, -0.0011276975274085999, 0.22720828652381897, -0.32512587308883667, -0.18192170560359955, -0.051006101071834564, -0.09122897684574127, 0.09039537608623505, -0.2549557089805603, -0.4692084789276123, 0.35712912678718567, -0.33864492177963257, 0.06842733919620514, -0.0027012228965759277, -0.06163680553436279, 0.034033387899398804, -0.10552963614463806, -0.18159787356853485, 0.14501602947711945, -0.04710909724235535, -0.05514291301369667, -0.18133258819580078, -0.14961540699005127, -0.13511523604393005, -0.20939607918262482, -0.2244061380624771, 0.003092542290687561, -0.05007152631878853, 0.07924337685108185, 0.09223499894142151, -0.1890142560005188, 0.0159311443567276, 0.04837235063314438, 0.6843814849853516, 0.13897664844989777, -0.1221337616443634, -0.08967806398868561, -0.31201818585395813, 0.3602876663208008, 0.18240459263324738, 0.02280527725815773, 0.19038110971450806, -0.15218885242938995, -0.17109955847263336, -0.026363812386989594, 0.03822098672389984, -0.23624588549137115, 0.2422468066215515, 0.1380504071712494, -0.5968790650367737, 0.04907538741827011, -0.0457356721162796, -0.1342940330505371, 0.07361283898353577, -0.15029871463775635, 0.12626314163208008, 0.015016879886388779, -0.3940708041191101, 0.1426134705543518, 0.02556896209716797, -0.14328135550022125, 0.1711679846048355, 0.4133886396884918, 0.3825078010559082, -0.07300585508346558, 0.28263139724731445, 0.0793980211019516, -0.01989411935210228, -0.15977853536605835, -0.18738755583763123, -0.10545732825994492, -0.11610922962427139, 0.5724220871925354, -0.07957128435373306, -0.17916692793369293, 0.05643510818481445, 0.5587023496627808, 0.06250128895044327, 0.40606793761253357, -0.20078590512275696, -0.23502160608768463, -0.21740032732486725, 0.1329992562532425, -0.3143027126789093, -0.04209940508008003, -0.30339741706848145, 0.09697382152080536, 0.001345619559288025, -0.006604466587305069, -0.28279006481170654, 0.02914721891283989, -0.5816070437431335, 0.2390805184841156, 0.03475897014141083, -0.07982216030359268, 0.2138291895389557, 0.15460461378097534, -0.06720474362373352, -0.03718532621860504, -0.5296411514282227, -0.11553483456373215, -0.20560914278030396, 0.12226629257202148, 0.26227208971977234, -0.018673984333872795, -0.050742872059345245, 0.040177516639232635, -0.05106624588370323, 0.04897257685661316, 0.08123253285884857, 0.2357848584651947, -0.12119497358798981, 0.17476502060890198, 0.027938343584537506, 0.26386532187461853, 0.44270575046539307, 0.13670024275779724, 0.17421093583106995, 0.04121008515357971, -0.132489874958992, 0.22078143060207367, -0.002574743004515767, -0.02173025533556938, 0.05573216825723648, 0.03621121495962143, 0.017956890165805817, 0.162198007106781, 0.19828787446022034, -0.24737738072872162, -0.048485469073057175, 0.14972060918807983, 0.24059000611305237, -0.13029825687408447, -0.03747355565428734, -0.09050892293453217, 0.06002989783883095, 0.13304656744003296, -0.181807279586792, -0.2732082009315491, 0.15407338738441467, 0.26615020632743835, 0.09185382723808289, 0.16802194714546204, 0.5722929239273071, -0.18126067519187927, 0.4379867911338806, -0.05779772251844406, 0.2492550164461136, -0.5429466366767883, 0.23922429978847504, 0.2238965928554535, 0.20231331884860992, 0.21003034710884094, 0.21750065684318542, -0.08539655804634094, 0.06640677899122238, 0.3406584858894348, 0.0033975988626480103, 0.3295252323150635, 0.49850738048553467, -0.2298925817012787, 0.051768723875284195, -0.2210610955953598, 0.16684333980083466, 0.15571071207523346, 0.17680728435516357, -0.039092980325222015, -0.21765369176864624, 0.14085115492343903, -0.2812759578227997, -0.36723166704177856, -0.08059080690145493, 0.09719349443912506, -0.2728290855884552, -0.013638965785503387, -0.2616155743598938, -0.25621113181114197, 0.02580176293849945, -0.12782025337219238, 0.1950097680091858, 0.09016799181699753, 0.1426079273223877, 0.060419172048568726, 0.20878463983535767, -0.12840087711811066, -0.7600825428962708, 0.35650476813316345, 0.008732862770557404, -0.11130484938621521, 0.03610381484031677, 0.1557193100452423, 0.10526420176029205, 0.1129831075668335, 0.47492170333862305, 0.5415934920310974, 0.4865364730358124, -0.18463551998138428, -0.2029484063386917, -0.0598553828895092, -0.09646912664175034, 0.0054023489356040955, 0.3943554759025574, 0.28697073459625244, -0.20516210794448853, 0.03582971915602684, 0.023795971646904945, -0.10013236105442047, 0.6779953241348267, 0.0031582042574882507, -0.17386634647846222, -0.08368581533432007, 0.6400135159492493, 0.13074804842472076, -0.15036413073539734, -0.20515793561935425, -0.25636017322540283, -0.3835417628288269, 0.2625066041946411, 0.6904427409172058, -0.13504450023174286, 0.18914124369621277, -0.044159866869449615, 0.07950236648321152, 0.16708843410015106, 0.21449966728687286, 0.25708186626434326, 0.13790974020957947, -0.4199149012565613, 0.09365977346897125, -0.24526765942573547, 0.19639930129051208, -0.02028520777821541, 0.6180797815322876, 0.07360798120498657, 0.05048161745071411, -0.0926968976855278, 0.06226181238889694, -0.10048720240592957, -0.06579212844371796, 0.1433035284280777, -0.047509945929050446, -0.6162134408950806, -0.003911890089511871, 0.1456247866153717, -0.20141588151454926, -0.029591334983706474, -0.1896533966064453, -0.28280165791511536, -0.1986451894044876, 0.08022388070821762, -0.1811143010854721, 0.027170851826667786, -0.043273478746414185, 0.32240429520606995, 0.1463051736354828, 0.167593315243721, 0.5402657389640808, 0.16170969605445862, -0.30071842670440674, -0.21964377164840698, -0.3226025700569153, -0.30238649249076843, -0.08737639337778091, 0.028249207884073257, 0.42199963331222534, -0.22597350180149078, -0.13361170887947083, -0.35831910371780396, 0.8097119927406311, 0.08648242056369781, 0.015209225937724113, -0.25739702582359314, 0.41391655802726746, -0.2747877836227417, -0.017431192100048065, 0.10340415686368942, 0.1995459794998169, 0.22407540678977966, 0.37387001514434814, -0.3511289358139038, -0.15264680981636047, 0.6073246002197266, -0.684996485710144, -0.2127240002155304, -0.0282151997089386, 0.41725629568099976, -0.059086211025714874, -0.40346264839172363, -0.5686318874359131, -0.2560308873653412, 0.23835156857967377, 0.07171475142240524, -0.292454332113266, 0.06566887348890305, 0.08703052997589111, 0.18150228261947632, -0.05824907869100571, -0.5435276031494141, 0.04976823180913925, -0.3589709997177124, 0.18483670055866241, -0.26815688610076904 ]
https://github.com/huggingface/datasets/issues/519
[BUG] Metrics throwing new error on master since 0.4.0
Closing - seems to be just forgetting to tokenize. And found the helpful discussion in #137
The following error occurs when passing in references of type `List[List[str]]` to metrics like bleu. Wasn't happening on 0.4.0 but happening now on master. ``` File "/usr/local/lib/python3.7/site-packages/nlp/metric.py", line 226, in compute self.add_batch(predictions=predictions, references=references) File "/usr/local/lib/python3.7/site-packages/nlp/metric.py", line 242, in add_batch batch = self.info.features.encode_batch(batch) File "/usr/local/lib/python3.7/site-packages/nlp/features.py", line 527, in encode_batch encoded_batch[key] = [encode_nested_example(self[key], cast_to_python_objects(obj)) for obj in column] File "/usr/local/lib/python3.7/site-packages/nlp/features.py", line 527, in <listcomp> encoded_batch[key] = [encode_nested_example(self[key], cast_to_python_objects(obj)) for obj in column] File "/usr/local/lib/python3.7/site-packages/nlp/features.py", line 456, in encode_nested_example raise ValueError("Got a string but expected a list instead: '{}'".format(obj)) ```
16
[BUG] Metrics throwing new error on master since 0.4.0 The following error occurs when passing in references of type `List[List[str]]` to metrics like bleu. Wasn't happening on 0.4.0 but happening now on master. ``` File "/usr/local/lib/python3.7/site-packages/nlp/metric.py", line 226, in compute self.add_batch(predictions=predictions, references=references) File "/usr/local/lib/python3.7/site-packages/nlp/metric.py", line 242, in add_batch batch = self.info.features.encode_batch(batch) File "/usr/local/lib/python3.7/site-packages/nlp/features.py", line 527, in encode_batch encoded_batch[key] = [encode_nested_example(self[key], cast_to_python_objects(obj)) for obj in column] File "/usr/local/lib/python3.7/site-packages/nlp/features.py", line 527, in <listcomp> encoded_batch[key] = [encode_nested_example(self[key], cast_to_python_objects(obj)) for obj in column] File "/usr/local/lib/python3.7/site-packages/nlp/features.py", line 456, in encode_nested_example raise ValueError("Got a string but expected a list instead: '{}'".format(obj)) ``` Closing - seems to be just forgetting to tokenize. And found the helpful discussion in #137
[ -0.10258379578590393, 0.030752480030059814, 0.003468478098511696, 0.17230114340782166, 0.2973572611808777, -0.09955544769763947, 0.1647171527147293, 0.3669830858707428, -0.06181507930159569, 0.118963323533535, -0.06702161580324173, 0.31947505474090576, -0.37884992361068726, 0.03343810886144638, 0.005309951491653919, -0.04552994668483734, 0.04887670278549194, 0.05008880794048309, -0.02831510454416275, -0.04154432192444801, -0.4338155686855316, 0.15614014863967896, -0.20375242829322815, 0.06743960827589035, -0.0014888020232319832, 0.03206953406333923, -0.20560047030448914, 0.012458395212888718, -0.20851770043373108, -0.7494328618049622, -0.02375345677137375, -0.022664960473775864, 0.048786312341690063, 0.4582444727420807, -0.00011348554107826203, -0.06490860134363174, 0.5408961772918701, -0.07130755484104156, -0.2891860902309418, -0.5700891613960266, -0.016166632995009422, -0.4225822985172272, 0.23147758841514587, -0.10261837393045425, -0.09314128011465073, -0.49667903780937195, -0.09441179037094116, -0.005261804908514023, -0.17454902827739716, 0.4718383252620697, 0.21299217641353607, 0.3863583505153656, -0.1674000322818756, -0.3329542279243469, 0.06642087548971176, -0.44478195905685425, -0.0540233813226223, 0.263297438621521, 0.08742453902959824, 0.04308000206947327, -0.3499203622341156, 0.2789095640182495, -0.16360914707183838, 0.06742508709430695, 0.3732290267944336, -0.035129472613334656, 0.6463189125061035, -0.03620836138725281, -0.017552051693201065, -0.01675254851579666, 0.2616897225379944, -0.07982825487852097, -0.3455682694911957, 0.0525420606136322, -0.04002116248011589, -0.6671740412712097, 0.10512861609458923, -0.06652040034532547, -0.12534451484680176, -0.23337310552597046, -0.3577314615249634, -0.17471928894519806, 0.017590373754501343, 0.19066132605075836, -0.2718399167060852, 0.47623589634895325, -0.16642363369464874, -0.07595186680555344, 0.39649489521980286, -0.05699418485164642, 0.11949051916599274, -0.0522872656583786, -0.2902091443538666, -0.0657728761434555, -0.19542397558689117, -0.15345898270606995, 0.11027485132217407, 0.175344780087471, -0.05190535634756088, 0.010494763031601906, -0.0231156088411808, -0.020791564136743546, 0.038797397166490555, 0.09179410338401794, 0.3847595751285553, 0.45873457193374634, 0.2474348247051239, -0.1352372169494629, 0.23051221668720245, 0.2567487359046936, 0.10748273134231567, -0.10542163997888565, 0.21793487668037415, -0.19916953146457672, -0.10205671191215515, 0.3530694544315338, 0.07712914049625397, -0.14864619076251984, -0.3942010998725891, 0.1839551329612732, -0.2494337260723114, -0.07001273334026337, 0.34188956022262573, 0.43076470494270325, -0.35830897092819214, 0.278033584356308, 0.15951575338840485, 0.29228585958480835, -0.03733998164534569, -0.054208409041166306, -0.1841023713350296, 0.028725259006023407, -0.3161756694316864, -0.1576247662305832, -0.19696657359600067, -0.2060834765434265, 0.4018804132938385, 0.056790970265865326, 0.4840870499610901, -0.14942559599876404, -0.05778736621141434, -0.05920025706291199, 0.10269324481487274, 0.13775032758712769, 0.03405335173010826, -0.04042471945285797, 0.25281670689582825, -0.4652845859527588, 0.07127582281827927, 0.1340930163860321, -0.24210384488105774, -0.10266991704702377, -0.036344632506370544, 0.1629740595817566, -0.25971370935440063, 0.11916320025920868, -0.26048752665519714, 0.1404055505990982, 0.2097465842962265, 0.10019233822822571, -0.23831409215927124, -0.23536892235279083, -0.193217471241951, -0.27616339921951294, 0.08058043569326401, -0.09984879195690155, -0.05499355494976044, -0.059291522949934006, 0.0014280765317380428, 0.26874545216560364, 0.17343991994857788, 0.23308490216732025, 0.062267377972602844, 0.2976837158203125, -0.1386231929063797, -0.272398442029953, 0.28049221634864807, -0.3891463279724121, -0.04513316601514816, 0.007501265034079552, -0.15072591602802277, -0.1308651566505432, -0.0063749998807907104, -0.15554410219192505, 0.27430620789527893, -0.2414907068014145, 0.6387072801589966, -0.20989760756492615, -0.023490747436881065, -0.09198516607284546, -0.3614310920238495, -0.1873825341463089, 0.022189302369952202, -0.1704643815755844, 0.39978066086769104, 0.2793900668621063, -0.00048076361417770386, 0.4381341338157654, 0.05732411891222, -0.3086838722229004, 0.01024510245770216, 0.14290164411067963, 0.35980260372161865, -0.20836763083934784, 0.20660535991191864, 0.0043903253972530365, 0.030152257531881332, -0.09036118537187576, -0.143031045794487, 0.28864121437072754, 0.0005859509110450745, -0.05341600254178047, -0.15378731489181519, 0.06225135177373886, 0.06560251861810684, 0.20671296119689941, 0.16877274215221405, -0.06567621231079102, -0.324729323387146, 0.2614592909812927, -0.07770080864429474, -0.3801065683364868, -0.26967284083366394, 0.0930502712726593, 0.1923232525587082, 0.04514353722333908, -0.11295176297426224, -0.18057909607887268, 0.11300994455814362, 0.435006320476532, 0.31112104654312134, -0.03212936222553253, -0.14475393295288086, 0.16436317563056946, 0.21130530536174774, -0.23265452682971954, -0.0815262421965599, 0.45973700284957886, 0.415780246257782, 0.060363929718732834, 0.027882833033800125, 0.4788343012332916, 0.067026287317276, -0.10009001195430756, 0.20373457670211792, 0.4495793581008911, 0.1506354808807373, 0.13203899562358856, 0.11518803238868713, 0.269524484872818, 0.10951612889766693, 0.12396986782550812, -0.012374627403914928, -0.25854969024658203, 0.24444499611854553, -0.2514779269695282, -0.05997546762228012, -0.32232511043548584, -0.03684571757912636, -0.028121910989284515, 0.4343470633029938, 0.14950008690357208, 0.1949964165687561, 0.05550243705511093, -0.05689559131860733, -0.08929982781410217, -0.07943197339773178, -0.14113155007362366, 0.37050071358680725, 0.10904009640216827, 0.1751403510570526, 0.27663925290107727, 0.03359295427799225, -0.2884179353713989, 0.26435568928718567, 0.23606297373771667, -0.23860123753547668, -0.07176917046308517, 0.21065446734428406, -0.08734030276536942, 0.10411138087511063, 0.12182769179344177, -0.015099397860467434, 0.3402749300003052, -0.3700840473175049, -0.013585933484137058, -0.3047524392604828, 0.154087632894516, -0.04647544398903847, -0.28229042887687683, -0.26472750306129456, -0.45867499709129333, 0.12537111341953278, 0.5365670323371887, -0.20355936884880066, 0.3060358762741089, 0.21972736716270447, 0.34303611516952515, -0.004089178517460823, 0.4481116533279419, 0.201185405254364, -0.2738149166107178, -0.15920639038085938, 0.06079956516623497, 0.21617601811885834, -0.44235777854919434, 0.19269028306007385, 0.023107683286070824, 0.04497489705681801, -0.3382924795150757, -0.5410548448562622, 0.13462626934051514, 0.01878216676414013, 0.517112135887146, 0.3091265559196472, -0.15556423366069794, -0.22264787554740906, 0.04942906275391579, 0.26180973649024963, -0.05026736110448837, -0.0712885707616806, 0.1240147054195404, -0.20229214429855347, -0.08975163847208023, -0.3304174840450287, -0.13385429978370667, -0.03628404438495636, -0.42138364911079407, -0.004685685038566589, 0.12675340473651886, 0.14584872126579285, 0.16249804198741913, -0.09170603007078171, 0.30006444454193115, 0.22183114290237427, -0.23815128207206726, -0.16745421290397644, 0.032186251133680344, -0.10122373700141907, -0.2741955518722534, -0.5269033312797546, -0.032039470970630646, 0.173140749335289, 0.27742037177085876, -0.14118868112564087, -0.2662644386291504, -0.705044150352478, 0.27299660444259644, 0.014901190996170044, 0.16562186181545258, 0.14555539190769196, -0.07363492250442505, 0.12290718406438828, -0.2186593860387802, -0.18569475412368774, -0.0137077197432518, 0.06259766966104507, 0.038824599236249924, 0.2608802318572998, 0.11862467974424362, -0.026542745530605316, 0.3920218050479889, 0.7582386136054993, 0.20771513879299164, -0.21727930009365082, 0.22506766021251678, 0.08902236819267273, 0.46500304341316223, -0.04403609782457352, -0.24334435164928436, -0.1683034896850586, 0.09785601496696472, -0.17871548235416412, 0.4105876684188843, -0.13758370280265808, -0.1326860934495926, 0.002482254058122635, -0.09075991064310074, 0.27212634682655334, -0.10752177238464355, -0.0025530438870191574, -0.44427230954170227, 0.062043800950050354, 0.03776496276259422, 0.21418985724449158, -0.19998051226139069, -0.24474823474884033, -0.07386168837547302, 0.1722298264503479, -0.08533187955617905, -0.13596658408641815, -0.18586349487304688, -0.5356908440589905, -0.2991841733455658, 0.4534091353416443, 0.14279527962207794, 0.440617173910141, -0.19124089181423187, 0.12188240140676498, -0.07762382924556732, -0.07540764659643173, 0.4426031708717346, -0.2954178750514984, -0.3221553564071655, 0.06780283153057098, 0.05041448026895523, -0.12772485613822937, 0.07157041132450104, -0.1836455762386322, 0.22247028350830078, 0.39434370398521423, 0.456062376499176, -0.0618271604180336, -0.3682315945625305, -0.08915692567825317, -0.015008822083473206, -0.06133708730340004, 0.10478682070970535, -0.19135533273220062, -0.41354212164878845, 0.0008693262934684753, 0.3236665427684784, -0.023224743083119392, 0.289687842130661, -0.16769009828567505, 0.07673272490501404, 0.08556877821683884, -0.024872036650776863, 0.06337051838636398, -0.11076074838638306, 0.09158603847026825, -0.12422484904527664, -0.008820584043860435, 0.035211458802223206, 0.09759746491909027, 0.40319445729255676, -0.061482466757297516, -0.24364939332008362, -0.12015490233898163, 0.1217559427022934, -0.0821394994854927, 0.34281593561172485, 0.3620152473449707, -0.24110735952854156, 0.1716369092464447, -0.05732005089521408, 0.21961936354637146, -0.05154420807957649, -0.18944187462329865, 0.19675211608409882, 0.12351375073194504, -0.32977724075317383, -0.2535508871078491, 0.17635047435760498, 0.18994590640068054, -0.05825751647353172, 0.3350786566734314, -0.17322321236133575, -0.3365859091281891, 0.32957834005355835, 0.26076462864875793, 0.7838829159736633, 0.1587836593389511, 0.14536435902118683, 0.22419750690460205, 0.0076922401785850525, 0.44966641068458557, -0.0850992202758789, 0.28540676832199097, -0.32976147532463074, -0.10691305249929428, -0.01757611706852913, -0.028336694464087486, 0.07653239369392395, -0.27440816164016724, -0.42126551270484924, 0.39583930373191833, -0.31301480531692505, 0.11196668446063995, 0.04766037315130234, -0.019314739853143692, 0.001761188730597496, -0.1346185952425003, -0.17630675435066223, 0.14340601861476898, -0.050992101430892944, -0.06381413340568542, -0.1985660195350647, -0.15338872373104095, -0.0887419804930687, -0.24915924668312073, -0.2029886096715927, -0.04650767147541046, 0.0008172760717570782, 0.05005737021565437, 0.10217535495758057, -0.1325024515390396, 0.010159395635128021, -0.04537512734532356, 0.6511391997337341, 0.2024535983800888, -0.0967981219291687, -0.08610373735427856, -0.33751437067985535, 0.34228193759918213, 0.16198749840259552, 0.037724174559116364, 0.21051745116710663, -0.12572899460792542, -0.06711315363645554, 0.021602991968393326, 0.05432962626218796, -0.16838982701301575, 0.10296180844306946, 0.11807946860790253, -0.4745994210243225, -0.012365369126200676, 0.01473064161837101, -0.12934336066246033, 0.02270909771323204, -0.15493449568748474, 0.14512313902378082, 0.04430142045021057, -0.4271370768547058, 0.2010449469089508, -0.008381448686122894, -0.11789484322071075, 0.13742153346538544, 0.37408027052879333, 0.38733214139938354, -0.12963619828224182, 0.32130882143974304, 0.029497813433408737, -0.024238448590040207, -0.19344356656074524, -0.15873122215270996, -0.10212302953004837, -0.02830120548605919, 0.52678382396698, -0.015963608399033546, -0.1582401990890503, 0.03935330733656883, 0.610892117023468, 0.06799637526273727, 0.3737499415874481, -0.2151808887720108, -0.24026066064834595, -0.213726207613945, 0.15241795778274536, -0.34214624762535095, 0.03578915446996689, -0.26877593994140625, 0.159846231341362, -0.04830898717045784, -0.06753136962652206, -0.32560330629348755, -0.005327971652150154, -0.5822662115097046, 0.22818967700004578, 0.0019565243273973465, -0.04471132159233093, 0.17779430747032166, 0.16727633774280548, -0.026995301246643066, 0.008778020739555359, -0.5163067579269409, -0.12830859422683716, -0.16413691639900208, 0.13322867453098297, 0.2568812668323517, 0.0015648121479898691, -0.03379878029227257, 0.08688011020421982, -0.0358160063624382, 0.013762449845671654, 0.05134202912449837, 0.22492507100105286, -0.13801564276218414, 0.13451194763183594, 0.05313237011432648, 0.3093573749065399, 0.4541183114051819, 0.016851214691996574, 0.21142852306365967, 0.11036963015794754, -0.1310712844133377, 0.21718385815620422, -0.049100570380687714, -0.021371375769376755, 0.08267294615507126, 0.06689219921827316, 0.0013307631015777588, 0.20757097005844116, 0.1935933530330658, -0.20060355961322784, -0.14414499700069427, 0.15523633360862732, 0.22867365181446075, 0.0008648037910461426, -0.05799032375216484, -0.17377790808677673, 0.11174008250236511, 0.15240293741226196, -0.1537359654903412, -0.2560844123363495, 0.082869753241539, 0.28737735748291016, 0.043515894562006, 0.2376529574394226, 0.6414464712142944, -0.15128323435783386, 0.3893936276435852, -0.05933813005685806, 0.3311483860015869, -0.5056813359260559, 0.25549840927124023, 0.12558560073375702, 0.17523808777332306, 0.20682761073112488, 0.2748243510723114, -0.10837338864803314, 0.09280399233102798, 0.3665819764137268, -0.005893304944038391, 0.42535853385925293, 0.5238873958587646, -0.19395428895950317, 0.0416300892829895, -0.2242095172405243, 0.15874135494232178, 0.10864681750535965, 0.2729474902153015, -0.023250557482242584, -0.21087312698364258, 0.09154681116342545, -0.2629581391811371, -0.31001928448677063, -0.12113360315561295, 0.12963922321796417, -0.30285918712615967, -0.018911931663751602, -0.2903180718421936, -0.284882515668869, 0.009946726262569427, -0.17187868058681488, 0.15983590483665466, 0.05899723619222641, 0.07142244279384613, -0.024929672479629517, 0.19333454966545105, -0.09023652970790863, -0.6897422075271606, 0.2785601019859314, 0.047724779695272446, -0.1806769222021103, 0.09719928354024887, 0.08784255385398865, 0.10245434939861298, 0.007792908698320389, 0.42353591322898865, 0.5571832656860352, 0.5265244245529175, -0.15130239725112915, -0.21168673038482666, -0.10388590395450592, -0.07898246496915817, 0.0074872542172670364, 0.44052180647850037, 0.24748776853084564, -0.2089950144290924, 0.0488186739385128, 0.04648730158805847, -0.12545612454414368, 0.6335598230361938, 0.061840858310461044, -0.21502305567264557, -0.0572175495326519, 0.6917793154716492, 0.1169627383351326, -0.18686318397521973, -0.15247796475887299, -0.2617034316062927, -0.41491612792015076, 0.2753256559371948, 0.7080236673355103, -0.09096869081258774, 0.19929489493370056, -0.14554817974567413, 0.1045818105340004, 0.17848627269268036, 0.22873449325561523, 0.2525066137313843, 0.12269401550292969, -0.44308915734291077, 0.06354112923145294, -0.27494704723358154, 0.20519199967384338, -0.007802516222000122, 0.566242516040802, 0.05712365731596947, 0.03734400123357773, -0.03867792338132858, 0.06574009358882904, -0.130149707198143, -0.02937999740242958, 0.0640210509300232, -0.11146906018257141, -0.5865785479545593, 0.02289687469601631, 0.177690789103508, -0.17650927603244781, -0.018785547465085983, -0.16614414751529694, -0.21501325070858002, -0.2838035225868225, 0.09082558006048203, -0.20273549854755402, 0.03614988923072815, 0.04518164321780205, 0.3070916533470154, 0.14926749467849731, 0.20198900997638702, 0.4724564850330353, 0.13722625374794006, -0.26259171962738037, -0.19334235787391663, -0.276546835899353, -0.30239561200141907, -0.06889357417821884, 0.0031630732119083405, 0.3741813898086548, -0.20088189840316772, -0.12487860023975372, -0.36681005358695984, 0.666875422000885, 0.08206695318222046, 0.021716617047786713, -0.24822348356246948, 0.46036040782928467, -0.32049331068992615, -0.026962123811244965, 0.08462460339069366, 0.2409326732158661, 0.17293718457221985, 0.30773183703422546, -0.3895666003227234, -0.22657380998134613, 0.6256462335586548, -0.7567949295043945, -0.3048577606678009, -0.03893130645155907, 0.4279532730579376, -0.02629271149635315, -0.3801737427711487, -0.5356050133705139, -0.2704550325870514, 0.2905355393886566, 0.08742371201515198, -0.36609676480293274, 0.038788653910160065, 0.05688624456524849, 0.1276494264602661, -0.06717139482498169, -0.44621244072914124, -0.002206135541200638, -0.3939632177352905, 0.1510465443134308, -0.3153623938560486 ]
https://github.com/huggingface/datasets/issues/517
add MLDoc dataset
This request is still an open issue waiting to be addressed by any community member, @GuillemGSubies.
Hi, I am recommending that someone add MLDoc, a multilingual news topic classification dataset. - Here's a link to the Github: https://github.com/facebookresearch/MLDoc - and the paper: http://www.lrec-conf.org/proceedings/lrec2018/pdf/658.pdf Looks like the dataset contains news stories in multiple languages that can be classified into four hierarchical groups: CCAT (Corporate/Industrial), ECAT (Economics), GCAT (Government/Social) and MCAT (Markets). There are 13 languages: Dutch, French, German, Chinese, Japanese, Russian, Portuguese, Spanish, Latin American Spanish, Italian, Danish, Norwegian, and Swedish
16
add MLDoc dataset Hi, I am recommending that someone add MLDoc, a multilingual news topic classification dataset. - Here's a link to the Github: https://github.com/facebookresearch/MLDoc - and the paper: http://www.lrec-conf.org/proceedings/lrec2018/pdf/658.pdf Looks like the dataset contains news stories in multiple languages that can be classified into four hierarchical groups: CCAT (Corporate/Industrial), ECAT (Economics), GCAT (Government/Social) and MCAT (Markets). There are 13 languages: Dutch, French, German, Chinese, Japanese, Russian, Portuguese, Spanish, Latin American Spanish, Italian, Danish, Norwegian, and Swedish This request is still an open issue waiting to be addressed by any community member, @GuillemGSubies.
[ -0.3504602611064911, 0.047694459557533264, -0.17982687056064606, 0.178057000041008, -0.04010586440563202, 0.09070248156785965, 0.21025505661964417, 0.03258396312594414, -0.2079450637102127, -0.05216085910797119, -0.09145841002464294, 0.28899484872817993, -0.3860359489917755, 0.23930229246616364, 0.008176947943866253, -0.27515920996665955, 0.04857546091079712, -0.11973725259304047, -0.05237710475921631, -0.15223027765750885, -0.25279778242111206, 0.23944547772407532, -0.06917520612478256, -0.30758440494537354, -0.1811061054468155, -0.03536492586135864, -0.3153688907623291, 0.09527856111526489, -0.0668414980173111, -0.29997357726097107, -0.03940343111753464, 0.0626559630036354, 0.0979471355676651, 0.22790583968162537, -0.00010617975203786045, -0.2723764479160309, -0.02134336531162262, -0.07875935733318329, -0.039951391518116, -0.342012882232666, -0.19252634048461914, -0.5444473028182983, -0.10182662308216095, -0.07677753269672394, -0.3466024100780487, -0.04907476529479027, 0.008369920775294304, -0.36138513684272766, 0.0605379194021225, 0.5007582902908325, 0.25653859972953796, 0.08593486994504929, 0.10242784023284912, -0.09764200448989868, 0.27270185947418213, 0.1102413535118103, -0.22419443726539612, 0.47929200530052185, 0.3978058099746704, -0.01295594684779644, -0.12511688470840454, 0.38532760739326477, 0.08556800335645676, -0.17454847693443298, -0.23590102791786194, -0.1055128201842308, 0.3037678599357605, -0.43474075198173523, 0.24024149775505066, 0.41215428709983826, 0.47178804874420166, -0.05785942077636719, -0.030289070680737495, 0.018712341785430908, 0.20115500688552856, -0.12325256317853928, -0.12417774647474289, 0.42480310797691345, -0.1183525025844574, 0.20578189194202423, 0.29128965735435486, -0.27087312936782837, -0.17827603220939636, 0.26737502217292786, 0.0062596797943115234, 0.5904622077941895, -0.0948559045791626, -0.03983554244041443, 0.028629831969738007, 0.0630989819765091, 0.08943136781454086, -0.055980101227760315, 0.02161148563027382, 0.029972296208143234, -0.006994534283876419, -0.13237422704696655, 0.19007748365402222, 0.03389046713709831, -0.011848151683807373, -0.5495747327804565, -0.28243714570999146, 0.12640038132667542, 0.00023301690816879272, 0.21718958020210266, 0.10477982461452484, -0.10026897490024567, -0.08955953270196915, -0.10773777216672897, 0.09006623178720474, -0.6283735632896423, -0.04142424836754799, 0.1344914436340332, -0.018633175641298294, 0.2106264978647232, -0.20730936527252197, 0.28271985054016113, 0.0501626655459404, 0.037476543337106705, -0.14978456497192383, 0.02024802938103676, -0.0945362001657486, -0.10057110339403152, -0.06265265494585037, -0.002581484615802765, 0.2395414561033249, 0.33656513690948486, -0.2852632701396942, 0.41202306747436523, -0.04365222156047821, -0.20597712695598602, -0.01207641139626503, 0.29864174127578735, -0.4672505855560303, 0.2174854725599289, 0.26716896891593933, 0.3142023980617523, -0.12961344420909882, 0.06819279491901398, -0.18051034212112427, -0.04373416677117348, -0.0008036326617002487, -0.010482239536941051, 0.09421499818563461, -0.2559862434864044, -0.179208442568779, -0.17356590926647186, 0.1549902856349945, 0.06681524962186813, -0.31969165802001953, 0.15011578798294067, -0.22821232676506042, -0.14168590307235718, -0.473171591758728, 0.15789607167243958, 0.2616539001464844, -0.24365922808647156, 0.0642121434211731, 0.863277792930603, 0.08250712603330612, 0.025189798325300217, 0.1984638273715973, 0.15626540780067444, -0.3449946939945221, -0.024476341903209686, -0.31511053442955017, 0.3379437327384949, -0.2713027596473694, 0.09854407608509064, -0.3621905744075775, 0.14603100717067719, 0.49853548407554626, -0.14919757843017578, -0.2632509469985962, -0.06466905027627945, -0.03074013441801071, 0.13738331198692322, 0.09827464073896408, -0.1820761114358902, -0.13460750877857208, -0.0635986253619194, -0.2748335003852844, -0.17732274532318115, 0.37228527665138245, 0.3560865521430969, -0.09937319159507751, 0.053008247166872025, -0.29765769839286804, 0.1973380744457245, -0.1643752157688141, 0.18647578358650208, -0.24389322102069855, 0.022328181192278862, 0.37513267993927, 0.23224885761737823, 0.18349890410900116, -0.15143513679504395, 0.33376872539520264, -0.11106888949871063, 0.18826007843017578, -0.08591720461845398, 0.09785225242376328, 0.0397929847240448, 0.3091091513633728, -0.24742569029331207, 0.0880565419793129, -0.18767762184143066, -0.42514628171920776, -0.1957600712776184, 0.06805066019296646, 0.5277485847473145, 0.0006937459111213684, -0.24969352781772614, -0.1992044746875763, -0.19988399744033813, -0.08137361705303192, -0.25888144969940186, 0.2315969467163086, 0.2079888880252838, -0.16494745016098022, 0.34418708086013794, 0.044437337666749954, -0.1457088142633438, -0.17482443153858185, -0.1963104009628296, 0.05205745995044708, 0.30235713720321655, -0.12256739288568497, 0.1410602629184723, 0.2456602156162262, 0.398887038230896, 0.0367087684571743, -0.07943779975175858, -0.08639547228813171, -0.043792277574539185, -0.14234961569309235, 0.1276959478855133, 0.46056264638900757, 0.353047251701355, 0.23527634143829346, -0.5769776105880737, 0.0520046129822731, 0.004533344879746437, -0.032256435602903366, -0.044224828481674194, -0.13164478540420532, 0.5089726448059082, 0.2918938100337982, -0.043919749557971954, -0.12997955083847046, 0.008099319413304329, 0.2802172005176544, 0.10639101266860962, 0.10766495019197464, -0.2521212100982666, 0.19613763689994812, 0.2229689657688141, 0.2231803685426712, 0.00031097419559955597, -0.27007943391799927, 0.35751277208328247, 0.42881885170936584, 0.2195146083831787, 0.41980913281440735, 0.1980837881565094, -0.17206233739852905, -0.15870869159698486, 0.19491170346736908, 0.33163943886756897, 0.32067424058914185, 0.28812336921691895, 0.2182106077671051, -0.11012551933526993, 0.19973526895046234, -0.22707445919513702, 0.05741110444068909, -0.23465315997600555, 0.019447382539510727, 0.14966464042663574, 0.2977229058742523, -0.07873248308897018, -0.3853931128978729, -0.028457745909690857, 0.16827243566513062, 0.11942672729492188, 0.24789613485336304, 0.07579586654901505, 0.010770825669169426, -0.30282139778137207, -0.1325552612543106, -0.037149738520383835, -0.3319292962551117, -0.08812236785888672, 0.22666668891906738, -0.19624505937099457, 0.013538569211959839, 0.19102978706359863, 0.07387489080429077, 0.6659817695617676, -0.2408095747232437, 0.31344524025917053, 0.09469029307365417, -0.37470701336860657, -0.1084236279129982, 0.1872619092464447, 0.3665890693664551, 0.05727313831448555, 0.4213940501213074, -0.08020126819610596, 0.024426911026239395, -0.13910534977912903, -0.39462247490882874, 0.1376083493232727, -0.13266204297542572, 0.004550380632281303, -0.27645403146743774, -0.27834582328796387, -0.20116659998893738, -0.28790274262428284, 0.06799261271953583, 0.2422076165676117, 0.04881766438484192, 0.09688682854175568, -0.25447046756744385, -0.04228456690907478, -0.017037423327565193, -0.5840317010879517, -0.597154974937439, -0.32131823897361755, 0.12378169596195221, -0.48961490392684937, 0.06522443145513535, -0.15237167477607727, -0.17939022183418274, -0.07612673193216324, -0.10647933930158615, 0.08080640435218811, -0.14296038448810577, -0.10134997218847275, 0.10824333131313324, -0.4424518644809723, -0.29488545656204224, -0.22826127707958221, -0.12365704774856567, 0.3014538586139679, -0.11302200704813004, -0.3047885298728943, -0.010509610176086426, 0.000025562942028045654, 0.2592221200466156, 0.21934391558170319, -0.12793338298797607, 0.38544997572898865, 0.17991313338279724, -0.22047586739063263, 0.11500255018472672, 0.1998908668756485, -0.029993541538715363, 0.10247774422168732, 0.19323228299617767, -0.15136390924453735, 0.14413969218730927, 0.20457516610622406, 0.6741440296173096, -0.20408527553081512, -0.2150019258260727, 0.39796218276023865, 0.06474417448043823, 0.2752724289894104, -0.1986933946609497, -0.4880436360836029, 0.06174607202410698, -0.1468411087989807, 0.11928851902484894, 0.43492066860198975, 0.14520734548568726, -0.6007016897201538, -0.149384543299675, -0.044062722474336624, -0.23725134134292603, -0.11926130950450897, 0.4779377281665802, -0.11924125254154205, 0.4893435835838318, -0.060441967099905014, -0.4806227385997772, -0.14669173955917358, -0.46375274658203125, -0.05244821310043335, 0.36581945419311523, -0.0979323610663414, -0.21270398795604706, -0.3793242275714874, -0.23709452152252197, -0.47607678174972534, 0.16586780548095703, 0.29606854915618896, -0.007088589482009411, -0.2773672044277191, 0.13276076316833496, -0.05359894037246704, 0.13785326480865479, -0.047114863991737366, -0.2517940104007721, -0.21128560602664948, 0.22537124156951904, 0.13603204488754272, 0.285765141248703, 0.16756579279899597, -0.2783944010734558, 0.35819944739341736, 0.3128798305988312, 0.0537666454911232, -0.1441444456577301, 0.009222596883773804, 0.10487646609544754, -0.1199764683842659, -0.016466226428747177, -0.2579379379749298, 0.2546902596950531, 0.2651936411857605, 0.040531061589717865, 0.20602889358997345, 0.0771803930401802, 0.013142205774784088, -0.05749858170747757, -0.07955300062894821, 0.29697152972221375, -0.14565366506576538, 0.19849252700805664, -0.023326927796006203, -0.2609384059906006, 0.4214572310447693, -0.08010881394147873, -0.42752841114997864, 0.07678912580013275, 0.4764678478240967, 0.3444794714450836, -0.32779839634895325, -0.32288795709609985, 0.08720021694898605, -0.6639156341552734, 0.46968939900398254, 0.15703938901424408, 0.23912039399147034, 0.22400328516960144, -0.0443975105881691, -0.11648499965667725, -0.12869825959205627, 0.13286669552326202, -0.04008771479129791, 0.12185471504926682, -0.27634087204933167, -0.08443106710910797, 0.3336797058582306, -0.17838984727859497, -0.12710119783878326, 0.04633233696222305, 0.04294002801179886, -0.10243762284517288, 0.14543752372264862, -0.18457376956939697, 0.9991680383682251, 0.04213796555995941, -0.039067383855581284, -0.16200366616249084, 0.041590623557567596, 0.36829689145088196, -0.4186352491378784, 0.0810629203915596, 0.024931136518716812, 0.28861257433891296, -0.010603636503219604, 0.2014370858669281, 0.021723031997680664, 0.41679954528808594, -0.2594117224216461, -0.13287022709846497, -0.09494951367378235, -0.36972010135650635, -0.1294361799955368, 0.3930049240589142, 0.14451640844345093, -0.3100059926509857, -0.07029332220554352, 0.15139350295066833, 0.15857788920402527, -0.06408298015594482, -0.09774430841207504, -0.07840726524591446, 0.11318916082382202, -0.02631620317697525, -0.5851585268974304, -0.16332533955574036, -0.1404447853565216, -0.001067889854311943, -0.3791239857673645, -0.40343523025512695, 0.4643155336380005, 0.10888010263442993, 0.11979630589485168, -0.08168435096740723, -0.07474647462368011, -0.04813830927014351, 0.07616452872753143, -0.08241046965122223, 0.11302381008863449, -0.257723867893219, 0.15171582996845245, -0.1179753988981247, -0.14566241204738617, 0.3262198567390442, 0.05335257947444916, -0.2974799573421478, -0.17397940158843994, -0.00228697806596756, 0.3571198582649231, 0.17943422496318817, 0.20657286047935486, 0.4325195848941803, -0.12379002571105957, -0.1778419017791748, 0.25515133142471313, 0.09032651782035828, -0.056739553809165955, -0.0667489692568779, 0.06316439062356949, -0.09049112349748611, -0.26053234934806824, 0.11195993423461914, 0.35895150899887085, 0.04814416915178299, -0.05435948818922043, 0.35968393087387085, -0.17610394954681396, -0.3980855941772461, 0.21568691730499268, 0.470317542552948, -0.3415982127189636, -0.2643139064311981, 0.09837266802787781, -0.27926862239837646, 0.09477318078279495, 0.12726113200187683, 0.07228582352399826, -0.07616368681192398, -0.03382202982902527, -0.29487478733062744, 0.07819462567567825, -0.10400012135505676, -0.14498217403888702, -0.06261128187179565, -0.14481781423091888, -0.06978775560855865, 0.12071597576141357, 0.5719776153564453, -0.3960474729537964, 0.013271444477140903, -0.11480332911014557, 0.3371838629245758, 0.3385542631149292, 0.19019269943237305, 0.17712990939617157, 0.12639333307743073, 0.08090301603078842, -0.28768467903137207, -0.15526579320430756, -0.24739986658096313, 0.07462792098522186, 0.12630890309810638, 0.004204766824841499, 0.15448464453220367, 0.2634313702583313, -0.16823919117450714, -0.1326875537633896, 0.09973879903554916, -0.08965657651424408, -0.08856543898582458, -0.20062987506389618, 0.24848760664463043, -0.02424980327486992, 0.10263532400131226, 0.1922997534275055, 0.07011842727661133, -0.06055063009262085, 0.41215866804122925, 0.11028002202510834, 0.3135128915309906, 0.20257286727428436, 0.040664687752723694, -0.2264917641878128, 0.04808031767606735, 0.11620455980300903, -0.026430513709783554, 0.01950741559267044, 0.31261855363845825, 0.09099024534225464, 0.28528648614883423, -0.0029837526381015778, -0.30679020285606384, -0.1718093901872635, 0.2622525990009308, 0.18997693061828613, 0.2933293879032135, -0.27641868591308594, -0.11605673283338547, -0.012323889881372452, -0.13635703921318054, 0.3736109137535095, 0.2231886237859726, 0.5580361485481262, 0.05583654344081879, 0.3407672643661499, -0.12819218635559082, 0.212619349360466, -0.10007750988006592, 0.14078204333782196, -0.26684093475341797, 0.07319881021976471, 0.14509160816669464, 0.23898175358772278, 0.022450894117355347, 0.16558793187141418, 0.007310088723897934, 0.17223158478736877, 0.4492502808570862, 0.5488796234130859, 0.07494308054447174, 0.18331634998321533, 0.25719717144966125, 0.4761042892932892, -0.014552980661392212, -0.11380313336849213, 0.10583756864070892, 0.10110031068325043, 0.5873666405677795, -0.099663645029068, -0.2136484980583191, 0.005093282088637352, 0.2641502320766449, 0.020978456363081932, 0.12231892347335815, 0.18889376521110535, -0.19318300485610962, -0.29498302936553955, -0.10770465433597565, -0.05828609690070152, -0.05916336178779602, 0.3235073685646057, 0.1896049678325653, -0.017217054963111877, -0.04351450502872467, -0.18251851201057434, 0.09810151159763336, 0.19390562176704407, -0.25719892978668213, 0.27153971791267395, -0.06091201305389404, -0.11425016820430756, 0.042016640305519104, 0.291174978017807, 0.0636654868721962, 0.15210311114788055, -0.12442700564861298, 0.008001853711903095, -0.2051224261522293, -0.06870125234127045, -0.08330275118350983, 0.18532700836658478, 0.22214370965957642, 0.16776372492313385, 0.09079053997993469, 0.1673060655593872, -0.04289252683520317, 0.13167309761047363, 0.44472643733024597, -0.16163791716098785, -0.10656502842903137, -0.2647455036640167, 0.056902527809143066, 0.06852013617753983, -0.38000646233558655, 0.04823906347155571, -0.18283122777938843, -0.013493434526026249, 0.3872525990009308, -0.23410125076770782, -0.011123280972242355, -0.2185676395893097, 0.1019931212067604, 0.05929014831781387, 0.21906432509422302, 0.13135936856269836, 0.15561799705028534, -0.29322150349617004, -0.33258914947509766, -0.3342856466770172, 0.1244109645485878, 0.04336722195148468, 0.14195416867733002, -0.24388986825942993, 0.09194594621658325, 0.352818101644516, 0.4291573166847229, -0.23485486209392548, -0.09535637497901917, -0.026203308254480362, 0.05037380009889603, -0.6079151630401611, 0.1129191666841507, -0.16106827557086945, 0.17818716168403625, -0.06427644938230515, 0.07178767025470734, -0.06053424999117851, 0.08214298635721207, 0.09792353957891464, -0.37295645475387573, -0.2880815267562866, -0.0017772763967514038, 0.38949665427207947, 0.3264065384864807, 0.09865522384643555, 0.5398361086845398, -0.18912053108215332, -0.2432226538658142, 0.06011681258678436, -0.24822862446308136, -0.034402333199977875, 0.0884413868188858, 0.2808532416820526, 0.07842103391885757, -0.40560033917427063, -0.3906466066837311, 0.23681184649467468, 0.18430766463279724, -0.11910875141620636, -0.1633126437664032, -0.30692675709724426, 0.12179476767778397, 0.24522456526756287, -0.017246613278985023, -0.08863116800785065, 0.2369782030582428, 0.18040360510349274, -0.2136702835559845, -0.054598599672317505, -0.12830643355846405, -0.007833749055862427, -0.1371264010667801, -0.17355141043663025, -0.12680171430110931, 0.2104523479938507, 0.017401520162820816, 0.1700180023908615, -0.24312493205070496, -0.2548586428165436, 0.2900339663028717, 0.1148308739066124, 0.0799131691455841, 0.25780928134918213, 0.12491881847381592, -0.24902193248271942, -0.18251799046993256, -0.22414538264274597, -0.04296167194843292, -0.1331414431333542, -0.07370822131633759, -0.43273818492889404 ]
https://github.com/huggingface/datasets/issues/514
dataset.shuffle(keep_in_memory=True) is never allowed
This seems to be fixed in #513 for the filter function, replacing `cache_file_name` with `indices_cache_file_name` in the assert. Although not for the `map()` function @thomwolf
As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)` The commit added the lines ```python # lines 994-996 in src/nlp/arrow_dataset.py assert ( not keep_in_memory or cache_file_name is None ), "Please use either `keep_in_memory` or `cache_file_name` but not both." ``` This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check. I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`.
25
dataset.shuffle(keep_in_memory=True) is never allowed As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)` The commit added the lines ```python # lines 994-996 in src/nlp/arrow_dataset.py assert ( not keep_in_memory or cache_file_name is None ), "Please use either `keep_in_memory` or `cache_file_name` but not both." ``` This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check. I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`. This seems to be fixed in #513 for the filter function, replacing `cache_file_name` with `indices_cache_file_name` in the assert. Although not for the `map()` function @thomwolf
[ -0.15739195048809052, 0.11012803018093109, -0.056815214455127716, 0.12800773978233337, 0.17058414220809937, -0.06848189979791641, -0.15489496290683746, 0.28612926602363586, 0.033881183713674545, 0.21171797811985016, 0.06588828563690186, 0.5071386694908142, -0.3157265782356262, -0.4159286916255951, -0.07711700350046158, 0.14561209082603455, 0.010662712156772614, 0.05055895820260048, 0.016235869377851486, -0.13063015043735504, -0.32817330956459045, -0.13769151270389557, -0.4366663098335266, -0.2426389902830124, -0.29897719621658325, -0.16402646899223328, 0.005282538011670113, 0.04701288789510727, -0.22749674320220947, -0.4783450663089752, 0.019988248124718666, 0.36176955699920654, -0.4792947769165039, 0.4746549725532532, -0.00011629673826973885, -0.22719992697238922, 0.22328229248523712, -0.07388374209403992, -0.2772008180618286, -0.08045592904090881, -0.3944142460823059, 0.17109200358390808, -0.029430560767650604, -0.10117300599813461, 0.20294839143753052, -0.15307548642158508, 0.03475321829319, -0.4851991832256317, 0.2687031626701355, 0.27868983149528503, 0.15997005999088287, 0.015942733734846115, 0.00017054378986358643, 0.0008205503108911216, 0.4894796311855316, 0.15010908246040344, -0.14166323840618134, 0.15078064799308777, 0.17730273306369781, -0.25890469551086426, 0.020706303417682648, 0.29948264360427856, -0.233148992061615, 0.22119717299938202, 0.20244961977005005, -0.20427750051021576, -0.20594865083694458, -0.22883841395378113, 0.3310016095638275, 0.2132771909236908, 0.24083343148231506, -0.378521203994751, -0.3012774586677551, -0.10539747029542923, -0.03710756078362465, -0.2631692588329315, 0.31073686480522156, 0.23161722719669342, -0.08964528143405914, -0.1278473138809204, -0.22776590287685394, -0.16272783279418945, 0.155419260263443, -0.09696552157402039, 0.1520397812128067, 0.3311278820037842, 0.08542509377002716, 0.07507415115833282, 0.5438091158866882, -0.04346708208322525, 0.17291386425495148, -0.11182600259780884, -0.2220366895198822, 0.36202120780944824, -0.400970995426178, -0.0684155598282814, 0.11643848568201065, 0.1214052140712738, 0.2701936960220337, 0.0775751918554306, 0.2510626018047333, -0.01821555569767952, 0.06985091418027878, 0.21897611021995544, 0.11721837520599365, 0.39117708802223206, -0.045410484075546265, 0.22918839752674103, 0.20233705639839172, -0.06651049107313156, -0.17988283932209015, 0.06437978893518448, 0.0984601378440857, -0.2280796617269516, 0.036201637238264084, -0.13498812913894653, 0.07913105934858322, -0.2575402557849884, -0.1493137925863266, 0.14551740884780884, -0.20164072513580322, -0.27491262555122375, 0.11393015086650848, 0.5352530479431152, 0.2145732194185257, -0.08508269488811493, 0.04865003377199173, 0.024582061916589737, -0.03725598752498627, 0.1303482949733734, -0.35923412442207336, 0.11808741092681885, -0.2858390808105469, 0.09109260141849518, 0.33121663331985474, 0.010379931889474392, 0.4083408713340759, -0.0822000503540039, -0.07673963904380798, 0.14277037978172302, 0.3175205588340759, -0.2982519268989563, 0.49271360039711, 0.34781792759895325, -0.2853676676750183, 0.024510802701115608, 0.023366913199424744, 0.08599899709224701, -0.181895449757576, 0.405704140663147, -0.10470665246248245, -0.31545546650886536, 0.3535180985927582, 0.10462956875562668, -0.09842989593744278, -0.03720472753047943, 0.010570764541625977, -0.032579969614744186, 0.49160006642341614, -0.39136001467704773, 0.33862394094467163, -0.2468019276857376, -0.03183543309569359, -0.3389354348182678, 0.07564224302768707, 0.19052374362945557, -0.2994283139705658, 0.04682489484548569, -0.31015142798423767, 0.009393149986863136, 0.1475350707769394, 0.40339750051498413, -0.0408286489546299, -0.36724191904067993, -0.23175901174545288, 0.1196090579032898, 0.277931272983551, -0.155121847987175, -0.5335748791694641, -0.2240506410598755, -0.039463408291339874, 0.12372473627328873, 0.1481858193874359, -0.020322253927588463, -0.04246283695101738, -0.1730821579694748, 0.5085955858230591, 0.037998415529727936, -0.012626679614186287, 0.11506844311952591, -0.27603837847709656, -0.07695966213941574, 0.345375657081604, -0.18515975773334503, -0.22851897776126862, -0.13187476992607117, 0.11367978155612946, -0.1366748809814453, 0.3384545147418976, 0.0672302097082138, -0.06780579686164856, -0.08488468825817108, 0.5236664414405823, -0.28647685050964355, -0.10194623470306396, -0.09564399719238281, -0.09108961373567581, 0.1867523491382599, 0.13329799473285675, -0.1971723735332489, -0.08854009211063385, -0.21061070263385773, -0.02767341583967209, -0.05637854337692261, -0.14527077972888947, -0.3837934136390686, 0.06890598684549332, 0.10184872895479202, 0.12322863936424255, 0.07835322618484497, -0.16501784324645996, 0.16100360453128815, -0.48001644015312195, -0.17138449847698212, -0.010955369099974632, 0.1475234478712082, -0.007187293842434883, -0.20628994703292847, 0.04992362856864929, 0.16245830059051514, -0.08452462404966354, 0.06340248882770538, -0.3319537043571472, 0.3970717489719391, 0.26950058341026306, 0.07235431671142578, 0.09359012544155121, 0.16721779108047485, -0.09439882636070251, -0.11397905647754669, 0.2701926529407501, -0.1726672202348709, 0.1205773651599884, -0.08152183145284653, -0.1144951805472374, 0.22290173172950745, -0.24998627603054047, 0.09746668487787247, 0.25381332635879517, -0.15760675072669983, 0.3299957513809204, 0.24173948168754578, -0.14052951335906982, -0.24112387001514435, 0.35917460918426514, 0.16795240342617035, 0.37955042719841003, 0.2267790287733078, -0.23835451900959015, -0.07089055329561234, 0.6992049217224121, 0.2837008237838745, 0.16995660960674286, 0.053584158420562744, 0.031355876475572586, -0.3145788609981537, 0.21851609647274017, 0.4217033386230469, 0.5327524542808533, 0.1507357656955719, 0.13668818771839142, -0.045808255672454834, -0.009862148202955723, -0.07317562401294708, 0.3802351951599121, 0.04889913648366928, 0.07755328714847565, 0.11097343266010284, 0.2988070249557495, -0.1855204850435257, -0.5816823840141296, -0.19740326702594757, 0.30760708451271057, 0.18438981473445892, -0.11640799045562744, -0.12140461057424545, -0.33879953622817993, -0.137022003531456, -0.08749572932720184, -0.10349363833665848, -0.2300509512424469, -0.12567241489887238, 0.10221153497695923, 0.40803053975105286, -0.1954033523797989, 0.38571980595588684, -0.3336476683616638, 0.5002210140228271, -0.010224774479866028, -0.19423626363277435, -0.28813815116882324, -0.22123335301876068, 0.13346943259239197, 0.07460163533687592, 0.18779847025871277, 0.14558669924736023, 0.39038383960723877, 0.335934042930603, -0.17876476049423218, -0.03122835047543049, -0.29588910937309265, 0.0691656693816185, -0.1598309427499771, 0.11658904701471329, 0.00001668184995651245, 0.08566588908433914, -0.07618097960948944, -0.3799367845058441, -0.05074625834822655, -0.3272205591201782, -0.24728348851203918, 0.14419563114643097, 0.1873335987329483, -0.16228532791137695, -0.3767651319503784, -0.34601059556007385, -0.2578052580356598, -0.46313899755477905, 0.3171488642692566, -0.08489206433296204, 0.12148556858301163, 0.4202852249145508, 0.014113807119429111, 0.07930908352136612, -0.40651050209999084, 0.12626056373119354, -0.4711132347583771, -0.30169278383255005, 0.15130729973316193, -0.1811852604150772, -0.08489708602428436, -0.05821741372346878, -0.14006739854812622, 0.20913901925086975, 0.3899385333061218, -0.19393715262413025, -0.06178973615169525, -0.43137842416763306, -0.18980500102043152, 0.07140591740608215, 0.11144165694713593, 0.4826927185058594, 0.10929715633392334, -0.1300186812877655, -0.2072771191596985, -0.19352883100509644, 0.2210790514945984, 0.38508081436157227, 0.16575904190540314, 0.04062628746032715, 0.06681308150291443, 0.32624903321266174, 0.6937770843505859, 0.05985016003251076, 0.29298946261405945, 0.23683151602745056, 0.18136928975582123, 0.37288233637809753, -0.34696364402770996, -0.10497482866048813, 0.36124351620674133, 0.14028941094875336, -0.32886385917663574, 0.09486829489469528, -0.22705918550491333, -0.3511343002319336, -0.047112178057432175, 0.22940480709075928, 0.081684909760952, -0.17614547908306122, 0.09104574471712112, -0.13461992144584656, 0.028018757700920105, 0.21189910173416138, 0.09786748141050339, -0.2013150304555893, -0.14430934190750122, -0.17453883588314056, -0.06126675009727478, 0.2783512771129608, -0.11136961728334427, -0.5371753573417664, -0.3369072377681732, -0.41334813833236694, 0.3385953903198242, 0.07329821586608887, 0.7409529089927673, -0.11506973206996918, -0.25705382227897644, 0.11306129395961761, 0.031174086034297943, 0.5424148440361023, -0.13153241574764252, 0.0703379288315773, 0.28608280420303345, 0.10886400938034058, -0.1734217256307602, 0.04285788908600807, -0.3285352289676666, 0.1347731649875641, -0.28870832920074463, -0.22750455141067505, -0.26700684428215027, -0.11544240266084671, -0.07171992212533951, 0.007681113667786121, 0.027526605874300003, 0.15754547715187073, -0.31315115094184875, 0.11896132677793503, -0.35373085737228394, 0.2048882693052292, 0.2223888784646988, -0.15620411932468414, -0.4568435549736023, 0.05314895138144493, 0.08764767646789551, -0.04436612129211426, -0.0011114701628684998, 0.18399664759635925, 0.6027074456214905, 0.06684613227844238, 0.06542368233203888, 0.21213355660438538, -0.32032692432403564, 0.23012033104896545, 0.3122923672199249, -0.16890493035316467, 0.2302597314119339, -0.033630844205617905, -0.026916779577732086, 0.3270864486694336, 0.43717464804649353, -0.06665258854627609, 0.21528324484825134, 0.07555104047060013, -0.07001692056655884, -0.15797513723373413, -0.05725366622209549, 0.2989982068538666, -0.14647755026817322, 0.00342789338901639, -0.6915029287338257, 0.240923672914505, 0.4322821795940399, -0.16865642368793488, 0.8573557138442993, 0.0784580260515213, -0.16688945889472961, 0.3656104803085327, -0.035679757595062256, 1.1166894435882568, 0.10915760695934296, 0.09704763442277908, 0.14377334713935852, 0.0438767746090889, 0.08992697298526764, -0.06617401540279388, 0.2910056710243225, -0.07252556085586548, -0.540242075920105, 0.11242203414440155, -0.3357093334197998, 0.21552351117134094, -0.10745750367641449, -0.30662021040916443, 0.270374059677124, 0.10880722105503082, -0.07590815424919128, -0.06369490176439285, 0.027835242450237274, -0.35910502076148987, 0.00957728736102581, -0.04284265637397766, 0.07678154855966568, -0.039210058748722076, -0.02153129130601883, -0.0597071498632431, 0.02232454903423786, 0.049042027443647385, -0.29686713218688965, -0.15490314364433289, 0.03831858187913895, -0.20989364385604858, 0.18924584984779358, -0.245846688747406, -0.00866059958934784, 0.05869842693209648, -0.13835041224956512, -0.10027194023132324, 0.2575944662094116, -0.03811071813106537, 0.42693519592285156, 0.531542181968689, 0.2869330942630768, 0.09223387390375137, 0.20544783771038055, 0.32326167821884155, 0.04974365234375, -0.1855180710554123, 0.06174839660525322, -0.17507238686084747, -0.5215675234794617, -0.0882994532585144, 0.009121842682361603, 0.2101260870695114, 0.21045830845832825, -0.34205362200737, 0.24669711291790009, -0.39748939871788025, -0.20431317389011383, 0.1140337884426117, 0.09521326422691345, -0.12537898123264313, 0.4969877600669861, 0.004531253129243851, -0.2676786780357361, -0.010516241192817688, 0.4765641689300537, 0.02812225930392742, 0.2652387022972107, 0.48839157819747925, -0.1547877937555313, -0.18778303265571594, -0.2324948012828827, -0.3721451461315155, -0.0979967713356018, -0.17886146903038025, 0.2387905865907669, -0.1320297122001648, -0.367879718542099, 0.10209226608276367, 0.2141333371400833, 0.08098453283309937, 0.4203988015651703, -0.15308555960655212, -0.3298027217388153, -0.3210722804069519, 0.48224759101867676, -0.1216571033000946, 0.40100738406181335, -0.2554946839809418, 0.11526770889759064, -0.13129064440727234, 0.2543562054634094, -0.3306407034397125, 0.04385083168745041, -0.08669601380825043, 0.2975466549396515, -0.09859520941972733, -0.07190164178609848, 0.04436400160193443, -0.17617468535900116, 0.08150995522737503, 0.35354071855545044, -0.380309522151947, -0.18877094984054565, 0.12812379002571106, 0.15919502079486847, 0.0792163535952568, 0.03194721043109894, -0.11885247379541397, -0.5915083885192871, -0.0735398530960083, -0.22921787202358246, 0.15765897929668427, 0.1029231920838356, -0.09793105721473694, 0.2407471090555191, 0.3533519506454468, -0.07034856826066971, 0.38938045501708984, 0.2689368724822998, -0.18647649884223938, -0.4986579418182373, 0.004750438500195742, 0.0578378364443779, -0.1854453831911087, -0.12714985013008118, -0.12109553813934326, -0.06996288150548935, -0.33785831928253174, 0.2191346287727356, 0.03989779204130173, 0.08951668441295624, -0.2619175612926483, -0.11219853162765503, 0.352163165807724, 0.6336425542831421, -0.04856491461396217, -0.2793465554714203, 0.3481561243534088, 0.18601061403751373, -0.3188641369342804, -0.20306912064552307, 0.07783565670251846, 0.31978633999824524, 0.20163211226463318, -0.006937719881534576, -0.0450190044939518, -0.21908515691757202, -0.07260331511497498, 0.3098430335521698, 0.2485363930463791, -0.5961524248123169, 0.28097251057624817, 0.11412781476974487, 0.016217369586229324, -0.15050697326660156, 0.17921051383018494, 0.2326962947845459, 0.34001967310905457, 0.35979050397872925, 0.0004902631044387817, 0.39311543107032776, 0.4816119968891144, 0.06847469508647919, 0.08776917308568954, -0.2693350911140442, 0.11698096990585327, 0.5212514400482178, -0.09552046656608582, 0.30579960346221924, 0.2569500803947449, 0.24685290455818176, 0.09960593283176422, -0.2025594264268875, -0.22802779078483582, -0.0831022709608078, -0.10257474333047867, 0.00286190677434206, 0.14346688985824585, -0.31370848417282104, 0.03955809026956558, -0.11210478842258453, -0.0068373121321201324, 0.15349158644676208, 0.6984450817108154, 0.10487459599971771, 0.05989019572734833, -0.3550284802913666, 0.20803150534629822, 0.1177920550107956, 0.21478286385536194, -0.27037543058395386, 0.17936255037784576, 0.16575685143470764, -0.04157894849777222, 0.376540869474411, 0.27362772822380066, 0.21369138360023499, 0.3082121014595032, -0.18117287755012512, 0.10409215092658997, -0.03406068682670593, -0.15994341671466827, -0.19449006021022797, 0.39131683111190796, 0.35221922397613525, -0.17440292239189148, 0.14355453848838806, 0.1338275820016861, -0.12245393544435501, 0.018809767439961433, 0.1264166533946991, 0.1370454877614975, -0.2897331714630127, 0.23103752732276917, 0.26667705178260803, -0.03238726407289505, 0.13374775648117065, -0.07251989096403122, -0.4232141375541687, 0.02957909181714058, -0.09525889158248901, -0.290354460477829, 0.04195345193147659, 0.006869809702038765, 0.060953542590141296, -0.09087871015071869, 0.2384779155254364, 0.1523759961128235, -0.10105007141828537, -0.13753573596477509, -0.26384976506233215, -0.8945611119270325, 0.1401769071817398, 0.10649687796831131, 0.11232472956180573, -0.09223008900880814, 0.3892562687397003, 0.044130194932222366, -0.14011555910110474, 0.09658857434988022, -0.18075239658355713, -0.023465733975172043, 0.13171455264091492, -0.4472534656524658, 0.02668900415301323, -0.062025055289268494, -0.06756591796875, 0.10098884999752045, -0.2585659921169281, 0.06655844300985336, -0.15181541442871094, 0.01687309890985489, 0.06842665374279022, -0.10559014976024628, 0.12574343383312225, 0.4385499656200409, 0.39168065786361694, 0.05886765569448471, 0.3196936845779419, -0.09219813346862793, 0.15688453614711761, -0.307319700717926, -0.24924226105213165, 0.03894120082259178, -0.3124750852584839, 0.02583816647529602, 0.5218645334243774, -0.236763134598732, -0.17493604123592377, -0.23479913175106049, 0.3725404739379883, -0.28968408703804016, 0.06798345595598221, -0.34619957208633423, 0.2034953534603119, -0.01270277425646782, 0.4027400314807892, -0.3385978043079376, 0.00931616872549057, -0.04453065246343613, 0.14890743792057037, -0.2840518355369568, -0.380818635225296, 0.8212568759918213, -0.3352946639060974, -0.2349313199520111, -0.17387568950653076, 0.5242084264755249, 0.04275069385766983, -0.45563197135925293, -0.2740304172039032, -0.048205096274614334, 0.1213056817650795, -0.08402139693498611, -0.24704022705554962, 0.0919981449842453, -0.3285832405090332, 0.18263188004493713, -0.06953688710927963, 0.5346603393554688, -0.10466431826353073, -0.2599049210548401, 0.07494048774242401, -0.17966976761817932 ]
https://github.com/huggingface/datasets/issues/514
dataset.shuffle(keep_in_memory=True) is never allowed
Maybe I'm a bit tired but I fail to see the issue here. Since `cache_file_name` is `None` by default, if you set `keep_in_memory` to `True`, the assert should pass, no?
As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)` The commit added the lines ```python # lines 994-996 in src/nlp/arrow_dataset.py assert ( not keep_in_memory or cache_file_name is None ), "Please use either `keep_in_memory` or `cache_file_name` but not both." ``` This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check. I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`.
30
dataset.shuffle(keep_in_memory=True) is never allowed As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)` The commit added the lines ```python # lines 994-996 in src/nlp/arrow_dataset.py assert ( not keep_in_memory or cache_file_name is None ), "Please use either `keep_in_memory` or `cache_file_name` but not both." ``` This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check. I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`. Maybe I'm a bit tired but I fail to see the issue here. Since `cache_file_name` is `None` by default, if you set `keep_in_memory` to `True`, the assert should pass, no?
[ -0.03923472389578819, 0.02795816957950592, -0.0443970188498497, 0.24105049669742584, 0.11971981823444366, -0.021508634090423584, -0.24547110497951508, 0.2770645022392273, -0.053434498608112335, 0.2102235108613968, 0.21283194422721863, 0.37444382905960083, -0.29022741317749023, -0.5664207935333252, -0.062823586165905, 0.2306986153125763, 0.015233941376209259, 0.07312971353530884, 0.13073724508285522, -0.1656002402305603, -0.4095737040042877, -0.13157980144023895, -0.5240511894226074, -0.15714630484580994, -0.42875346541404724, -0.1573801338672638, -0.044415079057216644, 0.1171569675207138, -0.23881910741329193, -0.5017876029014587, 0.0678529217839241, 0.2654949426651001, -0.4624951183795929, 0.4916149377822876, -0.00012498193245846778, -0.3131685256958008, 0.26091626286506653, -0.043401964008808136, -0.18331407010555267, -0.06005042791366577, -0.47015348076820374, 0.3102070689201355, -0.10496692359447479, -0.15833750367164612, 0.32724493741989136, -0.17662031948566437, 0.05498909205198288, -0.4825300872325897, 0.17302550375461578, 0.29941338300704956, 0.08827786147594452, -0.05903196334838867, -0.027406791225075722, 0.02666432596743107, 0.3734084367752075, 0.07430922985076904, -0.0033930055797100067, 0.21218012273311615, 0.0776684507727623, -0.11640509217977524, 0.1800212562084198, 0.17667840421199799, -0.3082767426967621, 0.22879788279533386, 0.17277535796165466, -0.20349326729774475, -0.21154820919036865, -0.18002353608608246, 0.3078240752220154, 0.21024835109710693, 0.1988275945186615, -0.3202565014362335, -0.13449913263320923, 0.009254701435565948, -0.07821385562419891, -0.20217494666576385, 0.3165808916091919, 0.2868351638317108, -0.023554811254143715, -0.05210181698203087, -0.17975327372550964, -0.2429497390985489, 0.10602118074893951, -0.086403027176857, 0.038579508662223816, 0.2909690737724304, 0.032296694815158844, 0.22329309582710266, 0.5100967288017273, 0.12542572617530823, 0.04494879022240639, -0.11436806619167328, -0.22601455450057983, 0.33785659074783325, -0.44953060150146484, -0.08885957300662994, 0.1479330062866211, 0.15704676508903503, 0.3375700116157532, 0.07628772407770157, 0.16170692443847656, -0.007241077721118927, 0.020131099969148636, 0.14310023188591003, 0.15324179828166962, 0.41529420018196106, 0.05783051252365112, 0.17270681262016296, 0.19730551540851593, -0.09839396923780441, -0.11555296182632446, 0.1021902933716774, 0.047751955687999725, -0.26768285036087036, 0.0527641735970974, -0.07564692944288254, 0.24496950209140778, -0.2947064936161041, -0.12553834915161133, 0.17266269028186798, -0.37678632140159607, -0.34160900115966797, 0.04086824506521225, 0.5163073539733887, 0.2582123875617981, -0.13299092650413513, -0.041968051344156265, 0.08684197068214417, 0.016256416216492653, 0.07193563878536224, -0.35179030895233154, 0.1759074479341507, -0.23511728644371033, 0.09440507739782333, 0.28890904784202576, -0.055646974593400955, 0.2828935384750366, -0.12051655352115631, -0.061988502740859985, 0.12011238932609558, 0.24156245589256287, -0.36704230308532715, 0.5084919333457947, 0.29857444763183594, -0.33898138999938965, 0.0358223021030426, 0.06771111488342285, 0.16336798667907715, -0.18947681784629822, 0.47580304741859436, -0.05402924120426178, -0.3840196430683136, 0.4273470938205719, 0.006867236457765102, -0.2204320728778839, 0.04828176274895668, 0.016226932406425476, -0.09893709421157837, 0.3985988199710846, -0.4084576964378357, 0.486911803483963, -0.17244946956634521, 0.05782657489180565, -0.3036770224571228, 0.06900032609701157, 0.17076563835144043, -0.2531927824020386, 0.0957375317811966, -0.26670923829078674, 0.040760867297649384, 0.08722876757383347, 0.3894157111644745, 0.01697884313762188, -0.2980727255344391, -0.30709484219551086, 0.12430290877819061, 0.16822640597820282, -0.28665420413017273, -0.4500903785228729, -0.2724565267562866, -0.08693180978298187, 0.07899349182844162, 0.22912374138832092, -0.07986484467983246, -0.17443552613258362, -0.19585783779621124, 0.4720088243484497, -0.060669906437397, 0.031348828226327896, -0.01387505978345871, -0.2720579206943512, -0.030610213056206703, 0.3783479332923889, -0.20803509652614594, -0.27404624223709106, -0.11385051161050797, 0.09833282232284546, -0.10432173311710358, 0.3244962990283966, 0.09634614735841751, -0.15182198584079742, -0.1861666887998581, 0.49071821570396423, -0.3960988521575928, -0.11796097457408905, -0.027868375182151794, -0.08744601160287857, 0.2058202028274536, 0.15713153779506683, -0.17323295772075653, -0.10343164205551147, -0.17850524187088013, -0.07622678577899933, -0.011515878140926361, -0.11236777901649475, -0.3707549273967743, -0.0385713055729866, 0.11943270266056061, 0.144020214676857, 0.16941846907138824, -0.1760576367378235, 0.10610425472259521, -0.5986763834953308, -0.22442731261253357, 0.04274985194206238, 0.10407643020153046, 0.07174035906791687, -0.056705668568611145, -0.04756942391395569, 0.1452856957912445, -0.07321283966302872, -0.0363396555185318, -0.2680032551288605, 0.4468196928501129, 0.2502595782279968, 0.03277565538883209, 0.054750632494688034, 0.16219906508922577, -0.17927682399749756, -0.16533146798610687, 0.26574888825416565, -0.2976207435131073, 0.11595863848924637, -0.16902875900268555, -0.06567663699388504, 0.1331101655960083, -0.3098519742488861, 0.11120161414146423, 0.11094358563423157, -0.17917564511299133, 0.2296428680419922, 0.2283746898174286, -0.17563940584659576, -0.15259987115859985, 0.309127539396286, 0.24057401716709137, 0.4722817540168762, 0.2488894760608673, -0.19193902611732483, -0.18721315264701843, 0.6576308012008667, 0.20422635972499847, 0.13074442744255066, 0.02299436740577221, 0.013042278587818146, -0.23858314752578735, 0.23748792707920074, 0.3303769826889038, 0.6330356597900391, 0.061959538608789444, 0.11402411758899689, -0.017282167449593544, 0.02542678639292717, -0.029395289719104767, 0.37839969992637634, 0.08328257501125336, -0.013059139251708984, 0.04717935621738434, 0.22996412217617035, -0.20114465057849884, -0.520631730556488, -0.15080681443214417, 0.31621047854423523, 0.20981858670711517, -0.17407262325286865, -0.11026664823293686, -0.3141033351421356, -0.04054670035839081, -0.14900873601436615, -0.18879204988479614, -0.25784242153167725, -0.1310337483882904, -0.0023854821920394897, 0.31856754422187805, -0.0844656378030777, 0.3169507384300232, -0.31480899453163147, 0.6230219602584839, -0.022586997598409653, -0.22762082517147064, -0.2458033561706543, -0.15714287757873535, 0.17975234985351562, 0.00860578566789627, 0.1364547461271286, 0.1759328991174698, 0.3079744875431061, 0.2266799658536911, -0.20919488370418549, 0.018186215311288834, -0.27712082862854004, 0.12603583931922913, -0.3050537705421448, 0.02773004025220871, 0.10272455215454102, 0.08266869932413101, 0.07020079344511032, -0.3488442599773407, -0.07800760120153427, -0.2902078330516815, -0.24179764091968536, 0.19931836426258087, 0.2402346283197403, -0.2562102973461151, -0.317474901676178, -0.3330118656158447, -0.1823941022157669, -0.39306938648223877, 0.45819520950317383, -0.06231675669550896, 0.11288520693778992, 0.39347878098487854, -0.05871780961751938, 0.15829458832740784, -0.4475102126598358, 0.1244441494345665, -0.4678839147090912, -0.32968488335609436, 0.10203034430742264, -0.0584397055208683, 0.007449975237250328, 0.020565461367368698, -0.09248796105384827, 0.25990375876426697, 0.27513808012008667, -0.2820502519607544, -0.07371692359447479, -0.39884427189826965, -0.16445466876029968, -0.05634738504886627, 0.09644990414381027, 0.47780194878578186, 0.049348969012498856, -0.07858906686306, -0.19390979409217834, -0.21672900021076202, 0.2699865996837616, 0.5140619277954102, 0.0867324024438858, 0.1301531046628952, -0.11056294292211533, 0.3138837516307831, 0.5761353969573975, 0.039161041378974915, 0.24087783694267273, 0.1803651601076126, 0.14201325178146362, 0.40158697962760925, -0.20430022478103638, -0.14142927527427673, 0.43934234976768494, 0.2179214060306549, -0.40915530920028687, 0.07286101579666138, -0.3133547008037567, -0.12835803627967834, -0.050265949219465256, 0.21746179461479187, 0.16446861624717712, -0.18213997781276703, 0.1009642705321312, -0.23825779557228088, -0.00509122759103775, 0.2078188955783844, 0.11164747923612595, -0.14736507833003998, -0.039180170744657516, -0.11534819006919861, -0.08750234544277191, 0.34104016423225403, -0.12435393780469894, -0.5923793315887451, -0.3487136662006378, -0.327865868806839, 0.4281814694404602, 0.11190322041511536, 0.8307557106018066, -0.11526632308959961, -0.17355501651763916, 0.16408298909664154, 0.06194433942437172, 0.5362948775291443, -0.11727314442396164, 0.09544797241687775, 0.26063817739486694, 0.08966197073459625, -0.14016787707805634, 0.04342269524931908, -0.33442139625549316, 0.17244857549667358, -0.39144909381866455, -0.26972469687461853, -0.32543668150901794, -0.11924251168966293, 0.03614790365099907, 0.06634034216403961, 0.07530547678470612, 0.10803063958883286, -0.3208341896533966, 0.19732531905174255, -0.2422362118959427, 0.20516833662986755, 0.21634195744991302, -0.18629330396652222, -0.4946204423904419, 0.10552172362804413, 0.03827076405286789, 0.040077365934848785, 0.02407071739435196, 0.07555216550827026, 0.5680774450302124, 0.029886923730373383, -0.08487381786108017, 0.2088932991027832, -0.364056795835495, 0.24377448856830597, 0.30067703127861023, -0.06646069884300232, 0.27591273188591003, -0.04231814295053482, -0.06906023621559143, 0.44774290919303894, 0.4921630620956421, -0.0481482669711113, 0.2069588303565979, 0.07243204116821289, -0.10945940017700195, -0.28732311725616455, -0.04507838934659958, 0.4593105614185333, -0.07280842214822769, 0.0014986909227445722, -0.5875291228294373, 0.20015449821949005, 0.476089209318161, -0.18606597185134888, 0.8500688076019287, 0.2287786602973938, -0.14396658539772034, 0.21420450508594513, -0.1160348430275917, 1.2216182947158813, 0.2491060495376587, 0.09334560483694077, 0.12635895609855652, 0.1488136202096939, 0.1581905633211136, -0.05905779078602791, 0.2269841581583023, -0.04398135468363762, -0.5896131992340088, 0.009466538205742836, -0.3999629318714142, 0.21469274163246155, -0.1705583781003952, -0.37091606855392456, 0.20243440568447113, 0.13456319272518158, -0.06818784773349762, 0.020446909591555595, -0.017728766426444054, -0.3314562141895294, 0.1697232574224472, -0.0034245625138282776, -0.02262749709188938, -0.08473636209964752, 0.007906874641776085, -0.09500684589147568, 0.03824102506041527, 0.0030152834951877594, -0.35117024183273315, -0.16418224573135376, -0.027709757909178734, -0.1303068995475769, 0.12256614118814468, -0.20934568345546722, 0.03892885148525238, 0.15198232233524323, -0.10928316414356232, 0.0015490874648094177, 0.2733679711818695, -0.04489034414291382, 0.35764598846435547, 0.5594892501831055, 0.2490697205066681, 0.19690845906734467, 0.15816684067249298, 0.24215508997440338, 0.13277626037597656, -0.28358834981918335, 0.15406149625778198, -0.25349926948547363, -0.5219050645828247, -0.1789197027683258, 0.14458833634853363, 0.2153954952955246, 0.18765850365161896, -0.48793891072273254, 0.34118640422821045, -0.4025755822658539, -0.1266576200723648, 0.039649542421102524, 0.1244204118847847, -0.15506330132484436, 0.5209713578224182, -0.055550169199705124, -0.45954006910324097, 0.02293965220451355, 0.4400489330291748, -0.06542149931192398, 0.27112385630607605, 0.4940779209136963, -0.2664984166622162, -0.0770585834980011, -0.15052399039268494, -0.33681684732437134, -0.10007324069738388, -0.25252434611320496, 0.07321447879076004, -0.15089640021324158, -0.2655436396598816, 0.013912418857216835, 0.34508711099624634, 0.21593746542930603, 0.4373995065689087, -0.15436510741710663, -0.2863982915878296, -0.25817909836769104, 0.5522167086601257, -0.1103365570306778, 0.3832836151123047, -0.20812439918518066, 0.1962580531835556, -0.10345442593097687, 0.28262466192245483, -0.24268437922000885, 0.08342752605676651, -0.15353131294250488, 0.28291139006614685, -0.06330593675374985, -0.024005115032196045, 0.013064729981124401, -0.2674839198589325, 0.01731524057686329, 0.3564041256904602, -0.39015012979507446, -0.09264714270830154, 0.11293642222881317, 0.23743483424186707, 0.1665588617324829, 0.12015857547521591, -0.07119195908308029, -0.6452890038490295, 0.06082944571971893, -0.13058002293109894, 0.09808596968650818, 0.13159602880477905, -0.07449600100517273, 0.25081056356430054, 0.38976195454597473, 0.026003669947385788, 0.1697992980480194, 0.2967474162578583, -0.18259570002555847, -0.5086315870285034, -0.011206193827092648, 0.041015662252902985, -0.2855357229709625, -0.1894863396883011, -0.11296810954809189, -0.05981641262769699, -0.32044166326522827, 0.2510896325111389, -0.041791923344135284, 0.1318592131137848, -0.22783751785755157, -0.2504907548427582, 0.36815500259399414, 0.6540329456329346, -0.10261961817741394, -0.3410198986530304, 0.33249178528785706, 0.07430930435657501, -0.2177838832139969, -0.11936574429273605, 0.000717436894774437, 0.32648608088493347, 0.17943987250328064, 0.09632281959056854, -0.06582514941692352, -0.26681268215179443, -0.07254870235919952, 0.2635931372642517, 0.25294992327690125, -0.5686261057853699, 0.20564356446266174, 0.03143749386072159, -0.15293791890144348, -0.13934111595153809, 0.24926143884658813, 0.25076591968536377, 0.3166508078575134, 0.1620575189590454, 0.004659496247768402, 0.3221440315246582, 0.5274823307991028, -0.01976964995265007, 0.1290704607963562, -0.17769794166088104, 0.18912337720394135, 0.5614774227142334, 0.0008478090167045593, 0.19527789950370789, 0.31516125798225403, 0.47341328859329224, -0.025353118777275085, -0.1588606834411621, -0.17665085196495056, -0.1852617710828781, -0.04167872667312622, 0.14779609441757202, 0.15250073373317719, -0.2881448268890381, 0.13045373558998108, -0.23041200637817383, 0.001816634088754654, 0.11262615025043488, 0.7740174531936646, 0.20410454273223877, 0.03080553561449051, -0.31006765365600586, 0.13416415452957153, 0.06809814274311066, 0.21563605964183807, -0.2797536849975586, 0.20326174795627594, 0.23268957436084747, -0.004819534718990326, 0.4367750585079193, 0.4031175971031189, 0.24320265650749207, 0.3272057771682739, -0.19465136528015137, 0.08958400040864944, -0.01545511931180954, -0.08663388341665268, -0.11369413137435913, 0.3165295720100403, 0.2770950198173523, -0.1894356906414032, 0.19031226634979248, 0.09701191633939743, -0.06694603711366653, 0.028721850365400314, 0.13340456783771515, 0.13503606617450714, -0.3762674629688263, 0.3123161196708679, 0.28190237283706665, -0.02529982104897499, 0.13950803875923157, -0.015696577727794647, -0.4565902352333069, 0.07150769978761673, -0.2928663492202759, -0.4036085307598114, -0.01154485996812582, 0.07962828129529953, 0.012847475707530975, -0.10030525922775269, 0.19139742851257324, 0.24162961542606354, -0.01391676813364029, -0.22325849533081055, -0.2436429262161255, -0.888680636882782, 0.28382453322410583, 0.23313786089420319, 0.011344144120812416, -0.04132166877388954, 0.2859709858894348, 0.05875570327043533, -0.18786950409412384, 0.09550443291664124, -0.21098825335502625, -0.11592013388872147, 0.1660456359386444, -0.45918378233909607, 0.13729292154312134, 0.008065201342105865, -0.16525961458683014, 0.005788672715425491, -0.19572019577026367, 0.1736648678779602, -0.08510278910398483, -0.08321614563465118, 0.16166634857654572, -0.08485770225524902, 0.0822804868221283, 0.4686516523361206, 0.47280797362327576, 0.03555094078183174, 0.4646661877632141, -0.05059639364480972, 0.16039727628231049, -0.22823020815849304, -0.16361474990844727, 0.10635320097208023, -0.2522878348827362, -0.01273328810930252, 0.43320292234420776, -0.23958928883075714, -0.1472654491662979, -0.19084957242012024, 0.4235982596874237, -0.2601759433746338, 0.09414216876029968, -0.39720937609672546, 0.1711035966873169, -0.18301966786384583, 0.3910825848579407, -0.2500671148300171, -0.007304757833480835, 0.023087937384843826, 0.15124304592609406, -0.27642935514450073, -0.30342042446136475, 0.8547523617744446, -0.19765116274356842, -0.27074751257896423, -0.06043617054820061, 0.6034947633743286, 0.036226462572813034, -0.5679721236228943, -0.19766917824745178, -0.13139846920967102, 0.14647379517555237, -0.01890459656715393, -0.33512312173843384, 0.07786968350410461, -0.4213601052761078, 0.14828529953956604, -0.01307353749871254, 0.589758038520813, -0.15654096007347107, -0.2910611629486084, 0.12414571642875671, -0.1826508641242981 ]
https://github.com/huggingface/datasets/issues/514
dataset.shuffle(keep_in_memory=True) is never allowed
I failed to realise that this only applies to `shuffle()`. Whenever `keep_in_memory` is set to True, this is passed on to the `select()` function. However, if `cache_file_name` is None, it will be defined in the `shuffle()` function before it is passed on to `select()`. Thus, `select()` is called with `keep_in_memory=True` and a not None value for `cache_file_name`. This is essentially fixed in #513 Easily reproducible: ```python >>> import nlp >>> data = nlp.load_dataset("cosmos_qa", split="train") Using custom data configuration default >>> data.shuffle(keep_in_memory=True) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/nlp/arrow_dataset.py", line 1398, in shuffle verbose=verbose, File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/nlp/arrow_dataset.py", line 1178, in select ), "Please use either `keep_in_memory` or `cache_file_name` but not both." AssertionError: Please use either `keep_in_memory` or `cache_file_name` but not both. >>>data.select([0], keep_in_memory=True) # No error ```
As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)` The commit added the lines ```python # lines 994-996 in src/nlp/arrow_dataset.py assert ( not keep_in_memory or cache_file_name is None ), "Please use either `keep_in_memory` or `cache_file_name` but not both." ``` This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check. I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`.
131
dataset.shuffle(keep_in_memory=True) is never allowed As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)` The commit added the lines ```python # lines 994-996 in src/nlp/arrow_dataset.py assert ( not keep_in_memory or cache_file_name is None ), "Please use either `keep_in_memory` or `cache_file_name` but not both." ``` This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check. I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`. I failed to realise that this only applies to `shuffle()`. Whenever `keep_in_memory` is set to True, this is passed on to the `select()` function. However, if `cache_file_name` is None, it will be defined in the `shuffle()` function before it is passed on to `select()`. Thus, `select()` is called with `keep_in_memory=True` and a not None value for `cache_file_name`. This is essentially fixed in #513 Easily reproducible: ```python >>> import nlp >>> data = nlp.load_dataset("cosmos_qa", split="train") Using custom data configuration default >>> data.shuffle(keep_in_memory=True) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/nlp/arrow_dataset.py", line 1398, in shuffle verbose=verbose, File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/nlp/arrow_dataset.py", line 1178, in select ), "Please use either `keep_in_memory` or `cache_file_name` but not both." AssertionError: Please use either `keep_in_memory` or `cache_file_name` but not both. >>>data.select([0], keep_in_memory=True) # No error ```
[ 0.058252427726984024, 0.17153805494308472, 0.023640483617782593, 0.17293639481067657, 0.15413983166217804, -0.16356617212295532, -0.3068183660507202, 0.3015699088573456, -0.12715759873390198, 0.20359954237937927, 0.13688498735427856, 0.5172110199928284, -0.30258068442344666, -0.43140071630477905, 0.041881635785102844, 0.13557106256484985, 0.0163557305932045, -0.027475684881210327, 0.07670026272535324, -0.16427472233772278, -0.405055969953537, -0.06797764450311661, -0.5050219893455505, -0.27249330282211304, -0.35396987199783325, -0.04220826178789139, -0.06511479616165161, 0.0619974285364151, -0.20632141828536987, -0.510236918926239, 0.04615170508623123, 0.36333122849464417, -0.37018245458602905, 0.3270522952079773, -0.00012682622764259577, -0.2589106857776642, 0.3602527379989624, -0.07301569730043411, -0.33633384108543396, -0.05875849723815918, -0.31501078605651855, 0.24231597781181335, -0.08762411773204803, -0.16398325562477112, 0.22002249956130981, -0.16935820877552032, 0.05125517398118973, -0.4195266664028168, 0.18565617501735687, 0.3109859824180603, 0.03987431526184082, -0.01682243123650551, -0.042702943086624146, 0.05396530032157898, 0.4000208377838135, 0.050296347588300705, -0.07102859765291214, 0.18107159435749054, 0.025823980569839478, -0.10656455904245377, 0.11766951531171799, 0.1653529405593872, -0.24957051873207092, 0.03507538139820099, 0.19819414615631104, -0.1733999252319336, -0.15783032774925232, -0.14403676986694336, 0.22310104966163635, 0.22626754641532898, 0.1969546526670456, -0.3949064612388611, -0.14489951729774475, -0.1585530936717987, 0.06522907316684723, -0.3188781142234802, 0.367340624332428, 0.22710572183132172, -0.036967918276786804, -0.14116226136684418, -0.28178641200065613, -0.13175873458385468, 0.045967623591423035, 0.050581879913806915, 0.15657232701778412, 0.4199056625366211, 0.06625409424304962, 0.25793299078941345, 0.5411186218261719, 0.05324260890483856, 0.14294902980327606, -0.12054924666881561, -0.12234003841876984, 0.3546852171421051, -0.4297563135623932, -0.10718221962451935, 0.12725184857845306, 0.228468656539917, 0.32605499029159546, 0.17162799835205078, 0.29235419631004333, -0.0018566586077213287, 0.06661996245384216, 0.17552894353866577, 0.15598469972610474, 0.42083409428596497, 0.08235501497983932, 0.0897044986486435, 0.25204765796661377, -0.02485791966319084, -0.02333688549697399, 0.18557634949684143, 0.008934101089835167, -0.25144878029823303, -0.0599055215716362, 0.028395790606737137, 0.16995024681091309, -0.22449246048927307, -0.14563792943954468, 0.1323857605457306, -0.42795616388320923, -0.2963881492614746, 0.0615716315805912, 0.43938201665878296, 0.24391582608222961, -0.03631223738193512, -0.033424511551856995, 0.0826520249247551, 0.031674519181251526, -0.028578270226716995, -0.2911152243614197, 0.18904753029346466, -0.37744688987731934, 0.1855505108833313, 0.41489607095718384, 0.023633496835827827, 0.4221940040588379, -0.16222795844078064, -0.040537506341934204, 0.16262555122375488, 0.0964481383562088, -0.3839088976383209, 0.4567759037017822, 0.27867138385772705, -0.25287413597106934, 0.01730683259665966, -0.07641133666038513, 0.1386793851852417, -0.25249215960502625, 0.45376989245414734, -0.04917573928833008, -0.28298211097717285, 0.3743933439254761, -0.034897785633802414, -0.2979341149330139, -0.034002192318439484, -0.10337302833795547, 0.0014503151178359985, 0.3998073637485504, -0.342525839805603, 0.508358895778656, -0.2778909206390381, -0.048926737159490585, -0.3168385326862335, 0.12938086688518524, 0.25883644819259644, -0.14471878111362457, 0.02770073711872101, -0.27851754426956177, 0.06154105067253113, 0.1749749481678009, 0.34701651334762573, -0.07395438104867935, -0.09822268038988113, -0.30337998270988464, 0.04513293504714966, 0.2472507655620575, -0.23313450813293457, -0.517055332660675, -0.401523232460022, -0.057795360684394836, 0.1500941514968872, 0.1228237897157669, -0.03618519753217697, -0.04668274521827698, -0.23971235752105713, 0.569151759147644, 0.12307628989219666, 0.05079597979784012, 0.07021628320217133, -0.22448034584522247, -0.14420893788337708, 0.3917495608329773, -0.15546908974647522, -0.27160653471946716, -0.16682863235473633, 0.1186864972114563, 0.007983912713825703, 0.3367796242237091, 0.0780102014541626, -0.0938459262251854, -0.06916280090808868, 0.39753225445747375, -0.26846200227737427, -0.1448489874601364, -0.0017921924591064453, -0.2628353536128998, 0.1890728771686554, 0.15000109374523163, -0.07768842577934265, -0.004619568586349487, -0.1408880352973938, 0.0069587938487529755, -0.131795272231102, -0.07863131165504456, -0.46556687355041504, -0.02895830012857914, 0.25724196434020996, 0.269022136926651, 0.16747689247131348, -0.19878016412258148, 0.1474255919456482, -0.6084164977073669, -0.1418689787387848, -0.09423759579658508, 0.12138988077640533, 0.14077790081501007, -0.2250758558511734, -0.0015508271753787994, 0.2883160710334778, 0.04944569617509842, 0.008429886773228645, -0.2568850517272949, 0.42109960317611694, 0.23437777161598206, 0.05553078278899193, -0.08461997658014297, 0.25131160020828247, -0.09055145829916, -0.10393214225769043, 0.25464028120040894, -0.22721104323863983, 0.11127270758152008, -0.10983040928840637, -0.1313944160938263, 0.1791953444480896, -0.3276399075984955, 0.0956534817814827, 0.14943857491016388, -0.22503413259983063, 0.19310879707336426, 0.21414655447006226, -0.3467218577861786, -0.07559740543365479, 0.35126394033432007, 0.243207186460495, 0.395266592502594, 0.2722063660621643, -0.2244192659854889, -0.07954437285661697, 0.7486106753349304, 0.17553359270095825, 0.10912565886974335, -0.020640604197978973, 0.04182412847876549, -0.27218303084373474, 0.24930723011493683, 0.3991542160511017, 0.6660172939300537, 0.09481295943260193, 0.04606858640909195, -0.008515721186995506, -0.10631855577230453, -0.12770631909370422, 0.36539825797080994, 0.19092169404029846, 0.11632804572582245, 0.07057344913482666, 0.34537240862846375, -0.10463958233594894, -0.5839588046073914, -0.29359012842178345, 0.2861481308937073, 0.12734021246433258, -0.1608419120311737, -0.17006513476371765, -0.35595089197158813, -0.09564526379108429, -0.19719336926937103, -0.19614684581756592, -0.19143687188625336, -0.1775626391172409, -0.07346571981906891, 0.4637482166290283, -0.11381314694881439, 0.31327810883522034, -0.30449041724205017, 0.5873435139656067, -0.12634822726249695, -0.33059272170066833, -0.20067381858825684, -0.10240883380174637, 0.02091722935438156, -0.023681629449129105, 0.014246857725083828, 0.0744808092713356, 0.23757702112197876, 0.2396809607744217, -0.13972942531108856, 0.006729011423885822, -0.4025411009788513, 0.10712295770645142, -0.2851749658584595, 0.08030903339385986, -0.022994600236415863, -0.06860601902008057, 0.06338126957416534, -0.32731667160987854, -0.08408557623624802, -0.34854209423065186, -0.10236378759145737, 0.12906339764595032, 0.21066629886627197, -0.19783328473567963, -0.3947787284851074, -0.33353713154792786, -0.14371538162231445, -0.40871942043304443, 0.408521831035614, -0.1294228583574295, 0.10635034739971161, 0.4895433187484741, -0.07000245898962021, 0.20746077597141266, -0.514277994632721, 0.06011942774057388, -0.3819693624973297, -0.3399350345134735, 0.22643554210662842, -0.10627881437540054, -0.03766581788659096, -0.05571100115776062, -0.12532904744148254, 0.3742893636226654, 0.3618128299713135, -0.11269433796405792, 0.06988035887479782, -0.3953341543674469, -0.14288491010665894, -0.07989174127578735, 0.0358973927795887, 0.5086121559143066, 0.011171327903866768, 0.010162761434912682, -0.1552388072013855, -0.33711662888526917, 0.2735790014266968, 0.5556547045707703, 0.19368305802345276, 0.140568345785141, -0.12794488668441772, 0.3053504228591919, 0.6116023063659668, 0.018062680959701538, 0.22180220484733582, 0.25133630633354187, 0.1985747367143631, 0.31035441160202026, -0.15894755721092224, -0.032659273594617844, 0.5106629729270935, 0.21746253967285156, -0.34280067682266235, 0.11451911181211472, -0.257185161113739, -0.14897960424423218, -0.030428489670157433, 0.12635011970996857, 0.09730079025030136, -0.2774023115634918, 0.14084234833717346, -0.09723754227161407, 0.041507113724946976, 0.17470324039459229, 0.16957411170005798, -0.06003345921635628, -0.11534950882196426, -0.14101223647594452, -0.029732123017311096, 0.30561599135398865, -0.04416323080658913, -0.673263669013977, -0.37558677792549133, -0.4721682667732239, 0.30129343271255493, 0.06527338176965714, 0.8658412098884583, -0.0815698578953743, -0.1442953646183014, 0.22761189937591553, 0.09851916134357452, 0.6172950267791748, -0.04883545637130737, 0.0754873976111412, 0.2543060779571533, 0.10520292818546295, -0.22664514183998108, 0.000914253294467926, -0.2905430495738983, 0.043148018419742584, -0.30571624636650085, -0.17082050442695618, -0.3268434703350067, -0.153240367770195, -0.01693575829267502, -0.05287966877222061, 0.1032337099313736, 0.11006496846675873, -0.2144613415002823, 0.015656378120183945, -0.262864351272583, 0.15249237418174744, 0.20705166459083557, -0.05590357631444931, -0.5712487697601318, 0.10357461869716644, 0.05094698816537857, -0.0004635285586118698, 0.04218704253435135, 0.0900680273771286, 0.46308693289756775, 0.09157336503267288, 0.017862197011709213, 0.2473657727241516, -0.4582469165325165, 0.2574879229068756, 0.13810618221759796, -0.01387016475200653, 0.2481120228767395, -0.0344722680747509, 0.06597218662500381, 0.4264147877693176, 0.5325856804847717, -0.009093216620385647, 0.18133947253227234, -0.09787893295288086, -0.08240942656993866, -0.18798194825649261, -0.03533121570944786, 0.3640083372592926, -0.1816082000732422, 0.04489276930689812, -0.6824071407318115, 0.30298012495040894, 0.5967738628387451, -0.19006383419036865, 0.753607988357544, 0.23770929872989655, -0.20596015453338623, 0.17811985313892365, -0.04681836813688278, 1.3120800256729126, 0.2189846932888031, 0.1824331283569336, 0.24939998984336853, 0.11986388266086578, 0.33754974603652954, -0.15203377604484558, 0.3163943290710449, -0.031228892505168915, -0.3117741644382477, 0.0648636519908905, -0.35693418979644775, 0.23224064707756042, -0.295177161693573, -0.28819409012794495, 0.33302465081214905, 0.12689846754074097, -0.10232101380825043, 0.08350589126348495, -0.019515177235007286, -0.41963085532188416, -0.022488709539175034, -0.06075916439294815, -0.05921328812837601, -0.24399815499782562, 0.07931332290172577, -0.01124028954654932, -0.0675596222281456, -0.03311806544661522, -0.24145597219467163, -0.057657044380903244, 0.12377216666936874, -0.1919855773448944, 0.05478125065565109, -0.155382439494133, 0.10710518062114716, 0.19336865842342377, -0.019058536738157272, 0.0026667416095733643, 0.2434750646352768, -0.07449060678482056, 0.38232558965682983, 0.4298543930053711, 0.260458767414093, 0.10873822867870331, 0.06326080858707428, 0.24324403703212738, 0.15032485127449036, -0.30258557200431824, 0.16870065033435822, -0.1743146777153015, -0.4241257309913635, -0.35411906242370605, 0.06641653925180435, 0.3193889856338501, 0.22478032112121582, -0.28564903140068054, 0.35188204050064087, -0.4087074398994446, -0.17269091308116913, 0.01722508855164051, 0.057439595460891724, 0.0024681666400283575, 0.4494131803512573, -0.11752231419086456, -0.3633418083190918, 0.04761606827378273, 0.5570687055587769, 0.007623428478837013, 0.36247169971466064, 0.47369349002838135, -0.3311757743358612, -0.037100400775671005, -0.06834127008914948, -0.4076803922653198, -0.2367173284292221, -0.29160019755363464, 0.0075126588344573975, -0.11568844318389893, -0.23366540670394897, -0.02190938964486122, 0.3400229513645172, -0.029222756624221802, 0.2901134788990021, -0.053947046399116516, -0.29336977005004883, -0.1853291094303131, 0.5183558464050293, -0.22684620320796967, 0.3059215545654297, -0.052691515535116196, 0.3073263168334961, -0.08209125697612762, 0.13526694476604462, -0.19911691546440125, 0.009482274763286114, -0.024226712062954903, 0.2965010106563568, 0.06167202815413475, -0.06751982867717743, -0.0440092608332634, -0.22579868137836456, -0.06564127653837204, 0.4734470248222351, -0.32449987530708313, -0.041541606187820435, 0.008199639618396759, 0.2415742576122284, 0.2567046284675598, 0.05180821567773819, -0.08561450988054276, -0.6488205790519714, 0.0862816721200943, -0.1840716004371643, 0.1395004391670227, 0.125188410282135, 0.048500027507543564, 0.31038016080856323, 0.3236560523509979, 0.13384243845939636, 0.3690090775489807, 0.33174219727516174, -0.13760849833488464, -0.5471786260604858, -0.006830259691923857, 0.06811840832233429, -0.3414587080478668, -0.1721709668636322, -0.2888042628765106, -0.07653630524873734, -0.2675986886024475, 0.3461112678050995, -0.08589709550142288, 0.13403809070587158, -0.31769660115242004, -0.32572028040885925, 0.1708034873008728, 0.6224971413612366, -0.10922521352767944, -0.48409199714660645, 0.33117327094078064, 0.004859410226345062, -0.09282512962818146, -0.043499696999788284, -0.17590110003948212, 0.350338876247406, 0.15923218429088593, 0.11000882089138031, -0.07592754065990448, -0.3464371860027313, -0.1687951534986496, 0.15261834859848022, 0.28789395093917847, -0.5417857766151428, 0.25865158438682556, 0.12371379137039185, -0.12140470743179321, -0.16680103540420532, 0.2514127790927887, 0.1404760628938675, 0.317452609539032, 0.2154061496257782, 0.09997144341468811, 0.37951621413230896, 0.5215615630149841, -0.0019798986613750458, 0.16912081837654114, -0.17586559057235718, -0.008927453309297562, 0.6253476142883301, -0.05518333613872528, 0.20405608415603638, 0.2317160815000534, 0.3403344750404358, 0.10782834887504578, -0.09128783643245697, -0.14902253448963165, -0.14341965317726135, -0.01927321031689644, 0.014051998034119606, -0.02858131378889084, -0.2736733853816986, 0.015343941748142242, -0.11427243053913116, -0.06297938525676727, 0.0013234838843345642, 0.6738682985305786, 0.07991249859333038, -0.09386707842350006, -0.425321102142334, 0.11224114894866943, 0.1956029236316681, 0.1990811675786972, -0.3041791021823883, 0.2550562620162964, 0.13901185989379883, -0.14766700565814972, 0.23245659470558167, 0.2578599154949188, 0.20804136991500854, 0.3255348205566406, -0.05782494321465492, 0.05167604610323906, 0.04481158405542374, -0.06839151680469513, -0.07848295569419861, 0.26725858449935913, 0.38685718178749084, -0.20320843160152435, 0.17805202305316925, 0.05372852087020874, -0.04392699897289276, -0.005958970636129379, 0.2202218770980835, 0.2924692630767822, -0.37097883224487305, 0.38630372285842896, 0.3180389702320099, 0.1202203705906868, 0.24580498039722443, -0.08170942217111588, -0.4959748387336731, -0.10719642788171768, -0.26093703508377075, -0.24219681322574615, 0.03457025811076164, -0.028322331607341766, -0.003303850069642067, -0.13135302066802979, 0.23762117326259613, 0.16428770124912262, -0.27255403995513916, -0.2089902013540268, -0.2560703456401825, -0.7737239003181458, 0.08290848881006241, 0.1880570501089096, 0.08421029895544052, -0.05202052742242813, 0.294865220785141, -0.03976938873529434, -0.18356359004974365, -0.05078516900539398, -0.05451035127043724, -0.014961724169552326, 0.074004165828228, -0.4018297493457794, 0.0929488018155098, -0.08399282395839691, -0.07515551894903183, 0.09356897324323654, -0.3197186589241028, 0.10279577970504761, -0.15015900135040283, -0.13918638229370117, 0.04018431529402733, -0.0025001317262649536, 0.1477476805448532, 0.47137999534606934, 0.4296164810657501, 0.0616023987531662, 0.37568870186805725, -0.03485920652747154, 0.07714544981718063, -0.39712879061698914, -0.028404871001839638, 0.0693800076842308, -0.3193972408771515, -0.09030202031135559, 0.49642905592918396, -0.20319864153862, -0.035986851900815964, -0.1933780014514923, 0.40850722789764404, -0.29781681299209595, 0.12867948412895203, -0.2891925871372223, 0.19798614084720612, -0.1864558458328247, 0.4920977056026459, -0.29324764013290405, -0.0035868361592292786, 0.022655628621578217, 0.20480014383792877, -0.38082385063171387, -0.2601335942745209, 0.8820684552192688, -0.3497811555862427, -0.24148531258106232, -0.11350677162408829, 0.5502934455871582, 0.07875008136034012, -0.4763637185096741, -0.19702009856700897, -0.03151550143957138, 0.12019339203834534, -0.05655506253242493, -0.30652645230293274, 0.2336232215166092, -0.35611826181411743, 0.02868109568953514, -0.023820243775844574, 0.43815627694129944, -0.10302399843931198, -0.2813259959220886, 0.13880370557308197, -0.2105053961277008 ]
https://github.com/huggingface/datasets/issues/514
dataset.shuffle(keep_in_memory=True) is never allowed
Oh yes ok got it thanks. Should be fixed if we are happy with #513 indeed.
As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)` The commit added the lines ```python # lines 994-996 in src/nlp/arrow_dataset.py assert ( not keep_in_memory or cache_file_name is None ), "Please use either `keep_in_memory` or `cache_file_name` but not both." ``` This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check. I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`.
16
dataset.shuffle(keep_in_memory=True) is never allowed As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)` The commit added the lines ```python # lines 994-996 in src/nlp/arrow_dataset.py assert ( not keep_in_memory or cache_file_name is None ), "Please use either `keep_in_memory` or `cache_file_name` but not both." ``` This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check. I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`. Oh yes ok got it thanks. Should be fixed if we are happy with #513 indeed.
[ -0.10787180066108704, 0.03147780895233154, -0.0592159777879715, 0.1798345148563385, 0.22715944051742554, -0.056959882378578186, -0.07815966010093689, 0.3618614375591278, -0.01729811728000641, 0.3102036118507385, 0.06176728755235672, 0.5769479274749756, -0.27700456976890564, -0.4012126326560974, -0.030210286378860474, 0.08211251348257065, 0.04266650602221489, 0.06440742313861847, -0.06057515740394592, -0.15430709719657898, -0.40355125069618225, -0.13434110581874847, -0.4251634478569031, -0.1685621291399002, -0.29367372393608093, -0.14768283069133759, -0.06942540407180786, 0.11237386614084244, -0.26517531275749207, -0.42213356494903564, -0.05073195695877075, 0.27529579401016235, -0.42877042293548584, 0.4618908166885376, -0.00011052581248804927, -0.24254322052001953, 0.22522346675395966, -0.07326198369264603, -0.21657077968120575, -0.08470577001571655, -0.37495556473731995, 0.10294463485479355, -0.06259024888277054, -0.17023204267024994, 0.19310107827186584, -0.16497962176799774, 0.050829239189624786, -0.42141953110694885, 0.23895195126533508, 0.21298663318157196, 0.2309737354516983, 0.07959014177322388, -0.004712820053100586, -0.04259467497467995, 0.5332512855529785, 0.06852550804615021, -0.17112629115581512, 0.1763264238834381, 0.16075259447097778, -0.2377840280532837, 0.021251946687698364, 0.2817613482475281, -0.1588006615638733, 0.21974238753318787, 0.20541170239448547, -0.07898599654436111, -0.1350955069065094, -0.1896863430738449, 0.3096531331539154, 0.1793534904718399, 0.26810839772224426, -0.39943382143974304, -0.2405271828174591, -0.11299742013216019, 0.008461177349090576, -0.3494419455528259, 0.30021265149116516, 0.2281777560710907, -0.02640499547123909, -0.18794192373752594, -0.14576910436153412, -0.10700035095214844, 0.16327325999736786, -0.09382261335849762, 0.20046022534370422, 0.25940895080566406, 0.07561781257390976, 0.07202701270580292, 0.49292969703674316, -0.08767793327569962, 0.20414535701274872, -0.049483396112918854, -0.21966242790222168, 0.3118335008621216, -0.40024465322494507, -0.09202705323696136, 0.16149336099624634, 0.074483722448349, 0.23049071431159973, 0.0756530612707138, 0.2575974762439728, 0.006720727309584618, 0.013254833407700062, 0.2516729235649109, 0.20012536644935608, 0.37846839427948, -0.06540518254041672, 0.21343137323856354, 0.1905720829963684, -0.08007264882326126, -0.17315508425235748, 0.08808737248182297, 0.04157014936208725, -0.30282846093177795, 0.07492583990097046, -0.08002947270870209, 0.11678652465343475, -0.2463722974061966, -0.10123316198587418, 0.13183742761611938, -0.1357850730419159, -0.21219688653945923, 0.045383092015981674, 0.5516232848167419, 0.1866033375263214, -0.07676784694194794, 0.01477612555027008, 0.06872765719890594, -0.05870090425014496, 0.09639592468738556, -0.36271923780441284, 0.11536534130573273, -0.36260953545570374, 0.09388081729412079, 0.23760820925235748, 0.12139229476451874, 0.3731118440628052, -0.1051938384771347, -0.06587240099906921, 0.11021289229393005, 0.2735164165496826, -0.2634010314941406, 0.3925335109233856, 0.22904419898986816, -0.25524476170539856, 0.024191075935959816, 0.020669031888246536, 0.1493789106607437, -0.2203027606010437, 0.4370920956134796, -0.12994784116744995, -0.27767589688301086, 0.27397266030311584, 0.17452868819236755, -0.04801597446203232, -0.037977948784828186, -0.0036669373512268066, -0.07302328944206238, 0.44607993960380554, -0.360843688249588, 0.31711089611053467, -0.20892725884914398, -0.02790951170027256, -0.3870052397251129, 0.00599699467420578, 0.16437853872776031, -0.22295542061328888, 0.0757545530796051, -0.27342841029167175, -0.014844972640275955, 0.19486987590789795, 0.4441375732421875, -0.09104052931070328, -0.3584686517715454, -0.23990517854690552, 0.17309267818927765, 0.24682411551475525, -0.13808006048202515, -0.5333731174468994, -0.2369205504655838, -0.1584782749414444, 0.03616888076066971, 0.08791377395391464, 0.05844157934188843, -0.06270148605108261, -0.1163545772433281, 0.4518151581287384, 0.02102801762521267, 0.01834539696574211, 0.13438518345355988, -0.30992376804351807, -0.1400603950023651, 0.36973869800567627, -0.15208177268505096, -0.24018196761608124, -0.1730969250202179, 0.11951489746570587, -0.17812876403331757, 0.38074198365211487, 0.04133050516247749, -0.03081388585269451, -0.034982748329639435, 0.48412612080574036, -0.21982841193675995, -0.0847402885556221, -0.07475058734416962, -0.15926656126976013, 0.15090134739875793, 0.0692162811756134, -0.12820453941822052, -0.10194717347621918, -0.21619808673858643, -0.05006634443998337, -0.07203478366136551, -0.19365756213665009, -0.3217908442020416, 0.14004936814308167, 0.055104807019233704, 0.07145869731903076, 0.05531902238726616, -0.16876789927482605, 0.09281137585639954, -0.42366084456443787, -0.1620376855134964, -0.08879753947257996, 0.16012591123580933, -0.12449812144041061, -0.2009049952030182, 0.09206502139568329, 0.2002386450767517, -0.05143408477306366, 0.05137992277741432, -0.3045928180217743, 0.43805432319641113, 0.20628242194652557, 0.08236272633075714, 0.07510887086391449, 0.09880272299051285, -0.10491833835840225, -0.1015256866812706, 0.2643212676048279, -0.18143269419670105, 0.11313681304454803, -0.13917532563209534, -0.08185739070177078, 0.23963689804077148, -0.22786037623882294, 0.07608698308467865, 0.19140277802944183, -0.2140289694070816, 0.23352274298667908, 0.19477765262126923, -0.07633571326732635, -0.18927913904190063, 0.3093520998954773, 0.21438342332839966, 0.37486428022384644, 0.2533475160598755, -0.2395370602607727, -0.0730871632695198, 0.7524765729904175, 0.22069600224494934, 0.14991495013237, 0.022046208381652832, 0.021172471344470978, -0.3006105124950409, 0.16506434977054596, 0.4131225645542145, 0.49860650300979614, 0.18924129009246826, 0.14809055626392365, -0.0028858203440904617, 0.0206918865442276, -0.07620175182819366, 0.31872814893722534, 0.02520030364394188, 0.14750075340270996, 0.08778408169746399, 0.27690982818603516, -0.222517192363739, -0.563815712928772, -0.16467075049877167, 0.30803564190864563, 0.24249142408370972, -0.08202111721038818, -0.23885974287986755, -0.3599182069301605, -0.13612638413906097, -0.14083331823349, -0.10600095987319946, -0.21283341944217682, -0.1299731582403183, 0.09275341778993607, 0.3725087344646454, -0.21256622672080994, 0.3739694356918335, -0.24820636212825775, 0.4168655276298523, -0.02220269665122032, -0.11719708889722824, -0.23208074271678925, -0.21777835488319397, 0.1436157077550888, 0.11650995910167694, 0.16973218321800232, 0.09457268565893173, 0.38997429609298706, 0.2874004542827606, -0.14266707003116608, -0.058466844260692596, -0.21581101417541504, 0.03472413495182991, -0.16507817804813385, -0.029339147731661797, 0.02745535969734192, 0.06141390651464462, -0.11375085264444351, -0.3545004427433014, 0.007511278614401817, -0.3451034724712372, -0.2569633722305298, 0.11526302993297577, 0.24797716736793518, -0.19416014850139618, -0.37283965945243835, -0.4107474982738495, -0.25549787282943726, -0.46785983443260193, 0.4274532198905945, -0.04211219772696495, 0.16973324120044708, 0.4122060239315033, 0.026855353266000748, 0.08716136962175369, -0.367987722158432, 0.04672667384147644, -0.48011112213134766, -0.3200536370277405, 0.16642460227012634, -0.24210244417190552, -0.12748003005981445, -0.05091032758355141, -0.07979843020439148, 0.2987234592437744, 0.25567489862442017, -0.17015179991722107, -0.014399738982319832, -0.4049585461616516, -0.05954275280237198, 0.02065311372280121, 0.17051537334918976, 0.5260148048400879, 0.1508602797985077, -0.188262477517128, -0.17595061659812927, -0.1672910451889038, 0.23452508449554443, 0.3991561532020569, 0.1976083666086197, 0.030670039355754852, -0.001397799700498581, 0.2786438763141632, 0.661191463470459, 0.03487497195601463, 0.2650376856327057, 0.24445977807044983, 0.12085969746112823, 0.37954410910606384, -0.37076306343078613, -0.045182712376117706, 0.3426946997642517, 0.10070991516113281, -0.34213513135910034, 0.08984805643558502, -0.19200438261032104, -0.36631524562835693, -0.06478474289178848, 0.24074679613113403, 0.07306411117315292, -0.1817740947008133, 0.08917427808046341, -0.07619354128837585, -0.061004288494586945, 0.21420451998710632, 0.09790564328432083, -0.23635156452655792, -0.11972422897815704, -0.08301950991153717, -0.1502344310283661, 0.2026253342628479, -0.17229759693145752, -0.5896510481834412, -0.2854016125202179, -0.4158501625061035, 0.2997022867202759, 0.021985230967402458, 0.6304898858070374, -0.04624459892511368, -0.275084525346756, 0.14212609827518463, -0.013684945181012154, 0.4843631982803345, -0.1223754957318306, 0.09787095338106155, 0.2757173776626587, 0.23645427823066711, -0.1469794660806656, 0.02258766070008278, -0.31533104181289673, 0.10524196177721024, -0.2829577624797821, -0.20830655097961426, -0.2535834014415741, -0.07929583638906479, -0.041304782032966614, -0.01663174107670784, 0.02808893844485283, 0.05576150491833687, -0.3222200870513916, 0.132381409406662, -0.3599134683609009, 0.13067591190338135, 0.20974454283714294, -0.171774759888649, -0.45780470967292786, 0.01881619170308113, 0.09598620235919952, 0.002287270501255989, -0.050848379731178284, 0.14277715981006622, 0.5783634781837463, 0.053234778344631195, 0.08003361523151398, 0.21536310017108917, -0.2208367884159088, 0.2404060959815979, 0.3562554121017456, -0.18036209046840668, 0.20779581367969513, -0.019692637026309967, -0.10947486013174057, 0.3237193822860718, 0.4031085669994354, -0.008754443377256393, 0.24211692810058594, 0.041307106614112854, -0.026921436190605164, -0.1610465794801712, -0.08986090123653412, 0.36954712867736816, -0.16446274518966675, 0.009617963805794716, -0.6999316811561584, 0.27226707339286804, 0.38197702169418335, -0.179582417011261, 0.7695520520210266, 0.03423498570919037, -0.09264915436506271, 0.33154863119125366, -0.07725173979997635, 1.1195509433746338, 0.03397095203399658, 0.1771051436662674, 0.17556190490722656, -0.015926197171211243, 0.11487868428230286, -0.039679624140262604, 0.2906039357185364, -0.23783770203590393, -0.5211147665977478, 0.16047272086143494, -0.2698274254798889, 0.17623062431812286, -0.07106581330299377, -0.2536167502403259, 0.24522025883197784, 0.09293477237224579, -0.04449542239308357, -0.17270150780677795, 0.007868543267250061, -0.3439273238182068, -0.040550343692302704, -0.04292730242013931, 0.13225510716438293, -0.03353600203990936, 0.029976308345794678, -0.05860213562846184, 0.013780204579234123, -0.06307990103960037, -0.29730403423309326, -0.09443578124046326, 0.13528817892074585, -0.20446810126304626, 0.23248593509197235, -0.2904859781265259, 0.006202951073646545, 0.010941490530967712, -0.05474567040801048, -0.12837032973766327, 0.25408440828323364, -0.04814426600933075, 0.4096057116985321, 0.5715177655220032, 0.23147337138652802, 0.07684751600027084, 0.21455976366996765, 0.2458198219537735, 0.02556304633617401, -0.22695055603981018, 0.05391766503453255, -0.14830298721790314, -0.4766716957092285, -0.1591782122850418, 0.03632507473230362, 0.2632266879081726, 0.16232696175575256, -0.36793798208236694, 0.24862252175807953, -0.3597959280014038, -0.21119001507759094, 0.1669827401638031, 0.12705112993717194, -0.1322510987520218, 0.470060795545578, 0.014276541769504547, -0.22955822944641113, -0.0009837150573730469, 0.5051690936088562, 0.08646688610315323, 0.23831111192703247, 0.5237429141998291, -0.07267207652330399, -0.170011505484581, -0.28729885816574097, -0.2536246180534363, -0.03601318597793579, -0.20447105169296265, 0.1837618201971054, -0.05546915531158447, -0.2839886546134949, 0.0688755065202713, 0.2643103003501892, 0.10663315653800964, 0.40707728266716003, -0.09484880417585373, -0.2292088121175766, -0.4201835095882416, 0.44376659393310547, -0.0992577075958252, 0.4140265882015228, -0.2612752616405487, 0.08263519406318665, -0.12150606513023376, 0.19169345498085022, -0.38761791586875916, 0.09383640438318253, -0.08369109779596329, 0.29345524311065674, 0.015756534412503242, -0.11193353682756424, 0.023032229393720627, -0.1707744300365448, 0.15248757600784302, 0.35071414709091187, -0.37249383330345154, -0.24302098155021667, 0.1457931250333786, 0.11757475137710571, 0.08354784548282623, 0.05920618772506714, -0.08964961022138596, -0.5925153493881226, -0.10818307101726532, -0.18363770842552185, 0.09462285041809082, 0.14584845304489136, -0.05784885585308075, 0.30711469054222107, 0.36627644300460815, -0.006175920367240906, 0.3721614480018616, 0.28927531838417053, -0.19972294569015503, -0.38404446840286255, -0.04666440561413765, -0.021411307156085968, -0.19070972502231598, -0.10976684838533401, -0.09900277107954025, -0.06740906089544296, -0.25416433811187744, 0.2214461863040924, 0.05561380088329315, -0.01754651963710785, -0.21992544829845428, -0.09808114916086197, 0.42951828241348267, 0.6297242641448975, -0.07643241435289383, -0.3640526235103607, 0.40697023272514343, 0.26420828700065613, -0.34553423523902893, -0.16291889548301697, 0.0464290976524353, 0.27528393268585205, 0.14746533334255219, 0.008305802941322327, -0.07595054060220718, -0.1910991221666336, -0.18153654038906097, 0.2896532118320465, 0.22053585946559906, -0.6552197337150574, 0.2770576775074005, 0.12683534622192383, 0.021031346172094345, -0.17865042388439178, 0.2017374485731125, 0.25620824098587036, 0.30999937653541565, 0.3726292848587036, -0.04602167755365372, 0.35596558451652527, 0.4608306586742401, 0.06596603244543076, 0.11708569526672363, -0.242561936378479, 0.11539173126220703, 0.5658168792724609, -0.08119939267635345, 0.27669891715049744, 0.24158106744289398, 0.3678373396396637, 0.06122133880853653, -0.14634564518928528, -0.16861698031425476, -0.04493140056729317, -0.18315505981445312, 0.01173652894794941, 0.1710043102502823, -0.29132190346717834, -0.05831693112850189, -0.0793406143784523, -0.06837630271911621, 0.17550837993621826, 0.6497925519943237, 0.12100226432085037, 0.06104833632707596, -0.36777743697166443, 0.23698121309280396, 0.12798935174942017, 0.2782152593135834, -0.30368924140930176, 0.14468882977962494, 0.11850686371326447, -0.07520109415054321, 0.32343345880508423, 0.248111292719841, 0.181609645485878, 0.38290539383888245, -0.2008112668991089, 0.0689978301525116, -0.050516512244939804, -0.12656831741333008, -0.15661080181598663, 0.3311423659324646, 0.384704053401947, -0.1390635371208191, 0.19856691360473633, 0.16332592070102692, -0.17679938673973083, 0.014327118173241615, 0.20115382969379425, 0.1655365377664566, -0.19033169746398926, 0.23069113492965698, 0.1728612184524536, -0.15045994520187378, 0.04278091341257095, -0.10377990454435349, -0.47271639108657837, -0.03838849440217018, -0.14188580214977264, -0.20313407480716705, 0.03780089318752289, -0.08494636416435242, 0.09199651330709457, -0.09216280281543732, 0.30334916710853577, 0.15685798227787018, -0.12623149156570435, -0.17806638777256012, -0.2676565647125244, -0.9151133894920349, 0.22456204891204834, 0.05150212347507477, 0.06240607053041458, -0.13494981825351715, 0.38461998105049133, 0.008202463388442993, -0.20361126959323883, 0.11219026893377304, -0.098271943628788, -0.03966353461146355, 0.22327207028865814, -0.4372616112232208, 0.07024064660072327, -0.08145307004451752, -0.09880845248699188, 0.14654414355754852, -0.24783796072006226, 0.03112802654504776, -0.11476156860589981, 0.04793960601091385, 0.007240052334964275, -0.03801216930150986, 0.035930078476667404, 0.3697410523891449, 0.4667224884033203, 0.01612268015742302, 0.2574418783187866, -0.0802941843867302, 0.04229392856359482, -0.29775673151016235, -0.2828940749168396, 0.02451597899198532, -0.21855607628822327, 0.07094836235046387, 0.47692564129829407, -0.16035152971744537, -0.12550251185894012, -0.27001258730888367, 0.2912338078022003, -0.2710493206977844, 0.11839555203914642, -0.33230796456336975, 0.21230123937129974, 0.09011729806661606, 0.35168129205703735, -0.28553324937820435, -0.028027750551700592, -0.03666844964027405, 0.14514434337615967, -0.29316121339797974, -0.3934074938297272, 0.7955747842788696, -0.21202856302261353, -0.2552550733089447, -0.12430006265640259, 0.537970781326294, 0.021997809410095215, -0.44030827283859253, -0.33899348974227905, -0.030006706714630127, 0.1150767132639885, 0.0005136150866746902, -0.2319956123828888, 0.10296960175037384, -0.3894497752189636, 0.05187683179974556, -0.0874018743634224, 0.5879083871841431, -0.10654083639383316, -0.27095505595207214, 0.1191214770078659, -0.2413642555475235 ]
https://github.com/huggingface/datasets/issues/514
dataset.shuffle(keep_in_memory=True) is never allowed
My bad. This is actually not fixed in #513. Sorry about that... The new `indices_cache_file_name` is set to a non-None value in the new `shuffle()` as well. The buffer and caching mechanisms used in the `select()` function are too intricate for me to understand why the check is there at all. I've removed it in my local build and it seems to be working fine for my project, without really considering other implications of the change.
As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)` The commit added the lines ```python # lines 994-996 in src/nlp/arrow_dataset.py assert ( not keep_in_memory or cache_file_name is None ), "Please use either `keep_in_memory` or `cache_file_name` but not both." ``` This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check. I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`.
76
dataset.shuffle(keep_in_memory=True) is never allowed As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)` The commit added the lines ```python # lines 994-996 in src/nlp/arrow_dataset.py assert ( not keep_in_memory or cache_file_name is None ), "Please use either `keep_in_memory` or `cache_file_name` but not both." ``` This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check. I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`. My bad. This is actually not fixed in #513. Sorry about that... The new `indices_cache_file_name` is set to a non-None value in the new `shuffle()` as well. The buffer and caching mechanisms used in the `select()` function are too intricate for me to understand why the check is there at all. I've removed it in my local build and it seems to be working fine for my project, without really considering other implications of the change.
[ -0.16278989613056183, 0.10089722275733948, -0.04723656177520752, 0.14130523800849915, 0.19698600471019745, -0.08948779106140137, -0.07246878743171692, 0.37462127208709717, 0.02849748730659485, 0.3297639489173889, 0.054085925221443176, 0.5689100623130798, -0.29496678709983826, -0.4070601761341095, -0.0630834698677063, 0.18253159523010254, 0.09145447611808777, 0.0464375764131546, -0.06404174864292145, -0.11498215794563293, -0.4023230969905853, -0.13555151224136353, -0.38077259063720703, -0.20722390711307526, -0.28091785311698914, -0.1180843785405159, -0.061782412230968475, 0.09146542847156525, -0.2582836449146271, -0.4361545145511627, -0.006342733278870583, 0.3478776514530182, -0.4093189239501953, 0.416030615568161, -0.00010997633216902614, -0.1791149526834488, 0.2073143869638443, -0.07387490570545197, -0.270912766456604, -0.09894903004169464, -0.37521597743034363, 0.11048121750354767, -0.0958126038312912, -0.09195736795663834, 0.17562976479530334, -0.1854449361562729, 0.0588800311088562, -0.5130762457847595, 0.1786985993385315, 0.21280913054943085, 0.21111243963241577, 0.04998213052749634, -0.03358007222414017, -0.029310476034879684, 0.5861092209815979, 0.05661368370056152, -0.1890404373407364, 0.16635747253894806, 0.14928120374679565, -0.19059045612812042, -0.0007993951439857483, 0.2823546826839447, -0.2549176812171936, 0.2575426697731018, 0.26112544536590576, -0.09050270169973373, -0.12360811978578568, -0.18463382124900818, 0.3069356679916382, 0.264650821685791, 0.25443342328071594, -0.36754941940307617, -0.28487804532051086, -0.17756539583206177, -0.008323866873979568, -0.35383063554763794, 0.3373946249485016, 0.15218055248260498, 0.0035766679793596268, -0.17698100209236145, -0.18921199440956116, -0.02705872617661953, 0.23196378350257874, -0.09661687910556793, 0.24912187457084656, 0.2606118321418762, 0.0594693124294281, 0.04099160432815552, 0.5399273037910461, -0.09058941900730133, 0.2658836841583252, -0.12244032323360443, -0.23888623714447021, 0.28388747572898865, -0.38707083463668823, -0.11376923322677612, 0.1962219923734665, 0.0459890216588974, 0.22127974033355713, 0.07044007629156113, 0.27296122908592224, 0.07080963253974915, 0.0240054689347744, 0.20284005999565125, 0.10221658647060394, 0.40536436438560486, -0.08943020552396774, 0.17246466875076294, 0.19955702126026154, -0.03159917891025543, -0.140945166349411, 0.0801544338464737, 0.005148633383214474, -0.24885797500610352, 0.047043051570653915, -0.0482759103178978, 0.09994207322597504, -0.21413859724998474, -0.12548576295375824, 0.12037567794322968, -0.12013783305883408, -0.22330200672149658, 0.09014054387807846, 0.5079167485237122, 0.18087655305862427, -0.02026648446917534, -0.053989507257938385, 0.06033056974411011, -0.07072537392377853, 0.15337799489498138, -0.3479059636592865, 0.06793934851884842, -0.30147480964660645, 0.14468224346637726, 0.29003456234931946, 0.09291081130504608, 0.3374704122543335, -0.053048085421323776, -0.07445447146892548, 0.16771051287651062, 0.24098771810531616, -0.29885298013687134, 0.45115771889686584, 0.20908258855342865, -0.3277808129787445, 0.011675717309117317, 0.03051702491939068, 0.06618800759315491, -0.27134352922439575, 0.41431018710136414, -0.13083991408348083, -0.25825440883636475, 0.2951084077358246, 0.16859811544418335, -0.07816431671380997, -0.06271181255578995, -0.028289489448070526, 0.00044898688793182373, 0.4258088767528534, -0.3920404314994812, 0.3442206382751465, -0.21522404253482819, -0.0734059140086174, -0.35123610496520996, 0.02235385961830616, 0.1592845767736435, -0.2199886590242386, 0.06613865494728088, -0.2648996114730835, 0.05455914884805679, 0.1390305459499359, 0.4122767448425293, -0.07077224552631378, -0.3986474871635437, -0.19712792336940765, 0.0905986875295639, 0.21417033672332764, -0.1521369367837906, -0.5648218989372253, -0.24087387323379517, -0.131646066904068, 0.040360383689403534, 0.16589994728565216, 0.047549519687891006, -0.019922379404306412, -0.16835744678974152, 0.4874151349067688, 0.015975285321474075, 0.03790363296866417, 0.16056495904922485, -0.2867966294288635, -0.21086472272872925, 0.29888033866882324, -0.12385663390159607, -0.25220954418182373, -0.19088101387023926, 0.11999748647212982, -0.17366887629032135, 0.3175570070743561, 0.04626968875527382, -0.011107736267149448, -0.03373561054468155, 0.4648885428905487, -0.27660423517227173, -0.06746365875005722, -0.10128322243690491, -0.17856433987617493, 0.191328227519989, 0.06867670267820358, -0.2096099555492401, -0.10759119689464569, -0.1848164051771164, 0.02364451438188553, -0.11831751465797424, -0.2057339996099472, -0.32019683718681335, 0.11419104039669037, 0.114777572453022, 0.1583031862974167, 0.09175561368465424, -0.15394462645053864, 0.06450963020324707, -0.3795579969882965, -0.18583188951015472, -0.062141139060258865, 0.11523792147636414, -0.04345402121543884, -0.2422351837158203, 0.04611782729625702, 0.22483432292938232, -0.09231964498758316, 0.06425445526838303, -0.3035544157028198, 0.40446603298187256, 0.21187543869018555, 0.06544239819049835, 0.04973222315311432, 0.20672079920768738, -0.09723681211471558, -0.04550512135028839, 0.30667564272880554, -0.24564917385578156, 0.10840295255184174, -0.04018060117959976, -0.08836109191179276, 0.27589917182922363, -0.29856762290000916, 0.12851613759994507, 0.19371527433395386, -0.3063240647315979, 0.2506433129310608, 0.18135179579257965, -0.07752218842506409, -0.23785339295864105, 0.2764940857887268, 0.22713203728199005, 0.4078924059867859, 0.27923908829689026, -0.16853687167167664, -0.0030666664242744446, 0.8022280335426331, 0.22159260511398315, 0.12261804193258286, 0.028247233480215073, -0.009923383593559265, -0.33113524317741394, 0.1510765254497528, 0.43689316511154175, 0.545880913734436, 0.20664145052433014, 0.13917581737041473, -0.05234932899475098, 0.042790599167346954, -0.12482379376888275, 0.30327263474464417, -0.005101636052131653, 0.0998842790722847, 0.14773568511009216, 0.29277503490448, -0.17846174538135529, -0.5660678148269653, -0.11746780574321747, 0.3162509500980377, 0.1801421046257019, -0.046814169734716415, -0.1696542203426361, -0.39156001806259155, -0.11344261467456818, -0.14537306129932404, -0.13624775409698486, -0.20190434157848358, -0.1397087424993515, 0.1181986927986145, 0.4280194938182831, -0.22400330007076263, 0.40307992696762085, -0.21910680830478668, 0.3761199116706848, -0.08205540478229523, -0.20098644495010376, -0.23238635063171387, -0.24735061824321747, 0.11350402235984802, 0.10718247294425964, 0.18013334274291992, 0.03494797646999359, 0.3226131498813629, 0.2647099792957306, -0.15617762506008148, -0.10727457702159882, -0.22116610407829285, 0.05031994357705116, -0.1555042862892151, -0.021646486595273018, -0.047900065779685974, 0.010121524333953857, -0.08827613294124603, -0.38698190450668335, 0.008691364899277687, -0.38317689299583435, -0.24120210111141205, 0.1789947897195816, 0.17877165973186493, -0.14351843297481537, -0.4018130600452423, -0.3335215747356415, -0.23333491384983063, -0.4529968500137329, 0.3741294741630554, -0.06399133056402206, 0.09979397058486938, 0.4208824336528778, 0.05019250139594078, 0.11929281800985336, -0.37034866213798523, 0.05662764608860016, -0.5147157311439514, -0.338405579328537, 0.1441301554441452, -0.1881365031003952, -0.08592590689659119, -0.1079166829586029, -0.10237099975347519, 0.26169607043266296, 0.30226391553878784, -0.15286090970039368, 0.0201324000954628, -0.4135590195655823, -0.022030582651495934, 0.06478387117385864, 0.09572165459394455, 0.5864391326904297, 0.16532284021377563, -0.21205522119998932, -0.1922956109046936, -0.13801179826259613, 0.17893603444099426, 0.371859610080719, 0.1798120141029358, 0.05726063251495361, 0.018240517005324364, 0.2684490978717804, 0.7134544253349304, -0.011072738096117973, 0.254803866147995, 0.2837669849395752, 0.16796717047691345, 0.4330670237541199, -0.43722835183143616, -0.012114300392568111, 0.36588820815086365, 0.09327562153339386, -0.3274989128112793, 0.10780349373817444, -0.20092391967773438, -0.42396780848503113, -0.07029332220554352, 0.2536439597606659, 0.08827397972345352, -0.19287538528442383, 0.1146659106016159, -0.10827533900737762, -0.07777417451143265, 0.20880267024040222, 0.1254793107509613, -0.21213655173778534, -0.1972234547138214, -0.08980904519557953, -0.13055427372455597, 0.20531943440437317, -0.17570313811302185, -0.5716452598571777, -0.3005236089229584, -0.401598185300827, 0.33168020844459534, 0.08360616117715836, 0.6012492775917053, -0.057441793382167816, -0.3226545453071594, 0.0937577560544014, 0.027768943458795547, 0.41772937774658203, -0.10025471448898315, 0.05532091110944748, 0.28660860657691956, 0.2566707730293274, -0.17678606510162354, -0.024348417297005653, -0.29837706685066223, 0.07480206340551376, -0.3461548089981079, -0.15687887370586395, -0.271336168050766, -0.10511315613985062, -0.09748426079750061, 0.02602754905819893, 0.04989097639918327, 0.10945934057235718, -0.40671268105506897, 0.1649535596370697, -0.3717484772205353, 0.15440742671489716, 0.16675303876399994, -0.15727876126766205, -0.46360254287719727, -0.009595956653356552, 0.11691199988126755, -0.020466089248657227, -0.0727098137140274, 0.1309039145708084, 0.5553309917449951, 0.1349181830883026, 0.05679170414805412, 0.25477612018585205, -0.26177358627319336, 0.2977273166179657, 0.2745446562767029, -0.20151133835315704, 0.2483663111925125, 0.026715219020843506, -0.041049230843782425, 0.2491196095943451, 0.4222628176212311, -0.019600030034780502, 0.24539276957511902, 0.11590860784053802, -0.04610627144575119, -0.209000825881958, -0.08559815585613251, 0.3329155445098877, -0.1725001037120819, 0.006170446518808603, -0.7266308069229126, 0.2700076401233673, 0.42166081070899963, -0.20214968919754028, 0.8089621663093567, -0.026305347681045532, -0.07454244047403336, 0.3130093812942505, -0.029332101345062256, 1.0826157331466675, 0.05239427462220192, 0.18458780646324158, 0.15239445865154266, -0.01494608074426651, 0.11521884053945541, -0.027475692331790924, 0.3338968753814697, -0.16107289493083954, -0.5241386294364929, 0.16414521634578705, -0.24127288162708282, 0.14344961941242218, -0.08537010848522186, -0.25559112429618835, 0.24357450008392334, 0.14315588772296906, -0.0014064274728298187, -0.184862419962883, -0.0017583221197128296, -0.411651074886322, -0.06025581434369087, -0.01496802642941475, 0.11896900832653046, -0.02883647382259369, 0.0215768925845623, 0.00400889478623867, 0.050769343972206116, -0.05617959424853325, -0.21494244039058685, -0.09220424294471741, 0.08773647993803024, -0.21328383684158325, 0.2512762248516083, -0.29274827241897583, 0.012028001248836517, -0.07752956449985504, -0.07940980792045593, -0.1324281394481659, 0.2365810126066208, -0.09123104065656662, 0.41568976640701294, 0.5673075914382935, 0.2921690344810486, 0.09024623036384583, 0.11298704147338867, 0.27119916677474976, 0.06237778812646866, -0.20338967442512512, 0.032193154096603394, -0.1376548558473587, -0.4710270166397095, -0.13522882759571075, -0.0016204193234443665, 0.2588431239128113, 0.16530027985572815, -0.28149181604385376, 0.21029584109783173, -0.3044539988040924, -0.21407803893089294, 0.16728414595127106, 0.07608731836080551, -0.015448338352143764, 0.41474735736846924, -0.07231919467449188, -0.26430848240852356, -0.04798509553074837, 0.5450503826141357, 0.0525800846517086, 0.29754966497421265, 0.47176623344421387, -0.17051944136619568, -0.1695038229227066, -0.22844603657722473, -0.21989089250564575, -0.03727365657687187, -0.1842300295829773, 0.1633378267288208, -0.029057053849101067, -0.3322979807853699, 0.10182524472475052, 0.25364038348197937, 0.07162128388881683, 0.4311795234680176, -0.12069928646087646, -0.1742141842842102, -0.3888820707798004, 0.48643678426742554, -0.10693442821502686, 0.37671706080436707, -0.2589106857776642, 0.012110651470720768, -0.12515228986740112, 0.1198558583855629, -0.3764689564704895, 0.051226742565631866, -0.056395724415779114, 0.2495507299900055, -0.04180283844470978, -0.13358613848686218, 0.06592226028442383, -0.20197613537311554, 0.12323509156703949, 0.2920113801956177, -0.3878261148929596, -0.22301656007766724, 0.12727178633213043, 0.12929552793502808, 0.051772087812423706, 0.04839608818292618, -0.11833412945270538, -0.6028358936309814, -0.0754033774137497, -0.24509936571121216, 0.13266585767269135, 0.11494588106870651, -0.0639123022556305, 0.2569670081138611, 0.3623208999633789, 0.020895469933748245, 0.393200159072876, 0.2849181890487671, -0.2523907721042633, -0.38893771171569824, -0.0620708130300045, 0.0018410086631774902, -0.19618390500545502, -0.09523496776819229, -0.08865675330162048, -0.061913855373859406, -0.25780510902404785, 0.16688531637191772, 0.03875312954187393, 0.03191453963518143, -0.23497223854064941, -0.031793124973773956, 0.3383498787879944, 0.638177752494812, 0.015067086555063725, -0.41978734731674194, 0.3746504485607147, 0.24265563488006592, -0.2449927181005478, -0.19854147732257843, 0.0005007069557905197, 0.28108614683151245, 0.16747352480888367, -0.03750426322221756, -0.030974509194493294, -0.24510829150676727, -0.09401723742485046, 0.31146445870399475, 0.2527218461036682, -0.66642826795578, 0.260300874710083, 0.11667408049106598, 0.061947617679834366, -0.16337083280086517, 0.24222028255462646, 0.18898797035217285, 0.30798786878585815, 0.35700368881225586, -0.03695048391819, 0.3194257318973541, 0.42525315284729004, 0.11097487807273865, 0.05938103049993515, -0.2671714425086975, 0.14725928008556366, 0.5640747547149658, -0.1756097674369812, 0.2904323637485504, 0.25773078203201294, 0.3387812077999115, 0.025239497423171997, -0.0847715437412262, -0.14626957476139069, -0.04928125813603401, -0.15768760442733765, -0.02920532040297985, 0.1933448761701584, -0.29655981063842773, -0.021635625511407852, -0.053490642458200455, -0.07784859836101532, 0.2190326601266861, 0.6823838949203491, 0.0787305235862732, 0.022815927863121033, -0.30853748321533203, 0.23659738898277283, 0.1222049668431282, 0.3123137950897217, -0.2915606200695038, 0.15404975414276123, 0.18674811720848083, -0.0926552265882492, 0.3304535448551178, 0.2505863606929779, 0.1957380473613739, 0.33718904852867126, -0.22785499691963196, 0.08789538592100143, -0.028682004660367966, -0.1443088948726654, -0.22098222374916077, 0.375855952501297, 0.35376402735710144, -0.16270264983177185, 0.1452498435974121, 0.17583847045898438, -0.18294848501682281, -0.01676531881093979, 0.14040879905223846, 0.20128530263900757, -0.1829669326543808, 0.19950154423713684, 0.24461613595485687, -0.08557111769914627, 0.10979306697845459, -0.06660566478967667, -0.410493403673172, -0.013630318455398083, -0.16644982993602753, -0.22428038716316223, 0.034214090555906296, -0.07898787409067154, 0.09036135673522949, -0.035306666046381, 0.32935115694999695, 0.1339181363582611, -0.15808150172233582, -0.13496758043766022, -0.23585808277130127, -0.8640744686126709, 0.1818528026342392, 0.06824088096618652, 0.15683448314666748, -0.08894805610179901, 0.3957221806049347, 0.01903318613767624, -0.1654425710439682, 0.06441579759120941, -0.0863257646560669, -0.0428876169025898, 0.17910626530647278, -0.44359415769577026, 0.09027563780546188, -0.08502204716205597, -0.10683268308639526, 0.12951801717281342, -0.29469311237335205, 0.0467502698302269, -0.1034766286611557, 0.03250584006309509, 0.004985228180885315, -0.020894549787044525, 0.07116317749023438, 0.42194151878356934, 0.439747154712677, 0.04152895510196686, 0.21966218948364258, -0.10057363659143448, 0.034975774586200714, -0.290199875831604, -0.22349703311920166, 0.004294324666261673, -0.21731823682785034, 0.03320073336362839, 0.4783443510532379, -0.19005955755710602, -0.17434513568878174, -0.23008610308170319, 0.345699280500412, -0.25092896819114685, 0.12297248095273972, -0.3572004735469818, 0.18162129819393158, 0.07424650341272354, 0.3774426579475403, -0.32271578907966614, 0.005616478621959686, 0.03282934054732323, 0.14583925902843475, -0.27365440130233765, -0.37564605474472046, 0.712978720664978, -0.22505192458629608, -0.2088702917098999, -0.13587787747383118, 0.49487119913101196, 0.03980737179517746, -0.39102903008461, -0.25609666109085083, 0.028162725269794464, 0.14486326277256012, 0.04476504027843475, -0.21363960206508636, 0.09727644920349121, -0.3613094687461853, 0.13036228716373444, -0.10917481780052185, 0.5722798109054565, -0.07235561311244965, -0.27722302079200745, 0.10974189639091492, -0.21197643876075745 ]
https://github.com/huggingface/datasets/issues/514
dataset.shuffle(keep_in_memory=True) is never allowed
Ok I'll investigate and add a series of tests on the `keep_in_memory=True` settings which is under-tested atm
As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)` The commit added the lines ```python # lines 994-996 in src/nlp/arrow_dataset.py assert ( not keep_in_memory or cache_file_name is None ), "Please use either `keep_in_memory` or `cache_file_name` but not both." ``` This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check. I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`.
17
dataset.shuffle(keep_in_memory=True) is never allowed As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)` The commit added the lines ```python # lines 994-996 in src/nlp/arrow_dataset.py assert ( not keep_in_memory or cache_file_name is None ), "Please use either `keep_in_memory` or `cache_file_name` but not both." ``` This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check. I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`. Ok I'll investigate and add a series of tests on the `keep_in_memory=True` settings which is under-tested atm
[ -0.1645396500825882, 0.04706376791000366, -0.06451352685689926, 0.18163233995437622, 0.22622716426849365, -0.06582202017307281, -0.09840403497219086, 0.3320516049861908, -0.007561400532722473, 0.33992111682891846, 0.044422462582588196, 0.5816388726234436, -0.29123324155807495, -0.4286249876022339, -0.07635057717561722, 0.13835257291793823, 0.043693508952856064, 0.09388746321201324, -0.043124839663505554, -0.1475757360458374, -0.3487336039543152, -0.11347424983978271, -0.4357573390007019, -0.19661052525043488, -0.33423861861228943, -0.15887413918972015, -0.024881921708583832, 0.1103743314743042, -0.23720349371433258, -0.397238552570343, -0.06869979947805405, 0.27895188331604004, -0.44234499335289, 0.4937444031238556, -0.00011062973499065265, -0.24292269349098206, 0.17970824241638184, -0.05786483734846115, -0.24357730150222778, -0.12178598344326019, -0.35752782225608826, 0.1902099996805191, -0.038354113698005676, -0.16585464775562286, 0.1627752184867859, -0.16572518646717072, 0.06246054917573929, -0.43913158774375916, 0.2739272713661194, 0.19192513823509216, 0.23257088661193848, 0.04836192727088928, -0.010864268988370895, -0.07084117829799652, 0.5056991577148438, 0.09836909174919128, -0.18650540709495544, 0.20238082110881805, 0.09942846745252609, -0.18266980350017548, -0.0003843829035758972, 0.2622643709182739, -0.15029042959213257, 0.2361290007829666, 0.20723941922187805, -0.06699807941913605, -0.16667279601097107, -0.1825503706932068, 0.35548830032348633, 0.1823652684688568, 0.22925573587417603, -0.42424508929252625, -0.22381144762039185, -0.10830001533031464, 0.006392936687916517, -0.296493262052536, 0.2984439432621002, 0.18532498180866241, -0.02289062738418579, -0.1757451295852661, -0.19304412603378296, -0.05609220266342163, 0.15071538090705872, -0.08236256241798401, 0.2069917619228363, 0.26199406385421753, 0.05041622743010521, 0.056710705161094666, 0.5261264443397522, -0.09701330959796906, 0.18772371113300323, -0.03745971620082855, -0.23612791299819946, 0.30295002460479736, -0.42306771874427795, -0.062421977519989014, 0.17137876152992249, 0.08727623522281647, 0.2205875813961029, 0.06135355681180954, 0.300849974155426, 0.04461771249771118, 0.012895598076283932, 0.21068868041038513, 0.13901212811470032, 0.3808435797691345, -0.07203475385904312, 0.1835346817970276, 0.19633103907108307, -0.0748431459069252, -0.2012501209974289, 0.049445539712905884, 0.008846190758049488, -0.27484914660453796, 0.08455295860767365, -0.13423845171928406, 0.10053019225597382, -0.25769543647766113, -0.10261249542236328, 0.12274999916553497, -0.11490286141633987, -0.1920347958803177, 0.0423770397901535, 0.6033263802528381, 0.16030271351337433, -0.11700772494077682, 0.025568611919879913, 0.09034940600395203, -0.04608333855867386, 0.13739384710788727, -0.3694562315940857, 0.08494310081005096, -0.3214624226093292, 0.13834591209888458, 0.29827880859375, 0.15028724074363708, 0.3950698971748352, -0.0642249584197998, -0.025195345282554626, 0.1381608098745346, 0.282737672328949, -0.2803495228290558, 0.3846612274646759, 0.23031748831272125, -0.24049274623394012, 0.04703041911125183, -0.01965850219130516, 0.11895167827606201, -0.18820378184318542, 0.40203067660331726, -0.0872790738940239, -0.26134636998176575, 0.3605812191963196, 0.17782308161258698, -0.10038412362337112, -0.03431541472673416, -0.010385207831859589, -0.09159103035926819, 0.4123304784297943, -0.3571664094924927, 0.28965094685554504, -0.19290128350257874, -0.0031735077500343323, -0.366028755903244, 0.047214120626449585, 0.14115099608898163, -0.16841170191764832, 0.04702349752187729, -0.2436847686767578, 0.023643286898732185, 0.16215796768665314, 0.44572073221206665, -0.08740516006946564, -0.3389562964439392, -0.2185923308134079, 0.19656120240688324, 0.2297668159008026, -0.14873704314231873, -0.5433409810066223, -0.23551131784915924, -0.1417665332555771, 0.04430082440376282, 0.11158223450183868, 0.03189079463481903, -0.039005834609270096, -0.100230373442173, 0.46595603227615356, 0.06013517454266548, 0.038139283657073975, 0.1441456824541092, -0.3020867109298706, -0.13128815591335297, 0.3288304805755615, -0.11448301374912262, -0.23942826688289642, -0.1633695662021637, 0.09180822223424911, -0.1207442581653595, 0.3615785539150238, 0.06536943465471268, -0.04039227217435837, -0.062086671590805054, 0.46026474237442017, -0.2890101671218872, -0.09273423254489899, -0.08825667202472687, -0.1043698713183403, 0.15924370288848877, 0.09409470856189728, -0.14101967215538025, -0.15038494765758514, -0.2046487033367157, -0.03331905975937843, -0.10328980535268784, -0.2423354834318161, -0.32820650935173035, 0.15485164523124695, 0.10084857046604156, 0.10140830278396606, 0.06171703711152077, -0.10634104907512665, 0.08678246289491653, -0.4196282923221588, -0.19259881973266602, -0.07564102113246918, 0.12606897950172424, -0.08845160901546478, -0.23833616077899933, 0.06058398634195328, 0.2049884796142578, -0.0931287631392479, 0.009615547023713589, -0.31483811140060425, 0.4407110810279846, 0.18788571655750275, 0.063686303794384, 0.06660906225442886, 0.09643734991550446, -0.12636062502861023, -0.11586825549602509, 0.26396849751472473, -0.21414415538311005, 0.11099553108215332, -0.1265973150730133, -0.11254041641950607, 0.2180497944355011, -0.24236829578876495, 0.09688723832368851, 0.23936815559864044, -0.24731403589248657, 0.26394906640052795, 0.18859213590621948, -0.041633207350969315, -0.20779137313365936, 0.284348726272583, 0.16916188597679138, 0.42929619550704956, 0.20451286435127258, -0.22785203158855438, -0.08149442821741104, 0.7257267832756042, 0.26315316557884216, 0.1692695915699005, -0.02891410142183304, -0.03142125904560089, -0.29490023851394653, 0.134202241897583, 0.3861590325832367, 0.5165150165557861, 0.2118189036846161, 0.14964531362056732, -0.029634470120072365, 0.01699933037161827, -0.08780033141374588, 0.29085573554039, -0.005640603601932526, 0.13657236099243164, 0.13038527965545654, 0.2946321666240692, -0.21101394295692444, -0.5754871368408203, -0.17634855210781097, 0.30665943026542664, 0.22835563123226166, -0.05380484461784363, -0.2455095797777176, -0.34113267064094543, -0.0883905291557312, -0.07714373618364334, -0.11255838721990585, -0.19192691147327423, -0.10042367875576019, 0.1275375485420227, 0.3741239905357361, -0.18713444471359253, 0.3885905146598816, -0.21753953397274017, 0.38343292474746704, -0.025577859953045845, -0.16850340366363525, -0.2406044602394104, -0.1994377076625824, 0.12486540526151657, 0.13166926801204681, 0.1653933972120285, 0.12222424149513245, 0.39360877871513367, 0.30407118797302246, -0.18547111749649048, -0.06359262019395828, -0.18191653490066528, 0.05489229038357735, -0.13910241425037384, -0.0073844920843839645, -0.014349892735481262, 0.06173397973179817, -0.10765066742897034, -0.3902010917663574, 0.04346134513616562, -0.34877586364746094, -0.25710687041282654, 0.1572524905204773, 0.2225515991449356, -0.2505582869052887, -0.4013538658618927, -0.40128326416015625, -0.2319539338350296, -0.4734947681427002, 0.4063267111778259, -0.025074347853660583, 0.12163682281970978, 0.41880902647972107, 0.03011053428053856, 0.10689550638198853, -0.36661556363105774, 0.10071882605552673, -0.4784908890724182, -0.2979615330696106, 0.16239669919013977, -0.2508963644504547, -0.12095920741558075, -0.044662896543741226, -0.09640554338693619, 0.26737546920776367, 0.334541916847229, -0.19745305180549622, 0.0018108692020177841, -0.42143890261650085, -0.043003737926483154, 0.03909290209412575, 0.12474917620420456, 0.553254246711731, 0.1390645056962967, -0.19107618927955627, -0.1802099645137787, -0.15796682238578796, 0.28390082716941833, 0.41015127301216125, 0.1807178407907486, -0.0001558605581521988, -0.008867274969816208, 0.24471032619476318, 0.6376872062683105, -0.0267478059977293, 0.23070472478866577, 0.22281166911125183, 0.07092877477407455, 0.37483686208724976, -0.3868432939052582, -0.021333443000912666, 0.3736647367477417, 0.12935228645801544, -0.325883686542511, 0.1407596468925476, -0.22247684001922607, -0.3538877069950104, -0.08056814223527908, 0.2327483892440796, 0.04617973417043686, -0.18970027565956116, 0.0882817953824997, -0.03636836260557175, -0.0494106188416481, 0.18911679089069366, 0.13291385769844055, -0.1916753500699997, -0.10989295691251755, -0.09427998960018158, -0.15309716761112213, 0.18817731738090515, -0.18367734551429749, -0.560935914516449, -0.2704077363014221, -0.41119512915611267, 0.3094632029533386, -0.0331861637532711, 0.630699098110199, -0.08604715764522552, -0.29739928245544434, 0.12290117889642715, -0.008854486048221588, 0.4743199944496155, -0.12370436638593674, 0.08453087508678436, 0.27293652296066284, 0.1821279078722, -0.1336551457643509, 0.013096146285533905, -0.3547099530696869, 0.09564703702926636, -0.2860805094242096, -0.18272152543067932, -0.2694423794746399, -0.08525945246219635, -0.08303387463092804, 0.007515390403568745, 0.036567408591508865, 0.06908964365720749, -0.3085603415966034, 0.18194183707237244, -0.36356741189956665, 0.16438321769237518, 0.15146854519844055, -0.14729860424995422, -0.42720380425453186, 0.007823370397090912, 0.05766160786151886, 0.015303581953048706, -0.040512919425964355, 0.23904623091220856, 0.6286557912826538, 0.04076961800456047, 0.10306578874588013, 0.2285546064376831, -0.1970318853855133, 0.27198678255081177, 0.33101147413253784, -0.14186939597129822, 0.22647391259670258, 0.0044239964336156845, -0.12670749425888062, 0.24631646275520325, 0.41115617752075195, -0.06005780026316643, 0.2025136649608612, 0.04874274134635925, -0.0015601962804794312, -0.13604092597961426, -0.04083793982863426, 0.35891225934028625, -0.1728651523590088, 0.008310750126838684, -0.6530926823616028, 0.22205859422683716, 0.3576480746269226, -0.1815079152584076, 0.7226052284240723, -0.007230609655380249, -0.1178562194108963, 0.38151198625564575, -0.09981461614370346, 1.0839067697525024, 0.05666015297174454, 0.14698615670204163, 0.1830812692642212, 0.04493149369955063, 0.07916805893182755, -0.06254715472459793, 0.257470965385437, -0.18250320851802826, -0.5199663639068604, 0.17256346344947815, -0.25863784551620483, 0.1509549468755722, -0.01975017786026001, -0.2885996103286743, 0.22321102023124695, 0.08819511532783508, -0.04522265866398811, -0.22660380601882935, 0.025286845862865448, -0.3053606152534485, -0.05736491456627846, -0.07781833410263062, 0.14469030499458313, 0.018636468797922134, 0.003322102129459381, -0.018824109807610512, 0.011327553540468216, -0.06923823058605194, -0.2780146300792694, -0.09840928763151169, 0.13220536708831787, -0.22281886637210846, 0.18976683914661407, -0.2956097424030304, 0.0582394152879715, 0.03068862110376358, -0.07676258683204651, -0.11133164167404175, 0.2837214171886444, -0.07941021770238876, 0.4060235023498535, 0.5098742842674255, 0.22480212152004242, 0.08270509541034698, 0.18294914066791534, 0.23285123705863953, 0.004879619926214218, -0.19082388281822205, 0.06593053042888641, -0.1313799023628235, -0.453376829624176, -0.11871512234210968, 0.030238203704357147, 0.21312452852725983, 0.1467338502407074, -0.3811911344528198, 0.24222280085086823, -0.37998875975608826, -0.20486362278461456, 0.17451292276382446, 0.10236581414937973, -0.12702186405658722, 0.46842965483665466, 0.03160375729203224, -0.24632766842842102, -0.016755472868680954, 0.4644200801849365, 0.03974417224526405, 0.21254652738571167, 0.472119003534317, -0.133016899228096, -0.14375028014183044, -0.3098311722278595, -0.3066732883453369, -0.03071216121315956, -0.2263922393321991, 0.18333445489406586, -0.031110921874642372, -0.3075297772884369, 0.09131170809268951, 0.2305920571088791, 0.11419538408517838, 0.41458752751350403, -0.14334264397621155, -0.23667533695697784, -0.379867821931839, 0.4347459673881531, -0.030917774885892868, 0.39976921677589417, -0.29190924763679504, 0.11684472858905792, -0.10299497097730637, 0.22209350764751434, -0.388245165348053, 0.0621829479932785, -0.094001904129982, 0.3419760763645172, -0.10912680625915527, -0.12846490740776062, 0.08387818187475204, -0.1945877969264984, 0.17245078086853027, 0.3311299681663513, -0.38680344820022583, -0.25475919246673584, 0.13035210967063904, 0.11556854099035263, 0.0742463767528534, 0.08590859919786453, -0.11146727949380875, -0.58256995677948, -0.10710421204566956, -0.2249586582183838, 0.1532941311597824, 0.10116473585367203, -0.09494329988956451, 0.2292371690273285, 0.41279926896095276, 0.0002143755555152893, 0.3605828285217285, 0.2648465633392334, -0.20137113332748413, -0.3913651704788208, -0.02885648049414158, -0.022695615887641907, -0.21450768411159515, -0.12465759366750717, -0.08700457960367203, -0.08552370220422745, -0.2674272060394287, 0.20914575457572937, 0.008030302822589874, 0.011077091097831726, -0.22235392034053802, -0.08928939700126648, 0.42026033997535706, 0.6356106996536255, -0.04350145533680916, -0.3844485580921173, 0.370919406414032, 0.26839157938957214, -0.3369070291519165, -0.17506928741931915, 0.039226140826940536, 0.24604064226150513, 0.2021847665309906, 0.012251675128936768, -0.10072040557861328, -0.21542713046073914, -0.18171800673007965, 0.26787424087524414, 0.22369515895843506, -0.6251196265220642, 0.21959815919399261, 0.10225500166416168, 0.00653495267033577, -0.15856479108333588, 0.1950758993625641, 0.23381038010120392, 0.29646891355514526, 0.38982903957366943, -0.0963079109787941, 0.32890617847442627, 0.46818432211875916, 0.0587381087243557, 0.10872672498226166, -0.23756656050682068, 0.12867893278598785, 0.5398039221763611, -0.07868896424770355, 0.28753218054771423, 0.25568699836730957, 0.33708885312080383, 0.06290167570114136, -0.11886294186115265, -0.18144004046916962, -0.05437422916293144, -0.17826217412948608, 0.0336604081094265, 0.20414935052394867, -0.2808975279331207, -0.07449197769165039, -0.09669414162635803, -0.0654534250497818, 0.18766659498214722, 0.6637606620788574, 0.11497555673122406, 0.05873744934797287, -0.3534992039203644, 0.2141943871974945, 0.12433299422264099, 0.2556314170360565, -0.2843037247657776, 0.1898604929447174, 0.13739196956157684, -0.04328110069036484, 0.3281441330909729, 0.24364537000656128, 0.1775015890598297, 0.3849615454673767, -0.21026434004306793, 0.1273869276046753, -0.03783460706472397, -0.12247028201818466, -0.2118443250656128, 0.3429829180240631, 0.42485082149505615, -0.1512327641248703, 0.19446957111358643, 0.17756621539592743, -0.19108548760414124, -0.020414452999830246, 0.1460622251033783, 0.1708226203918457, -0.17092393338680267, 0.1695919632911682, 0.19083163142204285, -0.12842491269111633, 0.03990276902914047, -0.07298564165830612, -0.4594971239566803, 0.017557239159941673, -0.1854105144739151, -0.24130740761756897, 0.044492363929748535, -0.04200172424316406, 0.09010771661996841, -0.09425829350948334, 0.3228234648704529, 0.12172526121139526, -0.07273667305707932, -0.17524942755699158, -0.2853662073612213, -0.8999345898628235, 0.21285349130630493, 0.06894539296627045, 0.08177598565816879, -0.14072245359420776, 0.4141227602958679, 0.060888469219207764, -0.20426660776138306, 0.11646687984466553, -0.0787607729434967, -0.05352374538779259, 0.2270147055387497, -0.4681156873703003, 0.10608354210853577, -0.08315329253673553, -0.07970963418483734, 0.14059652388095856, -0.2543369233608246, 0.03372057527303696, -0.0785127729177475, 0.055750660598278046, 0.05330999940633774, -0.019188720732927322, 0.02176428958773613, 0.34503957629203796, 0.48774781823158264, 0.015372062101960182, 0.24862943589687347, -0.11033831536769867, 0.07119694352149963, -0.27496376633644104, -0.2630707025527954, 0.04764322191476822, -0.2343216836452484, 0.14613237977027893, 0.4901234805583954, -0.11514129489660263, -0.15584824979305267, -0.23555947840213776, 0.29685014486312866, -0.24191322922706604, 0.10620123147964478, -0.30292606353759766, 0.2135644406080246, 0.07514107972383499, 0.3843674063682556, -0.32152190804481506, -0.013581030070781708, -0.07000528275966644, 0.0796155035495758, -0.27338069677352905, -0.3939667344093323, 0.789016842842102, -0.2005455493927002, -0.23816722631454468, -0.13278822600841522, 0.5532751083374023, -0.003361418843269348, -0.4281310737133026, -0.32540982961654663, -0.005857832729816437, 0.10681455582380295, 0.003321763128042221, -0.23884810507297516, 0.09156645834445953, -0.36294764280319214, 0.08317787945270538, -0.08046691119670868, 0.6088454723358154, -0.09734424203634262, -0.26831549406051636, 0.08872859179973602, -0.2417256385087967 ]
https://github.com/huggingface/datasets/issues/511
dataset.shuffle() and select() resets format. Intended?
Hi @vegarab yes feel free to open a discussion here. This design choice was not very much thought about. Since `dataset.select()` (like all the method without a trailing underscore) is non-destructive and returns a new dataset it has most of its properties initialized from scratch (except the table and infos). Thinking about it I don't see a strong reason against transmitting the format from the parent dataset to its newly created child. It's probably what's expected by the user in most cases. What do you think @lhoestq? By the way, I've been working today on a refactoring of all the samples re-ordering/selection methods (`select`, `sort`, `shuffle`, `shard`, `train_test_split`). The idea is to speed them up by a lot (like, really a lot) by working as much as possible with an indices mapping table instead of doing a deep copy of the full dataset as we've been doing currently. You can give it a look and try it here: https://github.com/huggingface/nlp/pull/513 Feedbacks are very much welcome
Calling `dataset.shuffle()` or `dataset.select()` on a dataset resets its format set by `dataset.set_format()`. Is this intended or an oversight? When working on quite large datasets that require a lot of preprocessing I find it convenient to save the processed dataset to file using `torch.save("dataset.pt")`. Later loading the dataset object using `torch.load("dataset.pt")`, which conserves the defined format before saving. I do shuffling and selecting (for controlling dataset size) after loading the data from .pt-file, as it's convenient whenever you train multiple models with varying sizes of the same dataset. The obvious workaround for this is to set the format again after using `dataset.select()` or `dataset.shuffle()`. _I guess this is more of a discussion on the design philosophy of the functions. Please let me know if this is not the right channel for these kinds of discussions or if they are not wanted at all!_ #### How to reproduce: ```python import nlp from transformers import T5Tokenizer tokenizer = T5Tokenizer.from_pretrained("t5-base") def create_features(batch): context_encoding = tokenizer.batch_encode_plus(batch["context"]) return {"input_ids": context_encoding["input_ids"]} dataset = nlp.load_dataset("cosmos_qa", split="train") dataset = dataset.map(create_features, batched=True) dataset.set_format(type="torch", columns=["input_ids"]) dataset[0] # {'input_ids': tensor([ 1804, 3525, 1602, ... 0, 0])} dataset = dataset.shuffle() dataset[0] # {'id': '3Q9(...)20', 'context': "Good Old War an (...) play ?', 'answer0': 'None of the above choices .', 'answer1': 'This person likes music and likes to see the show , they will see other bands play .', (...) 'input_ids': [1804, 3525, 1602, ... , 0, 0]} ```
164
dataset.shuffle() and select() resets format. Intended? Calling `dataset.shuffle()` or `dataset.select()` on a dataset resets its format set by `dataset.set_format()`. Is this intended or an oversight? When working on quite large datasets that require a lot of preprocessing I find it convenient to save the processed dataset to file using `torch.save("dataset.pt")`. Later loading the dataset object using `torch.load("dataset.pt")`, which conserves the defined format before saving. I do shuffling and selecting (for controlling dataset size) after loading the data from .pt-file, as it's convenient whenever you train multiple models with varying sizes of the same dataset. The obvious workaround for this is to set the format again after using `dataset.select()` or `dataset.shuffle()`. _I guess this is more of a discussion on the design philosophy of the functions. Please let me know if this is not the right channel for these kinds of discussions or if they are not wanted at all!_ #### How to reproduce: ```python import nlp from transformers import T5Tokenizer tokenizer = T5Tokenizer.from_pretrained("t5-base") def create_features(batch): context_encoding = tokenizer.batch_encode_plus(batch["context"]) return {"input_ids": context_encoding["input_ids"]} dataset = nlp.load_dataset("cosmos_qa", split="train") dataset = dataset.map(create_features, batched=True) dataset.set_format(type="torch", columns=["input_ids"]) dataset[0] # {'input_ids': tensor([ 1804, 3525, 1602, ... 0, 0])} dataset = dataset.shuffle() dataset[0] # {'id': '3Q9(...)20', 'context': "Good Old War an (...) play ?', 'answer0': 'None of the above choices .', 'answer1': 'This person likes music and likes to see the show , they will see other bands play .', (...) 'input_ids': [1804, 3525, 1602, ... , 0, 0]} ``` Hi @vegarab yes feel free to open a discussion here. This design choice was not very much thought about. Since `dataset.select()` (like all the method without a trailing underscore) is non-destructive and returns a new dataset it has most of its properties initialized from scratch (except the table and infos). Thinking about it I don't see a strong reason against transmitting the format from the parent dataset to its newly created child. It's probably what's expected by the user in most cases. What do you think @lhoestq? By the way, I've been working today on a refactoring of all the samples re-ordering/selection methods (`select`, `sort`, `shuffle`, `shard`, `train_test_split`). The idea is to speed them up by a lot (like, really a lot) by working as much as possible with an indices mapping table instead of doing a deep copy of the full dataset as we've been doing currently. You can give it a look and try it here: https://github.com/huggingface/nlp/pull/513 Feedbacks are very much welcome
[ -0.1382129192352295, -0.2247210144996643, 0.023964356631040573, 0.24767443537712097, 0.12811952829360962, -0.13620126247406006, 0.20321261882781982, 0.0824570432305336, -0.6032925248146057, -0.0022733956575393677, -0.28427189588546753, 0.32275083661079407, -0.19512322545051575, 0.17383132874965668, 0.13989876210689545, -0.14475232362747192, 0.11455860733985901, 0.20896661281585693, -0.04358014464378357, -0.11561089754104614, -0.15637893974781036, -0.2866489887237549, -0.2859775424003601, -0.06061650812625885, -0.4345378577709198, 0.026099953800439835, 0.005006430670619011, 0.1479000449180603, -0.0802036002278328, 0.07603524625301361, 0.044232502579689026, 0.2561853528022766, -0.19872494041919708, 0.5789400935173035, -0.00012897230044472963, -0.16552969813346863, 0.0554003082215786, -0.2835806906223297, -0.2924961447715759, 0.05556783080101013, -0.059529729187488556, 0.24505391716957092, 0.033568188548088074, -0.17916834354400635, 0.09662730246782303, -0.3774503767490387, -0.09206236153841019, -0.11476931720972061, 0.18904656171798706, 0.1550751030445099, 0.07984378933906555, 0.33684593439102173, -0.24911315739154816, 0.24383939802646637, 0.37458720803260803, 0.5576680898666382, -0.1313132345676422, 0.20562011003494263, 0.10186710208654404, 0.35481542348861694, 0.4095388352870941, 0.12682189047336578, -0.29001620411872864, -0.24198953807353973, 0.28389883041381836, 0.01421756949275732, -0.24832364916801453, -0.27838271856307983, 0.16920259594917297, 0.07647638022899628, 0.7366983890533447, -0.5577982664108276, -0.11404404789209366, -0.4305652379989624, 0.1685487926006317, -0.39026686549186707, 0.07195166498422623, 0.15496081113815308, 0.09294964373111725, -0.011897087097167969, -0.41191548109054565, -0.09447924792766571, 0.13514789938926697, 0.07512079924345016, 0.21187978982925415, 0.2510286569595337, -0.12628163397312164, 0.2214885652065277, -0.2606823146343231, 0.3279380202293396, 0.24813209474086761, -0.3805217742919922, -0.00022552534937858582, -0.030866973102092743, -0.18490856885910034, -0.094518281519413, -0.043381109833717346, 0.0452786386013031, -0.07049177587032318, 0.37312108278274536, 0.5257023572921753, 0.21776553988456726, -0.1684393286705017, 0.11709743738174438, 0.3756837546825409, 0.16489233076572418, 0.15346293151378632, 0.06236723065376282, 0.042403705418109894, -0.30421704053878784, 0.039101939648389816, 0.011079024523496628, 0.2551570534706116, -0.0433041974902153, 0.37668725848197937, -0.034626662731170654, -0.04035550355911255, -0.1273491531610489, -0.02188270166516304, 0.06628651916980743, -0.2807995676994324, -0.3609567880630493, -0.14094364643096924, 0.11199642717838287, 0.027599647641181946, 0.33461305499076843, -0.2615432143211365, 0.200347438454628, -0.3364674150943756, 0.06723678112030029, -0.15362510085105896, -0.10033741593360901, -0.23053812980651855, 0.12306053191423416, 0.17794561386108398, -0.34176328778266907, 0.22913430631160736, 0.08579511195421219, -0.05531853437423706, 0.0410853773355484, 0.18373781442642212, -0.37577131390571594, 0.4564959406852722, 0.2302488088607788, -0.17371134459972382, 0.19370409846305847, 0.05660220608115196, 0.2335437685251236, -0.25585874915122986, 0.49783653020858765, -0.24115607142448425, -0.20498761534690857, 0.23119013011455536, 0.0342094823718071, -0.15434348583221436, -0.022870168089866638, -0.2087959349155426, 0.1444377601146698, 0.44773030281066895, -0.3578270971775055, 0.20716550946235657, -0.5868678092956543, -0.22728300094604492, -0.46262797713279724, 0.028632907196879387, 0.20168709754943848, -0.3084814250469208, -0.0998903214931488, 0.5335572361946106, -0.12908707559108734, 0.22925132513046265, 0.2242172509431839, -0.35004186630249023, 0.396857887506485, -0.15442538261413574, -0.0633985698223114, 0.5925040245056152, 0.06990711390972137, -0.2872908413410187, -0.34885120391845703, -0.07918932288885117, 0.35778021812438965, -0.11156240850687027, 0.15252214670181274, -0.17496076226234436, -0.0800713524222374, 0.20180706679821014, 0.11498546600341797, -0.056988850235939026, 0.11312643438577652, -0.20521993935108185, 0.031109994277358055, 0.47395384311676025, 0.11602556705474854, -0.08591459691524506, -0.009483478963375092, -0.07618475705385208, 0.15894417464733124, 0.18879972398281097, -0.029502328485250473, -0.23515333235263824, 0.04994780570268631, -0.11331579089164734, 0.18671324849128723, -0.015464697033166885, -0.18546730279922485, -0.22540363669395447, -0.15268245339393616, 0.1799505650997162, -0.30409443378448486, 0.3576212525367737, 0.039109356701374054, 0.010645370930433273, -0.33286863565444946, -0.4570801556110382, -0.39311322569847107, -0.04994498938322067, 0.406503289937973, 0.04904830828309059, 0.11866891384124756, -0.3195296823978424, 0.061447396874427795, -0.2063674032688141, -0.00839910376816988, -0.41157323122024536, 0.1248532384634018, 0.1170983761548996, -0.21234357357025146, -0.3896258771419525, 0.12420783191919327, -0.12434554845094681, -0.085783451795578, -0.21295136213302612, 0.3616212010383606, 0.14429925382137299, -0.2647685408592224, -0.3784198462963104, 0.401024729013443, 0.1274128556251526, 0.20651784539222717, 0.13458497822284698, -0.18959863483905792, 0.3265336751937866, -0.19155877828598022, -0.2690972685813904, 0.3493046760559082, -0.6575782895088196, -0.18025878071784973, -0.1800183355808258, -0.6270246505737305, -0.039362069219350815, 0.24368467926979065, -0.3853665292263031, 0.04598408192396164, 0.05316511169075966, 0.3270129859447479, 0.19386576116085052, 0.3799911141395569, -0.5700510740280151, -0.04765384644269943, 0.7285062670707703, -0.22127173840999603, 0.05534052476286888, 0.05336381122469902, -0.17174530029296875, -0.35056567192077637, -0.18459488451480865, -0.020324744284152985, 0.7820939421653748, -0.015364018268883228, -0.03673764690756798, 0.05539383366703987, 0.08145565539598465, -0.3519116938114166, 0.09552691876888275, 0.24915023148059845, 0.006955967750400305, 0.44111478328704834, 0.357519268989563, 0.11176347732543945, -0.4882299602031708, 0.13028015196323395, 0.16376937925815582, -0.08035566657781601, -0.3349169194698334, 0.09440615773200989, -0.15565402805805206, 0.05963169038295746, -0.37720537185668945, -0.025495927780866623, 0.04466971382498741, -0.05999884754419327, -0.0811634287238121, 0.0489465706050396, 0.10023055970668793, -0.06275998800992966, 0.2464337944984436, 0.22445084154605865, -0.017559368163347244, -0.3098866045475006, 0.31089964509010315, -0.07125835865736008, -0.19934207201004028, -0.11472746729850769, 0.012394783087074757, -0.029599450528621674, 0.3543703854084015, -0.055891506373882294, -0.20557424426078796, -0.13918709754943848, -0.19546157121658325, 0.2927089333534241, -0.0928986668586731, -0.0006677489727735519, 0.019367218017578125, -0.03504125773906708, 0.014271397143602371, -0.19803810119628906, 0.10207385569810867, 0.11471541225910187, 0.19757254421710968, 0.0408131442964077, 0.17961964011192322, 0.13454365730285645, -0.19932304322719574, -0.2912905216217041, -0.03133871406316757, 0.08816547691822052, 0.21626247465610504, -0.16745612025260925, -0.013982735574245453, 0.46590834856033325, -0.08459020406007767, -0.1470181792974472, -0.666682243347168, 0.10766597092151642, -0.36958083510398865, -0.520880401134491, 0.12932899594306946, -0.05557609722018242, -0.21379728615283966, -0.26520904898643494, 0.1450389176607132, -0.05729183182120323, 0.5463917851448059, -0.23820804059505463, -0.19538697600364685, -0.1374090015888214, -0.06486200541257858, -0.06913000345230103, 0.4167661666870117, 0.3020016551017761, 0.05715690180659294, 0.19458523392677307, 0.03851694613695145, -0.04340371862053871, 0.14146772027015686, 0.37477466464042664, 0.07985247671604156, 0.09517372399568558, 0.19100463390350342, -0.017864733934402466, 0.5995129346847534, -0.19912774860858917, -0.16133375465869904, 0.13480690121650696, 0.17958268523216248, 0.38828548789024353, -0.4722309410572052, -0.10417845845222473, 0.4822196066379547, -0.051631033420562744, -0.09032448381185532, 0.2900758385658264, -0.2437635064125061, 0.015319672413170338, -0.11817027628421783, 0.15897223353385925, -0.28773418068885803, -0.2249058037996292, 0.4279423654079437, -0.004232775419950485, 0.21488744020462036, 0.09032195806503296, 0.35071730613708496, -0.10937617719173431, 0.05329831317067146, -0.15508562326431274, 0.14168131351470947, 0.40430155396461487, 0.000788610428571701, -0.5444190502166748, -0.2212269902229309, -0.1243484690785408, 0.008922092616558075, 0.11232131719589233, 0.53174889087677, 0.03066498413681984, -0.1736355721950531, 0.17701002955436707, 0.26566147804260254, 0.5368549227714539, -0.08874908089637756, -0.05829859524965286, 0.17312075197696686, -0.3876769244670868, -0.14655500650405884, -0.31784188747406006, -0.21313367784023285, 0.06772669404745102, -0.25107085704803467, 0.2636963725090027, -0.20300942659378052, -0.01407280657440424, -0.07448194921016693, 0.4079805612564087, -0.11855441331863403, 0.034083299338817596, -0.09524945914745331, -0.008302796632051468, -0.14667730033397675, 0.044027913361787796, -0.19547352194786072, -0.17438539862632751, -0.3775613307952881, 0.3725060224533081, -0.0666094571352005, 0.2309618890285492, -0.03524331748485565, -0.13758082687854767, 0.2652429938316345, 0.13893093168735504, -0.10373476147651672, 0.10864770412445068, 0.0686233639717102, 0.06773503124713898, 0.09913793951272964, -0.050038937479257584, -0.021467290818691254, 0.294016569852829, -0.3436627984046936, 0.15444201231002808, 0.46938782930374146, 0.062310606241226196, 0.03374958783388138, -0.42049068212509155, 0.0856410339474678, -0.23206278681755066, 0.07239366322755814, 0.34790608286857605, -0.08063213527202606, -0.2999899089336395, -1.0697360038757324, 0.24514305591583252, 0.18150584399700165, 0.03470426797866821, 0.1759735643863678, -0.21919812262058258, -0.04219014197587967, 0.2608640193939209, 0.15438547730445862, 1.0892904996871948, -0.05072551220655441, 0.5218439102172852, 0.3229363262653351, -0.07319463789463043, 0.38199087977409363, -0.34161055088043213, 0.1129661425948143, -0.24471545219421387, -0.44245871901512146, 0.0531475692987442, -0.28463536500930786, -0.007202401757240295, 0.007823381572961807, -0.13674238324165344, 0.323406845331192, -0.2796400189399719, -0.052400704473257065, -0.025283245369791985, 0.03405645489692688, -0.1102767363190651, -0.09481526911258698, -0.06336752325296402, -0.0598193034529686, -0.1997707039117813, 0.18121753633022308, -0.07177199423313141, 0.11819393187761307, -0.11086060106754303, 0.029804587364196777, -0.04482174664735794, -0.16661471128463745, -0.05123583599925041, 0.009282824583351612, -0.33411550521850586, -0.6155840158462524, 0.28361281752586365, 0.34021100401878357, 0.09963926672935486, 0.17926602065563202, 0.05344250053167343, 0.08369481563568115, 0.24518215656280518, 0.41680651903152466, -0.0029483840335160494, -0.05210866406559944, 0.4235520362854004, 0.06524849683046341, 0.06779306381940842, 0.25248876214027405, -0.019038861617445946, -0.09698253870010376, -0.8286112546920776, 0.17091262340545654, 0.37919437885284424, -0.24731211364269257, -0.44412872195243835, 0.05428220331668854, -0.002344854176044464, 0.026549112051725388, -0.04083532467484474, 0.18201100826263428, 0.17407742142677307, 0.43151217699050903, -0.22566278278827667, -0.415462851524353, -0.19957762956619263, 0.2852526009082794, 0.20039331912994385, -0.04522677883505821, 0.4193187355995178, -0.05192812159657478, -0.20080451667308807, -0.05273608863353729, 0.23712441325187683, -0.09742987155914307, -0.454271137714386, -0.10128816962242126, -0.08410033583641052, 0.1255539506673813, -0.01900652050971985, 0.2705143094062805, -0.24727870523929596, 0.06370849162340164, -0.20918980240821838, -0.0291786789894104, 0.10381168872117996, 0.017678339034318924, 0.427717924118042, 0.34376952052116394, 0.3647260367870331, 0.3129187524318695, 0.015242313966155052, -0.056485481560230255, -0.13059039413928986, 0.029776334762573242, 0.32411423325538635, 0.3977797031402588, 0.01836409792304039, 0.0064169615507125854, -0.3131088316440582, -0.06049337610602379, -0.11093776673078537, 0.14403456449508667, -0.11407138407230377, -0.0874803215265274, -0.15205736458301544, 0.23002666234970093, 0.07486112415790558, -0.0025268709287047386, -0.1695275604724884, -0.1676243096590042, -0.17427608370780945, -0.239664226770401, 0.2976011037826538, 0.2611991763114929, 0.02102433517575264, 0.12576618790626526, 0.4362260699272156, 0.028532609343528748, 0.16226662695407867, 0.19042113423347473, -0.15896496176719666, -0.2615155577659607, 0.12345445156097412, 0.01647842302918434, -0.2788669168949127, -0.05190727859735489, -0.5990060567855835, 0.14335006475448608, 0.21411511301994324, 0.38008442521095276, 0.012301865965127945, -0.3274235725402832, 0.33178436756134033, -0.1678723394870758, 0.4022532105445862, 0.5396653413772583, 0.0275576114654541, -0.4948888123035431, 0.2594496011734009, -0.07203146070241928, 0.22534140944480896, -0.14198291301727295, -0.03956430032849312, 0.18178749084472656, -0.11395317316055298, 0.1323438584804535, -0.15845562517642975, 0.3500945568084717, -0.5146563649177551, -0.09928854554891586, 0.1379048377275467, -0.16130390763282776, 0.22361750900745392, 0.4979381263256073, 0.04659806564450264, -0.06681768596172333, 0.18280832469463348, -0.07711386680603027, -0.14453217387199402, 0.2808186113834381, 0.730118453502655, 0.5393797755241394, 0.4825180470943451, 0.039552729576826096, -0.06726451963186264, -0.46975407004356384, -0.2155255526304245, 0.19769524037837982, 0.03753289580345154, 0.5161759853363037, 0.22811652719974518, 0.046341948211193085, 0.11341968923807144, -0.07995983213186264, 0.12704595923423767, 0.3366575539112091, -0.12231945246458054, -0.04207288846373558, 0.21046987175941467, -0.3991292417049408, 0.08121202886104584, 0.14848338067531586, -0.42710381746292114, 0.2103961855173111, 0.1051129624247551, 0.1707056760787964, -0.18567688763141632, -0.11141744256019592, 0.2426234483718872, -0.13666817545890808, 0.12848880887031555, -0.10801931470632553, -0.05541207641363144, 0.17677757143974304, 0.02713223546743393, 0.18982051312923431, 0.12851373851299286, -0.05137176439166069, 0.3518342673778534, -0.14665630459785461, 0.05710545554757118, -0.10327792167663574, 0.1627277284860611, 0.02708936110138893, 0.09426119923591614, 0.3115413784980774, -0.3098685145378113, 0.492308109998703, 0.061840735375881195, -0.01264030672609806, -0.1264343410730362, 0.34088554978370667, 0.21790216863155365, -0.5887749195098877, -0.027243278920650482, 0.13982543349266052, 0.059310294687747955, 0.09648924320936203, 0.10668155550956726, -0.4906991720199585, 0.03797999396920204, 0.014747386798262596, 0.4293687641620636, 0.18357521295547485, -0.008562126196920872, -0.006523050367832184, 0.10725806653499603, 0.43536633253097534, 0.08265510946512222, -0.15522241592407227, -0.047448400408029556, 0.025912106037139893, -0.428496778011322, 0.050652794539928436, 0.3247937262058258, 0.12122604250907898, 0.24925270676612854, -0.11007143557071686, 0.2826691269874573, 0.13805025815963745, -0.17088989913463593, 0.21736860275268555, -0.002011612057685852, 0.43301695585250854, -0.30537909269332886, -0.08730939030647278, -0.41097062826156616, 0.17813539505004883, -0.1709604412317276, -0.1909293830394745, 0.12010040879249573, 0.10291633754968643, 0.02816971391439438, -0.2006624937057495, -0.13501477241516113, -0.014714266173541546, 0.31948402523994446, 0.21519134938716888, 0.07097267359495163, 0.275259792804718, 0.014904007315635681, 0.013969054445624352, -0.1395517736673355, 0.08658897876739502, -0.008438652381300926, 0.21011671423912048, -0.21705079078674316, 0.3956209719181061, -0.15717217326164246, 0.18088388442993164, -0.31531423330307007, 0.2677328884601593, -0.17867319285869598, 0.20129601657390594, -0.29495537281036377, -0.06183319538831711, 0.3227122724056244, 0.04214216768741608, 0.08046294003725052, 0.5686165690422058, -0.018175415694713593, 0.2659771144390106, -0.27915823459625244, 0.29633206129074097, 0.49348315596580505, 0.13304074108600616, -0.22015801072120667, -0.21622183918952942, -0.026843339204788208, 0.13144326210021973, 0.06208476424217224, -0.309726357460022, 0.005293220281600952, 0.21255402266979218, -0.23436927795410156, -0.33160361647605896, 0.20537304878234863, -0.054333847016096115, -0.26185885071754456, -0.12505970895290375, 0.5423792600631714, -0.05477908253669739, -0.09493109583854675, -0.043653350323438644, -0.03871094807982445 ]
https://github.com/huggingface/datasets/issues/511
dataset.shuffle() and select() resets format. Intended?
I think it's ok to keep the format. If we want to have this behavior for `.map` too we just have to make sure it doesn't keep a column that's been removed.
Calling `dataset.shuffle()` or `dataset.select()` on a dataset resets its format set by `dataset.set_format()`. Is this intended or an oversight? When working on quite large datasets that require a lot of preprocessing I find it convenient to save the processed dataset to file using `torch.save("dataset.pt")`. Later loading the dataset object using `torch.load("dataset.pt")`, which conserves the defined format before saving. I do shuffling and selecting (for controlling dataset size) after loading the data from .pt-file, as it's convenient whenever you train multiple models with varying sizes of the same dataset. The obvious workaround for this is to set the format again after using `dataset.select()` or `dataset.shuffle()`. _I guess this is more of a discussion on the design philosophy of the functions. Please let me know if this is not the right channel for these kinds of discussions or if they are not wanted at all!_ #### How to reproduce: ```python import nlp from transformers import T5Tokenizer tokenizer = T5Tokenizer.from_pretrained("t5-base") def create_features(batch): context_encoding = tokenizer.batch_encode_plus(batch["context"]) return {"input_ids": context_encoding["input_ids"]} dataset = nlp.load_dataset("cosmos_qa", split="train") dataset = dataset.map(create_features, batched=True) dataset.set_format(type="torch", columns=["input_ids"]) dataset[0] # {'input_ids': tensor([ 1804, 3525, 1602, ... 0, 0])} dataset = dataset.shuffle() dataset[0] # {'id': '3Q9(...)20', 'context': "Good Old War an (...) play ?', 'answer0': 'None of the above choices .', 'answer1': 'This person likes music and likes to see the show , they will see other bands play .', (...) 'input_ids': [1804, 3525, 1602, ... , 0, 0]} ```
32
dataset.shuffle() and select() resets format. Intended? Calling `dataset.shuffle()` or `dataset.select()` on a dataset resets its format set by `dataset.set_format()`. Is this intended or an oversight? When working on quite large datasets that require a lot of preprocessing I find it convenient to save the processed dataset to file using `torch.save("dataset.pt")`. Later loading the dataset object using `torch.load("dataset.pt")`, which conserves the defined format before saving. I do shuffling and selecting (for controlling dataset size) after loading the data from .pt-file, as it's convenient whenever you train multiple models with varying sizes of the same dataset. The obvious workaround for this is to set the format again after using `dataset.select()` or `dataset.shuffle()`. _I guess this is more of a discussion on the design philosophy of the functions. Please let me know if this is not the right channel for these kinds of discussions or if they are not wanted at all!_ #### How to reproduce: ```python import nlp from transformers import T5Tokenizer tokenizer = T5Tokenizer.from_pretrained("t5-base") def create_features(batch): context_encoding = tokenizer.batch_encode_plus(batch["context"]) return {"input_ids": context_encoding["input_ids"]} dataset = nlp.load_dataset("cosmos_qa", split="train") dataset = dataset.map(create_features, batched=True) dataset.set_format(type="torch", columns=["input_ids"]) dataset[0] # {'input_ids': tensor([ 1804, 3525, 1602, ... 0, 0])} dataset = dataset.shuffle() dataset[0] # {'id': '3Q9(...)20', 'context': "Good Old War an (...) play ?', 'answer0': 'None of the above choices .', 'answer1': 'This person likes music and likes to see the show , they will see other bands play .', (...) 'input_ids': [1804, 3525, 1602, ... , 0, 0]} ``` I think it's ok to keep the format. If we want to have this behavior for `.map` too we just have to make sure it doesn't keep a column that's been removed.
[ -0.1382129192352295, -0.2247210144996643, 0.023964356631040573, 0.24767443537712097, 0.12811952829360962, -0.13620126247406006, 0.20321261882781982, 0.0824570432305336, -0.6032925248146057, -0.0022733956575393677, -0.28427189588546753, 0.32275083661079407, -0.19512322545051575, 0.17383132874965668, 0.13989876210689545, -0.14475232362747192, 0.11455860733985901, 0.20896661281585693, -0.04358014464378357, -0.11561089754104614, -0.15637893974781036, -0.2866489887237549, -0.2859775424003601, -0.06061650812625885, -0.4345378577709198, 0.026099953800439835, 0.005006430670619011, 0.1479000449180603, -0.0802036002278328, 0.07603524625301361, 0.044232502579689026, 0.2561853528022766, -0.19872494041919708, 0.5789400935173035, -0.00012897230044472963, -0.16552969813346863, 0.0554003082215786, -0.2835806906223297, -0.2924961447715759, 0.05556783080101013, -0.059529729187488556, 0.24505391716957092, 0.033568188548088074, -0.17916834354400635, 0.09662730246782303, -0.3774503767490387, -0.09206236153841019, -0.11476931720972061, 0.18904656171798706, 0.1550751030445099, 0.07984378933906555, 0.33684593439102173, -0.24911315739154816, 0.24383939802646637, 0.37458720803260803, 0.5576680898666382, -0.1313132345676422, 0.20562011003494263, 0.10186710208654404, 0.35481542348861694, 0.4095388352870941, 0.12682189047336578, -0.29001620411872864, -0.24198953807353973, 0.28389883041381836, 0.01421756949275732, -0.24832364916801453, -0.27838271856307983, 0.16920259594917297, 0.07647638022899628, 0.7366983890533447, -0.5577982664108276, -0.11404404789209366, -0.4305652379989624, 0.1685487926006317, -0.39026686549186707, 0.07195166498422623, 0.15496081113815308, 0.09294964373111725, -0.011897087097167969, -0.41191548109054565, -0.09447924792766571, 0.13514789938926697, 0.07512079924345016, 0.21187978982925415, 0.2510286569595337, -0.12628163397312164, 0.2214885652065277, -0.2606823146343231, 0.3279380202293396, 0.24813209474086761, -0.3805217742919922, -0.00022552534937858582, -0.030866973102092743, -0.18490856885910034, -0.094518281519413, -0.043381109833717346, 0.0452786386013031, -0.07049177587032318, 0.37312108278274536, 0.5257023572921753, 0.21776553988456726, -0.1684393286705017, 0.11709743738174438, 0.3756837546825409, 0.16489233076572418, 0.15346293151378632, 0.06236723065376282, 0.042403705418109894, -0.30421704053878784, 0.039101939648389816, 0.011079024523496628, 0.2551570534706116, -0.0433041974902153, 0.37668725848197937, -0.034626662731170654, -0.04035550355911255, -0.1273491531610489, -0.02188270166516304, 0.06628651916980743, -0.2807995676994324, -0.3609567880630493, -0.14094364643096924, 0.11199642717838287, 0.027599647641181946, 0.33461305499076843, -0.2615432143211365, 0.200347438454628, -0.3364674150943756, 0.06723678112030029, -0.15362510085105896, -0.10033741593360901, -0.23053812980651855, 0.12306053191423416, 0.17794561386108398, -0.34176328778266907, 0.22913430631160736, 0.08579511195421219, -0.05531853437423706, 0.0410853773355484, 0.18373781442642212, -0.37577131390571594, 0.4564959406852722, 0.2302488088607788, -0.17371134459972382, 0.19370409846305847, 0.05660220608115196, 0.2335437685251236, -0.25585874915122986, 0.49783653020858765, -0.24115607142448425, -0.20498761534690857, 0.23119013011455536, 0.0342094823718071, -0.15434348583221436, -0.022870168089866638, -0.2087959349155426, 0.1444377601146698, 0.44773030281066895, -0.3578270971775055, 0.20716550946235657, -0.5868678092956543, -0.22728300094604492, -0.46262797713279724, 0.028632907196879387, 0.20168709754943848, -0.3084814250469208, -0.0998903214931488, 0.5335572361946106, -0.12908707559108734, 0.22925132513046265, 0.2242172509431839, -0.35004186630249023, 0.396857887506485, -0.15442538261413574, -0.0633985698223114, 0.5925040245056152, 0.06990711390972137, -0.2872908413410187, -0.34885120391845703, -0.07918932288885117, 0.35778021812438965, -0.11156240850687027, 0.15252214670181274, -0.17496076226234436, -0.0800713524222374, 0.20180706679821014, 0.11498546600341797, -0.056988850235939026, 0.11312643438577652, -0.20521993935108185, 0.031109994277358055, 0.47395384311676025, 0.11602556705474854, -0.08591459691524506, -0.009483478963375092, -0.07618475705385208, 0.15894417464733124, 0.18879972398281097, -0.029502328485250473, -0.23515333235263824, 0.04994780570268631, -0.11331579089164734, 0.18671324849128723, -0.015464697033166885, -0.18546730279922485, -0.22540363669395447, -0.15268245339393616, 0.1799505650997162, -0.30409443378448486, 0.3576212525367737, 0.039109356701374054, 0.010645370930433273, -0.33286863565444946, -0.4570801556110382, -0.39311322569847107, -0.04994498938322067, 0.406503289937973, 0.04904830828309059, 0.11866891384124756, -0.3195296823978424, 0.061447396874427795, -0.2063674032688141, -0.00839910376816988, -0.41157323122024536, 0.1248532384634018, 0.1170983761548996, -0.21234357357025146, -0.3896258771419525, 0.12420783191919327, -0.12434554845094681, -0.085783451795578, -0.21295136213302612, 0.3616212010383606, 0.14429925382137299, -0.2647685408592224, -0.3784198462963104, 0.401024729013443, 0.1274128556251526, 0.20651784539222717, 0.13458497822284698, -0.18959863483905792, 0.3265336751937866, -0.19155877828598022, -0.2690972685813904, 0.3493046760559082, -0.6575782895088196, -0.18025878071784973, -0.1800183355808258, -0.6270246505737305, -0.039362069219350815, 0.24368467926979065, -0.3853665292263031, 0.04598408192396164, 0.05316511169075966, 0.3270129859447479, 0.19386576116085052, 0.3799911141395569, -0.5700510740280151, -0.04765384644269943, 0.7285062670707703, -0.22127173840999603, 0.05534052476286888, 0.05336381122469902, -0.17174530029296875, -0.35056567192077637, -0.18459488451480865, -0.020324744284152985, 0.7820939421653748, -0.015364018268883228, -0.03673764690756798, 0.05539383366703987, 0.08145565539598465, -0.3519116938114166, 0.09552691876888275, 0.24915023148059845, 0.006955967750400305, 0.44111478328704834, 0.357519268989563, 0.11176347732543945, -0.4882299602031708, 0.13028015196323395, 0.16376937925815582, -0.08035566657781601, -0.3349169194698334, 0.09440615773200989, -0.15565402805805206, 0.05963169038295746, -0.37720537185668945, -0.025495927780866623, 0.04466971382498741, -0.05999884754419327, -0.0811634287238121, 0.0489465706050396, 0.10023055970668793, -0.06275998800992966, 0.2464337944984436, 0.22445084154605865, -0.017559368163347244, -0.3098866045475006, 0.31089964509010315, -0.07125835865736008, -0.19934207201004028, -0.11472746729850769, 0.012394783087074757, -0.029599450528621674, 0.3543703854084015, -0.055891506373882294, -0.20557424426078796, -0.13918709754943848, -0.19546157121658325, 0.2927089333534241, -0.0928986668586731, -0.0006677489727735519, 0.019367218017578125, -0.03504125773906708, 0.014271397143602371, -0.19803810119628906, 0.10207385569810867, 0.11471541225910187, 0.19757254421710968, 0.0408131442964077, 0.17961964011192322, 0.13454365730285645, -0.19932304322719574, -0.2912905216217041, -0.03133871406316757, 0.08816547691822052, 0.21626247465610504, -0.16745612025260925, -0.013982735574245453, 0.46590834856033325, -0.08459020406007767, -0.1470181792974472, -0.666682243347168, 0.10766597092151642, -0.36958083510398865, -0.520880401134491, 0.12932899594306946, -0.05557609722018242, -0.21379728615283966, -0.26520904898643494, 0.1450389176607132, -0.05729183182120323, 0.5463917851448059, -0.23820804059505463, -0.19538697600364685, -0.1374090015888214, -0.06486200541257858, -0.06913000345230103, 0.4167661666870117, 0.3020016551017761, 0.05715690180659294, 0.19458523392677307, 0.03851694613695145, -0.04340371862053871, 0.14146772027015686, 0.37477466464042664, 0.07985247671604156, 0.09517372399568558, 0.19100463390350342, -0.017864733934402466, 0.5995129346847534, -0.19912774860858917, -0.16133375465869904, 0.13480690121650696, 0.17958268523216248, 0.38828548789024353, -0.4722309410572052, -0.10417845845222473, 0.4822196066379547, -0.051631033420562744, -0.09032448381185532, 0.2900758385658264, -0.2437635064125061, 0.015319672413170338, -0.11817027628421783, 0.15897223353385925, -0.28773418068885803, -0.2249058037996292, 0.4279423654079437, -0.004232775419950485, 0.21488744020462036, 0.09032195806503296, 0.35071730613708496, -0.10937617719173431, 0.05329831317067146, -0.15508562326431274, 0.14168131351470947, 0.40430155396461487, 0.000788610428571701, -0.5444190502166748, -0.2212269902229309, -0.1243484690785408, 0.008922092616558075, 0.11232131719589233, 0.53174889087677, 0.03066498413681984, -0.1736355721950531, 0.17701002955436707, 0.26566147804260254, 0.5368549227714539, -0.08874908089637756, -0.05829859524965286, 0.17312075197696686, -0.3876769244670868, -0.14655500650405884, -0.31784188747406006, -0.21313367784023285, 0.06772669404745102, -0.25107085704803467, 0.2636963725090027, -0.20300942659378052, -0.01407280657440424, -0.07448194921016693, 0.4079805612564087, -0.11855441331863403, 0.034083299338817596, -0.09524945914745331, -0.008302796632051468, -0.14667730033397675, 0.044027913361787796, -0.19547352194786072, -0.17438539862632751, -0.3775613307952881, 0.3725060224533081, -0.0666094571352005, 0.2309618890285492, -0.03524331748485565, -0.13758082687854767, 0.2652429938316345, 0.13893093168735504, -0.10373476147651672, 0.10864770412445068, 0.0686233639717102, 0.06773503124713898, 0.09913793951272964, -0.050038937479257584, -0.021467290818691254, 0.294016569852829, -0.3436627984046936, 0.15444201231002808, 0.46938782930374146, 0.062310606241226196, 0.03374958783388138, -0.42049068212509155, 0.0856410339474678, -0.23206278681755066, 0.07239366322755814, 0.34790608286857605, -0.08063213527202606, -0.2999899089336395, -1.0697360038757324, 0.24514305591583252, 0.18150584399700165, 0.03470426797866821, 0.1759735643863678, -0.21919812262058258, -0.04219014197587967, 0.2608640193939209, 0.15438547730445862, 1.0892904996871948, -0.05072551220655441, 0.5218439102172852, 0.3229363262653351, -0.07319463789463043, 0.38199087977409363, -0.34161055088043213, 0.1129661425948143, -0.24471545219421387, -0.44245871901512146, 0.0531475692987442, -0.28463536500930786, -0.007202401757240295, 0.007823381572961807, -0.13674238324165344, 0.323406845331192, -0.2796400189399719, -0.052400704473257065, -0.025283245369791985, 0.03405645489692688, -0.1102767363190651, -0.09481526911258698, -0.06336752325296402, -0.0598193034529686, -0.1997707039117813, 0.18121753633022308, -0.07177199423313141, 0.11819393187761307, -0.11086060106754303, 0.029804587364196777, -0.04482174664735794, -0.16661471128463745, -0.05123583599925041, 0.009282824583351612, -0.33411550521850586, -0.6155840158462524, 0.28361281752586365, 0.34021100401878357, 0.09963926672935486, 0.17926602065563202, 0.05344250053167343, 0.08369481563568115, 0.24518215656280518, 0.41680651903152466, -0.0029483840335160494, -0.05210866406559944, 0.4235520362854004, 0.06524849683046341, 0.06779306381940842, 0.25248876214027405, -0.019038861617445946, -0.09698253870010376, -0.8286112546920776, 0.17091262340545654, 0.37919437885284424, -0.24731211364269257, -0.44412872195243835, 0.05428220331668854, -0.002344854176044464, 0.026549112051725388, -0.04083532467484474, 0.18201100826263428, 0.17407742142677307, 0.43151217699050903, -0.22566278278827667, -0.415462851524353, -0.19957762956619263, 0.2852526009082794, 0.20039331912994385, -0.04522677883505821, 0.4193187355995178, -0.05192812159657478, -0.20080451667308807, -0.05273608863353729, 0.23712441325187683, -0.09742987155914307, -0.454271137714386, -0.10128816962242126, -0.08410033583641052, 0.1255539506673813, -0.01900652050971985, 0.2705143094062805, -0.24727870523929596, 0.06370849162340164, -0.20918980240821838, -0.0291786789894104, 0.10381168872117996, 0.017678339034318924, 0.427717924118042, 0.34376952052116394, 0.3647260367870331, 0.3129187524318695, 0.015242313966155052, -0.056485481560230255, -0.13059039413928986, 0.029776334762573242, 0.32411423325538635, 0.3977797031402588, 0.01836409792304039, 0.0064169615507125854, -0.3131088316440582, -0.06049337610602379, -0.11093776673078537, 0.14403456449508667, -0.11407138407230377, -0.0874803215265274, -0.15205736458301544, 0.23002666234970093, 0.07486112415790558, -0.0025268709287047386, -0.1695275604724884, -0.1676243096590042, -0.17427608370780945, -0.239664226770401, 0.2976011037826538, 0.2611991763114929, 0.02102433517575264, 0.12576618790626526, 0.4362260699272156, 0.028532609343528748, 0.16226662695407867, 0.19042113423347473, -0.15896496176719666, -0.2615155577659607, 0.12345445156097412, 0.01647842302918434, -0.2788669168949127, -0.05190727859735489, -0.5990060567855835, 0.14335006475448608, 0.21411511301994324, 0.38008442521095276, 0.012301865965127945, -0.3274235725402832, 0.33178436756134033, -0.1678723394870758, 0.4022532105445862, 0.5396653413772583, 0.0275576114654541, -0.4948888123035431, 0.2594496011734009, -0.07203146070241928, 0.22534140944480896, -0.14198291301727295, -0.03956430032849312, 0.18178749084472656, -0.11395317316055298, 0.1323438584804535, -0.15845562517642975, 0.3500945568084717, -0.5146563649177551, -0.09928854554891586, 0.1379048377275467, -0.16130390763282776, 0.22361750900745392, 0.4979381263256073, 0.04659806564450264, -0.06681768596172333, 0.18280832469463348, -0.07711386680603027, -0.14453217387199402, 0.2808186113834381, 0.730118453502655, 0.5393797755241394, 0.4825180470943451, 0.039552729576826096, -0.06726451963186264, -0.46975407004356384, -0.2155255526304245, 0.19769524037837982, 0.03753289580345154, 0.5161759853363037, 0.22811652719974518, 0.046341948211193085, 0.11341968923807144, -0.07995983213186264, 0.12704595923423767, 0.3366575539112091, -0.12231945246458054, -0.04207288846373558, 0.21046987175941467, -0.3991292417049408, 0.08121202886104584, 0.14848338067531586, -0.42710381746292114, 0.2103961855173111, 0.1051129624247551, 0.1707056760787964, -0.18567688763141632, -0.11141744256019592, 0.2426234483718872, -0.13666817545890808, 0.12848880887031555, -0.10801931470632553, -0.05541207641363144, 0.17677757143974304, 0.02713223546743393, 0.18982051312923431, 0.12851373851299286, -0.05137176439166069, 0.3518342673778534, -0.14665630459785461, 0.05710545554757118, -0.10327792167663574, 0.1627277284860611, 0.02708936110138893, 0.09426119923591614, 0.3115413784980774, -0.3098685145378113, 0.492308109998703, 0.061840735375881195, -0.01264030672609806, -0.1264343410730362, 0.34088554978370667, 0.21790216863155365, -0.5887749195098877, -0.027243278920650482, 0.13982543349266052, 0.059310294687747955, 0.09648924320936203, 0.10668155550956726, -0.4906991720199585, 0.03797999396920204, 0.014747386798262596, 0.4293687641620636, 0.18357521295547485, -0.008562126196920872, -0.006523050367832184, 0.10725806653499603, 0.43536633253097534, 0.08265510946512222, -0.15522241592407227, -0.047448400408029556, 0.025912106037139893, -0.428496778011322, 0.050652794539928436, 0.3247937262058258, 0.12122604250907898, 0.24925270676612854, -0.11007143557071686, 0.2826691269874573, 0.13805025815963745, -0.17088989913463593, 0.21736860275268555, -0.002011612057685852, 0.43301695585250854, -0.30537909269332886, -0.08730939030647278, -0.41097062826156616, 0.17813539505004883, -0.1709604412317276, -0.1909293830394745, 0.12010040879249573, 0.10291633754968643, 0.02816971391439438, -0.2006624937057495, -0.13501477241516113, -0.014714266173541546, 0.31948402523994446, 0.21519134938716888, 0.07097267359495163, 0.275259792804718, 0.014904007315635681, 0.013969054445624352, -0.1395517736673355, 0.08658897876739502, -0.008438652381300926, 0.21011671423912048, -0.21705079078674316, 0.3956209719181061, -0.15717217326164246, 0.18088388442993164, -0.31531423330307007, 0.2677328884601593, -0.17867319285869598, 0.20129601657390594, -0.29495537281036377, -0.06183319538831711, 0.3227122724056244, 0.04214216768741608, 0.08046294003725052, 0.5686165690422058, -0.018175415694713593, 0.2659771144390106, -0.27915823459625244, 0.29633206129074097, 0.49348315596580505, 0.13304074108600616, -0.22015801072120667, -0.21622183918952942, -0.026843339204788208, 0.13144326210021973, 0.06208476424217224, -0.309726357460022, 0.005293220281600952, 0.21255402266979218, -0.23436927795410156, -0.33160361647605896, 0.20537304878234863, -0.054333847016096115, -0.26185885071754456, -0.12505970895290375, 0.5423792600631714, -0.05477908253669739, -0.09493109583854675, -0.043653350323438644, -0.03871094807982445 ]
https://github.com/huggingface/datasets/issues/511
dataset.shuffle() and select() resets format. Intended?
Since datasets 1.0.0 the format is not reset anymore. Closing this one, but feel free to re-open if you have other questions
Calling `dataset.shuffle()` or `dataset.select()` on a dataset resets its format set by `dataset.set_format()`. Is this intended or an oversight? When working on quite large datasets that require a lot of preprocessing I find it convenient to save the processed dataset to file using `torch.save("dataset.pt")`. Later loading the dataset object using `torch.load("dataset.pt")`, which conserves the defined format before saving. I do shuffling and selecting (for controlling dataset size) after loading the data from .pt-file, as it's convenient whenever you train multiple models with varying sizes of the same dataset. The obvious workaround for this is to set the format again after using `dataset.select()` or `dataset.shuffle()`. _I guess this is more of a discussion on the design philosophy of the functions. Please let me know if this is not the right channel for these kinds of discussions or if they are not wanted at all!_ #### How to reproduce: ```python import nlp from transformers import T5Tokenizer tokenizer = T5Tokenizer.from_pretrained("t5-base") def create_features(batch): context_encoding = tokenizer.batch_encode_plus(batch["context"]) return {"input_ids": context_encoding["input_ids"]} dataset = nlp.load_dataset("cosmos_qa", split="train") dataset = dataset.map(create_features, batched=True) dataset.set_format(type="torch", columns=["input_ids"]) dataset[0] # {'input_ids': tensor([ 1804, 3525, 1602, ... 0, 0])} dataset = dataset.shuffle() dataset[0] # {'id': '3Q9(...)20', 'context': "Good Old War an (...) play ?', 'answer0': 'None of the above choices .', 'answer1': 'This person likes music and likes to see the show , they will see other bands play .', (...) 'input_ids': [1804, 3525, 1602, ... , 0, 0]} ```
22
dataset.shuffle() and select() resets format. Intended? Calling `dataset.shuffle()` or `dataset.select()` on a dataset resets its format set by `dataset.set_format()`. Is this intended or an oversight? When working on quite large datasets that require a lot of preprocessing I find it convenient to save the processed dataset to file using `torch.save("dataset.pt")`. Later loading the dataset object using `torch.load("dataset.pt")`, which conserves the defined format before saving. I do shuffling and selecting (for controlling dataset size) after loading the data from .pt-file, as it's convenient whenever you train multiple models with varying sizes of the same dataset. The obvious workaround for this is to set the format again after using `dataset.select()` or `dataset.shuffle()`. _I guess this is more of a discussion on the design philosophy of the functions. Please let me know if this is not the right channel for these kinds of discussions or if they are not wanted at all!_ #### How to reproduce: ```python import nlp from transformers import T5Tokenizer tokenizer = T5Tokenizer.from_pretrained("t5-base") def create_features(batch): context_encoding = tokenizer.batch_encode_plus(batch["context"]) return {"input_ids": context_encoding["input_ids"]} dataset = nlp.load_dataset("cosmos_qa", split="train") dataset = dataset.map(create_features, batched=True) dataset.set_format(type="torch", columns=["input_ids"]) dataset[0] # {'input_ids': tensor([ 1804, 3525, 1602, ... 0, 0])} dataset = dataset.shuffle() dataset[0] # {'id': '3Q9(...)20', 'context': "Good Old War an (...) play ?', 'answer0': 'None of the above choices .', 'answer1': 'This person likes music and likes to see the show , they will see other bands play .', (...) 'input_ids': [1804, 3525, 1602, ... , 0, 0]} ``` Since datasets 1.0.0 the format is not reset anymore. Closing this one, but feel free to re-open if you have other questions
[ -0.1382129192352295, -0.2247210144996643, 0.023964356631040573, 0.24767443537712097, 0.12811952829360962, -0.13620126247406006, 0.20321261882781982, 0.0824570432305336, -0.6032925248146057, -0.0022733956575393677, -0.28427189588546753, 0.32275083661079407, -0.19512322545051575, 0.17383132874965668, 0.13989876210689545, -0.14475232362747192, 0.11455860733985901, 0.20896661281585693, -0.04358014464378357, -0.11561089754104614, -0.15637893974781036, -0.2866489887237549, -0.2859775424003601, -0.06061650812625885, -0.4345378577709198, 0.026099953800439835, 0.005006430670619011, 0.1479000449180603, -0.0802036002278328, 0.07603524625301361, 0.044232502579689026, 0.2561853528022766, -0.19872494041919708, 0.5789400935173035, -0.00012897230044472963, -0.16552969813346863, 0.0554003082215786, -0.2835806906223297, -0.2924961447715759, 0.05556783080101013, -0.059529729187488556, 0.24505391716957092, 0.033568188548088074, -0.17916834354400635, 0.09662730246782303, -0.3774503767490387, -0.09206236153841019, -0.11476931720972061, 0.18904656171798706, 0.1550751030445099, 0.07984378933906555, 0.33684593439102173, -0.24911315739154816, 0.24383939802646637, 0.37458720803260803, 0.5576680898666382, -0.1313132345676422, 0.20562011003494263, 0.10186710208654404, 0.35481542348861694, 0.4095388352870941, 0.12682189047336578, -0.29001620411872864, -0.24198953807353973, 0.28389883041381836, 0.01421756949275732, -0.24832364916801453, -0.27838271856307983, 0.16920259594917297, 0.07647638022899628, 0.7366983890533447, -0.5577982664108276, -0.11404404789209366, -0.4305652379989624, 0.1685487926006317, -0.39026686549186707, 0.07195166498422623, 0.15496081113815308, 0.09294964373111725, -0.011897087097167969, -0.41191548109054565, -0.09447924792766571, 0.13514789938926697, 0.07512079924345016, 0.21187978982925415, 0.2510286569595337, -0.12628163397312164, 0.2214885652065277, -0.2606823146343231, 0.3279380202293396, 0.24813209474086761, -0.3805217742919922, -0.00022552534937858582, -0.030866973102092743, -0.18490856885910034, -0.094518281519413, -0.043381109833717346, 0.0452786386013031, -0.07049177587032318, 0.37312108278274536, 0.5257023572921753, 0.21776553988456726, -0.1684393286705017, 0.11709743738174438, 0.3756837546825409, 0.16489233076572418, 0.15346293151378632, 0.06236723065376282, 0.042403705418109894, -0.30421704053878784, 0.039101939648389816, 0.011079024523496628, 0.2551570534706116, -0.0433041974902153, 0.37668725848197937, -0.034626662731170654, -0.04035550355911255, -0.1273491531610489, -0.02188270166516304, 0.06628651916980743, -0.2807995676994324, -0.3609567880630493, -0.14094364643096924, 0.11199642717838287, 0.027599647641181946, 0.33461305499076843, -0.2615432143211365, 0.200347438454628, -0.3364674150943756, 0.06723678112030029, -0.15362510085105896, -0.10033741593360901, -0.23053812980651855, 0.12306053191423416, 0.17794561386108398, -0.34176328778266907, 0.22913430631160736, 0.08579511195421219, -0.05531853437423706, 0.0410853773355484, 0.18373781442642212, -0.37577131390571594, 0.4564959406852722, 0.2302488088607788, -0.17371134459972382, 0.19370409846305847, 0.05660220608115196, 0.2335437685251236, -0.25585874915122986, 0.49783653020858765, -0.24115607142448425, -0.20498761534690857, 0.23119013011455536, 0.0342094823718071, -0.15434348583221436, -0.022870168089866638, -0.2087959349155426, 0.1444377601146698, 0.44773030281066895, -0.3578270971775055, 0.20716550946235657, -0.5868678092956543, -0.22728300094604492, -0.46262797713279724, 0.028632907196879387, 0.20168709754943848, -0.3084814250469208, -0.0998903214931488, 0.5335572361946106, -0.12908707559108734, 0.22925132513046265, 0.2242172509431839, -0.35004186630249023, 0.396857887506485, -0.15442538261413574, -0.0633985698223114, 0.5925040245056152, 0.06990711390972137, -0.2872908413410187, -0.34885120391845703, -0.07918932288885117, 0.35778021812438965, -0.11156240850687027, 0.15252214670181274, -0.17496076226234436, -0.0800713524222374, 0.20180706679821014, 0.11498546600341797, -0.056988850235939026, 0.11312643438577652, -0.20521993935108185, 0.031109994277358055, 0.47395384311676025, 0.11602556705474854, -0.08591459691524506, -0.009483478963375092, -0.07618475705385208, 0.15894417464733124, 0.18879972398281097, -0.029502328485250473, -0.23515333235263824, 0.04994780570268631, -0.11331579089164734, 0.18671324849128723, -0.015464697033166885, -0.18546730279922485, -0.22540363669395447, -0.15268245339393616, 0.1799505650997162, -0.30409443378448486, 0.3576212525367737, 0.039109356701374054, 0.010645370930433273, -0.33286863565444946, -0.4570801556110382, -0.39311322569847107, -0.04994498938322067, 0.406503289937973, 0.04904830828309059, 0.11866891384124756, -0.3195296823978424, 0.061447396874427795, -0.2063674032688141, -0.00839910376816988, -0.41157323122024536, 0.1248532384634018, 0.1170983761548996, -0.21234357357025146, -0.3896258771419525, 0.12420783191919327, -0.12434554845094681, -0.085783451795578, -0.21295136213302612, 0.3616212010383606, 0.14429925382137299, -0.2647685408592224, -0.3784198462963104, 0.401024729013443, 0.1274128556251526, 0.20651784539222717, 0.13458497822284698, -0.18959863483905792, 0.3265336751937866, -0.19155877828598022, -0.2690972685813904, 0.3493046760559082, -0.6575782895088196, -0.18025878071784973, -0.1800183355808258, -0.6270246505737305, -0.039362069219350815, 0.24368467926979065, -0.3853665292263031, 0.04598408192396164, 0.05316511169075966, 0.3270129859447479, 0.19386576116085052, 0.3799911141395569, -0.5700510740280151, -0.04765384644269943, 0.7285062670707703, -0.22127173840999603, 0.05534052476286888, 0.05336381122469902, -0.17174530029296875, -0.35056567192077637, -0.18459488451480865, -0.020324744284152985, 0.7820939421653748, -0.015364018268883228, -0.03673764690756798, 0.05539383366703987, 0.08145565539598465, -0.3519116938114166, 0.09552691876888275, 0.24915023148059845, 0.006955967750400305, 0.44111478328704834, 0.357519268989563, 0.11176347732543945, -0.4882299602031708, 0.13028015196323395, 0.16376937925815582, -0.08035566657781601, -0.3349169194698334, 0.09440615773200989, -0.15565402805805206, 0.05963169038295746, -0.37720537185668945, -0.025495927780866623, 0.04466971382498741, -0.05999884754419327, -0.0811634287238121, 0.0489465706050396, 0.10023055970668793, -0.06275998800992966, 0.2464337944984436, 0.22445084154605865, -0.017559368163347244, -0.3098866045475006, 0.31089964509010315, -0.07125835865736008, -0.19934207201004028, -0.11472746729850769, 0.012394783087074757, -0.029599450528621674, 0.3543703854084015, -0.055891506373882294, -0.20557424426078796, -0.13918709754943848, -0.19546157121658325, 0.2927089333534241, -0.0928986668586731, -0.0006677489727735519, 0.019367218017578125, -0.03504125773906708, 0.014271397143602371, -0.19803810119628906, 0.10207385569810867, 0.11471541225910187, 0.19757254421710968, 0.0408131442964077, 0.17961964011192322, 0.13454365730285645, -0.19932304322719574, -0.2912905216217041, -0.03133871406316757, 0.08816547691822052, 0.21626247465610504, -0.16745612025260925, -0.013982735574245453, 0.46590834856033325, -0.08459020406007767, -0.1470181792974472, -0.666682243347168, 0.10766597092151642, -0.36958083510398865, -0.520880401134491, 0.12932899594306946, -0.05557609722018242, -0.21379728615283966, -0.26520904898643494, 0.1450389176607132, -0.05729183182120323, 0.5463917851448059, -0.23820804059505463, -0.19538697600364685, -0.1374090015888214, -0.06486200541257858, -0.06913000345230103, 0.4167661666870117, 0.3020016551017761, 0.05715690180659294, 0.19458523392677307, 0.03851694613695145, -0.04340371862053871, 0.14146772027015686, 0.37477466464042664, 0.07985247671604156, 0.09517372399568558, 0.19100463390350342, -0.017864733934402466, 0.5995129346847534, -0.19912774860858917, -0.16133375465869904, 0.13480690121650696, 0.17958268523216248, 0.38828548789024353, -0.4722309410572052, -0.10417845845222473, 0.4822196066379547, -0.051631033420562744, -0.09032448381185532, 0.2900758385658264, -0.2437635064125061, 0.015319672413170338, -0.11817027628421783, 0.15897223353385925, -0.28773418068885803, -0.2249058037996292, 0.4279423654079437, -0.004232775419950485, 0.21488744020462036, 0.09032195806503296, 0.35071730613708496, -0.10937617719173431, 0.05329831317067146, -0.15508562326431274, 0.14168131351470947, 0.40430155396461487, 0.000788610428571701, -0.5444190502166748, -0.2212269902229309, -0.1243484690785408, 0.008922092616558075, 0.11232131719589233, 0.53174889087677, 0.03066498413681984, -0.1736355721950531, 0.17701002955436707, 0.26566147804260254, 0.5368549227714539, -0.08874908089637756, -0.05829859524965286, 0.17312075197696686, -0.3876769244670868, -0.14655500650405884, -0.31784188747406006, -0.21313367784023285, 0.06772669404745102, -0.25107085704803467, 0.2636963725090027, -0.20300942659378052, -0.01407280657440424, -0.07448194921016693, 0.4079805612564087, -0.11855441331863403, 0.034083299338817596, -0.09524945914745331, -0.008302796632051468, -0.14667730033397675, 0.044027913361787796, -0.19547352194786072, -0.17438539862632751, -0.3775613307952881, 0.3725060224533081, -0.0666094571352005, 0.2309618890285492, -0.03524331748485565, -0.13758082687854767, 0.2652429938316345, 0.13893093168735504, -0.10373476147651672, 0.10864770412445068, 0.0686233639717102, 0.06773503124713898, 0.09913793951272964, -0.050038937479257584, -0.021467290818691254, 0.294016569852829, -0.3436627984046936, 0.15444201231002808, 0.46938782930374146, 0.062310606241226196, 0.03374958783388138, -0.42049068212509155, 0.0856410339474678, -0.23206278681755066, 0.07239366322755814, 0.34790608286857605, -0.08063213527202606, -0.2999899089336395, -1.0697360038757324, 0.24514305591583252, 0.18150584399700165, 0.03470426797866821, 0.1759735643863678, -0.21919812262058258, -0.04219014197587967, 0.2608640193939209, 0.15438547730445862, 1.0892904996871948, -0.05072551220655441, 0.5218439102172852, 0.3229363262653351, -0.07319463789463043, 0.38199087977409363, -0.34161055088043213, 0.1129661425948143, -0.24471545219421387, -0.44245871901512146, 0.0531475692987442, -0.28463536500930786, -0.007202401757240295, 0.007823381572961807, -0.13674238324165344, 0.323406845331192, -0.2796400189399719, -0.052400704473257065, -0.025283245369791985, 0.03405645489692688, -0.1102767363190651, -0.09481526911258698, -0.06336752325296402, -0.0598193034529686, -0.1997707039117813, 0.18121753633022308, -0.07177199423313141, 0.11819393187761307, -0.11086060106754303, 0.029804587364196777, -0.04482174664735794, -0.16661471128463745, -0.05123583599925041, 0.009282824583351612, -0.33411550521850586, -0.6155840158462524, 0.28361281752586365, 0.34021100401878357, 0.09963926672935486, 0.17926602065563202, 0.05344250053167343, 0.08369481563568115, 0.24518215656280518, 0.41680651903152466, -0.0029483840335160494, -0.05210866406559944, 0.4235520362854004, 0.06524849683046341, 0.06779306381940842, 0.25248876214027405, -0.019038861617445946, -0.09698253870010376, -0.8286112546920776, 0.17091262340545654, 0.37919437885284424, -0.24731211364269257, -0.44412872195243835, 0.05428220331668854, -0.002344854176044464, 0.026549112051725388, -0.04083532467484474, 0.18201100826263428, 0.17407742142677307, 0.43151217699050903, -0.22566278278827667, -0.415462851524353, -0.19957762956619263, 0.2852526009082794, 0.20039331912994385, -0.04522677883505821, 0.4193187355995178, -0.05192812159657478, -0.20080451667308807, -0.05273608863353729, 0.23712441325187683, -0.09742987155914307, -0.454271137714386, -0.10128816962242126, -0.08410033583641052, 0.1255539506673813, -0.01900652050971985, 0.2705143094062805, -0.24727870523929596, 0.06370849162340164, -0.20918980240821838, -0.0291786789894104, 0.10381168872117996, 0.017678339034318924, 0.427717924118042, 0.34376952052116394, 0.3647260367870331, 0.3129187524318695, 0.015242313966155052, -0.056485481560230255, -0.13059039413928986, 0.029776334762573242, 0.32411423325538635, 0.3977797031402588, 0.01836409792304039, 0.0064169615507125854, -0.3131088316440582, -0.06049337610602379, -0.11093776673078537, 0.14403456449508667, -0.11407138407230377, -0.0874803215265274, -0.15205736458301544, 0.23002666234970093, 0.07486112415790558, -0.0025268709287047386, -0.1695275604724884, -0.1676243096590042, -0.17427608370780945, -0.239664226770401, 0.2976011037826538, 0.2611991763114929, 0.02102433517575264, 0.12576618790626526, 0.4362260699272156, 0.028532609343528748, 0.16226662695407867, 0.19042113423347473, -0.15896496176719666, -0.2615155577659607, 0.12345445156097412, 0.01647842302918434, -0.2788669168949127, -0.05190727859735489, -0.5990060567855835, 0.14335006475448608, 0.21411511301994324, 0.38008442521095276, 0.012301865965127945, -0.3274235725402832, 0.33178436756134033, -0.1678723394870758, 0.4022532105445862, 0.5396653413772583, 0.0275576114654541, -0.4948888123035431, 0.2594496011734009, -0.07203146070241928, 0.22534140944480896, -0.14198291301727295, -0.03956430032849312, 0.18178749084472656, -0.11395317316055298, 0.1323438584804535, -0.15845562517642975, 0.3500945568084717, -0.5146563649177551, -0.09928854554891586, 0.1379048377275467, -0.16130390763282776, 0.22361750900745392, 0.4979381263256073, 0.04659806564450264, -0.06681768596172333, 0.18280832469463348, -0.07711386680603027, -0.14453217387199402, 0.2808186113834381, 0.730118453502655, 0.5393797755241394, 0.4825180470943451, 0.039552729576826096, -0.06726451963186264, -0.46975407004356384, -0.2155255526304245, 0.19769524037837982, 0.03753289580345154, 0.5161759853363037, 0.22811652719974518, 0.046341948211193085, 0.11341968923807144, -0.07995983213186264, 0.12704595923423767, 0.3366575539112091, -0.12231945246458054, -0.04207288846373558, 0.21046987175941467, -0.3991292417049408, 0.08121202886104584, 0.14848338067531586, -0.42710381746292114, 0.2103961855173111, 0.1051129624247551, 0.1707056760787964, -0.18567688763141632, -0.11141744256019592, 0.2426234483718872, -0.13666817545890808, 0.12848880887031555, -0.10801931470632553, -0.05541207641363144, 0.17677757143974304, 0.02713223546743393, 0.18982051312923431, 0.12851373851299286, -0.05137176439166069, 0.3518342673778534, -0.14665630459785461, 0.05710545554757118, -0.10327792167663574, 0.1627277284860611, 0.02708936110138893, 0.09426119923591614, 0.3115413784980774, -0.3098685145378113, 0.492308109998703, 0.061840735375881195, -0.01264030672609806, -0.1264343410730362, 0.34088554978370667, 0.21790216863155365, -0.5887749195098877, -0.027243278920650482, 0.13982543349266052, 0.059310294687747955, 0.09648924320936203, 0.10668155550956726, -0.4906991720199585, 0.03797999396920204, 0.014747386798262596, 0.4293687641620636, 0.18357521295547485, -0.008562126196920872, -0.006523050367832184, 0.10725806653499603, 0.43536633253097534, 0.08265510946512222, -0.15522241592407227, -0.047448400408029556, 0.025912106037139893, -0.428496778011322, 0.050652794539928436, 0.3247937262058258, 0.12122604250907898, 0.24925270676612854, -0.11007143557071686, 0.2826691269874573, 0.13805025815963745, -0.17088989913463593, 0.21736860275268555, -0.002011612057685852, 0.43301695585250854, -0.30537909269332886, -0.08730939030647278, -0.41097062826156616, 0.17813539505004883, -0.1709604412317276, -0.1909293830394745, 0.12010040879249573, 0.10291633754968643, 0.02816971391439438, -0.2006624937057495, -0.13501477241516113, -0.014714266173541546, 0.31948402523994446, 0.21519134938716888, 0.07097267359495163, 0.275259792804718, 0.014904007315635681, 0.013969054445624352, -0.1395517736673355, 0.08658897876739502, -0.008438652381300926, 0.21011671423912048, -0.21705079078674316, 0.3956209719181061, -0.15717217326164246, 0.18088388442993164, -0.31531423330307007, 0.2677328884601593, -0.17867319285869598, 0.20129601657390594, -0.29495537281036377, -0.06183319538831711, 0.3227122724056244, 0.04214216768741608, 0.08046294003725052, 0.5686165690422058, -0.018175415694713593, 0.2659771144390106, -0.27915823459625244, 0.29633206129074097, 0.49348315596580505, 0.13304074108600616, -0.22015801072120667, -0.21622183918952942, -0.026843339204788208, 0.13144326210021973, 0.06208476424217224, -0.309726357460022, 0.005293220281600952, 0.21255402266979218, -0.23436927795410156, -0.33160361647605896, 0.20537304878234863, -0.054333847016096115, -0.26185885071754456, -0.12505970895290375, 0.5423792600631714, -0.05477908253669739, -0.09493109583854675, -0.043653350323438644, -0.03871094807982445 ]
https://github.com/huggingface/datasets/issues/509
Converting TensorFlow dataset example
Do you want to convert a dataset script to the tfds format ? If so, we currently have a comversion script nlp/commands/convert.py but it is a conversion script that goes from tfds to nlp. I think it shouldn't be too hard to do the changes in reverse (at some manual adjustments). If you manage to make it work in reverse, feel free to open a PR to share it with the community :)
Hi, I want to use TensorFlow datasets with this repo, I noticed you made some conversion script, can you give a simple example of using it? Thanks
73
Converting TensorFlow dataset example Hi, I want to use TensorFlow datasets with this repo, I noticed you made some conversion script, can you give a simple example of using it? Thanks Do you want to convert a dataset script to the tfds format ? If so, we currently have a comversion script nlp/commands/convert.py but it is a conversion script that goes from tfds to nlp. I think it shouldn't be too hard to do the changes in reverse (at some manual adjustments). If you manage to make it work in reverse, feel free to open a PR to share it with the community :)
[ -0.1354900300502777, -0.05655316263437271, -0.10985834896564484, -0.1969321221113205, 0.16571542620658875, 0.09159908443689346, 0.33403846621513367, 0.49406829476356506, -0.1472650021314621, 0.1399834305047989, 0.030207529664039612, 0.3426108658313751, 0.019534222781658173, 0.3617253005504608, 0.33801278471946716, -0.31443536281585693, 0.050477880984544754, 0.2795872688293457, -0.3302767276763916, -0.11373385041952133, -0.03580675274133682, 0.10837358981370926, -0.11152704060077667, 0.06859371811151505, 0.13685175776481628, -0.030168531462550163, -0.08500529825687408, 0.2507574260234833, 0.12261978536844254, 0.042267583310604095, 0.16803529858589172, 0.15605981647968292, 0.31174445152282715, 0.7285922169685364, -0.00010577817738521844, -0.0028076395392417908, 0.07530461251735687, -0.09469418972730637, -0.0748341828584671, -0.3386339545249939, -0.15522994101047516, -0.2183423787355423, 0.009097429923713207, -0.34999775886535645, -0.22641709446907043, 0.08124805986881256, 0.11513035744428635, -0.14078369736671448, 0.5385852456092834, 0.5260945558547974, 0.2700375020503998, 0.19336019456386566, -0.06913670152425766, 0.10159925371408463, 0.06658520549535751, 0.1731286495923996, -0.20120176672935486, 0.04466991126537323, 0.37964484095573425, -0.19142641127109528, 0.27587711811065674, 0.2336079627275467, -0.08742225170135498, -0.15432268381118774, 0.31593960523605347, 0.04815661162137985, 0.13110479712486267, -0.47176405787467957, 0.008744286373257637, 0.5226516127586365, 0.5459266901016235, -0.43986576795578003, -0.09455329179763794, -0.13905315101146698, 0.054560061544179916, -0.33487698435783386, -0.48349183797836304, 0.11210860311985016, -0.13929252326488495, 0.2684400975704193, -0.5411638021469116, -0.2216576337814331, -0.4027036130428314, 0.1094902977347374, -0.08126471936702728, 0.09304727613925934, 0.027011454105377197, 0.02008829638361931, -0.09793031215667725, -0.2529069185256958, 0.07444427162408829, -0.00016515329480171204, 0.2594025731086731, 0.1288963258266449, -0.12989771366119385, -0.3237949013710022, -0.04382524639368057, -0.40104779601097107, 0.09472715109586716, 0.05841231346130371, -0.05235527455806732, 0.24258112907409668, -0.3122432827949524, 0.1642351895570755, -0.18624825775623322, 0.28415167331695557, 0.18871241807937622, 0.26398688554763794, 0.18265944719314575, -0.24707289040088654, 0.031129132956266403, 0.18996170163154602, -0.27977579832077026, -0.10542094707489014, -0.18553049862384796, -0.09177658706903458, 0.30332666635513306, -0.13371917605400085, -0.13321027159690857, -0.20100191235542297, -0.03396257385611534, -0.0861758440732956, -0.1275319904088974, 0.25545641779899597, -0.03433367609977722, 0.09717240184545517, 0.21320919692516327, 0.24638046324253082, 0.007653269916772842, 0.013231986202299595, -0.08993200212717056, 0.18350449204444885, -0.28583723306655884, -0.19595521688461304, 0.05372871086001396, 0.104161337018013, 0.09442515671253204, -0.17557819187641144, 0.034998562186956406, 0.3055770695209503, 0.34064212441444397, 0.3691464364528656, 0.1823940873146057, 0.08596234768629074, 0.15400031208992004, -0.07963111251592636, 0.23770667612552643, -0.18919633328914642, -0.3463330864906311, 0.35551580786705017, -0.30573004484176636, -0.12361112236976624, -0.1417660415172577, 0.23520644009113312, -0.21676872670650482, -0.4702005684375763, -0.21256870031356812, 0.44165724515914917, 0.009898379445075989, 0.000036232173442840576, 0.139333575963974, -0.26340657472610474, -0.2979623079299927, -0.200685054063797, 0.06359819322824478, 0.2533063590526581, -0.6270152926445007, 0.008720971643924713, 0.028046682476997375, -0.3241328001022339, 0.23539623618125916, 0.04729028046131134, -0.04203909635543823, 0.12415953725576401, 0.15201283991336823, -0.032176777720451355, 0.8314983248710632, -0.49368569254875183, 0.07056017220020294, 0.37508678436279297, -0.18233859539031982, -0.14545419812202454, -0.13489213585853577, 0.04724963754415512, 0.15456536412239075, -0.1671394258737564, -0.22463521361351013, 0.48626530170440674, -0.3266911804676056, 0.26097747683525085, -0.00884895771741867, -0.1877928376197815, 0.33147919178009033, 0.1990179866552353, 0.05730952322483063, 0.22330889105796814, -0.0590546652674675, 0.06140130013227463, 0.30034130811691284, -0.32587146759033203, 0.047920361161231995, -0.059833891689777374, 0.10436692833900452, -0.012876980006694794, 0.1901644766330719, -0.21964159607887268, -0.31026458740234375, 0.051225341856479645, 0.06175975501537323, 0.13113373517990112, 0.24256347119808197, -0.11073461920022964, -0.29381486773490906, -0.16321399807929993, 0.10981929302215576, 0.0496339276432991, 0.1978265792131424, -0.21809181571006775, 0.08118633925914764, -0.1274273544549942, -0.4316333532333374, -0.038288384675979614, -0.09734682738780975, 0.036117445677518845, -0.19630277156829834, 0.36468401551246643, 0.14875628054141998, -0.12141187489032745, -0.01074649766087532, 0.2152690589427948, -0.08536151796579361, -0.5249544382095337, -0.045136164873838425, 0.3602924048900604, -0.24170097708702087, 0.36484795808792114, 0.2504189610481262, 0.31318199634552, 0.26917415857315063, -0.16897135972976685, 0.27639898657798767, 0.14968137443065643, -0.08017940819263458, -0.09266193211078644, -0.3937796950340271, 0.40316224098205566, 0.0032218992710113525, 0.24615177512168884, 0.09370249509811401, 0.12712420523166656, 0.30301928520202637, -0.34689435362815857, -0.23693059384822845, 0.03712392598390579, 0.08326439559459686, -0.051113758236169815, -0.2927998900413513, -0.1821138709783554, -0.44212237000465393, 0.4492563307285309, 0.465789794921875, -0.4190254211425781, -0.015199452638626099, 0.31671857833862305, -0.08550643175840378, -0.013661107048392296, 0.10806847363710403, 0.25863465666770935, 0.021684452891349792, 0.11258339881896973, 0.019920039921998978, 0.2573537528514862, -0.1341610550880432, -0.08741720765829086, 0.1846427619457245, -0.05756227672100067, 0.4302842319011688, -0.26993072032928467, 0.01845257729291916, 0.03720824047923088, 0.047574013471603394, -0.2376665472984314, 0.04297716170549393, 0.355180025100708, -0.15619830787181854, 0.1930074393749237, -0.4067864418029785, -0.46546000242233276, -0.2318658083677292, 0.03950894623994827, 0.25292906165122986, -0.12535414099693298, 0.05273602902889252, 0.021393312141299248, -0.049259427934885025, 0.13679440319538116, 0.22641077637672424, 0.2378939986228943, 0.10300740599632263, 0.09969533979892731, -0.23833148181438446, -0.2714826762676239, -0.37848997116088867, 0.22523143887519836, 0.31447532773017883, 0.12465241551399231, 0.39251968264579773, -0.3350912928581238, -0.036904655396938324, -0.44718119502067566, -0.3675503730773926, 0.17970195412635803, -0.3059433698654175, -0.14079545438289642, 0.10603512078523636, 0.13295592367649078, -0.03225431218743324, 0.0568583682179451, -0.13697482645511627, -0.01690687984228134, 0.025321951135993004, 0.20521201193332672, -0.23481613397598267, -0.2529453933238983, -0.3389115035533905, -0.29703372716903687, -0.20562148094177246, -0.19673581421375275, 0.15070468187332153, 0.3304749131202698, 0.3571404814720154, 0.1313915103673935, 0.21773290634155273, 0.4648517072200775, 0.2672101557254791, -0.11475402116775513, 0.11040109395980835, -0.15422318875789642, 0.2004644274711609, -0.3984223008155823, -0.4548291563987732, 0.288848876953125, 0.017748791724443436, 0.12053799629211426, 0.18322095274925232, -0.238777756690979, -0.2569127678871155, -0.15292878448963165, 0.010119203478097916, 0.029691405594348907, 0.16533103585243225, 0.261676549911499, -0.09889049828052521, -0.1023716852068901, -0.16882991790771484, -0.04626504331827164, 0.17446032166481018, -0.03264301270246506, 0.15935656428337097, 0.09310510754585266, 0.5094342231750488, 0.012058239430189133, 0.5736183524131775, 0.08047527074813843, -0.4635082185268402, -0.18167313933372498, -0.3495345413684845, 0.10995068401098251, 0.21261903643608093, 0.07667937129735947, 0.20352664589881897, 0.10463200509548187, 0.15431933104991913, 0.20837301015853882, -0.007008923217654228, -0.2179461270570755, -0.03207484632730484, -0.037124041467905045, -0.15714752674102783, -0.19405187666416168, 0.022855043411254883, -0.37485581636428833, 0.0867137685418129, 0.09733638167381287, -0.24122479557991028, -0.25707605481147766, -0.07999632507562637, -0.040928177535533905, 0.21497361361980438, 0.20329947769641876, 0.04295564442873001, -0.5349577069282532, -0.1642134040594101, -0.4318332076072693, 0.22281143069267273, -0.20350997149944305, -0.05205993354320526, -0.0591825433075428, 0.10910066217184067, 0.015242069959640503, -0.12944623827934265, 0.5048220157623291, -0.235554501414299, 0.011583637446165085, 0.20573240518569946, -0.12282250076532364, -0.3891147971153259, -0.08651182055473328, -0.5830414295196533, 0.44159558415412903, 0.12001921236515045, 0.24974866211414337, -0.09563948214054108, -0.2873213291168213, 0.3748551607131958, -0.028056761249899864, -0.15952278673648834, 0.011959950439631939, 0.18752919137477875, -0.4287962317466736, -0.37793323397636414, -0.15956845879554749, 0.06585093587636948, -0.20247359573841095, -0.4159749150276184, -0.24616758525371552, 0.16381272673606873, 0.22475779056549072, 0.3919680714607239, 0.2527737617492676, -0.07904226332902908, 0.3548319637775421, -0.15364402532577515, -0.12745989859104156, 0.010680146515369415, 0.03860563784837723, -0.03189437836408615, 0.05076495558023453, -0.24217697978019714, 0.033672839403152466, 0.037234190851449966, 0.3352758586406708, 0.23747089505195618, 0.06624250113964081, -0.1106172576546669, -0.09156545251607895, 0.1527935266494751, 0.0967043936252594, 0.1496429741382599, 0.24755962193012238, 0.16880230605602264, -0.47574639320373535, -0.5301383137702942, 0.34013763070106506, -0.0073996782302856445, -0.13595734536647797, 0.0993589386343956, 0.09289893507957458, -0.23272699117660522, 0.19262009859085083, 0.22737491130828857, 0.9439202547073364, -0.294863760471344, 0.10382833331823349, 0.5949633121490479, -0.06070574000477791, 0.7162041068077087, -0.49316221475601196, -0.17017802596092224, -0.264436274766922, -0.021754533052444458, -0.02568919211626053, -0.1684124916791916, -0.03685931861400604, 0.2574603855609894, -0.6424691081047058, 0.24701310694217682, 0.06676824390888214, -0.13344945013523102, 0.2724011242389679, 0.23108646273612976, 0.11837033182382584, -0.1616877317428589, -0.12874536216259003, 0.2684842348098755, 0.07409688085317612, -0.057840462774038315, -0.10919460654258728, -0.25822216272354126, -0.17839668691158295, 0.228330597281456, -0.240215465426445, 0.24074774980545044, -0.025620432570576668, -0.2215588092803955, 0.10872471332550049, -0.11067445576190948, 0.4480566680431366, 0.3364582061767578, 0.6660107970237732, 0.16804109513759613, -0.34639543294906616, 0.0017296262085437775, -0.04544147849082947, 0.11128818243741989, 0.05870187282562256, -0.011294346302747726, 0.4692010283470154, -0.22077897191047668, -0.2251434624195099, 0.22917252779006958, 0.11377754807472229, 0.043480172753334045, -0.1949649304151535, -0.16450026631355286, -0.05490497499704361, 0.0029236827977001667, -0.1764405071735382, 0.4043123126029968, -0.4062635600566864, 0.21027643978595734, 0.19115257263183594, 0.17505252361297607, -0.2124251276254654, 0.1991521418094635, 0.009546507149934769, -0.15572616457939148, 0.13298393785953522, -0.26564234495162964, 0.2591843903064728, -0.278706431388855, 0.38805609941482544, 0.3272639513015747, 0.036946140229701996, -0.21794268488883972, -0.11337979137897491, 0.1392161101102829, -0.08681564778089523, 0.1708608716726303, -0.0673048123717308, -0.06077106297016144, 0.18369995057582855, -0.026000846177339554, -0.18843325972557068, 0.17457081377506256, -0.3014698326587677, -0.23220597207546234, -0.13208800554275513, -0.11076620221138, 0.1990898996591568, 0.08882547914981842, -0.10037323832511902, 0.26894474029541016, 0.013429990038275719, -0.24444225430488586, -0.4105578660964966, 0.23535862565040588, -0.059558555483818054, 0.28850167989730835, 0.43368127942085266, 0.11947090923786163, -0.1040651723742485, -0.17788556218147278, 0.0551251620054245, -0.005094762891530991, -0.18385568261146545, -0.33515870571136475, -0.18243417143821716, 0.11673608422279358, -0.01607474684715271, -0.4926327168941498, 0.3430458903312683, 0.09092558920383453, -0.19512757658958435, -0.03384906426072121, 0.156235471367836, 0.017451845109462738, -0.09895166754722595, 0.4800693094730377, 0.28187963366508484, -0.0314357727766037, 0.2551203966140747, -0.24633890390396118, 0.10361161828041077, 0.2019968330860138, -0.18800313770771027, 0.4242720603942871, 0.1399921029806137, -0.1804625391960144, -0.2638311982154846, 0.11869746446609497, 0.2879517376422882, 0.21304166316986084, 0.42715245485305786, -0.0986885279417038, 0.2778211534023285, -0.07773381471633911, 0.2292589396238327, 0.06751751899719238, -0.3842882812023163, 0.18522050976753235, 0.272955983877182, 0.24788925051689148, -0.14219632744789124, 0.1829957813024521, 0.270297646522522, -0.1790207177400589, 0.06934754550457001, 0.15126308798789978, -0.15635643899440765, 0.33132636547088623, 0.25945743918418884, -0.18477296829223633, 0.2648240625858307, -0.3637620806694031, 0.14195281267166138, 0.22733274102210999, -0.32236024737358093, -0.015144702047109604, -0.31222641468048096, 0.12772634625434875, 0.05705076828598976, -0.11972224712371826, 0.1553027331829071, 0.31689080595970154, 0.15230314433574677, -0.08431191742420197, 0.3610113263130188, -0.08981332927942276, -0.04128323867917061, 0.12288793921470642, -0.1211337149143219, 0.31194278597831726, 0.2081069052219391, 0.17419180274009705, 0.11850523203611374, 0.07025419175624847, -0.03917896747589111, 0.3936656415462494, 0.12872213125228882, -0.04059181362390518, -0.222396582365036, 0.07702479511499405, -0.16518059372901917, -0.20939593017101288, -0.3505531847476959, -0.1053743064403534, -0.13786879181861877, 0.18233780562877655, 0.008705496788024902, 0.11710083484649658, 0.3869171440601349, -0.14686474204063416, 0.09014080464839935, 0.09049113094806671, -0.0567428395152092, -0.07166248559951782, -0.0677579790353775, -0.15166844427585602, 0.2467566877603531, 0.2833397388458252, 0.2651737928390503, 0.07429429143667221, 0.4210435748100281, 0.06797979027032852, -0.13734661042690277, 0.24478739500045776, 0.13594838976860046, 0.06867620348930359, -0.09247122704982758, -0.1591894030570984, 0.1929425448179245, -0.13769660890102386, 0.11386264860630035, -0.029090750962495804, -0.27436962723731995, -0.2508375942707062, 0.24646270275115967, 0.108030304312706, -0.273061066865921, -0.24366536736488342, -0.03763975948095322, -0.27196529507637024, -0.13851352035999298, 0.5426121354103088, 0.12327820807695389, 0.13785669207572937, -0.18722787499427795, 0.11526253819465637, 0.006354860961437225, 0.561373770236969, 0.049006685614585876, 0.32721659541130066, 0.06051134318113327, -0.05558233708143234, -0.31185516715049744, 0.14940404891967773, 0.0035066530108451843, -0.14539143443107605, 0.050533391535282135, -0.009846529923379421, 0.23929545283317566, 0.16027626395225525, 0.04752349853515625, -0.4620170593261719, -0.20057719945907593, 0.13592863082885742, -0.12677457928657532, -0.3016209602355957, -0.25188934803009033, 0.3050581216812134, 0.033813923597335815, -0.22668176889419556, 0.2748786509037018, -0.035494521260261536, 0.048187486827373505, -0.29897236824035645, 0.30040857195854187, 0.23101037740707397, 0.0054128654301166534, -0.024323292076587677, 0.08612607419490814, 0.26540929079055786, -0.11872498691082001, 0.06336195766925812, 0.00046344101428985596, -0.04673337563872337, -0.43906283378601074, 0.1593446433544159, -0.17682522535324097, -0.17801320552825928, -0.09156973659992218, -0.2608184814453125, -0.03697380796074867, -0.23705652356147766, 0.001580026000738144, -0.28697213530540466, -0.29055774211883545, 0.19054415822029114, -0.04972825571894646, -0.040731031447649, 0.20428474247455597, 0.2939431369304657, -0.018323175609111786, 0.10069584846496582, -0.36342597007751465, 0.0011146385222673416, 0.43060773611068726, -0.07174135744571686, -0.3922429084777832, 0.06579792499542236, -0.006541945040225983, -0.11592119187116623, -0.01939898170530796, -0.3849150240421295, -0.06268113851547241, 0.16419775784015656, -0.09412982314825058, -0.12476888298988342, 0.2935926914215088, 0.19217434525489807, -0.0533423013985157, -0.2185538113117218, 0.16535931825637817, 0.01571941189467907, -0.228549063205719, -0.273118793964386, -0.36325621604919434 ]
https://github.com/huggingface/datasets/issues/508
TypeError: Receiver() takes no arguments
Which version of Apache Beam do you have (can you copy your full environment info here)?
I am trying to load a wikipedia data set ``` import nlp from nlp import load_dataset dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner') #dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner') ``` This fails in the apache beam runner. ``` Traceback (most recent call last): File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module> dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner') File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset builder_instance.download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare self._download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare pipeline_results = pipeline.run() File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run return self.runner.run_pipeline(self, self._options) .... File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded self.output(decoded_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast return type(*args) TypeError: Receiver() takes no arguments ``` This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump.
16
TypeError: Receiver() takes no arguments I am trying to load a wikipedia data set ``` import nlp from nlp import load_dataset dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner') #dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner') ``` This fails in the apache beam runner. ``` Traceback (most recent call last): File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module> dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner') File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset builder_instance.download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare self._download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare pipeline_results = pipeline.run() File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run return self.runner.run_pipeline(self, self._options) .... File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded self.output(decoded_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast return type(*args) TypeError: Receiver() takes no arguments ``` This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump. Which version of Apache Beam do you have (can you copy your full environment info here)?
[ -0.09465459734201431, 0.31812790036201477, 0.08749520778656006, 0.36292457580566406, 0.27407902479171753, -0.09895393997430801, 0.2871827781200409, 0.23696589469909668, -0.028674453496932983, 0.0688418447971344, 0.2388477623462677, 0.3297024071216583, -0.0908716693520546, -0.33632346987724304, 0.17512521147727966, -0.5368744134902954, -0.2141876518726349, 0.19479453563690186, -0.23295363783836365, -0.18508782982826233, -0.14422693848609924, 0.3994992971420288, -0.3325718641281128, -0.07246395945549011, -0.14122816920280457, 0.10274539142847061, -0.0761774554848671, 0.17535367608070374, -0.11846441775560379, -0.33603641390800476, 0.19669990241527557, -0.06736253201961517, 0.07337987422943115, 0.2750072777271271, -0.00012450852955225855, 0.3304244875907898, 0.6380142569541931, -0.1410854011774063, -0.5410768985748291, -0.06318436563014984, -0.08117736130952835, -0.23492592573165894, 0.1993422955274582, -0.2498537302017212, -0.20832398533821106, -0.2352614849805832, 0.10239588469266891, -0.058137014508247375, 0.3563391864299774, 0.2815552055835724, 0.0985950455069542, 0.1995164304971695, 0.18262498080730438, -0.13684247434139252, 0.5043618083000183, 0.04321516305208206, 0.05619574338197708, 0.03617449104785919, -0.227419912815094, 0.23722510039806366, -0.2068561315536499, 0.045931652188301086, -0.2663235068321228, -0.05787007138133049, 0.3306712806224823, -0.2204921692609787, 0.08741341531276703, 0.17523053288459778, -0.09427771717309952, -0.010446377098560333, 0.8057677149772644, 0.005263306200504303, 0.06409471482038498, -0.20121285319328308, 0.0806407704949379, -0.19088558852672577, 0.23831966519355774, 0.07156190276145935, -0.45435306429862976, -0.1370181292295456, 0.11433374136686325, -0.12816913425922394, -0.3413942754268646, 0.33527112007141113, -0.03350250422954559, 0.40751761198043823, -0.023008711636066437, 0.3289753794670105, 0.14224928617477417, 0.12647685408592224, 0.20727288722991943, -0.2324923276901245, -0.12685495615005493, 0.1452389359474182, -0.3808573782444, 0.1748373955488205, 0.1763758659362793, 0.29668912291526794, -0.0637696385383606, 0.1829947680234909, 0.09322760254144669, -0.18650752305984497, 0.07350432872772217, 0.12764932215213776, 0.3398435413837433, 0.12092888355255127, 0.13197268545627594, 0.01271516177803278, 0.004744917154312134, -0.0747600719332695, 0.024964910000562668, 0.032071553170681, -0.023613877594470978, -0.36054524779319763, -0.2406119853258133, 0.22457391023635864, 0.23575414717197418, -0.048562295734882355, 0.04526901990175247, -0.21168459951877594, -0.3131868839263916, -0.20823363959789276, 0.16942796111106873, 0.45601731538772583, 0.053724054247140884, 0.4907967448234558, 0.31388038396835327, 0.16133356094360352, -0.12674683332443237, -0.5722317099571228, -0.18037046492099762, 0.31715553998947144, -0.1612577587366104, -0.16374269127845764, 0.3268581032752991, 0.061369795352220535, 0.28652212023735046, -0.2762351632118225, 0.18724188208580017, 0.17346623539924622, -0.01680022105574608, -0.15872305631637573, -0.2288753092288971, 0.17436541616916656, 0.1935793161392212, 0.2789788544178009, 0.2141340970993042, -0.27453070878982544, 0.01891489326953888, 0.20865574479103088, -0.22238579392433167, -0.16894857585430145, 0.2648104727268219, 0.042568307369947433, 0.10715511441230774, -0.13842983543872833, -0.5075434446334839, 0.11159713566303253, -0.13575375080108643, -0.2659590244293213, -0.26108747720718384, -0.2019340544939041, -0.0996069461107254, -0.22975607216358185, 0.37678006291389465, 0.5294705033302307, -0.09896785020828247, -0.029180023819208145, -0.006314704194664955, 0.1354214996099472, 0.08295250684022903, 0.03577988222241402, -0.31141266226768494, 0.4921749532222748, -0.17608346045017242, -0.1047419086098671, 0.868654191493988, -0.5204974412918091, -0.05067618191242218, 0.36399954557418823, 0.11729881167411804, -0.07188747823238373, 0.3070547878742218, 0.061870358884334564, 0.11707405745983124, -0.0958947017788887, 0.031752098351716995, 0.40219807624816895, -0.04654417932033539, 0.02345523051917553, -0.153348907828331, 0.039001233875751495, 0.2969607710838318, 0.3607644736766815, 0.09343047440052032, 0.22124212980270386, -0.273481547832489, 0.49476853013038635, 0.2071569561958313, 0.003739055246114731, 0.06056760251522064, 0.512398362159729, -0.3901422619819641, -0.08273251354694366, 0.039027485996484756, 0.11307761818170547, 0.026666097342967987, -0.048862941563129425, -0.13351140916347504, 0.15623116493225098, 0.16262656450271606, 0.16144663095474243, -0.42750486731529236, 0.02301461063325405, -0.08307884633541107, 0.042762454599142075, 0.05673959106206894, 0.2840372920036316, -0.19372090697288513, 0.25803083181381226, 0.028549280017614365, 0.3317645192146301, 0.017510415986180305, -0.023407315835356712, -0.3775363564491272, 0.20459315180778503, -0.12002024799585342, -0.2554771304130554, 0.2829669415950775, -0.022837452590465546, 0.45617058873176575, 0.042087603360414505, -0.1734333038330078, 0.1393243670463562, 0.17994405329227448, -0.020907588303089142, 0.04133991152048111, -0.20815600454807281, 0.028387507423758507, -0.13491807878017426, -0.04747273027896881, 0.5747933983802795, 0.24731671810150146, -0.19312864542007446, 0.007399104535579681, -0.05638381838798523, -0.095033660531044, 0.22348478436470032, -0.052073556929826736, 0.1890355944633484, 0.07327800244092941, 0.22336962819099426, -0.08493159711360931, 0.22737082839012146, 0.20469985902309418, 0.19900789856910706, 0.2141193151473999, -0.09260844439268112, -0.06868143379688263, -0.22866711020469666, 0.2874104976654053, 0.21486905217170715, 0.0324278362095356, -0.014420945197343826, -0.29639217257499695, 0.0025037676095962524, 0.22510965168476105, -0.06385166943073273, 0.26787787675857544, 0.17269733548164368, -0.1246882975101471, -0.007548699155449867, 0.0018168417736887932, -0.10727756470441818, 0.4460032880306244, 0.05648064985871315, 0.26112085580825806, -0.01663164049386978, -0.10843133926391602, -0.019783321768045425, -0.24262523651123047, -0.2545621395111084, 0.027843425050377846, 0.22426822781562805, -0.42473074793815613, 0.03568001836538315, -0.2087249755859375, -0.6600086092948914, -0.23596197366714478, -0.04944504052400589, -0.16059798002243042, -0.5055601000785828, -0.1612768918275833, 0.32735440135002136, 0.014643248170614243, 0.1275835484266281, -0.1205844134092331, 0.23056885600090027, 0.33199211955070496, -0.23393131792545319, -0.41851937770843506, -0.17342683672904968, -0.29965323209762573, -0.0336429625749588, 0.11222244799137115, 0.1323731392621994, 0.13859957456588745, 0.11391324549913406, -0.03066333383321762, -0.06609896570444107, -0.005705982446670532, 0.21524789929389954, -0.10905635356903076, 0.12350984662771225, 0.26501843333244324, 0.37770408391952515, -0.23895637691020966, -0.09747099131345749, 0.3813406229019165, 0.002662450075149536, 0.17148081958293915, 0.319891095161438, 0.0355910025537014, -0.07547998428344727, -0.10614427924156189, -0.2500559091567993, 0.05141725391149521, -0.6115214824676514, -0.17756372690200806, 0.23730559647083282, 0.00005301088094711304, 0.15428514778614044, 0.24150565266609192, 0.18054218590259552, 0.12876838445663452, 0.31766098737716675, 0.016924286261200905, -0.23874258995056152, 0.3329903781414032, -0.16931383311748505, -0.33724069595336914, -0.1376381367444992, 0.11696526408195496, 0.23388789594173431, 0.21988891065120697, -0.46016550064086914, -0.3833652436733246, 0.2961043417453766, -0.034796055406332016, 0.00652969628572464, 0.16944818198680878, 0.30624693632125854, 0.01712869480252266, 0.0924849584698677, -0.2547694742679596, -0.19896569848060608, 0.04688823223114014, -0.22227323055267334, 0.28269657492637634, 0.2882101535797119, 0.3215004801750183, -0.038475699722766876, 0.9122631549835205, 0.23742246627807617, 0.14308488368988037, 0.5309523344039917, 0.10217007249593735, 0.2991383671760559, -0.03677154332399368, -0.2422952800989151, 0.23065657913684845, 0.18123674392700195, 0.13667047023773193, 0.2091345489025116, -0.2492392659187317, -0.2554642856121063, -0.4086242914199829, -0.21317745745182037, -0.2362278401851654, -0.35522136092185974, 0.1634063571691513, -0.30946406722068787, 0.2537306845188141, -0.13851073384284973, 0.2027324140071869, -0.3603166341781616, -0.09952844679355621, 0.14941783249378204, 0.14400720596313477, 0.16020119190216064, 0.1130509302020073, -0.07522587478160858, -0.0607118085026741, -0.3460041284561157, 0.33446696400642395, -0.12067767232656479, 0.37338876724243164, -0.05666326731443405, 0.06553639471530914, 0.03896048292517662, -0.05802919343113899, 0.7135969996452332, -0.301006019115448, -0.0036398954689502716, 0.24828392267227173, 0.22073766589164734, -0.6750031113624573, 0.11390691995620728, -0.1122860461473465, 0.25481006503105164, 0.004969252273440361, -0.3782780170440674, -0.47978371381759644, -0.1921137273311615, 0.17425481975078583, -0.07232878357172012, -0.16526760160923004, -0.08825350552797318, -0.22019034624099731, -0.32471612095832825, -0.3097022473812103, -0.10598345845937729, -0.04440531134605408, 0.4491245448589325, 0.2301395833492279, 0.2729755640029907, -0.14226137101650238, 0.0037107914686203003, -0.02312144637107849, -0.12722590565681458, 0.14489838480949402, -0.02032293565571308, -0.23666390776634216, -0.19474902749061584, 0.5161571502685547, -0.5861024260520935, 0.3650772273540497, 0.2983982264995575, -0.630766749382019, -0.048727840185165405, -0.01852080225944519, 0.2841161787509918, 0.21166306734085083, -0.3109893798828125, 0.05280722677707672, -0.049028173089027405, -0.1705610156059265, -0.0002033757045865059, 0.2304159551858902, 0.410717248916626, -0.3813048303127289, -0.05218612402677536, -0.562923789024353, 0.43746814131736755, -0.1350966840982437, -0.010410606861114502, 0.2742975354194641, -0.12945732474327087, -0.18843135237693787, 0.6053568720817566, -0.03186023235321045, 0.974200427532196, 0.20215387642383575, 0.18851755559444427, 0.4231545627117157, -0.12777763605117798, 0.6227626800537109, -0.12437362968921661, 0.3219042420387268, -0.389395147562027, 0.04144716635346413, -0.06381424516439438, -0.17461052536964417, -0.09305546432733536, 0.13327567279338837, -0.2606726586818695, 0.27748823165893555, 0.07044985890388489, -0.0549803264439106, 0.08896133303642273, 0.12558652460575104, 0.11164557188749313, -0.10677196085453033, -0.5512526035308838, 0.05779718607664108, -0.450273334980011, 0.0162904504686594, -0.07299469411373138, -0.1618126481771469, 0.07739873230457306, -0.5212675929069519, -0.10292293131351471, 0.16554731130599976, -0.24027131497859955, 0.15570159256458282, -0.05653655156493187, -0.25477373600006104, 0.18542292714118958, 0.3622998595237732, -0.020917139947414398, 0.056943379342556, -0.19946584105491638, 0.31148001551628113, -0.5459018349647522, -0.0695616751909256, -0.15938057005405426, 0.30238449573516846, 0.2848658859729767, -0.02513006143271923, -0.1467432826757431, 0.3340928852558136, -0.16597118973731995, -0.6099501848220825, -0.04951724410057068, -0.08532610535621643, 0.44318413734436035, -0.03684760257601738, -0.2056552767753601, 0.0775676742196083, -0.15242069959640503, 0.03554219380021095, 0.039507701992988586, 0.02449333667755127, -0.2060188353061676, 0.06885058432817459, -0.052899014204740524, 0.0025281906127929688, 0.17371514439582825, 0.47718125581741333, 0.05809301882982254, 0.025352299213409424, 0.5821671485900879, 0.2740309238433838, -0.025716936215758324, -0.15860101580619812, -0.23228132724761963, -0.34093207120895386, -0.6085476875305176, 0.1990729421377182, 0.30444541573524475, 0.062134236097335815, 0.08742491900920868, 0.20383939146995544, -0.07797285169363022, 0.17050451040267944, 0.05609018728137016, -0.30495792627334595, 0.11341378837823868, 0.20601914823055267, -0.24361936748027802, -0.06297625601291656, 0.430572509765625, -0.032395876944065094, 0.3100130558013916, -0.14917655289173126, -0.1858067810535431, -0.12412477284669876, -0.18789096176624298, 0.13581904768943787, 0.1600102335214615, -0.2263956367969513, -0.11575767397880554, 0.2592064142227173, 0.07067099213600159, -0.24402807652950287, -0.2439689338207245, -0.060357965528964996, -0.1667722910642624, 0.20025977492332458, 0.22434747219085693, 0.12141037732362747, -0.12901955842971802, -0.4042981266975403, -0.12375012040138245, -0.18162889778614044, 0.02258993685245514, -0.14268240332603455, -0.24291034042835236, 0.05574445053935051, 0.15041452646255493, 0.36744004487991333, -0.5081486105918884, 0.1975678950548172, 0.07603827118873596, -0.09267058968544006, 0.21329306066036224, 0.19161178171634674, 0.2624576985836029, -0.049692582339048386, -0.4662696123123169, 0.1615176498889923, 0.2004987895488739, -0.03445511311292648, 0.5295457243919373, -0.18402647972106934, -0.11347800493240356, -0.1094243973493576, -0.08067693561315536, 0.08077783137559891, -0.1513763964176178, 0.01179732196033001, 0.06921054422855377, 0.033274415880441666, -0.15379439294338226, 0.04944650083780289, 0.3225937783718109, 0.2039947211742401, -0.06518562883138657, 0.0736156553030014, -0.08708605170249939, -0.3661136031150818, 0.20963312685489655, 0.11635292321443558, 0.36336153745651245, -0.1511392891407013, -0.11197607219219208, 0.13394995033740997, -0.0349586084485054, -0.08543752133846283, -0.05279737710952759, 0.2270282655954361, 0.053738851100206375, 0.2903498709201813, -0.14447841048240662, 0.05437575280666351, -0.05644006282091141, -0.3188202679157257, -0.04710402339696884, -0.15345355868339539, 0.2008984535932541, 0.48627692461013794, 0.1516946405172348, 0.14434556663036346, -0.1632334291934967, 0.19970647990703583, 0.048234011977910995, 0.11419011652469635, -0.27211713790893555, 0.160495325922966, 0.01828007772564888, 0.03101927787065506, -0.6282178163528442, -0.015780486166477203, -0.43275630474090576, -0.1448921114206314, -0.0049456022679805756, -0.16302302479743958, -0.030058592557907104, 0.21194282174110413, -0.11699871718883514, -0.3793834149837494, 0.21547287702560425, 0.12184824794530869, -0.033338598906993866, -0.1512892246246338, 0.20378048717975616, 0.08548682928085327, 0.11784330755472183, 0.1998898684978485, 0.2706083655357361, 0.35406485199928284, 0.4170278310775757, -0.26989489793777466, -0.16933026909828186, 0.2886008024215698, 0.0005995780229568481, -0.2072155624628067, -0.061468400061130524, 0.0971708595752716, 0.3210926949977875, 0.39598149061203003, 0.07382867485284805, 0.014399259351193905, -0.008513614535331726, 0.1275811642408371, -0.061320800334215164, -0.23826301097869873, 0.4723813831806183, -0.04635246843099594, -0.09188411384820938, -0.3303666114807129, 0.03290336951613426, -0.5663151144981384, 0.32977399230003357, 0.05953260511159897, 0.357300728559494, -0.010647852905094624, -0.2045571655035019, -0.019938796758651733, -0.0656270980834961, 0.3586007058620453, 0.3856925964355469, 0.3740825355052948, -0.3091631531715393, -0.42480576038360596, -0.4309857189655304, 0.15818768739700317, 0.16397491097450256, -0.24111637473106384, 0.10705924034118652, 0.19989626109600067, 0.28318318724632263, 0.24040493369102478, -0.10748283565044403, -0.2510271668434143, -0.055724963545799255, 0.17863766849040985, -0.21893669664859772, -0.28950056433677673, 0.20643950998783112, 0.06966327130794525, -0.19365616142749786, -0.21789062023162842, -0.14199407398700714, 0.008384733460843563, 0.09180434793233871, -0.1656750589609146, -0.3625209629535675, 0.14771771430969238, 0.08224058151245117, -0.02181561291217804, -0.025665977969765663, 0.44746193289756775, 0.05808982998132706, -0.0019741784781217575, -0.18325412273406982, -0.07431686669588089, -0.16902171075344086, -0.2816391587257385, -0.15470761060714722, 0.5438709259033203, -0.22133252024650574, 0.25255677103996277, -0.3257884979248047, 0.2445085197687149, -0.13348236680030823, 0.3438487648963928, -0.14660201966762543, 0.06482987105846405, -0.4684082269668579, 0.3983725607395172, -0.13448017835617065, -0.06758540123701096, -0.02555328607559204, 0.14621901512145996, -0.4820401668548584, -0.27300751209259033, 0.5664798021316528, -0.5063450336456299, -0.23137356340885162, 0.006317099556326866, 0.21578657627105713, -0.4116666913032532, 0.33542600274086, -0.35841208696365356, -0.03860631212592125, 0.28557854890823364, -0.06732425093650818, -0.14448514580726624, 0.16551655530929565, -0.04760986566543579, 0.11225058138370514, -0.08310580998659134, -0.5315552949905396, 0.04379883036017418, -0.13350924849510193, -0.13964027166366577, -0.2604455351829529 ]
https://github.com/huggingface/datasets/issues/508
TypeError: Receiver() takes no arguments
apache-beam==2.23.0 nlp==0.4.0 For me this was resolved by running the same python script on Linux (or really WSL).
I am trying to load a wikipedia data set ``` import nlp from nlp import load_dataset dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner') #dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner') ``` This fails in the apache beam runner. ``` Traceback (most recent call last): File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module> dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner') File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset builder_instance.download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare self._download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare pipeline_results = pipeline.run() File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run return self.runner.run_pipeline(self, self._options) .... File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded self.output(decoded_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast return type(*args) TypeError: Receiver() takes no arguments ``` This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump.
18
TypeError: Receiver() takes no arguments I am trying to load a wikipedia data set ``` import nlp from nlp import load_dataset dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner') #dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner') ``` This fails in the apache beam runner. ``` Traceback (most recent call last): File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module> dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner') File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset builder_instance.download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare self._download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare pipeline_results = pipeline.run() File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run return self.runner.run_pipeline(self, self._options) .... File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded self.output(decoded_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast return type(*args) TypeError: Receiver() takes no arguments ``` This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump. apache-beam==2.23.0 nlp==0.4.0 For me this was resolved by running the same python script on Linux (or really WSL).
[ -0.09465459734201431, 0.31812790036201477, 0.08749520778656006, 0.36292457580566406, 0.27407902479171753, -0.09895393997430801, 0.2871827781200409, 0.23696589469909668, -0.028674453496932983, 0.0688418447971344, 0.2388477623462677, 0.3297024071216583, -0.0908716693520546, -0.33632346987724304, 0.17512521147727966, -0.5368744134902954, -0.2141876518726349, 0.19479453563690186, -0.23295363783836365, -0.18508782982826233, -0.14422693848609924, 0.3994992971420288, -0.3325718641281128, -0.07246395945549011, -0.14122816920280457, 0.10274539142847061, -0.0761774554848671, 0.17535367608070374, -0.11846441775560379, -0.33603641390800476, 0.19669990241527557, -0.06736253201961517, 0.07337987422943115, 0.2750072777271271, -0.00012450852955225855, 0.3304244875907898, 0.6380142569541931, -0.1410854011774063, -0.5410768985748291, -0.06318436563014984, -0.08117736130952835, -0.23492592573165894, 0.1993422955274582, -0.2498537302017212, -0.20832398533821106, -0.2352614849805832, 0.10239588469266891, -0.058137014508247375, 0.3563391864299774, 0.2815552055835724, 0.0985950455069542, 0.1995164304971695, 0.18262498080730438, -0.13684247434139252, 0.5043618083000183, 0.04321516305208206, 0.05619574338197708, 0.03617449104785919, -0.227419912815094, 0.23722510039806366, -0.2068561315536499, 0.045931652188301086, -0.2663235068321228, -0.05787007138133049, 0.3306712806224823, -0.2204921692609787, 0.08741341531276703, 0.17523053288459778, -0.09427771717309952, -0.010446377098560333, 0.8057677149772644, 0.005263306200504303, 0.06409471482038498, -0.20121285319328308, 0.0806407704949379, -0.19088558852672577, 0.23831966519355774, 0.07156190276145935, -0.45435306429862976, -0.1370181292295456, 0.11433374136686325, -0.12816913425922394, -0.3413942754268646, 0.33527112007141113, -0.03350250422954559, 0.40751761198043823, -0.023008711636066437, 0.3289753794670105, 0.14224928617477417, 0.12647685408592224, 0.20727288722991943, -0.2324923276901245, -0.12685495615005493, 0.1452389359474182, -0.3808573782444, 0.1748373955488205, 0.1763758659362793, 0.29668912291526794, -0.0637696385383606, 0.1829947680234909, 0.09322760254144669, -0.18650752305984497, 0.07350432872772217, 0.12764932215213776, 0.3398435413837433, 0.12092888355255127, 0.13197268545627594, 0.01271516177803278, 0.004744917154312134, -0.0747600719332695, 0.024964910000562668, 0.032071553170681, -0.023613877594470978, -0.36054524779319763, -0.2406119853258133, 0.22457391023635864, 0.23575414717197418, -0.048562295734882355, 0.04526901990175247, -0.21168459951877594, -0.3131868839263916, -0.20823363959789276, 0.16942796111106873, 0.45601731538772583, 0.053724054247140884, 0.4907967448234558, 0.31388038396835327, 0.16133356094360352, -0.12674683332443237, -0.5722317099571228, -0.18037046492099762, 0.31715553998947144, -0.1612577587366104, -0.16374269127845764, 0.3268581032752991, 0.061369795352220535, 0.28652212023735046, -0.2762351632118225, 0.18724188208580017, 0.17346623539924622, -0.01680022105574608, -0.15872305631637573, -0.2288753092288971, 0.17436541616916656, 0.1935793161392212, 0.2789788544178009, 0.2141340970993042, -0.27453070878982544, 0.01891489326953888, 0.20865574479103088, -0.22238579392433167, -0.16894857585430145, 0.2648104727268219, 0.042568307369947433, 0.10715511441230774, -0.13842983543872833, -0.5075434446334839, 0.11159713566303253, -0.13575375080108643, -0.2659590244293213, -0.26108747720718384, -0.2019340544939041, -0.0996069461107254, -0.22975607216358185, 0.37678006291389465, 0.5294705033302307, -0.09896785020828247, -0.029180023819208145, -0.006314704194664955, 0.1354214996099472, 0.08295250684022903, 0.03577988222241402, -0.31141266226768494, 0.4921749532222748, -0.17608346045017242, -0.1047419086098671, 0.868654191493988, -0.5204974412918091, -0.05067618191242218, 0.36399954557418823, 0.11729881167411804, -0.07188747823238373, 0.3070547878742218, 0.061870358884334564, 0.11707405745983124, -0.0958947017788887, 0.031752098351716995, 0.40219807624816895, -0.04654417932033539, 0.02345523051917553, -0.153348907828331, 0.039001233875751495, 0.2969607710838318, 0.3607644736766815, 0.09343047440052032, 0.22124212980270386, -0.273481547832489, 0.49476853013038635, 0.2071569561958313, 0.003739055246114731, 0.06056760251522064, 0.512398362159729, -0.3901422619819641, -0.08273251354694366, 0.039027485996484756, 0.11307761818170547, 0.026666097342967987, -0.048862941563129425, -0.13351140916347504, 0.15623116493225098, 0.16262656450271606, 0.16144663095474243, -0.42750486731529236, 0.02301461063325405, -0.08307884633541107, 0.042762454599142075, 0.05673959106206894, 0.2840372920036316, -0.19372090697288513, 0.25803083181381226, 0.028549280017614365, 0.3317645192146301, 0.017510415986180305, -0.023407315835356712, -0.3775363564491272, 0.20459315180778503, -0.12002024799585342, -0.2554771304130554, 0.2829669415950775, -0.022837452590465546, 0.45617058873176575, 0.042087603360414505, -0.1734333038330078, 0.1393243670463562, 0.17994405329227448, -0.020907588303089142, 0.04133991152048111, -0.20815600454807281, 0.028387507423758507, -0.13491807878017426, -0.04747273027896881, 0.5747933983802795, 0.24731671810150146, -0.19312864542007446, 0.007399104535579681, -0.05638381838798523, -0.095033660531044, 0.22348478436470032, -0.052073556929826736, 0.1890355944633484, 0.07327800244092941, 0.22336962819099426, -0.08493159711360931, 0.22737082839012146, 0.20469985902309418, 0.19900789856910706, 0.2141193151473999, -0.09260844439268112, -0.06868143379688263, -0.22866711020469666, 0.2874104976654053, 0.21486905217170715, 0.0324278362095356, -0.014420945197343826, -0.29639217257499695, 0.0025037676095962524, 0.22510965168476105, -0.06385166943073273, 0.26787787675857544, 0.17269733548164368, -0.1246882975101471, -0.007548699155449867, 0.0018168417736887932, -0.10727756470441818, 0.4460032880306244, 0.05648064985871315, 0.26112085580825806, -0.01663164049386978, -0.10843133926391602, -0.019783321768045425, -0.24262523651123047, -0.2545621395111084, 0.027843425050377846, 0.22426822781562805, -0.42473074793815613, 0.03568001836538315, -0.2087249755859375, -0.6600086092948914, -0.23596197366714478, -0.04944504052400589, -0.16059798002243042, -0.5055601000785828, -0.1612768918275833, 0.32735440135002136, 0.014643248170614243, 0.1275835484266281, -0.1205844134092331, 0.23056885600090027, 0.33199211955070496, -0.23393131792545319, -0.41851937770843506, -0.17342683672904968, -0.29965323209762573, -0.0336429625749588, 0.11222244799137115, 0.1323731392621994, 0.13859957456588745, 0.11391324549913406, -0.03066333383321762, -0.06609896570444107, -0.005705982446670532, 0.21524789929389954, -0.10905635356903076, 0.12350984662771225, 0.26501843333244324, 0.37770408391952515, -0.23895637691020966, -0.09747099131345749, 0.3813406229019165, 0.002662450075149536, 0.17148081958293915, 0.319891095161438, 0.0355910025537014, -0.07547998428344727, -0.10614427924156189, -0.2500559091567993, 0.05141725391149521, -0.6115214824676514, -0.17756372690200806, 0.23730559647083282, 0.00005301088094711304, 0.15428514778614044, 0.24150565266609192, 0.18054218590259552, 0.12876838445663452, 0.31766098737716675, 0.016924286261200905, -0.23874258995056152, 0.3329903781414032, -0.16931383311748505, -0.33724069595336914, -0.1376381367444992, 0.11696526408195496, 0.23388789594173431, 0.21988891065120697, -0.46016550064086914, -0.3833652436733246, 0.2961043417453766, -0.034796055406332016, 0.00652969628572464, 0.16944818198680878, 0.30624693632125854, 0.01712869480252266, 0.0924849584698677, -0.2547694742679596, -0.19896569848060608, 0.04688823223114014, -0.22227323055267334, 0.28269657492637634, 0.2882101535797119, 0.3215004801750183, -0.038475699722766876, 0.9122631549835205, 0.23742246627807617, 0.14308488368988037, 0.5309523344039917, 0.10217007249593735, 0.2991383671760559, -0.03677154332399368, -0.2422952800989151, 0.23065657913684845, 0.18123674392700195, 0.13667047023773193, 0.2091345489025116, -0.2492392659187317, -0.2554642856121063, -0.4086242914199829, -0.21317745745182037, -0.2362278401851654, -0.35522136092185974, 0.1634063571691513, -0.30946406722068787, 0.2537306845188141, -0.13851073384284973, 0.2027324140071869, -0.3603166341781616, -0.09952844679355621, 0.14941783249378204, 0.14400720596313477, 0.16020119190216064, 0.1130509302020073, -0.07522587478160858, -0.0607118085026741, -0.3460041284561157, 0.33446696400642395, -0.12067767232656479, 0.37338876724243164, -0.05666326731443405, 0.06553639471530914, 0.03896048292517662, -0.05802919343113899, 0.7135969996452332, -0.301006019115448, -0.0036398954689502716, 0.24828392267227173, 0.22073766589164734, -0.6750031113624573, 0.11390691995620728, -0.1122860461473465, 0.25481006503105164, 0.004969252273440361, -0.3782780170440674, -0.47978371381759644, -0.1921137273311615, 0.17425481975078583, -0.07232878357172012, -0.16526760160923004, -0.08825350552797318, -0.22019034624099731, -0.32471612095832825, -0.3097022473812103, -0.10598345845937729, -0.04440531134605408, 0.4491245448589325, 0.2301395833492279, 0.2729755640029907, -0.14226137101650238, 0.0037107914686203003, -0.02312144637107849, -0.12722590565681458, 0.14489838480949402, -0.02032293565571308, -0.23666390776634216, -0.19474902749061584, 0.5161571502685547, -0.5861024260520935, 0.3650772273540497, 0.2983982264995575, -0.630766749382019, -0.048727840185165405, -0.01852080225944519, 0.2841161787509918, 0.21166306734085083, -0.3109893798828125, 0.05280722677707672, -0.049028173089027405, -0.1705610156059265, -0.0002033757045865059, 0.2304159551858902, 0.410717248916626, -0.3813048303127289, -0.05218612402677536, -0.562923789024353, 0.43746814131736755, -0.1350966840982437, -0.010410606861114502, 0.2742975354194641, -0.12945732474327087, -0.18843135237693787, 0.6053568720817566, -0.03186023235321045, 0.974200427532196, 0.20215387642383575, 0.18851755559444427, 0.4231545627117157, -0.12777763605117798, 0.6227626800537109, -0.12437362968921661, 0.3219042420387268, -0.389395147562027, 0.04144716635346413, -0.06381424516439438, -0.17461052536964417, -0.09305546432733536, 0.13327567279338837, -0.2606726586818695, 0.27748823165893555, 0.07044985890388489, -0.0549803264439106, 0.08896133303642273, 0.12558652460575104, 0.11164557188749313, -0.10677196085453033, -0.5512526035308838, 0.05779718607664108, -0.450273334980011, 0.0162904504686594, -0.07299469411373138, -0.1618126481771469, 0.07739873230457306, -0.5212675929069519, -0.10292293131351471, 0.16554731130599976, -0.24027131497859955, 0.15570159256458282, -0.05653655156493187, -0.25477373600006104, 0.18542292714118958, 0.3622998595237732, -0.020917139947414398, 0.056943379342556, -0.19946584105491638, 0.31148001551628113, -0.5459018349647522, -0.0695616751909256, -0.15938057005405426, 0.30238449573516846, 0.2848658859729767, -0.02513006143271923, -0.1467432826757431, 0.3340928852558136, -0.16597118973731995, -0.6099501848220825, -0.04951724410057068, -0.08532610535621643, 0.44318413734436035, -0.03684760257601738, -0.2056552767753601, 0.0775676742196083, -0.15242069959640503, 0.03554219380021095, 0.039507701992988586, 0.02449333667755127, -0.2060188353061676, 0.06885058432817459, -0.052899014204740524, 0.0025281906127929688, 0.17371514439582825, 0.47718125581741333, 0.05809301882982254, 0.025352299213409424, 0.5821671485900879, 0.2740309238433838, -0.025716936215758324, -0.15860101580619812, -0.23228132724761963, -0.34093207120895386, -0.6085476875305176, 0.1990729421377182, 0.30444541573524475, 0.062134236097335815, 0.08742491900920868, 0.20383939146995544, -0.07797285169363022, 0.17050451040267944, 0.05609018728137016, -0.30495792627334595, 0.11341378837823868, 0.20601914823055267, -0.24361936748027802, -0.06297625601291656, 0.430572509765625, -0.032395876944065094, 0.3100130558013916, -0.14917655289173126, -0.1858067810535431, -0.12412477284669876, -0.18789096176624298, 0.13581904768943787, 0.1600102335214615, -0.2263956367969513, -0.11575767397880554, 0.2592064142227173, 0.07067099213600159, -0.24402807652950287, -0.2439689338207245, -0.060357965528964996, -0.1667722910642624, 0.20025977492332458, 0.22434747219085693, 0.12141037732362747, -0.12901955842971802, -0.4042981266975403, -0.12375012040138245, -0.18162889778614044, 0.02258993685245514, -0.14268240332603455, -0.24291034042835236, 0.05574445053935051, 0.15041452646255493, 0.36744004487991333, -0.5081486105918884, 0.1975678950548172, 0.07603827118873596, -0.09267058968544006, 0.21329306066036224, 0.19161178171634674, 0.2624576985836029, -0.049692582339048386, -0.4662696123123169, 0.1615176498889923, 0.2004987895488739, -0.03445511311292648, 0.5295457243919373, -0.18402647972106934, -0.11347800493240356, -0.1094243973493576, -0.08067693561315536, 0.08077783137559891, -0.1513763964176178, 0.01179732196033001, 0.06921054422855377, 0.033274415880441666, -0.15379439294338226, 0.04944650083780289, 0.3225937783718109, 0.2039947211742401, -0.06518562883138657, 0.0736156553030014, -0.08708605170249939, -0.3661136031150818, 0.20963312685489655, 0.11635292321443558, 0.36336153745651245, -0.1511392891407013, -0.11197607219219208, 0.13394995033740997, -0.0349586084485054, -0.08543752133846283, -0.05279737710952759, 0.2270282655954361, 0.053738851100206375, 0.2903498709201813, -0.14447841048240662, 0.05437575280666351, -0.05644006282091141, -0.3188202679157257, -0.04710402339696884, -0.15345355868339539, 0.2008984535932541, 0.48627692461013794, 0.1516946405172348, 0.14434556663036346, -0.1632334291934967, 0.19970647990703583, 0.048234011977910995, 0.11419011652469635, -0.27211713790893555, 0.160495325922966, 0.01828007772564888, 0.03101927787065506, -0.6282178163528442, -0.015780486166477203, -0.43275630474090576, -0.1448921114206314, -0.0049456022679805756, -0.16302302479743958, -0.030058592557907104, 0.21194282174110413, -0.11699871718883514, -0.3793834149837494, 0.21547287702560425, 0.12184824794530869, -0.033338598906993866, -0.1512892246246338, 0.20378048717975616, 0.08548682928085327, 0.11784330755472183, 0.1998898684978485, 0.2706083655357361, 0.35406485199928284, 0.4170278310775757, -0.26989489793777466, -0.16933026909828186, 0.2886008024215698, 0.0005995780229568481, -0.2072155624628067, -0.061468400061130524, 0.0971708595752716, 0.3210926949977875, 0.39598149061203003, 0.07382867485284805, 0.014399259351193905, -0.008513614535331726, 0.1275811642408371, -0.061320800334215164, -0.23826301097869873, 0.4723813831806183, -0.04635246843099594, -0.09188411384820938, -0.3303666114807129, 0.03290336951613426, -0.5663151144981384, 0.32977399230003357, 0.05953260511159897, 0.357300728559494, -0.010647852905094624, -0.2045571655035019, -0.019938796758651733, -0.0656270980834961, 0.3586007058620453, 0.3856925964355469, 0.3740825355052948, -0.3091631531715393, -0.42480576038360596, -0.4309857189655304, 0.15818768739700317, 0.16397491097450256, -0.24111637473106384, 0.10705924034118652, 0.19989626109600067, 0.28318318724632263, 0.24040493369102478, -0.10748283565044403, -0.2510271668434143, -0.055724963545799255, 0.17863766849040985, -0.21893669664859772, -0.28950056433677673, 0.20643950998783112, 0.06966327130794525, -0.19365616142749786, -0.21789062023162842, -0.14199407398700714, 0.008384733460843563, 0.09180434793233871, -0.1656750589609146, -0.3625209629535675, 0.14771771430969238, 0.08224058151245117, -0.02181561291217804, -0.025665977969765663, 0.44746193289756775, 0.05808982998132706, -0.0019741784781217575, -0.18325412273406982, -0.07431686669588089, -0.16902171075344086, -0.2816391587257385, -0.15470761060714722, 0.5438709259033203, -0.22133252024650574, 0.25255677103996277, -0.3257884979248047, 0.2445085197687149, -0.13348236680030823, 0.3438487648963928, -0.14660201966762543, 0.06482987105846405, -0.4684082269668579, 0.3983725607395172, -0.13448017835617065, -0.06758540123701096, -0.02555328607559204, 0.14621901512145996, -0.4820401668548584, -0.27300751209259033, 0.5664798021316528, -0.5063450336456299, -0.23137356340885162, 0.006317099556326866, 0.21578657627105713, -0.4116666913032532, 0.33542600274086, -0.35841208696365356, -0.03860631212592125, 0.28557854890823364, -0.06732425093650818, -0.14448514580726624, 0.16551655530929565, -0.04760986566543579, 0.11225058138370514, -0.08310580998659134, -0.5315552949905396, 0.04379883036017418, -0.13350924849510193, -0.13964027166366577, -0.2604455351829529 ]
https://github.com/huggingface/datasets/issues/508
TypeError: Receiver() takes no arguments
Do you manage to run a dummy beam pipeline with python on windows ? You can test a dummy pipeline with [this code](https://github.com/apache/beam/blob/master/sdks/python/apache_beam/examples/wordcount_minimal.py) If you get the same error, it means that the issue comes from apache beam. Otherwise we'll investigate what went wrong here
I am trying to load a wikipedia data set ``` import nlp from nlp import load_dataset dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner') #dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner') ``` This fails in the apache beam runner. ``` Traceback (most recent call last): File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module> dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner') File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset builder_instance.download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare self._download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare pipeline_results = pipeline.run() File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run return self.runner.run_pipeline(self, self._options) .... File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded self.output(decoded_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast return type(*args) TypeError: Receiver() takes no arguments ``` This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump.
45
TypeError: Receiver() takes no arguments I am trying to load a wikipedia data set ``` import nlp from nlp import load_dataset dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner') #dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner') ``` This fails in the apache beam runner. ``` Traceback (most recent call last): File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module> dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner') File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset builder_instance.download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare self._download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare pipeline_results = pipeline.run() File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run return self.runner.run_pipeline(self, self._options) .... File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded self.output(decoded_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast return type(*args) TypeError: Receiver() takes no arguments ``` This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump. Do you manage to run a dummy beam pipeline with python on windows ? You can test a dummy pipeline with [this code](https://github.com/apache/beam/blob/master/sdks/python/apache_beam/examples/wordcount_minimal.py) If you get the same error, it means that the issue comes from apache beam. Otherwise we'll investigate what went wrong here
[ -0.09465459734201431, 0.31812790036201477, 0.08749520778656006, 0.36292457580566406, 0.27407902479171753, -0.09895393997430801, 0.2871827781200409, 0.23696589469909668, -0.028674453496932983, 0.0688418447971344, 0.2388477623462677, 0.3297024071216583, -0.0908716693520546, -0.33632346987724304, 0.17512521147727966, -0.5368744134902954, -0.2141876518726349, 0.19479453563690186, -0.23295363783836365, -0.18508782982826233, -0.14422693848609924, 0.3994992971420288, -0.3325718641281128, -0.07246395945549011, -0.14122816920280457, 0.10274539142847061, -0.0761774554848671, 0.17535367608070374, -0.11846441775560379, -0.33603641390800476, 0.19669990241527557, -0.06736253201961517, 0.07337987422943115, 0.2750072777271271, -0.00012450852955225855, 0.3304244875907898, 0.6380142569541931, -0.1410854011774063, -0.5410768985748291, -0.06318436563014984, -0.08117736130952835, -0.23492592573165894, 0.1993422955274582, -0.2498537302017212, -0.20832398533821106, -0.2352614849805832, 0.10239588469266891, -0.058137014508247375, 0.3563391864299774, 0.2815552055835724, 0.0985950455069542, 0.1995164304971695, 0.18262498080730438, -0.13684247434139252, 0.5043618083000183, 0.04321516305208206, 0.05619574338197708, 0.03617449104785919, -0.227419912815094, 0.23722510039806366, -0.2068561315536499, 0.045931652188301086, -0.2663235068321228, -0.05787007138133049, 0.3306712806224823, -0.2204921692609787, 0.08741341531276703, 0.17523053288459778, -0.09427771717309952, -0.010446377098560333, 0.8057677149772644, 0.005263306200504303, 0.06409471482038498, -0.20121285319328308, 0.0806407704949379, -0.19088558852672577, 0.23831966519355774, 0.07156190276145935, -0.45435306429862976, -0.1370181292295456, 0.11433374136686325, -0.12816913425922394, -0.3413942754268646, 0.33527112007141113, -0.03350250422954559, 0.40751761198043823, -0.023008711636066437, 0.3289753794670105, 0.14224928617477417, 0.12647685408592224, 0.20727288722991943, -0.2324923276901245, -0.12685495615005493, 0.1452389359474182, -0.3808573782444, 0.1748373955488205, 0.1763758659362793, 0.29668912291526794, -0.0637696385383606, 0.1829947680234909, 0.09322760254144669, -0.18650752305984497, 0.07350432872772217, 0.12764932215213776, 0.3398435413837433, 0.12092888355255127, 0.13197268545627594, 0.01271516177803278, 0.004744917154312134, -0.0747600719332695, 0.024964910000562668, 0.032071553170681, -0.023613877594470978, -0.36054524779319763, -0.2406119853258133, 0.22457391023635864, 0.23575414717197418, -0.048562295734882355, 0.04526901990175247, -0.21168459951877594, -0.3131868839263916, -0.20823363959789276, 0.16942796111106873, 0.45601731538772583, 0.053724054247140884, 0.4907967448234558, 0.31388038396835327, 0.16133356094360352, -0.12674683332443237, -0.5722317099571228, -0.18037046492099762, 0.31715553998947144, -0.1612577587366104, -0.16374269127845764, 0.3268581032752991, 0.061369795352220535, 0.28652212023735046, -0.2762351632118225, 0.18724188208580017, 0.17346623539924622, -0.01680022105574608, -0.15872305631637573, -0.2288753092288971, 0.17436541616916656, 0.1935793161392212, 0.2789788544178009, 0.2141340970993042, -0.27453070878982544, 0.01891489326953888, 0.20865574479103088, -0.22238579392433167, -0.16894857585430145, 0.2648104727268219, 0.042568307369947433, 0.10715511441230774, -0.13842983543872833, -0.5075434446334839, 0.11159713566303253, -0.13575375080108643, -0.2659590244293213, -0.26108747720718384, -0.2019340544939041, -0.0996069461107254, -0.22975607216358185, 0.37678006291389465, 0.5294705033302307, -0.09896785020828247, -0.029180023819208145, -0.006314704194664955, 0.1354214996099472, 0.08295250684022903, 0.03577988222241402, -0.31141266226768494, 0.4921749532222748, -0.17608346045017242, -0.1047419086098671, 0.868654191493988, -0.5204974412918091, -0.05067618191242218, 0.36399954557418823, 0.11729881167411804, -0.07188747823238373, 0.3070547878742218, 0.061870358884334564, 0.11707405745983124, -0.0958947017788887, 0.031752098351716995, 0.40219807624816895, -0.04654417932033539, 0.02345523051917553, -0.153348907828331, 0.039001233875751495, 0.2969607710838318, 0.3607644736766815, 0.09343047440052032, 0.22124212980270386, -0.273481547832489, 0.49476853013038635, 0.2071569561958313, 0.003739055246114731, 0.06056760251522064, 0.512398362159729, -0.3901422619819641, -0.08273251354694366, 0.039027485996484756, 0.11307761818170547, 0.026666097342967987, -0.048862941563129425, -0.13351140916347504, 0.15623116493225098, 0.16262656450271606, 0.16144663095474243, -0.42750486731529236, 0.02301461063325405, -0.08307884633541107, 0.042762454599142075, 0.05673959106206894, 0.2840372920036316, -0.19372090697288513, 0.25803083181381226, 0.028549280017614365, 0.3317645192146301, 0.017510415986180305, -0.023407315835356712, -0.3775363564491272, 0.20459315180778503, -0.12002024799585342, -0.2554771304130554, 0.2829669415950775, -0.022837452590465546, 0.45617058873176575, 0.042087603360414505, -0.1734333038330078, 0.1393243670463562, 0.17994405329227448, -0.020907588303089142, 0.04133991152048111, -0.20815600454807281, 0.028387507423758507, -0.13491807878017426, -0.04747273027896881, 0.5747933983802795, 0.24731671810150146, -0.19312864542007446, 0.007399104535579681, -0.05638381838798523, -0.095033660531044, 0.22348478436470032, -0.052073556929826736, 0.1890355944633484, 0.07327800244092941, 0.22336962819099426, -0.08493159711360931, 0.22737082839012146, 0.20469985902309418, 0.19900789856910706, 0.2141193151473999, -0.09260844439268112, -0.06868143379688263, -0.22866711020469666, 0.2874104976654053, 0.21486905217170715, 0.0324278362095356, -0.014420945197343826, -0.29639217257499695, 0.0025037676095962524, 0.22510965168476105, -0.06385166943073273, 0.26787787675857544, 0.17269733548164368, -0.1246882975101471, -0.007548699155449867, 0.0018168417736887932, -0.10727756470441818, 0.4460032880306244, 0.05648064985871315, 0.26112085580825806, -0.01663164049386978, -0.10843133926391602, -0.019783321768045425, -0.24262523651123047, -0.2545621395111084, 0.027843425050377846, 0.22426822781562805, -0.42473074793815613, 0.03568001836538315, -0.2087249755859375, -0.6600086092948914, -0.23596197366714478, -0.04944504052400589, -0.16059798002243042, -0.5055601000785828, -0.1612768918275833, 0.32735440135002136, 0.014643248170614243, 0.1275835484266281, -0.1205844134092331, 0.23056885600090027, 0.33199211955070496, -0.23393131792545319, -0.41851937770843506, -0.17342683672904968, -0.29965323209762573, -0.0336429625749588, 0.11222244799137115, 0.1323731392621994, 0.13859957456588745, 0.11391324549913406, -0.03066333383321762, -0.06609896570444107, -0.005705982446670532, 0.21524789929389954, -0.10905635356903076, 0.12350984662771225, 0.26501843333244324, 0.37770408391952515, -0.23895637691020966, -0.09747099131345749, 0.3813406229019165, 0.002662450075149536, 0.17148081958293915, 0.319891095161438, 0.0355910025537014, -0.07547998428344727, -0.10614427924156189, -0.2500559091567993, 0.05141725391149521, -0.6115214824676514, -0.17756372690200806, 0.23730559647083282, 0.00005301088094711304, 0.15428514778614044, 0.24150565266609192, 0.18054218590259552, 0.12876838445663452, 0.31766098737716675, 0.016924286261200905, -0.23874258995056152, 0.3329903781414032, -0.16931383311748505, -0.33724069595336914, -0.1376381367444992, 0.11696526408195496, 0.23388789594173431, 0.21988891065120697, -0.46016550064086914, -0.3833652436733246, 0.2961043417453766, -0.034796055406332016, 0.00652969628572464, 0.16944818198680878, 0.30624693632125854, 0.01712869480252266, 0.0924849584698677, -0.2547694742679596, -0.19896569848060608, 0.04688823223114014, -0.22227323055267334, 0.28269657492637634, 0.2882101535797119, 0.3215004801750183, -0.038475699722766876, 0.9122631549835205, 0.23742246627807617, 0.14308488368988037, 0.5309523344039917, 0.10217007249593735, 0.2991383671760559, -0.03677154332399368, -0.2422952800989151, 0.23065657913684845, 0.18123674392700195, 0.13667047023773193, 0.2091345489025116, -0.2492392659187317, -0.2554642856121063, -0.4086242914199829, -0.21317745745182037, -0.2362278401851654, -0.35522136092185974, 0.1634063571691513, -0.30946406722068787, 0.2537306845188141, -0.13851073384284973, 0.2027324140071869, -0.3603166341781616, -0.09952844679355621, 0.14941783249378204, 0.14400720596313477, 0.16020119190216064, 0.1130509302020073, -0.07522587478160858, -0.0607118085026741, -0.3460041284561157, 0.33446696400642395, -0.12067767232656479, 0.37338876724243164, -0.05666326731443405, 0.06553639471530914, 0.03896048292517662, -0.05802919343113899, 0.7135969996452332, -0.301006019115448, -0.0036398954689502716, 0.24828392267227173, 0.22073766589164734, -0.6750031113624573, 0.11390691995620728, -0.1122860461473465, 0.25481006503105164, 0.004969252273440361, -0.3782780170440674, -0.47978371381759644, -0.1921137273311615, 0.17425481975078583, -0.07232878357172012, -0.16526760160923004, -0.08825350552797318, -0.22019034624099731, -0.32471612095832825, -0.3097022473812103, -0.10598345845937729, -0.04440531134605408, 0.4491245448589325, 0.2301395833492279, 0.2729755640029907, -0.14226137101650238, 0.0037107914686203003, -0.02312144637107849, -0.12722590565681458, 0.14489838480949402, -0.02032293565571308, -0.23666390776634216, -0.19474902749061584, 0.5161571502685547, -0.5861024260520935, 0.3650772273540497, 0.2983982264995575, -0.630766749382019, -0.048727840185165405, -0.01852080225944519, 0.2841161787509918, 0.21166306734085083, -0.3109893798828125, 0.05280722677707672, -0.049028173089027405, -0.1705610156059265, -0.0002033757045865059, 0.2304159551858902, 0.410717248916626, -0.3813048303127289, -0.05218612402677536, -0.562923789024353, 0.43746814131736755, -0.1350966840982437, -0.010410606861114502, 0.2742975354194641, -0.12945732474327087, -0.18843135237693787, 0.6053568720817566, -0.03186023235321045, 0.974200427532196, 0.20215387642383575, 0.18851755559444427, 0.4231545627117157, -0.12777763605117798, 0.6227626800537109, -0.12437362968921661, 0.3219042420387268, -0.389395147562027, 0.04144716635346413, -0.06381424516439438, -0.17461052536964417, -0.09305546432733536, 0.13327567279338837, -0.2606726586818695, 0.27748823165893555, 0.07044985890388489, -0.0549803264439106, 0.08896133303642273, 0.12558652460575104, 0.11164557188749313, -0.10677196085453033, -0.5512526035308838, 0.05779718607664108, -0.450273334980011, 0.0162904504686594, -0.07299469411373138, -0.1618126481771469, 0.07739873230457306, -0.5212675929069519, -0.10292293131351471, 0.16554731130599976, -0.24027131497859955, 0.15570159256458282, -0.05653655156493187, -0.25477373600006104, 0.18542292714118958, 0.3622998595237732, -0.020917139947414398, 0.056943379342556, -0.19946584105491638, 0.31148001551628113, -0.5459018349647522, -0.0695616751909256, -0.15938057005405426, 0.30238449573516846, 0.2848658859729767, -0.02513006143271923, -0.1467432826757431, 0.3340928852558136, -0.16597118973731995, -0.6099501848220825, -0.04951724410057068, -0.08532610535621643, 0.44318413734436035, -0.03684760257601738, -0.2056552767753601, 0.0775676742196083, -0.15242069959640503, 0.03554219380021095, 0.039507701992988586, 0.02449333667755127, -0.2060188353061676, 0.06885058432817459, -0.052899014204740524, 0.0025281906127929688, 0.17371514439582825, 0.47718125581741333, 0.05809301882982254, 0.025352299213409424, 0.5821671485900879, 0.2740309238433838, -0.025716936215758324, -0.15860101580619812, -0.23228132724761963, -0.34093207120895386, -0.6085476875305176, 0.1990729421377182, 0.30444541573524475, 0.062134236097335815, 0.08742491900920868, 0.20383939146995544, -0.07797285169363022, 0.17050451040267944, 0.05609018728137016, -0.30495792627334595, 0.11341378837823868, 0.20601914823055267, -0.24361936748027802, -0.06297625601291656, 0.430572509765625, -0.032395876944065094, 0.3100130558013916, -0.14917655289173126, -0.1858067810535431, -0.12412477284669876, -0.18789096176624298, 0.13581904768943787, 0.1600102335214615, -0.2263956367969513, -0.11575767397880554, 0.2592064142227173, 0.07067099213600159, -0.24402807652950287, -0.2439689338207245, -0.060357965528964996, -0.1667722910642624, 0.20025977492332458, 0.22434747219085693, 0.12141037732362747, -0.12901955842971802, -0.4042981266975403, -0.12375012040138245, -0.18162889778614044, 0.02258993685245514, -0.14268240332603455, -0.24291034042835236, 0.05574445053935051, 0.15041452646255493, 0.36744004487991333, -0.5081486105918884, 0.1975678950548172, 0.07603827118873596, -0.09267058968544006, 0.21329306066036224, 0.19161178171634674, 0.2624576985836029, -0.049692582339048386, -0.4662696123123169, 0.1615176498889923, 0.2004987895488739, -0.03445511311292648, 0.5295457243919373, -0.18402647972106934, -0.11347800493240356, -0.1094243973493576, -0.08067693561315536, 0.08077783137559891, -0.1513763964176178, 0.01179732196033001, 0.06921054422855377, 0.033274415880441666, -0.15379439294338226, 0.04944650083780289, 0.3225937783718109, 0.2039947211742401, -0.06518562883138657, 0.0736156553030014, -0.08708605170249939, -0.3661136031150818, 0.20963312685489655, 0.11635292321443558, 0.36336153745651245, -0.1511392891407013, -0.11197607219219208, 0.13394995033740997, -0.0349586084485054, -0.08543752133846283, -0.05279737710952759, 0.2270282655954361, 0.053738851100206375, 0.2903498709201813, -0.14447841048240662, 0.05437575280666351, -0.05644006282091141, -0.3188202679157257, -0.04710402339696884, -0.15345355868339539, 0.2008984535932541, 0.48627692461013794, 0.1516946405172348, 0.14434556663036346, -0.1632334291934967, 0.19970647990703583, 0.048234011977910995, 0.11419011652469635, -0.27211713790893555, 0.160495325922966, 0.01828007772564888, 0.03101927787065506, -0.6282178163528442, -0.015780486166477203, -0.43275630474090576, -0.1448921114206314, -0.0049456022679805756, -0.16302302479743958, -0.030058592557907104, 0.21194282174110413, -0.11699871718883514, -0.3793834149837494, 0.21547287702560425, 0.12184824794530869, -0.033338598906993866, -0.1512892246246338, 0.20378048717975616, 0.08548682928085327, 0.11784330755472183, 0.1998898684978485, 0.2706083655357361, 0.35406485199928284, 0.4170278310775757, -0.26989489793777466, -0.16933026909828186, 0.2886008024215698, 0.0005995780229568481, -0.2072155624628067, -0.061468400061130524, 0.0971708595752716, 0.3210926949977875, 0.39598149061203003, 0.07382867485284805, 0.014399259351193905, -0.008513614535331726, 0.1275811642408371, -0.061320800334215164, -0.23826301097869873, 0.4723813831806183, -0.04635246843099594, -0.09188411384820938, -0.3303666114807129, 0.03290336951613426, -0.5663151144981384, 0.32977399230003357, 0.05953260511159897, 0.357300728559494, -0.010647852905094624, -0.2045571655035019, -0.019938796758651733, -0.0656270980834961, 0.3586007058620453, 0.3856925964355469, 0.3740825355052948, -0.3091631531715393, -0.42480576038360596, -0.4309857189655304, 0.15818768739700317, 0.16397491097450256, -0.24111637473106384, 0.10705924034118652, 0.19989626109600067, 0.28318318724632263, 0.24040493369102478, -0.10748283565044403, -0.2510271668434143, -0.055724963545799255, 0.17863766849040985, -0.21893669664859772, -0.28950056433677673, 0.20643950998783112, 0.06966327130794525, -0.19365616142749786, -0.21789062023162842, -0.14199407398700714, 0.008384733460843563, 0.09180434793233871, -0.1656750589609146, -0.3625209629535675, 0.14771771430969238, 0.08224058151245117, -0.02181561291217804, -0.025665977969765663, 0.44746193289756775, 0.05808982998132706, -0.0019741784781217575, -0.18325412273406982, -0.07431686669588089, -0.16902171075344086, -0.2816391587257385, -0.15470761060714722, 0.5438709259033203, -0.22133252024650574, 0.25255677103996277, -0.3257884979248047, 0.2445085197687149, -0.13348236680030823, 0.3438487648963928, -0.14660201966762543, 0.06482987105846405, -0.4684082269668579, 0.3983725607395172, -0.13448017835617065, -0.06758540123701096, -0.02555328607559204, 0.14621901512145996, -0.4820401668548584, -0.27300751209259033, 0.5664798021316528, -0.5063450336456299, -0.23137356340885162, 0.006317099556326866, 0.21578657627105713, -0.4116666913032532, 0.33542600274086, -0.35841208696365356, -0.03860631212592125, 0.28557854890823364, -0.06732425093650818, -0.14448514580726624, 0.16551655530929565, -0.04760986566543579, 0.11225058138370514, -0.08310580998659134, -0.5315552949905396, 0.04379883036017418, -0.13350924849510193, -0.13964027166366577, -0.2604455351829529 ]
https://github.com/huggingface/datasets/issues/508
TypeError: Receiver() takes no arguments
Still, same error, so I guess it is on apache beam then. Thanks for the investigation.
I am trying to load a wikipedia data set ``` import nlp from nlp import load_dataset dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner') #dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner') ``` This fails in the apache beam runner. ``` Traceback (most recent call last): File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module> dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner') File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset builder_instance.download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare self._download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare pipeline_results = pipeline.run() File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run return self.runner.run_pipeline(self, self._options) .... File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded self.output(decoded_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast return type(*args) TypeError: Receiver() takes no arguments ``` This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump.
16
TypeError: Receiver() takes no arguments I am trying to load a wikipedia data set ``` import nlp from nlp import load_dataset dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner') #dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner') ``` This fails in the apache beam runner. ``` Traceback (most recent call last): File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module> dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner') File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset builder_instance.download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare self._download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare pipeline_results = pipeline.run() File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run return self.runner.run_pipeline(self, self._options) .... File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded self.output(decoded_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast return type(*args) TypeError: Receiver() takes no arguments ``` This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump. Still, same error, so I guess it is on apache beam then. Thanks for the investigation.
[ -0.09465459734201431, 0.31812790036201477, 0.08749520778656006, 0.36292457580566406, 0.27407902479171753, -0.09895393997430801, 0.2871827781200409, 0.23696589469909668, -0.028674453496932983, 0.0688418447971344, 0.2388477623462677, 0.3297024071216583, -0.0908716693520546, -0.33632346987724304, 0.17512521147727966, -0.5368744134902954, -0.2141876518726349, 0.19479453563690186, -0.23295363783836365, -0.18508782982826233, -0.14422693848609924, 0.3994992971420288, -0.3325718641281128, -0.07246395945549011, -0.14122816920280457, 0.10274539142847061, -0.0761774554848671, 0.17535367608070374, -0.11846441775560379, -0.33603641390800476, 0.19669990241527557, -0.06736253201961517, 0.07337987422943115, 0.2750072777271271, -0.00012450852955225855, 0.3304244875907898, 0.6380142569541931, -0.1410854011774063, -0.5410768985748291, -0.06318436563014984, -0.08117736130952835, -0.23492592573165894, 0.1993422955274582, -0.2498537302017212, -0.20832398533821106, -0.2352614849805832, 0.10239588469266891, -0.058137014508247375, 0.3563391864299774, 0.2815552055835724, 0.0985950455069542, 0.1995164304971695, 0.18262498080730438, -0.13684247434139252, 0.5043618083000183, 0.04321516305208206, 0.05619574338197708, 0.03617449104785919, -0.227419912815094, 0.23722510039806366, -0.2068561315536499, 0.045931652188301086, -0.2663235068321228, -0.05787007138133049, 0.3306712806224823, -0.2204921692609787, 0.08741341531276703, 0.17523053288459778, -0.09427771717309952, -0.010446377098560333, 0.8057677149772644, 0.005263306200504303, 0.06409471482038498, -0.20121285319328308, 0.0806407704949379, -0.19088558852672577, 0.23831966519355774, 0.07156190276145935, -0.45435306429862976, -0.1370181292295456, 0.11433374136686325, -0.12816913425922394, -0.3413942754268646, 0.33527112007141113, -0.03350250422954559, 0.40751761198043823, -0.023008711636066437, 0.3289753794670105, 0.14224928617477417, 0.12647685408592224, 0.20727288722991943, -0.2324923276901245, -0.12685495615005493, 0.1452389359474182, -0.3808573782444, 0.1748373955488205, 0.1763758659362793, 0.29668912291526794, -0.0637696385383606, 0.1829947680234909, 0.09322760254144669, -0.18650752305984497, 0.07350432872772217, 0.12764932215213776, 0.3398435413837433, 0.12092888355255127, 0.13197268545627594, 0.01271516177803278, 0.004744917154312134, -0.0747600719332695, 0.024964910000562668, 0.032071553170681, -0.023613877594470978, -0.36054524779319763, -0.2406119853258133, 0.22457391023635864, 0.23575414717197418, -0.048562295734882355, 0.04526901990175247, -0.21168459951877594, -0.3131868839263916, -0.20823363959789276, 0.16942796111106873, 0.45601731538772583, 0.053724054247140884, 0.4907967448234558, 0.31388038396835327, 0.16133356094360352, -0.12674683332443237, -0.5722317099571228, -0.18037046492099762, 0.31715553998947144, -0.1612577587366104, -0.16374269127845764, 0.3268581032752991, 0.061369795352220535, 0.28652212023735046, -0.2762351632118225, 0.18724188208580017, 0.17346623539924622, -0.01680022105574608, -0.15872305631637573, -0.2288753092288971, 0.17436541616916656, 0.1935793161392212, 0.2789788544178009, 0.2141340970993042, -0.27453070878982544, 0.01891489326953888, 0.20865574479103088, -0.22238579392433167, -0.16894857585430145, 0.2648104727268219, 0.042568307369947433, 0.10715511441230774, -0.13842983543872833, -0.5075434446334839, 0.11159713566303253, -0.13575375080108643, -0.2659590244293213, -0.26108747720718384, -0.2019340544939041, -0.0996069461107254, -0.22975607216358185, 0.37678006291389465, 0.5294705033302307, -0.09896785020828247, -0.029180023819208145, -0.006314704194664955, 0.1354214996099472, 0.08295250684022903, 0.03577988222241402, -0.31141266226768494, 0.4921749532222748, -0.17608346045017242, -0.1047419086098671, 0.868654191493988, -0.5204974412918091, -0.05067618191242218, 0.36399954557418823, 0.11729881167411804, -0.07188747823238373, 0.3070547878742218, 0.061870358884334564, 0.11707405745983124, -0.0958947017788887, 0.031752098351716995, 0.40219807624816895, -0.04654417932033539, 0.02345523051917553, -0.153348907828331, 0.039001233875751495, 0.2969607710838318, 0.3607644736766815, 0.09343047440052032, 0.22124212980270386, -0.273481547832489, 0.49476853013038635, 0.2071569561958313, 0.003739055246114731, 0.06056760251522064, 0.512398362159729, -0.3901422619819641, -0.08273251354694366, 0.039027485996484756, 0.11307761818170547, 0.026666097342967987, -0.048862941563129425, -0.13351140916347504, 0.15623116493225098, 0.16262656450271606, 0.16144663095474243, -0.42750486731529236, 0.02301461063325405, -0.08307884633541107, 0.042762454599142075, 0.05673959106206894, 0.2840372920036316, -0.19372090697288513, 0.25803083181381226, 0.028549280017614365, 0.3317645192146301, 0.017510415986180305, -0.023407315835356712, -0.3775363564491272, 0.20459315180778503, -0.12002024799585342, -0.2554771304130554, 0.2829669415950775, -0.022837452590465546, 0.45617058873176575, 0.042087603360414505, -0.1734333038330078, 0.1393243670463562, 0.17994405329227448, -0.020907588303089142, 0.04133991152048111, -0.20815600454807281, 0.028387507423758507, -0.13491807878017426, -0.04747273027896881, 0.5747933983802795, 0.24731671810150146, -0.19312864542007446, 0.007399104535579681, -0.05638381838798523, -0.095033660531044, 0.22348478436470032, -0.052073556929826736, 0.1890355944633484, 0.07327800244092941, 0.22336962819099426, -0.08493159711360931, 0.22737082839012146, 0.20469985902309418, 0.19900789856910706, 0.2141193151473999, -0.09260844439268112, -0.06868143379688263, -0.22866711020469666, 0.2874104976654053, 0.21486905217170715, 0.0324278362095356, -0.014420945197343826, -0.29639217257499695, 0.0025037676095962524, 0.22510965168476105, -0.06385166943073273, 0.26787787675857544, 0.17269733548164368, -0.1246882975101471, -0.007548699155449867, 0.0018168417736887932, -0.10727756470441818, 0.4460032880306244, 0.05648064985871315, 0.26112085580825806, -0.01663164049386978, -0.10843133926391602, -0.019783321768045425, -0.24262523651123047, -0.2545621395111084, 0.027843425050377846, 0.22426822781562805, -0.42473074793815613, 0.03568001836538315, -0.2087249755859375, -0.6600086092948914, -0.23596197366714478, -0.04944504052400589, -0.16059798002243042, -0.5055601000785828, -0.1612768918275833, 0.32735440135002136, 0.014643248170614243, 0.1275835484266281, -0.1205844134092331, 0.23056885600090027, 0.33199211955070496, -0.23393131792545319, -0.41851937770843506, -0.17342683672904968, -0.29965323209762573, -0.0336429625749588, 0.11222244799137115, 0.1323731392621994, 0.13859957456588745, 0.11391324549913406, -0.03066333383321762, -0.06609896570444107, -0.005705982446670532, 0.21524789929389954, -0.10905635356903076, 0.12350984662771225, 0.26501843333244324, 0.37770408391952515, -0.23895637691020966, -0.09747099131345749, 0.3813406229019165, 0.002662450075149536, 0.17148081958293915, 0.319891095161438, 0.0355910025537014, -0.07547998428344727, -0.10614427924156189, -0.2500559091567993, 0.05141725391149521, -0.6115214824676514, -0.17756372690200806, 0.23730559647083282, 0.00005301088094711304, 0.15428514778614044, 0.24150565266609192, 0.18054218590259552, 0.12876838445663452, 0.31766098737716675, 0.016924286261200905, -0.23874258995056152, 0.3329903781414032, -0.16931383311748505, -0.33724069595336914, -0.1376381367444992, 0.11696526408195496, 0.23388789594173431, 0.21988891065120697, -0.46016550064086914, -0.3833652436733246, 0.2961043417453766, -0.034796055406332016, 0.00652969628572464, 0.16944818198680878, 0.30624693632125854, 0.01712869480252266, 0.0924849584698677, -0.2547694742679596, -0.19896569848060608, 0.04688823223114014, -0.22227323055267334, 0.28269657492637634, 0.2882101535797119, 0.3215004801750183, -0.038475699722766876, 0.9122631549835205, 0.23742246627807617, 0.14308488368988037, 0.5309523344039917, 0.10217007249593735, 0.2991383671760559, -0.03677154332399368, -0.2422952800989151, 0.23065657913684845, 0.18123674392700195, 0.13667047023773193, 0.2091345489025116, -0.2492392659187317, -0.2554642856121063, -0.4086242914199829, -0.21317745745182037, -0.2362278401851654, -0.35522136092185974, 0.1634063571691513, -0.30946406722068787, 0.2537306845188141, -0.13851073384284973, 0.2027324140071869, -0.3603166341781616, -0.09952844679355621, 0.14941783249378204, 0.14400720596313477, 0.16020119190216064, 0.1130509302020073, -0.07522587478160858, -0.0607118085026741, -0.3460041284561157, 0.33446696400642395, -0.12067767232656479, 0.37338876724243164, -0.05666326731443405, 0.06553639471530914, 0.03896048292517662, -0.05802919343113899, 0.7135969996452332, -0.301006019115448, -0.0036398954689502716, 0.24828392267227173, 0.22073766589164734, -0.6750031113624573, 0.11390691995620728, -0.1122860461473465, 0.25481006503105164, 0.004969252273440361, -0.3782780170440674, -0.47978371381759644, -0.1921137273311615, 0.17425481975078583, -0.07232878357172012, -0.16526760160923004, -0.08825350552797318, -0.22019034624099731, -0.32471612095832825, -0.3097022473812103, -0.10598345845937729, -0.04440531134605408, 0.4491245448589325, 0.2301395833492279, 0.2729755640029907, -0.14226137101650238, 0.0037107914686203003, -0.02312144637107849, -0.12722590565681458, 0.14489838480949402, -0.02032293565571308, -0.23666390776634216, -0.19474902749061584, 0.5161571502685547, -0.5861024260520935, 0.3650772273540497, 0.2983982264995575, -0.630766749382019, -0.048727840185165405, -0.01852080225944519, 0.2841161787509918, 0.21166306734085083, -0.3109893798828125, 0.05280722677707672, -0.049028173089027405, -0.1705610156059265, -0.0002033757045865059, 0.2304159551858902, 0.410717248916626, -0.3813048303127289, -0.05218612402677536, -0.562923789024353, 0.43746814131736755, -0.1350966840982437, -0.010410606861114502, 0.2742975354194641, -0.12945732474327087, -0.18843135237693787, 0.6053568720817566, -0.03186023235321045, 0.974200427532196, 0.20215387642383575, 0.18851755559444427, 0.4231545627117157, -0.12777763605117798, 0.6227626800537109, -0.12437362968921661, 0.3219042420387268, -0.389395147562027, 0.04144716635346413, -0.06381424516439438, -0.17461052536964417, -0.09305546432733536, 0.13327567279338837, -0.2606726586818695, 0.27748823165893555, 0.07044985890388489, -0.0549803264439106, 0.08896133303642273, 0.12558652460575104, 0.11164557188749313, -0.10677196085453033, -0.5512526035308838, 0.05779718607664108, -0.450273334980011, 0.0162904504686594, -0.07299469411373138, -0.1618126481771469, 0.07739873230457306, -0.5212675929069519, -0.10292293131351471, 0.16554731130599976, -0.24027131497859955, 0.15570159256458282, -0.05653655156493187, -0.25477373600006104, 0.18542292714118958, 0.3622998595237732, -0.020917139947414398, 0.056943379342556, -0.19946584105491638, 0.31148001551628113, -0.5459018349647522, -0.0695616751909256, -0.15938057005405426, 0.30238449573516846, 0.2848658859729767, -0.02513006143271923, -0.1467432826757431, 0.3340928852558136, -0.16597118973731995, -0.6099501848220825, -0.04951724410057068, -0.08532610535621643, 0.44318413734436035, -0.03684760257601738, -0.2056552767753601, 0.0775676742196083, -0.15242069959640503, 0.03554219380021095, 0.039507701992988586, 0.02449333667755127, -0.2060188353061676, 0.06885058432817459, -0.052899014204740524, 0.0025281906127929688, 0.17371514439582825, 0.47718125581741333, 0.05809301882982254, 0.025352299213409424, 0.5821671485900879, 0.2740309238433838, -0.025716936215758324, -0.15860101580619812, -0.23228132724761963, -0.34093207120895386, -0.6085476875305176, 0.1990729421377182, 0.30444541573524475, 0.062134236097335815, 0.08742491900920868, 0.20383939146995544, -0.07797285169363022, 0.17050451040267944, 0.05609018728137016, -0.30495792627334595, 0.11341378837823868, 0.20601914823055267, -0.24361936748027802, -0.06297625601291656, 0.430572509765625, -0.032395876944065094, 0.3100130558013916, -0.14917655289173126, -0.1858067810535431, -0.12412477284669876, -0.18789096176624298, 0.13581904768943787, 0.1600102335214615, -0.2263956367969513, -0.11575767397880554, 0.2592064142227173, 0.07067099213600159, -0.24402807652950287, -0.2439689338207245, -0.060357965528964996, -0.1667722910642624, 0.20025977492332458, 0.22434747219085693, 0.12141037732362747, -0.12901955842971802, -0.4042981266975403, -0.12375012040138245, -0.18162889778614044, 0.02258993685245514, -0.14268240332603455, -0.24291034042835236, 0.05574445053935051, 0.15041452646255493, 0.36744004487991333, -0.5081486105918884, 0.1975678950548172, 0.07603827118873596, -0.09267058968544006, 0.21329306066036224, 0.19161178171634674, 0.2624576985836029, -0.049692582339048386, -0.4662696123123169, 0.1615176498889923, 0.2004987895488739, -0.03445511311292648, 0.5295457243919373, -0.18402647972106934, -0.11347800493240356, -0.1094243973493576, -0.08067693561315536, 0.08077783137559891, -0.1513763964176178, 0.01179732196033001, 0.06921054422855377, 0.033274415880441666, -0.15379439294338226, 0.04944650083780289, 0.3225937783718109, 0.2039947211742401, -0.06518562883138657, 0.0736156553030014, -0.08708605170249939, -0.3661136031150818, 0.20963312685489655, 0.11635292321443558, 0.36336153745651245, -0.1511392891407013, -0.11197607219219208, 0.13394995033740997, -0.0349586084485054, -0.08543752133846283, -0.05279737710952759, 0.2270282655954361, 0.053738851100206375, 0.2903498709201813, -0.14447841048240662, 0.05437575280666351, -0.05644006282091141, -0.3188202679157257, -0.04710402339696884, -0.15345355868339539, 0.2008984535932541, 0.48627692461013794, 0.1516946405172348, 0.14434556663036346, -0.1632334291934967, 0.19970647990703583, 0.048234011977910995, 0.11419011652469635, -0.27211713790893555, 0.160495325922966, 0.01828007772564888, 0.03101927787065506, -0.6282178163528442, -0.015780486166477203, -0.43275630474090576, -0.1448921114206314, -0.0049456022679805756, -0.16302302479743958, -0.030058592557907104, 0.21194282174110413, -0.11699871718883514, -0.3793834149837494, 0.21547287702560425, 0.12184824794530869, -0.033338598906993866, -0.1512892246246338, 0.20378048717975616, 0.08548682928085327, 0.11784330755472183, 0.1998898684978485, 0.2706083655357361, 0.35406485199928284, 0.4170278310775757, -0.26989489793777466, -0.16933026909828186, 0.2886008024215698, 0.0005995780229568481, -0.2072155624628067, -0.061468400061130524, 0.0971708595752716, 0.3210926949977875, 0.39598149061203003, 0.07382867485284805, 0.014399259351193905, -0.008513614535331726, 0.1275811642408371, -0.061320800334215164, -0.23826301097869873, 0.4723813831806183, -0.04635246843099594, -0.09188411384820938, -0.3303666114807129, 0.03290336951613426, -0.5663151144981384, 0.32977399230003357, 0.05953260511159897, 0.357300728559494, -0.010647852905094624, -0.2045571655035019, -0.019938796758651733, -0.0656270980834961, 0.3586007058620453, 0.3856925964355469, 0.3740825355052948, -0.3091631531715393, -0.42480576038360596, -0.4309857189655304, 0.15818768739700317, 0.16397491097450256, -0.24111637473106384, 0.10705924034118652, 0.19989626109600067, 0.28318318724632263, 0.24040493369102478, -0.10748283565044403, -0.2510271668434143, -0.055724963545799255, 0.17863766849040985, -0.21893669664859772, -0.28950056433677673, 0.20643950998783112, 0.06966327130794525, -0.19365616142749786, -0.21789062023162842, -0.14199407398700714, 0.008384733460843563, 0.09180434793233871, -0.1656750589609146, -0.3625209629535675, 0.14771771430969238, 0.08224058151245117, -0.02181561291217804, -0.025665977969765663, 0.44746193289756775, 0.05808982998132706, -0.0019741784781217575, -0.18325412273406982, -0.07431686669588089, -0.16902171075344086, -0.2816391587257385, -0.15470761060714722, 0.5438709259033203, -0.22133252024650574, 0.25255677103996277, -0.3257884979248047, 0.2445085197687149, -0.13348236680030823, 0.3438487648963928, -0.14660201966762543, 0.06482987105846405, -0.4684082269668579, 0.3983725607395172, -0.13448017835617065, -0.06758540123701096, -0.02555328607559204, 0.14621901512145996, -0.4820401668548584, -0.27300751209259033, 0.5664798021316528, -0.5063450336456299, -0.23137356340885162, 0.006317099556326866, 0.21578657627105713, -0.4116666913032532, 0.33542600274086, -0.35841208696365356, -0.03860631212592125, 0.28557854890823364, -0.06732425093650818, -0.14448514580726624, 0.16551655530929565, -0.04760986566543579, 0.11225058138370514, -0.08310580998659134, -0.5315552949905396, 0.04379883036017418, -0.13350924849510193, -0.13964027166366577, -0.2604455351829529 ]
https://github.com/huggingface/datasets/issues/508
TypeError: Receiver() takes no arguments
Thanks for trying Let us know if you find clues of what caused this issue, or if you find a fix
I am trying to load a wikipedia data set ``` import nlp from nlp import load_dataset dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner') #dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner') ``` This fails in the apache beam runner. ``` Traceback (most recent call last): File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module> dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner') File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset builder_instance.download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare self._download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare pipeline_results = pipeline.run() File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run return self.runner.run_pipeline(self, self._options) .... File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded self.output(decoded_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast return type(*args) TypeError: Receiver() takes no arguments ``` This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump.
21
TypeError: Receiver() takes no arguments I am trying to load a wikipedia data set ``` import nlp from nlp import load_dataset dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner') #dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner') ``` This fails in the apache beam runner. ``` Traceback (most recent call last): File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module> dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner') File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset builder_instance.download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare self._download_and_prepare( File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare pipeline_results = pipeline.run() File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run return self.runner.run_pipeline(self, self._options) .... File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded self.output(decoded_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value) File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast return type(*args) TypeError: Receiver() takes no arguments ``` This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump. Thanks for trying Let us know if you find clues of what caused this issue, or if you find a fix
[ -0.09465459734201431, 0.31812790036201477, 0.08749520778656006, 0.36292457580566406, 0.27407902479171753, -0.09895393997430801, 0.2871827781200409, 0.23696589469909668, -0.028674453496932983, 0.0688418447971344, 0.2388477623462677, 0.3297024071216583, -0.0908716693520546, -0.33632346987724304, 0.17512521147727966, -0.5368744134902954, -0.2141876518726349, 0.19479453563690186, -0.23295363783836365, -0.18508782982826233, -0.14422693848609924, 0.3994992971420288, -0.3325718641281128, -0.07246395945549011, -0.14122816920280457, 0.10274539142847061, -0.0761774554848671, 0.17535367608070374, -0.11846441775560379, -0.33603641390800476, 0.19669990241527557, -0.06736253201961517, 0.07337987422943115, 0.2750072777271271, -0.00012450852955225855, 0.3304244875907898, 0.6380142569541931, -0.1410854011774063, -0.5410768985748291, -0.06318436563014984, -0.08117736130952835, -0.23492592573165894, 0.1993422955274582, -0.2498537302017212, -0.20832398533821106, -0.2352614849805832, 0.10239588469266891, -0.058137014508247375, 0.3563391864299774, 0.2815552055835724, 0.0985950455069542, 0.1995164304971695, 0.18262498080730438, -0.13684247434139252, 0.5043618083000183, 0.04321516305208206, 0.05619574338197708, 0.03617449104785919, -0.227419912815094, 0.23722510039806366, -0.2068561315536499, 0.045931652188301086, -0.2663235068321228, -0.05787007138133049, 0.3306712806224823, -0.2204921692609787, 0.08741341531276703, 0.17523053288459778, -0.09427771717309952, -0.010446377098560333, 0.8057677149772644, 0.005263306200504303, 0.06409471482038498, -0.20121285319328308, 0.0806407704949379, -0.19088558852672577, 0.23831966519355774, 0.07156190276145935, -0.45435306429862976, -0.1370181292295456, 0.11433374136686325, -0.12816913425922394, -0.3413942754268646, 0.33527112007141113, -0.03350250422954559, 0.40751761198043823, -0.023008711636066437, 0.3289753794670105, 0.14224928617477417, 0.12647685408592224, 0.20727288722991943, -0.2324923276901245, -0.12685495615005493, 0.1452389359474182, -0.3808573782444, 0.1748373955488205, 0.1763758659362793, 0.29668912291526794, -0.0637696385383606, 0.1829947680234909, 0.09322760254144669, -0.18650752305984497, 0.07350432872772217, 0.12764932215213776, 0.3398435413837433, 0.12092888355255127, 0.13197268545627594, 0.01271516177803278, 0.004744917154312134, -0.0747600719332695, 0.024964910000562668, 0.032071553170681, -0.023613877594470978, -0.36054524779319763, -0.2406119853258133, 0.22457391023635864, 0.23575414717197418, -0.048562295734882355, 0.04526901990175247, -0.21168459951877594, -0.3131868839263916, -0.20823363959789276, 0.16942796111106873, 0.45601731538772583, 0.053724054247140884, 0.4907967448234558, 0.31388038396835327, 0.16133356094360352, -0.12674683332443237, -0.5722317099571228, -0.18037046492099762, 0.31715553998947144, -0.1612577587366104, -0.16374269127845764, 0.3268581032752991, 0.061369795352220535, 0.28652212023735046, -0.2762351632118225, 0.18724188208580017, 0.17346623539924622, -0.01680022105574608, -0.15872305631637573, -0.2288753092288971, 0.17436541616916656, 0.1935793161392212, 0.2789788544178009, 0.2141340970993042, -0.27453070878982544, 0.01891489326953888, 0.20865574479103088, -0.22238579392433167, -0.16894857585430145, 0.2648104727268219, 0.042568307369947433, 0.10715511441230774, -0.13842983543872833, -0.5075434446334839, 0.11159713566303253, -0.13575375080108643, -0.2659590244293213, -0.26108747720718384, -0.2019340544939041, -0.0996069461107254, -0.22975607216358185, 0.37678006291389465, 0.5294705033302307, -0.09896785020828247, -0.029180023819208145, -0.006314704194664955, 0.1354214996099472, 0.08295250684022903, 0.03577988222241402, -0.31141266226768494, 0.4921749532222748, -0.17608346045017242, -0.1047419086098671, 0.868654191493988, -0.5204974412918091, -0.05067618191242218, 0.36399954557418823, 0.11729881167411804, -0.07188747823238373, 0.3070547878742218, 0.061870358884334564, 0.11707405745983124, -0.0958947017788887, 0.031752098351716995, 0.40219807624816895, -0.04654417932033539, 0.02345523051917553, -0.153348907828331, 0.039001233875751495, 0.2969607710838318, 0.3607644736766815, 0.09343047440052032, 0.22124212980270386, -0.273481547832489, 0.49476853013038635, 0.2071569561958313, 0.003739055246114731, 0.06056760251522064, 0.512398362159729, -0.3901422619819641, -0.08273251354694366, 0.039027485996484756, 0.11307761818170547, 0.026666097342967987, -0.048862941563129425, -0.13351140916347504, 0.15623116493225098, 0.16262656450271606, 0.16144663095474243, -0.42750486731529236, 0.02301461063325405, -0.08307884633541107, 0.042762454599142075, 0.05673959106206894, 0.2840372920036316, -0.19372090697288513, 0.25803083181381226, 0.028549280017614365, 0.3317645192146301, 0.017510415986180305, -0.023407315835356712, -0.3775363564491272, 0.20459315180778503, -0.12002024799585342, -0.2554771304130554, 0.2829669415950775, -0.022837452590465546, 0.45617058873176575, 0.042087603360414505, -0.1734333038330078, 0.1393243670463562, 0.17994405329227448, -0.020907588303089142, 0.04133991152048111, -0.20815600454807281, 0.028387507423758507, -0.13491807878017426, -0.04747273027896881, 0.5747933983802795, 0.24731671810150146, -0.19312864542007446, 0.007399104535579681, -0.05638381838798523, -0.095033660531044, 0.22348478436470032, -0.052073556929826736, 0.1890355944633484, 0.07327800244092941, 0.22336962819099426, -0.08493159711360931, 0.22737082839012146, 0.20469985902309418, 0.19900789856910706, 0.2141193151473999, -0.09260844439268112, -0.06868143379688263, -0.22866711020469666, 0.2874104976654053, 0.21486905217170715, 0.0324278362095356, -0.014420945197343826, -0.29639217257499695, 0.0025037676095962524, 0.22510965168476105, -0.06385166943073273, 0.26787787675857544, 0.17269733548164368, -0.1246882975101471, -0.007548699155449867, 0.0018168417736887932, -0.10727756470441818, 0.4460032880306244, 0.05648064985871315, 0.26112085580825806, -0.01663164049386978, -0.10843133926391602, -0.019783321768045425, -0.24262523651123047, -0.2545621395111084, 0.027843425050377846, 0.22426822781562805, -0.42473074793815613, 0.03568001836538315, -0.2087249755859375, -0.6600086092948914, -0.23596197366714478, -0.04944504052400589, -0.16059798002243042, -0.5055601000785828, -0.1612768918275833, 0.32735440135002136, 0.014643248170614243, 0.1275835484266281, -0.1205844134092331, 0.23056885600090027, 0.33199211955070496, -0.23393131792545319, -0.41851937770843506, -0.17342683672904968, -0.29965323209762573, -0.0336429625749588, 0.11222244799137115, 0.1323731392621994, 0.13859957456588745, 0.11391324549913406, -0.03066333383321762, -0.06609896570444107, -0.005705982446670532, 0.21524789929389954, -0.10905635356903076, 0.12350984662771225, 0.26501843333244324, 0.37770408391952515, -0.23895637691020966, -0.09747099131345749, 0.3813406229019165, 0.002662450075149536, 0.17148081958293915, 0.319891095161438, 0.0355910025537014, -0.07547998428344727, -0.10614427924156189, -0.2500559091567993, 0.05141725391149521, -0.6115214824676514, -0.17756372690200806, 0.23730559647083282, 0.00005301088094711304, 0.15428514778614044, 0.24150565266609192, 0.18054218590259552, 0.12876838445663452, 0.31766098737716675, 0.016924286261200905, -0.23874258995056152, 0.3329903781414032, -0.16931383311748505, -0.33724069595336914, -0.1376381367444992, 0.11696526408195496, 0.23388789594173431, 0.21988891065120697, -0.46016550064086914, -0.3833652436733246, 0.2961043417453766, -0.034796055406332016, 0.00652969628572464, 0.16944818198680878, 0.30624693632125854, 0.01712869480252266, 0.0924849584698677, -0.2547694742679596, -0.19896569848060608, 0.04688823223114014, -0.22227323055267334, 0.28269657492637634, 0.2882101535797119, 0.3215004801750183, -0.038475699722766876, 0.9122631549835205, 0.23742246627807617, 0.14308488368988037, 0.5309523344039917, 0.10217007249593735, 0.2991383671760559, -0.03677154332399368, -0.2422952800989151, 0.23065657913684845, 0.18123674392700195, 0.13667047023773193, 0.2091345489025116, -0.2492392659187317, -0.2554642856121063, -0.4086242914199829, -0.21317745745182037, -0.2362278401851654, -0.35522136092185974, 0.1634063571691513, -0.30946406722068787, 0.2537306845188141, -0.13851073384284973, 0.2027324140071869, -0.3603166341781616, -0.09952844679355621, 0.14941783249378204, 0.14400720596313477, 0.16020119190216064, 0.1130509302020073, -0.07522587478160858, -0.0607118085026741, -0.3460041284561157, 0.33446696400642395, -0.12067767232656479, 0.37338876724243164, -0.05666326731443405, 0.06553639471530914, 0.03896048292517662, -0.05802919343113899, 0.7135969996452332, -0.301006019115448, -0.0036398954689502716, 0.24828392267227173, 0.22073766589164734, -0.6750031113624573, 0.11390691995620728, -0.1122860461473465, 0.25481006503105164, 0.004969252273440361, -0.3782780170440674, -0.47978371381759644, -0.1921137273311615, 0.17425481975078583, -0.07232878357172012, -0.16526760160923004, -0.08825350552797318, -0.22019034624099731, -0.32471612095832825, -0.3097022473812103, -0.10598345845937729, -0.04440531134605408, 0.4491245448589325, 0.2301395833492279, 0.2729755640029907, -0.14226137101650238, 0.0037107914686203003, -0.02312144637107849, -0.12722590565681458, 0.14489838480949402, -0.02032293565571308, -0.23666390776634216, -0.19474902749061584, 0.5161571502685547, -0.5861024260520935, 0.3650772273540497, 0.2983982264995575, -0.630766749382019, -0.048727840185165405, -0.01852080225944519, 0.2841161787509918, 0.21166306734085083, -0.3109893798828125, 0.05280722677707672, -0.049028173089027405, -0.1705610156059265, -0.0002033757045865059, 0.2304159551858902, 0.410717248916626, -0.3813048303127289, -0.05218612402677536, -0.562923789024353, 0.43746814131736755, -0.1350966840982437, -0.010410606861114502, 0.2742975354194641, -0.12945732474327087, -0.18843135237693787, 0.6053568720817566, -0.03186023235321045, 0.974200427532196, 0.20215387642383575, 0.18851755559444427, 0.4231545627117157, -0.12777763605117798, 0.6227626800537109, -0.12437362968921661, 0.3219042420387268, -0.389395147562027, 0.04144716635346413, -0.06381424516439438, -0.17461052536964417, -0.09305546432733536, 0.13327567279338837, -0.2606726586818695, 0.27748823165893555, 0.07044985890388489, -0.0549803264439106, 0.08896133303642273, 0.12558652460575104, 0.11164557188749313, -0.10677196085453033, -0.5512526035308838, 0.05779718607664108, -0.450273334980011, 0.0162904504686594, -0.07299469411373138, -0.1618126481771469, 0.07739873230457306, -0.5212675929069519, -0.10292293131351471, 0.16554731130599976, -0.24027131497859955, 0.15570159256458282, -0.05653655156493187, -0.25477373600006104, 0.18542292714118958, 0.3622998595237732, -0.020917139947414398, 0.056943379342556, -0.19946584105491638, 0.31148001551628113, -0.5459018349647522, -0.0695616751909256, -0.15938057005405426, 0.30238449573516846, 0.2848658859729767, -0.02513006143271923, -0.1467432826757431, 0.3340928852558136, -0.16597118973731995, -0.6099501848220825, -0.04951724410057068, -0.08532610535621643, 0.44318413734436035, -0.03684760257601738, -0.2056552767753601, 0.0775676742196083, -0.15242069959640503, 0.03554219380021095, 0.039507701992988586, 0.02449333667755127, -0.2060188353061676, 0.06885058432817459, -0.052899014204740524, 0.0025281906127929688, 0.17371514439582825, 0.47718125581741333, 0.05809301882982254, 0.025352299213409424, 0.5821671485900879, 0.2740309238433838, -0.025716936215758324, -0.15860101580619812, -0.23228132724761963, -0.34093207120895386, -0.6085476875305176, 0.1990729421377182, 0.30444541573524475, 0.062134236097335815, 0.08742491900920868, 0.20383939146995544, -0.07797285169363022, 0.17050451040267944, 0.05609018728137016, -0.30495792627334595, 0.11341378837823868, 0.20601914823055267, -0.24361936748027802, -0.06297625601291656, 0.430572509765625, -0.032395876944065094, 0.3100130558013916, -0.14917655289173126, -0.1858067810535431, -0.12412477284669876, -0.18789096176624298, 0.13581904768943787, 0.1600102335214615, -0.2263956367969513, -0.11575767397880554, 0.2592064142227173, 0.07067099213600159, -0.24402807652950287, -0.2439689338207245, -0.060357965528964996, -0.1667722910642624, 0.20025977492332458, 0.22434747219085693, 0.12141037732362747, -0.12901955842971802, -0.4042981266975403, -0.12375012040138245, -0.18162889778614044, 0.02258993685245514, -0.14268240332603455, -0.24291034042835236, 0.05574445053935051, 0.15041452646255493, 0.36744004487991333, -0.5081486105918884, 0.1975678950548172, 0.07603827118873596, -0.09267058968544006, 0.21329306066036224, 0.19161178171634674, 0.2624576985836029, -0.049692582339048386, -0.4662696123123169, 0.1615176498889923, 0.2004987895488739, -0.03445511311292648, 0.5295457243919373, -0.18402647972106934, -0.11347800493240356, -0.1094243973493576, -0.08067693561315536, 0.08077783137559891, -0.1513763964176178, 0.01179732196033001, 0.06921054422855377, 0.033274415880441666, -0.15379439294338226, 0.04944650083780289, 0.3225937783718109, 0.2039947211742401, -0.06518562883138657, 0.0736156553030014, -0.08708605170249939, -0.3661136031150818, 0.20963312685489655, 0.11635292321443558, 0.36336153745651245, -0.1511392891407013, -0.11197607219219208, 0.13394995033740997, -0.0349586084485054, -0.08543752133846283, -0.05279737710952759, 0.2270282655954361, 0.053738851100206375, 0.2903498709201813, -0.14447841048240662, 0.05437575280666351, -0.05644006282091141, -0.3188202679157257, -0.04710402339696884, -0.15345355868339539, 0.2008984535932541, 0.48627692461013794, 0.1516946405172348, 0.14434556663036346, -0.1632334291934967, 0.19970647990703583, 0.048234011977910995, 0.11419011652469635, -0.27211713790893555, 0.160495325922966, 0.01828007772564888, 0.03101927787065506, -0.6282178163528442, -0.015780486166477203, -0.43275630474090576, -0.1448921114206314, -0.0049456022679805756, -0.16302302479743958, -0.030058592557907104, 0.21194282174110413, -0.11699871718883514, -0.3793834149837494, 0.21547287702560425, 0.12184824794530869, -0.033338598906993866, -0.1512892246246338, 0.20378048717975616, 0.08548682928085327, 0.11784330755472183, 0.1998898684978485, 0.2706083655357361, 0.35406485199928284, 0.4170278310775757, -0.26989489793777466, -0.16933026909828186, 0.2886008024215698, 0.0005995780229568481, -0.2072155624628067, -0.061468400061130524, 0.0971708595752716, 0.3210926949977875, 0.39598149061203003, 0.07382867485284805, 0.014399259351193905, -0.008513614535331726, 0.1275811642408371, -0.061320800334215164, -0.23826301097869873, 0.4723813831806183, -0.04635246843099594, -0.09188411384820938, -0.3303666114807129, 0.03290336951613426, -0.5663151144981384, 0.32977399230003357, 0.05953260511159897, 0.357300728559494, -0.010647852905094624, -0.2045571655035019, -0.019938796758651733, -0.0656270980834961, 0.3586007058620453, 0.3856925964355469, 0.3740825355052948, -0.3091631531715393, -0.42480576038360596, -0.4309857189655304, 0.15818768739700317, 0.16397491097450256, -0.24111637473106384, 0.10705924034118652, 0.19989626109600067, 0.28318318724632263, 0.24040493369102478, -0.10748283565044403, -0.2510271668434143, -0.055724963545799255, 0.17863766849040985, -0.21893669664859772, -0.28950056433677673, 0.20643950998783112, 0.06966327130794525, -0.19365616142749786, -0.21789062023162842, -0.14199407398700714, 0.008384733460843563, 0.09180434793233871, -0.1656750589609146, -0.3625209629535675, 0.14771771430969238, 0.08224058151245117, -0.02181561291217804, -0.025665977969765663, 0.44746193289756775, 0.05808982998132706, -0.0019741784781217575, -0.18325412273406982, -0.07431686669588089, -0.16902171075344086, -0.2816391587257385, -0.15470761060714722, 0.5438709259033203, -0.22133252024650574, 0.25255677103996277, -0.3257884979248047, 0.2445085197687149, -0.13348236680030823, 0.3438487648963928, -0.14660201966762543, 0.06482987105846405, -0.4684082269668579, 0.3983725607395172, -0.13448017835617065, -0.06758540123701096, -0.02555328607559204, 0.14621901512145996, -0.4820401668548584, -0.27300751209259033, 0.5664798021316528, -0.5063450336456299, -0.23137356340885162, 0.006317099556326866, 0.21578657627105713, -0.4116666913032532, 0.33542600274086, -0.35841208696365356, -0.03860631212592125, 0.28557854890823364, -0.06732425093650818, -0.14448514580726624, 0.16551655530929565, -0.04760986566543579, 0.11225058138370514, -0.08310580998659134, -0.5315552949905396, 0.04379883036017418, -0.13350924849510193, -0.13964027166366577, -0.2604455351829529 ]
https://github.com/huggingface/datasets/issues/507
Errors when I use
Looks like an issue with 3.0.2 transformers version. Works fine when I use "master" version of transformers.
I tried the following example code from https://huggingface.co/deepset/roberta-base-squad2 and got errors I am using **transformers 3.0.2** code . from transformers.pipelines import pipeline from transformers.modeling_auto import AutoModelForQuestionAnswering from transformers.tokenization_auto import AutoTokenizer model_name = "deepset/roberta-base-squad2" nlp = pipeline('question-answering', model=model_name, tokenizer=model_name) QA_input = { 'question': 'Why is model conversion important?', 'context': 'The option to convert models between FARM and transformers gives freedom to the user and let people easily switch between frameworks.' } res = nlp(QA_input) The errors are : res = nlp(QA_input) File ".local/lib/python3.6/site-packages/transformers/pipelines.py", line 1316, in __call__ for s, e, score in zip(starts, ends, scores) File ".local/lib/python3.6/site-packages/transformers/pipelines.py", line 1316, in <listcomp> for s, e, score in zip(starts, ends, scores) KeyError: 0
17
Errors when I use I tried the following example code from https://huggingface.co/deepset/roberta-base-squad2 and got errors I am using **transformers 3.0.2** code . from transformers.pipelines import pipeline from transformers.modeling_auto import AutoModelForQuestionAnswering from transformers.tokenization_auto import AutoTokenizer model_name = "deepset/roberta-base-squad2" nlp = pipeline('question-answering', model=model_name, tokenizer=model_name) QA_input = { 'question': 'Why is model conversion important?', 'context': 'The option to convert models between FARM and transformers gives freedom to the user and let people easily switch between frameworks.' } res = nlp(QA_input) The errors are : res = nlp(QA_input) File ".local/lib/python3.6/site-packages/transformers/pipelines.py", line 1316, in __call__ for s, e, score in zip(starts, ends, scores) File ".local/lib/python3.6/site-packages/transformers/pipelines.py", line 1316, in <listcomp> for s, e, score in zip(starts, ends, scores) KeyError: 0 Looks like an issue with 3.0.2 transformers version. Works fine when I use "master" version of transformers.
[ 0.14258931577205658, -0.3862658441066742, 0.1019001454114914, 0.2882801294326782, -0.04087696224451065, -0.0037294551730155945, 0.36078792810440063, 0.28663191199302673, -0.23267026245594025, -0.0361647754907608, 0.11111835390329361, 0.17491130530834198, -0.3020102381706238, -0.13477621972560883, -0.18691536784172058, -0.2722383141517639, 0.2230999618768692, 0.16487014293670654, -0.2249956727027893, -0.07556324452161789, -0.09814153611660004, 0.42947855591773987, -0.58232581615448, 0.3994291424751282, -0.6540248394012451, 0.06348396092653275, -0.09769430011510849, -0.08822266012430191, 0.21798968315124512, -0.40483054518699646, 0.16647396981716156, -0.13799338042736053, 0.440876841545105, 0.49506640434265137, -0.00011285573418717831, 0.06629310548305511, 0.5166268348693848, 0.003433527424931526, -0.18316709995269775, -0.4616506099700928, -0.09586632251739502, -0.021679233759641647, 0.24012912809848785, -0.14886710047721863, 0.10993603616952896, -0.009591500274837017, 0.1123633086681366, 0.11614835262298584, 0.6158468723297119, 0.26044949889183044, 0.2036687135696411, 0.5679881572723389, 0.16067369282245636, -0.15860223770141602, 0.03865080699324608, 0.06511927396059036, -0.1622341126203537, -0.25322219729423523, -0.07118548452854156, -0.15412361919879913, 0.05134592950344086, 0.3433670103549957, -0.15458287298679352, -0.31950685381889343, 0.19650939106941223, -0.024866394698619843, 0.37717121839523315, -0.6403260231018066, 0.17681339383125305, 0.3447147309780121, -0.022076033055782318, 0.02970944531261921, -0.4338779151439667, -0.37098953127861023, -0.04777390509843826, 0.08463262766599655, 0.07156533747911453, -0.05759144574403763, -0.1082191914319992, -0.032037023454904556, -0.3570261597633362, 0.11109080165624619, -0.25770509243011475, -0.0387134850025177, -0.00568782165646553, 0.7290469408035278, -0.004314843565225601, 0.11541954427957535, 0.02635558322072029, -0.39883649349212646, 0.11193586885929108, -0.08867616206407547, -0.11080746352672577, 0.28107908368110657, -0.46238619089126587, -0.46789833903312683, -0.10545038431882858, -0.014150545001029968, -0.12585905194282532, 0.132976695895195, -0.04763519763946533, -0.04006987810134888, 0.11469495296478271, 0.05059610307216644, 0.27080222964286804, 0.37767449021339417, 0.3136990964412689, 0.370065301656723, 0.34156084060668945, -0.004086728673428297, 0.15954548120498657, -0.019693519920110703, -0.4887857139110565, -0.022621072828769684, 0.09474363923072815, 0.16827106475830078, 0.2845754027366638, -0.040379833430051804, 0.06958309561014175, -0.08895514905452728, -0.2725500464439392, 0.03089638613164425, 0.2877446413040161, 0.3125804662704468, 0.1607069969177246, 0.40813103318214417, -0.04428256303071976, 0.36186110973358154, -0.1540922224521637, -0.47883662581443787, -0.04824553430080414, -0.0248207226395607, -0.13053840398788452, 0.02590341866016388, 0.18326790630817413, 0.3635355532169342, 0.29596492648124695, -0.3133229613304138, 0.15741068124771118, 0.19291037321090698, 0.06968537718057632, -0.26522329449653625, -0.13920634984970093, 0.22219423949718475, 0.04779103025794029, 0.12352774292230606, 0.27322205901145935, -0.15461556613445282, -0.026914894580841064, 0.28888365626335144, -0.15267005562782288, -0.07309292256832123, 0.03826862946152687, 0.12809577584266663, -0.15642690658569336, -0.20495955646038055, -0.10685088485479355, 0.14244133234024048, 0.2601512670516968, -0.019687650725245476, -0.15115657448768616, -0.26804590225219727, -0.07123032212257385, -0.02735055983066559, 0.015234557911753654, 0.4272613525390625, 0.12178415060043335, -0.262969970703125, -0.007493223063647747, 0.14398856461048126, -0.1053127571940422, 0.1660328507423401, -0.059425774961709976, 0.2397548258304596, -0.006709630601108074, 0.3142338991165161, 0.3387311100959778, -0.2347954660654068, 0.06108313798904419, 0.15116539597511292, -0.010911986231803894, -0.23496340215206146, 0.05589408800005913, -0.18205246329307556, 0.11831123381853104, -0.22716568410396576, -0.07244709134101868, -0.14019909501075745, 0.008309466764330864, 0.16111032664775848, -0.09774631261825562, -0.21601931750774384, -0.0398634672164917, 0.20658497512340546, 0.16629794239997864, 0.10199394822120667, -0.37970349192619324, 0.5313235521316528, -0.1683846414089203, -0.19078008830547333, 0.1780082881450653, -0.09161654114723206, 0.40593183040618896, -0.24185849726200104, 0.07686872780323029, -0.10728871822357178, -0.2731468677520752, 0.22033128142356873, -0.49802258610725403, 0.19645550847053528, -0.05217316746711731, 0.2371750921010971, -0.1382569670677185, 0.08033735305070877, -0.18171389400959015, -0.0770958662033081, 0.17018122971057892, -0.07762432098388672, 0.1599179208278656, 0.11368794739246368, -0.29967567324638367, -0.08669420331716537, 0.48646068572998047, 0.07555858045816422, -0.3800066411495209, 0.23906798660755157, -0.2562914192676544, -0.32215404510498047, -0.17282381653785706, 0.18001943826675415, 0.4133441746234894, 0.16059744358062744, -0.06036461144685745, 0.21988871693611145, -0.213470920920372, -0.09203594923019409, -0.10085199028253555, 0.3315396308898926, 0.24184982478618622, -0.38570675253868103, 0.15345440804958344, 0.4965139329433441, 0.1735297590494156, 0.14894789457321167, 0.13905882835388184, 0.41174381971359253, 0.04908803477883339, 0.14753201603889465, 0.08934004604816437, 0.1436106562614441, 0.027317645028233528, -0.19758522510528564, -0.1786634474992752, -0.04894990473985672, 0.012495726346969604, 0.0653676763176918, -0.0209299735724926, -0.3088865280151367, 0.08543002605438232, -0.19010940194129944, 0.4991111755371094, -0.02200709842145443, 0.16195440292358398, 0.14757980406284332, -0.4284466505050659, 0.04099055379629135, -0.16004841029644012, 0.22723491489887238, 0.3109736740589142, 0.10939256101846695, -0.15930671989917755, 0.10081552714109421, -0.042344409972429276, -0.03398694097995758, 0.33027586340904236, 0.07211589813232422, 0.2826165556907654, 0.12888053059577942, 0.19148372113704681, 0.1401968151330948, 0.1415274441242218, -0.20439551770687103, -0.09894759207963943, 0.20394477248191833, -0.32453882694244385, 0.18877889215946198, 0.03875397890806198, 0.06972631067037582, -0.13713473081588745, -0.24315522611141205, -0.23858237266540527, -0.3978778123855591, 0.09223663806915283, 0.03479498624801636, 0.048994969576597214, 0.23076051473617554, 0.09148360788822174, 0.24004679918289185, 0.22033800184726715, 0.49283409118652344, -0.0906582623720169, -0.011917661875486374, -0.4879196882247925, -0.010095927864313126, 0.06996598839759827, -0.5400468707084656, -0.060456156730651855, 0.044776275753974915, -0.06788541376590729, 0.2947693169116974, -0.3794874846935272, 0.37214651703834534, -0.15198403596878052, 0.08318707346916199, 0.17683234810829163, -0.10780437290668488, -0.018315467983484268, -0.38809600472450256, 0.42925867438316345, -0.36191219091415405, -0.017131924629211426, 0.3871994912624359, 0.04232725128531456, -0.12685813009738922, -0.22208106517791748, -0.08119776099920273, 0.056620143353939056, -0.14387282729148865, -0.0924248993396759, -0.13423238694667816, 0.17254787683486938, 0.41807544231414795, 0.02203350141644478, 0.47358614206314087, -0.255769819021225, -0.16968052089214325, 0.1678781658411026, 0.18195252120494843, 0.5343096256256104, -0.021697519347071648, -0.378020316362381, 0.14583347737789154, -0.27383437752723694, -0.025868650525808334, -0.5093514919281006, -0.05536936968564987, -0.2531595230102539, -0.12455171346664429, -0.15655753016471863, 0.15028738975524902, 0.05576878786087036, 0.25155365467071533, 0.01708947867155075, 0.007382431998848915, 0.04669122397899628, -0.18408755958080292, 0.12860995531082153, 0.20612257719039917, 0.3723757863044739, -0.026704106479883194, 0.4878305494785309, 0.10480612516403198, 0.6293373703956604, 0.3555675148963928, -0.08572918176651001, 0.13415297865867615, 0.0791085958480835, -0.22964034974575043, 0.029294453561306, -0.22510145604610443, -0.3233567178249359, 0.03125856816768646, -0.0029994212090969086, 0.17983782291412354, 0.032197754830121994, -0.2912757396697998, -0.17826753854751587, -0.11142116785049438, -0.18024083971977234, -0.20814254879951477, -0.1353166103363037, -0.1797323077917099, 0.16016381978988647, -0.20670340955257416, 0.2087402641773224, -0.21687956154346466, 0.02198582887649536, -0.025386061519384384, -0.09397266805171967, 0.0660039484500885, -0.1992712765932083, -0.43792495131492615, -0.14255522191524506, -0.2592290937900543, 0.4074143171310425, -0.12053336203098297, 0.3221704661846161, -0.010891266167163849, -0.35742154717445374, -0.08111201226711273, -0.15807290375232697, 0.6426000595092773, -0.1390674114227295, -0.17911504209041595, 0.08675850927829742, -0.2970713675022125, -0.49071723222732544, -0.16065669059753418, -0.33400586247444153, 0.04722413420677185, 0.4098544120788574, 0.3750629127025604, -0.2565004229545593, -0.06560486555099487, 0.06337548792362213, -0.5187549591064453, -0.17495959997177124, 0.04122959077358246, -0.28845351934432983, 0.08039890974760056, -0.15428248047828674, -0.15349915623664856, -0.05038917809724808, 0.12255013734102249, -0.14489197731018066, 0.15052492916584015, 0.12051098793745041, -0.21014884114265442, 0.09129710495471954, 0.49073731899261475, 0.08128111064434052, 0.0005745860980823636, 0.018310610204935074, 0.2177855521440506, -0.0035041645169258118, -0.15785327553749084, 0.048002004623413086, 0.2946726083755493, -0.3666609227657318, 0.2672848701477051, 0.1955069899559021, 0.29015880823135376, 0.19516542553901672, -0.015766512602567673, 0.016765758395195007, 0.021157730370759964, 0.22601941227912903, 0.11063319444656372, -0.34051892161369324, 0.35451236367225647, -0.012284536845982075, -0.15326225757598877, 0.058107778429985046, 0.1402442306280136, -0.323853999376297, 0.14206244051456451, -0.47346073389053345, 0.10984261333942413, -0.1724623143672943, 0.6164483428001404, 0.04268188029527664, 0.9207703471183777, 0.13586196303367615, 0.012934986501932144, 0.08482159674167633, -0.01692163571715355, 0.5575104355812073, 0.19665586948394775, 0.1872054785490036, -0.4816453158855438, 0.21599042415618896, 0.02242463268339634, 0.054521266371011734, 0.08281135559082031, 0.16047540307044983, -0.5252508521080017, 0.24506986141204834, -0.007060311734676361, 0.13655023276805878, -0.05625960975885391, 0.15886633098125458, 0.10249656438827515, -0.1845771223306656, -0.31683027744293213, 0.1592111885547638, 0.03636958450078964, 0.20586128532886505, -0.018514413386583328, -0.27745044231414795, -0.10497931391000748, -0.35729968547821045, -0.15823563933372498, 0.3035013675689697, -0.12924009561538696, -0.08576443046331406, 0.7080221772193909, 0.20286472141742706, 0.6197369694709778, 0.5606241822242737, 0.5166901350021362, 0.053360410034656525, -0.4011363685131073, -0.11512041091918945, 0.026761867105960846, -0.04205545783042908, -0.1256861537694931, 0.04200594872236252, -0.04319402575492859, -0.12793684005737305, -0.25089722871780396, 0.08835750073194504, 0.10803301632404327, 0.17122460901737213, -0.11114673316478729, -0.08486767113208771, 0.10507523268461227, -0.1521773636341095, 0.01996438018977642, -0.12429384887218475, -0.07582998275756836, 0.03864382579922676, 0.16793213784694672, -0.09295254945755005, -0.3017588257789612, -0.28103750944137573, 0.1419229805469513, -0.07420971989631653, 0.2143644243478775, 0.35103803873062134, -0.03479808568954468, 0.3840600550174713, 0.6542618274688721, 0.06261488795280457, 0.10276493430137634, -0.19217729568481445, 0.2396249771118164, 0.05201699212193489, -0.6680744886398315, 0.16154417395591736, 0.07132910192012787, -0.40311598777770996, 0.23724207282066345, 0.3277628421783447, 0.2234083116054535, 0.1068708598613739, -0.1623992770910263, 0.008958622813224792, -0.30932149291038513, 0.20557859539985657, 0.010179869830608368, -0.1933353692293167, -0.12141472846269608, 0.027989136055111885, 0.17579136788845062, 0.11856035143136978, -0.3084102272987366, -0.10663215070962906, -0.41460728645324707, 0.01864364743232727, -0.40019354224205017, -0.6514689922332764, 0.09224622696638107, 0.04015001282095909, 0.09786958992481232, -0.0025699250400066376, -0.2797643542289734, -0.16972413659095764, -0.17002493143081665, 0.12639518082141876, 0.33131152391433716, -0.26108554005622864, -0.21677377820014954, 0.037391357123851776, -0.0854634940624237, -0.14781156182289124, 0.016099415719509125, 0.08903748542070389, 0.12975546717643738, 0.4998905658721924, 0.3431241512298584, 0.14619724452495575, -0.33045387268066406, 0.013064559549093246, -0.0009324699640274048, -0.11152321100234985, 0.3274611830711365, 0.17545649409294128, 0.0722920298576355, -0.09463196992874146, -0.3950280249118805, 0.2633700966835022, 0.286873996257782, -0.050698988139629364, 0.3815042972564697, -0.4005303382873535, -0.02632352150976658, 0.004073131363838911, -0.12704196572303772, -0.006129592657089233, -0.12775497138500214, 0.02481924183666706, 0.0619150772690773, 0.10998782515525818, -0.25247931480407715, 0.1654849797487259, -0.1811099797487259, -0.12809278070926666, -0.13679437339305878, 0.2108066976070404, 0.09776604175567627, -0.027016326785087585, 0.25169166922569275, 0.19575223326683044, 0.5039554238319397, 0.1116124838590622, 0.25418201088905334, 0.25034382939338684, -0.1214851588010788, 0.16402344405651093, 0.3342113494873047, -0.44172173738479614, -0.04332643002271652, -0.26297152042388916, -0.1226983293890953, 0.2609679400920868, -0.2051958441734314, 0.22179973125457764, 0.3339420258998871, 0.007381618022918701, 0.002057421952486038, 0.11502352356910706, 0.3605116307735443, -0.0688449814915657, -0.3044222295284271, -0.05677963048219681, 0.02588343247771263, 0.13806882500648499, -0.5615829825401306, 0.1502884179353714, -0.11572485417127609, -0.4203852117061615, -0.21019841730594635, -0.16043004393577576, -0.35180482268333435, -0.23968689143657684, -0.14305013418197632, -0.19453845918178558, -0.24227258563041687, 0.0659591406583786, -0.2627655863761902, 0.004238446243107319, -0.08326292037963867, 0.41532185673713684, 0.11733803153038025, -0.11982473731040955, 0.3166152834892273, 0.22338546812534332, 0.10955692827701569, -0.07486611604690552, 0.33910971879959106, 0.47989964485168457, 0.5285978317260742, -0.5117018222808838, 0.13374248147010803, 0.044616371393203735, -0.1574280709028244, 0.30191442370414734, 0.1640595942735672, 0.14108866453170776, 0.3766631484031677, -0.08367426693439484, 0.026485087350010872, -0.120234914124012, -0.027529891580343246, -0.3470246493816376, 0.30508163571357727, -0.07697419822216034, 0.602628767490387, -0.17007140815258026, 0.07052996009588242, -0.03803315758705139, 0.017637833952903748, -0.6420901417732239, 0.22090893983840942, 0.28187498450279236, -0.008003509603440762, -0.021658556535840034, -0.08776213973760605, 0.06818244606256485, -0.16235443949699402, 0.36749449372291565, 0.33446183800697327, -0.24954178929328918, -0.33011841773986816, 0.022244900465011597, -0.23582783341407776, 0.17580756545066833, 0.020583398640155792, 0.2468530535697937, 0.1701909452676773, 0.1396845281124115, 0.08777597546577454, 0.043250177055597305, -0.2119874507188797, -0.21274833381175995, -0.32029831409454346, 0.2325867861509323, -0.22644829750061035, 0.16267730295658112, 0.09173756837844849, 0.16309916973114014, 0.09703855216503143, -0.1210407093167305, -0.020949993282556534, 0.18173058331012726, -0.04122358188033104, 0.18836693465709686, 0.05869542807340622, 0.032442301511764526, 0.15964727103710175, -0.010996833443641663, 0.15784969925880432, 0.4102102220058441, 0.12945687770843506, -0.10364092141389847, -0.14860045909881592, -0.2190626859664917, -0.35943603515625, -0.24694570899009705, -0.06652957201004028, 0.4473224878311157, -0.036765746772289276, -0.07152119278907776, -0.21136511862277985, -0.22428031265735626, 0.016590185463428497, -0.1691896766424179, -0.3869915008544922, 0.16178247332572937, -0.14895029366016388, 0.054351162165403366, -0.012879772111773491, -0.09060891717672348, -0.0042410679161548615, -0.008515415713191032, -0.328203022480011, 0.0023103896528482437, 0.5907210111618042, -0.5755987763404846, -0.25329405069351196, -0.20074456930160522, 0.09248384088277817, -0.1720801293849945, -0.05984221398830414, -0.4238318204879761, -0.20638743042945862, 0.3250180780887604, -0.13640013337135315, -0.25072240829467773, 0.17856214940547943, 0.18198779225349426, -0.1021624505519867, -0.08247421681880951, 0.1303398311138153, 0.10932259261608124, -0.067695252597332, -0.05706137418746948, -0.08154651522636414 ]
https://github.com/huggingface/datasets/issues/501
Caching doesn't work for map (non-deterministic)
Thanks for reporting ! To store the cache file, we compute a hash of the function given in `.map`, using our own hashing function. The hash doesn't seem to stay the same over sessions for the tokenizer. Apparently this is because of the regex at `tokenizer.pat` is not well supported by our hashing function. I'm working on a fix
The caching functionality doesn't work reliably when tokenizing a dataset. Here's a small example to reproduce it. ```python import nlp import transformers def main(): ds = nlp.load_dataset("reddit", split="train[:500]") tokenizer = transformers.AutoTokenizer.from_pretrained("gpt2") def convert_to_features(example_batch): input_str = example_batch["body"] encodings = tokenizer(input_str, add_special_tokens=True, truncation=True) return encodings ds = ds.map(convert_to_features, batched=True) if __name__ == "__main__": main() ``` Roughly 3/10 times, this example recomputes the tokenization. Is this expected behaviour?
59
Caching doesn't work for map (non-deterministic) The caching functionality doesn't work reliably when tokenizing a dataset. Here's a small example to reproduce it. ```python import nlp import transformers def main(): ds = nlp.load_dataset("reddit", split="train[:500]") tokenizer = transformers.AutoTokenizer.from_pretrained("gpt2") def convert_to_features(example_batch): input_str = example_batch["body"] encodings = tokenizer(input_str, add_special_tokens=True, truncation=True) return encodings ds = ds.map(convert_to_features, batched=True) if __name__ == "__main__": main() ``` Roughly 3/10 times, this example recomputes the tokenization. Is this expected behaviour? Thanks for reporting ! To store the cache file, we compute a hash of the function given in `.map`, using our own hashing function. The hash doesn't seem to stay the same over sessions for the tokenizer. Apparently this is because of the regex at `tokenizer.pat` is not well supported by our hashing function. I'm working on a fix
[ -0.013687383383512497, 0.04759889841079712, 0.06730729341506958, -0.04567442089319229, 0.0919942557811737, -0.1835210621356964, 0.2613241374492645, 0.13279606401920319, 0.0008190255612134933, -0.3439313769340515, 0.0885012224316597, 0.2487126737833023, -0.14104625582695007, -0.27329763770103455, 0.13124214112758636, 0.17096523940563202, 0.3097134232521057, 0.04413020238280296, 0.30557727813720703, -0.08064251393079758, -0.06544548273086548, -0.027266791090369225, -0.3542211055755615, -0.0297059565782547, -0.5633125901222229, 0.05200465768575668, -0.13550126552581787, -0.40043196082115173, 0.28271085023880005, -0.39119526743888855, 0.09910792112350464, 0.17871011793613434, -0.013468736782670021, 0.2490125298500061, -0.00011657226423267275, -0.12955237925052643, 0.31427061557769775, -0.06422466039657593, 0.2027626931667328, -0.13746465742588043, -0.10561586916446686, -0.3216922879219055, -0.15899911522865295, -0.02203500270843506, -0.0848211944103241, -0.2071925848722458, 0.26315829157829285, -0.10601456463336945, 0.5493526458740234, 0.006880688481032848, 0.13113367557525635, 0.1738000065088272, -0.10376119613647461, 0.31602829694747925, 0.037143394351005554, 0.011069420725107193, -0.1272771656513214, -0.25867533683776855, -0.10812187194824219, -0.381333589553833, -0.42596733570098877, 0.17911048233509064, -0.17745594680309296, -0.18690159916877747, 0.25176599621772766, 0.2371278703212738, -0.05926772207021713, -0.17033764719963074, 0.23430919647216797, -0.1654309630393982, 0.4319820702075958, -0.22391542792320251, -0.2962215542793274, -0.07843761891126633, -0.2797973155975342, -0.1567184180021286, 0.4439508616924286, -0.086037777364254, -0.07148537039756775, 0.059156931936740875, -0.48007917404174805, 0.15903183817863464, 0.100261390209198, 0.09257331490516663, 0.0440002977848053, 0.5301565527915955, 0.08887877315282822, 0.1097642034292221, -0.1824953407049179, -0.22950147092342377, -0.04405837878584862, -0.22854742407798767, -0.1261470764875412, 0.47429943084716797, -0.15238913893699646, -0.2847384810447693, 0.026227086782455444, -0.08007720857858658, 0.05446004867553711, 0.2948210835456848, 0.05041094869375229, 0.2815190851688385, -0.029980599880218506, 0.21593698859214783, 0.007892990484833717, 0.5478114485740662, 0.1964384913444519, 0.44254305958747864, 0.1908513754606247, -0.5588885545730591, -0.4889092445373535, -0.0812603160738945, -0.029801487922668457, 0.034313879907131195, 0.6790283918380737, 0.056127119809389114, -0.38890916109085083, 0.034138161689043045, 0.18528354167938232, 0.058452751487493515, -0.35470935702323914, -0.17928355932235718, 0.05237780883908272, 0.22859975695610046, -0.11129266768693924, 0.03620922565460205, -0.5301238298416138, 0.03301164135336876, 0.06994759291410446, -0.12270953506231308, -0.2177218794822693, -0.16494020819664001, -0.4442877769470215, 0.2580900490283966, 0.18511556088924408, 0.4816345274448395, 0.28296995162963867, -0.11872498691082001, -0.16109010577201843, -0.12241492420434952, 0.1046065092086792, -0.2712717652320862, 0.44023942947387695, -0.0034612491726875305, -0.3136519491672516, 0.19001805782318115, -0.026726815849542618, -0.014104519039392471, -0.3247201442718506, -0.008299410343170166, -0.018700815737247467, -0.08472931385040283, 0.43186572194099426, 0.0427011139690876, -0.23802436888217926, -0.13476529717445374, -0.02993118017911911, 0.29315459728240967, 0.5849568843841553, -0.23446162045001984, -0.022243522107601166, -0.05238472670316696, -0.3115327060222626, -0.33486679196357727, 0.1609579622745514, 0.2611807584762573, 0.2704751193523407, -0.291974812746048, 0.4862935543060303, 0.3912268877029419, 0.30230799317359924, 0.5853943824768066, -0.1874111294746399, 0.12775768339633942, -0.07888861745595932, 0.6074692010879517, 0.22613456845283508, -0.1387706696987152, -0.5778236985206604, 0.016323406249284744, 0.09311865270137787, 0.09223727881908417, -0.08541738241910934, -0.05149533227086067, 0.3476938009262085, -0.2769733667373657, 0.03197713568806648, 0.31639498472213745, 0.048755086958408356, 0.005676316097378731, -0.33022546768188477, -0.0635456070303917, 0.43624430894851685, -0.21021290123462677, 0.19924046099185944, -0.04791460186243057, -0.03538907319307327, 0.1872391402721405, -0.22639214992523193, 0.09076134860515594, 0.2284289449453354, -0.049125850200653076, 0.16356703639030457, -0.1805581897497177, 0.12601253390312195, -0.07574017345905304, -0.18772432208061218, 0.1920468807220459, -0.187138170003891, -0.18077091872692108, 0.033936791121959686, -0.11340545117855072, 0.162447988986969, -0.14312732219696045, -0.06627848744392395, -0.2908812463283539, 0.10511577129364014, 0.11165275424718857, 0.38746657967567444, 0.1515067219734192, -0.14658765494823456, 0.12434006482362747, 0.4645557403564453, 0.011935516260564327, 0.11252449452877045, -0.09797900170087814, 0.045576322823762894, -0.23537486791610718, -0.309081494808197, 0.16315016150474548, 0.24180719256401062, 0.05726376175880432, -0.11842194944620132, 0.16259902715682983, -0.02884901501238346, 0.2141638696193695, -0.07008103281259537, 0.4044356644153595, 0.07872223854064941, -0.08599185943603516, 0.0643271803855896, 0.30193185806274414, -0.12645094096660614, -0.27961793541908264, 0.03595731779932976, 0.414594829082489, 0.5003681182861328, -0.023509979248046875, -0.14238333702087402, 0.05573336035013199, 0.3090836703777313, -0.152400404214859, -0.11689964681863785, -0.16373051702976227, -0.0872420072555542, -0.0906471461057663, 0.13493859767913818, 0.09354637563228607, 0.09027653932571411, 0.1426393687725067, 0.39827635884284973, -0.026044713333249092, 0.08506283909082413, 0.05658282712101936, -0.38321998715400696, -0.5182850956916809, 0.1002301350235939, -0.020621556788682938, 0.03757815062999725, 0.005719855893403292, 0.26602038741111755, -0.013769110664725304, -0.17208921909332275, -0.15457051992416382, 0.11818855255842209, -0.06530922651290894, -0.2103813886642456, 0.10191939771175385, 0.16040819883346558, 0.3006863296031952, -0.12813454866409302, -0.13577277958393097, 0.24756509065628052, 0.007779769599437714, -0.05369259789586067, 0.06890552490949631, -0.24569609761238098, 0.0005734749138355255, 0.2347128540277481, -0.08983513712882996, -0.22501879930496216, -0.21726852655410767, -0.13923880457878113, 0.2956099212169647, 0.035928238183259964, 0.44421300292015076, -0.1402319371700287, 0.08420252799987793, -0.04568522050976753, -0.15483561158180237, -0.16303783655166626, -0.30492526292800903, -0.25613871216773987, -0.09476187825202942, 0.23274508118629456, -0.295922189950943, 0.215718075633049, -0.014919869601726532, 0.04955725371837616, -0.1273164600133896, -0.3565967381000519, 0.16489268839359283, 0.002620566636323929, -0.08096728473901749, -0.15070173144340515, -0.3412349224090576, -0.5605173707008362, -0.03470665216445923, 0.2581997811794281, -0.45321962237358093, -0.14045077562332153, 0.2224097102880478, 0.18762017786502838, -0.10442261397838593, 0.01564623787999153, 0.14283637702465057, -0.048426553606987, 0.01044272631406784, 0.16988268494606018, -0.06455036997795105, 0.09117288887500763, 0.40042969584465027, -0.29320383071899414, 0.004719837568700314, -0.4901481568813324, -0.1463358998298645, -0.37060490250587463, -0.23664002120494843, 0.7362604737281799, -0.11054632067680359, -0.08007138967514038, -0.026162050664424896, -0.11542066931724548, 0.23988527059555054, 0.5107483267784119, -0.18600386381149292, 0.16233932971954346, -0.07665102928876877, 0.10535787045955658, 0.09626244008541107, -0.30812400579452515, 0.3067167401313782, -0.09346172213554382, -0.07068303972482681, 0.05119587481021881, -0.14666686952114105, 0.143020361661911, 0.26085758209228516, 0.3049933612346649, 0.23921218514442444, 0.09110720455646515, 0.3536166846752167, 0.8350926637649536, 0.08380989730358124, -0.15414021909236908, 0.17905591428279877, 0.2011922299861908, 0.05612419545650482, -0.16763034462928772, 0.018238207325339317, -0.06496644765138626, -0.10812649130821228, -0.03741028904914856, 0.1951104998588562, 0.12478624284267426, -0.42964115738868713, -0.07525695860385895, -0.28708332777023315, -0.07739736139774323, -0.36531633138656616, 0.2314305603504181, -0.5263300538063049, 0.35369616746902466, 0.2522389590740204, 0.4212898313999176, -0.508278489112854, -0.3702866733074188, 0.05153665319085121, -0.12057928740978241, 0.37682557106018066, 0.02754986472427845, -0.6036432981491089, 0.15982921421527863, -0.6390219330787659, 0.22548705339431763, -0.03145529702305794, 0.6086581945419312, -0.04929639399051666, -0.12634792923927307, -0.11252643167972565, -0.02735210210084915, 0.30819496512413025, -0.36216115951538086, 0.11806613951921463, 0.16595901548862457, -0.26143699884414673, 0.002488698810338974, -0.13479843735694885, 0.03650873526930809, 0.13942024111747742, 0.3713933825492859, 0.6505621671676636, -0.1984955072402954, -0.10037638247013092, -0.6000763177871704, -0.0540403313934803, 0.06487928330898285, -0.2873968183994293, 0.07346294820308685, 0.3018549382686615, -0.1909441500902176, 0.08215475082397461, 0.1917179673910141, -0.09741473942995071, 0.24283796548843384, -0.03138953447341919, -0.19406959414482117, -0.10733385384082794, 0.23250064253807068, 0.04157339408993721, 0.3474746346473694, -0.009896363131701946, 0.20715448260307312, 0.2720624804496765, 0.10657608509063721, -0.2526550889015198, -0.3211754858493805, 0.2206677943468094, -0.22903555631637573, -0.06933506578207016, -0.0051423329859972, 0.2123197317123413, 0.12096191942691803, -0.03751266375184059, 0.044071633368730545, -0.14889514446258545, -0.01460186392068863, -0.2373540997505188, 0.16716712713241577, 0.08336994051933289, 0.19542181491851807, -0.379445344209671, -0.32636308670043945, 0.12581218779087067, 0.13840284943580627, -0.18074336647987366, 0.226623997092247, -0.37758558988571167, -0.4460236430168152, 0.6914548277854919, 0.22732657194137573, 0.9793083667755127, 0.1366845667362213, 0.40660539269447327, -0.26107004284858704, 0.2454628199338913, 0.3961777985095978, -0.2034371942281723, 0.27053970098495483, -0.21066060662269592, 0.06207762286067009, -0.05086202919483185, -0.13268430531024933, 0.00912390649318695, 0.31720399856567383, -0.2797611355781555, 0.3796665072441101, 0.14434315264225006, 0.8239796757698059, 0.1463339924812317, 0.05896032601594925, 0.08577084541320801, -0.23304219543933868, 0.286539763212204, 0.13255977630615234, -0.026888273656368256, 0.2350771725177765, 0.02845894917845726, -0.0910462960600853, 0.039446745067834854, 0.0768706426024437, -0.188970148563385, 0.06907240301370621, -0.27219709753990173, 0.17234165966510773, 0.19900022447109222, 0.0919741690158844, -0.03574119135737419, 0.12718331813812256, 0.30982255935668945, 0.16352736949920654, -0.2802831828594208, 0.07498280704021454, 0.35862502455711365, 0.20181919634342194, -0.009623968973755836, -0.32213935256004333, 0.26459914445877075, 0.07026097178459167, 0.054055355489254, -0.07454367727041245, -0.054570361971855164, -0.4214327335357666, -0.5006971955299377, -0.048470959067344666, 0.11821171641349792, -0.06978347897529602, 0.18675580620765686, 0.04478324204683304, -0.205471932888031, -0.13294535875320435, 0.11663481593132019, 0.17082977294921875, -0.05468878895044327, 0.41485539078712463, -0.1348784863948822, -0.03565690293908119, 0.028378155082464218, 0.40336963534355164, -0.0007579289376735687, -0.18594713509082794, 0.49344730377197266, -0.4574660062789917, -0.3638174533843994, -0.1566360890865326, -0.16531643271446228, -0.20133568346500397, -0.2225382924079895, -0.06257029622793198, -0.3878852128982544, -0.19723011553287506, 0.0375344417989254, 0.044824253767728806, 0.16295310854911804, 0.10894742608070374, -0.03896842896938324, -0.2716582417488098, -0.42006513476371765, -0.06419675052165985, -0.028873208910226822, 0.015856295824050903, -0.042241524904966354, 0.27868789434432983, -0.031084269285202026, 0.25779202580451965, -0.26141005754470825, -0.20177845656871796, 0.07115375250577927, 0.17861813306808472, -0.31313255429267883, -0.2629745304584503, 0.11784858256578445, -0.06989552080631256, -0.0040269698947668076, 0.3412349820137024, -0.3315980136394501, -0.11273513734340668, -0.07756869494915009, 0.1665164828300476, 0.3449385166168213, -0.18282751739025116, -0.21376611292362213, 0.16946956515312195, 0.015977364033460617, -0.5175474882125854, -0.19795405864715576, 0.30849191546440125, 0.010292429476976395, 0.009713138453662395, 0.17567649483680725, 0.2858935296535492, 0.13759279251098633, -0.09750665724277496, -0.016627445816993713, 0.0885629951953888, -0.04668290168046951, 0.2704509496688843, 0.006390070542693138, 0.02855529636144638, -0.2647029459476471, 0.1746230125427246, 0.1920987367630005, -0.042692504823207855, 0.4463927447795868, -0.07283955812454224, -0.13357993960380554, 0.16154702007770538, -0.18882405757904053, 0.18498799204826355, 0.02144353836774826, -0.48648208379745483, 0.7638773322105408, 0.15109729766845703, -0.01629936322569847, -0.05259187892079353, 0.3405272960662842, 0.15305882692337036, -0.06492278724908829, 0.0520947203040123, 0.46918293833732605, -0.09862589836120605, 0.005894377827644348, 0.04980733245611191, 0.5783455967903137, -0.4047413468360901, 0.14368616044521332, -0.14372621476650238, 0.09943926334381104, 0.19408637285232544, 0.38117143511772156, 0.07639425992965698, 0.08557803183794022, 0.05426054820418358, 0.35619333386421204, 0.23288199305534363, 0.14322948455810547, 0.22869908809661865, -0.3098301291465759, -0.24259252846240997, -0.21233858168125153, 0.46491795778274536, 0.03334042429924011, 0.508662223815918, -0.11323250830173492, 0.2447834610939026, 0.15917722880840302, -0.1347518116235733, -0.23194925487041473, 0.3040004372596741, -0.22837364673614502, -0.2894885241985321, 0.10079103708267212, -0.0436234287917614, -0.15049976110458374, 0.15391965210437775, -0.11671954393386841, 0.12531673908233643, 0.14424265921115875, -0.008362554013729095, -0.035417765378952026, 0.03004024550318718, 0.14557385444641113, -0.057955846190452576, 0.3666916787624359, -0.3213556110858917, 0.27091073989868164, -0.45090770721435547, -0.13220877945423126, -0.1833270937204361, 0.12972770631313324, 0.2746247351169586, 0.3292092978954315, -0.32308682799339294, 0.1327791064977646, -0.06978407502174377, 0.05780255049467087, -0.19048181176185608, 0.6730785965919495, 0.06565933674573898, -0.49360257387161255, 0.024180632084608078, -0.041492484509944916, -0.028902098536491394, -0.07741573452949524, 0.07288379222154617, 0.014757378026843071, 0.19962994754314423, 0.49300459027290344, 0.04544822871685028, -0.13820239901542664, 0.2667309045791626, 0.04646039381623268, -0.2540114223957062, -0.09443541616201401, 0.15649136900901794, -0.02498452179133892, 0.24814754724502563, -0.25275397300720215, 0.07367760688066483, -0.0742083489894867, 0.3581219017505646, 0.3809092342853546, -0.17094314098358154, -0.263942688703537, -0.06462594866752625, -0.4245133697986603, 0.40259864926338196, -0.0921911895275116, 0.28478044271469116, -0.23248116672039032, 0.2075224220752716, -0.11058864742517471, -0.004981115460395813, -0.1382383555173874, 0.05789610370993614, -0.32025769352912903, 0.08505024015903473, -0.14611589908599854, 0.4202273190021515, -0.14695295691490173, 0.2991522252559662, 0.15467698872089386, -0.31796637177467346, 0.29204219579696655, -0.00857818778604269, 0.13185936212539673, -0.09590476751327515, -0.08701495826244354, 0.037733253091573715, 0.27268147468566895, 0.5620130300521851, 0.23275746405124664, 0.08725874871015549, 0.06969631463289261, 0.18947279453277588, -0.37470152974128723, 0.02166903205215931, -0.056567978113889694, -0.02971624583005905, -0.13549122214317322, 0.1955704540014267, -0.35133790969848633, 0.1786046326160431, -0.16323202848434448, 0.0025970235001295805, 0.04499852657318115, -0.42958277463912964, -0.04998992383480072, -0.05069282650947571, -0.19095027446746826, -0.02922103740274906, 0.00036441534757614136, 0.34487470984458923, -0.17466677725315094, 0.2510060667991638, -0.3981543183326721, -0.214626744389534, 0.229882150888443, -0.6583092212677002, -0.49711379408836365, -0.04409875348210335, 0.0841892659664154, 0.4080107510089874, 0.006948113441467285, -0.2966824173927307, -0.21577779948711395, 0.2761684060096741, 0.07779057323932648, -0.24849174916744232, -0.10163837671279907, 0.02647026814520359, -0.12463314831256866, -0.28421318531036377, 0.2960050106048584, -0.001549016684293747, -0.2540472447872162, 0.040507588535547256, -0.03600957989692688 ]
https://github.com/huggingface/datasets/issues/492
nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema
In 0.4.0, the assertion in `concatenate_datasets ` is on the features, and not the schema. Could you try to update `nlp` ? Also, since 0.4.0, you can use `dset_wikipedia.cast_(dset_books.features)` to avoid the schema cast hack.
Here's the code I'm trying to run: ```python dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir) dset_wikipedia.drop(columns=["title"]) dset_wikipedia.features.pop("title") dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir) dset = nlp.concatenate_datasets([dset_wikipedia, dset_books]) ``` This fails because they have different schemas, despite having identical features. ```python assert dset_wikipedia.features == dset_books.features # True assert dset_wikipedia._data.schema == dset_books._data.schema # False ``` The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves. ```python dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema) ```
35
nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema Here's the code I'm trying to run: ```python dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir) dset_wikipedia.drop(columns=["title"]) dset_wikipedia.features.pop("title") dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir) dset = nlp.concatenate_datasets([dset_wikipedia, dset_books]) ``` This fails because they have different schemas, despite having identical features. ```python assert dset_wikipedia.features == dset_books.features # True assert dset_wikipedia._data.schema == dset_books._data.schema # False ``` The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves. ```python dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema) ``` In 0.4.0, the assertion in `concatenate_datasets ` is on the features, and not the schema. Could you try to update `nlp` ? Also, since 0.4.0, you can use `dset_wikipedia.cast_(dset_books.features)` to avoid the schema cast hack.
[ -0.06439743936061859, 0.11732618510723114, 0.026808541268110275, 0.1252702921628952, 0.1567062884569168, -0.07730812579393387, 0.34048768877983093, 0.16924811899662018, -0.32196134328842163, -0.35339826345443726, 0.0765741616487503, 0.36736148595809937, -0.0683540627360344, 0.3275822401046753, 0.09264742583036423, -0.02780146151781082, 0.20226658880710602, 0.23024971783161163, 0.09695856273174286, -0.002624109387397766, -0.09303323179483414, 0.18114469945430756, -0.396562397480011, 0.040222082287073135, -0.5902648568153381, 0.20654845237731934, -0.03330043703317642, -0.019506268203258514, -0.13875365257263184, -0.5088022947311401, 0.3443300426006317, 0.20197424292564392, -0.10029499232769012, 0.34479671716690063, -0.0001246000174432993, -0.12146616727113724, 0.5814353227615356, -0.10619385540485382, -0.13572438061237335, -0.13159669935703278, -0.10617262125015259, -0.33427414298057556, 0.14512936770915985, -0.18405961990356445, 0.04411807656288147, -0.14262741804122925, -0.0075735654681921005, 0.304188072681427, -0.5539476871490479, 0.26949334144592285, 0.04740129038691521, 0.5145813226699829, 0.4430457055568695, 0.2505994141101837, 0.3381248414516449, 0.003944680094718933, -0.1633380502462387, 0.07745307683944702, -0.22171789407730103, -0.23089492321014404, 0.2946067750453949, -0.004090092610567808, -0.30326512455940247, -0.286205917596817, 0.18922004103660583, 0.005323226563632488, 0.03609752655029297, -0.14862143993377686, -0.13279440999031067, 0.4225975275039673, 0.44905030727386475, -0.27227577567100525, -0.348579078912735, -0.2052134871482849, 0.024923179298639297, -0.22269368171691895, 0.3266036808490753, 0.41078242659568787, 0.04954535886645317, 0.04458976164460182, -0.4404836893081665, 0.11014894396066666, -0.10682903975248337, 0.27329617738723755, -0.3308844566345215, 0.3821595013141632, 0.4234020709991455, 0.10966143012046814, 0.01280822604894638, -0.12922130525112152, 0.2586248219013214, -0.37460675835609436, -0.019423674792051315, 0.1626719832420349, -0.290812224149704, -0.18419966101646423, -0.2253866195678711, 0.022113148123025894, 0.4305439889431, -0.029017958790063858, -0.1455574780702591, 0.0746987983584404, -0.1401948481798172, 0.10762788355350494, 0.19453231990337372, 0.2544104754924774, 0.22397926449775696, -0.10421350598335266, 0.0038689151406288147, 0.07679617404937744, -0.2166551947593689, 0.2659812867641449, 0.22742722928524017, -0.2757512032985687, 0.08938014507293701, -0.040519341826438904, 0.565130352973938, -0.06947249919176102, -0.30423450469970703, 0.056548237800598145, -0.736463725566864, -0.12358033657073975, 0.1029147133231163, -0.04024919122457504, -0.0763520896434784, 0.44912227988243103, 0.058643803000450134, 0.36355650424957275, -0.19769571721553802, -0.37983453273773193, -0.07226323336362839, 0.014561686664819717, 0.016206059604883194, 0.06115248054265976, 0.14378602802753448, 0.07904274016618729, 0.16704687476158142, -0.020861268043518066, -0.4102080464363098, 0.20522230863571167, -0.21138855814933777, -0.16764526069164276, -0.1489063799381256, 0.028977902606129646, -0.21916644275188446, -0.3602612316608429, 0.015674492344260216, -0.35024017095565796, -0.23684367537498474, 0.15334007143974304, -0.0034034475684165955, -0.3047693967819214, -0.2618941366672516, 0.03209361061453819, -0.3846154808998108, -0.10740561783313751, -0.05265655368566513, 0.3227856457233429, 0.21901997923851013, -0.018992550671100616, 0.07113286852836609, -0.11525441706180573, -0.001866910606622696, -0.24450334906578064, 0.14686422049999237, 0.1550917625427246, -0.05093354731798172, -0.016489960253238678, 0.11213450878858566, -0.16545578837394714, -0.04991776496171951, 0.2630231976509094, -0.08395218849182129, 0.0946989431977272, -0.167056605219841, 0.439860999584198, 0.3568466305732727, -0.007368940860033035, -0.0031484048813581467, 0.04584500938653946, 0.2689751982688904, 0.08529043942689896, 0.11071106791496277, 0.008312629535794258, -0.37393665313720703, 0.03493418172001839, -0.04454817622900009, 0.3406245708465576, -0.06432770937681198, -0.1324491649866104, -0.2004016786813736, -0.3290831744670868, 0.672114372253418, -0.16428959369659424, -0.07429598271846771, 0.13884350657463074, -0.09337276965379715, 0.23716503381729126, 0.3771461844444275, -0.23933571577072144, -0.13517487049102783, -0.03203904628753662, 0.297610878944397, 0.224885493516922, -0.3573702573776245, -0.3245318830013275, -0.6215186715126038, 0.11531304568052292, -0.27445363998413086, 0.5649365782737732, -0.0713176280260086, -0.3467869758605957, -0.022644083946943283, 0.11680442839860916, 0.18421123921871185, 0.04912351816892624, 0.05024135857820511, 0.1320672482252121, 0.0034756623208522797, 0.20404542982578278, -0.017223678529262543, -0.03416203707456589, -0.002185661345720291, 0.0743369609117508, -0.1543973982334137, 0.5079222917556763, -0.05080220848321915, -0.24476885795593262, 0.011600468307733536, 0.5782461762428284, 0.23105943202972412, 0.0018771195318549871, 0.020985862240195274, 0.28617602586746216, -0.021008603274822235, 0.01699109375476837, -0.18417340517044067, 0.35977089405059814, 0.010343886911869049, -0.10821384191513062, -0.11973472684621811, 0.29582861065864563, 0.08247349411249161, -0.03623221814632416, 0.1069776713848114, 0.5403361320495605, 0.08906061947345734, -0.127483069896698, 0.23868636786937714, -0.03101133368909359, 0.06412184238433838, -0.14568379521369934, -0.09171920269727707, -0.06876315176486969, 0.10331065952777863, -0.029711324721574783, -0.37825533747673035, 0.46861809492111206, -0.5818823575973511, -0.10383517295122147, 0.48804301023483276, -0.1803913414478302, 0.20120269060134888, -0.1890503168106079, -0.19808077812194824, 0.021636109799146652, 0.3691534996032715, -0.368634432554245, 0.16427013278007507, 0.17382238805294037, 0.024824082851409912, 0.04858144745230675, -0.30413174629211426, 0.06456310302019119, 0.3759588301181793, -0.03632573038339615, 0.12762625515460968, -0.010123372077941895, 0.29444262385368347, -0.2063150405883789, -0.36222273111343384, 0.14047378301620483, 0.12486089020967484, -0.00015771575272083282, -0.3340359330177307, -0.008838249370455742, -0.36414146423339844, -0.06759058684110641, -0.4399203658103943, -0.22861604392528534, -0.5033971667289734, -0.431834876537323, -0.14808820188045502, 0.7034396529197693, 0.004324287176132202, 0.2784738838672638, -0.6784127950668335, -0.2246832400560379, 0.04386857897043228, -0.26377347111701965, -0.013505447655916214, 0.047904375940561295, -0.19326499104499817, -0.08919040858745575, 0.29253092408180237, 0.18875625729560852, -0.20671547949314117, 0.02069486491382122, -0.16096431016921997, -0.2025885283946991, -0.7249012589454651, 0.07838883996009827, -0.33759427070617676, 0.001990988850593567, 0.29577693343162537, -0.08461931347846985, 0.15908972918987274, -0.34672850370407104, 0.1459013670682907, 0.17186897993087769, -0.41360291838645935, 0.4664396643638611, 0.033324554562568665, -0.28770318627357483, -0.00893125869333744, -0.2185094654560089, -0.05888354778289795, -0.24343854188919067, 0.2334795594215393, -0.013571498915553093, 0.07514729350805283, 0.4313390254974365, 0.015930816531181335, 0.05079301819205284, -0.1473095566034317, -0.04406185448169708, 0.06703577935695648, 0.4366895854473114, 0.4299977719783783, 0.24937140941619873, -0.15704546868801117, 0.1447862833738327, -0.23026308417320251, -0.1630174070596695, 0.24477997422218323, 0.0009895861148834229, -0.11028717458248138, -0.1580326110124588, 0.5572428107261658, 0.20547211170196533, -0.5082899928092957, 0.3505131006240845, 0.4187275767326355, 0.07526159286499023, 0.01391773670911789, -0.23244254291057587, -0.009098581969738007, 0.44310861825942993, 0.29314297437667847, 0.08663992583751678, -0.16745051741600037, 0.17159105837345123, 0.05248963087797165, -0.035490214824676514, -0.2688117027282715, 0.5545909404754639, -0.19803155958652496, -0.006736081093549728, 0.16514533758163452, -0.0011857189238071442, -0.14692704379558563, 0.015507757663726807, 0.2795690894126892, 0.1951109766960144, -0.24524688720703125, -0.2343914657831192, 0.1371355801820755, 0.12299226224422455, -0.1862454116344452, -0.14446476101875305, 0.13355882465839386, -0.35760191082954407, 0.3650497794151306, -0.06971316039562225, -0.16778510808944702, -0.17205683887004852, -0.42460569739341736, -0.02498600259423256, 0.1461028754711151, -0.05824332684278488, 0.11054998636245728, -0.6636133193969727, -0.05151709169149399, -0.006246559321880341, 0.3996483087539673, 0.19198021292686462, 0.5644328594207764, 0.22600428760051727, -0.42119577527046204, -0.17157892882823944, -0.14372777938842773, 0.5449913144111633, 0.009909993037581444, -0.14280582964420319, 0.29447099566459656, 0.23994097113609314, -0.28927111625671387, -0.27854520082473755, 0.027351070195436478, 0.1203588917851448, 0.3569139838218689, 0.24000130593776703, -0.5941349267959595, -0.24634769558906555, 0.3794514834880829, 0.28202834725379944, 0.030324164777994156, -0.031447555869817734, -0.1235702782869339, 0.05202622711658478, 0.05941995978355408, -0.17027246952056885, -0.07572837173938751, 0.3546292781829834, -0.3836921155452728, 0.035162705928087234, -0.31019914150238037, -0.09641576558351517, 0.16397815942764282, 0.3305374085903168, 0.337770015001297, -0.3164932429790497, 0.07442516088485718, -0.3892464339733124, 0.14555920660495758, 0.12628965079784393, 0.3810679614543915, 0.39673271775245667, -0.4478462338447571, -0.4655654728412628, 0.11590385437011719, 0.3578374981880188, -0.027674242854118347, 0.1747044175863266, 0.2886180877685547, -0.2007162719964981, -0.2645500898361206, -0.1983746588230133, -0.02896389178931713, 0.41334185004234314, -0.09976070374250412, -0.11462154984474182, -0.06494179368019104, 0.5096235871315002, 0.021269582211971283, 0.12192066013813019, -0.5886439681053162, 0.2646942138671875, -0.4755284786224365, 0.25356435775756836, -0.11446984857320786, 0.9977641701698303, 0.11568349599838257, 0.10022831708192825, 0.26918283104896545, 0.16573680937290192, 0.509956955909729, 0.007556706666946411, 0.1577657163143158, -0.3320663869380951, 0.2349306046962738, -0.1403215080499649, -0.20334136486053467, 0.18939858675003052, 0.21553558111190796, -0.2847737669944763, 0.20998497307300568, -0.0445333793759346, 0.08996832370758057, -0.03129056841135025, 0.25049638748168945, 0.0605236291885376, 0.28652817010879517, -0.30728602409362793, -0.09488766640424728, -0.09237648546695709, 0.08322253078222275, 0.0634085088968277, -0.20933179557323456, -0.3941882252693176, -0.1552630066871643, 0.011525943875312805, 0.18102556467056274, 0.0728997066617012, 0.060184676200151443, 0.4171120226383209, -0.2120634913444519, -0.03180612251162529, 0.2774357795715332, -0.009271450340747833, -0.25074535608291626, -0.03982601314783096, -0.058183226734399796, 0.22558122873306274, -0.15097841620445251, 0.19827739894390106, -0.11555766314268112, 0.24599918723106384, 0.13251298666000366, -0.3227522075176239, -0.11543174833059311, -0.1396712362766266, -0.1983376443386078, -0.10887384414672852, -0.11202019453048706, 0.03152560070157051, -0.14325551688671112, -0.18744917213916779, 0.03216979652643204, -0.08157356828451157, -0.08312089741230011, -0.025219954550266266, -0.21518881618976593, -0.07785400003194809, 0.03839978948235512, 0.038034480065107346, -0.15258380770683289, 0.04483470320701599, 0.24183747172355652, 0.23767119646072388, 0.5448002815246582, 0.4637742042541504, 0.03762655332684517, -0.0040661729872226715, 0.0038765668869018555, -0.28746297955513, -0.23030686378479004, -0.38079431653022766, -0.11401554942131042, -0.06502445042133331, -0.14886285364627838, -0.1858001947402954, 0.6646891236305237, 0.044605519622564316, 0.29153576493263245, 0.08675667643547058, -0.15469813346862793, -0.08424485474824905, 0.3814483880996704, 0.20853471755981445, 0.22130273282527924, 0.00424300879240036, 0.554447591304779, 0.1517045646905899, 0.04859234020113945, -0.11272227764129639, -0.09730546921491623, -0.38188475370407104, 0.2463034838438034, 0.15250164270401, -0.07379276305437088, -0.1864912509918213, -0.3309207558631897, 0.08159370720386505, -0.2978516221046448, 0.1310175210237503, 0.010847702622413635, -0.061111561954021454, 0.20714199542999268, 0.38532474637031555, 0.04629331827163696, 0.04347267001867294, 0.018926117569208145, 0.3019472062587738, -0.12284232676029205, -0.16336673498153687, 0.11679873615503311, -0.15093302726745605, 0.3340259790420532, 0.30670925974845886, 0.26797398924827576, -0.3899150490760803, 0.04543568193912506, -0.11738358438014984, -0.07304498553276062, -0.013228246942162514, 0.34085503220558167, 0.01956946961581707, 0.16279800236225128, -0.0384199321269989, 0.12290014326572418, -0.0323852002620697, 0.09296974539756775, -0.009426005184650421, -0.11493514478206635, -0.3325376808643341, -0.06180817633867264, -0.019270209595561028, 0.4199445843696594, -0.015017841011285782, -0.21453243494033813, 0.3441826105117798, 0.021738778799772263, -0.40451666712760925, -0.056326135993003845, 0.19630292057991028, -0.32766613364219666, 0.029758695513010025, 0.14096763730049133, 0.4163491427898407, 0.24807289242744446, -0.36455458402633667, 0.11515683680772781, 0.09502624720335007, 0.04223606362938881, 0.20479333400726318, 0.2129475325345993, -0.015564784407615662, 0.17719420790672302, 0.4805334508419037, -0.02085084468126297, 0.08700311183929443, -0.15910308063030243, 0.4040466248989105, 0.17980018258094788, 0.021850086748600006, -0.185967817902565, 0.4318917691707611, 0.125431090593338, -0.30018916726112366, 0.10341416299343109, 0.48304906487464905, 0.0874405950307846, 0.1706002801656723, 0.36804652214050293, 0.048985615372657776, -0.2632361054420471, -0.16463442146778107, 0.09225195646286011, -0.11820975691080093, -0.12795594334602356, -0.23268112540245056, -0.2687023878097534, -0.12625417113304138, -0.18265342712402344, 0.035107191652059555, -0.18470996618270874, 0.5446304082870483, 0.08575663715600967, -0.08713245391845703, -0.3670356571674347, 0.33955681324005127, 0.24779704213142395, 0.1671561300754547, -0.22757521271705627, 0.05508193001151085, 0.03803892433643341, -0.2480459213256836, 0.2264210432767868, 0.3592930734157562, 0.29178544878959656, 0.32635629177093506, -0.3158450126647949, -0.39114323258399963, 0.019301854074001312, 0.029535027220845222, 0.09633313119411469, 0.00562267005443573, -0.08329598605632782, 0.12382557988166809, 0.19701659679412842, -0.01872742734849453, 0.08568750321865082, -0.0020504705607891083, -0.07532472908496857, -0.25289586186408997, -0.30666765570640564, 0.5929834246635437, -0.01823536679148674, -0.3518264889717102, 0.03880340978503227, 0.07254450023174286, -0.01174258440732956, -0.19553831219673157, 0.1793351173400879, 0.2753734886646271, 0.21460238099098206, 0.08601518720388412, 0.01157405972480774, 0.19364571571350098, 0.15901874005794525, 0.09588068723678589, 0.1392924189567566, -0.016912896186113358, 0.1692797988653183, -0.4543953537940979, 0.024961479008197784, -0.052197251468896866, -0.21022653579711914, 0.08040593564510345, 0.30084580183029175, 0.04544970393180847, 0.02516913041472435, -0.3979475498199463, -0.029296576976776123, 0.24268850684165955, -0.025050990283489227, -0.24672061204910278, -0.10982759296894073, 0.24422910809516907, -0.3090701103210449, -0.2742748260498047, -0.3003706634044647, 0.3783373236656189, -0.2326958179473877, -0.05843723192811012, -0.008052831515669823, 0.1860935091972351, 0.482160747051239, 0.3097608685493469, -0.015544064342975616, -0.00046811439096927643, 0.7240973711013794, 0.07778789103031158, -0.0391615554690361, -0.27639052271842957, -0.1431499570608139, -0.42824119329452515, 0.20609328150749207, -0.29757872223854065, 0.220962792634964, -0.07794462144374847, 0.5272225737571716, 0.06258733570575714, 0.5148119926452637, -0.12454459816217422, -0.22233542799949646, 0.0077807847410440445, 0.20176109671592712, -0.37490391731262207, 0.05190475285053253, 0.1074225977063179, 0.023016273975372314, -0.026265323162078857, 0.05952028930187225, -0.09375442564487457, -0.46937647461891174, 0.15552350878715515, -0.13446129858493805, -0.2337861806154251, 0.02665020152926445, -0.01850108802318573, 0.14006751775741577, 0.0730232521891594, -0.4839620888233185, -0.20245833694934845, 0.3920604884624481, 0.070185087621212, 0.07715943455696106, 0.16482509672641754, 0.15356895327568054, -0.12442399561405182, -0.16481922566890717, -0.0260823592543602, -0.22623905539512634, -0.09904341399669647, -0.05597984045743942, -0.0403769314289093 ]
https://github.com/huggingface/datasets/issues/492
nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema
I'm using the master branch. The assertion failure comes from the underlying `pa.concat_tables()`, which is in the pyarrow package. That method does check schemas. Since `features.type` does not contain information about nullable vs non-nullable features, the `cast_()` method won't resolve the schema mismatch. There is information in a schema which is not stored in features.
Here's the code I'm trying to run: ```python dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir) dset_wikipedia.drop(columns=["title"]) dset_wikipedia.features.pop("title") dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir) dset = nlp.concatenate_datasets([dset_wikipedia, dset_books]) ``` This fails because they have different schemas, despite having identical features. ```python assert dset_wikipedia.features == dset_books.features # True assert dset_wikipedia._data.schema == dset_books._data.schema # False ``` The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves. ```python dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema) ```
55
nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema Here's the code I'm trying to run: ```python dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir) dset_wikipedia.drop(columns=["title"]) dset_wikipedia.features.pop("title") dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir) dset = nlp.concatenate_datasets([dset_wikipedia, dset_books]) ``` This fails because they have different schemas, despite having identical features. ```python assert dset_wikipedia.features == dset_books.features # True assert dset_wikipedia._data.schema == dset_books._data.schema # False ``` The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves. ```python dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema) ``` I'm using the master branch. The assertion failure comes from the underlying `pa.concat_tables()`, which is in the pyarrow package. That method does check schemas. Since `features.type` does not contain information about nullable vs non-nullable features, the `cast_()` method won't resolve the schema mismatch. There is information in a schema which is not stored in features.
[ -0.00003308802843093872, 0.053868576884269714, 0.03097286820411682, 0.15277835726737976, 0.13154074549674988, -0.009701773524284363, 0.29055672883987427, 0.11267897486686707, -0.4240890145301819, -0.3221019506454468, 0.13241693377494812, 0.3009294271469116, 0.07467880100011826, 0.21840772032737732, 0.010594930499792099, 0.062079984694719315, 0.18666663765907288, 0.19850747287273407, 0.12212635576725006, 0.014480352401733398, -0.03284832462668419, 0.1648809164762497, -0.32147181034088135, 0.06254556775093079, -0.6196392774581909, 0.22295261919498444, 0.035740479826927185, -0.019678272306919098, -0.11478611081838608, -0.4618891775608063, 0.37069833278656006, 0.13147473335266113, -0.11888778209686279, 0.358097106218338, -0.00012183634680695832, -0.003928780555725098, 0.44842010736465454, -0.12727203965187073, -0.08421671390533447, -0.04936341941356659, -0.14760170876979828, -0.3369843661785126, 0.07088698446750641, -0.1506253480911255, 0.06785671412944794, -0.03252739831805229, -0.06102558225393295, 0.34061214327812195, -0.46046197414398193, 0.18143931031227112, 0.04704871028661728, 0.5140047073364258, 0.4450063109397888, 0.21149417757987976, 0.39643239974975586, -0.011449620127677917, -0.14967896044254303, 0.16291485726833344, -0.2344391644001007, -0.17614026367664337, 0.30716800689697266, -0.044737402349710464, -0.3355349600315094, -0.24688483774662018, 0.0919775515794754, -0.002242736518383026, 0.019352611154317856, -0.0927104651927948, -0.21544897556304932, 0.401458203792572, 0.32508590817451477, -0.37677592039108276, -0.36207395792007446, -0.25396284461021423, -0.07219250500202179, -0.002571258693933487, 0.3222019374370575, 0.43327996134757996, -0.043409399688243866, 0.0893692821264267, -0.3906937837600708, 0.16983938217163086, -0.005557797849178314, 0.019999533891677856, -0.3756791949272156, 0.2791668474674225, 0.41805920004844666, 0.12566719949245453, -0.057812098413705826, -0.03258203715085983, 0.25277718901634216, -0.313433438539505, 0.02391531504690647, 0.05009140819311142, -0.4031199812889099, -0.19110383093357086, -0.12406084686517715, -0.13039880990982056, 0.4479843080043793, -0.05716876685619354, 0.019635235890746117, 0.04873684048652649, -0.08741581439971924, 0.1509542614221573, 0.1608288288116455, 0.2469579428434372, 0.06909250468015671, -0.0032207234762609005, -0.04918483644723892, 0.07767708599567413, -0.23106174170970917, 0.2671501040458679, 0.26649919152259827, -0.2722829282283783, 0.14623792469501495, 0.015612650662660599, 0.5298163890838623, -0.19427846372127533, -0.3017008602619171, 0.15679267048835754, -0.7380697131156921, -0.10707055777311325, 0.09513653814792633, -0.08272155374288559, -0.08597306907176971, 0.43756115436553955, 0.023168284446001053, 0.37511855363845825, -0.1258004903793335, -0.31139469146728516, -0.07759226858615875, -0.018342405557632446, 0.018544752150774002, 0.007430434226989746, 0.15003514289855957, 0.14728906750679016, 0.11752500385046005, -0.005865292623639107, -0.3892935514450073, 0.20038799941539764, -0.21253855526447296, -0.16890788078308105, -0.052931271493434906, 0.11275686323642731, -0.19863809645175934, -0.3424561321735382, 0.07485942542552948, -0.26925376057624817, -0.2956693470478058, 0.1489873230457306, -0.0504918098449707, -0.2925233840942383, -0.0487852618098259, 0.049182526767253876, -0.45489615201950073, -0.013857178390026093, -0.0014939308166503906, 0.13687622547149658, 0.17108500003814697, -0.073782779276371, 0.12135296314954758, -0.14545249938964844, 0.04883348569273949, -0.3303683400154114, 0.22749188542366028, 0.007443547248840332, -0.13839279115200043, 0.014926008880138397, 0.2834964692592621, -0.21843120455741882, -0.0481669083237648, 0.28540781140327454, 0.008305473253130913, 0.18081918358802795, -0.17059791088104248, 0.5086683630943298, 0.2644169330596924, 0.08034639060497284, -0.030159668996930122, -0.08416177332401276, 0.24822036921977997, 0.1521856039762497, 0.1921498030424118, 0.03782946616411209, -0.4064250588417053, -0.04623136669397354, -0.01387205719947815, 0.3398268222808838, -0.13730716705322266, -0.12721587717533112, -0.21576780080795288, -0.25596752762794495, 0.5326587557792664, -0.031903501600027084, -0.17219768464565277, 0.07556536793708801, -0.028126254677772522, 0.21799789369106293, 0.27797746658325195, -0.22563093900680542, -0.2787720561027527, 0.0033529847860336304, 0.18883678317070007, 0.197259321808815, -0.3089708089828491, -0.28770312666893005, -0.46052807569503784, 0.18791890144348145, -0.3435060381889343, 0.5599386692047119, -0.2155991941690445, -0.3793884515762329, -0.021597066894173622, 0.24953986704349518, 0.2796548902988434, 0.15427394211292267, 0.07672202587127686, 0.18392959237098694, 0.1065378338098526, 0.15070734918117523, 0.043338675051927567, -0.06353309005498886, -0.06509160995483398, 0.08935677260160446, -0.23725752532482147, 0.43502190709114075, -0.06433229893445969, -0.2545844316482544, -0.020541345700621605, 0.5571244359016418, 0.12511909008026123, 0.046544983983039856, 0.02924077957868576, 0.28601187467575073, -0.041996780782938004, -0.005019001662731171, -0.20087745785713196, 0.29611605405807495, -0.1280413419008255, -0.16561928391456604, -0.21110130846500397, 0.21490055322647095, 0.07449852675199509, -0.0052278488874435425, 0.10578906536102295, 0.4875396490097046, 0.06620652228593826, -0.04671398550271988, 0.21574766933918, -0.10686376690864563, -0.0017404761165380478, -0.09561572968959808, -0.08447569608688354, 0.01917438954114914, 0.2111935317516327, 0.205370232462883, -0.5470687747001648, 0.5216996669769287, -0.4695618450641632, -0.08864658325910568, 0.5151798129081726, -0.27792730927467346, 0.2281658947467804, -0.2124321460723877, -0.13460421562194824, 0.13121643662452698, 0.39896175265312195, -0.3695647120475769, 0.19407424330711365, 0.10239068418741226, 0.02882898598909378, 0.04486393928527832, -0.39587000012397766, 0.06516682356595993, 0.26545634865760803, 0.04233263060450554, 0.038111068308353424, 0.05114632844924927, 0.2779500186443329, -0.11128038913011551, -0.26649948954582214, 0.1818801462650299, 0.031279392540454865, -0.10448893904685974, -0.37025585770606995, 0.08831758797168732, -0.364700585603714, -0.01150478981435299, -0.35895684361457825, -0.23593880236148834, -0.5129178166389465, -0.39447030425071716, -0.035941846668720245, 0.5990918874740601, -0.05060610920190811, 0.25283846259117126, -0.6956557035446167, -0.2696465253829956, 0.011453522369265556, -0.42574357986450195, 0.051118358969688416, -0.07402727752923965, -0.1123211458325386, -0.059515152126550674, 0.2943381369113922, 0.18610258400440216, -0.20425674319267273, -0.12553761899471283, -0.15820573270320892, -0.19198398292064667, -0.6355774998664856, 0.18599632382392883, -0.41874927282333374, 0.010984132997691631, 0.34730100631713867, -0.10605320334434509, 0.191269651055336, -0.32611194252967834, 0.1868242770433426, 0.17111162841320038, -0.4117399752140045, 0.5654468536376953, 0.06690750271081924, -0.35076895356178284, 0.01600506156682968, -0.16780626773834229, -0.08403187990188599, -0.2349206954240799, 0.27039241790771484, -0.09932929277420044, 0.03529383987188339, 0.2802288234233856, 0.013852286152541637, 0.008907987736165524, -0.247409850358963, 0.11147287487983704, 0.024868832901120186, 0.39006495475769043, 0.35636112093925476, 0.37654009461402893, -0.13720151782035828, 0.18837109208106995, -0.30401772260665894, -0.15887956321239471, 0.29094767570495605, -0.07030858844518661, -0.13153213262557983, -0.17064321041107178, 0.6069599986076355, 0.13649415969848633, -0.45315563678741455, 0.3239976167678833, 0.41858020424842834, 0.0673285573720932, 0.0007436685264110565, -0.18609435856342316, -0.05407572537660599, 0.41655823588371277, 0.2537943124771118, 0.03504693880677223, -0.12585392594337463, 0.1467141956090927, 0.059012945741415024, -0.06423544883728027, -0.22572346031665802, 0.5036706924438477, -0.2651818096637726, 0.029776081442832947, 0.1756277084350586, 0.06618579477071762, -0.16620196402072906, -0.01779220998287201, 0.0821506530046463, 0.1531195044517517, -0.24640744924545288, -0.17098858952522278, 0.09172941744327545, 0.1066613495349884, -0.1533643901348114, -0.2786046862602234, 0.2364918738603592, -0.2413661777973175, 0.3538040518760681, -0.04012814909219742, -0.15890787541866302, -0.18803822994232178, -0.3680243194103241, -0.010951590724289417, 0.07845880091190338, -0.08207661658525467, 0.09584970027208328, -0.6450904011726379, -0.32940641045570374, 0.07523683458566666, 0.36488068103790283, 0.2579319179058075, 0.5744532942771912, 0.13101305067539215, -0.4348481297492981, -0.21963967382907867, -0.09171187877655029, 0.5359683036804199, -0.008451977744698524, -0.03844606131315231, 0.2916202247142792, 0.2740377187728882, -0.2739705741405487, -0.2968045771121979, -0.08028186112642288, 0.08348575979471207, 0.24724315106868744, 0.1379484236240387, -0.6362394094467163, -0.12905418872833252, 0.2843503952026367, 0.3965991735458374, 0.10002021491527557, 0.02784091606736183, -0.23551791906356812, 0.01231474056839943, -0.04864645004272461, -0.14259833097457886, 0.02842494659125805, 0.22785453498363495, -0.3272438645362854, 0.06322164833545685, -0.32456836104393005, 0.021356116980314255, 0.17034992575645447, 0.4805375337600708, 0.2850089967250824, -0.33638888597488403, 0.03985471650958061, -0.4539279639720917, 0.2034316062927246, 0.10724432021379471, 0.5703111290931702, 0.5020776987075806, -0.5287025570869446, -0.3886259198188782, 0.1841166615486145, 0.34256184101104736, -0.046576350927352905, 0.09250245988368988, 0.16495248675346375, -0.15433312952518463, -0.2554900050163269, -0.23986443877220154, -0.050007667392492294, 0.35975298285484314, -0.030898455530405045, -0.10705787688493729, 0.02783556468784809, 0.43186166882514954, 0.15854795277118683, 0.0956578403711319, -0.6823594570159912, 0.23944172263145447, -0.4008050262928009, 0.27232176065444946, -0.04769057780504227, 0.9379630088806152, 0.1299600601196289, 0.09235112369060516, 0.3337059020996094, 0.20174039900302887, 0.4809497594833374, -0.018320653587579727, 0.1827780157327652, -0.24606527388095856, -0.01134066004306078, -0.18704842031002045, -0.2756962180137634, 0.07338915765285492, 0.1745603233575821, -0.2565918564796448, 0.3026057481765747, 0.001316562294960022, 0.14667721092700958, 0.0686984658241272, 0.116692453622818, -0.00814848579466343, 0.30802595615386963, -0.30764952301979065, -0.08256030082702637, -0.08761340379714966, 0.028253253549337387, 0.10459020733833313, -0.10905180871486664, -0.5096391439437866, -0.1694665104150772, 0.00022357702255249023, 0.1846589744091034, -0.03282644972205162, 0.01378948986530304, 0.36166393756866455, -0.11492130160331726, -0.13526496291160583, 0.1706983596086502, -0.002249211072921753, -0.2959183156490326, 0.017663389444351196, -0.0759257972240448, 0.27198025584220886, -0.07849489152431488, 0.30479440093040466, -0.082514189183712, 0.3430142104625702, 0.12292801588773727, -0.31463366746902466, -0.06771198660135269, -0.2235836237668991, -0.17901554703712463, -0.08219091594219208, -0.15332135558128357, 0.07608702033758163, -0.25409573316574097, -0.11252416670322418, -0.12760598957538605, -0.12013565003871918, -0.03203049302101135, -0.010824574157595634, -0.18559278547763824, -0.06412413716316223, 0.1463441699743271, -0.06420791149139404, -0.19067224860191345, 0.045710764825344086, 0.1047876849770546, 0.1875719428062439, 0.6064358949661255, 0.3791366517543793, -0.03999926522374153, 0.013300962746143341, 0.0572318360209465, -0.317710280418396, -0.3002571761608124, -0.4511311650276184, -0.15101903676986694, -0.16928963363170624, -0.2728014886379242, -0.26617905497550964, 0.6759346723556519, 0.2157920002937317, 0.20650187134742737, 0.058777790516614914, -0.18738779425621033, -0.021980812773108482, 0.46427255868911743, 0.3379497230052948, 0.18340429663658142, 0.05765066295862198, 0.6058548092842102, 0.10564450919628143, -0.014395641162991524, -0.1383231282234192, -0.18918654322624207, -0.5123196244239807, 0.26075291633605957, -0.003221958875656128, -0.0168839693069458, -0.19954684376716614, -0.35524407029151917, 0.09967773407697678, -0.19024811685085297, 0.11877176910638809, -0.0018303636461496353, 0.07992658019065857, 0.20262432098388672, 0.30113685131073, 0.13070224225521088, 0.029295451939105988, 0.05909563601016998, 0.3133091330528259, -0.0863570123910904, -0.16917692124843597, 0.040839336812496185, -0.08714665472507477, 0.20836184918880463, 0.25135207176208496, 0.2837487459182739, -0.44374340772628784, 0.12967315316200256, -0.1673191785812378, -0.09360510110855103, -0.02004532888531685, 0.3436533510684967, -0.17224611341953278, 0.150852769613266, 0.011136934161186218, 0.18424241244792938, -0.0037240535020828247, 0.09087169170379639, 0.004709236323833466, -0.027297526597976685, -0.3770061135292053, -0.0851905420422554, 0.08575627952814102, 0.34867626428604126, -0.009089354425668716, -0.16602827608585358, 0.30114907026290894, 0.0432872474193573, -0.37559229135513306, -0.02233135886490345, 0.26524966955184937, -0.3256582021713257, 0.11984016001224518, 0.2465086430311203, 0.4056602418422699, 0.26721346378326416, -0.24613137543201447, 0.13361316919326782, 0.19416475296020508, 0.19273406267166138, 0.08109070360660553, 0.38284170627593994, -0.06259062141180038, 0.28269943594932556, 0.49635612964630127, -0.042827654629945755, 0.17832297086715698, -0.20524705946445465, 0.3776835799217224, 0.22922329604625702, -0.008282579481601715, -0.25434306263923645, 0.46715426445007324, 0.1503639668226242, -0.2536216676235199, -0.010230213403701782, 0.5429742932319641, 0.07197415828704834, 0.09157779067754745, 0.37337368726730347, -0.0238436758518219, -0.273828387260437, -0.20853182673454285, 0.08683255314826965, -0.06299514323472977, -0.016190949827432632, -0.27117499709129333, -0.19617658853530884, -0.0899873599410057, -0.2310902178287506, 0.011707864701747894, -0.17691931128501892, 0.5453143119812012, 0.053827136754989624, -0.06992477178573608, -0.28156694769859314, 0.2920907735824585, 0.2002321481704712, 0.18376585841178894, -0.21179132163524628, 0.06380009651184082, 0.10467270016670227, -0.3237312138080597, 0.3169931173324585, 0.3942144513130188, 0.36085689067840576, 0.26148271560668945, -0.2633317708969116, -0.33942490816116333, -0.05052057281136513, 0.05343420058488846, 0.029379483312368393, 0.012351620942354202, -0.2310144305229187, -0.03486712649464607, 0.17087529599666595, 0.03979288041591644, 0.06148013472557068, -0.11195461452007294, -0.1979028433561325, -0.2635836899280548, -0.2899729311466217, 0.5647645592689514, -0.05323381721973419, -0.3765748143196106, 0.09052124619483948, 0.02994450181722641, -0.04133332148194313, -0.1076730266213417, 0.12394428253173828, 0.2545178234577179, 0.199342280626297, 0.15362124145030975, 0.015899602323770523, 0.12617094814777374, 0.19480611383914948, 0.13117995858192444, 0.1723538339138031, 0.053971145302057266, 0.26572108268737793, -0.5592809915542603, 0.06075597181916237, -0.03142048791050911, -0.36584851145744324, 0.2509433627128601, 0.2590923011302948, 0.12262394279241562, 0.17189952731132507, -0.3156031370162964, 0.022911056876182556, 0.0584234818816185, 0.0001740194857120514, -0.19305498898029327, -0.2240380197763443, 0.10517406463623047, -0.3982801139354706, -0.29574263095855713, -0.24779123067855835, 0.4206869900226593, -0.19101300835609436, -0.005666378885507584, 0.09535291790962219, 0.07057777047157288, 0.4648591876029968, 0.2801651954650879, 0.07375363260507584, 0.024075280874967575, 0.6520792245864868, 0.056508153676986694, -0.02894756942987442, -0.19641050696372986, -0.1625683307647705, -0.4249636232852936, 0.22502809762954712, -0.32759764790534973, 0.18316815793514252, -0.05685371905565262, 0.5732346773147583, 0.030640369281172752, 0.35867974162101746, 0.01381107047200203, -0.26567551493644714, 0.02242630161345005, 0.24755331873893738, -0.3517119288444519, 0.13541901111602783, 0.12609542906284332, 0.05903852730989456, 0.017751220613718033, 0.14080803096294403, -0.07730773836374283, -0.5094181895256042, 0.16112948954105377, -0.018684420734643936, -0.19122833013534546, 0.08525712788105011, -0.054571256041526794, -0.05501542240381241, 0.07044132053852081, -0.4616411030292511, -0.13455387949943542, 0.3279922902584076, 0.09597703069448471, 0.08500638604164124, 0.08834481239318848, 0.1363302767276764, -0.09626513719558716, -0.09461037069559097, 0.012552399188280106, -0.3227335810661316, -0.09149634838104248, -0.02603103220462799, 0.06702151149511337 ]
https://github.com/huggingface/datasets/issues/492
nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema
I'm doing a refactor of type inference in #363 . Both text fields should match after that
Here's the code I'm trying to run: ```python dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir) dset_wikipedia.drop(columns=["title"]) dset_wikipedia.features.pop("title") dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir) dset = nlp.concatenate_datasets([dset_wikipedia, dset_books]) ``` This fails because they have different schemas, despite having identical features. ```python assert dset_wikipedia.features == dset_books.features # True assert dset_wikipedia._data.schema == dset_books._data.schema # False ``` The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves. ```python dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema) ```
17
nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema Here's the code I'm trying to run: ```python dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir) dset_wikipedia.drop(columns=["title"]) dset_wikipedia.features.pop("title") dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir) dset = nlp.concatenate_datasets([dset_wikipedia, dset_books]) ``` This fails because they have different schemas, despite having identical features. ```python assert dset_wikipedia.features == dset_books.features # True assert dset_wikipedia._data.schema == dset_books._data.schema # False ``` The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves. ```python dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema) ``` I'm doing a refactor of type inference in #363 . Both text fields should match after that
[ -0.016119379550218582, 0.041833460330963135, 0.049754705280065536, 0.17914864420890808, 0.22095927596092224, -0.15513743460178375, 0.3485470712184906, 0.17719458043575287, -0.23378197848796844, -0.24969010055065155, 0.052856020629405975, 0.24274471402168274, 0.04185096174478531, 0.30095288157463074, -0.014264759607613087, -0.0392465814948082, 0.13698869943618774, 0.19272688031196594, 0.05735042691230774, -0.013302069157361984, 0.02792072296142578, 0.21281157433986664, -0.4326971769332886, 0.07985281944274902, -0.6052961945533752, 0.2832009792327881, 0.12171512842178345, -0.08153403550386429, -0.1724734604358673, -0.3538147211074829, 0.3396438956260681, 0.06339284777641296, -0.1273941844701767, 0.29411834478378296, -0.0001230618654517457, -0.07879705727100372, 0.4711282253265381, -0.1221955269575119, 0.0056542083621025085, -0.15418244898319244, 0.0033244378864765167, -0.21844573318958282, 0.11886028200387955, -0.159470334649086, -0.012247065082192421, 0.07878472656011581, 0.05747956037521362, 0.26551127433776855, -0.48575758934020996, 0.21437601745128632, 0.0313541516661644, 0.5556201934814453, 0.36111170053482056, 0.2949574589729309, 0.4820650517940521, 0.10810796916484833, -0.16404658555984497, -0.04037056118249893, -0.1488461047410965, -0.22067564725875854, 0.35005730390548706, 0.0233768317848444, -0.30316704511642456, -0.2488754242658615, 0.21041133999824524, 0.13718044757843018, 0.013230998069047928, -0.16581350564956665, -0.21618619561195374, 0.3846072852611542, 0.3784903883934021, -0.27217501401901245, -0.29824188351631165, -0.28715139627456665, -0.06365922838449478, -0.1074376329779625, 0.3144471049308777, 0.25321194529533386, -0.09580381214618683, 0.003474470227956772, -0.2865934371948242, 0.10254580527544022, -0.09194078296422958, 0.1352292150259018, -0.35128286480903625, 0.3031051754951477, 0.42365825176239014, 0.08383921533823013, -0.10905799269676208, -0.058107540011405945, 0.20375239849090576, -0.3682917058467865, 0.182144433259964, 0.19743002951145172, -0.30363985896110535, -0.25785234570503235, -0.19632789492607117, -0.128304123878479, 0.3435285985469818, -0.09712840616703033, -0.10113401710987091, 0.09219885617494583, -0.17995762825012207, 0.2135981023311615, 0.21646645665168762, 0.19402140378952026, 0.09218670427799225, -0.04667579010128975, 0.03243757784366608, 0.015587275847792625, -0.2754167914390564, 0.17777001857757568, 0.2533293664455414, -0.35799476504325867, 0.22224561870098114, -0.02220909669995308, 0.595160961151123, -0.21464110910892487, -0.35814252495765686, 0.10463038831949234, -0.6537966132164001, -0.029284104704856873, 0.13767828047275543, -0.1245899572968483, -0.10581916570663452, 0.43465906381607056, -0.0013263598084449768, 0.39680737257003784, -0.27126240730285645, -0.363132119178772, -0.04254978522658348, -0.008445089682936668, 0.03799019381403923, -0.011499069631099701, 0.11967113614082336, 0.20677484571933746, 0.11142165213823318, 0.016797073185443878, -0.3512595295906067, 0.2169010043144226, -0.1675957590341568, -0.2053927630186081, -0.09122424572706223, 0.00873158872127533, -0.2506653666496277, -0.3312966227531433, 0.13843491673469543, -0.3670905828475952, -0.2213856279850006, 0.1448277235031128, 0.06430919468402863, -0.15417221188545227, -0.14228180050849915, 0.052408695220947266, -0.45133012533187866, -0.1260322630405426, -0.16294288635253906, 0.33559539914131165, 0.21536824107170105, 0.008601315319538116, 0.0566011406481266, -0.16384634375572205, -0.010454699397087097, -0.21588271856307983, 0.23602870106697083, 0.13520655035972595, -0.08152836561203003, -0.01264716312289238, 0.17522422969341278, -0.2601317763328552, -0.04062867909669876, 0.2410745471715927, -0.023621123284101486, 0.06748879700899124, -0.13567814230918884, 0.5942890048027039, 0.3529738187789917, 0.02549748495221138, 0.101203054189682, 0.038564685732126236, 0.22063352167606354, 0.06680728495121002, 0.0872129425406456, 0.023400045931339264, -0.3188515901565552, 0.058951932936906815, -0.08547577261924744, 0.3682383894920349, -0.19216811656951904, -0.08414581418037415, -0.2003956139087677, -0.2794535458087921, 0.548541247844696, -0.11830641329288483, -0.009765483438968658, 0.09450782835483551, -0.15174123644828796, 0.24600012600421906, 0.2656448781490326, -0.2121182680130005, -0.14682655036449432, -0.03308148682117462, 0.3460654020309448, 0.3285518288612366, -0.42512649297714233, -0.4670065641403198, -0.5462667346000671, 0.15261191129684448, -0.3511544167995453, 0.56498783826828, -0.09260439872741699, -0.3628212809562683, -0.04448959603905678, 0.09577615559101105, 0.22397199273109436, 0.19404494762420654, 0.07163766771554947, 0.06657515466213226, -0.0451173260807991, 0.17730706930160522, -0.016454439610242844, -0.14609748125076294, 0.02932751737535, 0.18200324475765228, -0.18781253695487976, 0.5039505362510681, -0.050551027059555054, -0.2504662275314331, -0.048659712076187134, 0.5068319439888, 0.22126233577728271, 0.06399884074926376, 0.07465067505836487, 0.17063629627227783, 0.08448921889066696, 0.027459263801574707, -0.25657039880752563, 0.2689781188964844, -0.03573973476886749, -0.09271134436130524, -0.18112413585186005, 0.2658526301383972, 0.1443212330341339, -0.0504334419965744, 0.0820590928196907, 0.4781087636947632, 0.11915531754493713, -0.16838014125823975, 0.2042897492647171, -0.1395614743232727, -0.00926809199154377, -0.1187087893486023, -0.051552221179008484, -0.06251402944326401, 0.06555798649787903, 0.05887338146567345, -0.591734766960144, 0.5582195520401001, -0.6158357262611389, -0.13626456260681152, 0.43732237815856934, -0.1705736219882965, 0.19290855526924133, -0.23890095949172974, -0.11878442019224167, 0.07762059569358826, 0.2546370327472687, -0.4221939146518707, 0.1173965185880661, 0.11945302784442902, 0.04858078062534332, -0.01742076687514782, -0.3542953133583069, 0.10415035486221313, 0.2996138632297516, 0.0059592872858047485, 0.16077549755573273, -0.0010489150881767273, 0.2029421180486679, -0.029264409095048904, -0.3321917951107025, 0.1610558032989502, 0.11275172978639603, -0.08557946979999542, -0.3652035593986511, -0.05168475955724716, -0.27651530504226685, -0.08317698538303375, -0.4930632710456848, -0.12100788205862045, -0.35914281010627747, -0.40362927317619324, -0.07511571794748306, 0.7243297100067139, -0.018225476145744324, 0.17535661160945892, -0.6069005131721497, -0.24302531778812408, -0.0019759628921747208, -0.34261029958724976, -0.048090625554323196, 0.005658616311848164, -0.18993040919303894, -0.044021300971508026, 0.34933674335479736, 0.24072550237178802, -0.26839736104011536, -0.0032675936818122864, -0.21047154068946838, -0.21286170184612274, -0.8254590034484863, 0.09230853617191315, -0.342370867729187, 0.07492246478796005, 0.29318541288375854, -0.04751385748386383, 0.20736688375473022, -0.29927802085876465, 0.1691266894340515, 0.1805764138698578, -0.49055445194244385, 0.4479930102825165, 0.07588312774896622, -0.28945595026016235, -0.0016759708523750305, -0.17187762260437012, 0.0003848150372505188, -0.17677533626556396, 0.09336137771606445, -0.09212201088666916, -0.022156134247779846, 0.3520936071872711, -0.006356784142553806, -0.030037831515073776, -0.126591756939888, 0.00434630922973156, 0.11291272193193436, 0.4491630792617798, 0.4396439790725708, 0.32487282156944275, -0.09223823249340057, 0.19754934310913086, -0.2271224558353424, -0.2233734428882599, 0.18047693371772766, 0.0070679038763046265, -0.15624995529651642, -0.22619949281215668, 0.5512502789497375, 0.23555496335029602, -0.4834793210029602, 0.30581921339035034, 0.42025962471961975, 0.07748175412416458, 0.0824684426188469, -0.22981715202331543, -0.01797754317522049, 0.3961809277534485, 0.32033485174179077, -0.02281651273369789, -0.1455743908882141, 0.13535833358764648, 0.06272178888320923, -0.12551727890968323, -0.2235630601644516, 0.5573559403419495, -0.1932656317949295, -0.1299397200345993, 0.17008987069129944, 0.07132240384817123, -0.11769235879182816, -0.058273717761039734, 0.10832303762435913, 0.14924487471580505, -0.20134857296943665, -0.2157619446516037, 0.08458337187767029, 0.09087255597114563, -0.22143933176994324, -0.27298808097839355, 0.16397413611412048, -0.30207258462905884, 0.23034173250198364, -0.04049576073884964, -0.18059399724006653, -0.2284919172525406, -0.37592101097106934, -0.004490653984248638, 0.11424043774604797, 0.0032653063535690308, 0.10188718885183334, -0.6307586431503296, -0.0709884762763977, 0.08686120808124542, 0.33990681171417236, 0.1385793685913086, 0.36956581473350525, 0.15237803757190704, -0.5020944476127625, -0.16807688772678375, -0.08669304102659225, 0.4714759588241577, 0.06388993561267853, -0.09741771221160889, 0.13356776535511017, 0.181717187166214, -0.19570036232471466, -0.26835858821868896, -0.010741110891103745, 0.008223572745919228, 0.3010818362236023, 0.2705416977405548, -0.6396725177764893, -0.17916856706142426, 0.38112252950668335, 0.3375135064125061, 0.014551889151334763, -0.031218696385622025, -0.15949444472789764, 0.09151678532361984, 0.09235824644565582, -0.12572991847991943, 0.06379912048578262, 0.28862544894218445, -0.3415791392326355, 0.013958409428596497, -0.33685582876205444, -0.037788283079862595, 0.2842554450035095, 0.41432785987854004, 0.22347921133041382, -0.3767012357711792, 0.0828053206205368, -0.42380014061927795, 0.187151700258255, -0.02362564392387867, 0.4478928744792938, 0.4763241708278656, -0.572271466255188, -0.438694566488266, 0.13777834177017212, 0.3645654320716858, -0.1018659919500351, 0.2148088961839676, 0.28863808512687683, -0.15153458714485168, -0.28079891204833984, -0.18099269270896912, 0.013228589668869972, 0.3981315791606903, -0.015628904104232788, -0.07684693485498428, -0.02581757679581642, 0.5186474323272705, -0.022580960765480995, 0.08838412165641785, -0.6236915588378906, 0.39992427825927734, -0.2987963557243347, 0.32281696796417236, -0.04700738936662674, 0.865699827671051, 0.023756805807352066, 0.04761666804552078, 0.2893189489841461, 0.12707369029521942, 0.5067021250724792, 0.00784696638584137, 0.1557164490222931, -0.2817581295967102, 0.17017152905464172, -0.14892244338989258, -0.20626460015773773, 0.10131923109292984, 0.2628418207168579, -0.16844451427459717, 0.14222468435764313, 0.08981293439865112, 0.21865515410900116, 0.004172354005277157, 0.1318744421005249, -0.025372346863150597, 0.33123892545700073, -0.2488342523574829, -0.08958679437637329, -0.06041381508111954, 0.15977872908115387, 0.15831595659255981, -0.17862312495708466, -0.4871670603752136, -0.07296668738126755, 0.0176846981048584, 0.23381513357162476, 0.017314542084932327, 0.03154182434082031, 0.4748314321041107, -0.19610589742660522, 0.042490024119615555, 0.3946966826915741, 0.08428921550512314, -0.3070060908794403, -0.017248811200261116, -0.07549694180488586, 0.24299195408821106, -0.13595694303512573, 0.21570324897766113, -0.22126929461956024, 0.26824700832366943, 0.10909729450941086, -0.33411866426467896, -0.1193564161658287, -0.08639533817768097, -0.15972107648849487, -0.07788688689470291, -0.127183735370636, 0.1667790710926056, -0.17954005300998688, -0.24072544276714325, -0.06481146812438965, -0.05420209467411041, -0.06772014498710632, -0.030590299516916275, -0.2076231986284256, -0.06986032426357269, 0.050165265798568726, 0.01539674773812294, -0.1575436145067215, 0.09987783432006836, 0.1503848135471344, 0.22141441702842712, 0.629348874092102, 0.4565292000770569, 0.028615061193704605, -0.0017689615488052368, 0.024722695350646973, -0.2843751311302185, -0.21697334945201874, -0.3930864632129669, -0.14691407978534698, -0.0448104627430439, -0.2518894076347351, -0.18069006502628326, 0.7333978414535522, 0.13086140155792236, 0.1295652836561203, 0.0895383358001709, -0.18428242206573486, -0.04293587803840637, 0.3645329475402832, 0.15388423204421997, 0.251392126083374, 0.08190735429525375, 0.5773449540138245, 0.11867843568325043, -0.04482640326023102, -0.1121123805642128, -0.09541872143745422, -0.39928585290908813, 0.26237279176712036, 0.06136409565806389, -0.0556960254907608, -0.19162750244140625, -0.4026487469673157, 0.11198028922080994, -0.25774574279785156, 0.23084914684295654, -0.006808260455727577, -0.03383629024028778, 0.20281822979450226, 0.313806414604187, 0.08879942446947098, 0.06908787041902542, 0.10505206882953644, 0.35051730275154114, -0.08290932327508926, -0.08616696298122406, 0.1872445046901703, -0.0784432590007782, 0.39597007632255554, 0.18232287466526031, 0.29399415850639343, -0.46794968843460083, 0.03430565446615219, -0.18818020820617676, -0.08780241012573242, 0.08348268270492554, 0.2765670418739319, -0.008383151143789291, 0.1889641284942627, -0.07007922977209091, 0.12280791997909546, -0.013631075620651245, -0.054603248834609985, -0.0650932639837265, -0.0648844912648201, -0.3568442761898041, -0.002499808557331562, -0.07474316656589508, 0.4072777330875397, 0.061850789934396744, -0.16719374060630798, 0.29691651463508606, 0.05308392271399498, -0.3996773064136505, 0.07959459722042084, 0.15228821337223053, -0.41523006558418274, 0.09229710698127747, 0.18167659640312195, 0.3825949728488922, 0.40388014912605286, -0.30966442823410034, 0.0723770260810852, 0.11950591951608658, 0.16043968498706818, 0.179463192820549, 0.28389328718185425, 0.03027055785059929, 0.1587482988834381, 0.48173418641090393, 0.003179015591740608, 0.06484901905059814, -0.17224597930908203, 0.44512078166007996, 0.16956117749214172, -0.24849992990493774, -0.10778708755970001, 0.43515101075172424, 0.07300469279289246, -0.25721797347068787, 0.10323458909988403, 0.42074161767959595, 0.0211806520819664, 0.1734534353017807, 0.29889124631881714, 0.10288901627063751, -0.1919422298669815, -0.21269915997982025, 0.08565288782119751, -0.143897145986557, -0.12900036573410034, -0.2481294572353363, -0.3373124301433563, -0.06726132333278656, -0.18976986408233643, 0.008883759379386902, -0.1929847151041031, 0.48185572028160095, 0.036158472299575806, -0.1371840536594391, -0.24508081376552582, 0.37855374813079834, 0.1929195523262024, 0.26497387886047363, -0.1939353495836258, 0.06454592198133469, -0.00028190016746520996, -0.33051374554634094, 0.32948559522628784, 0.3417547047138214, 0.22702160477638245, 0.3470466732978821, -0.38188788294792175, -0.39018821716308594, 0.007549595087766647, -0.024357277899980545, 0.04697407782077789, -0.10391689836978912, -0.20618292689323425, 0.15572868287563324, 0.2123417854309082, 0.025074021890759468, 0.10441146790981293, -0.04664352908730507, -0.19717396795749664, -0.2442253828048706, -0.27921637892723083, 0.5544172525405884, -0.003010716289281845, -0.19243118166923523, -0.07281851023435593, -0.014263376593589783, -0.03389943391084671, -0.3230065107345581, 0.10461129248142242, 0.20306019484996796, 0.14895957708358765, 0.06256984919309616, 0.010998034849762917, 0.15757958590984344, 0.05502244457602501, 0.18447425961494446, 0.05280349776148796, -0.04441113770008087, 0.31434518098831177, -0.49688923358917236, 0.058579374104738235, -0.020045999437570572, -0.28891119360923767, 0.1667100042104721, 0.38731488585472107, 0.0609070286154747, 0.06827801465988159, -0.37065380811691284, -0.0068582710810005665, 0.11689283698797226, 0.060620442032814026, -0.09623868763446808, -0.13258567452430725, 0.016222018748521805, -0.37785500288009644, -0.23718105256557465, -0.2419475018978119, 0.36598360538482666, -0.18401892483234406, -0.014263201504945755, -0.06431411951780319, 0.22272878885269165, 0.43426769971847534, 0.3516320586204529, -0.06179700791835785, 0.046850256621837616, 0.705390214920044, 0.12704700231552124, -0.011746075004339218, -0.08673149347305298, -0.03953700140118599, -0.5143465399742126, 0.20941802859306335, -0.2973789870738983, 0.22123616933822632, -0.0026688147336244583, 0.6017211675643921, 0.12484245747327805, 0.3921010196208954, -0.06452298164367676, -0.3328498899936676, -0.02123893052339554, 0.17323772609233856, -0.3336329758167267, 0.11937885731458664, 0.18561623990535736, 0.019399169832468033, 0.060635749250650406, 0.05339326709508896, -0.08823426812887192, -0.45437464118003845, 0.0979275032877922, -0.06319741159677505, -0.14809750020503998, -0.02224292978644371, -0.13458621501922607, 0.11813278496265411, 0.1067831739783287, -0.5811043977737427, -0.19214168190956116, 0.3485526144504547, 0.020662259310483932, 0.160513773560524, 0.12544693052768707, 0.2556873559951782, -0.13779184222221375, -0.17977645993232727, 0.010650157928466797, -0.26078370213508606, 0.08927074074745178, -0.10128182172775269, -0.08761723339557648 ]
https://github.com/huggingface/datasets/issues/492
nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema
It should be good now. I was able to run ```python >>> from nlp import concatenate_datasets, load_dataset >>> >>> bookcorpus = load_dataset("bookcorpus", split="train") >>> wiki = load_dataset("wikipedia", "20200501.en", split="train") >>> wiki.remove_columns_("title") # only keep the text >>> >>> assert bookcorpus.features.type == wiki.features.type >>> bert_dataset = concatenate_datasets([bookcorpus, wiki]) ```
Here's the code I'm trying to run: ```python dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir) dset_wikipedia.drop(columns=["title"]) dset_wikipedia.features.pop("title") dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir) dset = nlp.concatenate_datasets([dset_wikipedia, dset_books]) ``` This fails because they have different schemas, despite having identical features. ```python assert dset_wikipedia.features == dset_books.features # True assert dset_wikipedia._data.schema == dset_books._data.schema # False ``` The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves. ```python dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema) ```
48
nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema Here's the code I'm trying to run: ```python dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir) dset_wikipedia.drop(columns=["title"]) dset_wikipedia.features.pop("title") dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir) dset = nlp.concatenate_datasets([dset_wikipedia, dset_books]) ``` This fails because they have different schemas, despite having identical features. ```python assert dset_wikipedia.features == dset_books.features # True assert dset_wikipedia._data.schema == dset_books._data.schema # False ``` The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves. ```python dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema) ``` It should be good now. I was able to run ```python >>> from nlp import concatenate_datasets, load_dataset >>> >>> bookcorpus = load_dataset("bookcorpus", split="train") >>> wiki = load_dataset("wikipedia", "20200501.en", split="train") >>> wiki.remove_columns_("title") # only keep the text >>> >>> assert bookcorpus.features.type == wiki.features.type >>> bert_dataset = concatenate_datasets([bookcorpus, wiki]) ```
[ 0.01957465335726738, 0.10143789649009705, 0.010049242526292801, 0.15250906348228455, 0.26178503036499023, -0.026244614273309708, 0.39929792284965515, 0.183587446808815, -0.27570676803588867, -0.33109694719314575, 0.057890839874744415, 0.2993278503417969, -0.09611610323190689, 0.34909090399742126, -0.024857882410287857, -0.08866958320140839, 0.21233275532722473, 0.21518662571907043, 0.09041943401098251, -0.0006232336163520813, -0.02169136144220829, 0.14710040390491486, -0.4190041422843933, 0.04072542116045952, -0.5618268847465515, 0.19935132563114166, 0.009132543578743935, -0.0635872632265091, -0.1321004331111908, -0.35583510994911194, 0.35989534854888916, 0.16322936117649078, -0.09640804678201675, 0.3494226038455963, -0.00012372694618534297, -0.0465310700237751, 0.4617714285850525, -0.09445910155773163, -0.11426880955696106, -0.12294097244739532, -0.04685598984360695, -0.22616314888000488, 0.14282093942165375, -0.22399020195007324, 0.06601013988256454, 0.03968123346567154, -0.02371239848434925, 0.21808984875679016, -0.4827166199684143, 0.3005029559135437, 0.049798768013715744, 0.6041244268417358, 0.32168808579444885, 0.2887703776359558, 0.43258732557296753, 0.02602064236998558, -0.23784449696540833, 0.057117413729429245, -0.2866392135620117, -0.24003852903842926, 0.3646000027656555, -0.003035455010831356, -0.42240744829177856, -0.2776355445384979, 0.1704847663640976, 0.03210217133164406, 0.013993438333272934, -0.18114157021045685, -0.132682204246521, 0.376358300447464, 0.38356396555900574, -0.3270164430141449, -0.2761543393135071, -0.2740519940853119, -0.03833328187465668, -0.14718015491962433, 0.23136290907859802, 0.3422137200832367, 0.04262854531407356, 0.03777499496936798, -0.3583472669124603, 0.1332835704088211, -0.06110122799873352, 0.17296892404556274, -0.35764896869659424, 0.28919339179992676, 0.40664443373680115, 0.1265062838792801, -0.0574193112552166, -0.09569787979125977, 0.23970291018486023, -0.3863391876220703, 0.1325584352016449, 0.13347728550434113, -0.3427979648113251, -0.15341927111148834, -0.21583673357963562, -0.1752311885356903, 0.4142796993255615, -0.10131309926509857, -0.06843721121549606, 0.048488304018974304, -0.11785782128572464, 0.15816044807434082, 0.18029989302158356, 0.3018614649772644, 0.1722830981016159, -0.04250459745526314, -0.04739338904619217, 0.053967319428920746, -0.2548190951347351, 0.2683303952217102, 0.278372585773468, -0.2501661479473114, 0.16445443034172058, -0.008123164996504784, 0.5877898931503296, -0.12116498500108719, -0.3953978717327118, 0.10545988380908966, -0.6579977869987488, -0.06537171453237534, 0.11580446362495422, -0.07508643716573715, -0.016488943248987198, 0.43292802572250366, -0.025033773854374886, 0.422448992729187, -0.25100675225257874, -0.2912803888320923, -0.11030884832143784, 0.04833679646253586, -0.0065317414700984955, -0.02880147285759449, 0.18928463757038116, 0.09694413840770721, 0.17419461905956268, -0.04175856336951256, -0.38983631134033203, 0.2016250193119049, -0.1408272087574005, -0.20090842247009277, -0.0840659812092781, 0.0512065663933754, -0.191617950797081, -0.24326783418655396, 0.1291825771331787, -0.42636221647262573, -0.25975850224494934, 0.1686263382434845, 0.05844401940703392, -0.2287469208240509, -0.14985743165016174, 0.06859401613473892, -0.4282655119895935, -0.10481509566307068, -0.06400851160287857, 0.2332170605659485, 0.2305508553981781, -0.04541262984275818, 0.07356603443622589, -0.15919800102710724, 0.02166101709008217, -0.2626657485961914, 0.11998347193002701, 0.20312698185443878, -0.09397977590560913, 0.011766977608203888, 0.15684764087200165, -0.21040374040603638, 0.005222149193286896, 0.22586388885974884, -0.02690458670258522, 0.11593267321586609, -0.1868230402469635, 0.5118376612663269, 0.3278883695602417, -0.043259553611278534, 0.01689356379210949, 0.03806919604539871, 0.20243538916110992, 0.09655934572219849, 0.12858492136001587, 0.0444151870906353, -0.29827770590782166, -0.027474844828248024, -0.0779009759426117, 0.30872440338134766, -0.09856097400188446, -0.0781475305557251, -0.18207508325576782, -0.25656670331954956, 0.6591676473617554, -0.09432078897953033, -0.05640618875622749, 0.14041833579540253, -0.13829773664474487, 0.33282551169395447, 0.318072646856308, -0.19692876935005188, -0.12136045098304749, 0.017904095351696014, 0.18785832822322845, 0.2208658754825592, -0.4277660846710205, -0.3764057159423828, -0.6329754590988159, 0.12959346175193787, -0.2952989935874939, 0.5714235901832581, -0.09098270535469055, -0.3621647357940674, -0.12144149839878082, 0.11484549194574356, 0.1560094952583313, 0.06610539555549622, 0.0689285472035408, 0.15259897708892822, 0.019555170089006424, 0.17337891459465027, -0.06327049434185028, -0.06914212554693222, -0.00016728416085243225, 0.1299985647201538, -0.3026868402957916, 0.47942066192626953, -0.06807225197553635, -0.23942363262176514, 0.03803127259016037, 0.5497890710830688, 0.2630757689476013, 0.029155900701880455, 0.04474326968193054, 0.226781964302063, -0.047428812831640244, -0.03205236792564392, -0.18488672375679016, 0.30591046810150146, -0.006551532074809074, -0.0952608659863472, -0.13675349950790405, 0.2938745319843292, 0.1112038865685463, -0.10221169888973236, 0.003969188779592514, 0.5206987261772156, -0.02016376703977585, -0.04844219237565994, 0.1878580003976822, -0.06100940704345703, 0.04822711646556854, -0.15849803388118744, -0.08948137611150742, -0.1095932275056839, 0.11269508302211761, 0.08233074098825455, -0.49574875831604004, 0.5330726504325867, -0.5667433738708496, -0.1811666488647461, 0.4938717186450958, -0.1976935863494873, 0.18249478936195374, -0.20207229256629944, -0.12896236777305603, 0.09108137339353561, 0.37978029251098633, -0.42103448510169983, 0.20703062415122986, 0.12842068076133728, 0.11072579026222229, 0.024974875152111053, -0.3196200132369995, 0.08125974237918854, 0.33316653966903687, -0.02912306785583496, 0.11147371679544449, -0.03837589919567108, 0.24699939787387848, -0.13896800577640533, -0.32237619161605835, 0.09816406667232513, 0.1357908695936203, -0.047667987644672394, -0.3277379870414734, 0.0029746871441602707, -0.33428364992141724, -0.11659921705722809, -0.38742852210998535, -0.2271277755498886, -0.4085298776626587, -0.4292823374271393, -0.12641090154647827, 0.649942934513092, -0.056376341730356216, 0.2817411720752716, -0.6548400521278381, -0.2946591377258301, 0.07852721959352493, -0.406556099653244, -0.010940447449684143, 0.004167394246906042, -0.12551862001419067, -0.06743285059928894, 0.30898046493530273, 0.2916703224182129, -0.18437060713768005, -0.04138167202472687, -0.21613694727420807, -0.162011057138443, -0.7112452387809753, 0.1253075748682022, -0.4536358118057251, 0.026132667437195778, 0.2974931597709656, -0.009507507085800171, 0.13897226750850677, -0.31551259756088257, 0.1860710233449936, 0.17556889355182648, -0.39179161190986633, 0.4901825189590454, 0.10416355729103088, -0.29448890686035156, -0.032159920781850815, -0.19163048267364502, -0.029373085126280785, -0.26498839259147644, 0.11475439369678497, -0.08914075791835785, 0.04085695743560791, 0.38607263565063477, 0.021111659705638885, 0.04878260940313339, -0.0745106190443039, 0.03488301485776901, 0.1042635515332222, 0.42505574226379395, 0.4264543056488037, 0.28124159574508667, -0.12412968277931213, 0.18684622645378113, -0.2605314552783966, -0.20540067553520203, 0.22081990540027618, -0.05101093277335167, -0.14541307091712952, -0.23334316909313202, 0.5366601943969727, 0.23746344447135925, -0.3884623944759369, 0.2863420844078064, 0.4431608319282532, 0.0826122984290123, 0.010179933160543442, -0.31892237067222595, -0.040562279522418976, 0.38408535718917847, 0.2121478021144867, 0.03990580514073372, -0.12001978605985641, 0.13873405754566193, 0.03879352658987045, -0.08649566769599915, -0.20548425614833832, 0.5309778451919556, -0.23939329385757446, -0.06136992201209068, 0.14157889783382416, -0.032022565603256226, -0.10774379968643188, -0.049465909600257874, 0.15458250045776367, 0.1559000462293625, -0.26577988266944885, -0.25183963775634766, 0.10598915815353394, 0.16727915406227112, -0.21138611435890198, -0.17784175276756287, 0.2012261152267456, -0.30516013503074646, 0.3195037543773651, -0.04060780629515648, -0.19858968257904053, -0.19193071126937866, -0.36991116404533386, 0.033811651170253754, 0.13951322436332703, -0.09813091903924942, 0.10264494270086288, -0.6497283577919006, 0.0017364781815558672, 0.020879145711660385, 0.3767079710960388, 0.13425341248512268, 0.47313186526298523, 0.14602535963058472, -0.45086923241615295, -0.19023622572422028, -0.06153758242726326, 0.5640016794204712, 0.06123103201389313, -0.06457282602787018, 0.31839537620544434, 0.21168828010559082, -0.2911325991153717, -0.26743707060813904, -0.07870330661535263, 0.09373831748962402, 0.35643595457077026, 0.21677909791469574, -0.6534013152122498, -0.23090915381908417, 0.36774954199790955, 0.38144728541374207, 0.0330670140683651, 0.004281897097826004, -0.19246912002563477, -0.06129288673400879, 0.015351222828030586, -0.16253945231437683, 0.012942129746079445, 0.31189441680908203, -0.4172186553478241, 0.03441188111901283, -0.3534694015979767, -0.13194914162158966, 0.25420984625816345, 0.35739290714263916, 0.344343900680542, -0.32195764780044556, 0.09547287225723267, -0.47583815455436707, 0.18212760984897614, -0.038386911153793335, 0.5125538110733032, 0.4208607077598572, -0.4859171509742737, -0.3728669285774231, 0.12003053724765778, 0.3413616716861725, -0.007942736148834229, 0.17135994136333466, 0.25883859395980835, -0.20450104773044586, -0.218901589512825, -0.16183151304721832, 0.03143525868654251, 0.39696601033210754, -0.10379379987716675, -0.14246559143066406, -0.0794326663017273, 0.49810734391212463, 0.085301473736763, 0.12107361853122711, -0.6400694251060486, 0.29072850942611694, -0.3826371729373932, 0.38157689571380615, -0.11849372833967209, 0.9706947207450867, 0.03442617133259773, 0.11598479747772217, 0.3479284644126892, 0.16733387112617493, 0.51397305727005, 0.0721905305981636, 0.18026034533977509, -0.30072715878486633, 0.1964893639087677, -0.12934370338916779, -0.22132641077041626, 0.1310359537601471, 0.197132870554924, -0.23217694461345673, 0.23259682953357697, -0.0664607435464859, 0.17164993286132812, -0.017147259786725044, 0.2490396499633789, 0.005472141318023205, 0.2760458290576935, -0.31805965304374695, -0.10317090153694153, -0.11243650317192078, 0.08920963108539581, 0.12881216406822205, -0.19085773825645447, -0.4532460570335388, -0.14037270843982697, 0.08319804072380066, 0.1300482451915741, 0.08043809980154037, 0.0620415098965168, 0.36101409792900085, -0.23215745389461517, -0.028536051511764526, 0.35601991415023804, 0.04991712421178818, -0.3062995970249176, 0.01726171001791954, -0.0950053334236145, 0.27844566106796265, -0.11845669895410538, 0.22199144959449768, -0.11967560648918152, 0.3196142911911011, 0.13377094268798828, -0.259615957736969, -0.08319885283708572, -0.12166425585746765, -0.14499682188034058, -0.16094127297401428, -0.11056527495384216, 0.06583145260810852, -0.253104031085968, -0.16357684135437012, -0.024169176816940308, -0.11542363464832306, -0.09306535869836807, -0.035069916397333145, -0.21485303342342377, -0.0962190255522728, 0.07681342214345932, 0.029871955513954163, -0.15281131863594055, 0.041953228414058685, 0.12574824690818787, 0.2709091305732727, 0.6052500009536743, 0.5042905807495117, 0.03617440536618233, -0.008429771289229393, 0.005501013249158859, -0.2731568217277527, -0.2976403832435608, -0.36961713433265686, -0.07140353322029114, -0.10662641376256943, -0.27015626430511475, -0.22187744081020355, 0.6855992078781128, 0.050029076635837555, 0.25795459747314453, 0.1075882762670517, -0.176020085811615, -0.08866218477487564, 0.32629621028900146, 0.2517031133174896, 0.27264994382858276, 0.012092255055904388, 0.5588990449905396, 0.11516715586185455, -0.04516299068927765, -0.11834339052438736, -0.09415056556463242, -0.45019015669822693, 0.29932019114494324, 0.1259329915046692, -0.027381479740142822, -0.19646784663200378, -0.34749019145965576, 0.10526059567928314, -0.2562193274497986, 0.1677025854587555, -0.005270946770906448, -0.06971122324466705, 0.2226894199848175, 0.2814818024635315, 0.06298883259296417, 0.008343805558979511, 0.07718224823474884, 0.3129276931285858, -0.11154064536094666, -0.11602354049682617, 0.130107581615448, -0.10958865284919739, 0.3613779544830322, 0.19096846878528595, 0.2876525819301605, -0.3854861259460449, 0.011654969304800034, -0.11467902362346649, -0.083991140127182, 0.03843076154589653, 0.3189913034439087, 0.02505185641348362, 0.18791812658309937, -0.012674177065491676, 0.0783960297703743, -0.03950121998786926, 0.07912278175354004, -0.005277626216411591, -0.1448146551847458, -0.31062325835227966, -0.041873469948768616, 0.017504405230283737, 0.4356744587421417, -0.057386454194784164, -0.20049385726451874, 0.30629581212997437, 0.03850175440311432, -0.39579030871391296, 0.048187851905822754, 0.23316794633865356, -0.37208646535873413, 0.07856516540050507, 0.19545093178749084, 0.34851381182670593, 0.2989065945148468, -0.36536872386932373, 0.08933698385953903, 0.1632992923259735, 0.1465233564376831, 0.1509818285703659, 0.26366567611694336, -0.06489884853363037, 0.16047260165214539, 0.46446073055267334, -0.011503644287586212, 0.05042809993028641, -0.11114111542701721, 0.4408940076828003, 0.25186339020729065, -0.1169416680932045, -0.12436278164386749, 0.4053172171115875, 0.1224789023399353, -0.25398117303848267, 0.11319269239902496, 0.442177951335907, 0.10593406856060028, 0.1297665536403656, 0.31137141585350037, 0.0384407564997673, -0.226745143532753, -0.12112020701169968, 0.11794164776802063, -0.0931444987654686, -0.08734889328479767, -0.27570220828056335, -0.25654783844947815, -0.08108966052532196, -0.18003657460212708, 0.02432490512728691, -0.15400069952011108, 0.5543488264083862, 0.059205275028944016, -0.16357772052288055, -0.2852015793323517, 0.40141743421554565, 0.19218695163726807, 0.1359357237815857, -0.19956347346305847, 0.03668752685189247, 0.09676359593868256, -0.24903333187103271, 0.22497619688510895, 0.30088841915130615, 0.27497613430023193, 0.29349520802497864, -0.4081047773361206, -0.3811699151992798, 0.02529599331319332, 0.0026774797588586807, 0.04316077008843422, 0.02896104007959366, -0.16804081201553345, 0.14789660274982452, 0.2348799854516983, 0.0013728179037570953, 0.06385824084281921, -0.04051804915070534, -0.10478277504444122, -0.2817610204219818, -0.26657357811927795, 0.5761906504631042, -0.05184851586818695, -0.29048094153404236, -0.014522872865200043, -0.022990450263023376, -0.08984392881393433, -0.18885476887226105, 0.2122810184955597, 0.24193327128887177, 0.26185891032218933, 0.110113725066185, 0.0030346233397722244, 0.17694315314292908, 0.14491601288318634, 0.10258117318153381, 0.13410812616348267, -0.041792258620262146, 0.2796100378036499, -0.5538766384124756, 0.018385134637355804, -0.0415441058576107, -0.3055499792098999, 0.17915277183055878, 0.28136104345321655, 0.06399422138929367, 0.05713258683681488, -0.44040679931640625, -0.06747034192085266, 0.15487684309482574, 0.0214468352496624, -0.18985716998577118, -0.1347699910402298, 0.1254250705242157, -0.33031272888183594, -0.23334987461566925, -0.3570854365825653, 0.37941014766693115, -0.18392501771450043, -0.01597468927502632, -0.02010851725935936, 0.20728760957717896, 0.48815447092056274, 0.27326810359954834, -0.022035405039787292, 0.06963321566581726, 0.7188739776611328, 0.12589961290359497, -0.04766377806663513, -0.23020851612091064, -0.061891596764326096, -0.4107394516468048, 0.15716120600700378, -0.24788251519203186, 0.2414242923259735, -0.06751949340105057, 0.5831834673881531, 0.00857650488615036, 0.4599256217479706, -0.038041554391384125, -0.256094366312027, 0.007837601006031036, 0.17656536400318146, -0.36247119307518005, 0.15719787776470184, 0.13288334012031555, 0.12752021849155426, -0.02008744329214096, 0.13687404990196228, -0.11844950169324875, -0.495602011680603, 0.22623708844184875, -0.11837679147720337, -0.2952271103858948, 0.14554615318775177, -0.10589341819286346, 0.10774935036897659, 0.09190938621759415, -0.5134955048561096, -0.15204668045043945, 0.3226172626018524, -0.01446601003408432, 0.052442941814661026, 0.07650938630104065, 0.23262755572795868, -0.13327795267105103, -0.0963042825460434, -0.05255095660686493, -0.23943617939949036, -0.04272919148206711, -0.058346226811409, -0.05071152001619339 ]
https://github.com/huggingface/datasets/issues/488
issues with downloading datasets for wmt16 and wmt19
I found `UNv1.0.en-ru.tar.gz` here: https://conferences.unite.un.org/uncorpus/en/downloadoverview, so it can be reconstructed with: ``` wget -c https://stuncorpusprod.blob.core.windows.net/corpusfiles/UNv1.0.en-ru.tar.gz.00 wget -c https://stuncorpusprod.blob.core.windows.net/corpusfiles/UNv1.0.en-ru.tar.gz.01 wget -c https://stuncorpusprod.blob.core.windows.net/corpusfiles/UNv1.0.en-ru.tar.gz.02 cat UNv1.0.en-ru.tar.gz.0* > UNv1.0.en-ru.tar.gz ``` it has other languages as well, in case https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/ is gone
I have encountered multiple issues while trying to: ``` import nlp dataset = nlp.load_dataset('wmt16', 'ru-en') metric = nlp.load_metric('wmt16') ``` 1. I had to do `pip install -e ".[dev]" ` on master, currently released nlp didn't work (sorry, didn't save the error) - I went back to the released version and now it worked. So it must have been some outdated dependencies that `pip install -e ".[dev]" ` fixed. 2. it was downloading at 60kbs - almost 5 hours to get the dataset. It was downloading all pairs and not just the one I asked for. I tried the same code with `wmt19` in parallel and it took a few secs to download and it only fetched data for the requested pair. (but it failed too, see below) 3. my machine has crushed and when I retried I got: ``` Traceback (most recent call last): File "./download.py", line 9, in <module> dataset = nlp.load_dataset('wmt16', 'ru-en') File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 549, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 449, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/stas/anaconda3/envs/main/lib/python3.7/contextlib.py", line 112, in __enter__ return next(self.gen) File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/stas/anaconda3/envs/main/lib/python3.7/os.py", line 221, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/stas/.cache/huggingface/datasets/wmt16/ru-en/1.0.0/4d8269cdd971ed26984a9c0e4a158e0c7afc8135fac8fb8ee43ceecf38fd422d.incomplete' ``` it can't handle resumes. but neither allows a new start. Had to delete it manually. 4. and finally when it downloaded the dataset, it then failed to fetch the metrics: ``` Traceback (most recent call last): File "./download.py", line 15, in <module> metric = nlp.load_metric('wmt16') File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 442, in load_metric module_path, hash = prepare_module(path, download_config=download_config, dataset=False) File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 258, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 198, in cached_path local_files_only=download_config.local_files_only, File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 356, in get_from_cache raise ConnectionError("Couldn't reach {}".format(url)) ConnectionError: Couldn't reach https://s3.amazonaws.com/datasets.huggingface.co/nlp/metrics/wmt16/wmt16.py ``` 5. If I run the same code with `wmt19`, it fails too: ``` ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-ru.tar.gz ```
37
issues with downloading datasets for wmt16 and wmt19 I have encountered multiple issues while trying to: ``` import nlp dataset = nlp.load_dataset('wmt16', 'ru-en') metric = nlp.load_metric('wmt16') ``` 1. I had to do `pip install -e ".[dev]" ` on master, currently released nlp didn't work (sorry, didn't save the error) - I went back to the released version and now it worked. So it must have been some outdated dependencies that `pip install -e ".[dev]" ` fixed. 2. it was downloading at 60kbs - almost 5 hours to get the dataset. It was downloading all pairs and not just the one I asked for. I tried the same code with `wmt19` in parallel and it took a few secs to download and it only fetched data for the requested pair. (but it failed too, see below) 3. my machine has crushed and when I retried I got: ``` Traceback (most recent call last): File "./download.py", line 9, in <module> dataset = nlp.load_dataset('wmt16', 'ru-en') File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 549, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 449, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/stas/anaconda3/envs/main/lib/python3.7/contextlib.py", line 112, in __enter__ return next(self.gen) File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/stas/anaconda3/envs/main/lib/python3.7/os.py", line 221, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/stas/.cache/huggingface/datasets/wmt16/ru-en/1.0.0/4d8269cdd971ed26984a9c0e4a158e0c7afc8135fac8fb8ee43ceecf38fd422d.incomplete' ``` it can't handle resumes. but neither allows a new start. Had to delete it manually. 4. and finally when it downloaded the dataset, it then failed to fetch the metrics: ``` Traceback (most recent call last): File "./download.py", line 15, in <module> metric = nlp.load_metric('wmt16') File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 442, in load_metric module_path, hash = prepare_module(path, download_config=download_config, dataset=False) File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 258, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 198, in cached_path local_files_only=download_config.local_files_only, File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 356, in get_from_cache raise ConnectionError("Couldn't reach {}".format(url)) ConnectionError: Couldn't reach https://s3.amazonaws.com/datasets.huggingface.co/nlp/metrics/wmt16/wmt16.py ``` 5. If I run the same code with `wmt19`, it fails too: ``` ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-ru.tar.gz ``` I found `UNv1.0.en-ru.tar.gz` here: https://conferences.unite.un.org/uncorpus/en/downloadoverview, so it can be reconstructed with: ``` wget -c https://stuncorpusprod.blob.core.windows.net/corpusfiles/UNv1.0.en-ru.tar.gz.00 wget -c https://stuncorpusprod.blob.core.windows.net/corpusfiles/UNv1.0.en-ru.tar.gz.01 wget -c https://stuncorpusprod.blob.core.windows.net/corpusfiles/UNv1.0.en-ru.tar.gz.02 cat UNv1.0.en-ru.tar.gz.0* > UNv1.0.en-ru.tar.gz ``` it has other languages as well, in case https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/ is gone
[ -0.2756037414073944, -0.09381400048732758, -0.016513310372829437, 0.5474316477775574, 0.07396011054515839, -0.08159120380878448, 0.018407747149467468, 0.19257725775241852, 0.18017293512821198, -0.07401430606842041, -0.06084355711936951, 0.022961152717471123, -0.16825543344020844, 0.07069796323776245, 0.1812841296195984, -0.010288193821907043, -0.09827124327421188, 0.054643310606479645, -0.5839898586273193, -0.10661241412162781, -0.2519785165786743, 0.15975452959537506, -0.18899935483932495, 0.03162268176674843, 0.029159849509596825, -0.14727136492729187, -0.005671253427863121, 0.03388464078307152, -0.42266982793807983, -0.3919175863265991, 0.44466203451156616, 0.1778905987739563, 0.04866586625576019, 0.2788921892642975, -0.00011827581329271197, -0.2390262633562088, 0.2288016825914383, 0.014683788642287254, -0.30214041471481323, -0.18836112320423126, -0.2656501531600952, -0.5416656136512756, 0.17962516844272614, 0.07939707487821579, 0.1905767023563385, -0.25773704051971436, -0.09633271396160126, -0.1201571449637413, 0.33361294865608215, 0.15410850942134857, 0.1808844357728958, 0.4754366874694824, 0.18626810610294342, 0.018308954313397408, 0.14631949365139008, 0.18298760056495667, -0.01618308201432228, 0.04141441732645035, 0.368344247341156, -0.14510837197303772, 0.30423063039779663, 0.2626512944698334, -0.1972891092300415, 0.3405383229255676, 0.22545963525772095, 0.034291546791791916, 0.2514495551586151, -0.3291008472442627, -0.010428864508867264, 0.3739079236984253, 0.0919395461678505, -0.018939770758152008, -0.2833074629306793, -0.33283478021621704, -0.06072172522544861, -0.5919570326805115, 0.09150922298431396, 0.35544532537460327, -0.3222123980522156, -0.0712231993675232, -0.5180072784423828, 0.0008278924506157637, 0.09451250731945038, 0.33948731422424316, -0.10836902260780334, 0.34773916006088257, 0.03286202251911163, 0.143594890832901, 0.18356333673000336, -0.34307318925857544, -0.10325242578983307, -0.31443774700164795, 0.25308382511138916, 0.22122593224048615, -0.2552495002746582, 0.0872771143913269, 0.010116193443536758, 0.00870717316865921, 0.0032326243817806244, -0.09767964482307434, -0.02234315127134323, 0.10394565761089325, -0.13865642249584198, 0.035780131816864014, 0.10940822958946228, 0.21433143317699432, -0.07633035629987717, -0.09896856546401978, 0.26423317193984985, -0.03482165187597275, 0.27477574348449707, 0.24339333176612854, 0.18718060851097107, -0.14788953959941864, -0.3470739424228668, 0.06968364119529724, 0.15432874858379364, -0.24918906390666962, -0.30244892835617065, -0.08352506905794144, 0.0652417466044426, -0.2730260193347931, 0.04082612693309784, 0.02576489746570587, -0.29944223165512085, 0.2130637764930725, 0.061091676354408264, 0.16479016840457916, -0.24556200206279755, -0.1874849647283554, -0.12450987100601196, -0.21077434718608856, -0.09949515759944916, 0.11556445807218552, 0.6232806444168091, 0.06980099529027939, 0.2070072442293167, 0.10568498820066452, -0.1488357037305832, 0.10954609513282776, -0.019015846773982048, -0.11890891194343567, 0.12226279079914093, 0.22211363911628723, 0.04510308429598808, 0.4238993525505066, -0.11890919506549835, 0.016167834401130676, -0.13158351182937622, -0.12990501523017883, -0.05838317424058914, 0.043473850935697556, 0.29067757725715637, 0.20674876868724823, -0.3159317970275879, -0.05338278412818909, -0.2992148995399475, 0.09075507521629333, -0.11520741134881973, -0.03388100862503052, -0.18860438466072083, -0.24381868541240692, -0.37523984909057617, -0.25265759229660034, 0.3767182528972626, 0.27990490198135376, -0.1666068136692047, -0.1649065911769867, -0.08377225697040558, 0.028942827135324478, 0.31235823035240173, 0.44450271129608154, -0.22863009572029114, 0.04642286151647568, -0.15888093411922455, -0.05105552077293396, 0.35844171047210693, -0.35001111030578613, -0.1459338515996933, 0.014212870970368385, -0.0908050462603569, 0.2117902934551239, -0.03026881068944931, 0.08809258788824081, 0.29267001152038574, -0.15957342088222504, 0.20961251854896545, 0.4093495011329651, -0.08346918225288391, -0.12819881737232208, -0.24358220398426056, -0.4912777543067932, 0.6207728981971741, 0.032362040132284164, 0.14470139145851135, -0.3409750163555145, -0.0999753549695015, -0.1594645082950592, 0.4071718156337738, 0.10203016549348831, 0.13875171542167664, -0.05970008671283722, -0.04961125925183296, -0.0825747698545456, -0.07161150127649307, -0.0022231973707675934, -0.4874587655067444, 0.37618815898895264, -0.24416089057922363, 0.13809770345687866, 0.02673839032649994, 0.20199131965637207, -0.025264590978622437, -0.14512144029140472, -0.10933484137058258, -0.16397430002689362, 0.037241220474243164, 0.019969511777162552, 0.09853516519069672, -0.03973594307899475, 0.07811194658279419, 0.08207190781831741, -0.04024839028716087, 0.13210125267505646, -0.2335660755634308, 0.22221840918064117, 0.05466262251138687, -0.02881113439798355, 0.356295108795166, 0.28319770097732544, 0.17756295204162598, -0.059605780988931656, -0.02776990458369255, -0.030302800238132477, -0.0066435313783586025, 0.4922424554824829, -0.10419868677854538, -0.014154508709907532, 0.3394639492034912, -0.4042294919490814, 0.1655750423669815, 0.27197495102882385, 0.22127385437488556, -0.359703004360199, 0.017090465873479843, 0.23876647651195526, -0.09157036244869232, 0.3743443489074707, 0.11003084480762482, 0.012317297980189323, 0.011361947283148766, 0.013947103172540665, -0.08915358781814575, -0.03414774686098099, 0.40796923637390137, -0.09643912315368652, 0.022088687866926193, 0.0996987447142601, -0.030334211885929108, 0.23878401517868042, 0.2519143223762512, 0.11789818108081818, 0.026823565363883972, -0.03702399134635925, -0.13331648707389832, -0.13707226514816284, -0.18008345365524292, 0.2379724532365799, 0.5232099890708923, 0.1820145547389984, 0.1907966583967209, 0.0909058153629303, 0.08776906877756119, -0.40196818113327026, 0.3726395070552826, 0.23837880790233612, -0.0019469941034913063, 0.13209635019302368, 0.04306914657354355, -0.016369543969631195, -0.11048359423875809, 0.4184349477291107, 0.09176403284072876, 0.17912185192108154, -0.232390895485878, -0.24925492703914642, -0.5810911655426025, -0.4634237289428711, -0.4940532445907593, -0.3730905055999756, -0.381044864654541, -0.33173635601997375, -0.19376873970031738, -0.06423577666282654, -0.08163979649543762, 0.17595037817955017, 0.16897493600845337, 0.0007621198892593384, -0.3557640314102173, 0.4598487615585327, -0.02788148634135723, -0.04937358945608139, -0.3101083040237427, 0.017224248498678207, 0.40098288655281067, 0.14105060696601868, 0.40672793984413147, 0.00042650848627090454, -0.013199098408222198, 0.00810379907488823, -0.32040897011756897, -0.04198317974805832, -0.07387962192296982, 0.2629980146884918, 0.13758356869220734, 0.28693169355392456, 0.2675917148590088, -0.09402956068515778, 0.14898304641246796, -0.2181369662284851, -0.05148620158433914, -0.1704602986574173, -0.021550068631768227, 0.01873987913131714, -0.22370584309101105, -0.46808746457099915, -0.71136474609375, -0.3568284511566162, 0.16624101996421814, 0.06435509026050568, 0.0964026227593422, 0.3763370215892792, -0.26690027117729187, -0.004823942203074694, -0.043119609355926514, 0.18727974593639374, -0.14057014882564545, 0.1058700829744339, 0.34847214818000793, -0.043336257338523865, -0.446367084980011, 0.035013597458601, 0.15766330063343048, 0.2508546710014343, 0.10075755417346954, -0.4295145869255066, 0.3669920563697815, -0.14428314566612244, -0.1073538213968277, 0.22402073442935944, 0.16115444898605347, 0.14359484612941742, -0.005977036897093058, -0.014870592392981052, -0.03855898976325989, -0.2719135582447052, -0.04869457334280014, -0.05593287944793701, 0.2735080122947693, 0.055043868720531464, 0.12212570756673813, 0.020820189267396927, 0.5913629531860352, 0.2570463716983795, -0.08706805109977722, 0.16854241490364075, 0.2239551991224289, 0.06888067722320557, 0.32148778438568115, -0.5713633894920349, 0.062438976019620895, 0.014921814203262329, 0.26432788372039795, 0.2561010718345642, -0.024556927382946014, -0.0789705291390419, -0.33358854055404663, 0.045606788247823715, -0.23223823308944702, -0.32855018973350525, -0.042432136833667755, 0.2228124886751175, 0.2037615180015564, 0.3823130130767822, 0.13327014446258545, -0.0036632297560572624, -0.33441880345344543, -0.19215892255306244, -0.07134154438972473, -0.07959096878767014, 0.1410655975341797, -0.3056296706199646, -0.3055728077888489, -0.3390577733516693, 0.18538081645965576, 0.012305977754294872, 0.6306857466697693, -0.10046128928661346, 0.060254983603954315, 0.00035922229290008545, 0.053595900535583496, 0.28630998730659485, -0.014985902234911919, 0.22382226586341858, -0.05500349402427673, 0.04186364263296127, -0.7075556516647339, -0.07884079962968826, -0.14908252656459808, -0.10244185477495193, 0.3979480266571045, 0.26768141984939575, -0.33444759249687195, -0.3497644066810608, 0.12868784368038177, 0.46990424394607544, -0.30020496249198914, -0.0902637466788292, -0.00018521398305892944, -0.1544872224330902, -0.1256401389837265, -0.15091928839683533, -0.27894559502601624, 0.19254276156425476, -0.34516894817352295, 0.04526999220252037, 0.18011416494846344, 0.06805924326181412, 0.33994415402412415, -0.026714283972978592, 0.09466623514890671, 0.1880115270614624, 0.42700105905532837, 0.3394288718700409, 0.10349006950855255, 0.09073618799448013, 0.36048343777656555, -0.07484650611877441, 0.3105948865413666, -0.10799794644117355, -0.058198995888233185, 0.25659164786338806, 0.572309672832489, -0.0812101662158966, 0.2673700749874115, 0.027988027781248093, 0.07844778150320053, -0.4492240846157074, 0.07945027202367783, 0.35881102085113525, -0.13682517409324646, -0.21599988639354706, -0.28617382049560547, 0.3259080648422241, 0.20196974277496338, -0.11094186455011368, 0.2802765667438507, -0.11497215926647186, -0.31278857588768005, -0.19781313836574554, 0.040877509862184525, 0.9505409002304077, 0.23871752619743347, 0.22749941051006317, -0.009548846632242203, -0.40006351470947266, 0.48835399746894836, 0.42710912227630615, -0.14363811910152435, -0.04819628223776817, 0.31915149092674255, -0.003990106284618378, -0.1169140636920929, 0.07995515316724777, -0.016357876360416412, -0.15587663650512695, 0.5566455125808716, 0.3277597427368164, 0.1902875155210495, 0.06713594496250153, 0.3798573911190033, 0.008937000297009945, -0.3773041367530823, -0.2538492977619171, 0.06734410673379898, -0.35938817262649536, 0.2783210277557373, -0.13936865329742432, -0.32526183128356934, 0.005306597799062729, -0.20724260807037354, -0.3205973505973816, 0.038353972136974335, -0.4705604910850525, 0.1999387890100479, -0.10842996835708618, -0.04849493131041527, 0.19131220877170563, -0.09392854571342468, 0.023355945944786072, 0.19398197531700134, -0.34216558933258057, 0.047142866998910904, -0.4583497643470764, 0.23518557846546173, 0.04179811105132103, 0.06990716606378555, -0.0019250046461820602, -0.18404024839401245, -0.11442703753709793, -0.25358864665031433, 0.011525160633027554, 0.33709216117858887, -0.057581305503845215, 0.02594761922955513, 0.1794767677783966, 0.17357680201530457, -0.09339752793312073, 0.1255250722169876, 0.12402692437171936, -0.13765650987625122, 0.10380895435810089, 0.2577846646308899, -0.09410300850868225, 0.5929930806159973, 0.14469292759895325, -0.08290012925863266, -0.15289634466171265, 0.5256072282791138, 0.05211562663316727, -0.14661896228790283, 0.48987147212028503, 0.5510686635971069, -0.11435317993164062, -0.24170315265655518, -0.004161801189184189, -0.3494572341442108, -0.48457032442092896, -0.010519779287278652, 0.03293406218290329, 0.3049020767211914, 0.05599508807063103, 0.5251328945159912, 0.21824128925800323, -0.27874207496643066, 0.15703041851520538, -0.49901679158210754, -0.14112704992294312, 0.30060768127441406, 0.09301729500293732, 0.07044833898544312, -0.11381813883781433, 0.0523064024746418, 0.07834594696760178, 0.3154861330986023, -0.2897266745567322, 0.19059906899929047, -0.04512287303805351, 0.13441307842731476, 0.24833375215530396, -0.242374986410141, 0.10889334231615067, -0.0465245395898819, -0.06454315036535263, -0.12677548825740814, -0.44857561588287354, -0.14715340733528137, -0.22475916147232056, 0.145278200507164, -0.00368565134704113, -0.47423937916755676, 0.059028271585702896, -0.3070833683013916, 0.04878227412700653, 0.06076739728450775, -0.1974305659532547, 0.09647949784994125, 0.014651764184236526, 0.12176820635795593, 0.13697689771652222, 0.17128264904022217, 0.03079856187105179, 0.4250537157058716, -0.0532618910074234, 0.2902277708053589, 0.14366066455841064, 0.17309318482875824, 0.2801125645637512, -0.12300115823745728, -0.1648184359073639, -0.1834222674369812, -0.014927402138710022, -0.22811609506607056, 0.2769266963005066, -0.23831583559513092, -0.02866576611995697, 0.18436744809150696, 0.3846004903316498, 0.5537831783294678, 0.1585489809513092, 0.008907761424779892, -0.06640979647636414, 0.11203369498252869, -0.1739785373210907, 0.03755830228328705, 0.2010297030210495, 0.43979567289352417, -0.12167881429195404, 0.130498006939888, 0.346744179725647, -0.23718538880348206, -0.19276492297649384, 0.16117623448371887, 0.45956864953041077, -0.13669231534004211, 0.035905007272958755, 0.13993078470230103, 0.054622139781713486, -0.006956774741411209, -0.14035063982009888, 0.12837326526641846, 0.026611872017383575, 0.046546030789613724, -0.229646235704422, 0.40972232818603516, 0.1429581344127655, -0.08155542612075806, 0.15018638968467712, -0.34753304719924927, 0.001954890787601471, 0.34105542302131653, -0.15245601534843445, -0.04545001685619354, 0.10500196367502213, 0.6036861538887024, -0.039998508989810944, -0.34116479754447937, -0.03430749848484993, 0.5274832248687744, 0.10173607617616653, -0.10915878415107727, -0.3369092047214508, -0.28713902831077576, -0.26513171195983887, 0.011788565665483475, -0.11323139071464539, -0.2011541873216629, 0.11531005054712296, 0.23781722784042358, -0.2011554092168808, -0.6774237155914307, -0.29834985733032227, 0.02275720424950123, -0.12410708516836166, -0.1449493020772934, 0.20984281599521637, 0.42804574966430664, -0.06404726207256317, 0.0502656027674675, 0.5844966769218445, 0.33799606561660767, 0.34745800495147705, -0.20884478092193604, -0.0027253124862909317, 0.11221839487552643, 0.01159355603158474, -0.24575522541999817, 0.3455427885055542, 0.07481037080287933, -0.06031675264239311, 0.3822254240512848, 0.09450580179691315, -0.14593558013439178, -0.2766551673412323, 0.12532630562782288, -0.2008272111415863, -0.13046930730342865, 0.43201327323913574, -0.21414755284786224, 0.04505884647369385, -0.2039664089679718, 0.04483668506145477, -0.3329184055328369, 0.16379310190677643, 0.5231635570526123, 0.054901592433452606, 0.19528239965438843, -0.3426964581012726, 0.059301190078258514, -0.07010218501091003, 0.7746467590332031, 0.3278970420360565, 0.10633888840675354, -0.3810446262359619, -0.24308981001377106, -0.9569470882415771, -0.2136806845664978, -0.1736365407705307, 0.2115771472454071, -0.0691613256931305, 0.21861547231674194, 0.13693271577358246, 0.2308194786310196, 0.07308332622051239, 0.4956248700618744, 0.01831088960170746, -0.05127841234207153, -0.44422534108161926, 0.02651021257042885, 0.10342775285243988, -0.10298708081245422, -0.021180758252739906, -0.12843945622444153, 0.3681439757347107, -0.5790629386901855, -0.029316846281290054, -0.32039886713027954, 0.06753785908222198, -0.1546662151813507, 0.5107817649841309, 0.10490526258945465, 0.291425496339798, 0.48728829622268677, 0.172244131565094, -0.13653911650180817, -0.24562498927116394, -0.18684211373329163, 0.07690956443548203, 0.21223372220993042, -0.16958889365196228, 0.24210011959075928, -0.15480519831180573, 0.05637340620160103, -0.25510773062705994, -0.03781774267554283, -0.2682909667491913, -0.014333970844745636, -0.02540452592074871, 0.08426777273416519, -0.08102835714817047, 0.09374423325061798, 0.10314364731311798, 0.17140346765518188, -0.12601180374622345, 0.16775093972682953, -0.3540564179420471, -0.4014779329299927, 0.45236101746559143, -0.26610156893730164, -0.19093360006809235, -0.26786524057388306, 0.2520735263824463, 0.1884663999080658, 0.0888335257768631, -0.5078632235527039, -0.0687035396695137, 0.32837238907814026, -0.22752252221107483, -0.14730462431907654, 0.2823520004749298, -0.1936606466770172, -0.31951195001602173, -0.0002878718078136444, 0.17415915429592133, 0.24863669276237488, -0.36902570724487305, 0.06402423977851868, -0.08805659413337708 ]
https://github.com/huggingface/datasets/issues/488
issues with downloading datasets for wmt16 and wmt19
Further, `nlp.load_dataset('wmt19', 'ru-en')` has only the `train` and `val` datasets. `test` is missing. Fixed locally for summarization needs, by running: ``` pip install sacrebleu sacrebleu -t wmt19 -l ru-en --echo src > test.source sacrebleu -t wmt19 -l ru-en --echo ref > test.target ``` h/t @sshleifer
I have encountered multiple issues while trying to: ``` import nlp dataset = nlp.load_dataset('wmt16', 'ru-en') metric = nlp.load_metric('wmt16') ``` 1. I had to do `pip install -e ".[dev]" ` on master, currently released nlp didn't work (sorry, didn't save the error) - I went back to the released version and now it worked. So it must have been some outdated dependencies that `pip install -e ".[dev]" ` fixed. 2. it was downloading at 60kbs - almost 5 hours to get the dataset. It was downloading all pairs and not just the one I asked for. I tried the same code with `wmt19` in parallel and it took a few secs to download and it only fetched data for the requested pair. (but it failed too, see below) 3. my machine has crushed and when I retried I got: ``` Traceback (most recent call last): File "./download.py", line 9, in <module> dataset = nlp.load_dataset('wmt16', 'ru-en') File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 549, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 449, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/stas/anaconda3/envs/main/lib/python3.7/contextlib.py", line 112, in __enter__ return next(self.gen) File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/stas/anaconda3/envs/main/lib/python3.7/os.py", line 221, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/stas/.cache/huggingface/datasets/wmt16/ru-en/1.0.0/4d8269cdd971ed26984a9c0e4a158e0c7afc8135fac8fb8ee43ceecf38fd422d.incomplete' ``` it can't handle resumes. but neither allows a new start. Had to delete it manually. 4. and finally when it downloaded the dataset, it then failed to fetch the metrics: ``` Traceback (most recent call last): File "./download.py", line 15, in <module> metric = nlp.load_metric('wmt16') File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 442, in load_metric module_path, hash = prepare_module(path, download_config=download_config, dataset=False) File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 258, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 198, in cached_path local_files_only=download_config.local_files_only, File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 356, in get_from_cache raise ConnectionError("Couldn't reach {}".format(url)) ConnectionError: Couldn't reach https://s3.amazonaws.com/datasets.huggingface.co/nlp/metrics/wmt16/wmt16.py ``` 5. If I run the same code with `wmt19`, it fails too: ``` ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-ru.tar.gz ```
45
issues with downloading datasets for wmt16 and wmt19 I have encountered multiple issues while trying to: ``` import nlp dataset = nlp.load_dataset('wmt16', 'ru-en') metric = nlp.load_metric('wmt16') ``` 1. I had to do `pip install -e ".[dev]" ` on master, currently released nlp didn't work (sorry, didn't save the error) - I went back to the released version and now it worked. So it must have been some outdated dependencies that `pip install -e ".[dev]" ` fixed. 2. it was downloading at 60kbs - almost 5 hours to get the dataset. It was downloading all pairs and not just the one I asked for. I tried the same code with `wmt19` in parallel and it took a few secs to download and it only fetched data for the requested pair. (but it failed too, see below) 3. my machine has crushed and when I retried I got: ``` Traceback (most recent call last): File "./download.py", line 9, in <module> dataset = nlp.load_dataset('wmt16', 'ru-en') File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 549, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 449, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/stas/anaconda3/envs/main/lib/python3.7/contextlib.py", line 112, in __enter__ return next(self.gen) File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/stas/anaconda3/envs/main/lib/python3.7/os.py", line 221, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/stas/.cache/huggingface/datasets/wmt16/ru-en/1.0.0/4d8269cdd971ed26984a9c0e4a158e0c7afc8135fac8fb8ee43ceecf38fd422d.incomplete' ``` it can't handle resumes. but neither allows a new start. Had to delete it manually. 4. and finally when it downloaded the dataset, it then failed to fetch the metrics: ``` Traceback (most recent call last): File "./download.py", line 15, in <module> metric = nlp.load_metric('wmt16') File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 442, in load_metric module_path, hash = prepare_module(path, download_config=download_config, dataset=False) File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 258, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 198, in cached_path local_files_only=download_config.local_files_only, File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 356, in get_from_cache raise ConnectionError("Couldn't reach {}".format(url)) ConnectionError: Couldn't reach https://s3.amazonaws.com/datasets.huggingface.co/nlp/metrics/wmt16/wmt16.py ``` 5. If I run the same code with `wmt19`, it fails too: ``` ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-ru.tar.gz ``` Further, `nlp.load_dataset('wmt19', 'ru-en')` has only the `train` and `val` datasets. `test` is missing. Fixed locally for summarization needs, by running: ``` pip install sacrebleu sacrebleu -t wmt19 -l ru-en --echo src > test.source sacrebleu -t wmt19 -l ru-en --echo ref > test.target ``` h/t @sshleifer
[ -0.2756037414073944, -0.09381400048732758, -0.016513310372829437, 0.5474316477775574, 0.07396011054515839, -0.08159120380878448, 0.018407747149467468, 0.19257725775241852, 0.18017293512821198, -0.07401430606842041, -0.06084355711936951, 0.022961152717471123, -0.16825543344020844, 0.07069796323776245, 0.1812841296195984, -0.010288193821907043, -0.09827124327421188, 0.054643310606479645, -0.5839898586273193, -0.10661241412162781, -0.2519785165786743, 0.15975452959537506, -0.18899935483932495, 0.03162268176674843, 0.029159849509596825, -0.14727136492729187, -0.005671253427863121, 0.03388464078307152, -0.42266982793807983, -0.3919175863265991, 0.44466203451156616, 0.1778905987739563, 0.04866586625576019, 0.2788921892642975, -0.00011827581329271197, -0.2390262633562088, 0.2288016825914383, 0.014683788642287254, -0.30214041471481323, -0.18836112320423126, -0.2656501531600952, -0.5416656136512756, 0.17962516844272614, 0.07939707487821579, 0.1905767023563385, -0.25773704051971436, -0.09633271396160126, -0.1201571449637413, 0.33361294865608215, 0.15410850942134857, 0.1808844357728958, 0.4754366874694824, 0.18626810610294342, 0.018308954313397408, 0.14631949365139008, 0.18298760056495667, -0.01618308201432228, 0.04141441732645035, 0.368344247341156, -0.14510837197303772, 0.30423063039779663, 0.2626512944698334, -0.1972891092300415, 0.3405383229255676, 0.22545963525772095, 0.034291546791791916, 0.2514495551586151, -0.3291008472442627, -0.010428864508867264, 0.3739079236984253, 0.0919395461678505, -0.018939770758152008, -0.2833074629306793, -0.33283478021621704, -0.06072172522544861, -0.5919570326805115, 0.09150922298431396, 0.35544532537460327, -0.3222123980522156, -0.0712231993675232, -0.5180072784423828, 0.0008278924506157637, 0.09451250731945038, 0.33948731422424316, -0.10836902260780334, 0.34773916006088257, 0.03286202251911163, 0.143594890832901, 0.18356333673000336, -0.34307318925857544, -0.10325242578983307, -0.31443774700164795, 0.25308382511138916, 0.22122593224048615, -0.2552495002746582, 0.0872771143913269, 0.010116193443536758, 0.00870717316865921, 0.0032326243817806244, -0.09767964482307434, -0.02234315127134323, 0.10394565761089325, -0.13865642249584198, 0.035780131816864014, 0.10940822958946228, 0.21433143317699432, -0.07633035629987717, -0.09896856546401978, 0.26423317193984985, -0.03482165187597275, 0.27477574348449707, 0.24339333176612854, 0.18718060851097107, -0.14788953959941864, -0.3470739424228668, 0.06968364119529724, 0.15432874858379364, -0.24918906390666962, -0.30244892835617065, -0.08352506905794144, 0.0652417466044426, -0.2730260193347931, 0.04082612693309784, 0.02576489746570587, -0.29944223165512085, 0.2130637764930725, 0.061091676354408264, 0.16479016840457916, -0.24556200206279755, -0.1874849647283554, -0.12450987100601196, -0.21077434718608856, -0.09949515759944916, 0.11556445807218552, 0.6232806444168091, 0.06980099529027939, 0.2070072442293167, 0.10568498820066452, -0.1488357037305832, 0.10954609513282776, -0.019015846773982048, -0.11890891194343567, 0.12226279079914093, 0.22211363911628723, 0.04510308429598808, 0.4238993525505066, -0.11890919506549835, 0.016167834401130676, -0.13158351182937622, -0.12990501523017883, -0.05838317424058914, 0.043473850935697556, 0.29067757725715637, 0.20674876868724823, -0.3159317970275879, -0.05338278412818909, -0.2992148995399475, 0.09075507521629333, -0.11520741134881973, -0.03388100862503052, -0.18860438466072083, -0.24381868541240692, -0.37523984909057617, -0.25265759229660034, 0.3767182528972626, 0.27990490198135376, -0.1666068136692047, -0.1649065911769867, -0.08377225697040558, 0.028942827135324478, 0.31235823035240173, 0.44450271129608154, -0.22863009572029114, 0.04642286151647568, -0.15888093411922455, -0.05105552077293396, 0.35844171047210693, -0.35001111030578613, -0.1459338515996933, 0.014212870970368385, -0.0908050462603569, 0.2117902934551239, -0.03026881068944931, 0.08809258788824081, 0.29267001152038574, -0.15957342088222504, 0.20961251854896545, 0.4093495011329651, -0.08346918225288391, -0.12819881737232208, -0.24358220398426056, -0.4912777543067932, 0.6207728981971741, 0.032362040132284164, 0.14470139145851135, -0.3409750163555145, -0.0999753549695015, -0.1594645082950592, 0.4071718156337738, 0.10203016549348831, 0.13875171542167664, -0.05970008671283722, -0.04961125925183296, -0.0825747698545456, -0.07161150127649307, -0.0022231973707675934, -0.4874587655067444, 0.37618815898895264, -0.24416089057922363, 0.13809770345687866, 0.02673839032649994, 0.20199131965637207, -0.025264590978622437, -0.14512144029140472, -0.10933484137058258, -0.16397430002689362, 0.037241220474243164, 0.019969511777162552, 0.09853516519069672, -0.03973594307899475, 0.07811194658279419, 0.08207190781831741, -0.04024839028716087, 0.13210125267505646, -0.2335660755634308, 0.22221840918064117, 0.05466262251138687, -0.02881113439798355, 0.356295108795166, 0.28319770097732544, 0.17756295204162598, -0.059605780988931656, -0.02776990458369255, -0.030302800238132477, -0.0066435313783586025, 0.4922424554824829, -0.10419868677854538, -0.014154508709907532, 0.3394639492034912, -0.4042294919490814, 0.1655750423669815, 0.27197495102882385, 0.22127385437488556, -0.359703004360199, 0.017090465873479843, 0.23876647651195526, -0.09157036244869232, 0.3743443489074707, 0.11003084480762482, 0.012317297980189323, 0.011361947283148766, 0.013947103172540665, -0.08915358781814575, -0.03414774686098099, 0.40796923637390137, -0.09643912315368652, 0.022088687866926193, 0.0996987447142601, -0.030334211885929108, 0.23878401517868042, 0.2519143223762512, 0.11789818108081818, 0.026823565363883972, -0.03702399134635925, -0.13331648707389832, -0.13707226514816284, -0.18008345365524292, 0.2379724532365799, 0.5232099890708923, 0.1820145547389984, 0.1907966583967209, 0.0909058153629303, 0.08776906877756119, -0.40196818113327026, 0.3726395070552826, 0.23837880790233612, -0.0019469941034913063, 0.13209635019302368, 0.04306914657354355, -0.016369543969631195, -0.11048359423875809, 0.4184349477291107, 0.09176403284072876, 0.17912185192108154, -0.232390895485878, -0.24925492703914642, -0.5810911655426025, -0.4634237289428711, -0.4940532445907593, -0.3730905055999756, -0.381044864654541, -0.33173635601997375, -0.19376873970031738, -0.06423577666282654, -0.08163979649543762, 0.17595037817955017, 0.16897493600845337, 0.0007621198892593384, -0.3557640314102173, 0.4598487615585327, -0.02788148634135723, -0.04937358945608139, -0.3101083040237427, 0.017224248498678207, 0.40098288655281067, 0.14105060696601868, 0.40672793984413147, 0.00042650848627090454, -0.013199098408222198, 0.00810379907488823, -0.32040897011756897, -0.04198317974805832, -0.07387962192296982, 0.2629980146884918, 0.13758356869220734, 0.28693169355392456, 0.2675917148590088, -0.09402956068515778, 0.14898304641246796, -0.2181369662284851, -0.05148620158433914, -0.1704602986574173, -0.021550068631768227, 0.01873987913131714, -0.22370584309101105, -0.46808746457099915, -0.71136474609375, -0.3568284511566162, 0.16624101996421814, 0.06435509026050568, 0.0964026227593422, 0.3763370215892792, -0.26690027117729187, -0.004823942203074694, -0.043119609355926514, 0.18727974593639374, -0.14057014882564545, 0.1058700829744339, 0.34847214818000793, -0.043336257338523865, -0.446367084980011, 0.035013597458601, 0.15766330063343048, 0.2508546710014343, 0.10075755417346954, -0.4295145869255066, 0.3669920563697815, -0.14428314566612244, -0.1073538213968277, 0.22402073442935944, 0.16115444898605347, 0.14359484612941742, -0.005977036897093058, -0.014870592392981052, -0.03855898976325989, -0.2719135582447052, -0.04869457334280014, -0.05593287944793701, 0.2735080122947693, 0.055043868720531464, 0.12212570756673813, 0.020820189267396927, 0.5913629531860352, 0.2570463716983795, -0.08706805109977722, 0.16854241490364075, 0.2239551991224289, 0.06888067722320557, 0.32148778438568115, -0.5713633894920349, 0.062438976019620895, 0.014921814203262329, 0.26432788372039795, 0.2561010718345642, -0.024556927382946014, -0.0789705291390419, -0.33358854055404663, 0.045606788247823715, -0.23223823308944702, -0.32855018973350525, -0.042432136833667755, 0.2228124886751175, 0.2037615180015564, 0.3823130130767822, 0.13327014446258545, -0.0036632297560572624, -0.33441880345344543, -0.19215892255306244, -0.07134154438972473, -0.07959096878767014, 0.1410655975341797, -0.3056296706199646, -0.3055728077888489, -0.3390577733516693, 0.18538081645965576, 0.012305977754294872, 0.6306857466697693, -0.10046128928661346, 0.060254983603954315, 0.00035922229290008545, 0.053595900535583496, 0.28630998730659485, -0.014985902234911919, 0.22382226586341858, -0.05500349402427673, 0.04186364263296127, -0.7075556516647339, -0.07884079962968826, -0.14908252656459808, -0.10244185477495193, 0.3979480266571045, 0.26768141984939575, -0.33444759249687195, -0.3497644066810608, 0.12868784368038177, 0.46990424394607544, -0.30020496249198914, -0.0902637466788292, -0.00018521398305892944, -0.1544872224330902, -0.1256401389837265, -0.15091928839683533, -0.27894559502601624, 0.19254276156425476, -0.34516894817352295, 0.04526999220252037, 0.18011416494846344, 0.06805924326181412, 0.33994415402412415, -0.026714283972978592, 0.09466623514890671, 0.1880115270614624, 0.42700105905532837, 0.3394288718700409, 0.10349006950855255, 0.09073618799448013, 0.36048343777656555, -0.07484650611877441, 0.3105948865413666, -0.10799794644117355, -0.058198995888233185, 0.25659164786338806, 0.572309672832489, -0.0812101662158966, 0.2673700749874115, 0.027988027781248093, 0.07844778150320053, -0.4492240846157074, 0.07945027202367783, 0.35881102085113525, -0.13682517409324646, -0.21599988639354706, -0.28617382049560547, 0.3259080648422241, 0.20196974277496338, -0.11094186455011368, 0.2802765667438507, -0.11497215926647186, -0.31278857588768005, -0.19781313836574554, 0.040877509862184525, 0.9505409002304077, 0.23871752619743347, 0.22749941051006317, -0.009548846632242203, -0.40006351470947266, 0.48835399746894836, 0.42710912227630615, -0.14363811910152435, -0.04819628223776817, 0.31915149092674255, -0.003990106284618378, -0.1169140636920929, 0.07995515316724777, -0.016357876360416412, -0.15587663650512695, 0.5566455125808716, 0.3277597427368164, 0.1902875155210495, 0.06713594496250153, 0.3798573911190033, 0.008937000297009945, -0.3773041367530823, -0.2538492977619171, 0.06734410673379898, -0.35938817262649536, 0.2783210277557373, -0.13936865329742432, -0.32526183128356934, 0.005306597799062729, -0.20724260807037354, -0.3205973505973816, 0.038353972136974335, -0.4705604910850525, 0.1999387890100479, -0.10842996835708618, -0.04849493131041527, 0.19131220877170563, -0.09392854571342468, 0.023355945944786072, 0.19398197531700134, -0.34216558933258057, 0.047142866998910904, -0.4583497643470764, 0.23518557846546173, 0.04179811105132103, 0.06990716606378555, -0.0019250046461820602, -0.18404024839401245, -0.11442703753709793, -0.25358864665031433, 0.011525160633027554, 0.33709216117858887, -0.057581305503845215, 0.02594761922955513, 0.1794767677783966, 0.17357680201530457, -0.09339752793312073, 0.1255250722169876, 0.12402692437171936, -0.13765650987625122, 0.10380895435810089, 0.2577846646308899, -0.09410300850868225, 0.5929930806159973, 0.14469292759895325, -0.08290012925863266, -0.15289634466171265, 0.5256072282791138, 0.05211562663316727, -0.14661896228790283, 0.48987147212028503, 0.5510686635971069, -0.11435317993164062, -0.24170315265655518, -0.004161801189184189, -0.3494572341442108, -0.48457032442092896, -0.010519779287278652, 0.03293406218290329, 0.3049020767211914, 0.05599508807063103, 0.5251328945159912, 0.21824128925800323, -0.27874207496643066, 0.15703041851520538, -0.49901679158210754, -0.14112704992294312, 0.30060768127441406, 0.09301729500293732, 0.07044833898544312, -0.11381813883781433, 0.0523064024746418, 0.07834594696760178, 0.3154861330986023, -0.2897266745567322, 0.19059906899929047, -0.04512287303805351, 0.13441307842731476, 0.24833375215530396, -0.242374986410141, 0.10889334231615067, -0.0465245395898819, -0.06454315036535263, -0.12677548825740814, -0.44857561588287354, -0.14715340733528137, -0.22475916147232056, 0.145278200507164, -0.00368565134704113, -0.47423937916755676, 0.059028271585702896, -0.3070833683013916, 0.04878227412700653, 0.06076739728450775, -0.1974305659532547, 0.09647949784994125, 0.014651764184236526, 0.12176820635795593, 0.13697689771652222, 0.17128264904022217, 0.03079856187105179, 0.4250537157058716, -0.0532618910074234, 0.2902277708053589, 0.14366066455841064, 0.17309318482875824, 0.2801125645637512, -0.12300115823745728, -0.1648184359073639, -0.1834222674369812, -0.014927402138710022, -0.22811609506607056, 0.2769266963005066, -0.23831583559513092, -0.02866576611995697, 0.18436744809150696, 0.3846004903316498, 0.5537831783294678, 0.1585489809513092, 0.008907761424779892, -0.06640979647636414, 0.11203369498252869, -0.1739785373210907, 0.03755830228328705, 0.2010297030210495, 0.43979567289352417, -0.12167881429195404, 0.130498006939888, 0.346744179725647, -0.23718538880348206, -0.19276492297649384, 0.16117623448371887, 0.45956864953041077, -0.13669231534004211, 0.035905007272958755, 0.13993078470230103, 0.054622139781713486, -0.006956774741411209, -0.14035063982009888, 0.12837326526641846, 0.026611872017383575, 0.046546030789613724, -0.229646235704422, 0.40972232818603516, 0.1429581344127655, -0.08155542612075806, 0.15018638968467712, -0.34753304719924927, 0.001954890787601471, 0.34105542302131653, -0.15245601534843445, -0.04545001685619354, 0.10500196367502213, 0.6036861538887024, -0.039998508989810944, -0.34116479754447937, -0.03430749848484993, 0.5274832248687744, 0.10173607617616653, -0.10915878415107727, -0.3369092047214508, -0.28713902831077576, -0.26513171195983887, 0.011788565665483475, -0.11323139071464539, -0.2011541873216629, 0.11531005054712296, 0.23781722784042358, -0.2011554092168808, -0.6774237155914307, -0.29834985733032227, 0.02275720424950123, -0.12410708516836166, -0.1449493020772934, 0.20984281599521637, 0.42804574966430664, -0.06404726207256317, 0.0502656027674675, 0.5844966769218445, 0.33799606561660767, 0.34745800495147705, -0.20884478092193604, -0.0027253124862909317, 0.11221839487552643, 0.01159355603158474, -0.24575522541999817, 0.3455427885055542, 0.07481037080287933, -0.06031675264239311, 0.3822254240512848, 0.09450580179691315, -0.14593558013439178, -0.2766551673412323, 0.12532630562782288, -0.2008272111415863, -0.13046930730342865, 0.43201327323913574, -0.21414755284786224, 0.04505884647369385, -0.2039664089679718, 0.04483668506145477, -0.3329184055328369, 0.16379310190677643, 0.5231635570526123, 0.054901592433452606, 0.19528239965438843, -0.3426964581012726, 0.059301190078258514, -0.07010218501091003, 0.7746467590332031, 0.3278970420360565, 0.10633888840675354, -0.3810446262359619, -0.24308981001377106, -0.9569470882415771, -0.2136806845664978, -0.1736365407705307, 0.2115771472454071, -0.0691613256931305, 0.21861547231674194, 0.13693271577358246, 0.2308194786310196, 0.07308332622051239, 0.4956248700618744, 0.01831088960170746, -0.05127841234207153, -0.44422534108161926, 0.02651021257042885, 0.10342775285243988, -0.10298708081245422, -0.021180758252739906, -0.12843945622444153, 0.3681439757347107, -0.5790629386901855, -0.029316846281290054, -0.32039886713027954, 0.06753785908222198, -0.1546662151813507, 0.5107817649841309, 0.10490526258945465, 0.291425496339798, 0.48728829622268677, 0.172244131565094, -0.13653911650180817, -0.24562498927116394, -0.18684211373329163, 0.07690956443548203, 0.21223372220993042, -0.16958889365196228, 0.24210011959075928, -0.15480519831180573, 0.05637340620160103, -0.25510773062705994, -0.03781774267554283, -0.2682909667491913, -0.014333970844745636, -0.02540452592074871, 0.08426777273416519, -0.08102835714817047, 0.09374423325061798, 0.10314364731311798, 0.17140346765518188, -0.12601180374622345, 0.16775093972682953, -0.3540564179420471, -0.4014779329299927, 0.45236101746559143, -0.26610156893730164, -0.19093360006809235, -0.26786524057388306, 0.2520735263824463, 0.1884663999080658, 0.0888335257768631, -0.5078632235527039, -0.0687035396695137, 0.32837238907814026, -0.22752252221107483, -0.14730462431907654, 0.2823520004749298, -0.1936606466770172, -0.31951195001602173, -0.0002878718078136444, 0.17415915429592133, 0.24863669276237488, -0.36902570724487305, 0.06402423977851868, -0.08805659413337708 ]
https://github.com/huggingface/datasets/issues/486
Bookcorpus data contains pretokenized text
Yes indeed it looks like some `'` and spaces are missing (for example in `dont` or `didnt`). Do you know if there exist some copies without this issue ? How would you fix this issue on the current data exactly ? I can see that the data is raw text (not tokenized) so I'm not sure I understand how you would do it. Could you provide more details ?
It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively. On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575
69
Bookcorpus data contains pretokenized text It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively. On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575 Yes indeed it looks like some `'` and spaces are missing (for example in `dont` or `didnt`). Do you know if there exist some copies without this issue ? How would you fix this issue on the current data exactly ? I can see that the data is raw text (not tokenized) so I'm not sure I understand how you would do it. Could you provide more details ?
[ 0.1711835116147995, 0.22540932893753052, -0.06824146211147308, 0.3483983278274536, -0.11431379616260529, -0.25599437952041626, -0.12094062566757202, 0.235446959733963, -0.4317488968372345, 0.12445781379938126, -0.08786050230264664, 0.22662591934204102, 0.3232100307941437, -0.19458509981632233, -0.0046422770246863365, 0.13638567924499512, 0.22122414410114288, 0.3154217600822449, 0.16315972805023193, -0.2263965904712677, -0.1609848439693451, 0.2912677526473999, 0.12819916009902954, -0.033350005745887756, -0.23828375339508057, -0.3374490439891815, -0.292290598154068, 0.24946081638336182, -0.13885660469532013, -0.46922436356544495, 0.021963534876704216, 0.3137598931789398, -0.04431471973657608, 0.3362242579460144, -0.00011081568663939834, -0.29525789618492126, -0.05619639903306961, -0.052477337419986725, -0.2681572735309601, -0.014224216341972351, 0.2646721601486206, -0.055579885840415955, 0.3515129089355469, -0.434684157371521, -0.3570379614830017, 0.09604588150978088, -0.17057353258132935, -0.054389357566833496, 0.3019443452358246, 0.18157194554805756, 0.20077332854270935, 0.22296036779880524, -0.11642416566610336, 0.22348929941654205, 0.21983981132507324, -0.006134822964668274, -0.17325538396835327, 0.19435960054397583, 0.5178587436676025, 0.2606935501098633, -0.08246294409036636, 0.37697190046310425, -0.16268862783908844, -0.11776667833328247, 0.09060706943273544, 0.03418923169374466, 0.0038018226623535156, -0.1884821653366089, 0.1414443850517273, 0.1694197654724121, 0.2140859216451645, -0.16073140501976013, -0.12411708384752274, -0.19977626204490662, 0.014902924187481403, -0.14983931183815002, 0.3236136734485626, -0.0014164205640554428, 0.1347053200006485, 0.07603984326124191, -0.2752531170845032, -0.14922764897346497, -0.014261394739151001, 0.34843719005584717, -0.05728606507182121, 0.35206353664398193, -0.038894131779670715, -0.038191020488739014, -0.19728891551494598, -0.14498236775398254, -0.21617259085178375, 0.10242226719856262, -0.3670479655265808, -0.033846139907836914, -0.015092048794031143, -0.1852910816669464, -0.10532619804143906, 0.31729164719581604, -0.051303431391716, 0.19277338683605194, 0.12943699955940247, 0.14396753907203674, -0.10023318976163864, -0.09022658318281174, 0.08091436326503754, 0.15941572189331055, 0.1486368328332901, 0.28227874636650085, 0.06001228094100952, 0.0032289966475218534, -0.3305782079696655, -0.18974584341049194, 0.002566984388977289, -0.027881748974323273, -0.03245560824871063, 0.07323449850082397, -0.03501468524336815, -0.4501471221446991, 0.22549429535865784, 0.18861638009548187, -0.04305494949221611, 0.280779093503952, -0.007439752109348774, 0.10095688700675964, -0.09653680771589279, 0.012217335402965546, 0.27832460403442383, 0.10339301079511642, -0.16051289439201355, -0.18047034740447998, -0.1714458018541336, -0.05017155781388283, -0.3032006025314331, 0.09282445907592773, 0.18052434921264648, 0.0485844612121582, 0.18719471991062164, 0.08927369117736816, -0.054096341133117676, 0.0202343612909317, -0.12911885976791382, -0.1583363264799118, 0.26254063844680786, 0.055141057819128036, -0.01629898138344288, 0.24059326946735382, -0.045312877744436264, -0.004808556288480759, -0.13403117656707764, 0.09758392721414566, -0.3343701958656311, 0.21234546601772308, -0.38125792145729065, 0.17351986467838287, -0.36091989278793335, -0.23680973052978516, -0.09870641678571701, -0.00884322077035904, 0.36786627769470215, -0.34802618622779846, 0.3336292803287506, 0.06850618124008179, -0.0781446099281311, -0.021207602694630623, -0.1076173484325409, 0.20464175939559937, -0.10813359916210175, -0.10038162767887115, -0.16546261310577393, 0.24219560623168945, 0.4265682101249695, 0.14529256522655487, -0.08608540892601013, 0.013508416712284088, 0.14405816793441772, 0.8647398352622986, 0.13618116080760956, -0.13567012548446655, -0.4758005738258362, 0.30015328526496887, 0.01838582009077072, 0.049400635063648224, -0.06478086858987808, -0.16408494114875793, 0.329325795173645, 0.027232663705945015, -0.17554640769958496, 0.12067873030900955, 0.4675890803337097, 0.13785172998905182, -0.636767566204071, -0.17896682024002075, 0.3183291554450989, 0.0800495445728302, -0.04701877757906914, -0.03162381798028946, 0.1690010130405426, 0.04191714525222778, 0.01850925385951996, -0.23282119631767273, 0.28996798396110535, 0.44804471731185913, 0.27729785442352295, 0.3473077416419983, 0.1860031932592392, -0.06614081561565399, 0.14707037806510925, -0.02659233845770359, -0.694561243057251, 0.5669019818305969, -0.22575519979000092, -0.3093993067741394, 0.0004435563459992409, -0.32988810539245605, -0.09854468703269958, 0.040762875229120255, 0.23749366402626038, 0.2225191295146942, -0.05926872789859772, 0.3315548896789551, 0.15903984010219574, -0.057066403329372406, 0.1234903335571289, 0.20145577192306519, -0.23657424747943878, 0.19061516225337982, -0.1024697795510292, -0.3099568784236908, -0.08790716528892517, 0.4058856666088104, 0.46309709548950195, -0.03857136517763138, -0.2972508668899536, 0.6062340140342712, -0.3367236256599426, 0.22199802100658417, -0.20775404572486877, 0.17258082330226898, 0.34214457869529724, 0.04321807250380516, 0.1004512757062912, 0.6402654647827148, 0.27881544828414917, -0.006633054465055466, 0.15007351338863373, 0.509973406791687, 0.32251134514808655, -0.08412057906389236, 0.005840171128511429, -0.07009260356426239, 0.1578991413116455, -0.38092270493507385, 0.20041003823280334, -0.12491684406995773, 0.22033441066741943, -0.042840611189603806, 0.12333104014396667, 0.30348047614097595, -0.24066123366355896, 0.2080417275428772, 0.4111534357070923, -0.04950258880853653, 0.14021706581115723, 0.14523032307624817, -0.22548267245292664, -0.37577909231185913, 0.09676004201173782, 0.05038849636912346, 0.10273195058107376, 0.12099625915288925, -0.08062106370925903, -0.016554737463593483, 0.30390509963035583, -0.3542495369911194, 0.23876053094863892, 0.11124995350837708, -0.29316258430480957, 0.08046840131282806, 0.29787394404411316, 0.34311679005622864, -0.36367061734199524, 0.01251119002699852, -0.058072902262210846, 0.1891944408416748, -0.10282313823699951, 0.21862062811851501, -0.3165402114391327, -0.7242131233215332, 0.04527485370635986, 0.011634713038802147, -0.1649993360042572, -0.2254280298948288, 0.3410964608192444, -0.004055622965097427, -0.14614373445510864, 0.07307691127061844, 0.22351643443107605, 0.3386710286140442, -0.32307565212249756, -0.16075605154037476, -0.26651763916015625, -0.3520277142524719, -0.7646337747573853, 0.15634305775165558, 0.13348108530044556, 0.09108950197696686, -0.09977453947067261, -0.20509383082389832, 0.04950318485498428, -0.20661824941635132, -0.2803930640220642, 0.05937318876385689, -0.19303733110427856, -0.15927354991436005, 0.06043980270624161, -0.05132630467414856, -0.3704758286476135, -0.30636119842529297, -0.06965756416320801, -0.21507269144058228, -0.12194526940584183, 0.23724794387817383, -0.25430604815483093, -0.49210602045059204, -0.46567580103874207, -0.4422767460346222, -0.03224857151508331, -0.1254853755235672, 0.28294360637664795, 0.18916568160057068, 0.010901950299739838, 0.30119258165359497, -0.3569282591342926, 0.05097825080156326, 0.13357168436050415, 0.3939691185951233, -0.2407730221748352, -0.4349053204059601, 0.33193713426589966, -0.04158787801861763, -0.3880459666252136, -0.019851580262184143, 0.1343088448047638, 0.012536898255348206, -0.08096759021282196, -0.414276659488678, 0.25434544682502747, -0.2746359407901764, 0.08997604250907898, 0.009954091161489487, -0.017247745767235756, 0.39329269528388977, 0.05614326521754265, -0.20752456784248352, -0.09904012084007263, -0.0020556729286909103, 0.2808196246623993, 0.3053596019744873, 0.3586886525154114, -0.3069494068622589, -0.17001214623451233, 0.00909481942653656, -0.06274741888046265, -0.14063286781311035, -0.18069104850292206, 0.48010802268981934, -0.11870644241571426, 0.25737664103507996, -0.1555955410003662, -0.02607836201786995, 0.15320636332035065, -0.17465755343437195, -0.024370137602090836, 0.7594636082649231, 0.00986736174672842, -0.3053728938102722, -0.06235511973500252, -0.49677082896232605, -0.6557117104530334, -0.5054524540901184, -0.07110008597373962, -0.14721238613128662, 0.10286980867385864, 0.07569395005702972, -0.028635457158088684, 0.06550848484039307, -0.5048430562019348, 0.00489097461104393, 0.17839881777763367, -0.01843598484992981, -0.030323127284646034, -0.4487183690071106, 0.2572932243347168, -0.3311729431152344, 0.3807833194732666, -0.04559169337153435, 0.017986146733164787, -0.14064344763755798, 0.11269878596067429, 0.26153939962387085, -0.12352900952100754, 0.16202962398529053, 0.008064519613981247, 0.010713983327150345, 0.1937723010778427, -0.15265460312366486, -0.002658272162079811, -0.06766565889120102, -0.15396863222122192, 0.16223886609077454, 0.36665835976600647, 0.21051400899887085, -0.3340776562690735, -0.0206137727946043, -0.36641770601272583, 0.17613115906715393, -0.15872380137443542, 0.30186793208122253, -0.025989839807152748, -0.08753478527069092, -0.31326383352279663, 0.04648203402757645, 0.1347436010837555, 0.5419655442237854, 0.10586763918399811, -0.006476204842329025, 0.049566369503736496, 0.1654442548751831, 0.2462301254272461, 0.2353479117155075, 0.5685101747512817, -0.2812582552433014, -0.10226032137870789, -0.09558238089084625, 0.16997797787189484, 0.09806136041879654, 0.315485417842865, 0.0730687826871872, -0.007116496562957764, -0.09596943110227585, -0.3180466294288635, -0.10726407915353775, 0.37945032119750977, 0.04904941841959953, 0.32086947560310364, 0.1861802488565445, -0.018229633569717407, 0.0914771556854248, 0.13715364038944244, -0.06026119738817215, -0.09307105839252472, -0.03356016427278519, 0.015179792419075966, 0.15167225897312164, 0.02723144367337227, -0.03952055424451828, -0.018093176186084747, 0.18679240345954895, -0.503101646900177, 0.6204192638397217, -0.0008969828486442566, 1.2612766027450562, 0.19324785470962524, 0.281647652387619, 0.07215730845928192, 0.08778201043605804, 0.24465163052082062, -0.5147621631622314, -0.11716803908348083, -0.20321041345596313, 0.23567110300064087, -0.04726593941450119, 0.4142565429210663, -0.06212327629327774, 0.044316306710243225, -0.31592392921447754, 0.17819218337535858, -0.1872992366552353, 0.19552384316921234, -0.03532681614160538, -0.0026292651891708374, 0.1325235813856125, -0.30063578486442566, 0.07334356009960175, 0.1304013878107071, -0.1342475861310959, 0.06915633380413055, 0.02874615043401718, -0.3014603853225708, -0.38588419556617737, -0.16885998845100403, -0.3367709517478943, 0.15404707193374634, -0.08421119302511215, -0.04879973083734512, 0.2964712679386139, -0.025512799620628357, -0.09340479969978333, 0.2621552050113678, 0.44804948568344116, 0.3557029664516449, -0.3563838005065918, 0.24100638926029205, 0.05860121175646782, 0.030322203412652016, 0.16753007471561432, 0.2808723747730255, 0.21033886075019836, -0.18324264883995056, 0.0490223690867424, -0.2144336700439453, -0.14763136208057404, -0.14439117908477783, -0.18993288278579712, -0.0150398388504982, 0.047472018748521805, -0.348237007856369, -0.10985440015792847, 0.136322483420372, -0.3647051751613617, -0.3153705596923828, 0.14734798669815063, -0.19266189634799957, -0.19674403965473175, -0.03206677734851837, 0.06463988870382309, -0.29079553484916687, -0.18412111699581146, 0.3845703899860382, 0.19326665997505188, -0.07763619720935822, 0.38967782258987427, -0.07957472652196884, -0.1772790551185608, -0.3628855049610138, -0.09672282636165619, 0.3678464889526367, -0.518848717212677, 0.2787388265132904, -0.03519246354699135, -0.2901856005191803, 0.27744975686073303, 0.7058489322662354, 0.0832633227109909, 0.3054125905036926, -0.13914209604263306, -0.35763731598854065, 0.0650562047958374, 0.08162052184343338, 0.010703280568122864, 0.11696839332580566, 0.3884274363517761, 0.48444101214408875, -0.0018327254801988602, -0.22692200541496277, -0.35125595331192017, 0.2829189896583557, -0.331157922744751, 0.2968033254146576, -0.1983088105916977, -0.05990491807460785, -0.10909668356180191, -0.10009771585464478, 0.029581798240542412, 0.29262107610702515, 0.07394053041934967, -0.22692105174064636, -0.3539007902145386, 0.1085514947772026, 0.21406716108322144, 0.04867080599069595, -0.07855301350355148, 0.03738816827535629, 0.09860247373580933, -0.18025442957878113, -0.045419275760650635, -0.09311098605394363, 0.036342497915029526, 0.4058871567249298, 0.17282432317733765, 0.18930020928382874, -0.43719667196273804, -0.08336242288351059, -0.11152654886245728, -0.08583302795886993, -0.18632374703884125, 0.05743832141160965, -0.16230516135692596, -0.13908641040325165, 0.016772489994764328, 0.02748851105570793, 0.06449134647846222, 0.3385535180568695, 0.23824915289878845, 0.13661113381385803, 0.01277262344956398, 0.20719671249389648, 0.187463641166687, 0.29761824011802673, -0.09233808517456055, -0.3938647210597992, 0.2880016267299652, 0.2218121886253357, -0.1930512934923172, -0.31965765357017517, -0.059345755726099014, -0.3006493151187897, -0.025853708386421204, -0.0057225301861763, 0.5143336057662964, -0.28406938910484314, 0.05300883203744888, 0.05429815500974655, 0.386144757270813, -0.03268349915742874, 0.2601010799407959, 0.3640582263469696, -0.021534785628318787, 0.08412335813045502, 0.11581043899059296, -0.052919868379831314, -0.2634907364845276, 0.4093249440193176, 0.04347880184650421, 0.480560839176178, 0.47352829575538635, 0.21811434626579285, 0.009259767830371857, 0.1857922524213791, 0.3121899366378784, 0.01234571635723114, 0.20014379918575287, 0.3483909070491791, 0.06536874175071716, 0.18775252997875214, -0.07651210576295853, -0.4006657600402832, -0.051473647356033325, 0.17143870890140533, -0.41958996653556824, 0.014512194320559502, -0.2791690528392792, -0.09214116632938385, -0.15630650520324707, -0.13745272159576416, -0.25334373116493225, 0.13107264041900635, 0.034560754895210266, -0.03069470077753067, -0.02642444521188736, -0.3715105950832367, -0.12133605033159256, -0.21621441841125488, 0.26715296506881714, -0.242628276348114, 0.40807995200157166, 0.11212960630655289, -0.09163446724414825, 0.0142587311565876, 0.18750086426734924, 0.28885793685913086, 0.24177922308444977, -0.08920235931873322, -0.031666260212659836, -0.0248272567987442, -0.10280509293079376, 0.16050602495670319, 0.29880326986312866, 0.2712012827396393, 0.06292199343442917, -0.013773161917924881, 0.043095484375953674, -0.17884288728237152, 0.29971274733543396, -0.13419149816036224, 0.18372151255607605, 0.15720602869987488, 0.12542076408863068, 0.13995079696178436, -0.2528885304927826, -0.26713404059410095, -0.24666741490364075, -0.37260180711746216, 0.022411111742258072, 0.0989459753036499, 0.013914387673139572, 0.13045862317085266, -0.21829605102539062, 0.10712029039859772, 0.1318560391664505, 0.6128299236297607, 0.3352696895599365, -0.13196253776550293, -0.19835133850574493, -0.2101861983537674, -0.38651496171951294, 0.2486068308353424, 0.14509393274784088, -0.2164655327796936, -0.055815912783145905, -0.16058547794818878, 0.022554919123649597, -0.0882062092423439, -0.3286339044570923, 0.28315699100494385, -0.14763639867305756, -0.2638457715511322, -0.46211719512939453, 0.31927648186683655, 0.1612534523010254, -0.13038799166679382, -0.002705805003643036, -0.009303320199251175, 0.1570315808057785, -0.03932936489582062, 0.08185040205717087, -0.09571918100118637, -0.5678966641426086, -0.052193690091371536, 0.24631847441196442, 0.1098824068903923, 0.33860135078430176, 0.029441028833389282, -0.29722440242767334, 0.15768027305603027, 0.030102655291557312, -0.26719391345977783, -0.08972136676311493, 0.061111755669116974, 0.23135046660900116, 0.2754617929458618, 0.07426948100328445, 0.30542123317718506, -0.12246231734752655, 0.10581513494253159, 0.1703939139842987, 0.20439791679382324, -0.27659741044044495, -0.015787068754434586, -0.08400355279445648, -0.06242016330361366, 0.10361246019601822, 0.5216323137283325, 0.005186643451452255, -0.09914225339889526, -0.3813595771789551, -0.5017683506011963, 0.46770086884498596, -0.40283286571502686, -0.23142088949680328, -0.00747139286249876, 0.1788385510444641, 0.5742582678794861, -0.07908159494400024, -0.6015173196792603, -0.08610203862190247, 0.2420419156551361, -0.002665352076292038, -0.4625408947467804, 0.2797016203403473, -0.055449988692998886, -0.09897173941135406, -0.014088926836848259, 0.36031898856163025, 0.4206547737121582, -0.09527486562728882, 0.12680493295192719, -0.24330474436283112 ]
https://github.com/huggingface/datasets/issues/486
Bookcorpus data contains pretokenized text
I'm afraid that I don't know how to obtain the original BookCorpus data. I believe this version came from an anonymous Google Drive link posted in another issue. Going through the raw text in this version, it's apparent that NLTK's TreebankWordTokenizer was applied on it (I gave some examples in my original post), followed by: `' '.join(tokens)` You can retrieve the tokenization by splitting on whitespace. You can then "detokenize" it with TreebankWordDetokenizer class of NLTK (though, as I suggested, use the fixed version in my repo). This will bring the text closer to its original form, but some steps of TreebankWordTokenizer are destructive, so it wouldn't be one-to-one. Something along the lines of the following should work: ``` treebank_detokenizer = nltk.tokenize.treebank.TreebankWordDetokenizer() db = nlp.load_dataset('bookcorpus', split=nlp.Split.TRAIN) db = db.map(lambda x: treebank_detokenizer.detokenize(x['text'].split())) ``` Regarding other issues beyond the above, I'm afraid that I can't help with that.
It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively. On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575
146
Bookcorpus data contains pretokenized text It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively. On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575 I'm afraid that I don't know how to obtain the original BookCorpus data. I believe this version came from an anonymous Google Drive link posted in another issue. Going through the raw text in this version, it's apparent that NLTK's TreebankWordTokenizer was applied on it (I gave some examples in my original post), followed by: `' '.join(tokens)` You can retrieve the tokenization by splitting on whitespace. You can then "detokenize" it with TreebankWordDetokenizer class of NLTK (though, as I suggested, use the fixed version in my repo). This will bring the text closer to its original form, but some steps of TreebankWordTokenizer are destructive, so it wouldn't be one-to-one. Something along the lines of the following should work: ``` treebank_detokenizer = nltk.tokenize.treebank.TreebankWordDetokenizer() db = nlp.load_dataset('bookcorpus', split=nlp.Split.TRAIN) db = db.map(lambda x: treebank_detokenizer.detokenize(x['text'].split())) ``` Regarding other issues beyond the above, I'm afraid that I can't help with that.
[ 0.05026862397789955, 0.3206242024898529, -0.0320778451859951, 0.285623699426651, -0.11093969643115997, -0.31413426995277405, 0.0659826397895813, 0.22920751571655273, -0.3773544132709503, 0.13208582997322083, -0.15040795505046844, 0.3783099353313446, 0.2091657966375351, -0.08471880853176117, -0.05394600331783295, 0.057601071894168854, 0.16126814484596252, 0.18276160955429077, 0.19952638447284698, -0.08467191457748413, -0.1270085871219635, 0.3466218113899231, 0.09686557948589325, 0.09852824360132217, -0.2559487521648407, -0.3039923310279846, -0.1721385419368744, 0.21064889430999756, -0.11309937387704849, -0.292122483253479, -0.051474135369062424, 0.22978931665420532, -0.0205984003841877, 0.33930504322052, -0.00010254686640109867, -0.2117825746536255, -0.0415513813495636, 0.024881629273295403, -0.24599722027778625, -0.04219120740890503, 0.33182838559150696, -0.05836578458547592, 0.31996390223503113, -0.3479759693145752, -0.3073752820491791, 0.006019117310643196, -0.15074458718299866, 0.09707888960838318, 0.28787678480148315, 0.2866069972515106, 0.256216824054718, 0.17280593514442444, -0.14794354140758514, 0.2911151349544525, 0.22935205698013306, -0.22855670750141144, -0.17920507490634918, 0.11545774340629578, 0.34042423963546753, 0.15769852697849274, -0.14799344539642334, 0.316850483417511, -0.11206163465976715, -0.09936071932315826, 0.010763939470052719, 0.0866045206785202, -0.046852707862854004, -0.17493002116680145, 0.1741349995136261, 0.14108653366565704, 0.22538623213768005, -0.292933851480484, -0.17603862285614014, -0.2555307447910309, 0.06768584996461868, -0.06270845979452133, 0.35750097036361694, 0.15976767241954803, 0.17970113456249237, 0.09915268421173096, -0.3076466917991638, -0.11840897798538208, 0.006706632673740387, 0.186180979013443, -0.1890384554862976, 0.35173821449279785, -0.02754582092165947, -0.05215686559677124, -0.040172029286623, -0.16718843579292297, -0.23028428852558136, 0.045776043087244034, -0.28395187854766846, 0.029054705053567886, -0.019479651004076004, -0.2148326188325882, -0.03297732025384903, 0.26335883140563965, 0.05835467576980591, 0.2064027488231659, 0.13820280134677887, 0.21175327897071838, -0.19379499554634094, 0.01046779751777649, 0.14194664359092712, 0.2237100452184677, 0.07222448289394379, 0.16001363098621368, 0.11117126047611237, 0.08936100453138351, -0.24149897694587708, -0.032087989151477814, -0.014601045288145542, -0.023748986423015594, 0.039670731872320175, 0.07287295162677765, -0.032636456191539764, -0.33739230036735535, 0.05465143918991089, 0.19935856759548187, -0.20551162958145142, 0.3033294677734375, -0.04166264086961746, 0.16585367918014526, -0.054979242384433746, -0.012056604027748108, 0.28289926052093506, 0.020698126405477524, -0.17563839256763458, -0.15950579941272736, -0.1973603069782257, 0.038061629980802536, -0.3233494460582733, 0.10835389047861099, 0.203152135014534, 0.003549756482243538, 0.14340147376060486, 0.05393791198730469, -0.18153251707553864, -0.043326880782842636, 0.005220688879489899, -0.19075174629688263, 0.12679068744182587, -0.07005347311496735, 0.033246804028749466, 0.16026823222637177, -0.09914666414260864, -0.1501462459564209, -0.20419807732105255, 0.020451512187719345, -0.30566295981407166, 0.1298176497220993, -0.363193154335022, 0.23846402764320374, -0.3120623230934143, -0.24691712856292725, -0.09512648731470108, 0.1402449607849121, 0.21681272983551025, -0.2126625031232834, 0.2082400918006897, 0.06451977789402008, -0.17969253659248352, -0.01393683161586523, -0.05321524292230606, 0.22236639261245728, -0.18918006122112274, -0.15397346019744873, -0.03877503052353859, 0.036866601556539536, 0.2192966341972351, 0.20449702441692352, -0.13982102274894714, 0.1316288709640503, 0.036863282322883606, 0.7144060730934143, 0.023887962102890015, -0.1102679967880249, -0.60063636302948, 0.2778588533401489, -0.1638280153274536, 0.07126347720623016, -0.1692008674144745, -0.22800330817699432, 0.15008051693439484, 0.10937022417783737, 0.011197350919246674, 0.32381898164749146, 0.47639065980911255, 0.19058848917484283, -0.5679761171340942, -0.27781662344932556, 0.23009327054023743, 0.0829976499080658, -0.13155311346054077, -0.015773415565490723, 0.15106944739818573, -0.003549847286194563, 0.07164165377616882, -0.14479854702949524, 0.20802181959152222, 0.4561247229576111, 0.19454573094844818, 0.27543315291404724, 0.13792240619659424, -0.10835954546928406, -0.0035314559936523438, -0.028095807880163193, -0.6072437763214111, 0.5558739304542542, -0.2705804109573364, -0.3538452386856079, -0.04361387714743614, -0.3035723865032196, -0.08489210903644562, -0.04260588064789772, 0.3206101357936859, 0.20686011016368866, -0.06360030174255371, 0.3263266980648041, 0.19552956521511078, -0.054672352969646454, 0.06109786778688431, 0.09851644933223724, -0.4020541310310364, 0.03883877396583557, -0.15729482471942902, -0.24166423082351685, -0.018853990361094475, 0.28596869111061096, 0.25767648220062256, 0.0964294821023941, -0.1627967655658722, 0.5122173428535461, -0.40679433941841125, 0.3954566717147827, -0.10297425836324692, 0.22497408092021942, 0.2453071027994156, 0.036854106932878494, 0.14256131649017334, 0.5524887442588806, 0.2463420033454895, -0.02025255560874939, -0.010889984667301178, 0.5778500437736511, 0.3246220648288727, -0.09023741632699966, 0.08854061365127563, -0.11603653430938721, 0.18455161154270172, -0.348337322473526, 0.051370203495025635, -0.16255274415016174, 0.12030208110809326, 0.2504858076572418, 0.18901678919792175, 0.1793300062417984, -0.209315687417984, 0.362484872341156, 0.4404110312461853, -0.06982415914535522, 0.14541155099868774, 0.17193394899368286, -0.31687888503074646, -0.29774990677833557, 0.018455002456903458, 0.16940182447433472, 0.01663622260093689, 0.13542726635932922, 0.046446144580841064, 0.07630942016839981, 0.11184744536876678, -0.2814238667488098, 0.2418968677520752, 0.08136753737926483, -0.2202330380678177, 0.1963643729686737, 0.39987191557884216, 0.18253618478775024, -0.4641738831996918, -0.06314471364021301, -0.02521626278758049, 0.16237124800682068, -0.17166924476623535, 0.32894662022590637, -0.33004486560821533, -0.6390396952629089, -0.1327873319387436, 0.05476659908890724, -0.11611610651016235, -0.198935866355896, 0.24697968363761902, 0.23475468158721924, -0.13799415528774261, 0.046546123921871185, 0.3245834410190582, 0.371358722448349, -0.24695640802383423, -0.14178919792175293, -0.2285061478614807, -0.3313557207584381, -0.6871262192726135, 0.18786044418811798, 0.11137671023607254, 0.08611448109149933, 0.037711720913648605, -0.14109279215335846, 0.016012050211429596, -0.35927751660346985, -0.30516767501831055, 0.0756584107875824, -0.21787025034427643, 0.06637050211429596, 0.06287968158721924, -0.09844915568828583, -0.3571200370788574, -0.26858797669410706, -0.024832572788000107, -0.19887638092041016, -0.16792207956314087, 0.08760949224233627, -0.21118713915348053, -0.27504807710647583, -0.3888929784297943, -0.4716969430446625, -0.021584143862128258, -0.12055949866771698, 0.3580132722854614, 0.2281883805990219, 0.04782858490943909, 0.2902408242225647, -0.24243924021720886, 0.10593795031309128, 0.3240020275115967, 0.30397555232048035, -0.3152657151222229, -0.32323023676872253, 0.3678920567035675, -0.08662423491477966, -0.42571765184402466, -0.039281174540519714, 0.09640449285507202, -0.024030331522226334, -0.009690890088677406, -0.3700828552246094, 0.17112039029598236, -0.2685030698776245, 0.08829224109649658, 0.07540766894817352, -0.031983114778995514, 0.375067800283432, 0.15378528833389282, -0.23898746073246002, -0.05232250690460205, -0.137786865234375, 0.25279271602630615, 0.28690090775489807, 0.36070752143859863, -0.2157278060913086, -0.04603094607591629, 0.09329120814800262, 0.10862692445516586, -0.2304871380329132, -0.12068723142147064, 0.3998339772224426, -0.12718436121940613, 0.10414047539234161, -0.1783701777458191, 0.011941252276301384, 0.004744711332023144, -0.2672375440597534, -0.058000124990940094, 0.7442845702171326, -0.056203268468379974, -0.38192325830459595, -0.01948573626577854, -0.4110424518585205, -0.6470888257026672, -0.4519217908382416, -0.05885983258485794, -0.13190793991088867, 0.015158560127019882, 0.08250750601291656, 0.006069570779800415, 0.10757040977478027, -0.43600547313690186, 0.0010973652824759483, 0.06724797189235687, -0.0700569674372673, 0.02345956489443779, -0.25297632813453674, 0.2467828392982483, -0.4831997752189636, 0.27088209986686707, -0.02809157222509384, 0.08483126014471054, 0.015999529510736465, 0.026065193116664886, 0.26591041684150696, -0.33064043521881104, 0.13585709035396576, 0.04928605258464813, 0.061658717691898346, 0.23795151710510254, -0.222012460231781, 0.06752745062112808, -0.09360837936401367, -0.2850675880908966, 0.026858564466238022, 0.30585411190986633, 0.20776362717151642, -0.43103504180908203, -0.010445788502693176, -0.25501853227615356, 0.1295173466205597, -0.20207364857196808, 0.3922216594219208, -0.055909235030412674, -0.2724832594394684, -0.4281620681285858, 0.08859656006097794, 0.08372625708580017, 0.5127245187759399, 0.0020349626429378986, 0.0375511534512043, 0.09145714342594147, 0.0699009969830513, 0.2828255593776703, 0.205146923661232, 0.5005566477775574, -0.3195250630378723, -0.02893509343266487, -0.0867309421300888, 0.22907789051532745, 0.1046164482831955, 0.3962078392505646, 0.1842540055513382, 0.06875921785831451, -0.09189756959676743, -0.2497081756591797, -0.10344517976045609, 0.4508921504020691, 0.09336001425981522, 0.2989104390144348, 0.10222950577735901, -0.05042554438114166, 0.05685434490442276, 0.09369611740112305, -0.039299145340919495, -0.052301790565252304, -0.08668331801891327, -0.06880099326372147, 0.2607877552509308, 0.0625123530626297, -0.12825503945350647, 0.016035735607147217, 0.16894342005252838, -0.529728353023529, 0.6358753442764282, 0.08177279680967331, 1.2664064168930054, 0.12598556280136108, 0.277436226606369, 0.12217618525028229, 0.10356639325618744, 0.24236351251602173, -0.4548495411872864, 0.013037849217653275, -0.3154570758342743, 0.19178250432014465, -0.05022583156824112, 0.3567129969596863, -0.17730170488357544, 0.18910224735736847, -0.29838329553604126, 0.15760207176208496, -0.1464826911687851, 0.09547337889671326, 0.10022782534360886, 0.201984241604805, 0.05555596202611923, -0.23592430353164673, 0.06226353719830513, 0.20067833364009857, -0.1212719976902008, 0.09996694326400757, -0.023081427440047264, -0.26446300745010376, -0.2481744885444641, -0.12995003163814545, -0.3037826418876648, 0.24920296669006348, -0.13997657597064972, 0.007250185124576092, 0.1680198758840561, -0.1097235381603241, -0.15102894604206085, 0.20885276794433594, 0.3138309717178345, 0.26178866624832153, -0.38332346081733704, 0.3085213005542755, 0.0770522728562355, -0.1476067751646042, 0.22040389478206635, 0.16088035702705383, 0.3945510685443878, -0.1488300859928131, -0.029407985508441925, -0.23541083931922913, 0.0630316287279129, -0.23445188999176025, -0.12901215255260468, -0.051968663930892944, -0.06920960545539856, -0.2831612527370453, -0.12947693467140198, 0.17222942411899567, -0.3984487056732178, -0.2890191376209259, 0.19570621848106384, -0.23532064259052277, -0.1418459117412567, -0.14305207133293152, 0.08835554122924805, -0.313304603099823, -0.17464008927345276, 0.4973691701889038, 0.27565670013427734, -0.06916137039661407, 0.41394349932670593, 0.008350174874067307, -0.15094763040542603, -0.3615686893463135, -0.22659513354301453, 0.2644389271736145, -0.29905593395233154, 0.18905404210090637, -0.12370041757822037, -0.32791954278945923, 0.25320544838905334, 0.6107335090637207, -0.06460637599229813, 0.32886168360710144, -0.12733404338359833, -0.34820351004600525, -0.038899101316928864, 0.07966969907283783, -0.032310839742422104, 0.19157367944717407, 0.3719384968280792, 0.3681502938270569, -0.09340298920869827, -0.14388564229011536, -0.4209376573562622, 0.24882861971855164, -0.3923135995864868, 0.23344562947750092, -0.13016225397586823, -0.08542098850011826, -0.04140916466712952, 0.01437310129404068, 0.10044816881418228, 0.3575175404548645, 0.07313436269760132, -0.31874969601631165, -0.2988664209842682, 0.0751722976565361, 0.16845691204071045, -0.009789379313588142, -0.18239575624465942, 0.06562837213277817, 0.020503368228673935, -0.14367973804473877, 0.12601298093795776, 0.03308191895484924, 0.10860905051231384, 0.36340010166168213, 0.10740341246128082, 0.20649468898773193, -0.2905067205429077, -0.23694151639938354, -0.0867217630147934, 0.015524491667747498, -0.1578545868396759, 0.1750102937221527, -0.1986188143491745, -0.053829699754714966, -0.18894846737384796, 0.0618179515004158, 0.17410796880722046, 0.5176964998245239, 0.26486796140670776, 0.1763465702533722, -0.03390859067440033, 0.02225392870604992, 0.18659435212612152, 0.2837527096271515, -0.221548393368721, -0.4664630889892578, 0.31472399830818176, 0.292829692363739, -0.17255815863609314, -0.23238001763820648, -0.09070365130901337, -0.5723100304603577, -0.0013676956295967102, 0.08929981291294098, 0.44839581847190857, -0.0740138441324234, -0.016209974884986877, 0.05175861716270447, 0.4621596932411194, -0.11486957967281342, 0.021964358165860176, 0.3347061574459076, -0.04684162139892578, 0.023996461182832718, 0.22133897244930267, 0.06552880257368088, -0.06836307793855667, 0.419732928276062, 0.07710140943527222, 0.3663994073867798, 0.40500199794769287, 0.26212120056152344, -0.019310519099235535, 0.1859985888004303, 0.23092196881771088, 0.09411191940307617, 0.20742270350456238, 0.30011168122291565, 0.04196666181087494, 0.15856041014194489, -0.2035876363515854, -0.2547900080680847, -0.08003871887922287, 0.32370802760124207, -0.3548715114593506, -0.10161259770393372, -0.27764731645584106, -0.21725711226463318, -0.22274181246757507, 0.08892153203487396, -0.17920026183128357, 0.12378216534852982, -0.04739326238632202, -0.006824120879173279, -0.08870077133178711, -0.33395957946777344, -0.09680979698896408, -0.25676631927490234, 0.34508341550827026, -0.3081311583518982, 0.335368812084198, -0.023998171091079712, -0.011740222573280334, 0.03449884057044983, 0.24440185725688934, 0.22802993655204773, 0.16606128215789795, -0.23681116104125977, 0.008466200903058052, -0.20227806270122528, -0.06999597698450089, 0.0739985853433609, 0.3090715706348419, 0.25603845715522766, -0.034952934831380844, 0.15196077525615692, 0.11864249408245087, -0.2021939754486084, 0.15697960555553436, -0.02055652067065239, 0.09069779515266418, 0.09127302467823029, -0.0068208277225494385, 0.06850031018257141, -0.1779576539993286, -0.27045634388923645, -0.29432761669158936, -0.21061784029006958, -0.10271504521369934, 0.11026018857955933, 0.045001666992902756, 0.2079072892665863, -0.22240589559078217, 0.1511448323726654, 0.23863224685192108, 0.5989447832107544, 0.389771431684494, 0.029096579179167747, -0.11354557424783707, -0.16625460982322693, -0.43770831823349, 0.2282617688179016, 0.1493014544248581, -0.24254007637500763, -0.03234609216451645, 0.023569641634821892, -0.004359081387519836, -0.025783952325582504, -0.4523445963859558, 0.3621739447116852, -0.16751053929328918, -0.1839088350534439, -0.3424542248249054, 0.30022063851356506, 0.12957952916622162, -0.10529123991727829, -0.04131476208567619, -0.16303151845932007, 0.0921325832605362, -0.06776309013366699, 0.1662813425064087, -0.1584758311510086, -0.49443554878234863, -0.09259086847305298, 0.2201494574546814, 0.19426053762435913, 0.3134516477584839, -0.012351170182228088, -0.34655749797821045, 0.05737360566854477, -0.048812124878168106, -0.07411361485719681, -0.2141723483800888, 0.007293034344911575, 0.14376531541347504, 0.23463916778564453, 0.2637172341346741, 0.3825134336948395, -0.10252809524536133, 0.23646299540996552, 0.18432651460170746, 0.15778109431266785, -0.3397215008735657, -0.06828127801418304, -0.07849670201539993, -0.0010872874408960342, -0.07238303869962692, 0.6917632222175598, 0.06420401483774185, 0.07764481008052826, -0.3717275857925415, -0.42264506220817566, 0.4227733612060547, -0.3316355347633362, -0.2500552833080292, 0.12231262773275375, 0.1393045037984848, 0.45611536502838135, -0.047673508524894714, -0.6378754377365112, -0.05867759883403778, 0.11061965674161911, -0.020351741462945938, -0.6066350936889648, 0.21900519728660583, -0.0008703125640749931, -0.08707501739263535, -0.1062999814748764, 0.28623896837234497, 0.4174636900424957, 0.013085214421153069, -0.02445642463862896, -0.17258162796497345 ]
https://github.com/huggingface/datasets/issues/486
Bookcorpus data contains pretokenized text
Ok I get it, that would be very cool indeed What kinds of patterns the detokenizer can't retrieve ?
It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively. On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575
19
Bookcorpus data contains pretokenized text It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively. On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575 Ok I get it, that would be very cool indeed What kinds of patterns the detokenizer can't retrieve ?
[ 0.060403477400541306, 0.21129071712493896, 0.004969406872987747, 0.467490017414093, -0.1865665763616562, -0.36426636576652527, 0.03084590844810009, 0.24870333075523376, -0.4858063757419586, 0.14312992990016937, -0.17512750625610352, 0.4655151665210724, 0.18964889645576477, -0.11763083934783936, -0.12698832154273987, 0.2603909373283386, 0.07077091187238693, 0.20801928639411926, 0.04441475495696068, -0.17152315378189087, -0.060596875846385956, 0.3185587525367737, 0.07350513339042664, -0.03431177884340286, -0.3340626060962677, -0.2613659203052521, -0.17230546474456787, 0.28711479902267456, -0.1565571278333664, -0.3885434567928314, 0.039465971291065216, 0.21475212275981903, -0.02960069850087166, 0.30922749638557434, -0.00011121357238152996, -0.12129317969083786, 0.026707369834184647, -0.1100270077586174, -0.18162719905376434, -0.09092444181442261, 0.12323886901140213, -0.01855441741645336, 0.3582617938518524, -0.5265983939170837, -0.28227734565734863, 0.22616788744926453, -0.14376060664653778, 0.1404651701450348, 0.28702712059020996, 0.41544586420059204, 0.18706108629703522, 0.264274001121521, -0.15320885181427002, 0.16881057620048523, 0.3264143466949463, -0.03863496333360672, -0.2777244746685028, 0.0013337573036551476, 0.38644301891326904, 0.3084566295146942, -0.16628143191337585, 0.24641412496566772, -0.14602236449718475, 0.016973983496427536, 0.10815440118312836, -0.049512650817632675, 0.15880480408668518, -0.23490872979164124, 0.2553264796733856, 0.34787997603416443, 0.25733762979507446, -0.038626305758953094, 0.00855758972465992, -0.23162850737571716, -0.13998061418533325, 0.20309153199195862, 0.2722410559654236, 0.1278526484966278, 0.08211635053157806, 0.15137700736522675, -0.10621488839387894, -0.07107855379581451, -0.04992751032114029, 0.12703002989292145, -0.1186058521270752, 0.3517429530620575, 0.0026375744491815567, -0.028552711009979248, -0.011561330407857895, 0.00669734925031662, -0.17643694579601288, 0.09589293599128723, -0.33481353521347046, 0.0043225898407399654, -0.00448477640748024, -0.23231704533100128, 0.09739330410957336, 0.2527463734149933, -0.045265648514032364, 0.4082642197608948, 0.3445373773574829, 0.29496604204177856, -0.1966412365436554, 0.07939167320728302, 0.0403270348906517, 0.1573096662759781, 0.05554366856813431, 0.2430897206068039, 0.16652777791023254, 0.010749628767371178, -0.3805959224700928, -0.07430101186037064, 0.03179221227765083, 0.018955379724502563, 0.003656189888715744, 0.06117703765630722, 0.037482887506484985, -0.48321154713630676, 0.16326604783535004, 0.185330331325531, -0.21368512511253357, 0.17845116555690765, 0.0564471036195755, 0.08981039375066757, -0.05153607577085495, 0.08803363144397736, 0.09184247255325317, -0.03306025266647339, -0.051797159016132355, -0.1990090161561966, -0.14955778419971466, -0.1054220050573349, -0.3613603413105011, 0.09291248023509979, 0.22372545301914215, 0.034840021282434464, 0.1418284922838211, -0.017350703477859497, -0.17252233624458313, 0.02164299041032791, 0.020219026133418083, -0.2706734538078308, 0.4571617543697357, -0.025643106549978256, -0.19101111590862274, 0.03240129351615906, 0.02368527464568615, -0.11795291304588318, -0.30310672521591187, -0.024606853723526, -0.30035698413848877, 0.13058753311634064, -0.2167605310678482, 0.18045100569725037, -0.3390057682991028, -0.12016035616397858, 0.004006810486316681, 0.22692199051380157, 0.11441574990749359, -0.13000427186489105, 0.2640652060508728, -0.00776754692196846, -0.11307588219642639, -0.08047780394554138, -0.15716907382011414, 0.28683483600616455, -0.2910604774951935, -0.13243338465690613, -0.07290833443403244, -0.0038547851145267487, 0.2922709286212921, 0.17374847829341888, -0.08038198947906494, 0.038521263748407364, 0.05710655450820923, 0.8963912725448608, -0.0338536873459816, -0.047475989907979965, -0.5306513905525208, 0.20302090048789978, -0.08350974321365356, 0.13096807897090912, 0.07836741954088211, -0.10082654654979706, 0.23336675763130188, -0.03870740160346031, -0.12694890797138214, 0.13470588624477386, 0.5446136593818665, -0.01599186658859253, -0.5618398189544678, -0.2940211296081543, 0.22032500803470612, 0.05233675613999367, 0.01980012096464634, 0.13366132974624634, 0.25314754247665405, -0.021461471915245056, 0.08308388292789459, -0.2307126224040985, 0.15612678229808807, 0.3136548399925232, 0.3593846261501312, 0.4066241383552551, 0.24946701526641846, -0.1262720823287964, 0.1709296554327011, 0.08558999747037888, -0.7975939512252808, 0.4854721426963806, -0.11004342138767242, -0.27660632133483887, 0.0316401869058609, -0.29769107699394226, -0.13905054330825806, -0.03087986633181572, 0.2581131160259247, 0.23489393293857574, 0.0465359203517437, 0.43428176641464233, 0.15887977182865143, 0.03908675163984299, 0.1868075579404831, 0.04124041274189949, -0.4006338119506836, 0.14470292627811432, -0.10059844702482224, -0.27813300490379333, -0.06288053095340729, 0.3709408938884735, 0.23605650663375854, 0.031216658651828766, -0.07162915170192719, 0.28905990719795227, -0.33187153935432434, 0.11245560646057129, -0.23242098093032837, 0.15949031710624695, 0.1141447201371193, 0.013715390115976334, -0.017276247963309288, 0.6242736577987671, 0.27982833981513977, -0.10081221163272858, 0.32389748096466064, 0.41589730978012085, 0.3776707053184509, 0.036236658692359924, -0.0003747120499610901, -0.17020146548748016, 0.12612265348434448, -0.3321745991706848, 0.04535887390375137, -0.213938370347023, 0.28070467710494995, 0.13638168573379517, 0.2800713777542114, 0.17330341041088104, -0.21034479141235352, 0.28346192836761475, 0.35000479221343994, -0.028606070205569267, 0.10284826159477234, 0.216785728931427, -0.240759938955307, -0.20149901509284973, 0.09187181293964386, 0.12664957344532013, 0.10897433012723923, 0.09980709105730057, 0.021566465497016907, 0.0722227394580841, 0.07221125066280365, -0.38650792837142944, 0.16873763501644135, 0.21889850497245789, -0.22398686408996582, 0.12964333593845367, 0.3718093931674957, 0.18927593529224396, -0.44811633229255676, -0.23088370263576508, -0.11169790476560593, 0.08050214499235153, 0.027371171861886978, 0.2684750556945801, -0.5430812239646912, -0.6649035811424255, 0.032566919922828674, 0.06562881171703339, -0.05010529235005379, -0.2324710637331009, 0.2761964797973633, 0.14724791049957275, -0.18757690489292145, -0.2033761739730835, 0.2906612455844879, 0.388358473777771, -0.27660515904426575, -0.08731696009635925, -0.4001850485801697, -0.47079581022262573, -0.6657468676567078, 0.15604820847511292, 0.18208098411560059, -0.024409644305706024, -0.016522178426384926, -0.17294222116470337, 0.06033509224653244, -0.12725093960762024, -0.27061209082603455, 0.06684821099042892, -0.004266470670700073, -0.07311102002859116, 0.07475122809410095, -0.14440687000751495, -0.40296077728271484, -0.2654492259025574, -0.0277513787150383, -0.15479129552841187, -0.23070158064365387, 0.28338757157325745, -0.2646172046661377, -0.31217893958091736, -0.3437872529029846, -0.45222511887550354, -0.15655162930488586, -0.1983981728553772, 0.5167416930198669, 0.3702396750450134, 0.04814668744802475, 0.4064434766769409, -0.3484726548194885, 0.16620196402072906, -0.007829178124666214, 0.42005640268325806, -0.2951851189136505, -0.24767114222049713, 0.4494696855545044, -0.09660820662975311, -0.4395465552806854, -0.007163211703300476, 0.09472058713436127, 0.10411408543586731, -0.08382124453783035, -0.4395298957824707, 0.23521561920642853, -0.4147757291793823, 0.22148188948631287, 0.09197892248630524, -0.005401695147156715, 0.41412353515625, 0.1176145076751709, -0.18549928069114685, -0.01849271170794964, 0.020054325461387634, 0.3892359137535095, 0.2683616578578949, 0.12201201170682907, -0.1243884339928627, -0.18524646759033203, 0.25295349955558777, -0.008048050105571747, -0.15440800786018372, -0.08348466455936432, 0.5354870557785034, -0.016632122918963432, 0.1233312338590622, -0.2894328236579895, 0.08084976673126221, 0.036582037806510925, -0.36346349120140076, -0.018132135272026062, 0.695267915725708, -0.03872041776776314, -0.4206860661506653, -0.1525154709815979, -0.3626706302165985, -0.39470377564430237, -0.5091349482536316, -0.09472262114286423, -0.08944626152515411, -0.11035802215337753, 0.1220049262046814, 0.1227143183350563, 0.14849403500556946, -0.3748818337917328, -0.029418842867016792, 0.02911403775215149, -0.05744273215532303, 0.10157230496406555, -0.28220465779304504, 0.14593853056430817, -0.5896182060241699, 0.21966120600700378, -0.11757440865039825, -0.056812018156051636, -0.10424713045358658, -0.013299036771059036, 0.25545835494995117, -0.15498989820480347, 0.05969724804162979, 0.08238382637500763, 0.15718825161457062, 0.35316941142082214, -0.4536789059638977, 0.046643808484077454, -0.15976472198963165, -0.3209367096424103, 0.014851190149784088, 0.22440102696418762, 0.19839388132095337, -0.40084585547447205, 0.21735990047454834, -0.47082972526550293, 0.2582637667655945, -0.10267025232315063, 0.3557087779045105, -0.052728403359651566, -0.184411883354187, -0.4908770024776459, 0.029622241854667664, 0.14420993626117706, 0.41827288269996643, 0.05075470358133316, 0.013121966272592545, -0.007545324042439461, 0.07411172240972519, 0.2711830139160156, 0.3257138729095459, 0.4172251522541046, -0.38028770685195923, -0.05060379579663277, 0.016239462420344353, 0.2785230576992035, -0.03868106007575989, 0.32406461238861084, 0.14298860728740692, -0.0012646988034248352, -0.1450144648551941, -0.2655176818370819, -0.22257301211357117, 0.429973304271698, 0.10318120568990707, 0.3510281443595886, 0.1296645998954773, -0.02889220416545868, 0.02755950391292572, 0.26132071018218994, -0.2476951777935028, -0.16476954519748688, -0.11220410466194153, -0.0371265634894371, 0.20961058139801025, 0.0568736307322979, -0.08626414090394974, -0.010133549571037292, 0.08337574452161789, -0.44780847430229187, 0.5934392213821411, 0.1470458060503006, 1.313754677772522, 0.2581233084201813, 0.37363341450691223, 0.12086699157953262, 0.06780453026294708, 0.11948275566101074, -0.40525275468826294, -0.013577396050095558, -0.2606823146343231, 0.1679506152868271, -0.08234437555074692, 0.2353164553642273, -0.1076757088303566, 0.2000226378440857, -0.406671404838562, 0.10322321206331253, -0.1559077799320221, 0.2173660397529602, 0.10107240080833435, -0.009281393140554428, 0.09067586809396744, -0.13099054992198944, 0.23001930117607117, 0.152474507689476, -0.005504719913005829, 0.1577053666114807, -0.04764470458030701, -0.36159151792526245, -0.31942039728164673, -0.08129125088453293, -0.2802688181400299, 0.18583065271377563, -0.14432083070278168, 0.11606886237859726, 0.30026015639305115, -0.08021974563598633, -0.24894428253173828, 0.2821158766746521, 0.3190881907939911, 0.2485014647245407, -0.46528786420822144, 0.12210217118263245, 0.06499981880187988, -0.13232693076133728, 0.3016611635684967, -0.02184990420937538, 0.40992721915245056, -0.21004214882850647, -0.031250886619091034, -0.08091557770967484, -0.045329369604587555, -0.25044143199920654, -0.2505161166191101, 0.21927878260612488, -0.10186509788036346, -0.08660174906253815, -0.1273266226053238, 0.16251713037490845, -0.5676117539405823, -0.2275831550359726, 0.1299806833267212, -0.1229790598154068, -0.257229745388031, 0.03258219733834267, 0.04395038262009621, -0.2969929277896881, -0.2175336480140686, 0.4929177165031433, 0.12799513339996338, 0.1437833458185196, 0.26595887541770935, 0.015505742281675339, -0.21188753843307495, -0.3199820816516876, -0.06464837491512299, 0.30730217695236206, -0.45133209228515625, 0.31425315141677856, -0.05293141305446625, -0.39125412702560425, 0.2202429324388504, 0.6401062607765198, -0.06483630836009979, 0.23569634556770325, -0.3432987928390503, -0.33448779582977295, -0.14284957945346832, 0.07231827080249786, -0.07598865032196045, 0.1215202808380127, 0.36019518971443176, 0.376755952835083, -0.13182060420513153, -0.10663019120693207, -0.35459449887275696, 0.2168208360671997, -0.4204818606376648, 0.2378806620836258, -0.37477678060531616, -0.20614966750144958, -0.149935781955719, 0.02592368796467781, 0.008120646700263023, 0.5068906545639038, 0.012905189767479897, -0.2600456774234772, -0.30139827728271484, 0.10992109775543213, 0.25882214307785034, -0.02344474010169506, -0.13581523299217224, 0.07197406888008118, 0.0002932213246822357, -0.1304662823677063, 0.14539387822151184, 0.15551823377609253, 0.060733336955308914, 0.3466279208660126, 0.1490342915058136, 0.11226247251033783, -0.4103754758834839, -0.015257563441991806, -0.16846990585327148, -0.048526108264923096, -0.23423652350902557, 0.12986350059509277, -0.24546809494495392, -0.09721427410840988, -0.09063099324703217, 0.16643166542053223, 0.1093844398856163, 0.32381781935691833, 0.24059346318244934, 0.21468761563301086, 0.049545202404260635, 0.04797207564115524, 0.091927669942379, 0.2279498279094696, 0.007284968160092831, -0.4190822243690491, 0.4563716650009155, 0.22055119276046753, -0.20720838010311127, -0.3670642077922821, 0.026496680453419685, -0.3992233872413635, 0.13423633575439453, 0.10303210467100143, 0.42568448185920715, -0.33077794313430786, 0.044363368302583694, 0.0788629874587059, 0.25856927037239075, -0.09780749678611755, 0.24585780501365662, 0.5149002075195312, 0.05799770727753639, 0.030702216550707817, 0.22236959636211395, -0.07397925853729248, -0.030496589839458466, 0.4679301977157593, 0.10135262459516525, 0.5709166526794434, 0.4925915002822876, 0.15822270512580872, 0.1754172146320343, 0.25029268860816956, 0.2761951982975006, 0.2544517517089844, 0.34637129306793213, 0.4401056468486786, -0.02772287279367447, 0.087746262550354, -0.1820441037416458, -0.18170686066150665, -0.1663600504398346, 0.11847476661205292, -0.40202146768569946, -0.01620473712682724, -0.20484915375709534, -0.23119443655014038, -0.1976763904094696, 0.014379549771547318, -0.23635098338127136, 0.2180003672838211, -0.10120278596878052, -0.019265256822109222, -0.10903845727443695, -0.1648949533700943, -0.05545344203710556, -0.34570980072021484, 0.31262943148612976, -0.23681573569774628, 0.2367742508649826, -0.028048887848854065, -0.049122296273708344, 0.16895639896392822, 0.16250096261501312, 0.1855437457561493, 0.26873287558555603, -0.1675349771976471, -0.009834089316427708, -0.16408468782901764, -0.20723697543144226, -0.007424071431159973, 0.43675827980041504, 0.18411093950271606, -0.07297573983669281, 0.20021378993988037, 0.03529047220945358, -0.1615733802318573, 0.27209538221359253, -0.054075855761766434, 0.09461809694766998, 0.03943845257163048, -0.04519840329885483, 0.12041990458965302, -0.2497222125530243, -0.1459217667579651, -0.18335288763046265, -0.2593670189380646, 0.03676712512969971, 0.027267958968877792, -0.026409590616822243, 0.15671893954277039, -0.18406175076961517, 0.09571898728609085, 0.09843894839286804, 0.5475630164146423, 0.3088117241859436, -0.09218589216470718, -0.0028419652953743935, -0.08476502448320389, -0.3762494623661041, 0.21237018704414368, 0.05692112818360329, -0.3298698365688324, -0.007231896743178368, -0.017450153827667236, 0.032890550792217255, 0.09727023541927338, -0.3886374235153198, 0.22366175055503845, -0.18856115639209747, -0.16681791841983795, -0.35745662450790405, 0.2894047498703003, 0.175338014960289, -0.1492222547531128, -0.03664577752351761, -0.2643887996673584, 0.13961276412010193, 0.06477008759975433, 0.1435920000076294, -0.09325818717479706, -0.6359952688217163, -0.10983893275260925, 0.3305193781852722, 0.18942420184612274, 0.3885256350040436, -0.026547729969024658, -0.2530363202095032, 0.047379665076732635, -0.06329213082790375, -0.0674690306186676, -0.09861192852258682, -0.11767207831144333, 0.16150112450122833, 0.2237381637096405, 0.007738037034869194, 0.40223950147628784, 0.005939403083175421, 0.3810946047306061, 0.19575747847557068, 0.3764239549636841, -0.29129549860954285, -0.0638091191649437, -0.2182694375514984, 0.03476300463080406, -0.06926613301038742, 0.5324451923370361, 0.06087355315685272, -0.22264418005943298, -0.27156487107276917, -0.42422735691070557, 0.5321034789085388, -0.33951571583747864, -0.25889259576797485, -0.09949643164873123, 0.012507729232311249, 0.39027920365333557, 0.01956554315984249, -0.44312331080436707, -0.18753430247306824, 0.1218615472316742, -0.0762581005692482, -0.5258951783180237, 0.1829119175672531, 0.07516485452651978, -0.13726064562797546, -0.16072699427604675, 0.2755139172077179, 0.446867436170578, 0.031640395522117615, 0.0359918512403965, -0.25503623485565186 ]
https://github.com/huggingface/datasets/issues/486
Bookcorpus data contains pretokenized text
The TreebankTokenizer makes some assumptions about whitespace, parentheses, quotation marks, etc. For instance, while tokenizing the following text: ``` Dwayne "The Rock" Johnson ``` will result in: ``` Dwayne `` The Rock '' Johnson ``` where the left and right quotation marks are turned into distinct symbols. Upon reconstruction, we can attach the left part to its token on the right, and respectively for the right part. However, the following texts would be tokenized exactly the same: ``` Dwayne " The Rock " Johnson Dwayne " The Rock" Johnson Dwayne " The Rock" Johnson ... ``` In the above examples, the detokenizer would correct these inputs into the canonical text ``` Dwayne "The Rock" Johnson ``` However, there are cases where there the solution cannot easily be inferred (at least without a true LM - this tokenizer is just a bunch of regexes). For instance, in cases where you have a fragment that contains the end of quote, but not its beginning, plus an accidental space: ``` ... and it sounds fantastic, " he said. ``` In the above case, the tokenizer would assume that the quotes refer to the next token, and so upon detokenization it will result in the following mistake: ``` ... and it sounds fantastic, "he said. ``` While these are all odd edge cases (the basic assumptions do make sense), in noisy data they can occur, which is why I mentioned that the detokenizer cannot restore the original perfectly.
It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively. On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575
244
Bookcorpus data contains pretokenized text It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively. On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575 The TreebankTokenizer makes some assumptions about whitespace, parentheses, quotation marks, etc. For instance, while tokenizing the following text: ``` Dwayne "The Rock" Johnson ``` will result in: ``` Dwayne `` The Rock '' Johnson ``` where the left and right quotation marks are turned into distinct symbols. Upon reconstruction, we can attach the left part to its token on the right, and respectively for the right part. However, the following texts would be tokenized exactly the same: ``` Dwayne " The Rock " Johnson Dwayne " The Rock" Johnson Dwayne " The Rock" Johnson ... ``` In the above examples, the detokenizer would correct these inputs into the canonical text ``` Dwayne "The Rock" Johnson ``` However, there are cases where there the solution cannot easily be inferred (at least without a true LM - this tokenizer is just a bunch of regexes). For instance, in cases where you have a fragment that contains the end of quote, but not its beginning, plus an accidental space: ``` ... and it sounds fantastic, " he said. ``` In the above case, the tokenizer would assume that the quotes refer to the next token, and so upon detokenization it will result in the following mistake: ``` ... and it sounds fantastic, "he said. ``` While these are all odd edge cases (the basic assumptions do make sense), in noisy data they can occur, which is why I mentioned that the detokenizer cannot restore the original perfectly.
[ -0.013096660375595093, 0.20901474356651306, -0.0026563741266727448, 0.31737464666366577, -0.19569377601146698, -0.2996238172054291, -0.017301153391599655, 0.20061887800693512, -0.4918515086174011, 0.0816212147474289, -0.1720980554819107, 0.2842743992805481, 0.16366784274578094, -0.23494058847427368, -0.10716688632965088, 0.21117104589939117, 0.17927294969558716, 0.28239497542381287, 0.22024640440940857, -0.1536702960729599, -0.18232814967632294, 0.2915746569633484, 0.19049639999866486, -0.0035161077976226807, -0.2633264362812042, -0.2643786072731018, -0.1785987764596939, 0.3562448024749756, -0.17621470987796783, -0.3386279344558716, -0.1300123631954193, 0.2864892780780792, -0.05676291137933731, 0.3584984242916107, -0.00010621248657116666, -0.2521671652793884, -0.023755177855491638, -0.08653685450553894, -0.3363085389137268, -0.07994623482227325, 0.26735207438468933, -0.06494016945362091, 0.2785300016403198, -0.37795209884643555, -0.3191954493522644, 0.09469015151262283, -0.15851043164730072, 0.020761117339134216, 0.29607367515563965, 0.23387284576892853, 0.21920926868915558, 0.18642175197601318, -0.11937315762042999, 0.25069689750671387, 0.3235378861427307, -0.10173438489437103, -0.17021220922470093, 0.04355353116989136, 0.37039706110954285, 0.32609760761260986, -0.16622358560562134, 0.31660571694374084, -0.15163925290107727, 0.028844907879829407, 0.062067661434412, -0.1197538748383522, 0.05882960930466652, -0.1836257129907608, 0.18406692147254944, 0.23144814372062683, 0.2577361762523651, -0.19107434153556824, -0.13883043825626373, -0.20629441738128662, -0.005512516014277935, -0.08669963479042053, 0.2901040315628052, 0.16266551613807678, 0.1006433516740799, 0.11696232855319977, -0.20360104739665985, -0.12542840838432312, 0.1330469250679016, 0.21781814098358154, -0.09394295513629913, 0.329118937253952, -0.09379830956459045, -0.031552866101264954, -0.06384773552417755, -0.06390313804149628, -0.2752232849597931, 0.07713218033313751, -0.3466399610042572, -0.04714212566614151, -0.07168203592300415, -0.22701436281204224, 0.009933631867170334, 0.31804928183555603, -0.0523344948887825, 0.2914668917655945, 0.16566139459609985, 0.20682066679000854, -0.1103692576289177, 0.0022941455245018005, 0.14288581907749176, 0.15206409990787506, 0.09510193020105362, 0.21862538158893585, 0.16162291169166565, 0.05471021309494972, -0.27441689372062683, -0.044989123940467834, 0.026206452399492264, 0.04095133766531944, 0.06731276214122772, 0.11758139729499817, -0.09452185034751892, -0.4092060923576355, 0.11048207432031631, 0.1627933830022812, -0.1755591630935669, 0.3513495922088623, 0.030497297644615173, 0.17116373777389526, -0.1282080113887787, 0.10949917137622833, 0.23338843882083893, 0.016087425872683525, -0.14643646776676178, -0.14570237696170807, -0.19493262469768524, -0.028243504464626312, -0.3139030337333679, 0.17498527467250824, 0.21655483543872833, -0.024981558322906494, 0.1767989695072174, 0.015994735062122345, -0.09004589915275574, -0.07799176871776581, -0.09373258799314499, -0.13904491066932678, 0.2256874442100525, -0.0904376357793808, 0.007301889359951019, 0.2255370318889618, -0.0670432597398758, -0.010952837765216827, -0.2728830873966217, 0.004836514592170715, -0.3288043737411499, 0.10009661316871643, -0.24060438573360443, 0.24921734631061554, -0.3356083631515503, -0.18338289856910706, -0.13363322615623474, 0.09677927196025848, 0.24956664443016052, -0.2057872712612152, 0.24614116549491882, 0.09526345133781433, -0.0845155417919159, 0.03977582976222038, -0.17006318271160126, 0.1673561930656433, -0.17649893462657928, -0.16623426973819733, -0.02444431185722351, 0.2212653011083603, 0.2749221622943878, 0.1089547872543335, -0.14209140837192535, -0.008602693676948547, 0.08135144412517548, 0.7183511257171631, -0.017417870461940765, -0.04568101093173027, -0.5037993788719177, 0.24383656680583954, -0.050325773656368256, 0.07348257303237915, -0.04984045773744583, -0.14787758886814117, 0.272196888923645, -0.0256968904286623, -0.12849867343902588, 0.16946722567081451, 0.5301480293273926, 0.1767309606075287, -0.5494858622550964, -0.20974189043045044, 0.16372165083885193, 0.061737384647130966, -0.18361791968345642, -0.027240879833698273, 0.21192045509815216, 0.1857927292585373, 0.04998162388801575, -0.23760798573493958, 0.25875532627105713, 0.39186835289001465, 0.3059110939502716, 0.300581157207489, 0.21359796822071075, -0.11329641193151474, 0.1385643184185028, -0.008468274027109146, -0.5750671625137329, 0.5548725128173828, -0.19225366413593292, -0.32506871223449707, 0.02558821067214012, -0.33089059591293335, -0.10807773470878601, -0.02028995007276535, 0.266399085521698, 0.2701421082019806, -0.02657495066523552, 0.22969599068164825, 0.10981932282447815, -0.08872935175895691, 0.01388772763311863, 0.14455130696296692, -0.28793346881866455, 0.009669866412878036, -0.11620823293924332, -0.24363309144973755, -0.09139470756053925, 0.38830381631851196, 0.3055763244628906, 0.009523035027086735, -0.12163013964891434, 0.588653028011322, -0.2743593454360962, 0.2116333246231079, -0.34220239520072937, 0.19673515856266022, 0.22662851214408875, 0.09102833271026611, 0.10458986461162567, 0.6204187870025635, 0.31346097588539124, -0.06195235252380371, 0.1241835281252861, 0.48470646142959595, 0.5381130576133728, -0.034802667796611786, 0.13576291501522064, -0.20976434648036957, 0.14076398313045502, -0.277854323387146, 0.0349249467253685, -0.16075162589550018, 0.18708738684654236, 0.22228893637657166, 0.2258041650056839, 0.2511375844478607, -0.17977356910705566, 0.3216654658317566, 0.3824760615825653, -0.1144578754901886, 0.12480218708515167, 0.18024799227714539, -0.32480353116989136, -0.3172589838504791, 0.06157544255256653, 0.0733921229839325, 0.025705628097057343, 0.13177205622196198, 0.07685165852308273, 0.04498141258955002, 0.10447680205106735, -0.3250136375427246, 0.21663400530815125, 0.09594587236642838, -0.3224858343601227, 0.15165174007415771, 0.3414754271507263, 0.17398518323898315, -0.4222622513771057, -0.08841460198163986, -0.03666065260767937, 0.09306355565786362, -0.14474646747112274, 0.2682282626628876, -0.4251960813999176, -0.6615484356880188, -0.0893082469701767, -0.06047534570097923, -0.1013159453868866, -0.24744752049446106, 0.36241042613983154, 0.21175231039524078, -0.1529855728149414, -0.01378023624420166, 0.2746291160583496, 0.34623193740844727, -0.30520766973495483, -0.14057238399982452, -0.13336056470870972, -0.36986759305000305, -0.6063695549964905, 0.17224682867527008, 0.0836457684636116, 0.0029907790012657642, -0.10886119306087494, -0.20524421334266663, 0.030443284660577774, -0.3144634962081909, -0.2817368805408478, 0.12597596645355225, -0.1332971155643463, -0.061875514686107635, 0.09892711043357849, -0.20750145614147186, -0.28024953603744507, -0.3656507134437561, -0.09157595038414001, -0.19991536438465118, -0.22075901925563812, 0.2158225029706955, -0.2644089162349701, -0.3948633372783661, -0.3731861412525177, -0.43360939621925354, 0.007393880747258663, -0.19188544154167175, 0.3253253698348999, 0.3003252148628235, 0.015803448855876923, 0.31787919998168945, -0.3654301166534424, 0.05701166018843651, 0.2947150766849518, 0.46804341673851013, -0.2738634943962097, -0.36970001459121704, 0.3797507882118225, -0.08700749278068542, -0.37375548481941223, 0.045130860060453415, 0.10641765594482422, 0.10119102895259857, 0.006233254447579384, -0.3513374328613281, 0.29754623770713806, -0.27874407172203064, 0.11822301149368286, 0.10038109123706818, 0.08571037650108337, 0.3026737570762634, 0.1589631885290146, -0.24221713840961456, -0.06510403752326965, 0.01823601871728897, 0.25004005432128906, 0.3025479018688202, 0.33338117599487305, -0.21542304754257202, -0.1298251450061798, 0.09651915729045868, 0.07749733328819275, -0.17456641793251038, -0.22445406019687653, 0.46462637186050415, -0.05608028173446655, 0.15198130905628204, -0.1868855059146881, 0.08254635334014893, 0.12569671869277954, -0.29740625619888306, -0.039785027503967285, 0.7535398006439209, 0.018460705876350403, -0.4435167610645294, -0.08140546083450317, -0.30717429518699646, -0.5265575051307678, -0.46496593952178955, -0.11818651854991913, -0.09138256311416626, -0.03627417981624603, 0.08996620774269104, 0.034815847873687744, 0.18962106108665466, -0.4391712248325348, -0.011933974921703339, 0.1453506052494049, -0.021861672401428223, 0.06755349785089493, -0.2452225238084793, 0.2796759605407715, -0.3746807277202606, 0.28672677278518677, -0.018887752667069435, -0.0390879288315773, 0.07341237366199493, -0.06934379041194916, 0.16417452692985535, -0.27022111415863037, -0.04705400764942169, 0.11292171478271484, 0.12111835181713104, 0.1840789020061493, -0.2732977271080017, 0.012005766853690147, -0.04599730670452118, -0.2533961236476898, 0.044019050896167755, 0.2973752021789551, 0.2621650695800781, -0.4981843829154968, 0.07837369292974472, -0.3845175802707672, 0.18324023485183716, -0.07793526351451874, 0.2510421574115753, -0.061387866735458374, -0.1280374377965927, -0.4437141418457031, 0.053030431270599365, 0.13996346294879913, 0.4243910312652588, 0.05375402420759201, -0.03064747527241707, 0.033870868384838104, 0.05210281163454056, 0.3206895887851715, 0.2767495810985565, 0.4186455309391022, -0.33497554063796997, -0.009322796016931534, -0.10588878393173218, 0.31032612919807434, 0.1369461566209793, 0.32335346937179565, 0.044508833438158035, 0.05661626160144806, -0.1323218047618866, -0.23818443715572357, -0.17039677500724792, 0.42610374093055725, 0.04248461872339249, 0.31487980484962463, 0.036455728113651276, -0.04543641209602356, 0.06171663850545883, 0.13129672408103943, -0.22177095711231232, -0.0027024587616324425, -0.03127578645944595, -0.14761099219322205, 0.14630311727523804, 0.10319370031356812, -0.07466301321983337, -0.00350344181060791, 0.22319239377975464, -0.47920987010002136, 0.5465054512023926, 0.024595722556114197, 1.2696267366409302, 0.3159300684928894, 0.32677626609802246, 0.04821578040719032, 0.1233338713645935, 0.20430888235569, -0.5028322339057922, 0.045036718249320984, -0.20490187406539917, 0.20785987377166748, -0.06927420943975449, 0.36853060126304626, -0.15078791975975037, 0.23972855508327484, -0.33117029070854187, 0.2369760274887085, -0.20884118974208832, 0.07606680691242218, -0.027517197653651237, 0.0753917545080185, 0.08343904465436935, -0.30840346217155457, 0.03700324892997742, 0.20598985254764557, -0.11297371983528137, 0.047051802277565, 0.0031081736087799072, -0.19536489248275757, -0.2502882480621338, -0.11697036027908325, -0.2816464900970459, 0.21711429953575134, -0.199219211935997, -0.02287333831191063, 0.24142508208751678, -0.023762710392475128, -0.1717052161693573, 0.12554366886615753, 0.221923828125, 0.31289082765579224, -0.2807665765285492, 0.18463696539402008, 0.18541884422302246, -0.04295888543128967, 0.2363811582326889, 0.08080867677927017, 0.4306321144104004, -0.135900616645813, 0.0029208138585090637, -0.15162143111228943, -0.020754113793373108, -0.2704407572746277, -0.022875100374221802, -0.033770106732845306, -0.05818402022123337, -0.24069558084011078, -0.08339148759841919, 0.2814619839191437, -0.4552399516105652, -0.27890267968177795, 0.17900052666664124, -0.2404048889875412, -0.22462257742881775, -0.12543326616287231, 0.03492392972111702, -0.3544527292251587, -0.2354164570569992, 0.4743593633174896, 0.0659203752875328, -0.030271511524915695, 0.2621466815471649, -0.04827645793557167, -0.2409835159778595, -0.309969037771225, -0.17867395281791687, 0.3008822500705719, -0.33263301849365234, 0.18766796588897705, -0.09161733835935593, -0.3863523602485657, 0.3450774848461151, 0.7153208255767822, 0.018365228548645973, 0.3967471420764923, -0.18480892479419708, -0.3267112076282501, -0.030163602903485298, 0.05707014352083206, -0.03810642287135124, 0.14398793876171112, 0.2901446521282196, 0.3565294146537781, -0.12296939641237259, -0.12836551666259766, -0.40499335527420044, 0.2145226150751114, -0.3362373113632202, 0.29102155566215515, -0.20690447092056274, -0.15219679474830627, -0.08055429905653, -0.022007498890161514, 0.0823572650551796, 0.41475045680999756, -0.020556282252073288, -0.2648278474807739, -0.3594224154949188, 0.08656439185142517, 0.2694784104824066, -0.03526621311903, -0.23334039747714996, 0.03583180531859398, 0.0373578742146492, -0.2132282257080078, 0.09540437161922455, 0.017412930727005005, 0.08472283184528351, 0.30563080310821533, 0.14442698657512665, 0.16715028882026672, -0.39269745349884033, -0.04629240930080414, -0.038390226662158966, 0.001279979944229126, -0.30281978845596313, 0.15120075643062592, -0.2068939208984375, -0.07108625769615173, -0.07492978125810623, 0.19250354170799255, 0.21824556589126587, 0.40098148584365845, 0.27190664410591125, 0.21863512694835663, 0.01639903336763382, 0.08902100473642349, 0.29617971181869507, 0.2918311357498169, -0.026205357164144516, -0.48605039715766907, 0.34940922260284424, 0.2846326529979706, -0.15903723239898682, -0.26437005400657654, -0.08357064425945282, -0.42743611335754395, 0.11943131685256958, 0.18452104926109314, 0.46985140442848206, -0.25578904151916504, 0.09344930201768875, 0.02611786127090454, 0.4078747034072876, -0.14226272702217102, 0.12019728124141693, 0.363989919424057, -0.035120945423841476, 0.05995964631438255, 0.26859772205352783, 0.03873249888420105, -0.05350268632173538, 0.40797334909439087, 0.08129195868968964, 0.47048595547676086, 0.5988805890083313, 0.25761109590530396, 0.05748184025287628, 0.2749412953853607, 0.3712727427482605, 0.09210525453090668, 0.29982608556747437, 0.346076101064682, -0.013369932770729065, 0.17802664637565613, -0.22484664618968964, -0.23356786370277405, -0.08088798075914383, 0.24836675822734833, -0.35715895891189575, -0.11919814348220825, -0.21300740540027618, -0.24458393454551697, -0.2593750059604645, -0.08405393362045288, -0.28892460465431213, 0.061946574598550797, -0.07908812165260315, -0.027467429637908936, -0.02944866567850113, -0.28328102827072144, -0.1334623098373413, -0.27668944001197815, 0.3692997097969055, -0.294342577457428, 0.30834516882896423, 0.07622065395116806, -0.053806692361831665, 0.17178262770175934, 0.09945937246084213, 0.18223334848880768, 0.2157621830701828, -0.2081112563610077, 0.0303519144654274, -0.12221719324588776, -0.13164742290973663, 0.034916095435619354, 0.33961883187294006, 0.10136203467845917, -0.09373269975185394, 0.11281031370162964, 0.11676402390003204, -0.23265014588832855, 0.20236706733703613, -0.06299328804016113, 0.1703379899263382, 0.030238840728998184, -0.01076381653547287, 0.04606742411851883, -0.19495117664337158, -0.2688468396663666, -0.17226183414459229, -0.25792092084884644, -0.028886381536722183, 0.1489238739013672, -0.10030911862850189, 0.17578914761543274, -0.22354403138160706, 0.14168433845043182, 0.21622374653816223, 0.5997512936592102, 0.26453158259391785, -0.10043171793222427, -0.04018396884202957, -0.12882483005523682, -0.40380266308784485, 0.23583649098873138, 0.21916547417640686, -0.37146955728530884, -0.09892262518405914, -0.024552833288908005, 0.08472040295600891, 0.12782281637191772, -0.4963516592979431, 0.3194311261177063, -0.22768867015838623, -0.1976349651813507, -0.34773874282836914, 0.30868610739707947, 0.13430668413639069, -0.17258696258068085, 0.030097857117652893, -0.18943792581558228, 0.017439547926187515, 0.07812542468309402, 0.15500140190124512, -0.08393194526433945, -0.6021877527236938, -0.034367188811302185, 0.19932042062282562, 0.12807850539684296, 0.2976607382297516, 0.05578097701072693, -0.35496580600738525, 0.025613775476813316, 0.0023075751960277557, -0.1479887068271637, -0.2636101245880127, -0.0502677857875824, 0.09625460207462311, 0.2191590666770935, 0.17507709562778473, 0.4257466197013855, -0.11789361387491226, 0.2641671299934387, 0.2795374393463135, 0.07786278426647186, -0.3049069046974182, -0.005479247309267521, -0.2572002708911896, -0.013413266278803349, -0.008337398990988731, 0.6562623381614685, 0.028846703469753265, -0.03798817843198776, -0.2665485739707947, -0.4903174936771393, 0.45485785603523254, -0.2702220380306244, -0.16782915592193604, -0.011059306561946869, 0.14265675842761993, 0.42601844668388367, -0.023669270798563957, -0.5835831761360168, -0.10321129858493805, 0.1385839432477951, -0.0550483837723732, -0.5959932208061218, 0.19883978366851807, -0.08291253447532654, -0.15920694172382355, -0.12376898527145386, 0.31691062450408936, 0.40447038412094116, -0.02475052885711193, 0.022682469338178635, -0.23337166011333466 ]
https://github.com/huggingface/datasets/issues/486
Bookcorpus data contains pretokenized text
To confirm, since this is preprocessed, this was not the exact version of the Book Corpus used to actually train the models described here (particularly Distilbert)? https://huggingface.co/datasets/bookcorpus Or does this preprocessing exactly match that of the papers?
It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively. On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575
37
Bookcorpus data contains pretokenized text It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively. On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575 To confirm, since this is preprocessed, this was not the exact version of the Book Corpus used to actually train the models described here (particularly Distilbert)? https://huggingface.co/datasets/bookcorpus Or does this preprocessing exactly match that of the papers?
[ 0.02966635301709175, 0.19844117760658264, -0.019381675869226456, 0.3028751015663147, -0.0800803005695343, -0.2216101884841919, 0.10674037039279938, 0.15238437056541443, -0.3669320046901703, -0.007890135049819946, -0.21422573924064636, 0.3167921006679535, 0.23267866671085358, -0.11113778501749039, 0.01920223981142044, 0.06974010169506073, 0.2531397044658661, 0.21380773186683655, 0.034925561398267746, -0.21718929708003998, -0.1444736123085022, 0.23662513494491577, 0.05639335513114929, 0.11521343886852264, -0.07269193232059479, -0.3140861392021179, -0.2279934138059616, 0.3609321117401123, -0.23321683704853058, -0.31834354996681213, 0.1385844498872757, 0.353336900472641, 0.04915761202573776, 0.47913846373558044, -0.00010636321530910209, -0.07331961393356323, -0.11080978810787201, -0.02161523513495922, -0.12691934406757355, 0.12788817286491394, 0.27024734020233154, 0.01590222306549549, 0.35855743288993835, -0.47761693596839905, -0.36926186084747314, 0.17812642455101013, -0.22406993806362152, 0.19181963801383972, 0.22112682461738586, 0.31045252084732056, 0.24629230797290802, 0.0918433889746666, 0.022230330854654312, 0.26748114824295044, 0.15965287387371063, -0.13389411568641663, -0.22985036671161652, 0.08771079778671265, 0.5446916222572327, 0.21634778380393982, -0.15530964732170105, 0.30559805035591125, -0.10811547935009003, -0.04444071277976036, 0.025358885526657104, -0.004912366159260273, 0.1899767518043518, -0.32259252667427063, 0.14900803565979004, 0.2697642147541046, 0.2777186930179596, -0.11947352439165115, -0.12947435677051544, -0.06019647419452667, -0.09229601919651031, 0.12777915596961975, 0.24243786931037903, 0.08906478434801102, 0.044150955975055695, 0.20800046622753143, -0.17432323098182678, -0.14358127117156982, -0.0047822073101997375, 0.09869147837162018, -0.14906591176986694, 0.3915139436721802, -0.0701671615242958, -0.06386695057153702, -0.0509069450199604, -0.06333117932081223, -0.3180636465549469, -0.03805367276072502, -0.21570554375648499, -0.03512245789170265, -0.007307711988687515, -0.21917593479156494, -0.0236477330327034, 0.40033742785453796, -0.10095009207725525, 0.211739182472229, 0.15763476490974426, 0.11874289065599442, -0.07703093439340591, -0.17939233779907227, 0.1342778503894806, 0.24845345318317413, 0.1051769107580185, 0.25070297718048096, 0.03628566116094589, 0.3239150941371918, -0.25629299879074097, 0.041214555501937866, -0.13057120144367218, -0.04805058613419533, -0.10395996272563934, -0.08611021190881729, -0.09727206081151962, -0.4910888969898224, 0.07034499198198318, 0.27727100253105164, 0.03333017975091934, 0.3170374035835266, 0.058379918336868286, 0.0865696519613266, -0.20929354429244995, 0.03721252828836441, 0.23226450383663177, 0.018362052738666534, -0.1913560926914215, -0.20687562227249146, -0.22370141744613647, 0.007776414975523949, -0.3948836624622345, 0.006246940232813358, 0.11774757504463196, -0.0474417619407177, 0.2660806477069855, -0.03839140012860298, -0.2094121128320694, -0.10352116823196411, -0.029000278562307358, -0.1996835619211197, 0.2668498456478119, 0.019140951335430145, -0.13669714331626892, 0.22831863164901733, 0.0493181049823761, -0.14780890941619873, -0.15075072646141052, 0.024691570550203323, -0.3962164521217346, 0.03232003375887871, -0.14932064712047577, 0.23261263966560364, -0.26019543409347534, -0.2491978108882904, -0.03446120768785477, 0.2813064157962799, 0.40733692049980164, -0.15096960961818695, 0.3375004529953003, -0.024391476064920425, -0.13852180540561676, 0.028136031702160835, 0.020994054153561592, 0.41357773542404175, -0.22823892533779144, -0.14589400589466095, -0.0486670583486557, 0.07284429669380188, 0.3752903640270233, 0.08832085877656937, -0.2509758770465851, 0.061755236238241196, 0.26966702938079834, 0.6624379754066467, 0.1866121143102646, -0.0779513567686081, -0.432542622089386, 0.21362315118312836, -0.013836178928613663, 0.21174485981464386, -0.19044440984725952, -0.17001791298389435, 0.18013015389442444, -0.05644374340772629, -0.0000732317566871643, 0.03597215190529823, 0.429082453250885, 0.17071747779846191, -0.6041296720504761, -0.309603750705719, 0.3253685235977173, 0.25136858224868774, -0.12554846704006195, -0.018941916525363922, 0.01845325529575348, 0.06256821751594543, 0.15163806080818176, -0.16763728857040405, 0.15700295567512512, 0.4770151376724243, 0.18046456575393677, 0.30321958661079407, 0.258503794670105, -0.005415596067905426, 0.23849549889564514, -0.002699241042137146, -0.4634101390838623, 0.6628252267837524, 0.03358133137226105, -0.25840961933135986, -0.06434266269207001, -0.2789318561553955, -0.17237061262130737, -0.24211883544921875, 0.2739941477775574, 0.05564163252711296, 0.0018354207277297974, 0.2835092544555664, 0.03826605901122093, -0.12103987485170364, -0.2297658771276474, 0.14046664535999298, -0.5065462589263916, -0.0698978379368782, -0.22864554822444916, -0.03948082774877548, -0.25638946890830994, 0.3594435751438141, 0.1786547303199768, 0.06261003017425537, -0.14870253205299377, 0.4577595591545105, -0.32803377509117126, 0.0037443414330482483, -0.032619230449199677, 0.25705090165138245, 0.191628098487854, -0.08377758413553238, 0.08403362333774567, 0.4635953903198242, 0.2697106897830963, -0.039253897964954376, 0.20762929320335388, 0.37622565031051636, 0.4181031882762909, 0.03583015128970146, 0.05664731562137604, -0.1161639466881752, 0.04479827731847763, -0.21191999316215515, 0.01155613549053669, -0.1377197802066803, 0.2113887220621109, 0.1241784542798996, 0.14860595762729645, 0.2420845329761505, -0.23174811899662018, 0.3815647065639496, 0.2590778172016144, -0.10923029482364655, 0.07980920374393463, 0.18372482061386108, -0.3506714701652527, -0.3496270179748535, -0.01546628586947918, 0.18069781363010406, 0.10218261182308197, 0.0754513069987297, 0.007575035095214844, 0.07660285383462906, -0.045309025794267654, -0.325996994972229, 0.2854868173599243, 0.15108004212379456, -0.2582566440105438, 0.04378410056233406, 0.23452499508857727, 0.201749786734581, -0.43860194087028503, -0.13849949836730957, -0.04662978649139404, 0.18678723275661469, -0.14898386597633362, 0.359169602394104, -0.28625959157943726, -0.43568047881126404, -0.1512419581413269, 0.04865109175443649, -0.009304109960794449, -0.1176728755235672, 0.29857856035232544, 0.12137417495250702, -0.09930987656116486, 0.056671060621738434, 0.14913569390773773, 0.5113168358802795, -0.23631303012371063, -0.06505666673183441, -0.12640514969825745, -0.2729805111885071, -0.7907337546348572, 0.1810276359319687, 0.10054682940244675, -0.01179641392081976, -0.14014790952205658, -0.37211400270462036, -0.147333025932312, -0.12024357169866562, -0.4255819022655487, 0.028755392879247665, -0.14453266561031342, 0.050294019281864166, 0.1586814820766449, -0.18263639509677887, -0.25838690996170044, -0.19306424260139465, -0.02411099709570408, -0.11139492690563202, -0.18106217682361603, 0.10344574600458145, -0.25220099091529846, -0.42187070846557617, -0.33651214838027954, -0.5817199349403381, -0.089388407766819, 0.023744985461235046, 0.2863691449165344, 0.23275120556354523, 0.007717199623584747, 0.4235413372516632, -0.19168323278427124, -0.014036448672413826, 0.14947299659252167, 0.45245540142059326, -0.2753589153289795, -0.29267480969429016, 0.39571839570999146, -0.03828176110982895, -0.4434628486633301, -0.15043431520462036, 0.07478562742471695, 0.08418954908847809, -0.04166337847709656, -0.3317263126373291, 0.1113501638174057, -0.3541257381439209, -0.0892997607588768, 0.03955303132534027, 0.08160766214132309, 0.2867448329925537, 0.031179089099168777, -0.21259444952011108, -0.1179545447230339, -0.014080177992582321, 0.5295310616493225, 0.23110315203666687, 0.2775556147098541, -0.3133271038532257, -0.06071106344461441, -0.08154156059026718, 0.0009644925594329834, -0.02112445794045925, -0.24092210829257965, 0.3181602954864502, 0.0015793424099683762, 0.06365863233804703, -0.16066989302635193, -0.03240591287612915, 0.08746162056922913, -0.23429125547409058, -0.14278161525726318, 0.67140793800354, -0.006317932158708572, -0.33023205399513245, -0.12654826045036316, -0.2998781204223633, -0.40625137090682983, -0.34366169571876526, -0.1450318545103073, -0.08187572658061981, 0.054249219596385956, 0.15945717692375183, 0.05657842010259628, 0.12851735949516296, -0.3857201933860779, 0.027949992567300797, 0.29118186235427856, -0.2177026867866516, 0.08442027121782303, -0.05570601671934128, 0.2240007072687149, -0.590064287185669, 0.11022024601697922, -0.11788460612297058, -0.006158850155770779, -0.007445789873600006, -0.019211212173104286, 0.22190892696380615, -0.2553708255290985, 0.11083802580833435, -0.09139054268598557, 0.019613947719335556, 0.18425489962100983, -0.41950154304504395, 0.04292979836463928, -0.17065002024173737, -0.3483814597129822, -0.016741249710321426, 0.2624344527721405, 0.21932408213615417, -0.3960910737514496, 0.02590225636959076, -0.209282785654068, -0.017424466088414192, -0.1271580457687378, 0.34165725111961365, -0.03764493018388748, -0.3000446557998657, -0.27756065130233765, 0.11998795717954636, 0.06438922882080078, 0.36767578125, -0.10241489857435226, -0.000558067113161087, 0.09761813282966614, 0.42719346284866333, 0.2771630883216858, 0.32572242617607117, 0.3162809908390045, -0.35224610567092896, 0.03342703357338905, -0.142274409532547, 0.2826840579509735, 0.2115708887577057, 0.3943045437335968, -0.02313460037112236, 0.06529685109853745, -0.05995535850524902, -0.2926264703273773, -0.3611949682235718, 0.35830312967300415, -0.0038999770767986774, 0.35760363936424255, 0.24196350574493408, -0.03571564704179764, 0.0211491659283638, 0.15093117952346802, 0.09776739031076431, 0.040765561163425446, -0.19224749505519867, -0.2394353300333023, 0.2312878966331482, 0.09022673964500427, -0.10458032786846161, -0.017160587012767792, 0.20922629535198212, -0.5008435249328613, 0.5596809983253479, 0.1802479326725006, 1.1709777116775513, 0.15516525506973267, 0.4108204245567322, 0.20560598373413086, 0.11320890486240387, 0.19776804745197296, -0.5068714022636414, -0.07355370372533798, -0.30776670575141907, 0.1728135645389557, -0.05553324520587921, 0.42353591322898865, -0.020059913396835327, 0.24934233725070953, -0.2679894268512726, 0.19926103949546814, -0.29639023542404175, 0.2366589456796646, 0.06456214934587479, -0.13353899121284485, 0.24054540693759918, -0.09451022744178772, 0.03635670617222786, 0.2081567794084549, 0.039781831204891205, 0.12890206277370453, 0.005734158679842949, -0.24613003432750702, -0.28904372453689575, -0.053196318447589874, -0.23104900121688843, 0.2454652190208435, -0.03318013250827789, 0.04940350353717804, 0.2079700529575348, -0.11068899184465408, 0.1575106829404831, 0.13824231922626495, 0.4718077778816223, 0.1743510663509369, -0.3955402374267578, 0.24779103696346283, 0.17857177555561066, -0.10375309735536575, 0.29845690727233887, 0.05121399089694023, 0.513137698173523, -0.0922020673751831, -0.02032838761806488, -0.22240585088729858, -0.10070624202489853, -0.14664581418037415, -0.09926290810108185, -0.024988926947116852, 0.13555237650871277, -0.4075528681278229, -0.008080694824457169, 0.33272987604141235, -0.3182331621646881, -0.319911926984787, 0.17429965734481812, -0.21922366321086884, -0.19992822408676147, 0.08487458527088165, 0.13210882246494293, -0.279599666595459, -0.1058831512928009, 0.35803744196891785, 0.2552376985549927, -0.003691505640745163, 0.42140015959739685, -0.047894664108753204, -0.23831963539123535, -0.38949304819107056, -0.36042293906211853, 0.5178191661834717, -0.4499705731868744, 0.2662642300128937, -0.07715132087469101, -0.3334921598434448, 0.3360655903816223, 0.7329291701316833, -0.014091528952121735, 0.19925883412361145, -0.3125976026058197, -0.2560107111930847, -0.06079040467739105, -0.032419562339782715, -0.044701192528009415, 0.17475153505802155, 0.2742789387702942, 0.31172341108322144, -0.1441117376089096, -0.118242546916008, -0.3982656002044678, 0.2483278512954712, -0.33599600195884705, 0.18908648192882538, -0.16311824321746826, -0.09821849316358566, -0.13376685976982117, 0.079632967710495, 0.04107607901096344, 0.2587137222290039, -0.024596109986305237, -0.2936258614063263, -0.32752344012260437, 0.06882816553115845, 0.22361251711845398, -0.21424104273319244, -0.07237544655799866, -0.033540990203619, -0.1770561784505844, -0.11233867704868317, -0.0055615827441215515, -0.0022379159927368164, 0.23315584659576416, 0.22660386562347412, 0.06251250952482224, 0.11658288538455963, -0.4161810278892517, -0.06622873991727829, -0.12307761609554291, -0.07746590673923492, -0.1583366096019745, 0.07272462546825409, -0.21338774263858795, -0.12092778086662292, -0.1550258994102478, 0.3376777172088623, 0.16406136751174927, 0.4420243203639984, 0.3606298863887787, 0.06936448812484741, 0.11093612015247345, 0.1151176244020462, 0.2891577184200287, 0.318185418844223, -0.11428182572126389, -0.4719851016998291, 0.3100073039531708, 0.28043708205223083, -0.18178507685661316, -0.35932859778404236, 0.0826411247253418, -0.5128973722457886, 0.00001769140362739563, 0.15912720561027527, 0.4305146634578705, -0.11772355437278748, 0.1454421877861023, 0.050566889345645905, 0.33638453483581543, 0.023916058242321014, 0.20044799149036407, 0.4209343492984772, 0.06404168903827667, 0.10140331089496613, 0.23561978340148926, -0.03352821245789528, -0.08715366572141647, 0.4698129892349243, 0.17505216598510742, 0.5409210324287415, 0.4480160176753998, 0.22503076493740082, -0.010108299553394318, 0.12496690452098846, 0.4259963631629944, 0.02216380089521408, 0.19731822609901428, 0.29062774777412415, -0.09262251853942871, 0.2536989748477936, -0.3461318016052246, -0.31602832674980164, -0.34149616956710815, 0.23134607076644897, -0.44012609124183655, -0.21243228018283844, -0.2084488868713379, -0.27068719267845154, -0.08487392216920853, -0.011378264054656029, -0.257059246301651, 0.20903031527996063, 0.07661028206348419, -0.2347414344549179, -0.1947256177663803, -0.4968023896217346, -0.1306171715259552, -0.13317206501960754, 0.4301261305809021, -0.1013002023100853, 0.401523232460022, 0.1030493900179863, -0.1810588836669922, 0.02902909740805626, 0.31750738620758057, 0.08729222416877747, 0.19633927941322327, 0.013362030498683453, -0.18890322744846344, 0.043125737458467484, -0.11915285140275955, 0.07238341867923737, 0.31792762875556946, 0.21344204246997833, -0.07537554204463959, 0.16784122586250305, 0.0687645822763443, -0.14671015739440918, 0.2038973867893219, -0.04122881963849068, 0.24318264424800873, 0.09988278150558472, 0.027864322066307068, 0.18575316667556763, -0.05402028188109398, -0.3054500222206116, -0.1481999158859253, -0.2258318066596985, 0.05095983296632767, 0.2498958557844162, -0.008111321367323399, 0.18631583452224731, -0.28637734055519104, 0.13359588384628296, 0.13577090203762054, 0.6176182627677917, 0.2860668897628784, -0.14270523190498352, -0.1430058628320694, -0.15105247497558594, -0.3049139380455017, 0.303199827671051, 0.18568533658981323, -0.3401731252670288, -0.03256961330771446, -0.07873761653900146, 0.055583059787750244, -0.06719186156988144, -0.33889323472976685, 0.17118366062641144, -0.055458903312683105, -0.11620916426181793, -0.2399941384792328, 0.3016035258769989, -0.10269643366336823, -0.025643365457654, -0.021299773827195168, -0.08383338898420334, 0.09584542363882065, 0.03701160103082657, 0.10947080701589584, -0.038137923926115036, -0.4150056838989258, 0.006134476512670517, -0.01403038203716278, 0.16819551587104797, 0.27285173535346985, -0.053894177079200745, -0.27415767312049866, 0.06485015153884888, -0.06405958533287048, -0.12241517007350922, -0.24821792542934418, -0.10938099771738052, 0.017588969320058823, 0.19009296596050262, 0.16692183911800385, 0.28372690081596375, -0.06471869349479675, 0.04517093300819397, 0.3557335138320923, 0.04904444143176079, -0.3398382365703583, -0.09067688882350922, -0.0053015947341918945, -0.1250109076499939, 0.23420217633247375, 0.6557598114013672, 0.03752722591161728, -0.0007672365754842758, -0.2772578001022339, -0.5082756876945496, 0.5603698492050171, -0.30090251564979553, -0.1876617819070816, -0.0994003415107727, 0.10738419741392136, 0.41172802448272705, -0.0702463686466217, -0.70566326379776, -0.18182706832885742, 0.12577639520168304, -0.1075638011097908, -0.5928041338920593, 0.30883869528770447, -0.05926581099629402, -0.06102900952100754, -0.15928401052951813, 0.2810198664665222, 0.13272228837013245, 0.03177829831838608, -0.016077645123004913, -0.2202397733926773 ]
https://github.com/huggingface/datasets/issues/486
Bookcorpus data contains pretokenized text
I believe these are just artifacts of this particular source. It might be better to crawl it again, or use another preprocessed source, as found here: https://github.com/soskek/bookcorpus
It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively. On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575
27
Bookcorpus data contains pretokenized text It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively. On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575 I believe these are just artifacts of this particular source. It might be better to crawl it again, or use another preprocessed source, as found here: https://github.com/soskek/bookcorpus
[ 0.04481719061732292, 0.14664530754089355, -0.06266246736049652, 0.31894588470458984, -0.04812820255756378, -0.280326783657074, -0.0028582625091075897, 0.2543202042579651, -0.4264054000377655, 0.09119799733161926, -0.13541805744171143, 0.34925052523612976, 0.2933692932128906, -0.11513452976942062, -0.0640329122543335, 0.20691928267478943, 0.2553398907184601, 0.24403102695941925, 0.08130291849374771, -0.19285911321640015, -0.1757330745458603, 0.32189977169036865, 0.13537456095218658, 0.12956129014492035, -0.19148875772953033, -0.23169854283332825, -0.13648544251918793, 0.2966260015964508, -0.16972877085208893, -0.3685365915298462, 0.04186706990003586, 0.2373155653476715, -0.04574622958898544, 0.4200373888015747, -0.0001042966905515641, -0.19997480511665344, -0.008552014827728271, -0.0008110329508781433, -0.2220434695482254, 0.03964673727750778, 0.2418956160545349, -0.104712575674057, 0.33165666460990906, -0.4221564531326294, -0.20508798956871033, 0.0990934818983078, -0.19218795001506805, 0.11557184159755707, 0.13364975154399872, 0.29844003915786743, 0.2685510516166687, 0.24999594688415527, -0.14472927153110504, 0.24059002101421356, 0.2765302360057831, -0.10522885620594025, -0.2680329382419586, 0.1541522592306137, 0.48081493377685547, 0.287172794342041, -0.11767113953828812, 0.3252736032009125, -0.14838235080242157, -0.05509931221604347, 0.013953275978565216, -0.06827937811613083, 0.1332593858242035, -0.20303794741630554, 0.24491411447525024, 0.17434728145599365, 0.19781538844108582, -0.1787818968296051, -0.03741587698459625, -0.077318474650383, -0.031780049204826355, -0.030536271631717682, 0.33312612771987915, 0.19728177785873413, 0.19773174822330475, 0.08572352677583694, -0.22891242802143097, -0.10920882970094681, 0.03441059589385986, 0.17875546216964722, -0.06967303156852722, 0.3172323703765869, -0.12697285413742065, -0.013959541916847229, -0.07269333302974701, -0.10282960534095764, -0.20771364867687225, 0.029177797958254814, -0.398316353559494, 0.00029422156512737274, -0.031008411198854446, -0.13437587022781372, -0.05261200666427612, 0.35326969623565674, -0.029496824368834496, 0.1897881180047989, 0.1584513634443283, 0.22608718276023865, -0.17979775369167328, -0.018014296889305115, 0.12037330865859985, 0.13797086477279663, 0.11278259754180908, 0.24111343920230865, 0.0682666152715683, 0.06403733789920807, -0.22536928951740265, -0.03511530160903931, 0.03948884457349777, 0.014292309992015362, 0.02542906627058983, 0.03479137644171715, -0.07370266318321228, -0.4883914589881897, 0.1922173798084259, 0.2083526998758316, -0.09553471207618713, 0.29458582401275635, 0.016627930104732513, 0.08612984418869019, -0.10780598223209381, 0.0290515199303627, 0.21027612686157227, 0.013879016041755676, -0.18058180809020996, -0.1609921157360077, -0.19739417731761932, -0.08339516818523407, -0.31672680377960205, 0.09785296022891998, 0.1498274952173233, -0.06536664068698883, 0.21540617942810059, 0.06164585053920746, -0.1452438235282898, -0.08339138329029083, 0.013253210112452507, -0.22872403264045715, 0.2126794308423996, -0.008122529834508896, -0.03530826419591904, 0.26136869192123413, 0.013131806626915932, 0.00745721161365509, -0.188608318567276, 0.043692879378795624, -0.37026992440223694, 0.07491585612297058, -0.2921425700187683, 0.2618963420391083, -0.268196165561676, -0.2209358513355255, -0.09183462709188461, 0.052898209542036057, 0.29580849409103394, -0.22761636972427368, 0.31871989369392395, 0.003758341073989868, -0.09614178538322449, 0.013930916786193848, -0.21068333089351654, 0.24040812253952026, -0.13928481936454773, -0.14979365468025208, -0.02912709303200245, 0.012515950947999954, 0.27616602182388306, 0.10727272927761078, -0.21232812106609344, -0.008644036948680878, 0.10438760370016098, 0.7325617074966431, 0.04333598166704178, -0.0778367817401886, -0.4785206913948059, 0.2862701117992401, -0.039253972470760345, 0.07498326152563095, -0.1802370250225067, -0.12135957181453705, 0.1312684714794159, 0.04491264373064041, -0.140611469745636, 0.1511683613061905, 0.6003323793411255, 0.23462897539138794, -0.6044290661811829, -0.24239502847194672, 0.2666240632534027, 0.13189691305160522, -0.13019362092018127, -0.03827356547117233, 0.1433160901069641, -0.008330186828970909, 0.09496745467185974, -0.2224235236644745, 0.24345286190509796, 0.461753785610199, 0.19766788184642792, 0.33307182788848877, 0.23231349885463715, -0.07871496677398682, 0.19709688425064087, -0.0055603645741939545, -0.6133115291595459, 0.6089824438095093, -0.05900050699710846, -0.2922890782356262, -0.07878515124320984, -0.3615645170211792, -0.1525612622499466, -0.011526796966791153, 0.29706355929374695, 0.1812446117401123, -0.11708670854568481, 0.38266363739967346, 0.16915559768676758, -0.026945067569613457, -0.05331552028656006, 0.02364153414964676, -0.33622825145721436, 0.04310320317745209, -0.16817821562290192, -0.19707515835762024, -0.1390398144721985, 0.2937304377555847, 0.2984577417373657, 0.09362230449914932, -0.26252254843711853, 0.5021240711212158, -0.4160383641719818, 0.2467000037431717, -0.1689237356185913, 0.17198941111564636, 0.23221828043460846, -0.009271934628486633, 0.11168164014816284, 0.5388676524162292, 0.3786887526512146, -0.052974067628383636, 0.21592861413955688, 0.3990843892097473, 0.448269248008728, -0.015596412122249603, 0.043059393763542175, -0.1934475600719452, 0.14708831906318665, -0.2783163785934448, 0.11914486438035965, -0.12884655594825745, 0.2308615744113922, 0.09096258878707886, 0.09451213479042053, 0.20287421345710754, -0.19537723064422607, 0.3303438723087311, 0.3287518322467804, -0.09278281033039093, 0.09695542603731155, 0.21615073084831238, -0.2830914258956909, -0.25760990381240845, 0.011452808044850826, 0.13333310186862946, 0.08475571125745773, 0.05527130514383316, -0.033093083649873734, 0.0875941812992096, 0.0944514125585556, -0.3282386362552643, 0.23303650319576263, 0.14549830555915833, -0.24362023174762726, 0.06427695602178574, 0.2809624969959259, 0.20064176619052887, -0.47327667474746704, -0.09615611284971237, -0.05938947945833206, 0.1325768530368805, -0.15903641283512115, 0.33218464255332947, -0.32098862528800964, -0.6278656721115112, -0.0989343449473381, 0.03896399587392807, -0.14982300996780396, -0.2108941376209259, 0.268970251083374, 0.1829664707183838, -0.11704744398593903, -0.024206796661019325, 0.18557950854301453, 0.3524070382118225, -0.26609569787979126, -0.04163854569196701, -0.1509881317615509, -0.3491876721382141, -0.7120476365089417, 0.19180431962013245, 0.07327012717723846, 0.07964704185724258, -0.0410742312669754, -0.26227155327796936, 0.04356195777654648, -0.3028930127620697, -0.30586519837379456, 0.0577235147356987, -0.16974326968193054, -0.08107040822505951, 0.027201242744922638, -0.15414029359817505, -0.37811100482940674, -0.27365806698799133, -0.0023804698139429092, -0.16365279257297516, -0.1409662663936615, 0.1180325299501419, -0.2873583137989044, -0.4336164593696594, -0.42673763632774353, -0.45363083481788635, -0.05308713763952255, -0.14166989922523499, 0.3145367503166199, 0.2562342584133148, 0.06328433007001877, 0.33537888526916504, -0.32957372069358826, 0.09301158785820007, 0.2780512273311615, 0.40020495653152466, -0.3519272804260254, -0.4099270701408386, 0.3584457039833069, -0.1365950107574463, -0.452892541885376, -0.023564379662275314, 0.14849436283111572, 0.08348734676837921, -0.06923120468854904, -0.49102067947387695, 0.20696482062339783, -0.28858479857444763, 0.011330783367156982, 0.11985259503126144, 0.026762830093503, 0.24222874641418457, 0.10119879990816116, -0.2581205368041992, -0.06392882764339447, -0.09577152132987976, 0.29601767659187317, 0.2582879364490509, 0.29779142141342163, -0.256422221660614, -0.2517821490764618, -0.031834181398153305, -0.026069216430187225, -0.10210280120372772, -0.14419829845428467, 0.45615488290786743, -0.044237375259399414, 0.18772220611572266, -0.16154125332832336, -0.03918799012899399, 0.03142990916967392, -0.3032158613204956, -0.015089577063918114, 0.7271090745925903, 0.02126438170671463, -0.42895254492759705, -0.03323467820882797, -0.3933042287826538, -0.5735094547271729, -0.43119606375694275, -0.10014872252941132, -0.043298862874507904, 0.09390419721603394, 0.12363587319850922, -0.01784214749932289, 0.12077552080154419, -0.4445357024669647, 0.032754093408584595, 0.15320947766304016, -0.18364447355270386, 0.04786708578467369, -0.3420097827911377, 0.16876421868801117, -0.3717231750488281, 0.25530779361724854, 0.005262034013867378, -0.0013445829972624779, -0.04516534134745598, 0.0586257129907608, 0.26028138399124146, -0.21680954098701477, 0.10640881955623627, 0.010295327752828598, 0.06532371789216995, 0.2743200957775116, -0.3003888428211212, -0.002709336578845978, -0.12286844849586487, -0.24209339916706085, 0.15312081575393677, 0.39136821031570435, 0.1850695163011551, -0.312265545129776, 0.08356651663780212, -0.33299723267555237, 0.1282995194196701, -0.16802889108657837, 0.318005234003067, -0.059293974190950394, -0.21246793866157532, -0.3637367784976959, 0.06564763188362122, 0.053069330751895905, 0.4273862838745117, -0.11156690865755081, -0.045570772141218185, 0.033048149198293686, 0.23244312405586243, 0.27903449535369873, 0.22803664207458496, 0.4632430672645569, -0.271353155374527, 0.03242399916052818, -0.1344941109418869, 0.18270239233970642, 0.11381629854440689, 0.411404550075531, 0.06951701641082764, 0.07343976199626923, -0.08523011952638626, -0.40198227763175964, -0.28593283891677856, 0.39703238010406494, 0.16085727512836456, 0.29175227880477905, 0.2020859569311142, -0.03278353065252304, 0.08002021163702011, 0.13238339126110077, -0.005835834890604019, -0.014479332603514194, -0.09854204952716827, -0.08092992752790451, 0.18799671530723572, 0.08584597706794739, -0.06526124477386475, -0.013062156736850739, 0.15612971782684326, -0.39439746737480164, 0.49948209524154663, 0.009107068181037903, 1.2245502471923828, 0.1914118528366089, 0.24731412529945374, 0.14750948548316956, 0.08288305997848511, 0.10945799201726913, -0.5010131001472473, -0.04627764970064163, -0.30800580978393555, 0.1485581248998642, -0.05973123759031296, 0.36750757694244385, -0.09616618603467941, 0.11769995838403702, -0.33583730459213257, 0.14137709140777588, -0.2380870282649994, 0.09401705861091614, 0.02267538383603096, -0.02108202502131462, 0.10314643383026123, -0.1923019289970398, 0.10858911275863647, 0.23640257120132446, -0.06543261557817459, 0.10716816782951355, 0.019892148673534393, -0.26306724548339844, -0.2315971851348877, -0.14306668937206268, -0.290202796459198, 0.2394072413444519, 0.050356507301330566, 0.052996326237916946, 0.2848300635814667, -0.00009916722774505615, -0.1121586263179779, 0.1071247011423111, 0.30685245990753174, 0.24903199076652527, -0.36177513003349304, 0.27334168553352356, 0.20502310991287231, -0.10658034682273865, 0.2486870437860489, 0.1970617026090622, 0.32493820786476135, -0.13911250233650208, -0.12755641341209412, -0.16754630208015442, -0.045894622802734375, -0.15576456487178802, -0.05186446011066437, 0.021432682871818542, 0.04637206345796585, -0.33361104130744934, -0.07673558592796326, 0.240132138133049, -0.3926164209842682, -0.2628386616706848, 0.1982802450656891, -0.19902755320072174, -0.15920691192150116, -0.06917718797922134, 0.12852752208709717, -0.34418171644210815, -0.19760094583034515, 0.4220584034919739, 0.2594241499900818, -0.11409665644168854, 0.2870842218399048, -0.03806483373045921, -0.24504433572292328, -0.34794917702674866, -0.15907247364521027, 0.26924973726272583, -0.46618643403053284, 0.18229669332504272, -0.07213927060365677, -0.3561226725578308, 0.2949451804161072, 0.6725556254386902, -0.08048184216022491, 0.3593224585056305, -0.2375115603208542, -0.35370418429374695, 0.01649169810116291, -0.05833420157432556, -0.023060079663991928, 0.12353703379631042, 0.36055147647857666, 0.22877924144268036, -0.04499877616763115, -0.12311795353889465, -0.40924620628356934, 0.30931442975997925, -0.40300506353378296, 0.25770241022109985, -0.19851256906986237, -0.08553668111562729, -0.10815458744764328, -0.02068694867193699, 0.0510033518075943, 0.3924664258956909, -0.054748065769672394, -0.317229688167572, -0.35060393810272217, 0.07255680114030838, 0.23481592535972595, -0.14168427884578705, -0.17931826412677765, 0.011717330664396286, 0.07723353803157806, -0.10792020708322525, 0.04826870933175087, 0.06595314294099808, 0.04200145974755287, 0.33060672879219055, 0.057971980422735214, 0.15907377004623413, -0.3384091854095459, -0.025763191282749176, -0.07764090597629547, 0.00798286497592926, -0.14628835022449493, 0.0645456537604332, -0.2116556018590927, -0.07690683752298355, -0.11161269247531891, 0.13022947311401367, 0.14510414004325867, 0.4586123824119568, 0.27833080291748047, 0.11299991607666016, 0.16906186938285828, 0.10069098323583603, 0.14603905379772186, 0.2584131956100464, -0.20159342885017395, -0.48265546560287476, 0.29021379351615906, 0.29976651072502136, -0.09478458017110825, -0.37482303380966187, -0.059817757457494736, -0.48529765009880066, -0.02211015112698078, 0.06297595798969269, 0.47740110754966736, -0.29485830664634705, 0.2269383817911148, 0.09356673806905746, 0.3392336368560791, -0.0036566797643899918, 0.205005943775177, 0.31654655933380127, -0.08294401317834854, 0.018457822501659393, 0.18930155038833618, -0.02243366464972496, -0.15353623032569885, 0.4744420051574707, 0.12426522374153137, 0.42534080147743225, 0.5266221165657043, 0.26776543259620667, -0.04960250109434128, 0.21884293854236603, 0.3550834357738495, 0.011900648474693298, 0.1806086003780365, 0.3160148859024048, 0.09881963580846786, 0.2178560197353363, -0.2701137661933899, -0.32229506969451904, -0.17847757041454315, 0.17918169498443604, -0.3917810618877411, -0.044102516025304794, -0.1466638445854187, -0.15040861070156097, -0.13104593753814697, -0.030556069687008858, -0.2464742362499237, 0.1594870388507843, 0.035263270139694214, -0.07787974178791046, -0.14394305646419525, -0.3957456052303314, -0.15193083882331848, -0.1954064965248108, 0.3066391944885254, -0.1740107536315918, 0.28783610463142395, 0.08502650260925293, -0.0048500895500183105, 0.08270357549190521, 0.21192552149295807, 0.19770321249961853, 0.29643750190734863, -0.11730171740055084, -0.03884049132466316, -0.03742898255586624, -0.09877489507198334, 0.1580723524093628, 0.2782497704029083, 0.18830479681491852, -0.029579583555459976, 0.1161462813615799, 0.11480438709259033, -0.20723631978034973, 0.20417755842208862, -0.12793326377868652, 0.24164219200611115, 0.1335807591676712, 0.11907899379730225, 0.01958594098687172, -0.12605279684066772, -0.30835264921188354, -0.22944721579551697, -0.2746400535106659, 0.0670800730586052, 0.207734614610672, -0.051918718963861465, 0.18568366765975952, -0.28756287693977356, 0.1513199508190155, 0.14110158383846283, 0.6888763904571533, 0.27810177206993103, -0.0805143341422081, -0.08426498621702194, -0.15215429663658142, -0.30641549825668335, 0.33244359493255615, 0.11669276654720306, -0.27549999952316284, -0.025246836245059967, -0.08771108835935593, -0.0442938432097435, 0.012835092842578888, -0.38221246004104614, 0.22716191411018372, -0.12777787446975708, -0.28407275676727295, -0.35978642106056213, 0.32369711995124817, 0.13038939237594604, -0.1133335530757904, 0.02094806730747223, -0.15345293283462524, 0.15447351336479187, -0.0766034796833992, 0.17966550588607788, -0.10366515815258026, -0.5949349403381348, -0.10305517911911011, 0.15790247917175293, 0.19363844394683838, 0.29183557629585266, 0.002518013119697571, -0.2615238130092621, 0.04349643737077713, 0.0204940028488636, -0.2243359237909317, -0.04267081618309021, 0.027820829302072525, 0.16929610073566437, 0.1975400149822235, 0.13636530935764313, 0.3651089370250702, -0.07190613448619843, 0.26663070917129517, 0.2732153534889221, 0.19293080270290375, -0.18488676846027374, -0.08913339674472809, -0.16581377387046814, -0.05254393815994263, -0.029556095600128174, 0.5959390997886658, 0.08992566913366318, -0.007215533405542374, -0.25571614503860474, -0.48059719800949097, 0.5174423456192017, -0.2570450007915497, -0.1837044358253479, -0.029739391058683395, 0.15268611907958984, 0.47758641839027405, -0.0879557803273201, -0.6576770544052124, -0.1006937026977539, 0.14194659888744354, -0.06590292602777481, -0.5773206949234009, 0.29505857825279236, -0.1587454378604889, -0.09399468451738358, -0.07574373483657837, 0.29283642768859863, 0.33422452211380005, -0.002744590863585472, 0.12615332007408142, -0.18221813440322876 ]
https://github.com/huggingface/datasets/issues/486
Bookcorpus data contains pretokenized text
Yes actually the BookCorpus on hugginface is based on [this](https://github.com/soskek/bookcorpus/issues/24#issuecomment-643933352). And I kind of regret naming it as "BookCorpus" instead of something like "BookCorpusLike". But there is a good news ! @shawwn has replicated BookCorpus in his way, and also provided a link to download the plain text files. see [here](https://github.com/soskek/bookcorpus/issues/27). There is chance we can have a "OpenBookCorpus" !
It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively. On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575
60
Bookcorpus data contains pretokenized text It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively. On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575 Yes actually the BookCorpus on hugginface is based on [this](https://github.com/soskek/bookcorpus/issues/24#issuecomment-643933352). And I kind of regret naming it as "BookCorpus" instead of something like "BookCorpusLike". But there is a good news ! @shawwn has replicated BookCorpus in his way, and also provided a link to download the plain text files. see [here](https://github.com/soskek/bookcorpus/issues/27). There is chance we can have a "OpenBookCorpus" !
[ 0.09384424984455109, -0.12072550505399704, 0.005747310817241669, 0.34772568941116333, -0.045050181448459625, -0.25748488306999207, 0.023120246827602386, 0.19239658117294312, -0.34666383266448975, 0.12043897807598114, -0.2318464070558548, 0.04984473064541817, 0.25082650780677795, 0.2811334729194641, 0.06336415559053421, 0.1325375884771347, 0.2879846394062042, 0.14309532940387726, -0.07848699390888214, -0.15987259149551392, -0.21737000346183777, 0.43361344933509827, 0.11664678156375885, 0.1677413284778595, -0.0388910137116909, -0.12684231996536255, -0.20033511519432068, 0.40011724829673767, -0.20780257880687714, -0.2791159152984619, 0.1527039259672165, 0.22518926858901978, -0.10807190090417862, 0.40118202567100525, -0.00010668210597941652, -0.15935589373111725, -0.12299741804599762, -0.01554039679467678, -0.32296261191368103, 0.026789546012878418, 0.3888087570667267, -0.10114578157663345, 0.18330694735050201, -0.3243456184864044, -0.34086114168167114, 0.180223748087883, -0.1350855529308319, 0.0620265007019043, 0.12491493672132492, 0.10396849364042282, 0.21362422406673431, 0.3086169958114624, 0.03719935938715935, 0.22255867719650269, 0.06962471455335617, -0.03756296634674072, -0.35279151797294617, 0.2101958841085434, 0.49129071831703186, 0.22052496671676636, -0.06334885209798813, 0.2900332808494568, -0.12769679725170135, -0.11187277734279633, 0.03939947858452797, -0.022118795663118362, 0.2333824336528778, -0.1150670200586319, 0.20393815636634827, 0.3186211884021759, -0.01940971612930298, -0.25996658205986023, -0.10645711421966553, -0.1943797469139099, -0.07609932869672775, -0.07260027527809143, 0.33643418550491333, 0.2846119701862335, 0.22536958754062653, 0.09688358753919601, -0.3741986155509949, -0.22774717211723328, 0.08119337260723114, 0.13138028979301453, -0.04054679721593857, 0.036164525896310806, -0.18460215628147125, -0.023798733949661255, 0.07444475591182709, 0.013464881107211113, -0.4897998869419098, 0.02694067172706127, -0.30420950055122375, 0.03506564348936081, -0.09749738872051239, -0.14983487129211426, -0.05388770252466202, 0.7010742425918579, 0.07469833642244339, 0.06936666369438171, 0.05307167395949364, 0.10787433385848999, -0.3359385132789612, -0.026554323732852936, 0.08207416534423828, 0.10076582431793213, 0.13695088028907776, 0.015608339570462704, 0.06788528710603714, 0.18433819711208344, -0.04530918970704079, 0.03628129884600639, 0.04384109005331993, 0.10206050425767899, -0.16392773389816284, -0.020934030413627625, -0.0724797248840332, -0.3996295928955078, 0.12687508761882782, 0.14158177375793457, -0.13349802792072296, 0.36422035098075867, 0.08795846998691559, 0.007630482316017151, -0.25823721289634705, -0.021072138100862503, 0.2964797019958496, -0.010280907154083252, -0.21360965073108673, -0.22177791595458984, -0.16154806315898895, -0.09587132930755615, -0.3191130459308624, 0.2264869064092636, 0.14647164940834045, -0.3952268958091736, 0.18586264550685883, 0.044476479291915894, -0.30815184116363525, -0.018563516438007355, -0.005698193795979023, -0.09028682112693787, 0.11936406791210175, -0.14109927415847778, -0.04667993634939194, 0.19803297519683838, 0.033311471343040466, 0.060427650809288025, -0.23042866587638855, -0.07019991427659988, -0.2735207676887512, 0.012078572064638138, -0.30843064188957214, 0.20194163918495178, -0.33406585454940796, -0.1973952203989029, -0.2077859342098236, 0.0061913952231407166, 0.13897627592086792, -0.247793048620224, 0.3023013174533844, 0.13501042127609253, -0.17678327858448029, 0.08769185841083527, -0.14001056551933289, 0.2940981388092041, -0.060479577630758286, -0.24479860067367554, 0.22544515132904053, 0.03172767162322998, 0.15185491740703583, 0.10321033000946045, -0.1967698335647583, -0.048069067299366, 0.06978166848421097, 0.6613718271255493, -0.14486649632453918, -0.181784525513649, -0.41489261388778687, 0.16827788949012756, -0.11203703284263611, 0.15986743569374084, -0.11146155744791031, -0.16830191016197205, -0.04646524041891098, 0.006390605587512255, -0.26775431632995605, 0.1824944019317627, 0.5105290412902832, 0.2303023636341095, -0.5244213938713074, -0.3914470970630646, 0.2984265685081482, 0.1271817684173584, -0.20670197904109955, -0.05312178283929825, -0.0020294636487960815, 0.014040076173841953, 0.1554817259311676, -0.21456345915794373, 0.16349278390407562, 0.3532801866531372, 0.20835718512535095, 0.39665794372558594, 0.2448129802942276, -0.0061977319419384, 0.14572523534297943, -0.008949249982833862, -0.6330729722976685, 0.5566460490226746, 0.14239737391471863, -0.37344563007354736, -0.10404123365879059, -0.34790435433387756, -0.09156227111816406, -0.10566431283950806, 0.2224729359149933, 0.18752537667751312, 0.05597781762480736, 0.2985990047454834, 0.15249207615852356, 0.20285925269126892, 0.004321357235312462, 0.14458422362804413, -0.6349838972091675, -0.034097932279109955, -0.15268070995807648, -0.03189670294523239, -0.12223497778177261, 0.31368160247802734, 0.19595003128051758, 0.0005565553437918425, -0.08890450745820999, 0.5558329820632935, -0.5106657147407532, 0.20364373922348022, -0.19128736853599548, 0.2680993974208832, 0.27607759833335876, 0.19861537218093872, 0.08125099539756775, 0.47499218583106995, 0.3740745186805725, 0.0067571550607681274, 0.12199686467647552, 0.3797285556793213, 0.48390692472457886, -0.05987078696489334, 0.10765810310840607, -0.1555408388376236, 0.035183198750019073, -0.28178438544273376, 0.0004007462412118912, 0.03692731261253357, 0.26317358016967773, -0.11146396398544312, 0.2040322870016098, 0.18610550463199615, -0.3016118109226227, 0.257678359746933, 0.4086398184299469, -0.13206897675991058, 0.08948574960231781, 0.15428240597248077, -0.3398972451686859, -0.17769268155097961, 0.034641530364751816, -0.12654361128807068, 0.018901318311691284, 0.06604410707950592, -0.07931344211101532, 0.14902780950069427, 0.1661366969347, -0.2313830703496933, 0.312162846326828, 0.1072961688041687, -0.24849556386470795, -0.03384121507406235, 0.21632897853851318, 0.15735270082950592, -0.41629064083099365, -0.06989601999521255, -0.1470279097557068, -0.06632927805185318, -0.1102837324142456, 0.28804895281791687, -0.2646137773990631, -0.574052095413208, -0.14064224064350128, -0.0019318042322993279, -0.15946462750434875, -0.11749383062124252, 0.3127175569534302, 0.38628000020980835, -0.0017168521881103516, -0.149128720164299, 0.13771063089370728, 0.49586790800094604, -0.35879138112068176, -0.09333233535289764, -0.12121129035949707, -0.22031180560588837, -0.6400430798530579, 0.1287747472524643, 0.07952415943145752, -0.13608050346374512, 0.01715364120900631, -0.29818880558013916, 0.010307814925909042, -0.3268692195415497, -0.34569448232650757, 0.13764479756355286, -0.2445940524339676, -0.19886420667171478, 0.0822715163230896, -0.1902075856924057, -0.40839219093322754, -0.19231396913528442, 0.01817985437810421, -0.1432580053806305, -0.27587372064590454, 0.1623869091272354, -0.18349997699260712, -0.3752995729446411, -0.38848957419395447, -0.35728445649147034, -0.05057622492313385, -0.1736678183078766, 0.5705419182777405, 0.19189630448818207, -0.006513290107250214, 0.5147130489349365, -0.36838939785957336, 0.1496383398771286, 0.27252909541130066, 0.3947566747665405, -0.3479953408241272, -0.46853452920913696, 0.3225313127040863, -0.0649406686425209, -0.4029201865196228, -0.010929808020591736, 0.09890542924404144, 0.04549162834882736, -0.09203118085861206, -0.40739017724990845, 0.09232586622238159, -0.21198374032974243, -0.015826515853405, 0.13611873984336853, 0.10056095570325851, 0.44594424962997437, 0.12662523984909058, -0.21175803244113922, -0.0010536760091781616, -0.20756025612354279, 0.3247990608215332, 0.34197065234184265, 0.3122248947620392, -0.1932131052017212, -0.3087391257286072, 0.037781525403261185, -0.12085661292076111, -0.06838192045688629, -0.046939168125391006, 0.42553970217704773, -0.018344959244132042, 0.2324010282754898, -0.2110125720500946, -0.09434012323617935, -0.01448573637753725, -0.38018855452537537, 0.03138274326920509, 0.6702120304107666, 0.198555588722229, -0.1369227170944214, -0.05997709929943085, -0.368966668844223, -0.6417492628097534, -0.44246047735214233, -0.22465230524539948, 0.17102555930614471, 0.06531543284654617, 0.05939633771777153, 0.06535270065069199, 0.1679583042860031, -0.452316552400589, 0.21609380841255188, 0.18803438544273376, -0.11697689443826675, 0.15367689728736877, -0.104358971118927, 0.16650772094726562, -0.35017454624176025, 0.3285301625728607, -0.12172537297010422, -0.13492043316364288, -0.09237541258335114, -0.08291859179735184, 0.252740740776062, -0.2515934109687805, 0.3255561590194702, 0.10498308390378952, 0.053980544209480286, 0.1783379167318344, -0.46262624859809875, -0.03151332959532738, -0.1001412570476532, -0.13856706023216248, 0.13590188324451447, 0.46577686071395874, 0.28520524501800537, -0.46526750922203064, 0.05719982832670212, -0.20357005298137665, 0.23590920865535736, -0.1319597363471985, 0.2894381880760193, -0.07654143869876862, -0.2617916762828827, -0.35900965332984924, 0.07140827924013138, -0.002796446904540062, 0.46585965156555176, -0.06146311014890671, 0.0881539136171341, 0.042353447526693344, 0.07599379122257233, 0.3209172487258911, 0.1585341840982437, 0.3812200725078583, -0.18160398304462433, 0.10327975451946259, -0.007786553353071213, 0.25824174284935, -0.019494345411658287, 0.4296952784061432, 0.2879311442375183, 0.033429842442274094, -0.08159355819225311, -0.28957033157348633, -0.31192901730537415, 0.4915578365325928, 0.17871631681919098, 0.18901248276233673, 0.3776542544364929, -0.08367642760276794, -0.05049023777246475, 0.11218220740556717, -0.0673038437962532, 0.05490276217460632, -0.19720810651779175, 0.028463834896683693, 0.06903259456157684, 0.10820969939231873, -0.07777178287506104, 0.09533077478408813, 0.35474276542663574, -0.3693224787712097, 0.3874291181564331, -0.13260418176651, 1.2466691732406616, 0.06103258207440376, 0.327317476272583, 0.23240283131599426, 0.2237139195203781, 0.051791731268167496, -0.4737738370895386, 0.09598589688539505, -0.3381628394126892, 0.21837717294692993, -0.09652022272348404, 0.4169151782989502, -0.1062442734837532, 0.040630534291267395, -0.24325641989707947, 0.196356862783432, -0.09302902221679688, 0.19049780070781708, -0.09169945865869522, -0.007228754460811615, -0.12024406343698502, -0.3448234498500824, 0.009720017202198505, 0.19114364683628082, 0.0145951546728611, 0.3203701376914978, 0.1459578573703766, -0.3317466974258423, -0.21838980913162231, -0.04077642410993576, -0.1546419858932495, 0.3159371018409729, -0.08544784039258957, -0.081743024289608, 0.41845420002937317, 0.04313494265079498, -0.10744322836399078, 0.15730324387550354, 0.40884506702423096, 0.286337286233902, -0.406210333108902, 0.06590953469276428, 0.023976624011993408, -0.19142724573612213, 0.23012864589691162, 0.07923678308725357, 0.36032143235206604, -0.05429613217711449, -0.03405306488275528, -0.16316667199134827, 0.001209433190524578, -0.17126455903053284, 0.028521209955215454, 0.027365677058696747, 0.16064897179603577, -0.39787688851356506, -0.025505708530545235, 0.248751699924469, -0.3316332995891571, -0.23366862535476685, 0.14528103172779083, -0.21102957427501678, -0.16329357028007507, -0.15140479803085327, 0.17202410101890564, -0.27134451270103455, -0.17321737110614777, 0.4485713839530945, 0.18045228719711304, -0.19760334491729736, 0.25211450457572937, -0.024278635159134865, -0.23007752001285553, -0.2597093880176544, -0.13394811749458313, 0.39808419346809387, -0.35194042325019836, 0.08630482852458954, 0.055135179311037064, -0.369742751121521, 0.19730371236801147, 0.751590371131897, -0.026074983179569244, 0.17446152865886688, -0.2122734636068344, -0.23878946900367737, 0.021794157102704048, 0.040923211723566055, 0.05668681114912033, 0.1364220231771469, 0.6430282592773438, 0.2666287422180176, -0.03952161222696304, -0.21416988968849182, -0.38003668189048767, 0.27786052227020264, -0.3200721740722656, 0.11240153759717941, 0.0029337573796510696, -0.06673111766576767, 0.0916438177227974, -0.08966776728630066, 0.04014500230550766, 0.3479636311531067, -0.08525574952363968, -0.25819718837738037, -0.40776482224464417, 0.07729045301675797, 0.2306940257549286, -0.2337164282798767, -0.0889580100774765, 0.043788760900497437, 0.05845051258802414, -0.10846423357725143, 0.07042646408081055, 0.10378574579954147, 0.121416836977005, 0.1209276020526886, -0.10241715610027313, 0.2657809555530548, -0.41729021072387695, -0.10447245836257935, 0.016919806599617004, 0.05426936224102974, -0.0603364072740078, -0.01491684839129448, -0.25951236486434937, -0.06748693436384201, -0.06606325507164001, 0.2184058427810669, 0.3321199417114258, 0.43660929799079895, 0.36832377314567566, 0.13696742057800293, 0.01831485703587532, 0.10960771888494492, 0.2874639928340912, 0.1851901113986969, -0.1328524798154831, -0.3547152578830719, 0.3443652391433716, 0.2502986490726471, 0.004498332738876343, -0.2905500531196594, 0.1117963045835495, -0.5064703226089478, 0.01776466891169548, 0.1481596678495407, 0.49950161576271057, -0.0700211301445961, 0.30912578105926514, 0.029711920768022537, 0.2923949062824249, 0.12368570268154144, 0.16159439086914062, 0.2556520402431488, -0.1314321905374527, 0.06871800869703293, 0.27062931656837463, -0.000967714935541153, -0.03226502984762192, 0.2306312471628189, 0.07274503260850906, 0.31188225746154785, 0.3543482720851898, 0.3712398409843445, -0.0912473127245903, 0.1493474245071411, 0.33438584208488464, -0.1993262767791748, 0.22923578321933746, 0.24831247329711914, -0.052130475640296936, 0.4463849365711212, -0.4679367244243622, -0.32305365800857544, -0.22967195510864258, 0.272529661655426, -0.318940669298172, -0.062169238924980164, -0.16766980290412903, -0.09240350127220154, -0.14268359541893005, 0.0767873227596283, -0.2698047459125519, -0.006528705358505249, 0.18947890400886536, -0.18423549830913544, -0.08565203845500946, -0.4537178874015808, -0.3113762140274048, -0.1692999005317688, 0.3823491632938385, -0.10741546750068665, 0.28466302156448364, 0.03803499788045883, 0.0034093335270881653, -0.023839708417654037, 0.33465126156806946, 0.09620428085327148, 0.1980908364057541, -0.06044499948620796, 0.021716658025979996, -0.11305837333202362, -0.0072516631335020065, 0.03568693622946739, 0.2513352632522583, 0.1394227147102356, 0.004350738599896431, 0.07189449667930603, 0.08431196212768555, -0.17426012456417084, 0.2088596373796463, -0.2105252593755722, 0.2519862651824951, 0.07953579723834991, -0.05903088301420212, 0.002322135493159294, -0.06171175837516785, -0.42438071966171265, -0.251565158367157, -0.25809577107429504, 0.13773661851882935, 0.2446860671043396, 0.06735243648290634, 0.11993204802274704, -0.3152998089790344, 0.13667699694633484, 0.29732492566108704, 0.49039068818092346, 0.2618110477924347, -0.06959054619073868, -0.08615146577358246, 0.0290585458278656, -0.14478182792663574, 0.21381840109825134, 0.10831090062856674, -0.34953755140304565, -0.10553503781557083, -0.07776229828596115, 0.07420182228088379, 0.14472752809524536, -0.4900470972061157, 0.08824698626995087, 0.01595267280936241, -0.2991987466812134, -0.1523769646883011, 0.27576297521591187, 0.22430561482906342, -0.11552751064300537, 0.1021832525730133, -0.16758491098880768, 0.2022671401500702, -0.08995853364467621, 0.09909502416849136, -0.0947207435965538, -0.5073533058166504, -0.2690563201904297, 0.0019007958471775055, 0.1711938977241516, 0.23240143060684204, -0.22986462712287903, -0.27585577964782715, -0.046045929193496704, 0.029614020138978958, -0.09299400448799133, -0.17547357082366943, -0.09214171022176743, 0.041504740715026855, 0.12991803884506226, 0.10223459452390671, 0.05252420902252197, -0.06415583938360214, 0.3429870903491974, 0.34773629903793335, 0.19087737798690796, -0.10664668679237366, 0.0014480650424957275, -0.24164557456970215, -0.10745581984519958, 0.0510738231241703, 0.7210326790809631, -0.017764955759048462, -0.002794349566102028, -0.2597801685333252, -0.38870638608932495, 0.5166319012641907, -0.27938076853752136, -0.06138673424720764, 0.0027968971990048885, 0.1745118349790573, 0.6265729069709778, -0.143350288271904, -0.6584717631340027, 0.015463963150978088, -0.037990402430295944, 0.036727361381053925, -0.38347476720809937, 0.3062696158885956, -0.27175086736679077, -0.06891194730997086, -0.07055485248565674, 0.2927139401435852, 0.3333769738674164, -0.1025819182395935, 0.16128142178058624, -0.14878562092781067 ]
https://github.com/huggingface/datasets/issues/482
Bugs : dataset.map() is frozen on ELI5
This comes from an overflow in pyarrow's array. It is stuck inside the loop that reduces the batch size to avoid the overflow. I'll take a look
Hi Huggingface Team! Thank you guys once again for this amazing repo. I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb) However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process. Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow. ---------------------------------------- **More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object) I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ?
27
Bugs : dataset.map() is frozen on ELI5 Hi Huggingface Team! Thank you guys once again for this amazing repo. I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb) However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process. Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow. ---------------------------------------- **More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object) I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ? This comes from an overflow in pyarrow's array. It is stuck inside the loop that reduces the batch size to avoid the overflow. I'll take a look
[ 0.005086492747068405, -0.2545410990715027, -0.09758785367012024, 0.1058637946844101, 0.1502087116241455, -0.16980847716331482, 0.4342987537384033, 0.11805419623851776, -0.2856815755367279, 0.2499663084745407, -0.16753749549388885, 0.4118993878364563, 0.14685368537902832, 0.14851702749729156, -0.08853176981210709, 0.1992189735174179, -0.12459934502840042, -0.06924489140510559, -0.10465282201766968, -0.08540280908346176, 0.09940649569034576, 0.19421012699604034, -0.25474464893341064, 0.09465222805738449, -0.1753026396036148, 0.19139784574508667, -0.047501906752586365, 0.013826809823513031, -0.13943412899971008, -0.34842783212661743, 0.1026884913444519, -0.0013412758708000183, -0.06019097939133644, 0.09985248744487762, -0.00012873973173554987, 0.0666966587305069, 0.0852753072977066, 0.015190297737717628, -0.032187990844249725, 0.11488893628120422, 0.34193819761276245, -0.09248562902212143, 0.29417794942855835, -0.22677862644195557, 0.2994025647640228, 0.2010621875524521, 0.3933570086956024, 0.29282164573669434, 0.5463500022888184, -0.11319147795438766, 0.004286732524633408, 0.2285589724779129, 0.02299444004893303, 0.5134872198104858, 0.3447040319442749, -0.15654097497463226, -0.26265594363212585, 0.03605290874838829, 0.4549464285373688, -0.24476777017116547, 0.02027127891778946, -0.17351344227790833, -0.14457257091999054, -0.1309605836868286, 0.16577190160751343, 0.3925587832927704, 0.0644611343741417, -0.6248456239700317, 0.005057193338871002, 0.18132908642292023, 0.3918071687221527, -0.21953201293945312, -0.05313361436128616, -0.24843952059745789, 0.020669713616371155, -0.3290591835975647, 0.438499391078949, -0.08012107759714127, -0.16622143983840942, 0.021537763997912407, -0.21999089419841766, -0.03879348188638687, -0.07636614888906479, 0.307536780834198, -0.009236358106136322, 0.08961707353591919, 0.10442814230918884, 0.1390654742717743, 0.036329396069049835, 0.028240790590643883, -0.13589537143707275, -0.18271498382091522, 0.01096414402127266, 0.33328765630722046, -0.5986673831939697, -0.16341625154018402, -0.02712228149175644, -0.06911664456129074, 0.20696991682052612, -0.030788034200668335, 0.14675553143024445, 0.143154114484787, 0.13382913172245026, 0.09123320132493973, 0.44367873668670654, 0.007723011076450348, 0.16048938035964966, 0.044057447463274, 0.2785818576812744, -0.137202650308609, -0.3210597336292267, 0.1931506097316742, -0.07008863240480423, -0.24688050150871277, 0.08184531331062317, -0.21113145351409912, 0.05288213491439819, -0.23202545940876007, 0.20226091146469116, 0.12520085275173187, -0.6203747987747192, 0.017621705308556557, 0.018280494958162308, 0.29105886816978455, -0.07921189069747925, -0.021829187870025635, -0.08571404963731766, 0.0450756773352623, -0.44828328490257263, -0.12567351758480072, 0.0942523330450058, -0.38798925280570984, -0.18947924673557281, -0.008715679869055748, 0.24952615797519684, -0.2611227333545685, 0.14323639869689941, -0.15229317545890808, 0.3228124976158142, 0.11614978313446045, 0.16298477351665497, -0.06826956570148468, 0.2398325502872467, 0.08304674923419952, 0.1794324368238449, 0.15349021553993225, -0.21910463273525238, -0.05661778151988983, -0.07796432077884674, 0.4114331901073456, 0.023546140640974045, -0.07278518378734589, 0.041201502084732056, -0.02738342434167862, -0.23596861958503723, -0.06600043177604675, -0.08882228285074234, 0.1308395266532898, 0.48442593216896057, -0.377819687128067, 0.09100254625082016, -0.2624385952949524, -0.021513681858778, -0.09502775967121124, 0.3381759822368622, 0.19445259869098663, -0.1940367966890335, -0.027467213571071625, -0.026570327579975128, -0.04106109216809273, -0.11950654536485672, 0.42367011308670044, 0.003951690159738064, 0.10330945998430252, -0.031887236982584, 0.2316204458475113, 0.39551040530204773, -0.20581106841564178, -0.731090247631073, 0.0396430566906929, -0.276348739862442, -0.13628394901752472, -0.2522526979446411, 0.062916100025177, 0.2470749467611313, -0.063034787774086, 0.1072477251291275, 0.44683223962783813, -0.2058172971010208, 0.06188424676656723, -0.43136003613471985, -0.2683365046977997, -0.06333944946527481, 0.08626370131969452, -0.14178049564361572, -0.3473043143749237, -0.1305558681488037, 0.1829255223274231, -0.07555126398801804, 0.034951481968164444, 0.20997954905033112, 0.28658682107925415, 0.2029317319393158, 0.045646484941244125, -0.030045747756958008, -0.14397624135017395, -0.46016132831573486, 0.026831679046154022, -0.058642271906137466, 0.26157885789871216, -0.12028902769088745, 0.06481797993183136, 0.23494413495063782, 0.011387387290596962, -0.21295855939388275, 0.02435518428683281, -0.0730481743812561, -0.2284710705280304, 0.08371944725513458, 0.211251899600029, -0.001915622502565384, -0.20659729838371277, -0.005979813635349274, 0.14311863481998444, -0.43884748220443726, 0.25435420870780945, -0.12806500494480133, -0.4770113229751587, -0.2971017360687256, -0.06582296639680862, -0.38816604018211365, -0.18655617535114288, -0.11967112869024277, 0.10696585476398468, -0.3498883545398712, -0.16679002344608307, -0.16090062260627747, 0.42712175846099854, 0.23038972914218903, -0.3507653772830963, 0.13432465493679047, -0.2931654155254364, -0.029352985322475433, -0.08422710001468658, -0.07806912809610367, 0.2284282147884369, -0.15942858159542084, 0.18335086107254028, 0.07038602977991104, -0.016278624534606934, -0.0938534140586853, 0.04679161682724953, -0.12879110872745514, 0.1275019347667694, 0.10017794370651245, 0.3159776031970978, 0.34692806005477905, -0.04769518971443176, -0.08763779699802399, 0.398569792509079, 0.8972331285476685, 0.14789016544818878, 0.049440912902355194, 0.1409236639738083, -0.021728716790676117, -0.12024596333503723, -0.37467077374458313, -0.27979448437690735, 0.243423730134964, 0.005109813064336777, 0.025267701596021652, -0.04283047467470169, -0.09321369230747223, -0.016466904431581497, 0.18108350038528442, 0.29454854130744934, 0.02398153766989708, 0.15513677895069122, 0.4825345575809479, 0.0677756816148758, -0.11315035074949265, -0.05685734748840332, 0.10127799957990646, 0.1829894334077835, -0.17769385874271393, 0.10549262911081314, 0.024334320798516273, -0.11703602224588394, 0.18922214210033417, -0.014327925629913807, -0.3084709942340851, -0.3321065902709961, 0.23062355816364288, 0.17224793136119843, -0.09613363444805145, 0.21715612709522247, 0.36027488112449646, -0.05387754738330841, 0.14653129875659943, -0.23797141015529633, -0.011618394404649734, -0.3989602327346802, -0.4639275074005127, -0.06463208794593811, 0.515274167060852, -0.0921793282032013, -0.1529771238565445, 0.12840405106544495, -0.42250555753707886, 0.0034477990120649338, -0.5699742436408997, 0.2885666787624359, -0.23673267662525177, 0.3893536329269409, -0.08670078217983246, 0.27805283665657043, -0.44146209955215454, -0.1928233653306961, 0.2745802104473114, -0.34480464458465576, -0.3394559621810913, 0.14451870322227478, 0.04485480487346649, 0.008436804637312889, -0.20662811398506165, -0.5001218914985657, -0.0840335339307785, -0.1841687560081482, 0.3770577907562256, -0.07467232644557953, 0.0755598247051239, 0.08479363471269608, 0.09672385454177856, 0.3439752459526062, -0.03270985186100006, -0.3106953501701355, 0.03952989727258682, -0.11683110147714615, 0.37485912442207336, -0.20844776928424835, -0.3211795389652252, -0.13575513660907745, 0.13084553182125092, -0.1553773134946823, 0.025241665542125702, -0.40531718730926514, -0.2954767942428589, -0.30725300312042236, 0.5448831915855408, -0.1725357323884964, 0.038863763213157654, 0.3364681005477905, 0.2721448540687561, 0.10907742381095886, 0.08710078150033951, -0.2881273031234741, 0.37965571880340576, 0.6361582279205322, 0.060371167957782745, -0.11449667066335678, 0.5326625108718872, 0.12682363390922546, 0.8650524020195007, 0.05013347044587135, -0.09629003703594208, 0.1846015304327011, 0.050820522010326385, -0.05242172256112099, -0.41840192675590515, 0.10975176095962524, 0.15931810438632965, -0.04449684917926788, -0.05102555453777313, 0.2817858159542084, -0.025239504873752594, -0.27236416935920715, -0.009988758713006973, 0.12903858721256256, -0.27403897047042847, -0.30533528327941895, 0.2833789587020874, -0.15017910301685333, -0.1847423017024994, 0.20238898694515228, -0.12844932079315186, -0.267551064491272, -0.38656187057495117, -0.26573580503463745, -0.2626960277557373, 0.3266676962375641, -0.031000537797808647, -0.5268410444259644, -0.16936276853084564, -0.4538227915763855, 0.3003251850605011, 0.20171985030174255, 0.18299515545368195, -0.31494957208633423, -0.07964591681957245, 0.25958722829818726, -0.35603052377700806, 0.5623480081558228, -0.25010937452316284, -0.007796276360750198, 0.06645902991294861, 0.16605864465236664, -0.3364865183830261, -0.10527504980564117, -0.15297339856624603, 0.17917367815971375, 0.5655264854431152, -0.20648923516273499, -0.38480719923973083, -0.1788007915019989, 0.3843328654766083, 0.09497522562742233, -0.10835161805152893, 0.09490271657705307, -0.3024918735027313, -0.1956835389137268, -0.3143540918827057, -0.06947384029626846, 0.3912864327430725, -0.008833756670355797, -0.1087367981672287, 0.008465014398097992, 0.21988847851753235, 0.18274009227752686, -0.07948523759841919, 0.237020805478096, -0.11834292858839035, -0.17530865967273712, 0.3294098973274231, 0.2528044581413269, -0.10599192976951599, -0.18772181868553162, 0.29431429505348206, -0.06273066997528076, -0.29484137892723083, 0.4838992953300476, -0.15364113450050354, 0.3558015525341034, 0.3829168379306793, 0.23713764548301697, -0.08179537206888199, -0.01779557392001152, 0.14876386523246765, 0.38964781165122986, -0.0745604857802391, 0.4932512640953064, 0.315547376871109, -0.01771889068186283, -0.16267986595630646, 0.14863801002502441, -0.10344009101390839, 0.018935903906822205, 0.47980692982673645, -0.1455775648355484, -0.06431964039802551, 0.6060302257537842, -0.03950978070497513, 0.9872853755950928, -0.44384920597076416, 0.376861572265625, 0.24831622838974, 0.11661182343959808, 0.36692482233047485, -0.2621609568595886, 0.28639304637908936, -0.39739617705345154, -0.2996116578578949, 0.23974643647670746, -0.2731797695159912, -0.24870645999908447, 0.3163542151451111, -0.11446759104728699, 0.05103515833616257, -0.0501101091504097, 0.22953815758228302, 0.01401887834072113, 0.23621606826782227, 0.15027590095996857, -0.10151137411594391, -0.4429037868976593, -0.028985293582081795, 0.038888245820999146, 0.060617633163928986, -0.07241889834403992, -0.16154144704341888, -0.23183006048202515, -0.13187932968139648, -0.21559572219848633, 0.21711087226867676, -0.1324205845594406, 0.090054951608181, 0.31832608580589294, 0.004182346165180206, 0.20546592772006989, 0.6948341727256775, 0.025457873940467834, -0.010363887995481491, 0.06927041709423065, 0.1160048246383667, 0.05540884658694267, 0.045510292053222656, 0.3793317675590515, 0.06869900971651077, 0.2638886868953705, -0.17322930693626404, -0.23705001175403595, 0.12127364426851273, 0.16924305260181427, -0.24512381851673126, -0.18218562006950378, 0.09054893255233765, 0.20083849132061005, -0.19882483780384064, 0.08867920935153961, -0.0004926398396492004, -0.5018956661224365, 0.03659546747803688, -0.04600997641682625, -0.052053943276405334, -0.03650724142789841, 0.3843834400177002, -0.05958298221230507, -0.11228688806295395, 0.07941588759422302, 0.6717551946640015, -0.16741889715194702, -0.14392593502998352, 0.7501499652862549, 0.2646193504333496, -0.04528205841779709, -0.013743605464696884, 0.1758434772491455, -0.20189975202083588, -0.5593949556350708, 0.06086341291666031, -0.306725412607193, -0.11093142628669739, 0.1487196981906891, 0.21831034123897552, -0.21557511389255524, -0.22422173619270325, -0.21340195834636688, -0.3311450183391571, -0.30693504214286804, 0.24944369494915009, 0.051215626299381256, -0.04296550527215004, 0.01934128999710083, 0.3812389075756073, 0.14939969778060913, -0.09374791383743286, -0.10939966142177582, -0.09547624737024307, -0.2970138490200043, 0.24600787460803986, 0.04717447981238365, -0.42025887966156006, 0.36596229672431946, -0.14238208532333374, -0.045359913259744644, 0.27439725399017334, -0.22311967611312866, -0.09858794510364532, 0.10666076838970184, 0.2159392535686493, -0.0818299725651741, -0.07727057486772537, -0.2459409534931183, 0.014639750123023987, -0.008958902209997177, -0.2189130336046219, 0.27811869978904724, -0.28006860613822937, -0.031673818826675415, -0.03283701464533806, -0.0027323178946971893, 0.2612270712852478, 0.001976974308490753, 0.0846833884716034, -0.03185581415891647, 0.030412450432777405, 0.3323296010494232, 0.3044149577617645, 0.06929080188274384, -0.015113331377506256, -0.2690475881099701, -0.00724136084318161, 0.10015950351953506, 0.08774808049201965, 0.2753635048866272, -0.4385765790939331, -0.1707720160484314, -0.21072179079055786, -0.11013611406087875, 0.5926231145858765, -0.18956616520881653, -0.3875775635242462, 0.2923756539821625, 0.017940012738108635, 0.05729784071445465, 0.12166717648506165, 0.5638595819473267, 0.04784857854247093, -0.009114734828472137, -0.09471815079450607, -0.020788855850696564, -0.08967462182044983, 0.02907506376504898, 0.27305951714515686, 0.33463120460510254, -0.5037516951560974, -0.008634700439870358, 0.35878822207450867, -0.06020740419626236, 0.06535214930772781, 0.08253784477710724, -0.060805048793554306, 0.17849025130271912, 0.3039405345916748, 0.1708104908466339, -0.21969760954380035, -0.5023558735847473, 0.4505329728126526, 0.2428026795387268, -0.2482258379459381, -0.302080363035202, 0.5325149893760681, 0.31961020827293396, 0.5286591649055481, 0.2846609652042389, 0.35220348834991455, 0.15086370706558228, -0.2730664908885956, -0.24146853387355804, 0.31654128432273865, -0.05525440722703934, -0.07544240355491638, -0.0673510730266571, -0.05259384214878082, 0.040040142834186554, 0.3657519817352295, -0.25800180435180664, 0.08492633700370789, 0.4335434138774872, 0.4367716312408447, 0.06323603540658951, -0.25605589151382446, -0.1521417796611786, -0.07327604293823242, 0.3150067925453186, -0.03672365844249725, 0.39795345067977905, -0.03045433759689331, -0.1338929533958435, -0.36776402592658997, 0.28116217255592346, 0.2063683569431305, 0.3232465982437134, -0.5607468485832214, 0.42886316776275635, 0.05449432134628296, 0.027819233015179634, -0.019782068207859993, 0.18505530059337616, 0.28802603483200073, 0.0756823867559433, 0.03035040572285652, -0.07516661286354065, 0.003364608623087406, -0.2747895121574402, 0.1871066838502884, 0.3222307562828064, 0.1376526653766632, -0.22309467196464539, 0.25682133436203003, -0.342352032661438, 0.10554181039333344, -0.14021024107933044, -0.4819663465023041, 0.20168982446193695, -0.035015445202589035, 0.02020409144461155, 0.03684177249670029, -0.011075686663389206, -0.005408993922173977, 0.09559518098831177, 0.6279259324073792, 0.3679850399494171, 0.23863822221755981, -0.06410381942987442, 0.08855925500392914, -0.4655943214893341, 0.26486727595329285, -0.029767844825983047, 0.1389426589012146, 0.3166317641735077, 0.33693480491638184, 0.15831094980239868, 0.32555055618286133, 0.2213919758796692, -0.2028590589761734, -0.4033798575401306, 0.5688692331314087, -0.5948464274406433, -0.15914864838123322, 0.08633372187614441, 0.10695184022188187, -0.11652965843677521, -0.27356410026550293, 0.07812006771564484, -0.22494982182979584, -0.10059425234794617, -0.21307557821273804, -0.09739977866411209, -0.05820847302675247, 0.1613881140947342, 0.24765542149543762, 0.28956669569015503, 0.16466689109802246, 0.007054876536130905, -0.16172660887241364, -0.12481094896793365, -0.12671315670013428, -0.07115134596824646, 0.0957815945148468, 0.04106999188661575, 0.050034716725349426, -0.2549126446247101, 0.26135018467903137, -0.2735888659954071, 0.016829919070005417, -0.005997784435749054, 0.21234093606472015, 0.02284727431833744, -0.3081655204296112, 0.4737374186515808, 0.21393412351608276, -0.08597780019044876, 0.5660753846168518, -0.06580908596515656, -0.0802735909819603, -0.6256955862045288, 0.1396763026714325, 0.2787374258041382, -0.409179151058197, -0.1944178342819214, 0.1413295865058899, 0.10419047623872757, 0.2522996664047241, -0.04746565222740173, -0.40544870495796204, -0.0626421868801117, 0.11132780462503433, -0.13850638270378113, -0.6580842733383179, 0.1909586638212204, 0.35451146960258484, 0.13917052745819092, -0.21822524070739746, 0.09905829280614853, -0.015247024595737457, -0.1090775653719902, -0.12036509811878204, -0.2823943495750427 ]
https://github.com/huggingface/datasets/issues/482
Bugs : dataset.map() is frozen on ELI5
I created a PR to fix the issue. It was due to an overflow check that handled badly an empty list. You can try the changes by using ``` !pip install git+https://github.com/huggingface/nlp.git@fix-bad-type-in-overflow-check ``` Also I noticed that the first 1000 examples have an empty list in the `title_urls` field. The feature type inference in `.map` will consider it `null` because of that, and it will crash when it encounter the next example with a `title_urls` that is not empty. Therefore to fix that, what you can do for now is increase the writer batch size so that the feature inference will take into account at least one example with a non-empty `title_urls`: ```python # default batch size is 1_000 and it's not enough for feature type inference because of empty lists valid_dataset = valid_dataset.map(make_input_target, writer_batch_size=3_000) ``` I was able to run the frozen cell with these changes.
Hi Huggingface Team! Thank you guys once again for this amazing repo. I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb) However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process. Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow. ---------------------------------------- **More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object) I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ?
147
Bugs : dataset.map() is frozen on ELI5 Hi Huggingface Team! Thank you guys once again for this amazing repo. I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb) However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process. Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow. ---------------------------------------- **More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object) I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ? I created a PR to fix the issue. It was due to an overflow check that handled badly an empty list. You can try the changes by using ``` !pip install git+https://github.com/huggingface/nlp.git@fix-bad-type-in-overflow-check ``` Also I noticed that the first 1000 examples have an empty list in the `title_urls` field. The feature type inference in `.map` will consider it `null` because of that, and it will crash when it encounter the next example with a `title_urls` that is not empty. Therefore to fix that, what you can do for now is increase the writer batch size so that the feature inference will take into account at least one example with a non-empty `title_urls`: ```python # default batch size is 1_000 and it's not enough for feature type inference because of empty lists valid_dataset = valid_dataset.map(make_input_target, writer_batch_size=3_000) ``` I was able to run the frozen cell with these changes.
[ 0.12892530858516693, -0.3091126084327698, -0.06825599819421768, 0.15724864602088928, 0.21350805461406708, -0.1734553873538971, 0.3533768951892853, 0.15098942816257477, -0.158241406083107, 0.11419486999511719, -0.23894591629505157, 0.4564898610115051, 0.10832198709249496, 0.12842528522014618, -0.01927020028233528, 0.15804356336593628, -0.13597235083580017, 0.021666496992111206, -0.13839955627918243, -0.1211569756269455, 0.12827272713184357, 0.30926817655563354, -0.2475367784500122, 0.037525519728660583, -0.174453005194664, 0.20801034569740295, -0.10167910903692245, 0.007207956165075302, -0.14684055745601654, -0.3405948877334595, 0.13645005226135254, 0.04549948871135712, -0.18655195832252502, 0.14711080491542816, -0.00012575872824527323, 0.05471622943878174, 0.04634992778301239, -0.03351704031229019, -0.08429449796676636, -0.07200349867343903, 0.3044876456260681, -0.17940828204154968, 0.3073303699493408, -0.14466316998004913, 0.12731948494911194, 0.30643951892852783, 0.35266777873039246, 0.24768134951591492, 0.6475163102149963, -0.10104413330554962, 0.0140078105032444, 0.34131407737731934, 0.020277727395296097, 0.5116379857063293, 0.24378874897956848, -0.09827858209609985, -0.34998369216918945, 0.03359202668070793, 0.3750881552696228, -0.18322782218456268, 0.13678205013275146, -0.060827262699604034, -0.07392141222953796, -0.08980464935302734, 0.19255688786506653, 0.40392613410949707, -0.07413173466920853, -0.6528959274291992, -0.002178579568862915, 0.2572253942489624, 0.279477059841156, -0.1696968376636505, -0.12001951038837433, -0.3368310332298279, 0.014805275946855545, -0.40799227356910706, 0.4944005310535431, -0.0794694796204567, -0.15302781760692596, 0.031708382070064545, -0.18248963356018066, -0.06522111594676971, -0.013525895774364471, 0.2793021500110626, 0.05901027470827103, 0.1251693069934845, -0.07254249602556229, 0.08671703189611435, 0.058775875717401505, 0.004024529829621315, -0.3797962963581085, -0.1810685098171234, -0.011934865266084671, 0.35280463099479675, -0.5798326730728149, -0.2715924382209778, -0.03273472934961319, 0.059473663568496704, 0.12535840272903442, 0.07629351317882538, 0.1430126428604126, 0.18276730179786682, 0.01882210373878479, 0.04145997762680054, 0.41487938165664673, 0.001727348193526268, 0.2859443724155426, 0.0397363156080246, 0.26814770698547363, -0.033296287059783936, -0.2699644863605499, 0.1644417643547058, -0.0023883176036179066, -0.14323127269744873, -0.1291358321905136, -0.2096814215183258, 0.1443174183368683, -0.33388927578926086, 0.2238600254058838, 0.14005394279956818, -0.5295670628547668, -0.0235965084284544, 0.04511246457695961, 0.3480336666107178, -0.16450613737106323, -0.011847931891679764, -0.015461331233382225, 0.028653068467974663, -0.4626113474369049, -0.09209650009870529, 0.09605313092470169, -0.4005874991416931, -0.14622762799263, 0.006768525578081608, 0.27335408329963684, -0.34867018461227417, 0.2713480293750763, -0.14752328395843506, 0.25983309745788574, 0.10136117041110992, 0.16709065437316895, -0.08704501390457153, 0.20513468980789185, 0.05245443806052208, 0.10028322041034698, 0.11819402128458023, -0.133488267660141, -0.18945372104644775, -0.09264106303453445, 0.20978501439094543, 0.1490676999092102, 0.015464838594198227, 0.08865121006965637, -0.040838103741407394, -0.24559113383293152, -0.053560517728328705, -0.04093002527952194, 0.27039775252342224, 0.3567354679107666, -0.3351742923259735, 0.060580506920814514, -0.11001986265182495, -0.16548047959804535, 0.03366422653198242, 0.37992411851882935, 0.2518186867237091, 0.04831447824835777, -0.24109290540218353, 0.007526209112256765, -0.03591098263859749, -0.22821801900863647, 0.413822203874588, 0.06676367670297623, -0.0232560932636261, 0.004859093576669693, 0.19884522259235382, 0.4201338291168213, -0.21387234330177307, -0.5843527317047119, 0.12279196083545685, -0.29015564918518066, -0.06117048114538193, -0.31852152943611145, 0.05728442221879959, 0.18658335506916046, -0.11325138062238693, 0.10861946642398834, 0.3744202256202698, -0.15224120020866394, 0.05205906927585602, -0.477056086063385, -0.22320207953453064, -0.026508741080760956, 0.03276842460036278, -0.19291678071022034, -0.23366078734397888, -0.19079580903053284, 0.2977520227432251, -0.05315615236759186, 0.04889356717467308, 0.18208137154579163, 0.3569732904434204, 0.17730262875556946, 0.13620300590991974, -0.1015436053276062, -0.13108447194099426, -0.5059298872947693, 0.03011374920606613, -0.0826810896396637, 0.4368829131126404, -0.07427908480167389, 0.04156723618507385, 0.2162145972251892, -0.08628754317760468, -0.20924966037273407, -0.0907132625579834, -0.04785499721765518, -0.1511385589838028, 0.07890553772449493, 0.28834572434425354, -0.07655647397041321, -0.14627061784267426, -0.0684966966509819, 0.22943927347660065, -0.5454391241073608, 0.23032398521900177, -0.11012021452188492, -0.3616035282611847, -0.2829391360282898, 0.05223336070775986, -0.3480922281742096, -0.1953469067811966, -0.11997009068727493, 0.04576466605067253, -0.4057103991508484, -0.11822044849395752, -0.07873766869306564, 0.3996126651763916, 0.30002692341804504, -0.27926233410835266, 0.028799764811992645, -0.1769142597913742, 0.058930061757564545, -0.09941640496253967, -0.16938957571983337, 0.3000495731830597, -0.19115358591079712, 0.1421569585800171, 0.09374009072780609, 0.02218279056251049, -0.07514829188585281, 0.013115476816892624, -0.19914938509464264, 0.029185757040977478, 0.22711217403411865, 0.3052905201911926, 0.37777575850486755, 0.0039163269102573395, -0.20306359231472015, 0.28661805391311646, 0.8647711873054504, 0.21282610297203064, 0.09152351319789886, 0.1407783031463623, 0.042024921625852585, -0.13112403452396393, -0.3347015082836151, -0.23497550189495087, 0.23530447483062744, -0.03680318221449852, 0.010397769510746002, 0.04712323099374771, -0.07231856882572174, 0.0022593550384044647, 0.2268696129322052, 0.21806657314300537, -0.07442109286785126, 0.11183829605579376, 0.4056485891342163, 0.10751304775476456, -0.17482060194015503, 0.04490399733185768, 0.0736122727394104, 0.1916550248861313, -0.21826112270355225, 0.006443120539188385, -0.07350227981805801, -0.1446312665939331, 0.179085373878479, 0.055761437863111496, -0.494390606880188, -0.30879709124565125, 0.1794390082359314, 0.086846724152565, -0.017464593052864075, 0.259986013174057, 0.30507516860961914, -0.0461224764585495, 0.02666688896715641, -0.16268612444400787, -0.0823710635304451, -0.371319442987442, -0.3768130838871002, -0.061423685401678085, 0.4895645081996918, 0.06452494859695435, -0.10842189192771912, 0.018737057223916054, -0.5041594505310059, -0.009482627734541893, -0.6358895897865295, 0.34819233417510986, -0.3971444368362427, 0.41285240650177, -0.07818302512168884, 0.27583587169647217, -0.4864451289176941, -0.0928509458899498, 0.34769579768180847, -0.3571275770664215, -0.3248538076877594, 0.06429431587457657, 0.0845775455236435, 0.027451729401946068, -0.23906390368938446, -0.5075420141220093, -0.07152547687292099, -0.2004793882369995, 0.6052665710449219, 0.029333297163248062, 0.04046570509672165, 0.20196478068828583, -0.03662584722042084, 0.42143866419792175, -0.13673900067806244, -0.13171853125095367, -0.028818031772971153, -0.15582753717899323, 0.3360879421234131, -0.18498514592647552, -0.32575705647468567, -0.12655878067016602, 0.1665830910205841, -0.12409542500972748, -0.15646310150623322, -0.3962711691856384, -0.4087884724140167, -0.35151076316833496, 0.4195171594619751, -0.08567747473716736, 0.041609618812799454, 0.3636348247528076, 0.21455632150173187, 0.08938978612422943, 0.07691461592912674, -0.3594808578491211, 0.41568517684936523, 0.5649591684341431, 0.0811527892947197, -0.06181918829679489, 0.5869219303131104, 0.12589788436889648, 0.7632539868354797, 0.16471879184246063, -0.0777331292629242, 0.2583022117614746, 0.06227274239063263, 0.0986936092376709, -0.3876318633556366, -0.020706674084067345, 0.18241630494594574, 0.028672173619270325, 0.10558028519153595, 0.262031614780426, 0.04949479550123215, -0.12020085006952286, -0.12153240293264389, 0.1444292664527893, -0.25895997881889343, -0.3341294825077057, 0.17953328788280487, -0.11719945073127747, -0.16045761108398438, 0.20354628562927246, -0.0725465789437294, -0.21229946613311768, -0.40616756677627563, -0.23262915015220642, -0.07603858411312103, 0.3426356911659241, -0.1049853041768074, -0.6462797522544861, -0.03492220491170883, -0.542995810508728, 0.2988602817058563, 0.14548778533935547, 0.1586170494556427, -0.33729785680770874, -0.07211777567863464, 0.2224746197462082, -0.2879297435283661, 0.4114738702774048, -0.19152577221393585, -0.051626771688461304, 0.051114823669195175, -0.039844997227191925, -0.2840805947780609, 0.11399196088314056, -0.19352436065673828, 0.13242411613464355, 0.6303730607032776, -0.09463565051555634, -0.5235409140586853, -0.31215372681617737, 0.3164811134338379, 0.05712120980024338, -0.06888655573129654, 0.15599632263183594, -0.3152298033237457, -0.10217563807964325, -0.4176955223083496, -0.09692906588315964, 0.35610726475715637, -0.07812856882810593, -0.05426318943500519, 0.11258082091808319, 0.19858971238136292, 0.14710000157356262, 0.00973675400018692, 0.2579273283481598, -0.126958966255188, -0.09563743323087692, 0.3598085045814514, 0.22572624683380127, -0.05730125308036804, -0.3894452154636383, 0.4335387647151947, -0.1299564093351364, -0.3766610622406006, 0.398106187582016, -0.12008050829172134, 0.281270831823349, 0.4696202278137207, 0.2516356110572815, 0.0401981920003891, -0.04224983602762222, 0.21572528779506683, 0.36368367075920105, -0.0476304292678833, 0.5195015668869019, 0.3840841054916382, 0.03576169162988663, -0.15998269617557526, 0.19300957024097443, -0.15794092416763306, 0.05570676922798157, 0.4740769863128662, -0.004668526351451874, 0.01017024740576744, 0.48860597610473633, -0.09792017191648483, 1.0059642791748047, -0.33029061555862427, 0.4059486985206604, 0.27139735221862793, 0.05397823452949524, 0.5820283889770508, -0.16120880842208862, 0.22562235593795776, -0.4188757538795471, -0.3026849031448364, 0.20597237348556519, -0.14480839669704437, -0.18698015809059143, 0.2278209775686264, -0.16913647949695587, 0.15289901196956635, 0.07528740167617798, 0.13671503961086273, -0.03689466416835785, 0.2807766795158386, 0.03834638372063637, -0.19777463376522064, -0.6501985788345337, 0.004007987678050995, -0.030606336891651154, 0.25073540210723877, -0.043781451880931854, -0.2037794589996338, -0.23443858325481415, -0.1280355304479599, -0.19902610778808594, 0.2368144989013672, -0.14237405359745026, 0.03589247912168503, 0.39334771037101746, -0.030276771634817123, 0.24901682138442993, 0.7023199796676636, 0.1513838768005371, 0.05874018743634224, -0.03257492184638977, 0.13261523842811584, -0.11104663461446762, 0.07306855171918869, 0.36232200264930725, 0.09226483851671219, 0.24422341585159302, -0.1902024745941162, -0.15168817341327667, 0.001315474510192871, 0.10614529252052307, -0.21384374797344208, -0.13222531974315643, 0.03581880405545235, 0.0391899049282074, -0.11448829621076584, -0.05180196836590767, 0.12808096408843994, -0.4593144655227661, 0.009601548314094543, -0.02411765232682228, -0.034345537424087524, -0.05225731059908867, 0.1823458969593048, 0.11093223094940186, -0.12124739587306976, 0.08079929649829865, 0.6947207450866699, -0.36716437339782715, -0.1893373727798462, 0.7166762351989746, 0.2581760287284851, -0.04773954302072525, -0.05926983058452606, 0.17949992418289185, -0.24383386969566345, -0.6025190949440002, 0.07865903526544571, -0.19842784106731415, -0.21345670521259308, 0.16134899854660034, 0.34372568130493164, -0.15610043704509735, -0.17738637328147888, -0.0807446539402008, -0.21842864155769348, -0.3117406666278839, 0.25422120094299316, -0.0011971183121204376, -0.030578192323446274, -0.027649201452732086, 0.38998347520828247, 0.22049252688884735, -0.059907324612140656, -0.1270693987607956, -0.03053141199052334, -0.4184260070323944, 0.2184295803308487, 0.21046632528305054, -0.504217267036438, 0.4190062880516052, -0.11740224063396454, -0.026355735957622528, 0.29353392124176025, -0.29470646381378174, -0.09720538556575775, 0.043483804911375046, 0.19964373111724854, -0.04169420897960663, -0.09702152013778687, -0.25383540987968445, 0.09258605539798737, -0.06535913050174713, -0.2937568426132202, 0.204502671957016, -0.24662375450134277, 0.01948898658156395, 0.03614254668354988, -0.07973235845565796, 0.3411546051502228, 0.024763405323028564, 0.03720366954803467, -0.038809433579444885, -0.026922203600406647, 0.3201963007450104, 0.16491685807704926, -0.007051958702504635, 0.02226390689611435, -0.27119773626327515, 0.03729661926627159, 0.07455842196941376, 0.04698140546679497, 0.28676772117614746, -0.3284997344017029, -0.14813068509101868, -0.12876135110855103, -0.06387412548065186, 0.5036652088165283, -0.09338787198066711, -0.2509557604789734, 0.2977614104747772, 0.019115671515464783, -0.01971576176583767, 0.19682590663433075, 0.582509458065033, 0.10262800753116608, 0.06254437565803528, -0.06727608293294907, -0.015410982072353363, -0.01104685664176941, 0.09162624180316925, 0.24950328469276428, 0.2788553237915039, -0.617531418800354, 0.05253671109676361, 0.25721800327301025, -0.02489355579018593, 0.06494234502315521, 0.05573245882987976, -0.047188650816679, 0.16204611957073212, 0.15220752358436584, 0.1121232882142067, -0.18641860783100128, -0.5657684803009033, 0.590162456035614, 0.30839985609054565, -0.23954693973064423, -0.2778962552547455, 0.47324374318122864, 0.3027626872062683, 0.532726526260376, 0.22835801541805267, 0.4041005074977875, -0.028583034873008728, -0.32569620013237, -0.23548007011413574, 0.44087353348731995, -0.050116173923015594, -0.14488333463668823, -0.0015085190534591675, -0.059452250599861145, -0.05729902535676956, 0.28512337803840637, -0.2409447729587555, 0.06507672369480133, 0.3318479061126709, 0.43060821294784546, 0.09606869518756866, -0.352882444858551, -0.2499440610408783, -0.06059027463197708, 0.44905102252960205, 0.03334082290530205, 0.4102720320224762, -0.04952012002468109, -0.09782108664512634, -0.34454289078712463, 0.35478475689888, 0.15379774570465088, 0.2586198151111603, -0.44849011301994324, 0.4428224265575409, 0.04770209267735481, 0.03210020065307617, 0.04696284979581833, 0.28414618968963623, 0.2792508602142334, 0.08613143861293793, 0.04262078180909157, -0.08125622570514679, -0.02646564692258835, -0.27291548252105713, 0.03374751657247543, 0.27612945437431335, 0.07652540504932404, -0.0008549392223358154, 0.1916513442993164, -0.22939032316207886, -0.055253759026527405, -0.11044421046972275, -0.5082318782806396, 0.2749869227409363, -0.10054919123649597, 0.06653550267219543, 0.033957645297050476, -0.09324727952480316, 0.0029774438589811325, 0.1635851114988327, 0.4926815629005432, 0.2839581370353699, 0.12275382876396179, 0.010009772144258022, 0.02887493371963501, -0.6039534211158752, 0.15887024998664856, 0.12845025956630707, 0.11151055991649628, 0.22434812784194946, 0.2920474112033844, 0.2114540934562683, 0.3512555956840515, 0.08464023470878601, -0.21815919876098633, -0.21671432256698608, 0.3210621476173401, -0.5578281879425049, -0.07577304542064667, 0.006950221955776215, 0.07889115065336227, -0.03570199012756348, -0.15012100338935852, -0.0647808313369751, -0.08725444972515106, -0.13532932102680206, -0.20844346284866333, -0.03886173665523529, -0.22303177416324615, 0.18904034793376923, 0.0953545942902565, 0.33192920684814453, 0.09399344027042389, -0.04536721110343933, -0.31409952044487, -0.07580986618995667, -0.17580239474773407, -0.09343571960926056, 0.17463287711143494, 0.009501436725258827, 0.10478007793426514, -0.23358237743377686, 0.2436617761850357, -0.336344838142395, 0.028993118554353714, -0.03398023918271065, 0.250798761844635, -0.0553373321890831, -0.26670587062835693, 0.42737916111946106, 0.26579731702804565, -0.07956136763095856, 0.6648861765861511, -0.08608943223953247, -0.08892383426427841, -0.5790916681289673, 0.1271744817495346, 0.39109498262405396, -0.41764330863952637, -0.09604021906852722, 0.12269965559244156, 0.11897878348827362, 0.3112987279891968, -0.1813846379518509, -0.5510272979736328, -0.11442122608423233, 0.08263548463582993, -0.20098206400871277, -0.5723956823348999, 0.16526156663894653, 0.2652086019515991, 0.09555435180664062, -0.22204406559467316, 0.09186338633298874, 0.0356682687997818, -0.04693172127008438, 0.021782074123620987, -0.2249053567647934 ]
https://github.com/huggingface/datasets/issues/482
Bugs : dataset.map() is frozen on ELI5
@lhoestq mapping the function `make_input_target` was passed by your fixing. However, there is another error in the final step of `valid_dataset.map(convert_to_features, batched=True)` `ArrowInvalid: Could not convert Thepiratebay.vg with type str: converting to null type` (The [same colab notebook above with new error message](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing#scrollTo=5sRrJ3_C8rLt)) Do you have some ideas? (I am really sorry I could not debug it by myself since I never used `pyarrow` before) Note that `train_dataset.map(convert_to_features, batched=True)` can be run successfully even though train_dataset is 27x bigger than `valid_dataset` so I believe the problem lies in some field of `valid_dataset` again .
Hi Huggingface Team! Thank you guys once again for this amazing repo. I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb) However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process. Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow. ---------------------------------------- **More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object) I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ?
94
Bugs : dataset.map() is frozen on ELI5 Hi Huggingface Team! Thank you guys once again for this amazing repo. I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb) However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process. Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow. ---------------------------------------- **More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object) I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ? @lhoestq mapping the function `make_input_target` was passed by your fixing. However, there is another error in the final step of `valid_dataset.map(convert_to_features, batched=True)` `ArrowInvalid: Could not convert Thepiratebay.vg with type str: converting to null type` (The [same colab notebook above with new error message](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing#scrollTo=5sRrJ3_C8rLt)) Do you have some ideas? (I am really sorry I could not debug it by myself since I never used `pyarrow` before) Note that `train_dataset.map(convert_to_features, batched=True)` can be run successfully even though train_dataset is 27x bigger than `valid_dataset` so I believe the problem lies in some field of `valid_dataset` again .
[ 0.05393744632601738, -0.18700680136680603, -0.07427816838026047, 0.06929278373718262, 0.18813158571720123, -0.09184075146913528, 0.4278540015220642, 0.24305954575538635, -0.3870008885860443, 0.12082424014806747, -0.25425565242767334, 0.4724353551864624, 0.1759660243988037, 0.20339690148830414, -0.10539021342992783, 0.1071925014257431, -0.11483662575483322, 0.05791982263326645, -0.09584227204322815, -0.04912016540765762, 0.10310246050357819, 0.3184989392757416, -0.2580774426460266, 0.16506409645080566, -0.31050384044647217, 0.15009431540966034, -0.09098511934280396, -0.06323956698179245, -0.22130894660949707, -0.32994627952575684, 0.066884346306324, -0.040080729871988297, -0.01913462020456791, 0.13876944780349731, -0.0001242538564838469, 0.044890083372592926, 0.048935115337371826, -0.03960495814681053, -0.1172180026769638, 0.05150758475065231, 0.281546950340271, -0.0927218347787857, 0.3024718761444092, -0.19938108325004578, 0.12152818590402603, 0.19087591767311096, 0.3395657539367676, 0.12501245737075806, 0.6102427244186401, 0.007320781238377094, 0.05597547069191933, 0.26962655782699585, -0.03331969678401947, 0.4009653329849243, 0.23106038570404053, -0.10573504865169525, -0.40943485498428345, -0.027909349650144577, 0.30573874711990356, -0.07376396656036377, 0.09374263882637024, -0.03455451875925064, -0.004744274541735649, -0.08903519809246063, 0.2041340172290802, 0.4473017454147339, 0.054392218589782715, -0.733202338218689, 0.09545940905809402, 0.14598378539085388, 0.42929357290267944, -0.16367775201797485, -0.08884352445602417, -0.19961503148078918, 0.028584908694028854, -0.4379121661186218, 0.4338604807853699, -0.04371419548988342, -0.15768121182918549, 0.014796443283557892, -0.08965662866830826, -0.06340373307466507, -0.08217816054821014, 0.15966281294822693, 0.04510421305894852, 0.08215346187353134, -0.010199862532317638, 0.08116360008716583, -0.0007751770317554474, -0.03069102019071579, -0.28218793869018555, -0.12244266271591187, -0.036916133016347885, 0.31291520595550537, -0.6525638699531555, -0.26029935479164124, -0.21119418740272522, -0.012782067060470581, 0.009075909852981567, 0.048607535660266876, 0.17385658621788025, 0.14541393518447876, 0.09828288108110428, 0.03786632418632507, 0.3953720033168793, -0.023472800850868225, 0.27440309524536133, 0.12865737080574036, 0.21450389921665192, -0.1013743057847023, -0.3396124839782715, 0.19721335172653198, -0.006305373273789883, -0.277344673871994, -0.004182837903499603, -0.12965726852416992, 0.21340104937553406, -0.34126657247543335, 0.20973417162895203, 0.06448948383331299, -0.6048840284347534, 0.05435987189412117, -0.030281204730272293, 0.29071274399757385, -0.08185679465532303, -0.0012992359697818756, 0.00036650151014328003, 0.11260736733675003, -0.4264136552810669, -0.10018692910671234, 0.09387189894914627, -0.31898990273475647, -0.16593553125858307, 0.025395402684807777, 0.2953770160675049, -0.3251481056213379, 0.1266687512397766, -0.167527973651886, 0.24119459092617035, 0.06763908267021179, 0.2005026638507843, -0.049529172480106354, 0.18377143144607544, 0.025339314714074135, 0.04289903864264488, 0.1298457831144333, -0.22542084753513336, -0.1423175036907196, -0.05210864171385765, 0.3205452561378479, 0.10217063128948212, 0.00045901164412498474, 0.05796680599451065, -0.006417076103389263, -0.11583614349365234, -0.1142973005771637, -0.09202855080366135, 0.277622789144516, 0.3569951355457306, -0.3189862072467804, 0.005636461079120636, -0.3019959330558777, -0.09786321222782135, 0.00777580589056015, 0.42298731207847595, 0.2221721112728119, -0.03938533365726471, -0.18060185015201569, 0.009934447705745697, -0.0670611709356308, -0.16392168402671814, 0.3881368637084961, 0.06714189052581787, -0.0684322938323021, 0.048789940774440765, 0.2698668837547302, 0.5018541812896729, -0.2360263466835022, -0.5605530738830566, 0.08420826494693756, -0.3151642978191376, -0.21240663528442383, -0.3700900077819824, 0.08822395652532578, 0.27617621421813965, -0.10645843297243118, 0.05013494938611984, 0.3990446925163269, -0.18929801881313324, 0.11656422168016434, -0.44043657183647156, -0.2546904385089874, 0.007192084565758705, 0.038798313587903976, -0.03357214853167534, -0.25086021423339844, -0.14575034379959106, 0.3366510272026062, -0.13752487301826477, 0.050882626324892044, 0.2727854251861572, 0.22175836563110352, 0.19350183010101318, -0.07023400068283081, -0.012520324438810349, -0.06541986018419266, -0.5470221042633057, 0.034695617854595184, -0.09500102698802948, 0.42908671498298645, -0.007294788956642151, 0.09134317934513092, 0.14630761742591858, -0.057468608021736145, -0.2194220870733261, -0.11022627353668213, 0.0015849955379962921, -0.2296859323978424, -0.018134552985429764, 0.17052000761032104, -0.09651653468608856, -0.17476098239421844, 0.01368633471429348, 0.2303232103586197, -0.4198419153690338, 0.21054908633232117, -0.21021302044391632, -0.43163013458251953, -0.2027973085641861, -0.12070909887552261, -0.26581844687461853, -0.1366969496011734, -0.2471279799938202, 0.03174671530723572, -0.2937151789665222, -0.024292729794979095, -0.021921932697296143, 0.44659513235092163, 0.353535532951355, -0.4185464084148407, 0.09606342017650604, -0.2039048969745636, 0.05430025979876518, -0.09442416578531265, -0.17798122763633728, 0.1937713921070099, -0.2655308246612549, 0.2218671441078186, 0.0622493177652359, 0.08454853296279907, -0.0982310026884079, 0.08468587696552277, -0.2007940709590912, 0.04031676799058914, 0.026842009276151657, 0.2826348543167114, 0.26173627376556396, -0.03072819672524929, -0.1640806943178177, 0.3843741714954376, 0.7712840437889099, 0.22006261348724365, 0.004162941128015518, 0.18550392985343933, 0.06849311292171478, -0.13838818669319153, -0.2919831871986389, -0.25608140230178833, 0.18298961222171783, -0.07922907173633575, 0.02775617316365242, 0.06917613744735718, -0.11162291467189789, 0.03671923652291298, 0.23131820559501648, 0.2731524705886841, -0.00397145003080368, 0.08786463737487793, 0.39240047335624695, 0.12694774568080902, -0.05968618392944336, -0.07526971399784088, 0.1465490609407425, 0.16414210200309753, -0.21932725608348846, 0.012543613091111183, -0.137926384806633, -0.06505667418241501, 0.09025802463293076, 0.05965423583984375, -0.3185702860355377, -0.3496055006980896, 0.22237607836723328, 0.11793176829814911, -0.0026531610637903214, 0.32696813344955444, 0.17222556471824646, -0.022534504532814026, 0.05291924625635147, -0.11508379131555557, -0.0832122266292572, -0.392343133687973, -0.4076903760433197, -0.009523572400212288, 0.4277975559234619, 0.16652242839336395, -0.09663549065589905, -0.05194716155529022, -0.2906085252761841, -0.11399268358945847, -0.6097027063369751, 0.35518068075180054, -0.3738597631454468, 0.42782890796661377, -0.13681809604167938, 0.2860463559627533, -0.4543651342391968, -0.06071881577372551, 0.3598083555698395, -0.3194219470024109, -0.2685779631137848, 0.08633428066968918, -0.019857998937368393, -0.0580555759370327, -0.15655513107776642, -0.6044723987579346, -0.1301186978816986, -0.17163744568824768, 0.3883112668991089, 0.03776633366942406, 0.05772143602371216, 0.16239608824253082, 0.10009929537773132, 0.4368855357170105, 0.08363919705152512, -0.13278473913669586, 0.07247363030910492, -0.06842149049043655, 0.37809666991233826, -0.23094014823436737, -0.31763961911201477, -0.09951377660036087, 0.21584545075893402, -0.15009146928787231, -0.10907475650310516, -0.3428519368171692, -0.30404260754585266, -0.36142802238464355, 0.3931970000267029, -0.08015453815460205, -0.045943424105644226, 0.3395406901836395, 0.28749361634254456, 0.05759812891483307, 0.10201292484998703, -0.4317057430744171, 0.4576949179172516, 0.7315326929092407, 0.07669925689697266, -0.018349800258874893, 0.5675569176673889, 0.09972304105758667, 0.8816773295402527, 0.11158633232116699, -0.16686488687992096, 0.2578709125518799, 0.03670848160982132, 0.041922926902770996, -0.4832927882671356, 0.030323991551995277, 0.21135397255420685, -0.06427840888500214, 0.02735903114080429, 0.193528413772583, -0.015292547643184662, -0.1945045441389084, -0.12089897692203522, 0.18149515986442566, -0.22886738181114197, -0.31780365109443665, 0.1604895442724228, -0.22343215346336365, -0.16287687420845032, 0.16666077077388763, -0.0731891319155693, -0.18997018039226532, -0.35457155108451843, -0.1877986192703247, -0.0863390862941742, 0.358519047498703, -0.02912551909685135, -0.6207340359687805, -0.10963663458824158, -0.4323073625564575, 0.3310402035713196, 0.13975118100643158, 0.2593173384666443, -0.3684086203575134, -0.07283485680818558, 0.2251548022031784, -0.2911624014377594, 0.22689701616764069, -0.212763249874115, -0.09708784520626068, 0.16069510579109192, 0.04680749773979187, -0.2511031925678253, -0.07507302612066269, -0.1435154676437378, 0.19129587709903717, 0.494972288608551, -0.1217658519744873, -0.3668164312839508, -0.29914557933807373, 0.3354329466819763, 0.11438450217247009, -0.05475838854908943, 0.23816968500614166, -0.2625127136707306, -0.06755054742097855, -0.4722186028957367, -0.07329145818948746, 0.4041701853275299, -0.11681133508682251, -0.058625802397727966, 0.0688982754945755, 0.1878000795841217, 0.13273733854293823, 0.006149642169475555, 0.3224436938762665, -0.0995451956987381, -0.07686776667833328, 0.4044605493545532, 0.20920932292938232, -0.06738987565040588, -0.3526376783847809, 0.3883753716945648, -0.06103305146098137, -0.40783071517944336, 0.49940213561058044, -0.14459387958049774, 0.3027714490890503, 0.44824114441871643, 0.19308121502399445, -0.14041399955749512, -0.006849898025393486, 0.18199390172958374, 0.377697616815567, 0.012854749336838722, 0.5262823104858398, 0.2901245057582855, -0.019792599603533745, -0.12192407250404358, 0.16508567333221436, -0.1874382495880127, 0.018332548439502716, 0.4783313274383545, -0.028626449406147003, 0.03834199905395508, 0.5677283406257629, 0.03814329952001572, 0.975856363773346, -0.26992154121398926, 0.27438461780548096, 0.19873613119125366, 0.009300164878368378, 0.4218444526195526, -0.1443619430065155, 0.26983165740966797, -0.5266183018684387, -0.2899634838104248, 0.2433762103319168, -0.21693380177021027, -0.2555150091648102, 0.18281997740268707, -0.22179920971393585, 0.07404270023107529, 0.007710561156272888, 0.16222624480724335, -0.011571085080504417, 0.298412561416626, 0.11527629941701889, -0.281902939081192, -0.47213879227638245, 0.048728108406066895, -0.10493917763233185, 0.2490486055612564, -0.003068257123231888, -0.17824871838092804, -0.3353840708732605, -0.09180834889411926, -0.22920829057693481, 0.29336559772491455, -0.11976220458745956, 0.10475314408540726, 0.23876404762268066, -0.06027619540691376, 0.1600339114665985, 0.694714367389679, 0.1500718593597412, -0.08868445456027985, 0.01654856838285923, 0.1643882840871811, -0.04448980838060379, 0.06889630854129791, 0.40288040041923523, 0.03732748329639435, 0.2904086112976074, -0.2089940309524536, -0.21035204827785492, 0.07693424820899963, 0.15171484649181366, -0.17903250455856323, -0.1565600484609604, -0.10596500337123871, 0.09318363666534424, -0.06383515894412994, 0.0012958114966750145, 0.025658968836069107, -0.5122883915901184, 0.03545823320746422, 0.015442714095115662, -0.11626334488391876, 0.06674480438232422, 0.28268587589263916, 0.174696683883667, -0.10206186026334763, 0.12296564877033234, 0.6355888247489929, -0.3503250777721405, -0.11246644705533981, 0.7513549327850342, 0.22713910043239594, -0.032982826232910156, -0.10538550466299057, 0.2558535933494568, -0.30117174983024597, -0.5768543481826782, 0.041504867374897, -0.3038908541202545, -0.2306891232728958, 0.1752115786075592, 0.34049636125564575, -0.1392199844121933, -0.23990875482559204, -0.07728148251771927, -0.20007935166358948, -0.3080744743347168, 0.21298246085643768, -0.08999887108802795, 0.048635903745889664, -0.10461434721946716, 0.36744019389152527, 0.18636970221996307, -0.04124307632446289, -0.15336604416370392, 0.012669297866523266, -0.3003517687320709, 0.27980712056159973, 0.17588508129119873, -0.4567349851131439, 0.2779485285282135, -0.059913620352745056, -0.033616457134485245, 0.31186532974243164, -0.24658840894699097, -0.10952109098434448, 0.017913907766342163, 0.19418500363826752, -0.04064963012933731, -0.09901894629001617, -0.33050474524497986, 0.0980892926454544, -0.14015041291713715, -0.2644594609737396, 0.2234961837530136, -0.2495928406715393, -0.025218091905117035, 0.1089906096458435, -0.10777361690998077, 0.2229650318622589, 0.09805585443973541, 0.024152981117367744, 0.08001969754695892, 0.09132030606269836, 0.3303561806678772, 0.22631052136421204, 0.007386805489659309, -0.022794950753450394, -0.37007081508636475, 0.05255572125315666, 0.020917274057865143, 0.07196496427059174, 0.24834787845611572, -0.331092894077301, -0.03879159688949585, -0.17852997779846191, -0.1730988621711731, 0.5225907564163208, -0.12723766267299652, -0.2101670801639557, 0.23996078968048096, 0.05576029419898987, 0.02259274199604988, 0.18834362924098969, 0.5434417128562927, -0.04006385803222656, -0.005035270005464554, -0.08924377709627151, 0.008285492658615112, 0.030579611659049988, 0.14352597296237946, 0.24473127722740173, 0.3117623031139374, -0.6137399077415466, 0.09800270199775696, 0.2173488587141037, -0.06617937982082367, 0.11763156950473785, 0.06744183599948883, -0.07327176630496979, 0.1785862147808075, 0.13441742956638336, -0.03794873505830765, -0.23058165609836578, -0.4712121784687042, 0.5559194684028625, 0.4206787943840027, -0.1522444784641266, -0.31232964992523193, 0.44495952129364014, 0.2855586111545563, 0.47896453738212585, 0.318617045879364, 0.39015132188796997, -0.05378279462456703, -0.3576957583427429, -0.37695154547691345, 0.32571902871131897, -0.0997566357254982, -0.07643845677375793, -0.017446160316467285, -0.11039316654205322, -0.11507607996463776, 0.2794768810272217, -0.33628055453300476, 0.1715211123228073, 0.3045945465564728, 0.5075875520706177, 0.07873328775167465, -0.24558000266551971, -0.23726415634155273, -0.07035218924283981, 0.420848548412323, 0.03863396868109703, 0.40224766731262207, -0.10574428737163544, -0.10162630677223206, -0.3066695034503937, 0.30728811025619507, 0.19769124686717987, 0.293512225151062, -0.6400919556617737, 0.38755783438682556, 0.13211414217948914, -0.005910845473408699, 0.2638385593891144, 0.22802075743675232, 0.2538408637046814, -0.05956272408366203, 0.15458548069000244, -0.05928167700767517, -0.02488941326737404, -0.302714467048645, -0.0009208731353282928, 0.2783118486404419, 0.08328260481357574, -0.06093236058950424, 0.2151123285293579, -0.21643772721290588, 0.03760511800646782, -0.12631630897521973, -0.39470675587654114, 0.1769418567419052, -0.1372813582420349, -0.05082450807094574, -0.03806181997060776, -0.07983546704053879, 0.022410482168197632, 0.13555753231048584, 0.5751463174819946, 0.16749584674835205, 0.10273648798465729, -0.07043061405420303, 0.16212011873722076, -0.6096412539482117, 0.20658555626869202, 0.24510864913463593, 0.10280907154083252, 0.28632259368896484, 0.31934380531311035, 0.258785605430603, 0.4257705807685852, 0.24578890204429626, -0.21196797490119934, -0.15582816302776337, 0.4385864734649658, -0.5146774053573608, -0.0335092656314373, 0.08347391337156296, 0.16156062483787537, -0.09929029643535614, -0.20350927114486694, -0.025434155017137527, -0.12458164989948273, -0.09277404844760895, -0.26289093494415283, -0.28070011734962463, -0.06324158608913422, 0.14149409532546997, 0.22779212892055511, 0.2979302704334259, 0.12246231734752655, -0.03146333619952202, -0.2810337543487549, -0.15682730078697205, -0.2138565331697464, -0.05363889038562775, 0.0513218492269516, -0.031286854296922684, 0.12453639507293701, -0.0799805074930191, 0.36010128259658813, -0.42781808972358704, -0.040199629962444305, -0.08390409499406815, 0.2810070812702179, -0.07737043499946594, -0.2369510382413864, 0.39890798926353455, 0.24452374875545502, -0.03964081034064293, 0.5937415957450867, -0.05210790038108826, -0.03061755746603012, -0.6759066581726074, 0.08819179236888885, 0.3299506902694702, -0.32462093234062195, -0.15717366337776184, 0.16680563986301422, 0.07937637716531754, 0.3383035957813263, 0.08518120646476746, -0.4567793607711792, -0.050046324729919434, 0.06779978424310684, -0.25925779342651367, -0.5594131350517273, 0.14714926481246948, 0.403205543756485, 0.16898725926876068, -0.22048655152320862, 0.1316615641117096, -0.046354472637176514, 0.05226815491914749, -0.2600911855697632, -0.2189253568649292 ]
https://github.com/huggingface/datasets/issues/482
Bugs : dataset.map() is frozen on ELI5
I got this issue too and fixed it by specifying `writer_batch_size=3_000` in `.map`. This is because Arrow didn't expect `Thepiratebay.vg` in `title_urls `, as all previous examples have empty lists in `title_urls `
Hi Huggingface Team! Thank you guys once again for this amazing repo. I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb) However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process. Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow. ---------------------------------------- **More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object) I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ?
33
Bugs : dataset.map() is frozen on ELI5 Hi Huggingface Team! Thank you guys once again for this amazing repo. I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb) However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process. Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow. ---------------------------------------- **More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object) I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ? I got this issue too and fixed it by specifying `writer_batch_size=3_000` in `.map`. This is because Arrow didn't expect `Thepiratebay.vg` in `title_urls `, as all previous examples have empty lists in `title_urls `
[ 0.08828778564929962, -0.08221673965454102, -0.08991090953350067, 0.10879343748092651, 0.11859764903783798, -0.08892408013343811, 0.47578784823417664, 0.2081894725561142, -0.27536627650260925, 0.1408071219921112, -0.21474240720272064, 0.47158318758010864, 0.16467948257923126, 0.06168193370103836, -0.11624224483966827, 0.15378646552562714, -0.15851393342018127, 0.03611093759536743, -0.04351840168237686, -0.0942484587430954, 0.08815273642539978, 0.3064976632595062, -0.32448089122772217, 0.13710692524909973, -0.24131391942501068, 0.20197594165802002, -0.06759902089834213, -0.04923316091299057, -0.13386695086956024, -0.39873912930488586, 0.09029008448123932, 0.011053578928112984, -0.053993821144104004, 0.1521511971950531, -0.0001268103951588273, 0.06411457061767578, 0.12590688467025757, -0.04473832994699478, -0.0788736343383789, 0.051874615252017975, 0.24802932143211365, -0.030109114944934845, 0.38392210006713867, -0.22320586442947388, 0.1997656226158142, 0.20427824556827545, 0.38200557231903076, 0.09851184487342834, 0.56449294090271, -0.09399253875017166, 0.014540497213602066, 0.2681629955768585, -0.08777180314064026, 0.4349067211151123, 0.29067185521125793, -0.1680418998003006, -0.35191935300827026, -0.04000604897737503, 0.3742506206035614, -0.0923331156373024, 0.08321976661682129, -0.04795055463910103, -0.02009066566824913, -0.04594818875193596, 0.1264985054731369, 0.47764021158218384, 0.033144403249025345, -0.7292934656143188, 0.11014818400144577, 0.2397383451461792, 0.4590659439563751, -0.16017818450927734, -0.091227225959301, -0.1838953197002411, 0.008833182975649834, -0.35790738463401794, 0.4505927264690399, -0.029940513893961906, -0.0901346206665039, 0.01853865757584572, -0.07432203739881516, -0.040400899946689606, -0.08833985775709152, 0.22760897874832153, 0.10974124073982239, 0.11798219382762909, 0.020053710788488388, 0.1539667546749115, -0.05904370918869972, 0.01568165235221386, -0.1864432990550995, -0.20577943325042725, -0.10966230928897858, 0.32395341992378235, -0.6241598129272461, -0.2234707772731781, -0.1515572965145111, -0.07372764497995377, 0.031562868505716324, 0.06606750190258026, 0.23268572986125946, 0.21300411224365234, 0.10603126883506775, 0.05762290582060814, 0.4097138047218323, -0.059415288269519806, 0.3594405949115753, 0.1525260955095291, 0.29011476039886475, -0.08995365351438522, -0.31816208362579346, 0.19088095426559448, -0.05225885286927223, -0.23663124442100525, 0.0019145086407661438, -0.17777088284492493, 0.10454097390174866, -0.2911320924758911, 0.2693876326084137, 0.07566531002521515, -0.612270176410675, -0.012722056359052658, -0.035284578800201416, 0.310682088136673, -0.13874515891075134, -0.019066903740167618, -0.04204209893941879, 0.04419304430484772, -0.37192192673683167, -0.059858061373233795, 0.08679264038801193, -0.44582247734069824, -0.12685157358646393, 0.029203839600086212, 0.2845350205898285, -0.2773244380950928, 0.2217060625553131, -0.23485861718654633, 0.20518723130226135, 0.0649377852678299, 0.28846243023872375, -0.019945763051509857, 0.1899873912334442, 0.06483177095651627, 0.13713806867599487, 0.20411168038845062, -0.279910147190094, -0.11497814953327179, -0.09125840663909912, 0.3285958468914032, 0.05300360545516014, -0.0008450597524642944, 0.0881710946559906, -0.06156981363892555, -0.14742887020111084, -0.09721164405345917, -0.03267986327409744, 0.15814824402332306, 0.35671988129615784, -0.2990531623363495, 0.09318318963050842, -0.16066643595695496, -0.07425781339406967, -0.01578655280172825, 0.36953800916671753, 0.24574318528175354, -0.011287800967693329, -0.18034209311008453, -0.06443942338228226, -0.00774620845913887, -0.21455499529838562, 0.3933415412902832, 0.01731644757091999, -0.05145619064569473, 0.05834636092185974, 0.2661237120628357, 0.4861610233783722, -0.22090840339660645, -0.5594331622123718, 0.12410961836576462, -0.2801660895347595, -0.2539255619049072, -0.32754749059677124, 0.0745498389005661, 0.29650914669036865, -0.1045866310596466, 0.07226590812206268, 0.3634408116340637, -0.09346739947795868, 0.03327708691358566, -0.40796834230422974, -0.31768324971199036, -0.07369047403335571, 0.01675691455602646, -0.1066102683544159, -0.33475667238235474, -0.14682403206825256, 0.2155669629573822, -0.07632612437009811, 0.047152455896139145, 0.29311054944992065, 0.32030200958251953, 0.1911579817533493, -0.012834489345550537, 0.009058015421032906, -0.004215899854898453, -0.5717049241065979, 0.09013926237821579, -0.07802854478359222, 0.30076146125793457, -0.0624995082616806, 0.04686231166124344, 0.23475372791290283, -0.04515688866376877, -0.223261758685112, -0.13619856536388397, -0.06943343579769135, -0.23991337418556213, -0.010919155552983284, 0.23015867173671722, -0.07368931174278259, -0.3139733374118805, -0.008088188245892525, 0.18401648104190826, -0.3748854696750641, 0.16144229471683502, -0.12601996958255768, -0.36166056990623474, -0.25819259881973267, -0.09899310022592545, -0.3698381185531616, -0.16569486260414124, -0.16134661436080933, 0.06326338648796082, -0.32587382197380066, -0.015321791172027588, 0.026987092569470406, 0.41644948720932007, 0.29375842213630676, -0.4194701015949249, 0.12388391047716141, -0.13808242976665497, 0.09722361713647842, -0.09550664573907852, -0.1869749128818512, 0.18914027512073517, -0.25335630774497986, 0.2792414724826813, 0.09496891498565674, 0.03883785009384155, -0.08843699842691422, 0.06005913391709328, -0.15941491723060608, -0.011924341320991516, 0.05881805345416069, 0.30350005626678467, 0.38377678394317627, 0.0009235367178916931, -0.0879841297864914, 0.3538530766963959, 0.806647777557373, 0.2237536907196045, 0.031029384583234787, 0.15390291810035706, -0.0020599141716957092, -0.11634466052055359, -0.3227669298648834, -0.24877656996250153, 0.17056673765182495, -0.08707994967699051, 0.022992704063653946, -0.0028439536690711975, -0.06160333752632141, -0.07142620533704758, 0.252310574054718, 0.30503755807876587, 0.041459012776613235, 0.07128480821847916, 0.37090978026390076, 0.12042853981256485, -0.05787181481719017, -0.11692667007446289, 0.16720443964004517, 0.12589584290981293, -0.19205723702907562, 0.011905169114470482, -0.06553711742162704, 0.0032776296138763428, 0.1812359094619751, 0.03103550523519516, -0.32197389006614685, -0.2996346354484558, 0.20127664506435394, 0.04193834960460663, -0.06657847762107849, 0.2993479073047638, 0.15965011715888977, -0.07705007493495941, 0.05526353418827057, -0.14538486301898956, -0.057479120790958405, -0.4903113842010498, -0.3879304528236389, -0.04610704630613327, 0.43493619561195374, 0.06950819492340088, -0.1548341065645218, -0.0031810589134693146, -0.3482363820075989, -0.055778078734874725, -0.6003729701042175, 0.345295250415802, -0.3194223642349243, 0.3828050494194031, -0.1645488440990448, 0.27902570366859436, -0.46310269832611084, -0.03670382499694824, 0.31098854541778564, -0.32872849702835083, -0.2486945539712906, 0.06507658958435059, 0.017602041363716125, -0.07215765118598938, -0.18474560976028442, -0.5815079212188721, -0.04769044369459152, -0.15397891402244568, 0.45270270109176636, -0.004160456359386444, 0.05964123457670212, 0.12430855631828308, 0.07470167428255081, 0.4305660128593445, 0.029844192788004875, -0.1916428506374359, 0.12105828523635864, -0.10549715161323547, 0.40083983540534973, -0.2193356156349182, -0.3028170168399811, -0.07815104722976685, 0.1628536581993103, -0.12729258835315704, -0.09849569946527481, -0.3735525608062744, -0.19858528673648834, -0.3790394365787506, 0.3669740557670593, -0.07187402248382568, -0.016754930838942528, 0.3793860971927643, 0.3064505159854889, 0.07222845405340195, 0.05809875577688217, -0.38914480805397034, 0.5050680041313171, 0.6757684946060181, 0.009298242628574371, -0.008964892476797104, 0.5026323199272156, 0.07091063261032104, 0.9094948172569275, 0.1167578250169754, -0.08802837133407593, 0.22450749576091766, 0.06750137358903885, 0.028425149619579315, -0.39037731289863586, 0.16017666459083557, 0.13164059817790985, -0.04012444615364075, 0.03880707919597626, 0.23642940819263458, 0.03804902732372284, -0.24840505421161652, -0.12274055182933807, 0.1951133906841278, -0.2875276505947113, -0.31682685017585754, 0.18476799130439758, -0.25518226623535156, -0.16882511973381042, 0.17403694987297058, -0.07659845799207687, -0.1780080795288086, -0.3751819431781769, -0.1998482644557953, -0.19060935080051422, 0.37796494364738464, -0.10552855581045151, -0.6005116105079651, -0.04630470275878906, -0.4620148539543152, 0.3174308240413666, 0.12002652883529663, 0.2238004356622696, -0.2955450117588043, -0.05640546232461929, 0.24464641511440277, -0.3228533864021301, 0.2590312361717224, -0.2851566970348358, -0.0492563471198082, 0.16127292811870575, 0.06852096319198608, -0.37266263365745544, -0.004668544977903366, -0.17730766534805298, 0.17472025752067566, 0.4599060118198395, -0.228153258562088, -0.39757534861564636, -0.3105403780937195, 0.23595240712165833, 0.03750920295715332, -0.06589984893798828, 0.173364520072937, -0.25947806239128113, -0.018364863470196724, -0.4175836443901062, -0.12618672847747803, 0.34294527769088745, -0.16509731113910675, -0.061080388724803925, 0.011226829141378403, 0.17401465773582458, 0.13274416327476501, -0.05990596115589142, 0.29885226488113403, -0.11465565115213394, -0.12760485708713531, 0.44246265292167664, 0.30409449338912964, -0.06188357621431351, -0.3205316960811615, 0.35525113344192505, -0.09547741711139679, -0.3660571575164795, 0.4882129728794098, -0.21890468895435333, 0.3159545063972473, 0.4747318923473358, 0.21333001554012299, -0.035787634551525116, -0.02340671792626381, 0.14477312564849854, 0.4186308979988098, -0.06039917841553688, 0.541878879070282, 0.27954161167144775, -0.016121506690979004, -0.1286262720823288, 0.17256617546081543, -0.17083801329135895, -0.03551865741610527, 0.6318170428276062, -0.11379067599773407, 0.003875747323036194, 0.5671448707580566, 0.06367030739784241, 0.9373645186424255, -0.28211134672164917, 0.3562496304512024, 0.12912778556346893, -0.03945110738277435, 0.4074743390083313, -0.12942680716514587, 0.26502034068107605, -0.49181029200553894, -0.21748565137386322, 0.21991127729415894, -0.21496854722499847, -0.2647084891796112, 0.274719774723053, -0.1567387729883194, 0.050697892904281616, -0.0032420456409454346, 0.19922247529029846, -0.026116734370589256, 0.2922622561454773, 0.1135445237159729, -0.25822117924690247, -0.39263811707496643, -0.010197078809142113, -0.0051296912133693695, 0.17105697095394135, -0.06187421455979347, -0.17056070268154144, -0.34961357712745667, -0.09659695625305176, -0.17933836579322815, 0.27966728806495667, -0.18149220943450928, 0.14459165930747986, 0.2455640584230423, -0.03412190079689026, 0.17030364274978638, 0.7178624868392944, 0.06091558560729027, -0.05059955641627312, -0.03078865446150303, 0.2548997104167938, -0.012406177818775177, 0.0887356847524643, 0.396490216255188, 0.03445756435394287, 0.22118090093135834, -0.18015077710151672, -0.23988136649131775, 0.04774845391511917, 0.10241016000509262, -0.23378856480121613, -0.16097001731395721, 0.04781711846590042, 0.13982301950454712, 0.022707324475049973, -0.06232473626732826, 0.07401995360851288, -0.57652747631073, 0.05392206087708473, -0.018633127212524414, -0.05470602214336395, 0.09970920532941818, 0.2908632755279541, 0.13462530076503754, -0.17073750495910645, 0.1136576384305954, 0.677593469619751, -0.3244537115097046, -0.10862547904253006, 0.7458802461624146, 0.17956344783306122, 0.001409720629453659, -0.09491633623838425, 0.24768322706222534, -0.24787187576293945, -0.6283712983131409, 0.033757444471120834, -0.24838818609714508, -0.21200546622276306, 0.23437905311584473, 0.3080376982688904, -0.19999893009662628, -0.19756269454956055, -0.14694131910800934, -0.2412346452474594, -0.24239607155323029, 0.24985171854496002, -0.05834609642624855, 0.006816066801548004, -0.17255312204360962, 0.27411264181137085, 0.20160768926143646, -0.088167205452919, -0.10533524304628372, 0.07645273208618164, -0.26921504735946655, 0.274349570274353, 0.10369674861431122, -0.3691767454147339, 0.41516876220703125, -0.12323300540447235, -0.0757555142045021, 0.27671629190444946, -0.27410125732421875, -0.0830467939376831, -0.016344934701919556, 0.2227386236190796, -0.0710495114326477, -0.10543548315763474, -0.32803288102149963, 0.04088391363620758, -0.14281894266605377, -0.28723227977752686, 0.21286749839782715, -0.2900466322898865, -0.04481525719165802, 0.004210452549159527, -0.08808836340904236, 0.2888961136341095, -0.06186845526099205, 0.1017446517944336, -0.0217924565076828, 0.07685282081365585, 0.314034640789032, 0.19666095077991486, 0.054464198648929596, -0.007614821195602417, -0.26826000213623047, 0.010534785687923431, -0.05051450431346893, 0.09355135262012482, 0.29865574836730957, -0.3337078094482422, -0.04110075160861015, -0.18842460215091705, -0.1477084755897522, 0.5953745245933533, -0.09768103808164597, -0.3353040814399719, 0.23714524507522583, 0.026058606803417206, 0.08232349902391434, 0.20018424093723297, 0.5208048820495605, 0.06389617919921875, 0.012135449796915054, -0.13590407371520996, -0.0063772909343242645, -0.0324634313583374, 0.10205474495887756, 0.3046661913394928, 0.2812545895576477, -0.625497043132782, 0.08142393827438354, 0.2558403015136719, -0.021499257534742355, 0.14137765765190125, 0.044964227825403214, -0.06645618379116058, 0.2502105236053467, 0.14686909317970276, 0.09697892516851425, -0.22329159080982208, -0.35491156578063965, 0.5749949812889099, 0.3272983729839325, -0.21096087992191315, -0.2955936789512634, 0.3983948230743408, 0.29514583945274353, 0.5204430222511292, 0.341026246547699, 0.4236571788787842, 0.03084588795900345, -0.2934631109237671, -0.32529380917549133, 0.282375693321228, -0.019791506230831146, -0.1260683536529541, -0.04599898308515549, -0.11142918467521667, -0.05307094380259514, 0.2995017468929291, -0.3030308187007904, 0.16529420018196106, 0.3224518895149231, 0.4959096908569336, 0.04240214079618454, -0.363429456949234, -0.1948481798171997, -0.06756456941366196, 0.44072777032852173, 0.017391737550497055, 0.3731262683868408, -0.10212914645671844, -0.10704272985458374, -0.34449833631515503, 0.2899487614631653, 0.11523625254631042, 0.27054721117019653, -0.5767050981521606, 0.42797112464904785, 0.13246630132198334, 0.03308830410242081, 0.1897372007369995, 0.20662344992160797, 0.30992943048477173, -0.11026495695114136, 0.09747348725795746, -0.0849168598651886, -0.002060873433947563, -0.28660687804222107, 0.07054992020130157, 0.33290767669677734, 0.16784021258354187, -0.10490325838327408, 0.20678970217704773, -0.27999839186668396, 0.0762467086315155, -0.09785359352827072, -0.41347187757492065, 0.22586311399936676, -0.118228018283844, -0.11131086200475693, -0.05208957567811012, -0.13249407708644867, -0.0013127271085977554, 0.12766149640083313, 0.6129341125488281, 0.19306476414203644, 0.12462172657251358, -0.026708301156759262, 0.0825607180595398, -0.5853531360626221, 0.19251936674118042, 0.13872401416301727, 0.20849058032035828, 0.2797991633415222, 0.3135424256324768, 0.23338130116462708, 0.3741551637649536, 0.24463823437690735, -0.17704980075359344, -0.24622099101543427, 0.4191221594810486, -0.6102458238601685, 0.010173643007874489, 0.07435226440429688, 0.18793132901191711, -0.10642584413290024, -0.22507795691490173, -0.02300330623984337, -0.15625040233135223, -0.13905373215675354, -0.2743954062461853, -0.26823678612709045, -0.023182597011327744, 0.14951619505882263, 0.3450469374656677, 0.23636510968208313, 0.06823659688234329, -0.030012909322977066, -0.27217909693717957, -0.1444946676492691, -0.21297156810760498, 0.01347834151238203, 0.09942878037691116, 0.06853137910366058, 0.057565994560718536, -0.1969742327928543, 0.2913993299007416, -0.3510698080062866, -0.017966950312256813, -0.14659640192985535, 0.3190271556377411, -0.03367186337709427, -0.3093467056751251, 0.40596529841423035, 0.27053794264793396, -0.0823313444852829, 0.5921953916549683, -0.11569228768348694, -0.09279544651508331, -0.6072291731834412, 0.10544335842132568, 0.3132186233997345, -0.3774881958961487, -0.13973738253116608, 0.16716134548187256, 0.14995020627975464, 0.3385229706764221, 0.049834705889225006, -0.4270491302013397, -0.02751467376947403, 0.11067138612270355, -0.22970372438430786, -0.6133560538291931, 0.06107558310031891, 0.4153713285923004, 0.1881701946258545, -0.2335267812013626, 0.18610142171382904, -0.045926451683044434, -0.030169326812028885, -0.21572813391685486, -0.24376747012138367 ]
https://github.com/huggingface/datasets/issues/478
Export TFRecord to GCP bucket
Nevermind, I restarted my python session and it worked fine... --- I had an authentification error, and I authenticated from another terminal. After that, no more error but it was not working. Restarting the sessions makes it work :)
Previously, I was writing TFRecords manually to GCP bucket with : `with tf.io.TFRecordWriter('gs://my_bucket/x.tfrecord')` Since `0.4.0` is out with the `export()` function, I tried it. But it seems TFRecords cannot be directly written to GCP bucket. `dataset.export('local.tfrecord')` works fine, but `dataset.export('gs://my_bucket/x.tfrecord')` does not work. There is no error message, I just can't find the file on my bucket... --- Looking at the code, `nlp` is using `tf.data.experimental.TFRecordWriter`, while I was using `tf.io.TFRecordWriter`. **What's the difference between those 2 ? How can I write TFRecords files directly to GCP bucket ?** @jarednielsen @lhoestq
39
Export TFRecord to GCP bucket Previously, I was writing TFRecords manually to GCP bucket with : `with tf.io.TFRecordWriter('gs://my_bucket/x.tfrecord')` Since `0.4.0` is out with the `export()` function, I tried it. But it seems TFRecords cannot be directly written to GCP bucket. `dataset.export('local.tfrecord')` works fine, but `dataset.export('gs://my_bucket/x.tfrecord')` does not work. There is no error message, I just can't find the file on my bucket... --- Looking at the code, `nlp` is using `tf.data.experimental.TFRecordWriter`, while I was using `tf.io.TFRecordWriter`. **What's the difference between those 2 ? How can I write TFRecords files directly to GCP bucket ?** @jarednielsen @lhoestq Nevermind, I restarted my python session and it worked fine... --- I had an authentification error, and I authenticated from another terminal. After that, no more error but it was not working. Restarting the sessions makes it work :)
[ 0.10430847108364105, -0.01965557038784027, 0.041873056441545486, 0.11389406025409698, 0.03208225220441818, -0.1475578248500824, 0.19832786917686462, 0.13782651722431183, -0.42943811416625977, 0.10862131416797638, -0.25990909337997437, 0.23671115934848785, -0.27702900767326355, 0.19022010266780853, 0.4431500732898712, 0.04588240385055542, -0.1624469757080078, -0.08847552537918091, -0.06136210262775421, -0.2464277446269989, -0.207800030708313, 0.3399341106414795, -0.16332373023033142, 0.12985749542713165, -0.16363883018493652, -0.3291427791118622, -0.13920526206493378, 0.010079916566610336, 0.21589753031730652, -0.0817750096321106, 0.15312986075878143, -0.15727299451828003, 0.29362350702285767, 0.35484662652015686, -0.00012417764810379595, 0.05572448670864105, 0.03624940663576126, -0.2642902731895447, -0.10047103464603424, -0.15857766568660736, -0.3611398935317993, 0.06759513169527054, 0.07434026896953583, -0.2352464497089386, 0.03700259327888489, 0.1353314220905304, 0.5893600583076477, 0.257575660943985, -0.18711642920970917, 0.4628816843032837, 0.11160875111818314, 0.46207815408706665, 0.15331311523914337, 0.17133289575576782, -0.11466272920370102, -0.24067170917987823, -0.3874955475330353, 0.05664413422346115, -0.1590556800365448, 0.15803353488445282, 0.14336536824703217, -0.10983769595623016, 0.0033528823405504227, -0.20574159920215607, 0.3163112699985504, 0.11105459183454514, -0.10727418214082718, -0.3120270371437073, -0.003148980438709259, 0.1946420967578888, 0.6180039048194885, -0.5000041127204895, -0.5036094784736633, 0.06475526839494705, -0.04920139163732529, -0.20398898422718048, 0.31153637170791626, 0.4222569763660431, 0.35105279088020325, 0.15105530619621277, -0.2972365915775299, -0.1687380075454712, -0.30583804845809937, 0.17910954356193542, -0.09492567926645279, 0.6592952013015747, -0.06307606399059296, 0.09788241982460022, -0.2444780319929123, 0.06062405928969383, 0.1662692427635193, -0.04854965955018997, -0.13367733359336853, 0.3695763349533081, -0.14328782260417938, -0.34991616010665894, 0.25285661220550537, 0.4646790623664856, -0.551558256149292, 0.31661027669906616, 0.3559379279613495, -0.19434085488319397, -0.00899429339915514, 0.008428454399108887, -0.008709270507097244, 0.04391463100910187, 0.3559092879295349, 0.4459601044654846, 0.06519830971956253, -0.3567686378955841, 0.07061660289764404, -0.17426162958145142, -0.06491317600011826, -0.28466224670410156, -0.1426866054534912, 0.04462252929806709, 0.03793935477733612, -0.13748322427272797, 0.09490256011486053, -0.14904460310935974, -0.0987594872713089, 0.1095612645149231, -0.3324384391307831, 0.08815762400627136, 0.07842499762773514, -0.2568167746067047, 0.27719956636428833, -0.026695698499679565, -0.6436522006988525, 0.052790697664022446, -0.049550317227840424, 0.19584928452968597, 0.15716411173343658, -0.041106753051280975, -0.04437742382287979, 0.033803343772888184, 0.022476017475128174, -0.22910542786121368, 0.050984323024749756, 0.26166969537734985, 0.36016330122947693, -0.04543830454349518, -0.1735638678073883, 0.20356349647045135, 0.0390087254345417, 0.24622519314289093, 0.02277136594057083, -0.1490442454814911, -0.28662723302841187, 0.11527033895254135, -0.2529263496398926, -0.30678558349609375, -0.061065174639225006, 0.04156031832098961, -0.1484229564666748, -0.39952075481414795, -0.2166469395160675, 0.0019398778676986694, 0.12320558726787567, -0.36842212080955505, 0.25909656286239624, -0.3070385456085205, -0.08569377660751343, -0.32986387610435486, -0.09418829530477524, 0.13326776027679443, -0.4248114824295044, -0.07912018895149231, -0.01756010763347149, 0.03830771893262863, 0.2924705743789673, 0.2817423343658447, 0.1365847885608673, 0.18329960107803345, 0.06438981741666794, 0.329312801361084, 0.38422542810440063, -0.5604014992713928, 0.035869427025318146, 0.3170735836029053, -0.3729984164237976, -0.14659136533737183, -0.2245299220085144, -0.0009611892164684832, 0.3030160665512085, -0.22778339684009552, -0.03636777400970459, 0.36611777544021606, 0.021781308576464653, 0.1736370176076889, -0.27711915969848633, -0.10504278540611267, 0.024606142193078995, -0.27793893218040466, -0.015945915132761, -0.13104352355003357, 0.40089333057403564, 0.17576654255390167, 0.1823633462190628, -0.07111695408821106, 0.21930037438869476, 0.4072648286819458, 0.36588752269744873, 0.023091893643140793, -0.08362483978271484, 0.07676298171281815, -0.5317684412002563, 0.007354509085416794, -0.22817951440811157, 0.18304981291294098, 0.346696138381958, 0.05876117944717407, 0.19746020436286926, -0.2921525537967682, 0.1712450087070465, -0.1641821414232254, -0.09510413557291031, 0.1215178519487381, 0.1402539610862732, 0.35745418071746826, -0.044107966125011444, 0.2640913426876068, -0.13123464584350586, -0.12293532490730286, -0.26322758197784424, 0.3617306351661682, 0.1286923587322235, -0.32829487323760986, 0.09454172849655151, -0.11861451715230942, 0.08461560308933258, -0.2326749563217163, -0.20193424820899963, 0.37734177708625793, -0.24738825857639313, 0.5208188891410828, 0.049507204443216324, 0.6487160921096802, 0.13134002685546875, -0.24971263110637665, -0.10347547382116318, 0.3585960566997528, -0.05316410958766937, 0.2756618559360504, -0.17375096678733826, 0.5877628922462463, 0.1556873470544815, -0.15259689092636108, 0.3869107961654663, 0.04877912998199463, -0.29781246185302734, -0.13408739864826202, -0.012719489634037018, 0.18181338906288147, 0.12512782216072083, -0.12217821180820465, 0.08846838772296906, -0.12934938073158264, -0.3697168231010437, 0.3899149000644684, 0.6853578090667725, -0.1292416900396347, 0.0035885944962501526, -0.10974887758493423, 0.0905122384428978, -0.0675530731678009, 0.5124894976615906, 0.06257553398609161, 0.20005983114242554, 0.03574291616678238, 0.1346178650856018, -0.11730531603097916, -0.23657220602035522, -0.10881787538528442, 0.3869113624095917, -0.1922743171453476, -0.22258317470550537, -0.010299280285835266, -0.00869467481970787, 0.25648021697998047, -0.13294632732868195, -0.06025657802820206, 0.08565377444028854, 0.3868996202945709, -0.49798062443733215, 0.07024743407964706, -0.44111472368240356, -0.19884002208709717, -0.10711710155010223, 0.3426576852798462, -0.32053142786026, -0.3273084759712219, 0.0365755520761013, 0.04011068493127823, -0.16477087140083313, -0.004950639791786671, -0.11512483656406403, 0.0103282630443573, 0.04071661829948425, -0.14329570531845093, -0.10638295114040375, 0.042358506470918655, -0.21630698442459106, -0.014421407133340836, 0.03004489839076996, 0.16565394401550293, 0.28826162219047546, -0.038033582270145416, -0.18323582410812378, -0.09695857763290405, -0.3768308162689209, 0.004122857004404068, -0.158694326877594, 0.1078704223036766, 0.010657094419002533, 0.04505728557705879, -0.5808396935462952, -0.13465961813926697, -0.18100517988204956, -0.4385965168476105, -0.20404638350009918, 0.024681169539690018, -0.08960021287202835, -0.05343972519040108, -0.2532157897949219, -0.13351401686668396, -0.23701460659503937, -0.3757140338420868, 0.2796497941017151, 0.2792019844055176, 0.3979227542877197, 0.4036663770675659, -0.46494242548942566, 0.2192777693271637, 0.1281307339668274, -0.2627936601638794, 0.27195116877555847, -0.12346721440553665, 0.400370717048645, -0.5539560317993164, -0.377417653799057, 0.13609956204891205, 0.19782206416130066, -0.009575877338647842, 0.06635013967752457, -0.20338338613510132, 0.08647799491882324, -0.349691778421402, -0.0653623640537262, 0.13254627585411072, 0.2524748146533966, 0.4491385817527771, -0.21847355365753174, 0.16179782152175903, -0.15439510345458984, -0.10962779819965363, 0.09637929499149323, 0.9362360835075378, 0.023415327072143555, -0.021911390125751495, 0.11538154631853104, 0.058069873601198196, 0.3341711163520813, 0.04350222274661064, 0.06770877540111542, 0.035796839743852615, -0.37595900893211365, 0.1903018057346344, -0.24924439191818237, -0.14690926671028137, 0.619663417339325, 0.46169695258140564, -0.10183538496494293, 0.36102813482284546, 0.03759876638650894, 0.23655182123184204, 0.1718459129333496, 0.09896661341190338, -0.06719233095645905, -0.2950977683067322, -0.006020493805408478, 0.29812514781951904, 0.3115382790565491, -0.043010905385017395, -0.05409142002463341, -0.45501986145973206, -0.35601264238357544, -0.3157881498336792, 0.34347566962242126, 0.5764542818069458, 0.4297198951244354, 0.11843599379062653, 0.26111096143722534, -0.5747958421707153, 0.2416061908006668, 0.09912744909524918, -0.05265513062477112, -0.16302984952926636, -0.16409149765968323, 0.19730816781520844, -0.09803801029920578, 0.06057567521929741, -0.31112897396087646, -0.03787899762392044, 0.2995843291282654, -0.15188086032867432, -0.5790768265724182, 0.06504619121551514, -0.11858342587947845, 0.08333287388086319, 0.37484607100486755, 0.16144053637981415, -0.05662675201892853, -0.15304803848266602, -0.000128990039229393, -0.1339464634656906, -0.2941283583641052, 0.07890807092189789, -0.1295747309923172, -0.323782742023468, -0.045633453875780106, -0.20651987195014954, -0.00023713894188404083, 0.10843399167060852, 0.029220636934041977, 0.3305552303791046, 0.3428141176700592, 0.019164875149726868, 0.2844884991645813, -0.09256677329540253, 0.09210656583309174, 0.2597303092479706, -0.04456968605518341, 0.1416483074426651, -0.10347054898738861, 0.0686078816652298, 0.07905950397253036, 0.1394551694393158, 0.26677006483078003, 0.33389490842819214, -0.015052181668579578, 0.14124619960784912, 0.3176972568035126, 0.13591188192367554, 0.1435527801513672, -0.31870993971824646, 0.2108197957277298, 0.07071153819561005, -0.08984315395355225, -0.13690312206745148, -0.21985343098640442, -0.5876255631446838, -0.15345533192157745, 0.20624370872974396, -0.14913500845432281, 0.09059317409992218, 0.4807755649089813, 0.2448585033416748, -0.4734288454055786, 0.05074474215507507, 0.06189034879207611, 0.9134722352027893, -0.3971918225288391, 0.3144836127758026, 0.45933258533477783, -0.06592454016208649, 0.688910186290741, -0.24937663972377777, 0.2878425121307373, -0.26024436950683594, 0.09699252247810364, -0.004633404314517975, 0.024099547415971756, 0.1859917938709259, 0.2977368235588074, -0.3869926631450653, 0.2436877191066742, 0.0800645500421524, 0.07832910120487213, -0.10104810446500778, 0.12079821527004242, 0.07406143099069595, -0.0537048764526844, -0.004460297524929047, 0.03870879113674164, 0.14801523089408875, 0.16793698072433472, -0.10083497315645218, -0.26264065504074097, -0.15066882967948914, 0.09758490324020386, -0.03643171861767769, 0.10776550322771072, -0.08587320894002914, 0.012596113607287407, 0.11538738012313843, -0.22852003574371338, 0.17856143414974213, 0.044708482921123505, 0.22956483066082, 0.17426353693008423, -0.11651425063610077, -0.11778561770915985, 0.11214578151702881, 0.0951118990778923, 0.047777652740478516, 0.2640111446380615, 0.05881374701857567, -0.19017675518989563, 0.023881442844867706, -0.014323398470878601, -0.022932633757591248, -0.6582658290863037, -0.24260029196739197, -0.01950683444738388, -0.3383088707923889, 0.04069444537162781, -0.16901208460330963, 0.13149353861808777, -0.3500060737133026, 0.07764896750450134, 0.04228472709655762, -0.03170689940452576, -0.007330958731472492, 0.13340266048908234, -0.376415878534317, -0.10555502027273178, -0.06965965032577515, 0.3178858160972595, -0.10675983875989914, 0.02605920284986496, 0.29308485984802246, 0.1390783190727234, -0.11546748131513596, -0.19248157739639282, 0.11689942330121994, 0.2639492154121399, -0.34426867961883545, 0.350881427526474, -0.09116535633802414, 0.3897706866264343, 0.24594096839427948, 0.4746280610561371, -0.19226239621639252, 0.11660752445459366, -0.2697848975658417, 0.135147362947464, -0.24636612832546234, 0.14445120096206665, 0.10615506023168564, -0.08533689379692078, -0.24147355556488037, 0.8087245225906372, 0.2888924479484558, -0.16605012118816376, -0.21043601632118225, 0.11994104832410812, -0.2968480587005615, 0.28914257884025574, 0.4651021957397461, 0.0027304887771606445, 0.10732640326023102, 0.11665649712085724, -0.022614914923906326, -0.03545943647623062, -0.14308582246303558, -0.00937391072511673, -0.4408378303050995, 0.23265443742275238, 0.3971709907054901, -0.279068261384964, 0.016431178897619247, -0.23745524883270264, -0.30727770924568176, -0.035256654024124146, 0.17813795804977417, 0.31601521372795105, -0.11677785217761993, 0.28061404824256897, 0.3236219882965088, 0.04240366816520691, -0.19242721796035767, -0.05347008258104324, 0.21043723821640015, 0.3997369408607483, -0.08670006692409515, 0.2149667888879776, -0.037744391709566116, 0.08334125578403473, -0.11071407049894333, 0.21218258142471313, -0.1812828630208969, 0.206660658121109, 0.1498604714870453, -0.2446233183145523, 0.058737751096487045, -0.2719563841819763, 0.07091973721981049, -0.01873837411403656, -0.1596563160419464, -0.11057475954294205, 0.24015897512435913, -0.014616468921303749, 0.26462411880493164, 0.19812342524528503, 0.15867727994918823, 0.16474199295043945, -0.1007746234536171, 0.23786276578903198, -0.15562082827091217, -0.12995699048042297, 0.03402293846011162, 0.184724360704422, 0.1766389012336731, -0.3030107617378235, 0.04370776563882828, 0.21355140209197998, -0.09563426673412323, 0.0900675430893898, -0.049866773188114166, -0.3752332925796509, 0.0936051458120346, -0.14140379428863525, 0.0692949891090393, -0.04264388978481293, -0.018485531210899353, -0.02632889524102211, 0.22608956694602966, -0.7964649200439453, -0.4338701069355011, -0.1880558729171753, 0.2785809636116028, 0.42758139967918396, 0.44400709867477417, -0.1418628692626953, -0.23455144464969635, -0.16082802414894104, -0.12478895485401154, 0.5020841956138611, -0.10637856274843216, 0.034515392035245895, -0.3078821897506714, -0.06751209497451782, 0.17228898406028748, 0.23607760667800903, -0.16939212381839752, 0.022564150393009186, -0.060897454619407654, 0.416567862033844, 0.21647430956363678, -0.04590205103158951, -0.24891430139541626, -0.11225681751966476, 0.2209969162940979, -0.06831143796443939, 0.401966392993927, -0.46444952487945557, -0.10364250838756561, -0.3935956060886383, 0.18057496845722198, 0.11256332695484161, 0.03321170434355736, 0.29701727628707886, 0.5219265222549438, 0.1952514350414276, 0.19296669960021973, 0.2672566771507263, 0.2638756036758423, 0.026286888867616653, 0.32190483808517456, 0.11985918879508972, -0.0960356593132019, -0.017839821055531502, 0.07835352420806885, 0.17456784844398499, -0.000481216236948967, -0.11138302087783813, 0.5997077226638794, 0.031378451734781265, -0.004141062498092651, -0.1581810712814331, 0.1655310094356537, -0.39402225613594055, 0.1993972212076187, 0.15893502533435822, 0.032643213868141174, 0.032883454114198685, -0.0332198366522789, 0.003634560853242874, 0.07548386603593826, 0.27615484595298767, 0.4486449360847473, 0.2513766884803772, -0.2495197057723999, -0.2027416229248047, -0.2581016421318054, 0.3710937798023224, -0.05385347828269005, 0.13726727664470673, -0.061519280076026917, 0.34729284048080444, -0.04965228587388992, -0.2888677716255188, 0.10557675361633301, -0.02859690599143505, -0.026139622554183006, 0.04406346380710602, -0.08287280797958374, -0.06900654733181, -0.3028966188430786, 0.007268700748682022, -0.1658412367105484, -0.42827779054641724, 0.09053646773099899, -0.07166954129934311, -0.06309380382299423, -0.23509307205677032, 0.02875516563653946, 0.2469131052494049, 0.1086403876543045, 0.2696189880371094, 0.11325419694185257, 0.051068250089883804, -0.08165250718593597, -0.0887756422162056, -0.31010621786117554, -0.18050192296504974, -0.33474886417388916, -0.16824275255203247, -0.2967461347579956, 0.5180999040603638, -0.08391524106264114, -0.26810017228126526, -0.3095510005950928, 0.30838653445243835, -0.3641306161880493, 0.5591863989830017, 0.3405434489250183, 0.10700500756502151, -0.49907737970352173, -0.13243596255779266, 0.08937816321849823, 0.3456847667694092, 0.06991313397884369, 0.031337738037109375, -0.4642450213432312, -0.1810532510280609, 0.4082530736923218, -0.8163273334503174, -0.34000974893569946, 0.27739158272743225, 0.20632654428482056, -0.030384056270122528, -0.25368887186050415, -0.2889246642589569, -0.10753198713064194, 0.3392096161842346, -0.07219092547893524, -0.0814974382519722, 0.07670533657073975, -0.04215370863676071, 0.1234862357378006, 0.20677146315574646, 0.1660776287317276, 0.32750555872917175, -0.21208398044109344, -0.0851786881685257, -0.14890292286872864 ]
https://github.com/huggingface/datasets/issues/477
Overview.ipynb throws exceptions with nlp 0.4.0
Thanks for reporting this issue There was a bug where numpy arrays would get returned instead of tensorflow tensors. This is fixed on master. I tried to re-run the colab and encountered this error instead: ``` AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'to_tensor' ``` This is because the dataset returns a Tensor and not a RaggedTensor. But I think we should always return a RaggedTensor unless the length of the sequence is fixed (it that case they can be stack into a Tensor).
with nlp 0.4.0, the TensorFlow example in Overview.ipynb throws the following exceptions: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-5-48907f2ad433> in <module> ----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]} 2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])} 3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1]) 4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8) <ipython-input-5-48907f2ad433> in <dictcomp>(.0) ----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]} 2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])} 3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1]) 4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8) AttributeError: 'numpy.ndarray' object has no attribute 'to_tensor'
83
Overview.ipynb throws exceptions with nlp 0.4.0 with nlp 0.4.0, the TensorFlow example in Overview.ipynb throws the following exceptions: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-5-48907f2ad433> in <module> ----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]} 2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])} 3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1]) 4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8) <ipython-input-5-48907f2ad433> in <dictcomp>(.0) ----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]} 2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])} 3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1]) 4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8) AttributeError: 'numpy.ndarray' object has no attribute 'to_tensor' Thanks for reporting this issue There was a bug where numpy arrays would get returned instead of tensorflow tensors. This is fixed on master. I tried to re-run the colab and encountered this error instead: ``` AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'to_tensor' ``` This is because the dataset returns a Tensor and not a RaggedTensor. But I think we should always return a RaggedTensor unless the length of the sequence is fixed (it that case they can be stack into a Tensor).
[ -0.039148736745119095, 0.08251206576824188, -0.007306629791855812, -0.05307921767234802, 0.03180284798145294, -0.04821356013417244, 0.8157615661621094, 0.2792406976222992, -0.06842314451932907, 0.1789911687374115, 0.031669825315475464, 0.20381905138492584, -0.29703065752983093, -0.05307295173406601, 0.021022040396928787, -0.4359816312789917, -0.10791070014238358, 0.2862539291381836, 0.03368644043803215, -0.05605402961373329, -0.16838854551315308, 0.26957792043685913, -0.48140382766723633, 0.0699901208281517, -0.30096235871315, -0.2224033772945404, -0.003463141620159149, -0.11840436607599258, 0.1805601418018341, -0.32180771231651306, 0.2983431816101074, -0.0853026807308197, -0.07296575605869293, 0.21570411324501038, -0.00010940736683551222, 0.13125377893447876, 0.22475089132785797, 0.03997468948364258, -0.17447221279144287, -0.32944202423095703, -0.18357151746749878, -0.01757793501019478, -0.04888399690389633, -0.30774080753326416, 0.14113345742225647, 0.06957006454467773, 0.25430816411972046, 0.22932052612304688, 0.18758659064769745, 0.42599669098854065, 0.23439043760299683, 0.37895357608795166, 0.06841658055782318, 0.03368023410439491, 0.0507047101855278, -0.02313707023859024, -0.09127465635538101, 0.11408816277980804, -0.06213892996311188, -0.19979816675186157, -0.2145838439464569, 0.2809060215950012, -0.008752534165978432, 0.0915338546037674, -0.15836799144744873, 0.02419506013393402, 0.07424075901508331, -0.27116477489471436, -0.0711958259344101, 0.41401058435440063, -0.040293313562870026, -0.042651474475860596, -0.3928295075893402, -0.37032321095466614, 0.06527192890644073, -0.5704235434532166, -0.06003863364458084, 0.10483571141958237, -0.1118556410074234, -0.01656072586774826, -0.15459071099758148, 0.09575355798006058, -0.5827882885932922, 0.3474158048629761, -0.1908772736787796, 0.14490032196044922, 0.00827216636389494, 0.0810578390955925, -0.009435784071683884, -0.09868040680885315, -0.02544969692826271, -0.008968379348516464, 0.1772596538066864, 0.001748810987919569, -0.26490214467048645, -0.22038182616233826, 0.18189507722854614, -0.2065804898738861, -0.16721296310424805, -0.07757716625928879, 0.02332049049437046, 0.026800891384482384, 0.0007514050230383873, 0.3499961197376251, -0.12209688127040863, 0.261067271232605, 0.11832539737224579, 0.15766654908657074, 0.3323270082473755, -0.005689440295100212, -0.1858869343996048, 0.031240925192832947, 0.049679797142744064, -0.14371900260448456, -0.14087194204330444, 0.017316441982984543, 0.34663212299346924, 0.13341887295246124, -0.5548807978630066, 0.03870552033185959, -0.3659701943397522, 0.14091379940509796, 0.19201019406318665, 0.24507707357406616, -0.08728057146072388, 0.25865888595581055, 0.20623572170734406, 0.17463968694210052, -0.450601726770401, -0.020784936845302582, -0.21614785492420197, 0.3215358853340149, -0.054345015436410904, -0.249999538064003, 0.2410525530576706, 0.32728782296180725, 0.32264232635498047, -0.08501987904310226, 0.08632393181324005, 0.08347201347351074, 0.32037991285324097, -0.27398791909217834, 0.11137986928224564, 0.24617843329906464, -0.0800185352563858, -0.12071249634027481, 0.04642114415764809, -0.15178534388542175, -0.03831988573074341, -0.057532645761966705, -0.2080950140953064, -0.3066113591194153, -0.03562610596418381, 0.26758790016174316, 0.12015959620475769, -0.06082569807767868, -0.25942856073379517, 0.13650918006896973, 0.03163959085941315, -0.1947876363992691, -0.03508310765028, -0.3620333671569824, -0.1259937584400177, -0.06127884238958359, 0.04010675102472305, 0.1906774938106537, 0.13413585722446442, -0.15668536722660065, 0.10435875505208969, 0.18020020425319672, 0.25238004326820374, 0.26964813470840454, -0.20445416867733002, 0.23071172833442688, -0.036195509135723114, 0.37488532066345215, 0.3027428984642029, -0.2861018478870392, -0.18795442581176758, 0.11537691205739975, -0.05106901749968529, 0.05718178302049637, -0.09152641147375107, 0.01973584294319153, 0.42298173904418945, -0.03806620463728905, 0.3864847421646118, 0.2939308285713196, -0.2305164635181427, 0.09854083508253098, -0.08446790277957916, 0.11409452557563782, 0.29222196340560913, -0.06450625509023666, 0.11692629754543304, 0.06307143718004227, -0.19997966289520264, 0.5250778198242188, 0.03861990571022034, -0.1206294447183609, -0.0273564662784338, 0.028160877525806427, 0.025163831189274788, -0.3499794006347656, -0.17350271344184875, -0.13496848940849304, -0.3476230502128601, 0.07232917100191116, 0.08270979672670364, 0.21566681563854218, 0.334797739982605, -0.058471329510211945, 0.015277614817023277, 0.11865205317735672, -0.07742977142333984, -0.28484606742858887, 0.2511829435825348, 0.156389981508255, -0.1726752668619156, 0.07474717497825623, -0.13705196976661682, 0.07788994908332825, -0.38104790449142456, 0.10178178548812866, -0.13996195793151855, 0.06893740594387054, -0.09845257550477982, -0.19419744610786438, -0.2610074281692505, 0.3692513406276703, -0.07399263232946396, -0.17859536409378052, -0.06112564355134964, 0.21583294868469238, 0.1814831793308258, 0.22976559400558472, -0.23061397671699524, 0.14139513671398163, 0.3241616487503052, -0.05780867487192154, -0.1601216197013855, 0.208571195602417, 0.00838087685406208, -0.1782841980457306, 0.15944382548332214, 0.4819948673248291, 0.2851325273513794, 0.1752203106880188, 0.427837610244751, 0.1367618590593338, 0.20683696866035461, 0.0023748837411403656, -0.19722740352153778, 0.08879777789115906, 0.3635746240615845, -0.07122178375720978, 0.19735626876354218, -0.2939552068710327, -0.7215963006019592, 0.11180131137371063, 0.5496829748153687, 0.13436773419380188, 0.06597347557544708, 0.19627812504768372, -0.09096836298704147, 0.10293931514024734, 0.38373133540153503, -0.20726962387561798, 0.1110239177942276, 0.08644695580005646, 0.2527722120285034, 0.0789596438407898, -0.3717407286167145, -0.252187579870224, 0.08088408410549164, 0.14149275422096252, -0.10221780836582184, -0.02283434569835663, 0.2730286121368408, 0.21714389324188232, -0.26156479120254517, -0.34871014952659607, -0.170157790184021, 0.26636040210723877, -0.335430771112442, 0.32686468958854675, -0.12055257707834244, -0.2741841971874237, -0.0820821225643158, -0.5632297992706299, -0.14262978732585907, -0.3243648409843445, -0.019614070653915405, 0.6269509196281433, -0.33558329939842224, 0.23228131234645844, 0.16799518465995789, 0.03853173553943634, 0.07346609234809875, 0.2469547688961029, 0.15750519931316376, 0.008954757824540138, -0.3124403953552246, 0.13947948813438416, 0.19992601871490479, -0.1503332555294037, 0.2847873270511627, -0.08084477484226227, -0.30653494596481323, 0.25946515798568726, -0.5440356731414795, 0.11752781271934509, -0.12583060562610626, -0.0007882025092840195, 0.20608577132225037, 0.2676907777786255, -0.29062318801879883, -0.5785192847251892, 0.055549632757902145, -0.11166781932115555, -0.1575765758752823, 0.36485376954078674, -0.03760213032364845, -0.04447941854596138, -0.3675978183746338, -0.5435934066772461, -0.17161321640014648, -0.44467368721961975, 0.3616945147514343, -0.08067712187767029, 0.3070827126502991, 0.7853786945343018, -0.07303909212350845, 0.5275720357894897, 0.269594669342041, 0.18629342317581177, 0.21734224259853363, -0.06824526190757751, -0.008160892874002457, -0.28574156761169434, -0.3695429861545563, -0.10630306601524353, -0.2888967990875244, 0.18319569528102875, 0.12186048924922943, -0.32980793714523315, -0.05850459262728691, -0.034819766879081726, 0.1349249929189682, 0.1361686885356903, -0.17422343790531158, 0.365398108959198, -0.05630066245794296, -0.030221272259950638, -0.03424050286412239, 0.057362426072359085, 0.37216058373451233, 0.24515894055366516, -0.06226157397031784, -0.03946881741285324, 0.20594444870948792, 0.17548596858978271, 0.3692195415496826, 0.04247279092669487, -0.24254323542118073, 0.2184520959854126, 0.00047076866030693054, 0.03493277728557587, -0.17558881640434265, -0.2768709361553192, 0.23891083896160126, -0.01719832420349121, -0.07878894358873367, 0.07964436709880829, -0.19922059774398804, -0.29408153891563416, -0.1044810339808464, 0.05837315693497658, -0.20437538623809814, -0.3995550572872162, 0.15995456278324127, -0.32069626450538635, 0.12835121154785156, -0.0597040131688118, 0.015688933432102203, -0.21509423851966858, 0.06578177213668823, -0.14750710129737854, 0.17152029275894165, 0.08613050729036331, -0.2596290707588196, -0.09385930001735687, -0.5862798690795898, -0.6067789793014526, 0.20463323593139648, 0.24644316732883453, 0.5263921022415161, -0.08701010793447495, -0.01882345974445343, -0.11416032910346985, -0.041683681309223175, 0.4461076259613037, 0.10698554664850235, -0.14255285263061523, 0.2608317732810974, -0.13291966915130615, -0.35782772302627563, -0.12204883992671967, -0.3692781627178192, 0.271984338760376, 0.5299990773200989, 0.30157729983329773, -0.20639392733573914, 0.0024210361298173666, 0.35584756731987, -0.04668746888637543, 0.12434576451778412, 0.17509180307388306, 0.04147089645266533, -0.030087154358625412, -0.14145271480083466, 0.09089237451553345, 0.1586923748254776, -0.04160032421350479, -0.3086984157562256, -0.058505646884441376, 0.023824185132980347, -0.07467328011989594, 0.16841185092926025, 0.21232622861862183, -0.19105741381645203, -0.009006255306303501, 0.07701221108436584, -0.2531861662864685, -0.12290720641613007, 0.4033567011356354, -0.0854448527097702, -0.16120432317256927, -0.29864540696144104, -0.03002672642469406, 0.17723269760608673, 0.0864018052816391, 0.19853296875953674, -0.026353858411312103, 0.044887617230415344, -0.23023879528045654, -0.04405522346496582, -0.08602596074342728, 0.429545521736145, 0.5223550796508789, 0.06649711728096008, -0.10003837943077087, -0.161912739276886, 0.27149882912635803, -0.3283495008945465, 0.07145778834819794, 0.39901551604270935, -0.06086389720439911, -0.3527772128582001, 0.2800028920173645, -0.24734842777252197, 0.47531187534332275, 0.41186195611953735, 0.21834349632263184, 0.6721662878990173, 0.34723031520843506, 0.6203203201293945, 0.12773194909095764, 0.4753555655479431, -0.162008598446846, -0.017395272850990295, -0.10052303224802017, -0.07888689637184143, 0.027614310383796692, 0.10960128903388977, -0.13197669386863708, 0.08895576745271683, 0.17672322690486908, 0.09603281319141388, 0.0463646724820137, 0.09851329028606415, 0.061185844242572784, -0.24040597677230835, -0.29009273648262024, 0.15394999086856842, -0.15815117955207825, 0.15743666887283325, -0.04821321368217468, -0.14380860328674316, -0.08243614435195923, -0.32646214962005615, -0.2867516875267029, 0.27549710869789124, -0.1414860486984253, 0.1955636590719223, 0.20458196103572845, -0.19718627631664276, -0.03910622000694275, -0.028756607323884964, 0.24093231558799744, -0.070169597864151, -0.145581915974617, -0.20687296986579895, -0.06926418095827103, 0.028024202212691307, 0.10321160405874252, -0.1363176852464676, 0.5273314714431763, -0.1486338973045349, -0.13759998977184296, -0.009795226156711578, -0.09550401568412781, -0.21735234558582306, 0.2621583342552185, 0.11525598168373108, 0.09076361358165741, 0.14732380211353302, 0.02498803660273552, 0.11880294978618622, -0.4523482024669647, -0.23215264081954956, 0.170342817902565, -0.13491959869861603, -0.3381388485431671, 0.21342751383781433, -0.14556366205215454, -0.022663071751594543, 0.05624082684516907, 0.2497800588607788, -0.059267833828926086, 0.23416900634765625, 0.6033892631530762, -0.02119305729866028, -0.09155277907848358, -0.14357341825962067, -0.21654203534126282, 0.05415164306759834, -0.10718566179275513, 0.1656973510980606, -0.149301216006279, 0.0013686120510101318, 0.05254586413502693, 0.1575045883655548, 0.008192487061023712, 0.2858632206916809, -0.16629604995250702, -0.3224804997444153, -0.38719335198402405, 0.21804942190647125, -0.14019975066184998, 0.21347209811210632, 0.16304802894592285, 0.6170113682746887, 0.08566604554653168, -0.125997394323349, -0.3218878507614136, 0.032127127051353455, -0.2677134871482849, 0.3241802155971527, 0.038913846015930176, -0.20927277207374573, 0.15032429993152618, -0.004805297590792179, 0.11322192847728729, 0.13612374663352966, -0.10977069288492203, -0.2583739459514618, -0.19174081087112427, 0.07140329480171204, 0.1857146918773651, -0.3465101420879364, 0.1661633998155594, 0.004659326747059822, -0.15571826696395874, -0.12303274869918823, 0.11720059812068939, -0.056309498846530914, -0.2534220218658447, 0.5090387463569641, 0.13214664161205292, 0.6595721244812012, 0.2523013949394226, 0.045753300189971924, -0.17820551991462708, 0.16866512596607208, -0.08894877880811691, 0.19712916016578674, -0.010022735223174095, -0.04132190719246864, -0.3386876583099365, -0.0331779420375824, -0.4179760217666626, -0.11482762545347214, 0.22043055295944214, -0.33284783363342285, -0.03773828595876694, -0.2488708347082138, 0.042936619371175766, 0.13500992953777313, -0.11346325278282166, 0.026608308777213097, -0.006043108180165291, 0.2527717649936676, -0.07410385459661484, 0.1623068004846573, 0.24985985457897186, -0.032050587236881256, 0.2161775827407837, 0.10435065627098083, 0.10926741361618042, -0.09028341621160507, 0.1097063273191452, 0.13911694288253784, -0.1979449838399887, -0.3117924928665161, 0.24128039181232452, 0.3260471224784851, -0.36162909865379333, 0.11626747250556946, -0.18294252455234528, 0.08549097180366516, 0.4222061038017273, -0.05156334489583969, 0.01660170406103134, 0.24569976329803467, 0.0994253158569336, -0.1708701252937317, 0.22370314598083496, -0.39966005086898804, -0.28218984603881836, -0.03170883655548096, 0.19268731772899628, 0.27797743678092957, 0.10087016224861145, 0.02975546568632126, -0.2888752520084381, -0.15922844409942627, -0.0015650466084480286, 0.20955339074134827, -0.3970547616481781, 0.014734193682670593, -0.3463866412639618, 0.15735703706741333, 0.05748474597930908, -0.34336063265800476, -0.03770219162106514, 0.04453248530626297, 0.17233692109584808, 0.18502455949783325, -0.22809825837612152, -0.09424258768558502, -0.13565263152122498, 0.015781361609697342, 0.21791130304336548, -0.0611422061920166, 0.322966992855072, 0.367595911026001, -0.01892673969268799, -0.27654528617858887, 0.505477786064148, 0.4357512593269348, 0.24003565311431885, -0.3785282373428345, 0.010464824736118317, 0.12376660108566284, -0.1097794622182846, -0.027247533202171326, 0.09683763235807419, 0.10764679312705994, 0.20096193253993988, 0.2250172644853592, 0.13058996200561523, -0.17860420048236847, 0.3606996238231659, 0.13612638413906097, -0.04533237963914871, -0.24920567870140076, 0.3173816502094269, 0.12193842977285385, -0.13876618444919586, -0.18310530483722687, -0.05192966014146805, -0.30852439999580383, 0.15129780769348145, 0.30848005414009094, -0.10380857437849045, 0.13198232650756836, 0.15680736303329468, 0.08414840698242188, -0.09370018541812897, 0.3824256360530853, 0.2785471975803375, 0.34129902720451355, -0.23918405175209045, -0.05326689034700394, -0.1395319402217865, 0.1518152356147766, -0.10916320979595184, 0.34944459795951843, 0.13355399668216705, 0.1528649479150772, -0.20132914185523987, -0.05549122393131256, -0.175802543759346, -0.4866575002670288, 0.03829009830951691, 0.014097049832344055, -0.5309219360351562, -0.06776535511016846, 0.21672356128692627, -0.2995288670063019, 0.08092987537384033, -0.2919178009033203, 0.10387663543224335, -0.021673057228326797, 0.05827067047357559, -0.02438611537218094, 0.25475820899009705, 0.05807654932141304, 0.4695749878883362, -0.15985913574695587, 0.21738691627979279, 0.3523499667644501, -0.03992732614278793, -0.2264605611562729, 0.015534982085227966, -0.12886862456798553, -0.3512546718120575, 0.062316812574863434, 0.002156432718038559, 0.6310629844665527, 0.030801279470324516, -0.342646062374115, -0.04718348756432533, 0.2966684401035309, 0.07446399331092834, -0.22585350275039673, -0.2897466719150543, 0.5159009695053101, -0.32680970430374146, 0.12090487778186798, -0.03553338348865509, 0.22577065229415894, 0.04696968197822571, 0.1271175593137741, -0.420870840549469, -0.5104092359542847, 0.4589865505695343, -0.6723723411560059, -0.2989540994167328, -0.15001176297664642, 0.3177682161331177, -0.17841532826423645, 0.15415196120738983, -0.701443076133728, -0.13085316121578217, 0.3214227557182312, -0.306863009929657, -0.37376129627227783, 0.1170787662267685, 0.2110438048839569, 0.016910653561353683, 0.03593844547867775, 0.5025029182434082, 0.05190788581967354, -0.30458617210388184, 0.09043379127979279, -0.3307104706764221 ]
https://github.com/huggingface/datasets/issues/477
Overview.ipynb throws exceptions with nlp 0.4.0
Hi, I got another error (on Colab): ```python # You can read a few attributes of the datasets before loading them (they are python dataclasses) from dataclasses import asdict for key, value in asdict(datasets[6]).items(): print('👉 ' + key + ': ' + str(value)) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-6-b8ace6c227a2> in <module>() 2 from dataclasses import asdict 3 ----> 4 for key, value in asdict(datasets[6]).items(): 5 print('👉 ' + key + ': ' + str(value)) /usr/local/lib/python3.6/dist-packages/dataclasses.py in asdict(obj, dict_factory) 1008 """ 1009 if not _is_dataclass_instance(obj): -> 1010 raise TypeError("asdict() should be called on dataclass instances") 1011 return _asdict_inner(obj, dict_factory) 1012 TypeError: asdict() should be called on dataclass instances ```
with nlp 0.4.0, the TensorFlow example in Overview.ipynb throws the following exceptions: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-5-48907f2ad433> in <module> ----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]} 2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])} 3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1]) 4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8) <ipython-input-5-48907f2ad433> in <dictcomp>(.0) ----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]} 2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])} 3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1]) 4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8) AttributeError: 'numpy.ndarray' object has no attribute 'to_tensor'
110
Overview.ipynb throws exceptions with nlp 0.4.0 with nlp 0.4.0, the TensorFlow example in Overview.ipynb throws the following exceptions: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-5-48907f2ad433> in <module> ----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]} 2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])} 3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1]) 4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8) <ipython-input-5-48907f2ad433> in <dictcomp>(.0) ----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]} 2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])} 3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1]) 4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8) AttributeError: 'numpy.ndarray' object has no attribute 'to_tensor' Hi, I got another error (on Colab): ```python # You can read a few attributes of the datasets before loading them (they are python dataclasses) from dataclasses import asdict for key, value in asdict(datasets[6]).items(): print('👉 ' + key + ': ' + str(value)) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-6-b8ace6c227a2> in <module>() 2 from dataclasses import asdict 3 ----> 4 for key, value in asdict(datasets[6]).items(): 5 print('👉 ' + key + ': ' + str(value)) /usr/local/lib/python3.6/dist-packages/dataclasses.py in asdict(obj, dict_factory) 1008 """ 1009 if not _is_dataclass_instance(obj): -> 1010 raise TypeError("asdict() should be called on dataclass instances") 1011 return _asdict_inner(obj, dict_factory) 1012 TypeError: asdict() should be called on dataclass instances ```
[ -0.039148736745119095, 0.08251206576824188, -0.007306629791855812, -0.05307921767234802, 0.03180284798145294, -0.04821356013417244, 0.8157615661621094, 0.2792406976222992, -0.06842314451932907, 0.1789911687374115, 0.031669825315475464, 0.20381905138492584, -0.29703065752983093, -0.05307295173406601, 0.021022040396928787, -0.4359816312789917, -0.10791070014238358, 0.2862539291381836, 0.03368644043803215, -0.05605402961373329, -0.16838854551315308, 0.26957792043685913, -0.48140382766723633, 0.0699901208281517, -0.30096235871315, -0.2224033772945404, -0.003463141620159149, -0.11840436607599258, 0.1805601418018341, -0.32180771231651306, 0.2983431816101074, -0.0853026807308197, -0.07296575605869293, 0.21570411324501038, -0.00010940736683551222, 0.13125377893447876, 0.22475089132785797, 0.03997468948364258, -0.17447221279144287, -0.32944202423095703, -0.18357151746749878, -0.01757793501019478, -0.04888399690389633, -0.30774080753326416, 0.14113345742225647, 0.06957006454467773, 0.25430816411972046, 0.22932052612304688, 0.18758659064769745, 0.42599669098854065, 0.23439043760299683, 0.37895357608795166, 0.06841658055782318, 0.03368023410439491, 0.0507047101855278, -0.02313707023859024, -0.09127465635538101, 0.11408816277980804, -0.06213892996311188, -0.19979816675186157, -0.2145838439464569, 0.2809060215950012, -0.008752534165978432, 0.0915338546037674, -0.15836799144744873, 0.02419506013393402, 0.07424075901508331, -0.27116477489471436, -0.0711958259344101, 0.41401058435440063, -0.040293313562870026, -0.042651474475860596, -0.3928295075893402, -0.37032321095466614, 0.06527192890644073, -0.5704235434532166, -0.06003863364458084, 0.10483571141958237, -0.1118556410074234, -0.01656072586774826, -0.15459071099758148, 0.09575355798006058, -0.5827882885932922, 0.3474158048629761, -0.1908772736787796, 0.14490032196044922, 0.00827216636389494, 0.0810578390955925, -0.009435784071683884, -0.09868040680885315, -0.02544969692826271, -0.008968379348516464, 0.1772596538066864, 0.001748810987919569, -0.26490214467048645, -0.22038182616233826, 0.18189507722854614, -0.2065804898738861, -0.16721296310424805, -0.07757716625928879, 0.02332049049437046, 0.026800891384482384, 0.0007514050230383873, 0.3499961197376251, -0.12209688127040863, 0.261067271232605, 0.11832539737224579, 0.15766654908657074, 0.3323270082473755, -0.005689440295100212, -0.1858869343996048, 0.031240925192832947, 0.049679797142744064, -0.14371900260448456, -0.14087194204330444, 0.017316441982984543, 0.34663212299346924, 0.13341887295246124, -0.5548807978630066, 0.03870552033185959, -0.3659701943397522, 0.14091379940509796, 0.19201019406318665, 0.24507707357406616, -0.08728057146072388, 0.25865888595581055, 0.20623572170734406, 0.17463968694210052, -0.450601726770401, -0.020784936845302582, -0.21614785492420197, 0.3215358853340149, -0.054345015436410904, -0.249999538064003, 0.2410525530576706, 0.32728782296180725, 0.32264232635498047, -0.08501987904310226, 0.08632393181324005, 0.08347201347351074, 0.32037991285324097, -0.27398791909217834, 0.11137986928224564, 0.24617843329906464, -0.0800185352563858, -0.12071249634027481, 0.04642114415764809, -0.15178534388542175, -0.03831988573074341, -0.057532645761966705, -0.2080950140953064, -0.3066113591194153, -0.03562610596418381, 0.26758790016174316, 0.12015959620475769, -0.06082569807767868, -0.25942856073379517, 0.13650918006896973, 0.03163959085941315, -0.1947876363992691, -0.03508310765028, -0.3620333671569824, -0.1259937584400177, -0.06127884238958359, 0.04010675102472305, 0.1906774938106537, 0.13413585722446442, -0.15668536722660065, 0.10435875505208969, 0.18020020425319672, 0.25238004326820374, 0.26964813470840454, -0.20445416867733002, 0.23071172833442688, -0.036195509135723114, 0.37488532066345215, 0.3027428984642029, -0.2861018478870392, -0.18795442581176758, 0.11537691205739975, -0.05106901749968529, 0.05718178302049637, -0.09152641147375107, 0.01973584294319153, 0.42298173904418945, -0.03806620463728905, 0.3864847421646118, 0.2939308285713196, -0.2305164635181427, 0.09854083508253098, -0.08446790277957916, 0.11409452557563782, 0.29222196340560913, -0.06450625509023666, 0.11692629754543304, 0.06307143718004227, -0.19997966289520264, 0.5250778198242188, 0.03861990571022034, -0.1206294447183609, -0.0273564662784338, 0.028160877525806427, 0.025163831189274788, -0.3499794006347656, -0.17350271344184875, -0.13496848940849304, -0.3476230502128601, 0.07232917100191116, 0.08270979672670364, 0.21566681563854218, 0.334797739982605, -0.058471329510211945, 0.015277614817023277, 0.11865205317735672, -0.07742977142333984, -0.28484606742858887, 0.2511829435825348, 0.156389981508255, -0.1726752668619156, 0.07474717497825623, -0.13705196976661682, 0.07788994908332825, -0.38104790449142456, 0.10178178548812866, -0.13996195793151855, 0.06893740594387054, -0.09845257550477982, -0.19419744610786438, -0.2610074281692505, 0.3692513406276703, -0.07399263232946396, -0.17859536409378052, -0.06112564355134964, 0.21583294868469238, 0.1814831793308258, 0.22976559400558472, -0.23061397671699524, 0.14139513671398163, 0.3241616487503052, -0.05780867487192154, -0.1601216197013855, 0.208571195602417, 0.00838087685406208, -0.1782841980457306, 0.15944382548332214, 0.4819948673248291, 0.2851325273513794, 0.1752203106880188, 0.427837610244751, 0.1367618590593338, 0.20683696866035461, 0.0023748837411403656, -0.19722740352153778, 0.08879777789115906, 0.3635746240615845, -0.07122178375720978, 0.19735626876354218, -0.2939552068710327, -0.7215963006019592, 0.11180131137371063, 0.5496829748153687, 0.13436773419380188, 0.06597347557544708, 0.19627812504768372, -0.09096836298704147, 0.10293931514024734, 0.38373133540153503, -0.20726962387561798, 0.1110239177942276, 0.08644695580005646, 0.2527722120285034, 0.0789596438407898, -0.3717407286167145, -0.252187579870224, 0.08088408410549164, 0.14149275422096252, -0.10221780836582184, -0.02283434569835663, 0.2730286121368408, 0.21714389324188232, -0.26156479120254517, -0.34871014952659607, -0.170157790184021, 0.26636040210723877, -0.335430771112442, 0.32686468958854675, -0.12055257707834244, -0.2741841971874237, -0.0820821225643158, -0.5632297992706299, -0.14262978732585907, -0.3243648409843445, -0.019614070653915405, 0.6269509196281433, -0.33558329939842224, 0.23228131234645844, 0.16799518465995789, 0.03853173553943634, 0.07346609234809875, 0.2469547688961029, 0.15750519931316376, 0.008954757824540138, -0.3124403953552246, 0.13947948813438416, 0.19992601871490479, -0.1503332555294037, 0.2847873270511627, -0.08084477484226227, -0.30653494596481323, 0.25946515798568726, -0.5440356731414795, 0.11752781271934509, -0.12583060562610626, -0.0007882025092840195, 0.20608577132225037, 0.2676907777786255, -0.29062318801879883, -0.5785192847251892, 0.055549632757902145, -0.11166781932115555, -0.1575765758752823, 0.36485376954078674, -0.03760213032364845, -0.04447941854596138, -0.3675978183746338, -0.5435934066772461, -0.17161321640014648, -0.44467368721961975, 0.3616945147514343, -0.08067712187767029, 0.3070827126502991, 0.7853786945343018, -0.07303909212350845, 0.5275720357894897, 0.269594669342041, 0.18629342317581177, 0.21734224259853363, -0.06824526190757751, -0.008160892874002457, -0.28574156761169434, -0.3695429861545563, -0.10630306601524353, -0.2888967990875244, 0.18319569528102875, 0.12186048924922943, -0.32980793714523315, -0.05850459262728691, -0.034819766879081726, 0.1349249929189682, 0.1361686885356903, -0.17422343790531158, 0.365398108959198, -0.05630066245794296, -0.030221272259950638, -0.03424050286412239, 0.057362426072359085, 0.37216058373451233, 0.24515894055366516, -0.06226157397031784, -0.03946881741285324, 0.20594444870948792, 0.17548596858978271, 0.3692195415496826, 0.04247279092669487, -0.24254323542118073, 0.2184520959854126, 0.00047076866030693054, 0.03493277728557587, -0.17558881640434265, -0.2768709361553192, 0.23891083896160126, -0.01719832420349121, -0.07878894358873367, 0.07964436709880829, -0.19922059774398804, -0.29408153891563416, -0.1044810339808464, 0.05837315693497658, -0.20437538623809814, -0.3995550572872162, 0.15995456278324127, -0.32069626450538635, 0.12835121154785156, -0.0597040131688118, 0.015688933432102203, -0.21509423851966858, 0.06578177213668823, -0.14750710129737854, 0.17152029275894165, 0.08613050729036331, -0.2596290707588196, -0.09385930001735687, -0.5862798690795898, -0.6067789793014526, 0.20463323593139648, 0.24644316732883453, 0.5263921022415161, -0.08701010793447495, -0.01882345974445343, -0.11416032910346985, -0.041683681309223175, 0.4461076259613037, 0.10698554664850235, -0.14255285263061523, 0.2608317732810974, -0.13291966915130615, -0.35782772302627563, -0.12204883992671967, -0.3692781627178192, 0.271984338760376, 0.5299990773200989, 0.30157729983329773, -0.20639392733573914, 0.0024210361298173666, 0.35584756731987, -0.04668746888637543, 0.12434576451778412, 0.17509180307388306, 0.04147089645266533, -0.030087154358625412, -0.14145271480083466, 0.09089237451553345, 0.1586923748254776, -0.04160032421350479, -0.3086984157562256, -0.058505646884441376, 0.023824185132980347, -0.07467328011989594, 0.16841185092926025, 0.21232622861862183, -0.19105741381645203, -0.009006255306303501, 0.07701221108436584, -0.2531861662864685, -0.12290720641613007, 0.4033567011356354, -0.0854448527097702, -0.16120432317256927, -0.29864540696144104, -0.03002672642469406, 0.17723269760608673, 0.0864018052816391, 0.19853296875953674, -0.026353858411312103, 0.044887617230415344, -0.23023879528045654, -0.04405522346496582, -0.08602596074342728, 0.429545521736145, 0.5223550796508789, 0.06649711728096008, -0.10003837943077087, -0.161912739276886, 0.27149882912635803, -0.3283495008945465, 0.07145778834819794, 0.39901551604270935, -0.06086389720439911, -0.3527772128582001, 0.2800028920173645, -0.24734842777252197, 0.47531187534332275, 0.41186195611953735, 0.21834349632263184, 0.6721662878990173, 0.34723031520843506, 0.6203203201293945, 0.12773194909095764, 0.4753555655479431, -0.162008598446846, -0.017395272850990295, -0.10052303224802017, -0.07888689637184143, 0.027614310383796692, 0.10960128903388977, -0.13197669386863708, 0.08895576745271683, 0.17672322690486908, 0.09603281319141388, 0.0463646724820137, 0.09851329028606415, 0.061185844242572784, -0.24040597677230835, -0.29009273648262024, 0.15394999086856842, -0.15815117955207825, 0.15743666887283325, -0.04821321368217468, -0.14380860328674316, -0.08243614435195923, -0.32646214962005615, -0.2867516875267029, 0.27549710869789124, -0.1414860486984253, 0.1955636590719223, 0.20458196103572845, -0.19718627631664276, -0.03910622000694275, -0.028756607323884964, 0.24093231558799744, -0.070169597864151, -0.145581915974617, -0.20687296986579895, -0.06926418095827103, 0.028024202212691307, 0.10321160405874252, -0.1363176852464676, 0.5273314714431763, -0.1486338973045349, -0.13759998977184296, -0.009795226156711578, -0.09550401568412781, -0.21735234558582306, 0.2621583342552185, 0.11525598168373108, 0.09076361358165741, 0.14732380211353302, 0.02498803660273552, 0.11880294978618622, -0.4523482024669647, -0.23215264081954956, 0.170342817902565, -0.13491959869861603, -0.3381388485431671, 0.21342751383781433, -0.14556366205215454, -0.022663071751594543, 0.05624082684516907, 0.2497800588607788, -0.059267833828926086, 0.23416900634765625, 0.6033892631530762, -0.02119305729866028, -0.09155277907848358, -0.14357341825962067, -0.21654203534126282, 0.05415164306759834, -0.10718566179275513, 0.1656973510980606, -0.149301216006279, 0.0013686120510101318, 0.05254586413502693, 0.1575045883655548, 0.008192487061023712, 0.2858632206916809, -0.16629604995250702, -0.3224804997444153, -0.38719335198402405, 0.21804942190647125, -0.14019975066184998, 0.21347209811210632, 0.16304802894592285, 0.6170113682746887, 0.08566604554653168, -0.125997394323349, -0.3218878507614136, 0.032127127051353455, -0.2677134871482849, 0.3241802155971527, 0.038913846015930176, -0.20927277207374573, 0.15032429993152618, -0.004805297590792179, 0.11322192847728729, 0.13612374663352966, -0.10977069288492203, -0.2583739459514618, -0.19174081087112427, 0.07140329480171204, 0.1857146918773651, -0.3465101420879364, 0.1661633998155594, 0.004659326747059822, -0.15571826696395874, -0.12303274869918823, 0.11720059812068939, -0.056309498846530914, -0.2534220218658447, 0.5090387463569641, 0.13214664161205292, 0.6595721244812012, 0.2523013949394226, 0.045753300189971924, -0.17820551991462708, 0.16866512596607208, -0.08894877880811691, 0.19712916016578674, -0.010022735223174095, -0.04132190719246864, -0.3386876583099365, -0.0331779420375824, -0.4179760217666626, -0.11482762545347214, 0.22043055295944214, -0.33284783363342285, -0.03773828595876694, -0.2488708347082138, 0.042936619371175766, 0.13500992953777313, -0.11346325278282166, 0.026608308777213097, -0.006043108180165291, 0.2527717649936676, -0.07410385459661484, 0.1623068004846573, 0.24985985457897186, -0.032050587236881256, 0.2161775827407837, 0.10435065627098083, 0.10926741361618042, -0.09028341621160507, 0.1097063273191452, 0.13911694288253784, -0.1979449838399887, -0.3117924928665161, 0.24128039181232452, 0.3260471224784851, -0.36162909865379333, 0.11626747250556946, -0.18294252455234528, 0.08549097180366516, 0.4222061038017273, -0.05156334489583969, 0.01660170406103134, 0.24569976329803467, 0.0994253158569336, -0.1708701252937317, 0.22370314598083496, -0.39966005086898804, -0.28218984603881836, -0.03170883655548096, 0.19268731772899628, 0.27797743678092957, 0.10087016224861145, 0.02975546568632126, -0.2888752520084381, -0.15922844409942627, -0.0015650466084480286, 0.20955339074134827, -0.3970547616481781, 0.014734193682670593, -0.3463866412639618, 0.15735703706741333, 0.05748474597930908, -0.34336063265800476, -0.03770219162106514, 0.04453248530626297, 0.17233692109584808, 0.18502455949783325, -0.22809825837612152, -0.09424258768558502, -0.13565263152122498, 0.015781361609697342, 0.21791130304336548, -0.0611422061920166, 0.322966992855072, 0.367595911026001, -0.01892673969268799, -0.27654528617858887, 0.505477786064148, 0.4357512593269348, 0.24003565311431885, -0.3785282373428345, 0.010464824736118317, 0.12376660108566284, -0.1097794622182846, -0.027247533202171326, 0.09683763235807419, 0.10764679312705994, 0.20096193253993988, 0.2250172644853592, 0.13058996200561523, -0.17860420048236847, 0.3606996238231659, 0.13612638413906097, -0.04533237963914871, -0.24920567870140076, 0.3173816502094269, 0.12193842977285385, -0.13876618444919586, -0.18310530483722687, -0.05192966014146805, -0.30852439999580383, 0.15129780769348145, 0.30848005414009094, -0.10380857437849045, 0.13198232650756836, 0.15680736303329468, 0.08414840698242188, -0.09370018541812897, 0.3824256360530853, 0.2785471975803375, 0.34129902720451355, -0.23918405175209045, -0.05326689034700394, -0.1395319402217865, 0.1518152356147766, -0.10916320979595184, 0.34944459795951843, 0.13355399668216705, 0.1528649479150772, -0.20132914185523987, -0.05549122393131256, -0.175802543759346, -0.4866575002670288, 0.03829009830951691, 0.014097049832344055, -0.5309219360351562, -0.06776535511016846, 0.21672356128692627, -0.2995288670063019, 0.08092987537384033, -0.2919178009033203, 0.10387663543224335, -0.021673057228326797, 0.05827067047357559, -0.02438611537218094, 0.25475820899009705, 0.05807654932141304, 0.4695749878883362, -0.15985913574695587, 0.21738691627979279, 0.3523499667644501, -0.03992732614278793, -0.2264605611562729, 0.015534982085227966, -0.12886862456798553, -0.3512546718120575, 0.062316812574863434, 0.002156432718038559, 0.6310629844665527, 0.030801279470324516, -0.342646062374115, -0.04718348756432533, 0.2966684401035309, 0.07446399331092834, -0.22585350275039673, -0.2897466719150543, 0.5159009695053101, -0.32680970430374146, 0.12090487778186798, -0.03553338348865509, 0.22577065229415894, 0.04696968197822571, 0.1271175593137741, -0.420870840549469, -0.5104092359542847, 0.4589865505695343, -0.6723723411560059, -0.2989540994167328, -0.15001176297664642, 0.3177682161331177, -0.17841532826423645, 0.15415196120738983, -0.701443076133728, -0.13085316121578217, 0.3214227557182312, -0.306863009929657, -0.37376129627227783, 0.1170787662267685, 0.2110438048839569, 0.016910653561353683, 0.03593844547867775, 0.5025029182434082, 0.05190788581967354, -0.30458617210388184, 0.09043379127979279, -0.3307104706764221 ]
https://github.com/huggingface/datasets/issues/474
test_load_real_dataset when config has BUILDER_CONFIGS that matter
The `data_dir` parameter has been removed. Now the error is `ValueError: Config name is missing` As mentioned in #470 I think we can have one test with the first config of BUILDER_CONFIGS, and another test that runs all of the configs in BUILDER_CONFIGS
It a dataset has custom `BUILDER_CONFIGS` with non-keyword arguments (or keyword arguments with non default values), the config is not loaded during the test and causes an error. I think the problem is that `test_load_real_dataset` calls `load_dataset` with `data_dir=temp_data_dir` ([here](https://github.com/huggingface/nlp/blob/master/tests/test_dataset_common.py#L200)). This causes [this line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L201) to always be false because `config_kwargs` is not `None`. [This line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L222) will be run instead, which doesn't use `BUILDER_CONFIGS`. For an example, you can try running the test for lince: ` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_real_dataset_lince` which yields > E TypeError: __init__() missing 3 required positional arguments: 'colnames', 'classes', and 'label_column'
43
test_load_real_dataset when config has BUILDER_CONFIGS that matter It a dataset has custom `BUILDER_CONFIGS` with non-keyword arguments (or keyword arguments with non default values), the config is not loaded during the test and causes an error. I think the problem is that `test_load_real_dataset` calls `load_dataset` with `data_dir=temp_data_dir` ([here](https://github.com/huggingface/nlp/blob/master/tests/test_dataset_common.py#L200)). This causes [this line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L201) to always be false because `config_kwargs` is not `None`. [This line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L222) will be run instead, which doesn't use `BUILDER_CONFIGS`. For an example, you can try running the test for lince: ` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_real_dataset_lince` which yields > E TypeError: __init__() missing 3 required positional arguments: 'colnames', 'classes', and 'label_column' The `data_dir` parameter has been removed. Now the error is `ValueError: Config name is missing` As mentioned in #470 I think we can have one test with the first config of BUILDER_CONFIGS, and another test that runs all of the configs in BUILDER_CONFIGS
[ -0.2808128893375397, 0.03864826261997223, 0.016344424337148666, 0.1777220070362091, 0.05833214521408081, 0.20165887475013733, 0.09010343253612518, 0.31950560212135315, -0.1677359789609909, 0.05236184597015381, 0.04207216203212738, 0.3578435182571411, -0.16560345888137817, -0.0654384195804596, 0.17205548286437988, 0.022249026224017143, -0.3066464960575104, 0.3548319339752197, 0.1001117080450058, 0.10284043848514557, -0.14807447791099548, 0.16933320462703705, 0.02372629940509796, 0.02755853906273842, -0.1753014773130417, -0.025048593059182167, -0.20619705319404602, 0.31406739354133606, 0.2690211534500122, -0.5922114849090576, 0.42573851346969604, 0.1297420859336853, -0.16124585270881653, 0.12312813103199005, -0.00011306416854495183, 0.11078107357025146, 0.24722692370414734, -0.1157405748963356, -0.5981771349906921, -0.13780389726161957, 0.06403209269046783, -0.23300756514072418, 0.2686033248901367, -0.3578183054924011, -0.2629145085811615, -0.2691296637058258, -0.06713929027318954, 0.09140673279762268, 0.1089664176106453, 0.3557491600513458, 0.2239869236946106, 0.2617238759994507, -0.4300840198993683, -0.11371918022632599, -0.17659243941307068, -0.0511275976896286, 0.05758686363697052, 0.33110132813453674, 0.053681809455156326, 0.05265688896179199, 0.11690404266119003, -0.14234565198421478, -0.0944499522447586, 0.10721665620803833, 0.008637011051177979, -0.025585614144802094, 0.06884115934371948, -0.05367010086774826, -0.08488830178976059, 0.2826157510280609, 0.19150668382644653, -0.4512467086315155, -0.00907179806381464, -0.3596463203430176, 0.23162488639354706, -0.09075028449296951, 0.3416334092617035, -0.1556074470281601, -0.42675891518592834, 0.013168280944228172, -0.42881572246551514, -0.26298511028289795, 0.13049578666687012, 0.09265988320112228, 0.10093088448047638, 0.020960167050361633, 0.02910034731030464, 0.24189811944961548, -0.08917894959449768, 0.1615595519542694, -0.10710489749908447, -0.3283272385597229, -0.10133685171604156, 0.016952136531472206, -0.04567841812968254, -0.29239141941070557, 0.20844286680221558, 0.09931078553199768, 0.28089016675949097, -0.053352274000644684, -0.03853997588157654, -0.12339016050100327, 0.24377521872520447, 0.17747707664966583, -0.11939534544944763, 0.3732147216796875, 0.43420499563217163, 0.05925304442644119, 0.18180185556411743, -0.0008891604375094175, -0.11975407600402832, 0.06591548025608063, 0.15391671657562256, -0.32035499811172485, -0.10546723008155823, -0.012628957629203796, 0.33609890937805176, -0.3401193618774414, -0.34687674045562744, -0.06126214563846588, -0.062300167977809906, 0.10999424010515213, 0.3181949853897095, 0.3967021703720093, -0.005704138427972794, -0.12523946166038513, -0.015959523618221283, 0.2539612352848053, -0.067444808781147, -0.08371875435113907, -0.3294447958469391, -0.04842144623398781, -0.06656133383512497, 0.13661491870880127, 0.43457451462745667, -0.32860374450683594, 0.6601089835166931, 0.22064541280269623, 0.06090211868286133, 0.04241647571325302, 0.043931230902671814, -0.04250193014740944, -0.04508136957883835, 0.37627917528152466, -0.13788601756095886, 0.03469069302082062, 0.07661208510398865, -0.1368468701839447, -0.40263494849205017, 0.22927159070968628, -0.14437216520309448, -0.5251879692077637, 0.34829750657081604, 0.17902639508247375, -0.3709743618965149, 0.027520742267370224, 0.013928823173046112, 0.0734269767999649, 0.06928461790084839, -0.2042810618877411, -0.17418748140335083, -0.3507980704307556, 0.023793336004018784, -0.2072620838880539, 0.2525065243244171, 0.3057612180709839, -0.13141706585884094, -0.20091716945171356, 0.18669915199279785, -0.09900699555873871, 0.11711090803146362, -0.1723434180021286, -0.30420732498168945, 0.22748807072639465, -0.27899491786956787, 0.028207674622535706, 0.6426601409912109, -0.31642529368400574, -0.07497748732566833, 0.32989394664764404, -0.0031591057777404785, 0.16436341404914856, 0.004576869308948517, -0.03736531361937523, -0.21503178775310516, -0.1312563270330429, 0.07815614342689514, 0.2976287007331848, -0.06222210079431534, -0.04548274725675583, -0.3610289692878723, -0.15312598645687103, 0.16611480712890625, 0.06985226273536682, -0.24927173554897308, -0.03401830792427063, -0.2962562143802643, -0.0673038512468338, 0.22888213396072388, -0.04258730635046959, -0.2239334136247635, 0.08620847761631012, -0.08869503438472748, -0.12049786746501923, -0.006259787827730179, 0.10139376670122147, -0.6111184358596802, 0.46124765276908875, 0.05104348808526993, 0.16733694076538086, 0.10608160495758057, -0.08087462931871414, -0.22163715958595276, -0.06502380222082138, -0.275485634803772, -0.37863484025001526, 0.1259015053510666, 0.4341849684715271, 0.10422304272651672, -0.20896606147289276, -0.16099165380001068, -0.09815677255392075, -0.3174368441104889, -0.037504132837057114, -0.04071201756596565, 0.06933584064245224, -0.0057061817497015, -0.025556273758411407, -0.13669149577617645, 0.13858157396316528, 0.13883961737155914, -0.2931472957134247, -0.08651461452245712, 0.508660614490509, -0.10052704811096191, -0.11352203786373138, 0.06704748421907425, -0.049218177795410156, 0.014428406953811646, -0.026890315115451813, -0.040112875401973724, 0.13916492462158203, -0.022807151079177856, -0.15250164270401, 0.011687316000461578, 0.40823423862457275, 0.15215109288692474, 0.26193565130233765, -0.003957122564315796, -0.05800103396177292, 0.25217121839523315, -0.24024905264377594, -0.08837394416332245, -0.15122851729393005, 0.4394219219684601, 0.10594896972179413, 0.45703357458114624, 0.03231016919016838, -0.3409217894077301, -0.04862814396619797, 0.22731226682662964, -0.008617382496595383, -0.11186028271913528, 0.16717880964279175, -0.13148993253707886, 0.01184629276394844, 0.07436811923980713, -0.007103797048330307, 0.673156201839447, 0.19361084699630737, 0.032780855894088745, 0.11031551659107208, -0.5834100246429443, -0.2602221965789795, 0.3016810119152069, -0.03575918823480606, 0.27426469326019287, 0.12251852452754974, 0.20303431153297424, -0.07320674508810043, -0.4160090684890747, -0.3327849805355072, 0.2195357084274292, 0.22615934908390045, -0.3869550824165344, 0.14080040156841278, -0.08010231703519821, -0.001392066478729248, -0.27972885966300964, -0.31393998861312866, -0.0723811686038971, -0.34782448410987854, 0.21411922574043274, -0.08900095522403717, -0.2131895273923874, 0.20644401013851166, -0.04893678426742554, 0.22714725136756897, -0.23095107078552246, -0.5881271958351135, -0.30205580592155457, -0.1458090990781784, -0.4142380356788635, 0.041433047503232956, 0.15409456193447113, -0.02045612782239914, 0.2949231266975403, -0.12284700572490692, -0.544880211353302, 0.10328999906778336, -0.3132398724555969, 0.2091282159090042, -0.042723774909973145, 0.7572256922721863, 0.30805349349975586, 0.10657238215208054, 0.46493059396743774, -0.27617549896240234, 0.45192667841911316, 0.12198805809020996, -0.116691954433918, 0.20487812161445618, 0.1077316626906395, -0.08622662723064423, -0.34885433316230774, -0.4813724458217621, -0.011597461998462677, -0.226695716381073, -0.11766904592514038, 0.12485314905643463, 0.16423571109771729, 0.4464907646179199, 0.16738398373126984, 0.20236161351203918, -0.19383391737937927, 0.4660238027572632, -0.07983427494764328, -0.19491048157215118, -0.12844997644424438, -0.07452026009559631, -0.18093672394752502, -0.3876858651638031, -0.13724038004875183, 0.35112276673316956, -0.1121409684419632, -0.49868470430374146, -0.25279876589775085, -0.12081442773342133, 0.4919116497039795, -0.21373426914215088, -0.20256684720516205, 0.25969961285591125, 0.31002703309059143, -0.08420412242412567, -0.1884576976299286, 0.041389886289834976, 0.28891873359680176, 0.11171218007802963, 0.23395690321922302, 0.0027124714106321335, 0.22647249698638916, -0.16822311282157898, 0.33771806955337524, 0.3033353090286255, -0.29502561688423157, 0.14549879729747772, -0.2538924813270569, 0.2515292167663574, -0.18264135718345642, -0.3044299781322479, 0.16866765916347504, 0.1307937055826187, -0.16157536208629608, 0.32014960050582886, -0.14148041605949402, -0.044293440878391266, -0.1323334276676178, 0.016250822693109512, 0.03942777216434479, -0.14944548904895782, 0.22985810041427612, -0.19080597162246704, 0.00860150158405304, 0.04781249538064003, 0.041182488203048706, -0.08099669218063354, 0.04664449021220207, 0.04256612807512283, 0.26827937364578247, -0.05438012629747391, -0.09271814674139023, -0.20883172750473022, -0.30036529898643494, -0.42122769355773926, 0.16446194052696228, -0.09914395958185196, 0.30141881108283997, -0.04674305394291878, -0.026559745892882347, 0.17953597009181976, 0.0005331067368388176, 0.4785405993461609, -0.003271421417593956, 0.17001831531524658, 0.487114816904068, 0.0659947469830513, -0.3755955100059509, -0.13305924832820892, -0.295486181974411, 0.16351835429668427, 0.37882348895072937, 0.6604263782501221, -0.3550490736961365, -0.4132332503795624, 0.09957893937826157, 0.4210098385810852, -0.10649631172418594, -0.30358806252479553, -0.26651421189308167, -0.34963661432266235, -0.14673475921154022, 0.07018010318279266, -0.3176819682121277, 0.355307400226593, -0.30389919877052307, 0.056831393390893936, -0.06539304554462433, -0.08979897201061249, 0.0434083454310894, 0.36185377836227417, 0.25496354699134827, -0.12906920909881592, 0.21329204738140106, 0.0077905915677547455, 0.199832946062088, 0.04669059440493584, 0.4059336483478546, -0.06838087737560272, 0.2832716107368469, -0.07794490456581116, 0.1865798383951187, 0.5016239285469055, 0.2776148319244385, -0.12417682260274887, -0.056181274354457855, -0.39908891916275024, 0.17364093661308289, -0.2655557692050934, 0.2824918329715729, 0.3087885081768036, 0.04393186792731285, 0.008172987028956413, -0.25623801350593567, 0.589776873588562, -0.026384007185697556, -0.22289961576461792, 0.4522725045681, -0.09373898804187775, -0.4636978805065155, 0.3889217972755432, -0.03002317249774933, 0.7602942585945129, 0.3173424005508423, 0.2274957150220871, 0.6086382269859314, 0.21187184751033783, 0.1707545965909958, 0.12471336126327515, 0.15486693382263184, -0.2730993330478668, -0.08457857370376587, 0.27972304821014404, -0.17931495606899261, 0.19647216796875, 0.22769469022750854, -0.27548477053642273, 0.2837618589401245, -0.06385329365730286, -0.044919971376657486, 0.13810361921787262, 0.22042527794837952, -0.0480710044503212, -0.03736058622598648, -0.40181002020835876, 0.15811829268932343, 0.0321185439825058, 0.28685393929481506, 0.030063815414905548, 0.05305195599794388, 0.052424754947423935, -0.25528520345687866, 0.050786495208740234, 0.138869971036911, -0.33158522844314575, -0.000888824462890625, 0.12346643209457397, -0.19478265941143036, 0.01310635358095169, 0.15385042130947113, 0.12855175137519836, 0.2766217589378357, -0.12902915477752686, 0.13581052422523499, 0.013700205832719803, 0.10337662696838379, 0.18390820920467377, -0.08964698761701584, 0.2951231896877289, -0.17040154337882996, -0.2964983582496643, 0.06020094081759453, -0.38013359904289246, -0.05853193998336792, 0.27864229679107666, -0.16151823103427887, -0.06616523116827011, -0.3292326331138611, -0.33090174198150635, 0.0869201049208641, 0.11807537078857422, -0.21449390053749084, 0.13620004057884216, -0.028253719210624695, -0.36461910605430603, 0.1135282814502716, -0.07675404846668243, -0.3893274962902069, -0.07563638687133789, -0.10694355517625809, 0.09407514333724976, 0.2095007598400116, 0.627008318901062, -0.33517205715179443, 0.24775008857250214, -0.16182243824005127, 0.03794310986995697, 0.15120001137256622, -0.17006857693195343, 0.15997564792633057, 0.22011002898216248, -0.21479405462741852, 0.011386298574507236, 0.449331670999527, 0.13105323910713196, 0.19799965620040894, -0.1519985944032669, -0.2812594175338745, -0.18718594312667847, 0.03570251166820526, 0.22326180338859558, 0.31444358825683594, -0.040733568370342255, 0.5240075588226318, -0.09779518097639084, 0.2897008955478668, -0.3693549931049347, -0.03611423820257187, -0.43623557686805725, 0.36078688502311707, -0.08451083302497864, 0.21699321269989014, 0.2612888514995575, 0.1414245367050171, 0.15566597878932953, -0.24307866394519806, -0.057581961154937744, -0.29001981019973755, -0.1918911188840866, 0.12625181674957275, 0.044553741812705994, 0.15275539457798004, 0.007316627539694309, -0.13331446051597595, 0.10839469730854034, -0.1033809706568718, 0.13819459080696106, -0.3329191207885742, -0.006425291299819946, 0.28938013315200806, 0.2476060837507248, 0.1590152084827423, -0.052115246653556824, 0.21659861505031586, -0.2068294882774353, -0.05280411243438721, -0.054747454822063446, 0.22936086356639862, -0.40557998418807983, -0.13913364708423615, -0.0639212504029274, 0.048065993934869766, -0.2943245768547058, 0.16066405177116394, -0.15723305940628052, 0.01502842828631401, 0.04519607499241829, 0.0703839510679245, 0.2515389919281006, 0.502447247505188, -0.0748988538980484, 0.05642210692167282, 0.13746225833892822, 0.23012802004814148, -0.3603680729866028, -0.05013204738497734, 0.05654675513505936, -0.1226833388209343, 0.3516513407230377, 0.19199153780937195, 0.11364135146141052, -0.05241557955741882, 0.21141673624515533, -0.11124406009912491, 0.11735014617443085, -0.15137077867984772, -0.06251263618469238, 0.37826064229011536, -0.10772711038589478, 0.13774330914020538, 0.281750351190567, -0.03364650532603264, 0.15108008682727814, 0.07109950482845306, -0.21788835525512695, 0.3636241555213928, 0.0021117255091667175, -0.16389182209968567, 0.19929365813732147, -0.1242932379245758, 0.44785964488983154, 0.05786946415901184, 0.08502499759197235, -0.11521831899881363, -0.16631239652633667, 0.5778759121894836, -0.5218059420585632, -0.253731369972229, -0.044605813920497894, 0.1963048279285431, -0.15041247010231018, -0.2721494734287262, -0.40871480107307434, -0.10993168503046036, 0.008978411555290222, -0.13951165974140167, -0.08937081694602966, -0.2711924910545349, 0.07496949285268784, -0.039051465690135956, -0.17970792949199677, -0.4126123785972595, -0.03260909020900726, 0.3341919183731079, -0.09303905814886093, -0.15969771146774292, 0.4812890589237213, 0.21378737688064575, -0.01859719306230545, 0.08960103988647461, 0.4621701240539551, 0.508662760257721, 0.1307404637336731, -0.07807333767414093, -0.1886778175830841, -0.038098398596048355, 0.05254527926445007, -0.20509016513824463, 0.10653834044933319, 0.02403077855706215, -0.2988908886909485, 0.46340206265449524, 0.20072141289710999, -0.1836308389902115, -0.1176312118768692, 0.10815446823835373, -0.16759245097637177, -0.17079177498817444, 0.5300666093826294, 0.19583065807819366, -0.09784107655286789, -0.038104861974716187, 0.1672275811433792, -0.20963573455810547, 0.0716121643781662, 0.44974491000175476, 0.18662256002426147, 0.1008024737238884, 0.12618817389011383, 0.11340959370136261, -0.13225524127483368, 0.5245953798294067, 0.08972979336977005, -0.04365433007478714, -0.5897711515426636, -0.16354842483997345, -0.6522307395935059, 0.15910115838050842, -0.02948157861828804, -0.2246658354997635, 0.29346176981925964, 0.0248230192810297, 0.20016130805015564, -0.03796323388814926, -0.15833257138729095, 0.27338510751724243, 0.3098802864551544, -0.14151017367839813, -0.31428632140159607, -0.235600546002388, -0.2642754316329956, -0.02552712894976139, 0.0640595331788063, -0.2706082761287689, 0.021101634949445724, -0.19634923338890076, 0.049455828964710236, 0.11046485602855682, 0.11456012725830078, 0.546115517616272, 0.11877351999282837, 0.2451612800359726, -0.005592601373791695, 0.5098611116409302, 0.03375585377216339, -0.147934690117836, -0.008397553116083145, -0.1826663613319397, -0.1600973755121231, -0.10344987362623215, -0.09309433400630951, 0.0018293820321559906, -0.16122891008853912, 0.11691530048847198, -0.23329590260982513, 0.062234871089458466, 0.16860730946063995, -0.20843462646007538, 0.10383180528879166, 0.10844635963439941, -0.16009098291397095, 0.2272062748670578, 0.22556616365909576, 0.46496543288230896, -0.1066594272851944, 0.10993652045726776, -0.3157241940498352, -0.3565715551376343, 0.7502676248550415, -0.16350503265857697, -0.20161540806293488, -0.0326659195125103, 0.1670454889535904, -0.19024357199668884, 0.07059542089700699, -0.3250296711921692, -0.20042923092842102, 0.4116533696651459, -0.11689642816781998, -0.2372821569442749, 0.33580371737480164, 0.18969300389289856, 0.082023024559021, 0.06551669538021088, 0.3776131272315979, 0.075765460729599, -0.20502911508083344, -0.17307023704051971, -0.3017943501472473 ]
https://github.com/huggingface/datasets/issues/474
test_load_real_dataset when config has BUILDER_CONFIGS that matter
This was fixed in #527 Closing this one, but feel free to re-open if you have other questions
It a dataset has custom `BUILDER_CONFIGS` with non-keyword arguments (or keyword arguments with non default values), the config is not loaded during the test and causes an error. I think the problem is that `test_load_real_dataset` calls `load_dataset` with `data_dir=temp_data_dir` ([here](https://github.com/huggingface/nlp/blob/master/tests/test_dataset_common.py#L200)). This causes [this line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L201) to always be false because `config_kwargs` is not `None`. [This line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L222) will be run instead, which doesn't use `BUILDER_CONFIGS`. For an example, you can try running the test for lince: ` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_real_dataset_lince` which yields > E TypeError: __init__() missing 3 required positional arguments: 'colnames', 'classes', and 'label_column'
18
test_load_real_dataset when config has BUILDER_CONFIGS that matter It a dataset has custom `BUILDER_CONFIGS` with non-keyword arguments (or keyword arguments with non default values), the config is not loaded during the test and causes an error. I think the problem is that `test_load_real_dataset` calls `load_dataset` with `data_dir=temp_data_dir` ([here](https://github.com/huggingface/nlp/blob/master/tests/test_dataset_common.py#L200)). This causes [this line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L201) to always be false because `config_kwargs` is not `None`. [This line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L222) will be run instead, which doesn't use `BUILDER_CONFIGS`. For an example, you can try running the test for lince: ` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_real_dataset_lince` which yields > E TypeError: __init__() missing 3 required positional arguments: 'colnames', 'classes', and 'label_column' This was fixed in #527 Closing this one, but feel free to re-open if you have other questions
[ -0.3385567367076874, -0.05364762991666794, 0.04242796078324318, 0.11086336523294449, 0.1634404957294464, 0.0783362165093422, 0.1228828877210617, 0.33067333698272705, -0.09733088314533234, -0.0040300339460372925, 0.05377229303121567, 0.4402488172054291, -0.15711842477321625, 0.041462354362010956, 0.16436532139778137, 0.04439131170511246, -0.26825806498527527, 0.2769703269004822, 0.09802442789077759, -0.031909070909023285, -0.1879013329744339, 0.1579587459564209, -0.09730774909257889, 0.09491217136383057, -0.2986771762371063, 0.03403082862496376, -0.13792555034160614, 0.29867005348205566, 0.19901424646377563, -0.5106942653656006, 0.44617775082588196, 0.09386807680130005, -0.085957370698452, 0.1431894302368164, -0.0001083159149857238, 0.08014865219593048, 0.3250586986541748, -0.0839209258556366, -0.6371133327484131, -0.0625697672367096, 0.14054566621780396, -0.29291269183158875, 0.2855103313922882, -0.3282710611820221, -0.32126736640930176, -0.24112805724143982, -0.12703825533390045, 0.07364891469478607, 0.07250310480594635, 0.3807220160961151, 0.2747090458869934, 0.36361679434776306, -0.22975239157676697, -0.14858803153038025, -0.16209226846694946, -0.025886841118335724, -0.04371024668216705, 0.33942869305610657, 0.16886164247989655, 0.018341394141316414, 0.05271022766828537, -0.12174104154109955, -0.06410417705774307, 0.09162048995494843, 0.049526747316122055, -0.11772044748067856, -0.07736849039793015, -0.06861763447523117, -0.020173337310552597, 0.27876532077789307, 0.2818538546562195, -0.43294230103492737, -0.02117912471294403, -0.25134366750717163, 0.1685003638267517, -0.14982585608959198, 0.35197940468788147, -0.08126760274171829, -0.40761855244636536, 0.042662832885980606, -0.4676842987537384, -0.190042644739151, 0.06581266224384308, 0.11043012887239456, 0.09508545696735382, -0.041497811675071716, -0.010846727527678013, 0.2007039487361908, 0.003665648400783539, 0.10422550141811371, -0.1386713832616806, -0.17610034346580505, -0.13101869821548462, 0.12790769338607788, -0.13914422690868378, -0.31005701422691345, 0.2468239963054657, 0.21676206588745117, 0.2853584289550781, 0.004345806315541267, -0.027390051633119583, 0.0024011507630348206, 0.2310735285282135, 0.22410380840301514, -0.13746711611747742, 0.36985522508621216, 0.362244188785553, -0.011629563756287098, 0.19817548990249634, 0.010261528193950653, -0.19063223898410797, 0.04844026267528534, 0.11538580805063248, -0.34900963306427, -0.00836784765124321, -0.0628788024187088, 0.26518714427948, -0.4105980694293976, -0.3491702675819397, 0.02939416840672493, -0.05579201504588127, 0.16557757556438446, 0.3375842273235321, 0.41993433237075806, -0.032467227429151535, -0.19706124067306519, 0.023755617439746857, 0.3201879858970642, -0.19128012657165527, -0.10859706252813339, -0.3206712603569031, -0.02181268110871315, -0.1324208676815033, 0.05237124115228653, 0.46881523728370667, -0.27279284596443176, 0.6226431727409363, 0.14609381556510925, 0.02168375998735428, 0.016542993485927582, 0.07464034855365753, -0.0024725291877985, -0.05686169117689133, 0.37858641147613525, -0.16059254109859467, -0.07643358409404755, 0.2329167127609253, -0.15366017818450928, -0.35170674324035645, 0.2044922113418579, -0.08849600702524185, -0.5394565463066101, 0.24014133214950562, 0.22857609391212463, -0.30292755365371704, -0.07362265884876251, 0.009451352059841156, 0.01876852661371231, 0.05770573019981384, -0.12591809034347534, -0.11047213524580002, -0.391973614692688, 0.06198418512940407, -0.15283285081386566, 0.268503874540329, 0.28127801418304443, -0.18509775400161743, -0.13221514225006104, 0.11887003481388092, -0.14351019263267517, 0.19526885449886322, -0.09705337882041931, -0.2381478250026703, 0.15000565350055695, -0.17378312349319458, 0.1072414368391037, 0.5219544768333435, -0.23058387637138367, -0.11802096664905548, 0.29014211893081665, -0.008415896445512772, 0.057363249361515045, -0.1372816264629364, 0.07737113535404205, -0.15167170763015747, -0.037382688373327255, 0.059637364000082016, 0.34092968702316284, 0.040854234248399734, 0.034127578139305115, -0.44096845388412476, -0.13543370366096497, 0.15708577632904053, 0.14548151195049286, -0.3463745415210724, -0.04750028997659683, -0.14694160223007202, -0.06017690896987915, 0.19908538460731506, -0.08269792795181274, -0.2510533332824707, 0.061964720487594604, 0.041998960077762604, -0.096745565533638, 0.04219405725598335, 0.09557733684778214, -0.556489884853363, 0.41915544867515564, 0.08335603773593903, 0.293409138917923, 0.15815573930740356, -0.08356393128633499, -0.271880179643631, 0.04565088450908661, -0.27931880950927734, -0.38555800914764404, 0.16364043951034546, 0.21975305676460266, 0.155547097325325, -0.11517858505249023, -0.14252395927906036, -0.09535736590623856, -0.33426451683044434, 0.01086837612092495, -0.05607973411679268, 0.06789115816354752, -0.016809502616524696, -0.06256944686174393, -0.07485578954219818, 0.26622432470321655, 0.13720300793647766, -0.2954995632171631, -0.2036425769329071, 0.4747345745563507, 0.013856911100447178, -0.09610766172409058, 0.10718061029911041, -0.04137806594371796, -0.07194691896438599, -0.09768515825271606, 0.007897408679127693, 0.16787250339984894, -0.017354223877191544, -0.1123134195804596, -0.04628412425518036, 0.38525331020355225, 0.19476860761642456, 0.17417284846305847, -0.08174977451562881, 0.025838075205683708, 0.3416344225406647, -0.16749878227710724, -0.0014200583100318909, -0.10943643748760223, 0.4954262673854828, 0.1282520592212677, 0.4595429599285126, 0.05737219750881195, -0.34722182154655457, 0.01088877022266388, 0.279954195022583, 0.014719121158123016, -0.03060467541217804, 0.31785744428634644, -0.15618959069252014, -0.0745466947555542, 0.13919928669929504, -0.061759017407894135, 0.5611629486083984, 0.18055377900600433, -0.029194768518209457, 0.13633501529693604, -0.602414071559906, -0.28294187784194946, 0.3375746011734009, -0.15079231560230255, 0.23571734130382538, 0.017427518963813782, 0.17951644957065582, -0.10595788806676865, -0.5612176656723022, -0.26910799741744995, 0.06005237251520157, 0.34446844458580017, -0.3191830515861511, 0.10424434393644333, -0.1219017505645752, 0.06844914704561234, -0.11203978955745697, -0.223079651594162, -0.1525086909532547, -0.37973979115486145, 0.2066003978252411, 0.01925944909453392, -0.07201023399829865, 0.2248993068933487, -0.06452082097530365, 0.2702745497226715, -0.16338592767715454, -0.5609406232833862, -0.30937662720680237, -0.24416086077690125, -0.5122609734535217, 0.08240722119808197, 0.17111416161060333, -0.011969313956797123, 0.31322070956230164, -0.08254898339509964, -0.36035871505737305, 0.10286464542150497, -0.3295377194881439, 0.12904861569404602, -0.09005451202392578, 0.7290685772895813, 0.2706768810749054, 0.1940113604068756, 0.3838440179824829, -0.11422952264547348, 0.5275816917419434, 0.010032737627625465, -0.12751048803329468, 0.28184792399406433, 0.15500599145889282, -0.16159188747406006, -0.3950868844985962, -0.46033975481987, -0.044955819845199585, -0.25177887082099915, 0.039246782660484314, 0.1456490308046341, 0.08476203680038452, 0.4176315665245056, 0.25657907128334045, 0.2545303702354431, -0.10593778640031815, 0.37794965505599976, -0.16282667219638824, -0.22032442688941956, -0.09693394601345062, -0.055735331028699875, -0.3735416531562805, -0.3066043555736542, -0.09914880245923996, 0.3467933237552643, -0.11253194510936737, -0.4803195595741272, -0.24757981300354004, -0.20523865520954132, 0.40868914127349854, -0.043476320803165436, -0.20149557292461395, 0.2554347515106201, 0.24728214740753174, -0.1151551678776741, -0.1670490801334381, 0.040526214987039566, 0.2664712965488434, 0.03645725175738335, 0.12487833201885223, -0.011756058782339096, 0.31331348419189453, -0.18551668524742126, 0.29493653774261475, 0.2942868769168854, -0.3394871652126312, 0.2867264747619629, -0.2529635727405548, 0.32773956656455994, -0.23444125056266785, -0.3229256570339203, 0.24631322920322418, 0.08712098002433777, -0.19734200835227966, 0.2904696762561798, -0.07031334936618805, -0.17444530129432678, -0.13090336322784424, 0.08233346045017242, 0.06259556114673615, -0.1458008587360382, 0.17594456672668457, -0.05434407293796539, 0.027657322585582733, 0.018071994185447693, 0.14187753200531006, -0.09791378676891327, -0.09897086024284363, 0.025728929787874222, 0.2842676043510437, -0.07896459847688675, -0.1229352205991745, -0.25614026188850403, -0.31282514333724976, -0.4667951464653015, 0.23274552822113037, -0.1251157820224762, 0.388889342546463, -0.16967374086380005, -0.05311213806271553, 0.19998662173748016, -0.06482316553592682, 0.46618884801864624, -0.06254059821367264, 0.1752844601869583, 0.4553382396697998, 0.06480523198843002, -0.4149455428123474, -0.09804464131593704, -0.3053009808063507, 0.149245947599411, 0.3097396790981293, 0.6342872977256775, -0.2931172549724579, -0.3505552113056183, 0.08781817555427551, 0.3865180015563965, -0.08533436059951782, -0.26228412985801697, -0.2818947732448578, -0.3366249203681946, -0.1886938363313675, 0.15183450281620026, -0.3122461140155792, 0.3926040828227997, -0.309353232383728, 0.041759807616472244, -0.09656592458486557, -0.0768505111336708, 0.07461180537939072, 0.43395760655403137, 0.2132893204689026, -0.12934570014476776, 0.15322384238243103, -0.050242483615875244, 0.16600719094276428, 0.051976773887872696, 0.38486188650131226, -0.09009188413619995, 0.26544809341430664, -0.12434334307909012, 0.08787298947572708, 0.4876846373081207, 0.2203252911567688, -0.16779795289039612, -0.11084719747304916, -0.3851250410079956, 0.20152178406715393, -0.33234989643096924, 0.21475914120674133, 0.33901482820510864, 0.13252724707126617, 0.04964059963822365, -0.2370394766330719, 0.5995288491249084, -0.025543753057718277, -0.10070960223674774, 0.37546801567077637, -0.06494542956352234, -0.33949464559555054, 0.34822237491607666, 0.0802408754825592, 0.7891094088554382, 0.2262754887342453, 0.21271392703056335, 0.6046997904777527, 0.22906582057476044, 0.1493370234966278, 0.0640861764550209, 0.14785681664943695, -0.34002894163131714, -0.08236251026391983, 0.22977380454540253, -0.195412278175354, 0.20353662967681885, 0.18532711267471313, -0.2958574593067169, 0.1574374884366989, -0.11543843895196915, -0.13649030029773712, 0.13251593708992004, 0.2557721436023712, -0.06152404099702835, -0.07256650924682617, -0.35985997319221497, 0.2513633370399475, 0.03078678995370865, 0.3629930317401886, 0.04532672092318535, 0.0642540454864502, 0.0008850134909152985, -0.253764271736145, -0.09297164529561996, 0.1888667345046997, -0.21715278923511505, -0.017451487481594086, 0.14722585678100586, -0.1967596411705017, 0.051649417728185654, 0.07822750508785248, 0.1751750111579895, 0.2904874086380005, -0.1754973977804184, 0.05240968242287636, 0.04595494270324707, 0.07073840498924255, 0.2827407419681549, 0.007389753125607967, 0.3172929286956787, -0.17679426074028015, -0.27129504084587097, 0.05270323157310486, -0.3210819363594055, -0.0509171299636364, 0.28488510847091675, -0.2373485118150711, -0.036735668778419495, -0.3911938965320587, -0.39044639468193054, -0.04227282106876373, -0.006827060133218765, -0.1889251470565796, 0.17135865986347198, 0.025708641856908798, -0.24600617587566376, 0.1252579689025879, 0.03368557244539261, -0.365494966506958, -0.06399112939834595, -0.030124865472316742, 0.025730714201927185, 0.2625963091850281, 0.6146231889724731, -0.20571213960647583, 0.1340368092060089, -0.23027899861335754, 0.024984091520309448, 0.18055543303489685, -0.2169003188610077, 0.1104889065027237, 0.25857383012771606, -0.22013139724731445, 0.06462132185697556, 0.42089882493019104, 0.08966836333274841, 0.10692615061998367, -0.110894113779068, -0.38912251591682434, -0.23015834391117096, 0.04640796035528183, 0.1363062709569931, 0.30316925048828125, -0.05484649911522865, 0.5074740052223206, 0.04900849610567093, 0.15552350878715515, -0.40113475918769836, -0.08618464320898056, -0.4393163025379181, 0.21758775413036346, -0.018009677529335022, 0.12399004399776459, 0.2580358386039734, 0.06693832576274872, 0.1721222847700119, -0.18513472378253937, -0.1733318567276001, -0.3309585154056549, -0.21682476997375488, 0.09496264904737473, 0.1097596287727356, 0.09174856543540955, -0.041517943143844604, -0.17172032594680786, -0.024939853698015213, -0.18459805846214294, -0.06128610298037529, -0.3775551915168762, -0.0767604261636734, 0.2772759795188904, 0.26822081208229065, 0.18081066012382507, -0.03270405903458595, 0.11791756749153137, -0.1616002321243286, -0.055270761251449585, -0.14417919516563416, 0.032642967998981476, -0.3144248127937317, -0.13293765485286713, -0.10577792674303055, 0.09057141095399857, -0.20271645486354828, 0.16871023178100586, -0.06488250195980072, 0.005316004157066345, 0.06139637902379036, 0.02353685162961483, 0.2797965109348297, 0.4092731177806854, -0.06311137974262238, -0.0312698557972908, 0.23440253734588623, 0.26009026169776917, -0.4162311553955078, -0.00714613264426589, 0.10636202991008759, -0.0779239684343338, 0.33180612325668335, 0.13229815661907196, 0.07698634266853333, -0.011563368141651154, 0.16148903965950012, -0.07460576295852661, 0.16835209727287292, -0.20329809188842773, -0.10429678857326508, 0.3018095791339874, -0.13906770944595337, 0.17608971893787384, 0.31383445858955383, -0.017744161188602448, 0.1356627494096756, 0.12557698786258698, -0.11947917193174362, 0.3516346514225006, 0.07690279185771942, -0.011893000453710556, 0.08882810175418854, -0.1562250554561615, 0.40141376852989197, 0.009034350514411926, 0.12108604609966278, -0.08612082153558731, -0.18692830204963684, 0.6330316066741943, -0.5700559020042419, -0.2774115204811096, -0.1221759021282196, 0.187774196267128, -0.22501727938652039, -0.16616791486740112, -0.3115483224391937, -0.07108819484710693, -0.03744153678417206, -0.19712741672992706, -0.08773139119148254, -0.18835802376270294, 0.039173904806375504, -0.058114826679229736, -0.08820037543773651, -0.421150803565979, -0.10799143463373184, 0.3032979965209961, -0.049965448677539825, -0.0625259131193161, 0.46668633818626404, 0.09076329320669174, 0.06655341386795044, 0.012910060584545135, 0.45042264461517334, 0.50126713514328, 0.22179526090621948, -0.1015416830778122, -0.14008896052837372, -0.15862318873405457, 0.05152493715286255, -0.149855375289917, 0.22920526564121246, 0.046956807374954224, -0.27337586879730225, 0.41039374470710754, 0.21537330746650696, -0.20121228694915771, -0.12905891239643097, 0.06073934957385063, -0.0885225236415863, -0.1209937185049057, 0.46984389424324036, 0.2086043506860733, -0.16012513637542725, -0.16435018181800842, 0.08713357150554657, -0.20418524742126465, 0.1490514874458313, 0.4095185697078705, 0.1968950778245926, 0.12606877088546753, -0.05183328688144684, 0.1399005949497223, -0.08446308970451355, 0.6105016469955444, 0.11930295825004578, -0.03504052013158798, -0.5040111541748047, -0.15531271696090698, -0.7108893990516663, 0.1991666555404663, -0.14371319115161896, -0.33851778507232666, 0.2648848295211792, -0.06150650233030319, 0.20100271701812744, -0.010559242218732834, -0.18474610149860382, 0.2963278591632843, 0.27607548236846924, -0.15577489137649536, -0.29495903849601746, -0.14011503756046295, -0.2625841498374939, -0.07806400209665298, 0.031190313398838043, -0.3317841589450836, 0.05861862376332283, -0.23890787363052368, 0.09397173672914505, 0.0648317039012909, 0.076486736536026, 0.42122185230255127, 0.21436113119125366, 0.1641703099012375, -0.04290451109409332, 0.48373904824256897, 0.043872952461242676, -0.07266189903020859, -0.08290015161037445, -0.23326006531715393, -0.1337161362171173, -0.03500359505414963, -0.10124221444129944, -0.019825121387839317, -0.055385224521160126, 0.07092240452766418, -0.30840349197387695, 0.19509029388427734, 0.14933811128139496, -0.20647796988487244, 0.08727151900529861, 0.10544440895318985, -0.1367051899433136, 0.1767999529838562, 0.2128751128911972, 0.45573848485946655, -0.12342818081378937, 0.18403682112693787, -0.2646230459213257, -0.40192532539367676, 0.7486211657524109, -0.2990201711654663, -0.19545254111289978, 0.06540325284004211, 0.1390286386013031, -0.13612914085388184, -0.023207267746329308, -0.2310410737991333, -0.1156557947397232, 0.34823644161224365, -0.12598413228988647, -0.15096087753772736, 0.33256131410598755, 0.10501831769943237, 0.08156733214855194, 0.05889881029725075, 0.4525283873081207, 0.027141228318214417, -0.08065786212682724, -0.11146838963031769, -0.2522565722465515 ]
https://github.com/huggingface/datasets/issues/469
invalid data type 'str' at _convert_outputs in arrow_dataset.py
Hi ! Did you try to set the output format to pytorch ? (or tensorflow if you're using tensorflow) It can be done with `dataset.set_format("torch", columns=columns)` (or "tensorflow"). Note that for pytorch, string columns can't be converted to `torch.Tensor`, so you have to specify in `columns=` the list of columns you want to keep (`input_ids` for example)
I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str'
57
invalid data type 'str' at _convert_outputs in arrow_dataset.py I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' Hi ! Did you try to set the output format to pytorch ? (or tensorflow if you're using tensorflow) It can be done with `dataset.set_format("torch", columns=columns)` (or "tensorflow"). Note that for pytorch, string columns can't be converted to `torch.Tensor`, so you have to specify in `columns=` the list of columns you want to keep (`input_ids` for example)
[ -0.2228243350982666, 0.024250030517578125, 0.10737118124961853, 0.23030777275562286, 0.5109524130821228, -0.10725949704647064, 0.5323299169540405, 0.07758963108062744, -0.3410608470439911, -0.1247759759426117, 0.036657460033893585, 0.38640740513801575, -0.3696955740451813, 0.04221741855144501, 0.044361136853694916, -0.20246419310569763, -0.08803436905145645, 0.009989947080612183, -0.023253202438354492, -0.05363911762833595, 0.04824294149875641, 0.1829809695482254, -0.1568261831998825, 0.41447770595550537, -0.6451317071914673, -0.1835787445306778, 0.17466366291046143, -0.09639241546392441, -0.0992203801870346, -0.44877856969833374, 0.22027485072612762, -0.10204413533210754, 0.49763670563697815, 0.34723225235939026, -0.00012417118705343455, 0.13803546130657196, 0.10928626358509064, 0.10169446468353271, -0.29087191820144653, -0.30163800716400146, 0.13411536812782288, -0.059384651482105255, 0.4149942100048065, -0.20153960585594177, -0.05718928575515747, -0.26009130477905273, -0.0606258288025856, 0.2617684304714203, 0.38377588987350464, 0.5016975998878479, 0.11732237040996552, 0.168516606092453, 0.24648593366146088, 0.0738130584359169, 0.2595645785331726, 0.3155062198638916, 0.07547719031572342, 0.20712460577487946, 0.016833722591400146, 0.02660575695335865, -0.08569461852312088, 0.07480800151824951, -0.0701286792755127, -0.19977375864982605, 0.21665742993354797, 0.22728313505649567, 0.17457962036132812, -0.14762207865715027, -0.22878491878509521, 0.11988408863544464, 0.43321487307548523, -0.3214257061481476, -0.15594464540481567, 0.00792209804058075, -0.01116220373660326, -0.2727994918823242, -0.006166346371173859, 0.24833130836486816, -0.4277770221233368, 0.16670124232769012, -0.1622595489025116, -0.025467004626989365, -0.37924981117248535, 0.1995561718940735, -0.09251708537340164, 0.5032647848129272, 0.1183696985244751, 0.15681712329387665, 0.1842406541109085, -0.014435797929763794, 0.37171033024787903, 0.08763841539621353, 0.13975456357002258, 0.06214825063943863, -0.31169503927230835, -0.030463719740509987, -0.4463338851928711, -0.6483628153800964, -0.26851406693458557, -0.21252401173114777, 0.16557608544826508, -0.07115226238965988, 0.20472756028175354, 0.20295098423957825, 0.23332171142101288, 0.13880077004432678, -0.21012258529663086, 0.5648381114006042, 0.10009273886680603, -0.15525050461292267, -0.1335459053516388, -0.025088388472795486, -0.3282395303249359, -0.09228960424661636, 0.51212477684021, 0.1628408432006836, 0.125742569565773, -0.005032110959291458, -0.05502255633473396, -0.14883260428905487, -0.2688639760017395, -0.08821742981672287, 0.28471502661705017, 0.18506935238838196, 0.09583508223295212, 0.383220911026001, 0.21541886031627655, 0.1111360415816307, 0.0493779331445694, -0.13524387776851654, 0.035321783274412155, 0.08555580675601959, -0.21797066926956177, -0.11981748789548874, 0.18211247026920319, 0.328197181224823, -0.2699033319950104, 0.12150097638368607, -0.1425367295742035, -0.20853666961193085, 0.0015728343278169632, -0.2935900390148163, -0.005308158695697784, 0.013497207313776016, -0.2574833631515503, 0.30978721380233765, 0.09357541054487228, -0.30359336733818054, 0.0196344256401062, 0.4677716791629791, -0.4638137221336365, -0.4341677129268646, -0.43581998348236084, 0.08996035903692245, 0.3708478808403015, -0.11298727989196777, -0.09231000393629074, 0.0597342774271965, 0.45208659768104553, -0.18882547318935394, 0.1029466912150383, -0.5797590613365173, 0.3521018922328949, -0.015292937867343426, -0.08329898118972778, 0.09054630994796753, -0.4035285413265228, -0.1816476285457611, 0.1696709394454956, -0.15330438315868378, 0.3111136555671692, 0.4423995316028595, -0.3827601671218872, 0.29479190707206726, 0.07952678948640823, 0.01669340580701828, 0.8023694753646851, -0.3571898639202118, -0.21795859932899475, 0.13225501775741577, -0.1704491376876831, -0.3259197473526001, -0.07707256823778152, 0.27369746565818787, 0.09063001722097397, 0.07179848849773407, -0.009403049945831299, 0.39142608642578125, -0.09331489354372025, 0.2531605362892151, -0.3342474102973938, -0.07499298453330994, 0.3700166344642639, 0.3320882022380829, 0.2507387399673462, -0.03353843092918396, 0.06653175503015518, 0.34221649169921875, 0.2596169710159302, -0.14549636840820312, 0.2384001761674881, 0.1618347465991974, 0.018355615437030792, -0.17592434585094452, -0.10522519052028656, -0.1606467068195343, -0.30508825182914734, -0.20202094316482544, -0.3353264629840851, 0.4843737483024597, -0.2394983321428299, 0.08094963431358337, -0.1629115343093872, -0.07293739169836044, -0.11232298612594604, 0.23905333876609802, 0.10807859897613525, 0.08143927901983261, -0.14365501701831818, -0.06898745894432068, -0.10004855692386627, -0.06188845634460449, -0.05237269774079323, 0.18809983134269714, 0.025137510150671005, 0.273226797580719, -0.1691008061170578, -0.1986374855041504, -0.26017487049102783, 0.056433238089084625, 0.25581619143486023, 0.09606218338012695, -0.2582114338874817, 0.2561090588569641, -0.14479181170463562, -0.25812333822250366, -0.30881136655807495, 0.3103082478046417, 0.15541012585163116, -0.525098979473114, 0.03694208338856697, 0.16145092248916626, 0.16632123291492462, -0.08961234986782074, 0.1419675350189209, 0.13636274635791779, 0.06864175200462341, 0.1380072981119156, -0.004035595804452896, 0.3693373501300812, 0.2155342847108841, -0.04095638170838356, 0.26966047286987305, 0.04955346882343292, -0.1201171875, -0.16362608969211578, 0.11930233240127563, 0.031724054366350174, -0.2905440926551819, -0.01962921768426895, 0.4356480538845062, -0.15255548059940338, 0.24142301082611084, 0.44143056869506836, -0.11877451092004776, -0.02535407431423664, -0.18716216087341309, 0.21855847537517548, 0.14080002903938293, -0.026811998337507248, -0.08513778448104858, -0.005383187904953957, -0.2538849115371704, -0.06525127589702606, 0.32963186502456665, -0.12682324647903442, 0.4315139353275299, 0.1532040238380432, 0.2892070412635803, -0.01847049966454506, -0.05140712484717369, -0.2919025123119354, 0.29054778814315796, 0.25433316826820374, -0.2341015338897705, 0.4157406985759735, -0.10252530872821808, -0.21352770924568176, -0.6377742290496826, -0.370678573846817, -0.08373884856700897, -0.13306306302547455, -0.0448601171374321, -0.06303036212921143, 0.16435381770133972, 0.06143708527088165, 0.07716065645217896, -0.06676213443279266, 0.2787646949291229, -0.18456247448921204, 0.10622963309288025, -0.33188343048095703, -0.3990280032157898, -0.019308272749185562, 0.23811903595924377, 0.01827302761375904, -0.11488048732280731, 0.017430061474442482, -0.04646797850728035, -0.07560302317142487, -0.1490141749382019, 0.11283766478300095, -0.014111075550317764, -0.15261493623256683, 0.13773292303085327, -0.02533198893070221, -0.26240742206573486, -0.2278362661600113, 0.32388442754745483, -0.32887333631515503, 0.004554254934191704, 0.45673584938049316, -0.18968376517295837, -0.05533439293503761, -0.05129329487681389, -0.3140721619129181, -0.5814599394798279, -0.05391008034348488, 0.017290960997343063, 0.03430105373263359, 0.3296334743499756, 0.3480423092842102, 0.03077331930398941, 0.1842595785856247, 0.03400534763932228, -0.059799134731292725, 0.08541799336671829, 0.11920242011547089, 0.3146255910396576, -0.03845217823982239, -0.2886621952056885, -0.3471452593803406, -0.11079111695289612, 0.07097993791103363, 0.076214499771595, -0.31931400299072266, 0.12620192766189575, -0.12603668868541718, 0.05120282992720604, -0.29062455892562866, 0.022035542875528336, 0.44809961318969727, 0.11024513095617294, -0.008791616186499596, 0.21246513724327087, 0.013971656560897827, 0.3060881495475769, 0.04166485369205475, 0.2144853174686432, -0.03469390422105789, 0.17872652411460876, -0.04564070701599121, 0.649557888507843, -0.1418001800775528, -0.3859337270259857, 0.17670127749443054, -0.1262180358171463, -0.17933687567710876, -0.009406283497810364, -0.30027642846107483, -0.0031256917864084244, -0.25873127579689026, -0.03538361191749573, 0.0021560192108154297, -0.28549107909202576, -0.32541424036026, -0.1811380386352539, 0.13426680862903595, -0.16325652599334717, -0.328149676322937, 0.3672772943973541, -0.25074198842048645, 0.2550685405731201, -0.15651383996009827, -0.14477238059043884, -0.16692334413528442, -0.4364982843399048, -0.030233096331357956, 0.1978234350681305, -0.2999429404735565, 0.027162590995430946, -0.5152032971382141, -0.23606868088245392, -0.159562885761261, 0.08459784090518951, 0.36667951941490173, 0.5396202802658081, 0.03030094876885414, 0.0349542573094368, 0.08058609068393707, 0.10107050836086273, 0.41064172983169556, 0.18398253619670868, -0.07503210008144379, 0.18558625876903534, 0.16558785736560822, -0.35793718695640564, -0.28352129459381104, -0.5400989651679993, -0.08220421522855759, 0.252880722284317, 0.09672616422176361, -0.28960806131362915, -0.24265091121196747, 0.22253412008285522, 0.04142831265926361, -0.2890585958957672, -0.04357650876045227, 0.01720808818936348, -0.23117280006408691, -0.20426045358181, 0.10622618347406387, 0.20910266041755676, 0.3887908160686493, -0.23060296475887299, -0.10892002284526825, 0.0180641021579504, 0.206056147813797, 0.17588046193122864, -0.01737889088690281, 0.12107253074645996, -0.127263605594635, -0.27190977334976196, -0.28430864214897156, 0.2212008535861969, 0.12467420101165771, 0.4509953260421753, 0.11753076314926147, -0.3715086877346039, 0.18797567486763, -0.05725711211562157, 0.34091249108314514, 0.007405877113342285, -0.11040902882814407, 0.34728294610977173, 0.1715262085199356, 0.3176766633987427, 0.09935886412858963, -0.028953438624739647, 0.2658730447292328, -0.07713177055120468, -0.49497655034065247, -0.041862331330776215, 0.27453359961509705, -0.07302364706993103, -0.0733688473701477, -0.024151399731636047, -0.20947928726673126, -0.26154154539108276, 0.4185970425605774, 0.34211990237236023, 1.0206481218338013, -0.26038026809692383, 0.3446713387966156, 0.10921020060777664, -0.060601361095905304, 0.4950573742389679, -0.15399709343910217, 0.1934899091720581, -0.5524521470069885, 0.04724031314253807, -0.11169160902500153, -0.19717265665531158, -0.17836490273475647, 0.3437044620513916, -0.3830965459346771, 0.13299992680549622, -0.0964835062623024, 0.19605927169322968, 0.14222727715969086, 0.3196293115615845, 0.20939454436302185, -0.20901530981063843, -0.2368236780166626, -0.003560492768883705, -0.4814993143081665, -0.09908878803253174, -0.03797397017478943, -0.28748077154159546, -0.00013608485460281372, -0.3918524980545044, -0.20003613829612732, 0.1904895007610321, -0.29227837920188904, 0.33843570947647095, 0.5059801936149597, -0.10644319653511047, 0.2228132039308548, 0.19872704148292542, 0.3068532347679138, -0.045633409172296524, 0.061189375817775726, -0.27032357454299927, -0.06260349601507187, 0.11660327762365341, -0.05728581175208092, -0.05342845991253853, 0.4100268483161926, -0.04768283665180206, -0.3138560652732849, 0.31783580780029297, 0.014437015168368816, -0.17577125132083893, 0.15726995468139648, -0.06720136106014252, 0.08750476688146591, -0.4117046892642975, 0.2714477479457855, -0.21885764598846436, -0.3185107409954071, -0.2686833143234253, 0.003916498273611069, 0.01892080157995224, -0.12270393967628479, 0.1043698787689209, 0.3181702792644501, 0.01480036973953247, 0.14292556047439575, 0.16663628816604614, 0.29795411229133606, 0.22282752394676208, 0.5636560916900635, 0.31597214937210083, 0.011753451079130173, -0.20831525325775146, 0.13117176294326782, 0.006908731535077095, -0.8838162422180176, 0.19761709868907928, -0.03137989714741707, -0.263752281665802, 0.2123912274837494, 0.3753276765346527, 0.1270444691181183, 0.4987850487232208, -0.17407964169979095, -0.4247027337551117, -0.39737772941589355, 0.006599836051464081, 0.17426320910453796, 0.0011973865330219269, 0.051423221826553345, 0.5306832790374756, 0.19821889698505402, 0.15471778810024261, -0.20497582852840424, 0.18318001925945282, -0.3399917185306549, 0.2554386258125305, -0.11082495748996735, -0.4195614755153656, -0.03815165162086487, 0.12543293833732605, 0.043873608112335205, 0.0017533842474222183, 0.09149228036403656, -0.054967328906059265, -0.18266494572162628, 0.1793142557144165, 0.27356189489364624, -0.20960791409015656, -0.20474006235599518, -0.004651550203561783, -0.021929755806922913, 0.10297423601150513, -0.07299619913101196, 0.007896631956100464, -0.1585477590560913, 0.5496968626976013, -0.0968373566865921, -0.07829437404870987, -0.3212504982948303, 0.03207142651081085, -0.23294571042060852, -0.05529800057411194, 0.17893534898757935, 0.23104993999004364, 0.1414339393377304, -0.1671890914440155, -0.7330247759819031, 0.14692291617393494, 0.28070420026779175, -0.07894859462976456, 0.2824501097202301, -0.6361714601516724, -0.2515561878681183, -0.12406845390796661, 0.05893612653017044, 0.01782260090112686, -0.29064372181892395, -0.11902491748332977, 0.1500854790210724, 0.07920821756124496, -0.22283422946929932, -0.21998156607151031, -0.007125772535800934, -0.15680654346942902, -0.18953202664852142, 0.43883323669433594, 0.050411518663167953, -0.17817264795303345, -0.09514658153057098, 0.020866937935352325, 0.15026025474071503, -0.1083439439535141, 0.0020462279208004475, 0.598039448261261, -0.13318151235580444, -0.029100973159074783, 0.45607033371925354, -0.0017087869346141815, -0.08082712441682816, 0.011111941188573837, -0.24031910300254822, 0.10640930384397507, -0.18647149205207825, 0.02841591089963913, 0.2730586528778076, 0.005315694957971573, -0.16144344210624695, 0.11166629195213318, 0.018033407628536224, -0.14061060547828674, -0.20857980847358704, 0.5285702347755432, -0.12940387427806854, -0.11113129556179047, -0.20984967052936554, 0.2522200644016266, -0.270111620426178, 0.004977274686098099, -0.1391531229019165, -0.07524119317531586, -0.17433494329452515, -0.216169536113739, -0.19599737226963043, 0.10436341166496277, 0.26758909225463867, 0.26782679557800293, 0.17319390177726746, -0.2923143804073334, 0.010724801570177078, 0.47458377480506897, 0.08574068546295166, -0.22547230124473572, 0.40084344148635864, 0.328563392162323, -0.098918616771698, 0.024349763989448547, 0.3410249948501587, 0.5116844177246094, 0.5268765687942505, -0.2755410671234131, 0.029622230678796768, 0.09985272586345673, -0.17232230305671692, 0.30093109607696533, 0.12202669680118561, 0.5902810096740723, 0.15899956226348877, 0.13224461674690247, -0.023707885295152664, -0.025082306936383247, 0.23306404054164886, -0.036524731665849686, 0.19096532464027405, 0.0803823173046112, 0.6249299049377441, 0.23981893062591553, -0.3591580092906952, -0.1490706205368042, 0.08431817591190338, -0.43413373827934265, 0.0055404058657586575, 0.46048450469970703, -0.04936549440026283, 0.2880004048347473, -0.0646260529756546, -0.02634381875395775, 0.15817223489284515, 0.627022922039032, 0.23330286145210266, 0.268967866897583, -0.3417344093322754, 0.11560587584972382, -0.32565194368362427, 0.3007262051105499, -0.0014738589525222778, -0.08987283706665039, 0.0791967362165451, 0.0009103883057832718, 0.05939709395170212, 0.1766044795513153, 0.12852975726127625, 0.0768040269613266, -0.14709125459194183, 0.23895077407360077, -0.16914263367652893, 0.024043217301368713, 0.08080330491065979, 0.2279125601053238, -0.05940385162830353, -0.3299914598464966, 0.21753191947937012, 0.10713109374046326, -0.01944708824157715, -0.07325703650712967, 0.05404896289110184, 0.12301917374134064, 0.17308077216148376, 0.10390534996986389, 0.03451996669173241, 0.5826877355575562, 0.12415937334299088, -0.0638267919421196, 0.33055737614631653, -0.11481741815805435, -0.17466172575950623, 0.16456179320812225, 0.2476196438074112, 0.6241387128829956, -0.034346871078014374, 0.25568896532058716, -0.4483467936515808, -0.21278606355190277, -0.026164062321186066, 0.0727958157658577, -0.2580461800098419, 0.23881524801254272, -0.2617340683937073, -0.03231411427259445, 0.32029467821121216, -0.00637827068567276, 0.29820162057876587, 0.09396412968635559, -0.42007339000701904, -0.46412184834480286, 0.3670324683189392, -0.2881052494049072, -0.23062863945960999, -0.1451697051525116, 0.11228126287460327, 0.030780106782913208, 0.08315261453390121, -0.6610732078552246, -0.00985535979270935, 0.33231356739997864, -0.026302434504032135, -0.22136418521404266, -0.12052077054977417, 0.012263543903827667, 0.18510222434997559, -0.0976044088602066, 0.2706553339958191, -0.09607893973588943, -0.0646674856543541, -0.4541105628013611, -0.1759289652109146 ]
https://github.com/huggingface/datasets/issues/469
invalid data type 'str' at _convert_outputs in arrow_dataset.py
Hello . Yes, I did set the output format as below for the two columns `train_dataset.set_format('torch',columns=['Text','Label'])`
I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str'
16
invalid data type 'str' at _convert_outputs in arrow_dataset.py I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' Hello . Yes, I did set the output format as below for the two columns `train_dataset.set_format('torch',columns=['Text','Label'])`
[ -0.2228243350982666, 0.024250030517578125, 0.10737118124961853, 0.23030777275562286, 0.5109524130821228, -0.10725949704647064, 0.5323299169540405, 0.07758963108062744, -0.3410608470439911, -0.1247759759426117, 0.036657460033893585, 0.38640740513801575, -0.3696955740451813, 0.04221741855144501, 0.044361136853694916, -0.20246419310569763, -0.08803436905145645, 0.009989947080612183, -0.023253202438354492, -0.05363911762833595, 0.04824294149875641, 0.1829809695482254, -0.1568261831998825, 0.41447770595550537, -0.6451317071914673, -0.1835787445306778, 0.17466366291046143, -0.09639241546392441, -0.0992203801870346, -0.44877856969833374, 0.22027485072612762, -0.10204413533210754, 0.49763670563697815, 0.34723225235939026, -0.00012417118705343455, 0.13803546130657196, 0.10928626358509064, 0.10169446468353271, -0.29087191820144653, -0.30163800716400146, 0.13411536812782288, -0.059384651482105255, 0.4149942100048065, -0.20153960585594177, -0.05718928575515747, -0.26009130477905273, -0.0606258288025856, 0.2617684304714203, 0.38377588987350464, 0.5016975998878479, 0.11732237040996552, 0.168516606092453, 0.24648593366146088, 0.0738130584359169, 0.2595645785331726, 0.3155062198638916, 0.07547719031572342, 0.20712460577487946, 0.016833722591400146, 0.02660575695335865, -0.08569461852312088, 0.07480800151824951, -0.0701286792755127, -0.19977375864982605, 0.21665742993354797, 0.22728313505649567, 0.17457962036132812, -0.14762207865715027, -0.22878491878509521, 0.11988408863544464, 0.43321487307548523, -0.3214257061481476, -0.15594464540481567, 0.00792209804058075, -0.01116220373660326, -0.2727994918823242, -0.006166346371173859, 0.24833130836486816, -0.4277770221233368, 0.16670124232769012, -0.1622595489025116, -0.025467004626989365, -0.37924981117248535, 0.1995561718940735, -0.09251708537340164, 0.5032647848129272, 0.1183696985244751, 0.15681712329387665, 0.1842406541109085, -0.014435797929763794, 0.37171033024787903, 0.08763841539621353, 0.13975456357002258, 0.06214825063943863, -0.31169503927230835, -0.030463719740509987, -0.4463338851928711, -0.6483628153800964, -0.26851406693458557, -0.21252401173114777, 0.16557608544826508, -0.07115226238965988, 0.20472756028175354, 0.20295098423957825, 0.23332171142101288, 0.13880077004432678, -0.21012258529663086, 0.5648381114006042, 0.10009273886680603, -0.15525050461292267, -0.1335459053516388, -0.025088388472795486, -0.3282395303249359, -0.09228960424661636, 0.51212477684021, 0.1628408432006836, 0.125742569565773, -0.005032110959291458, -0.05502255633473396, -0.14883260428905487, -0.2688639760017395, -0.08821742981672287, 0.28471502661705017, 0.18506935238838196, 0.09583508223295212, 0.383220911026001, 0.21541886031627655, 0.1111360415816307, 0.0493779331445694, -0.13524387776851654, 0.035321783274412155, 0.08555580675601959, -0.21797066926956177, -0.11981748789548874, 0.18211247026920319, 0.328197181224823, -0.2699033319950104, 0.12150097638368607, -0.1425367295742035, -0.20853666961193085, 0.0015728343278169632, -0.2935900390148163, -0.005308158695697784, 0.013497207313776016, -0.2574833631515503, 0.30978721380233765, 0.09357541054487228, -0.30359336733818054, 0.0196344256401062, 0.4677716791629791, -0.4638137221336365, -0.4341677129268646, -0.43581998348236084, 0.08996035903692245, 0.3708478808403015, -0.11298727989196777, -0.09231000393629074, 0.0597342774271965, 0.45208659768104553, -0.18882547318935394, 0.1029466912150383, -0.5797590613365173, 0.3521018922328949, -0.015292937867343426, -0.08329898118972778, 0.09054630994796753, -0.4035285413265228, -0.1816476285457611, 0.1696709394454956, -0.15330438315868378, 0.3111136555671692, 0.4423995316028595, -0.3827601671218872, 0.29479190707206726, 0.07952678948640823, 0.01669340580701828, 0.8023694753646851, -0.3571898639202118, -0.21795859932899475, 0.13225501775741577, -0.1704491376876831, -0.3259197473526001, -0.07707256823778152, 0.27369746565818787, 0.09063001722097397, 0.07179848849773407, -0.009403049945831299, 0.39142608642578125, -0.09331489354372025, 0.2531605362892151, -0.3342474102973938, -0.07499298453330994, 0.3700166344642639, 0.3320882022380829, 0.2507387399673462, -0.03353843092918396, 0.06653175503015518, 0.34221649169921875, 0.2596169710159302, -0.14549636840820312, 0.2384001761674881, 0.1618347465991974, 0.018355615437030792, -0.17592434585094452, -0.10522519052028656, -0.1606467068195343, -0.30508825182914734, -0.20202094316482544, -0.3353264629840851, 0.4843737483024597, -0.2394983321428299, 0.08094963431358337, -0.1629115343093872, -0.07293739169836044, -0.11232298612594604, 0.23905333876609802, 0.10807859897613525, 0.08143927901983261, -0.14365501701831818, -0.06898745894432068, -0.10004855692386627, -0.06188845634460449, -0.05237269774079323, 0.18809983134269714, 0.025137510150671005, 0.273226797580719, -0.1691008061170578, -0.1986374855041504, -0.26017487049102783, 0.056433238089084625, 0.25581619143486023, 0.09606218338012695, -0.2582114338874817, 0.2561090588569641, -0.14479181170463562, -0.25812333822250366, -0.30881136655807495, 0.3103082478046417, 0.15541012585163116, -0.525098979473114, 0.03694208338856697, 0.16145092248916626, 0.16632123291492462, -0.08961234986782074, 0.1419675350189209, 0.13636274635791779, 0.06864175200462341, 0.1380072981119156, -0.004035595804452896, 0.3693373501300812, 0.2155342847108841, -0.04095638170838356, 0.26966047286987305, 0.04955346882343292, -0.1201171875, -0.16362608969211578, 0.11930233240127563, 0.031724054366350174, -0.2905440926551819, -0.01962921768426895, 0.4356480538845062, -0.15255548059940338, 0.24142301082611084, 0.44143056869506836, -0.11877451092004776, -0.02535407431423664, -0.18716216087341309, 0.21855847537517548, 0.14080002903938293, -0.026811998337507248, -0.08513778448104858, -0.005383187904953957, -0.2538849115371704, -0.06525127589702606, 0.32963186502456665, -0.12682324647903442, 0.4315139353275299, 0.1532040238380432, 0.2892070412635803, -0.01847049966454506, -0.05140712484717369, -0.2919025123119354, 0.29054778814315796, 0.25433316826820374, -0.2341015338897705, 0.4157406985759735, -0.10252530872821808, -0.21352770924568176, -0.6377742290496826, -0.370678573846817, -0.08373884856700897, -0.13306306302547455, -0.0448601171374321, -0.06303036212921143, 0.16435381770133972, 0.06143708527088165, 0.07716065645217896, -0.06676213443279266, 0.2787646949291229, -0.18456247448921204, 0.10622963309288025, -0.33188343048095703, -0.3990280032157898, -0.019308272749185562, 0.23811903595924377, 0.01827302761375904, -0.11488048732280731, 0.017430061474442482, -0.04646797850728035, -0.07560302317142487, -0.1490141749382019, 0.11283766478300095, -0.014111075550317764, -0.15261493623256683, 0.13773292303085327, -0.02533198893070221, -0.26240742206573486, -0.2278362661600113, 0.32388442754745483, -0.32887333631515503, 0.004554254934191704, 0.45673584938049316, -0.18968376517295837, -0.05533439293503761, -0.05129329487681389, -0.3140721619129181, -0.5814599394798279, -0.05391008034348488, 0.017290960997343063, 0.03430105373263359, 0.3296334743499756, 0.3480423092842102, 0.03077331930398941, 0.1842595785856247, 0.03400534763932228, -0.059799134731292725, 0.08541799336671829, 0.11920242011547089, 0.3146255910396576, -0.03845217823982239, -0.2886621952056885, -0.3471452593803406, -0.11079111695289612, 0.07097993791103363, 0.076214499771595, -0.31931400299072266, 0.12620192766189575, -0.12603668868541718, 0.05120282992720604, -0.29062455892562866, 0.022035542875528336, 0.44809961318969727, 0.11024513095617294, -0.008791616186499596, 0.21246513724327087, 0.013971656560897827, 0.3060881495475769, 0.04166485369205475, 0.2144853174686432, -0.03469390422105789, 0.17872652411460876, -0.04564070701599121, 0.649557888507843, -0.1418001800775528, -0.3859337270259857, 0.17670127749443054, -0.1262180358171463, -0.17933687567710876, -0.009406283497810364, -0.30027642846107483, -0.0031256917864084244, -0.25873127579689026, -0.03538361191749573, 0.0021560192108154297, -0.28549107909202576, -0.32541424036026, -0.1811380386352539, 0.13426680862903595, -0.16325652599334717, -0.328149676322937, 0.3672772943973541, -0.25074198842048645, 0.2550685405731201, -0.15651383996009827, -0.14477238059043884, -0.16692334413528442, -0.4364982843399048, -0.030233096331357956, 0.1978234350681305, -0.2999429404735565, 0.027162590995430946, -0.5152032971382141, -0.23606868088245392, -0.159562885761261, 0.08459784090518951, 0.36667951941490173, 0.5396202802658081, 0.03030094876885414, 0.0349542573094368, 0.08058609068393707, 0.10107050836086273, 0.41064172983169556, 0.18398253619670868, -0.07503210008144379, 0.18558625876903534, 0.16558785736560822, -0.35793718695640564, -0.28352129459381104, -0.5400989651679993, -0.08220421522855759, 0.252880722284317, 0.09672616422176361, -0.28960806131362915, -0.24265091121196747, 0.22253412008285522, 0.04142831265926361, -0.2890585958957672, -0.04357650876045227, 0.01720808818936348, -0.23117280006408691, -0.20426045358181, 0.10622618347406387, 0.20910266041755676, 0.3887908160686493, -0.23060296475887299, -0.10892002284526825, 0.0180641021579504, 0.206056147813797, 0.17588046193122864, -0.01737889088690281, 0.12107253074645996, -0.127263605594635, -0.27190977334976196, -0.28430864214897156, 0.2212008535861969, 0.12467420101165771, 0.4509953260421753, 0.11753076314926147, -0.3715086877346039, 0.18797567486763, -0.05725711211562157, 0.34091249108314514, 0.007405877113342285, -0.11040902882814407, 0.34728294610977173, 0.1715262085199356, 0.3176766633987427, 0.09935886412858963, -0.028953438624739647, 0.2658730447292328, -0.07713177055120468, -0.49497655034065247, -0.041862331330776215, 0.27453359961509705, -0.07302364706993103, -0.0733688473701477, -0.024151399731636047, -0.20947928726673126, -0.26154154539108276, 0.4185970425605774, 0.34211990237236023, 1.0206481218338013, -0.26038026809692383, 0.3446713387966156, 0.10921020060777664, -0.060601361095905304, 0.4950573742389679, -0.15399709343910217, 0.1934899091720581, -0.5524521470069885, 0.04724031314253807, -0.11169160902500153, -0.19717265665531158, -0.17836490273475647, 0.3437044620513916, -0.3830965459346771, 0.13299992680549622, -0.0964835062623024, 0.19605927169322968, 0.14222727715969086, 0.3196293115615845, 0.20939454436302185, -0.20901530981063843, -0.2368236780166626, -0.003560492768883705, -0.4814993143081665, -0.09908878803253174, -0.03797397017478943, -0.28748077154159546, -0.00013608485460281372, -0.3918524980545044, -0.20003613829612732, 0.1904895007610321, -0.29227837920188904, 0.33843570947647095, 0.5059801936149597, -0.10644319653511047, 0.2228132039308548, 0.19872704148292542, 0.3068532347679138, -0.045633409172296524, 0.061189375817775726, -0.27032357454299927, -0.06260349601507187, 0.11660327762365341, -0.05728581175208092, -0.05342845991253853, 0.4100268483161926, -0.04768283665180206, -0.3138560652732849, 0.31783580780029297, 0.014437015168368816, -0.17577125132083893, 0.15726995468139648, -0.06720136106014252, 0.08750476688146591, -0.4117046892642975, 0.2714477479457855, -0.21885764598846436, -0.3185107409954071, -0.2686833143234253, 0.003916498273611069, 0.01892080157995224, -0.12270393967628479, 0.1043698787689209, 0.3181702792644501, 0.01480036973953247, 0.14292556047439575, 0.16663628816604614, 0.29795411229133606, 0.22282752394676208, 0.5636560916900635, 0.31597214937210083, 0.011753451079130173, -0.20831525325775146, 0.13117176294326782, 0.006908731535077095, -0.8838162422180176, 0.19761709868907928, -0.03137989714741707, -0.263752281665802, 0.2123912274837494, 0.3753276765346527, 0.1270444691181183, 0.4987850487232208, -0.17407964169979095, -0.4247027337551117, -0.39737772941589355, 0.006599836051464081, 0.17426320910453796, 0.0011973865330219269, 0.051423221826553345, 0.5306832790374756, 0.19821889698505402, 0.15471778810024261, -0.20497582852840424, 0.18318001925945282, -0.3399917185306549, 0.2554386258125305, -0.11082495748996735, -0.4195614755153656, -0.03815165162086487, 0.12543293833732605, 0.043873608112335205, 0.0017533842474222183, 0.09149228036403656, -0.054967328906059265, -0.18266494572162628, 0.1793142557144165, 0.27356189489364624, -0.20960791409015656, -0.20474006235599518, -0.004651550203561783, -0.021929755806922913, 0.10297423601150513, -0.07299619913101196, 0.007896631956100464, -0.1585477590560913, 0.5496968626976013, -0.0968373566865921, -0.07829437404870987, -0.3212504982948303, 0.03207142651081085, -0.23294571042060852, -0.05529800057411194, 0.17893534898757935, 0.23104993999004364, 0.1414339393377304, -0.1671890914440155, -0.7330247759819031, 0.14692291617393494, 0.28070420026779175, -0.07894859462976456, 0.2824501097202301, -0.6361714601516724, -0.2515561878681183, -0.12406845390796661, 0.05893612653017044, 0.01782260090112686, -0.29064372181892395, -0.11902491748332977, 0.1500854790210724, 0.07920821756124496, -0.22283422946929932, -0.21998156607151031, -0.007125772535800934, -0.15680654346942902, -0.18953202664852142, 0.43883323669433594, 0.050411518663167953, -0.17817264795303345, -0.09514658153057098, 0.020866937935352325, 0.15026025474071503, -0.1083439439535141, 0.0020462279208004475, 0.598039448261261, -0.13318151235580444, -0.029100973159074783, 0.45607033371925354, -0.0017087869346141815, -0.08082712441682816, 0.011111941188573837, -0.24031910300254822, 0.10640930384397507, -0.18647149205207825, 0.02841591089963913, 0.2730586528778076, 0.005315694957971573, -0.16144344210624695, 0.11166629195213318, 0.018033407628536224, -0.14061060547828674, -0.20857980847358704, 0.5285702347755432, -0.12940387427806854, -0.11113129556179047, -0.20984967052936554, 0.2522200644016266, -0.270111620426178, 0.004977274686098099, -0.1391531229019165, -0.07524119317531586, -0.17433494329452515, -0.216169536113739, -0.19599737226963043, 0.10436341166496277, 0.26758909225463867, 0.26782679557800293, 0.17319390177726746, -0.2923143804073334, 0.010724801570177078, 0.47458377480506897, 0.08574068546295166, -0.22547230124473572, 0.40084344148635864, 0.328563392162323, -0.098918616771698, 0.024349763989448547, 0.3410249948501587, 0.5116844177246094, 0.5268765687942505, -0.2755410671234131, 0.029622230678796768, 0.09985272586345673, -0.17232230305671692, 0.30093109607696533, 0.12202669680118561, 0.5902810096740723, 0.15899956226348877, 0.13224461674690247, -0.023707885295152664, -0.025082306936383247, 0.23306404054164886, -0.036524731665849686, 0.19096532464027405, 0.0803823173046112, 0.6249299049377441, 0.23981893062591553, -0.3591580092906952, -0.1490706205368042, 0.08431817591190338, -0.43413373827934265, 0.0055404058657586575, 0.46048450469970703, -0.04936549440026283, 0.2880004048347473, -0.0646260529756546, -0.02634381875395775, 0.15817223489284515, 0.627022922039032, 0.23330286145210266, 0.268967866897583, -0.3417344093322754, 0.11560587584972382, -0.32565194368362427, 0.3007262051105499, -0.0014738589525222778, -0.08987283706665039, 0.0791967362165451, 0.0009103883057832718, 0.05939709395170212, 0.1766044795513153, 0.12852975726127625, 0.0768040269613266, -0.14709125459194183, 0.23895077407360077, -0.16914263367652893, 0.024043217301368713, 0.08080330491065979, 0.2279125601053238, -0.05940385162830353, -0.3299914598464966, 0.21753191947937012, 0.10713109374046326, -0.01944708824157715, -0.07325703650712967, 0.05404896289110184, 0.12301917374134064, 0.17308077216148376, 0.10390534996986389, 0.03451996669173241, 0.5826877355575562, 0.12415937334299088, -0.0638267919421196, 0.33055737614631653, -0.11481741815805435, -0.17466172575950623, 0.16456179320812225, 0.2476196438074112, 0.6241387128829956, -0.034346871078014374, 0.25568896532058716, -0.4483467936515808, -0.21278606355190277, -0.026164062321186066, 0.0727958157658577, -0.2580461800098419, 0.23881524801254272, -0.2617340683937073, -0.03231411427259445, 0.32029467821121216, -0.00637827068567276, 0.29820162057876587, 0.09396412968635559, -0.42007339000701904, -0.46412184834480286, 0.3670324683189392, -0.2881052494049072, -0.23062863945960999, -0.1451697051525116, 0.11228126287460327, 0.030780106782913208, 0.08315261453390121, -0.6610732078552246, -0.00985535979270935, 0.33231356739997864, -0.026302434504032135, -0.22136418521404266, -0.12052077054977417, 0.012263543903827667, 0.18510222434997559, -0.0976044088602066, 0.2706553339958191, -0.09607893973588943, -0.0646674856543541, -0.4541105628013611, -0.1759289652109146 ]
https://github.com/huggingface/datasets/issues/469
invalid data type 'str' at _convert_outputs in arrow_dataset.py
I think you're having this issue because you try to format strings as pytorch tensors, which is not possible. Indeed by having "Text" in `columns=['Text','Label']`, you try to convert the text values to pytorch tensors. Instead I recommend you to first tokenize your dataset using a tokenizer from transformers. For example ```python from transformers import BertTokenizer tokenizer = BertTokenizer.from_pretrained("bert-base-uncased") train_dataset.map(lambda x: tokenizer(x["Text"]), batched=True) train_dataset.set_format("torch", column=["input_ids"]) ``` Another way to fix your issue would be to not set the format to pytorch, and leave the dataset as it is by default. In that case, the strings are returned normally when you get examples from your dataloader. It means that you would have to tokenize the examples in the training loop (or using a data collator) though. Let me know if you have other questions
I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str'
133
invalid data type 'str' at _convert_outputs in arrow_dataset.py I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I think you're having this issue because you try to format strings as pytorch tensors, which is not possible. Indeed by having "Text" in `columns=['Text','Label']`, you try to convert the text values to pytorch tensors. Instead I recommend you to first tokenize your dataset using a tokenizer from transformers. For example ```python from transformers import BertTokenizer tokenizer = BertTokenizer.from_pretrained("bert-base-uncased") train_dataset.map(lambda x: tokenizer(x["Text"]), batched=True) train_dataset.set_format("torch", column=["input_ids"]) ``` Another way to fix your issue would be to not set the format to pytorch, and leave the dataset as it is by default. In that case, the strings are returned normally when you get examples from your dataloader. It means that you would have to tokenize the examples in the training loop (or using a data collator) though. Let me know if you have other questions
[ -0.2228243350982666, 0.024250030517578125, 0.10737118124961853, 0.23030777275562286, 0.5109524130821228, -0.10725949704647064, 0.5323299169540405, 0.07758963108062744, -0.3410608470439911, -0.1247759759426117, 0.036657460033893585, 0.38640740513801575, -0.3696955740451813, 0.04221741855144501, 0.044361136853694916, -0.20246419310569763, -0.08803436905145645, 0.009989947080612183, -0.023253202438354492, -0.05363911762833595, 0.04824294149875641, 0.1829809695482254, -0.1568261831998825, 0.41447770595550537, -0.6451317071914673, -0.1835787445306778, 0.17466366291046143, -0.09639241546392441, -0.0992203801870346, -0.44877856969833374, 0.22027485072612762, -0.10204413533210754, 0.49763670563697815, 0.34723225235939026, -0.00012417118705343455, 0.13803546130657196, 0.10928626358509064, 0.10169446468353271, -0.29087191820144653, -0.30163800716400146, 0.13411536812782288, -0.059384651482105255, 0.4149942100048065, -0.20153960585594177, -0.05718928575515747, -0.26009130477905273, -0.0606258288025856, 0.2617684304714203, 0.38377588987350464, 0.5016975998878479, 0.11732237040996552, 0.168516606092453, 0.24648593366146088, 0.0738130584359169, 0.2595645785331726, 0.3155062198638916, 0.07547719031572342, 0.20712460577487946, 0.016833722591400146, 0.02660575695335865, -0.08569461852312088, 0.07480800151824951, -0.0701286792755127, -0.19977375864982605, 0.21665742993354797, 0.22728313505649567, 0.17457962036132812, -0.14762207865715027, -0.22878491878509521, 0.11988408863544464, 0.43321487307548523, -0.3214257061481476, -0.15594464540481567, 0.00792209804058075, -0.01116220373660326, -0.2727994918823242, -0.006166346371173859, 0.24833130836486816, -0.4277770221233368, 0.16670124232769012, -0.1622595489025116, -0.025467004626989365, -0.37924981117248535, 0.1995561718940735, -0.09251708537340164, 0.5032647848129272, 0.1183696985244751, 0.15681712329387665, 0.1842406541109085, -0.014435797929763794, 0.37171033024787903, 0.08763841539621353, 0.13975456357002258, 0.06214825063943863, -0.31169503927230835, -0.030463719740509987, -0.4463338851928711, -0.6483628153800964, -0.26851406693458557, -0.21252401173114777, 0.16557608544826508, -0.07115226238965988, 0.20472756028175354, 0.20295098423957825, 0.23332171142101288, 0.13880077004432678, -0.21012258529663086, 0.5648381114006042, 0.10009273886680603, -0.15525050461292267, -0.1335459053516388, -0.025088388472795486, -0.3282395303249359, -0.09228960424661636, 0.51212477684021, 0.1628408432006836, 0.125742569565773, -0.005032110959291458, -0.05502255633473396, -0.14883260428905487, -0.2688639760017395, -0.08821742981672287, 0.28471502661705017, 0.18506935238838196, 0.09583508223295212, 0.383220911026001, 0.21541886031627655, 0.1111360415816307, 0.0493779331445694, -0.13524387776851654, 0.035321783274412155, 0.08555580675601959, -0.21797066926956177, -0.11981748789548874, 0.18211247026920319, 0.328197181224823, -0.2699033319950104, 0.12150097638368607, -0.1425367295742035, -0.20853666961193085, 0.0015728343278169632, -0.2935900390148163, -0.005308158695697784, 0.013497207313776016, -0.2574833631515503, 0.30978721380233765, 0.09357541054487228, -0.30359336733818054, 0.0196344256401062, 0.4677716791629791, -0.4638137221336365, -0.4341677129268646, -0.43581998348236084, 0.08996035903692245, 0.3708478808403015, -0.11298727989196777, -0.09231000393629074, 0.0597342774271965, 0.45208659768104553, -0.18882547318935394, 0.1029466912150383, -0.5797590613365173, 0.3521018922328949, -0.015292937867343426, -0.08329898118972778, 0.09054630994796753, -0.4035285413265228, -0.1816476285457611, 0.1696709394454956, -0.15330438315868378, 0.3111136555671692, 0.4423995316028595, -0.3827601671218872, 0.29479190707206726, 0.07952678948640823, 0.01669340580701828, 0.8023694753646851, -0.3571898639202118, -0.21795859932899475, 0.13225501775741577, -0.1704491376876831, -0.3259197473526001, -0.07707256823778152, 0.27369746565818787, 0.09063001722097397, 0.07179848849773407, -0.009403049945831299, 0.39142608642578125, -0.09331489354372025, 0.2531605362892151, -0.3342474102973938, -0.07499298453330994, 0.3700166344642639, 0.3320882022380829, 0.2507387399673462, -0.03353843092918396, 0.06653175503015518, 0.34221649169921875, 0.2596169710159302, -0.14549636840820312, 0.2384001761674881, 0.1618347465991974, 0.018355615437030792, -0.17592434585094452, -0.10522519052028656, -0.1606467068195343, -0.30508825182914734, -0.20202094316482544, -0.3353264629840851, 0.4843737483024597, -0.2394983321428299, 0.08094963431358337, -0.1629115343093872, -0.07293739169836044, -0.11232298612594604, 0.23905333876609802, 0.10807859897613525, 0.08143927901983261, -0.14365501701831818, -0.06898745894432068, -0.10004855692386627, -0.06188845634460449, -0.05237269774079323, 0.18809983134269714, 0.025137510150671005, 0.273226797580719, -0.1691008061170578, -0.1986374855041504, -0.26017487049102783, 0.056433238089084625, 0.25581619143486023, 0.09606218338012695, -0.2582114338874817, 0.2561090588569641, -0.14479181170463562, -0.25812333822250366, -0.30881136655807495, 0.3103082478046417, 0.15541012585163116, -0.525098979473114, 0.03694208338856697, 0.16145092248916626, 0.16632123291492462, -0.08961234986782074, 0.1419675350189209, 0.13636274635791779, 0.06864175200462341, 0.1380072981119156, -0.004035595804452896, 0.3693373501300812, 0.2155342847108841, -0.04095638170838356, 0.26966047286987305, 0.04955346882343292, -0.1201171875, -0.16362608969211578, 0.11930233240127563, 0.031724054366350174, -0.2905440926551819, -0.01962921768426895, 0.4356480538845062, -0.15255548059940338, 0.24142301082611084, 0.44143056869506836, -0.11877451092004776, -0.02535407431423664, -0.18716216087341309, 0.21855847537517548, 0.14080002903938293, -0.026811998337507248, -0.08513778448104858, -0.005383187904953957, -0.2538849115371704, -0.06525127589702606, 0.32963186502456665, -0.12682324647903442, 0.4315139353275299, 0.1532040238380432, 0.2892070412635803, -0.01847049966454506, -0.05140712484717369, -0.2919025123119354, 0.29054778814315796, 0.25433316826820374, -0.2341015338897705, 0.4157406985759735, -0.10252530872821808, -0.21352770924568176, -0.6377742290496826, -0.370678573846817, -0.08373884856700897, -0.13306306302547455, -0.0448601171374321, -0.06303036212921143, 0.16435381770133972, 0.06143708527088165, 0.07716065645217896, -0.06676213443279266, 0.2787646949291229, -0.18456247448921204, 0.10622963309288025, -0.33188343048095703, -0.3990280032157898, -0.019308272749185562, 0.23811903595924377, 0.01827302761375904, -0.11488048732280731, 0.017430061474442482, -0.04646797850728035, -0.07560302317142487, -0.1490141749382019, 0.11283766478300095, -0.014111075550317764, -0.15261493623256683, 0.13773292303085327, -0.02533198893070221, -0.26240742206573486, -0.2278362661600113, 0.32388442754745483, -0.32887333631515503, 0.004554254934191704, 0.45673584938049316, -0.18968376517295837, -0.05533439293503761, -0.05129329487681389, -0.3140721619129181, -0.5814599394798279, -0.05391008034348488, 0.017290960997343063, 0.03430105373263359, 0.3296334743499756, 0.3480423092842102, 0.03077331930398941, 0.1842595785856247, 0.03400534763932228, -0.059799134731292725, 0.08541799336671829, 0.11920242011547089, 0.3146255910396576, -0.03845217823982239, -0.2886621952056885, -0.3471452593803406, -0.11079111695289612, 0.07097993791103363, 0.076214499771595, -0.31931400299072266, 0.12620192766189575, -0.12603668868541718, 0.05120282992720604, -0.29062455892562866, 0.022035542875528336, 0.44809961318969727, 0.11024513095617294, -0.008791616186499596, 0.21246513724327087, 0.013971656560897827, 0.3060881495475769, 0.04166485369205475, 0.2144853174686432, -0.03469390422105789, 0.17872652411460876, -0.04564070701599121, 0.649557888507843, -0.1418001800775528, -0.3859337270259857, 0.17670127749443054, -0.1262180358171463, -0.17933687567710876, -0.009406283497810364, -0.30027642846107483, -0.0031256917864084244, -0.25873127579689026, -0.03538361191749573, 0.0021560192108154297, -0.28549107909202576, -0.32541424036026, -0.1811380386352539, 0.13426680862903595, -0.16325652599334717, -0.328149676322937, 0.3672772943973541, -0.25074198842048645, 0.2550685405731201, -0.15651383996009827, -0.14477238059043884, -0.16692334413528442, -0.4364982843399048, -0.030233096331357956, 0.1978234350681305, -0.2999429404735565, 0.027162590995430946, -0.5152032971382141, -0.23606868088245392, -0.159562885761261, 0.08459784090518951, 0.36667951941490173, 0.5396202802658081, 0.03030094876885414, 0.0349542573094368, 0.08058609068393707, 0.10107050836086273, 0.41064172983169556, 0.18398253619670868, -0.07503210008144379, 0.18558625876903534, 0.16558785736560822, -0.35793718695640564, -0.28352129459381104, -0.5400989651679993, -0.08220421522855759, 0.252880722284317, 0.09672616422176361, -0.28960806131362915, -0.24265091121196747, 0.22253412008285522, 0.04142831265926361, -0.2890585958957672, -0.04357650876045227, 0.01720808818936348, -0.23117280006408691, -0.20426045358181, 0.10622618347406387, 0.20910266041755676, 0.3887908160686493, -0.23060296475887299, -0.10892002284526825, 0.0180641021579504, 0.206056147813797, 0.17588046193122864, -0.01737889088690281, 0.12107253074645996, -0.127263605594635, -0.27190977334976196, -0.28430864214897156, 0.2212008535861969, 0.12467420101165771, 0.4509953260421753, 0.11753076314926147, -0.3715086877346039, 0.18797567486763, -0.05725711211562157, 0.34091249108314514, 0.007405877113342285, -0.11040902882814407, 0.34728294610977173, 0.1715262085199356, 0.3176766633987427, 0.09935886412858963, -0.028953438624739647, 0.2658730447292328, -0.07713177055120468, -0.49497655034065247, -0.041862331330776215, 0.27453359961509705, -0.07302364706993103, -0.0733688473701477, -0.024151399731636047, -0.20947928726673126, -0.26154154539108276, 0.4185970425605774, 0.34211990237236023, 1.0206481218338013, -0.26038026809692383, 0.3446713387966156, 0.10921020060777664, -0.060601361095905304, 0.4950573742389679, -0.15399709343910217, 0.1934899091720581, -0.5524521470069885, 0.04724031314253807, -0.11169160902500153, -0.19717265665531158, -0.17836490273475647, 0.3437044620513916, -0.3830965459346771, 0.13299992680549622, -0.0964835062623024, 0.19605927169322968, 0.14222727715969086, 0.3196293115615845, 0.20939454436302185, -0.20901530981063843, -0.2368236780166626, -0.003560492768883705, -0.4814993143081665, -0.09908878803253174, -0.03797397017478943, -0.28748077154159546, -0.00013608485460281372, -0.3918524980545044, -0.20003613829612732, 0.1904895007610321, -0.29227837920188904, 0.33843570947647095, 0.5059801936149597, -0.10644319653511047, 0.2228132039308548, 0.19872704148292542, 0.3068532347679138, -0.045633409172296524, 0.061189375817775726, -0.27032357454299927, -0.06260349601507187, 0.11660327762365341, -0.05728581175208092, -0.05342845991253853, 0.4100268483161926, -0.04768283665180206, -0.3138560652732849, 0.31783580780029297, 0.014437015168368816, -0.17577125132083893, 0.15726995468139648, -0.06720136106014252, 0.08750476688146591, -0.4117046892642975, 0.2714477479457855, -0.21885764598846436, -0.3185107409954071, -0.2686833143234253, 0.003916498273611069, 0.01892080157995224, -0.12270393967628479, 0.1043698787689209, 0.3181702792644501, 0.01480036973953247, 0.14292556047439575, 0.16663628816604614, 0.29795411229133606, 0.22282752394676208, 0.5636560916900635, 0.31597214937210083, 0.011753451079130173, -0.20831525325775146, 0.13117176294326782, 0.006908731535077095, -0.8838162422180176, 0.19761709868907928, -0.03137989714741707, -0.263752281665802, 0.2123912274837494, 0.3753276765346527, 0.1270444691181183, 0.4987850487232208, -0.17407964169979095, -0.4247027337551117, -0.39737772941589355, 0.006599836051464081, 0.17426320910453796, 0.0011973865330219269, 0.051423221826553345, 0.5306832790374756, 0.19821889698505402, 0.15471778810024261, -0.20497582852840424, 0.18318001925945282, -0.3399917185306549, 0.2554386258125305, -0.11082495748996735, -0.4195614755153656, -0.03815165162086487, 0.12543293833732605, 0.043873608112335205, 0.0017533842474222183, 0.09149228036403656, -0.054967328906059265, -0.18266494572162628, 0.1793142557144165, 0.27356189489364624, -0.20960791409015656, -0.20474006235599518, -0.004651550203561783, -0.021929755806922913, 0.10297423601150513, -0.07299619913101196, 0.007896631956100464, -0.1585477590560913, 0.5496968626976013, -0.0968373566865921, -0.07829437404870987, -0.3212504982948303, 0.03207142651081085, -0.23294571042060852, -0.05529800057411194, 0.17893534898757935, 0.23104993999004364, 0.1414339393377304, -0.1671890914440155, -0.7330247759819031, 0.14692291617393494, 0.28070420026779175, -0.07894859462976456, 0.2824501097202301, -0.6361714601516724, -0.2515561878681183, -0.12406845390796661, 0.05893612653017044, 0.01782260090112686, -0.29064372181892395, -0.11902491748332977, 0.1500854790210724, 0.07920821756124496, -0.22283422946929932, -0.21998156607151031, -0.007125772535800934, -0.15680654346942902, -0.18953202664852142, 0.43883323669433594, 0.050411518663167953, -0.17817264795303345, -0.09514658153057098, 0.020866937935352325, 0.15026025474071503, -0.1083439439535141, 0.0020462279208004475, 0.598039448261261, -0.13318151235580444, -0.029100973159074783, 0.45607033371925354, -0.0017087869346141815, -0.08082712441682816, 0.011111941188573837, -0.24031910300254822, 0.10640930384397507, -0.18647149205207825, 0.02841591089963913, 0.2730586528778076, 0.005315694957971573, -0.16144344210624695, 0.11166629195213318, 0.018033407628536224, -0.14061060547828674, -0.20857980847358704, 0.5285702347755432, -0.12940387427806854, -0.11113129556179047, -0.20984967052936554, 0.2522200644016266, -0.270111620426178, 0.004977274686098099, -0.1391531229019165, -0.07524119317531586, -0.17433494329452515, -0.216169536113739, -0.19599737226963043, 0.10436341166496277, 0.26758909225463867, 0.26782679557800293, 0.17319390177726746, -0.2923143804073334, 0.010724801570177078, 0.47458377480506897, 0.08574068546295166, -0.22547230124473572, 0.40084344148635864, 0.328563392162323, -0.098918616771698, 0.024349763989448547, 0.3410249948501587, 0.5116844177246094, 0.5268765687942505, -0.2755410671234131, 0.029622230678796768, 0.09985272586345673, -0.17232230305671692, 0.30093109607696533, 0.12202669680118561, 0.5902810096740723, 0.15899956226348877, 0.13224461674690247, -0.023707885295152664, -0.025082306936383247, 0.23306404054164886, -0.036524731665849686, 0.19096532464027405, 0.0803823173046112, 0.6249299049377441, 0.23981893062591553, -0.3591580092906952, -0.1490706205368042, 0.08431817591190338, -0.43413373827934265, 0.0055404058657586575, 0.46048450469970703, -0.04936549440026283, 0.2880004048347473, -0.0646260529756546, -0.02634381875395775, 0.15817223489284515, 0.627022922039032, 0.23330286145210266, 0.268967866897583, -0.3417344093322754, 0.11560587584972382, -0.32565194368362427, 0.3007262051105499, -0.0014738589525222778, -0.08987283706665039, 0.0791967362165451, 0.0009103883057832718, 0.05939709395170212, 0.1766044795513153, 0.12852975726127625, 0.0768040269613266, -0.14709125459194183, 0.23895077407360077, -0.16914263367652893, 0.024043217301368713, 0.08080330491065979, 0.2279125601053238, -0.05940385162830353, -0.3299914598464966, 0.21753191947937012, 0.10713109374046326, -0.01944708824157715, -0.07325703650712967, 0.05404896289110184, 0.12301917374134064, 0.17308077216148376, 0.10390534996986389, 0.03451996669173241, 0.5826877355575562, 0.12415937334299088, -0.0638267919421196, 0.33055737614631653, -0.11481741815805435, -0.17466172575950623, 0.16456179320812225, 0.2476196438074112, 0.6241387128829956, -0.034346871078014374, 0.25568896532058716, -0.4483467936515808, -0.21278606355190277, -0.026164062321186066, 0.0727958157658577, -0.2580461800098419, 0.23881524801254272, -0.2617340683937073, -0.03231411427259445, 0.32029467821121216, -0.00637827068567276, 0.29820162057876587, 0.09396412968635559, -0.42007339000701904, -0.46412184834480286, 0.3670324683189392, -0.2881052494049072, -0.23062863945960999, -0.1451697051525116, 0.11228126287460327, 0.030780106782913208, 0.08315261453390121, -0.6610732078552246, -0.00985535979270935, 0.33231356739997864, -0.026302434504032135, -0.22136418521404266, -0.12052077054977417, 0.012263543903827667, 0.18510222434997559, -0.0976044088602066, 0.2706553339958191, -0.09607893973588943, -0.0646674856543541, -0.4541105628013611, -0.1759289652109146 ]
https://github.com/huggingface/datasets/issues/469
invalid data type 'str' at _convert_outputs in arrow_dataset.py
Hi, actually the thing is I am getting the same error and even after tokenizing them I am passing them through batch_encode_plus. I dont know what seems to be the problem is. I even converted it into 'pt' while passing them through batch_encode_plus but when I am evaluating my model , i am getting this error --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-145-ca218223c9fc> in <module>() ----> 1 val_loss, predictions, true_val = evaluate(dataloader_validation) 2 val_f1 = f1_score_func(predictions, true_val) 3 tqdm.write(f'Validation loss: {val_loss}') 4 tqdm.write(f'F1 Score (Weighted): {val_f1}') 6 frames /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataset.py in <genexpr>(.0) 160 161 def __getitem__(self, index): --> 162 return tuple(tensor[index] for tensor in self.tensors) 163 164 def __len__(self): TypeError: new(): invalid data type 'str'
I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str'
115
invalid data type 'str' at _convert_outputs in arrow_dataset.py I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' Hi, actually the thing is I am getting the same error and even after tokenizing them I am passing them through batch_encode_plus. I dont know what seems to be the problem is. I even converted it into 'pt' while passing them through batch_encode_plus but when I am evaluating my model , i am getting this error --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-145-ca218223c9fc> in <module>() ----> 1 val_loss, predictions, true_val = evaluate(dataloader_validation) 2 val_f1 = f1_score_func(predictions, true_val) 3 tqdm.write(f'Validation loss: {val_loss}') 4 tqdm.write(f'F1 Score (Weighted): {val_f1}') 6 frames /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataset.py in <genexpr>(.0) 160 161 def __getitem__(self, index): --> 162 return tuple(tensor[index] for tensor in self.tensors) 163 164 def __len__(self): TypeError: new(): invalid data type 'str'
[ -0.2228243350982666, 0.024250030517578125, 0.10737118124961853, 0.23030777275562286, 0.5109524130821228, -0.10725949704647064, 0.5323299169540405, 0.07758963108062744, -0.3410608470439911, -0.1247759759426117, 0.036657460033893585, 0.38640740513801575, -0.3696955740451813, 0.04221741855144501, 0.044361136853694916, -0.20246419310569763, -0.08803436905145645, 0.009989947080612183, -0.023253202438354492, -0.05363911762833595, 0.04824294149875641, 0.1829809695482254, -0.1568261831998825, 0.41447770595550537, -0.6451317071914673, -0.1835787445306778, 0.17466366291046143, -0.09639241546392441, -0.0992203801870346, -0.44877856969833374, 0.22027485072612762, -0.10204413533210754, 0.49763670563697815, 0.34723225235939026, -0.00012417118705343455, 0.13803546130657196, 0.10928626358509064, 0.10169446468353271, -0.29087191820144653, -0.30163800716400146, 0.13411536812782288, -0.059384651482105255, 0.4149942100048065, -0.20153960585594177, -0.05718928575515747, -0.26009130477905273, -0.0606258288025856, 0.2617684304714203, 0.38377588987350464, 0.5016975998878479, 0.11732237040996552, 0.168516606092453, 0.24648593366146088, 0.0738130584359169, 0.2595645785331726, 0.3155062198638916, 0.07547719031572342, 0.20712460577487946, 0.016833722591400146, 0.02660575695335865, -0.08569461852312088, 0.07480800151824951, -0.0701286792755127, -0.19977375864982605, 0.21665742993354797, 0.22728313505649567, 0.17457962036132812, -0.14762207865715027, -0.22878491878509521, 0.11988408863544464, 0.43321487307548523, -0.3214257061481476, -0.15594464540481567, 0.00792209804058075, -0.01116220373660326, -0.2727994918823242, -0.006166346371173859, 0.24833130836486816, -0.4277770221233368, 0.16670124232769012, -0.1622595489025116, -0.025467004626989365, -0.37924981117248535, 0.1995561718940735, -0.09251708537340164, 0.5032647848129272, 0.1183696985244751, 0.15681712329387665, 0.1842406541109085, -0.014435797929763794, 0.37171033024787903, 0.08763841539621353, 0.13975456357002258, 0.06214825063943863, -0.31169503927230835, -0.030463719740509987, -0.4463338851928711, -0.6483628153800964, -0.26851406693458557, -0.21252401173114777, 0.16557608544826508, -0.07115226238965988, 0.20472756028175354, 0.20295098423957825, 0.23332171142101288, 0.13880077004432678, -0.21012258529663086, 0.5648381114006042, 0.10009273886680603, -0.15525050461292267, -0.1335459053516388, -0.025088388472795486, -0.3282395303249359, -0.09228960424661636, 0.51212477684021, 0.1628408432006836, 0.125742569565773, -0.005032110959291458, -0.05502255633473396, -0.14883260428905487, -0.2688639760017395, -0.08821742981672287, 0.28471502661705017, 0.18506935238838196, 0.09583508223295212, 0.383220911026001, 0.21541886031627655, 0.1111360415816307, 0.0493779331445694, -0.13524387776851654, 0.035321783274412155, 0.08555580675601959, -0.21797066926956177, -0.11981748789548874, 0.18211247026920319, 0.328197181224823, -0.2699033319950104, 0.12150097638368607, -0.1425367295742035, -0.20853666961193085, 0.0015728343278169632, -0.2935900390148163, -0.005308158695697784, 0.013497207313776016, -0.2574833631515503, 0.30978721380233765, 0.09357541054487228, -0.30359336733818054, 0.0196344256401062, 0.4677716791629791, -0.4638137221336365, -0.4341677129268646, -0.43581998348236084, 0.08996035903692245, 0.3708478808403015, -0.11298727989196777, -0.09231000393629074, 0.0597342774271965, 0.45208659768104553, -0.18882547318935394, 0.1029466912150383, -0.5797590613365173, 0.3521018922328949, -0.015292937867343426, -0.08329898118972778, 0.09054630994796753, -0.4035285413265228, -0.1816476285457611, 0.1696709394454956, -0.15330438315868378, 0.3111136555671692, 0.4423995316028595, -0.3827601671218872, 0.29479190707206726, 0.07952678948640823, 0.01669340580701828, 0.8023694753646851, -0.3571898639202118, -0.21795859932899475, 0.13225501775741577, -0.1704491376876831, -0.3259197473526001, -0.07707256823778152, 0.27369746565818787, 0.09063001722097397, 0.07179848849773407, -0.009403049945831299, 0.39142608642578125, -0.09331489354372025, 0.2531605362892151, -0.3342474102973938, -0.07499298453330994, 0.3700166344642639, 0.3320882022380829, 0.2507387399673462, -0.03353843092918396, 0.06653175503015518, 0.34221649169921875, 0.2596169710159302, -0.14549636840820312, 0.2384001761674881, 0.1618347465991974, 0.018355615437030792, -0.17592434585094452, -0.10522519052028656, -0.1606467068195343, -0.30508825182914734, -0.20202094316482544, -0.3353264629840851, 0.4843737483024597, -0.2394983321428299, 0.08094963431358337, -0.1629115343093872, -0.07293739169836044, -0.11232298612594604, 0.23905333876609802, 0.10807859897613525, 0.08143927901983261, -0.14365501701831818, -0.06898745894432068, -0.10004855692386627, -0.06188845634460449, -0.05237269774079323, 0.18809983134269714, 0.025137510150671005, 0.273226797580719, -0.1691008061170578, -0.1986374855041504, -0.26017487049102783, 0.056433238089084625, 0.25581619143486023, 0.09606218338012695, -0.2582114338874817, 0.2561090588569641, -0.14479181170463562, -0.25812333822250366, -0.30881136655807495, 0.3103082478046417, 0.15541012585163116, -0.525098979473114, 0.03694208338856697, 0.16145092248916626, 0.16632123291492462, -0.08961234986782074, 0.1419675350189209, 0.13636274635791779, 0.06864175200462341, 0.1380072981119156, -0.004035595804452896, 0.3693373501300812, 0.2155342847108841, -0.04095638170838356, 0.26966047286987305, 0.04955346882343292, -0.1201171875, -0.16362608969211578, 0.11930233240127563, 0.031724054366350174, -0.2905440926551819, -0.01962921768426895, 0.4356480538845062, -0.15255548059940338, 0.24142301082611084, 0.44143056869506836, -0.11877451092004776, -0.02535407431423664, -0.18716216087341309, 0.21855847537517548, 0.14080002903938293, -0.026811998337507248, -0.08513778448104858, -0.005383187904953957, -0.2538849115371704, -0.06525127589702606, 0.32963186502456665, -0.12682324647903442, 0.4315139353275299, 0.1532040238380432, 0.2892070412635803, -0.01847049966454506, -0.05140712484717369, -0.2919025123119354, 0.29054778814315796, 0.25433316826820374, -0.2341015338897705, 0.4157406985759735, -0.10252530872821808, -0.21352770924568176, -0.6377742290496826, -0.370678573846817, -0.08373884856700897, -0.13306306302547455, -0.0448601171374321, -0.06303036212921143, 0.16435381770133972, 0.06143708527088165, 0.07716065645217896, -0.06676213443279266, 0.2787646949291229, -0.18456247448921204, 0.10622963309288025, -0.33188343048095703, -0.3990280032157898, -0.019308272749185562, 0.23811903595924377, 0.01827302761375904, -0.11488048732280731, 0.017430061474442482, -0.04646797850728035, -0.07560302317142487, -0.1490141749382019, 0.11283766478300095, -0.014111075550317764, -0.15261493623256683, 0.13773292303085327, -0.02533198893070221, -0.26240742206573486, -0.2278362661600113, 0.32388442754745483, -0.32887333631515503, 0.004554254934191704, 0.45673584938049316, -0.18968376517295837, -0.05533439293503761, -0.05129329487681389, -0.3140721619129181, -0.5814599394798279, -0.05391008034348488, 0.017290960997343063, 0.03430105373263359, 0.3296334743499756, 0.3480423092842102, 0.03077331930398941, 0.1842595785856247, 0.03400534763932228, -0.059799134731292725, 0.08541799336671829, 0.11920242011547089, 0.3146255910396576, -0.03845217823982239, -0.2886621952056885, -0.3471452593803406, -0.11079111695289612, 0.07097993791103363, 0.076214499771595, -0.31931400299072266, 0.12620192766189575, -0.12603668868541718, 0.05120282992720604, -0.29062455892562866, 0.022035542875528336, 0.44809961318969727, 0.11024513095617294, -0.008791616186499596, 0.21246513724327087, 0.013971656560897827, 0.3060881495475769, 0.04166485369205475, 0.2144853174686432, -0.03469390422105789, 0.17872652411460876, -0.04564070701599121, 0.649557888507843, -0.1418001800775528, -0.3859337270259857, 0.17670127749443054, -0.1262180358171463, -0.17933687567710876, -0.009406283497810364, -0.30027642846107483, -0.0031256917864084244, -0.25873127579689026, -0.03538361191749573, 0.0021560192108154297, -0.28549107909202576, -0.32541424036026, -0.1811380386352539, 0.13426680862903595, -0.16325652599334717, -0.328149676322937, 0.3672772943973541, -0.25074198842048645, 0.2550685405731201, -0.15651383996009827, -0.14477238059043884, -0.16692334413528442, -0.4364982843399048, -0.030233096331357956, 0.1978234350681305, -0.2999429404735565, 0.027162590995430946, -0.5152032971382141, -0.23606868088245392, -0.159562885761261, 0.08459784090518951, 0.36667951941490173, 0.5396202802658081, 0.03030094876885414, 0.0349542573094368, 0.08058609068393707, 0.10107050836086273, 0.41064172983169556, 0.18398253619670868, -0.07503210008144379, 0.18558625876903534, 0.16558785736560822, -0.35793718695640564, -0.28352129459381104, -0.5400989651679993, -0.08220421522855759, 0.252880722284317, 0.09672616422176361, -0.28960806131362915, -0.24265091121196747, 0.22253412008285522, 0.04142831265926361, -0.2890585958957672, -0.04357650876045227, 0.01720808818936348, -0.23117280006408691, -0.20426045358181, 0.10622618347406387, 0.20910266041755676, 0.3887908160686493, -0.23060296475887299, -0.10892002284526825, 0.0180641021579504, 0.206056147813797, 0.17588046193122864, -0.01737889088690281, 0.12107253074645996, -0.127263605594635, -0.27190977334976196, -0.28430864214897156, 0.2212008535861969, 0.12467420101165771, 0.4509953260421753, 0.11753076314926147, -0.3715086877346039, 0.18797567486763, -0.05725711211562157, 0.34091249108314514, 0.007405877113342285, -0.11040902882814407, 0.34728294610977173, 0.1715262085199356, 0.3176766633987427, 0.09935886412858963, -0.028953438624739647, 0.2658730447292328, -0.07713177055120468, -0.49497655034065247, -0.041862331330776215, 0.27453359961509705, -0.07302364706993103, -0.0733688473701477, -0.024151399731636047, -0.20947928726673126, -0.26154154539108276, 0.4185970425605774, 0.34211990237236023, 1.0206481218338013, -0.26038026809692383, 0.3446713387966156, 0.10921020060777664, -0.060601361095905304, 0.4950573742389679, -0.15399709343910217, 0.1934899091720581, -0.5524521470069885, 0.04724031314253807, -0.11169160902500153, -0.19717265665531158, -0.17836490273475647, 0.3437044620513916, -0.3830965459346771, 0.13299992680549622, -0.0964835062623024, 0.19605927169322968, 0.14222727715969086, 0.3196293115615845, 0.20939454436302185, -0.20901530981063843, -0.2368236780166626, -0.003560492768883705, -0.4814993143081665, -0.09908878803253174, -0.03797397017478943, -0.28748077154159546, -0.00013608485460281372, -0.3918524980545044, -0.20003613829612732, 0.1904895007610321, -0.29227837920188904, 0.33843570947647095, 0.5059801936149597, -0.10644319653511047, 0.2228132039308548, 0.19872704148292542, 0.3068532347679138, -0.045633409172296524, 0.061189375817775726, -0.27032357454299927, -0.06260349601507187, 0.11660327762365341, -0.05728581175208092, -0.05342845991253853, 0.4100268483161926, -0.04768283665180206, -0.3138560652732849, 0.31783580780029297, 0.014437015168368816, -0.17577125132083893, 0.15726995468139648, -0.06720136106014252, 0.08750476688146591, -0.4117046892642975, 0.2714477479457855, -0.21885764598846436, -0.3185107409954071, -0.2686833143234253, 0.003916498273611069, 0.01892080157995224, -0.12270393967628479, 0.1043698787689209, 0.3181702792644501, 0.01480036973953247, 0.14292556047439575, 0.16663628816604614, 0.29795411229133606, 0.22282752394676208, 0.5636560916900635, 0.31597214937210083, 0.011753451079130173, -0.20831525325775146, 0.13117176294326782, 0.006908731535077095, -0.8838162422180176, 0.19761709868907928, -0.03137989714741707, -0.263752281665802, 0.2123912274837494, 0.3753276765346527, 0.1270444691181183, 0.4987850487232208, -0.17407964169979095, -0.4247027337551117, -0.39737772941589355, 0.006599836051464081, 0.17426320910453796, 0.0011973865330219269, 0.051423221826553345, 0.5306832790374756, 0.19821889698505402, 0.15471778810024261, -0.20497582852840424, 0.18318001925945282, -0.3399917185306549, 0.2554386258125305, -0.11082495748996735, -0.4195614755153656, -0.03815165162086487, 0.12543293833732605, 0.043873608112335205, 0.0017533842474222183, 0.09149228036403656, -0.054967328906059265, -0.18266494572162628, 0.1793142557144165, 0.27356189489364624, -0.20960791409015656, -0.20474006235599518, -0.004651550203561783, -0.021929755806922913, 0.10297423601150513, -0.07299619913101196, 0.007896631956100464, -0.1585477590560913, 0.5496968626976013, -0.0968373566865921, -0.07829437404870987, -0.3212504982948303, 0.03207142651081085, -0.23294571042060852, -0.05529800057411194, 0.17893534898757935, 0.23104993999004364, 0.1414339393377304, -0.1671890914440155, -0.7330247759819031, 0.14692291617393494, 0.28070420026779175, -0.07894859462976456, 0.2824501097202301, -0.6361714601516724, -0.2515561878681183, -0.12406845390796661, 0.05893612653017044, 0.01782260090112686, -0.29064372181892395, -0.11902491748332977, 0.1500854790210724, 0.07920821756124496, -0.22283422946929932, -0.21998156607151031, -0.007125772535800934, -0.15680654346942902, -0.18953202664852142, 0.43883323669433594, 0.050411518663167953, -0.17817264795303345, -0.09514658153057098, 0.020866937935352325, 0.15026025474071503, -0.1083439439535141, 0.0020462279208004475, 0.598039448261261, -0.13318151235580444, -0.029100973159074783, 0.45607033371925354, -0.0017087869346141815, -0.08082712441682816, 0.011111941188573837, -0.24031910300254822, 0.10640930384397507, -0.18647149205207825, 0.02841591089963913, 0.2730586528778076, 0.005315694957971573, -0.16144344210624695, 0.11166629195213318, 0.018033407628536224, -0.14061060547828674, -0.20857980847358704, 0.5285702347755432, -0.12940387427806854, -0.11113129556179047, -0.20984967052936554, 0.2522200644016266, -0.270111620426178, 0.004977274686098099, -0.1391531229019165, -0.07524119317531586, -0.17433494329452515, -0.216169536113739, -0.19599737226963043, 0.10436341166496277, 0.26758909225463867, 0.26782679557800293, 0.17319390177726746, -0.2923143804073334, 0.010724801570177078, 0.47458377480506897, 0.08574068546295166, -0.22547230124473572, 0.40084344148635864, 0.328563392162323, -0.098918616771698, 0.024349763989448547, 0.3410249948501587, 0.5116844177246094, 0.5268765687942505, -0.2755410671234131, 0.029622230678796768, 0.09985272586345673, -0.17232230305671692, 0.30093109607696533, 0.12202669680118561, 0.5902810096740723, 0.15899956226348877, 0.13224461674690247, -0.023707885295152664, -0.025082306936383247, 0.23306404054164886, -0.036524731665849686, 0.19096532464027405, 0.0803823173046112, 0.6249299049377441, 0.23981893062591553, -0.3591580092906952, -0.1490706205368042, 0.08431817591190338, -0.43413373827934265, 0.0055404058657586575, 0.46048450469970703, -0.04936549440026283, 0.2880004048347473, -0.0646260529756546, -0.02634381875395775, 0.15817223489284515, 0.627022922039032, 0.23330286145210266, 0.268967866897583, -0.3417344093322754, 0.11560587584972382, -0.32565194368362427, 0.3007262051105499, -0.0014738589525222778, -0.08987283706665039, 0.0791967362165451, 0.0009103883057832718, 0.05939709395170212, 0.1766044795513153, 0.12852975726127625, 0.0768040269613266, -0.14709125459194183, 0.23895077407360077, -0.16914263367652893, 0.024043217301368713, 0.08080330491065979, 0.2279125601053238, -0.05940385162830353, -0.3299914598464966, 0.21753191947937012, 0.10713109374046326, -0.01944708824157715, -0.07325703650712967, 0.05404896289110184, 0.12301917374134064, 0.17308077216148376, 0.10390534996986389, 0.03451996669173241, 0.5826877355575562, 0.12415937334299088, -0.0638267919421196, 0.33055737614631653, -0.11481741815805435, -0.17466172575950623, 0.16456179320812225, 0.2476196438074112, 0.6241387128829956, -0.034346871078014374, 0.25568896532058716, -0.4483467936515808, -0.21278606355190277, -0.026164062321186066, 0.0727958157658577, -0.2580461800098419, 0.23881524801254272, -0.2617340683937073, -0.03231411427259445, 0.32029467821121216, -0.00637827068567276, 0.29820162057876587, 0.09396412968635559, -0.42007339000701904, -0.46412184834480286, 0.3670324683189392, -0.2881052494049072, -0.23062863945960999, -0.1451697051525116, 0.11228126287460327, 0.030780106782913208, 0.08315261453390121, -0.6610732078552246, -0.00985535979270935, 0.33231356739997864, -0.026302434504032135, -0.22136418521404266, -0.12052077054977417, 0.012263543903827667, 0.18510222434997559, -0.0976044088602066, 0.2706553339958191, -0.09607893973588943, -0.0646674856543541, -0.4541105628013611, -0.1759289652109146 ]
https://github.com/huggingface/datasets/issues/469
invalid data type 'str' at _convert_outputs in arrow_dataset.py
> Hi, actually the thing is I am getting the same error and even after tokenizing them I am passing them through batch_encode_plus. > I dont know what seems to be the problem is. I even converted it into 'pt' while passing them through batch_encode_plus but when I am evaluating my model , i am getting this error > > TypeError Traceback (most recent call last) > in () > ----> 1 val_loss, predictions, true_val = evaluate(dataloader_validation) > 2 val_f1 = f1_score_func(predictions, true_val) > 3 tqdm.write(f'Validation loss: {val_loss}') > 4 tqdm.write(f'F1 Score (Weighted): {val_f1}') > > 6 frames > /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataset.py in (.0) > 160 > 161 def **getitem**(self, index): > --> 162 return tuple(tensor[index] for tensor in self.tensors) > 163 > 164 def **len**(self): > > TypeError: new(): invalid data type 'str' I got the same error and fix it . you can check your input where there may be string contained. such as ``` a = [1,2,3,4,'<unk>'] torch.tensor(a) ```
I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str'
160
invalid data type 'str' at _convert_outputs in arrow_dataset.py I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' > Hi, actually the thing is I am getting the same error and even after tokenizing them I am passing them through batch_encode_plus. > I dont know what seems to be the problem is. I even converted it into 'pt' while passing them through batch_encode_plus but when I am evaluating my model , i am getting this error > > TypeError Traceback (most recent call last) > in () > ----> 1 val_loss, predictions, true_val = evaluate(dataloader_validation) > 2 val_f1 = f1_score_func(predictions, true_val) > 3 tqdm.write(f'Validation loss: {val_loss}') > 4 tqdm.write(f'F1 Score (Weighted): {val_f1}') > > 6 frames > /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataset.py in (.0) > 160 > 161 def **getitem**(self, index): > --> 162 return tuple(tensor[index] for tensor in self.tensors) > 163 > 164 def **len**(self): > > TypeError: new(): invalid data type 'str' I got the same error and fix it . you can check your input where there may be string contained. such as ``` a = [1,2,3,4,'<unk>'] torch.tensor(a) ```
[ -0.2228243350982666, 0.024250030517578125, 0.10737118124961853, 0.23030777275562286, 0.5109524130821228, -0.10725949704647064, 0.5323299169540405, 0.07758963108062744, -0.3410608470439911, -0.1247759759426117, 0.036657460033893585, 0.38640740513801575, -0.3696955740451813, 0.04221741855144501, 0.044361136853694916, -0.20246419310569763, -0.08803436905145645, 0.009989947080612183, -0.023253202438354492, -0.05363911762833595, 0.04824294149875641, 0.1829809695482254, -0.1568261831998825, 0.41447770595550537, -0.6451317071914673, -0.1835787445306778, 0.17466366291046143, -0.09639241546392441, -0.0992203801870346, -0.44877856969833374, 0.22027485072612762, -0.10204413533210754, 0.49763670563697815, 0.34723225235939026, -0.00012417118705343455, 0.13803546130657196, 0.10928626358509064, 0.10169446468353271, -0.29087191820144653, -0.30163800716400146, 0.13411536812782288, -0.059384651482105255, 0.4149942100048065, -0.20153960585594177, -0.05718928575515747, -0.26009130477905273, -0.0606258288025856, 0.2617684304714203, 0.38377588987350464, 0.5016975998878479, 0.11732237040996552, 0.168516606092453, 0.24648593366146088, 0.0738130584359169, 0.2595645785331726, 0.3155062198638916, 0.07547719031572342, 0.20712460577487946, 0.016833722591400146, 0.02660575695335865, -0.08569461852312088, 0.07480800151824951, -0.0701286792755127, -0.19977375864982605, 0.21665742993354797, 0.22728313505649567, 0.17457962036132812, -0.14762207865715027, -0.22878491878509521, 0.11988408863544464, 0.43321487307548523, -0.3214257061481476, -0.15594464540481567, 0.00792209804058075, -0.01116220373660326, -0.2727994918823242, -0.006166346371173859, 0.24833130836486816, -0.4277770221233368, 0.16670124232769012, -0.1622595489025116, -0.025467004626989365, -0.37924981117248535, 0.1995561718940735, -0.09251708537340164, 0.5032647848129272, 0.1183696985244751, 0.15681712329387665, 0.1842406541109085, -0.014435797929763794, 0.37171033024787903, 0.08763841539621353, 0.13975456357002258, 0.06214825063943863, -0.31169503927230835, -0.030463719740509987, -0.4463338851928711, -0.6483628153800964, -0.26851406693458557, -0.21252401173114777, 0.16557608544826508, -0.07115226238965988, 0.20472756028175354, 0.20295098423957825, 0.23332171142101288, 0.13880077004432678, -0.21012258529663086, 0.5648381114006042, 0.10009273886680603, -0.15525050461292267, -0.1335459053516388, -0.025088388472795486, -0.3282395303249359, -0.09228960424661636, 0.51212477684021, 0.1628408432006836, 0.125742569565773, -0.005032110959291458, -0.05502255633473396, -0.14883260428905487, -0.2688639760017395, -0.08821742981672287, 0.28471502661705017, 0.18506935238838196, 0.09583508223295212, 0.383220911026001, 0.21541886031627655, 0.1111360415816307, 0.0493779331445694, -0.13524387776851654, 0.035321783274412155, 0.08555580675601959, -0.21797066926956177, -0.11981748789548874, 0.18211247026920319, 0.328197181224823, -0.2699033319950104, 0.12150097638368607, -0.1425367295742035, -0.20853666961193085, 0.0015728343278169632, -0.2935900390148163, -0.005308158695697784, 0.013497207313776016, -0.2574833631515503, 0.30978721380233765, 0.09357541054487228, -0.30359336733818054, 0.0196344256401062, 0.4677716791629791, -0.4638137221336365, -0.4341677129268646, -0.43581998348236084, 0.08996035903692245, 0.3708478808403015, -0.11298727989196777, -0.09231000393629074, 0.0597342774271965, 0.45208659768104553, -0.18882547318935394, 0.1029466912150383, -0.5797590613365173, 0.3521018922328949, -0.015292937867343426, -0.08329898118972778, 0.09054630994796753, -0.4035285413265228, -0.1816476285457611, 0.1696709394454956, -0.15330438315868378, 0.3111136555671692, 0.4423995316028595, -0.3827601671218872, 0.29479190707206726, 0.07952678948640823, 0.01669340580701828, 0.8023694753646851, -0.3571898639202118, -0.21795859932899475, 0.13225501775741577, -0.1704491376876831, -0.3259197473526001, -0.07707256823778152, 0.27369746565818787, 0.09063001722097397, 0.07179848849773407, -0.009403049945831299, 0.39142608642578125, -0.09331489354372025, 0.2531605362892151, -0.3342474102973938, -0.07499298453330994, 0.3700166344642639, 0.3320882022380829, 0.2507387399673462, -0.03353843092918396, 0.06653175503015518, 0.34221649169921875, 0.2596169710159302, -0.14549636840820312, 0.2384001761674881, 0.1618347465991974, 0.018355615437030792, -0.17592434585094452, -0.10522519052028656, -0.1606467068195343, -0.30508825182914734, -0.20202094316482544, -0.3353264629840851, 0.4843737483024597, -0.2394983321428299, 0.08094963431358337, -0.1629115343093872, -0.07293739169836044, -0.11232298612594604, 0.23905333876609802, 0.10807859897613525, 0.08143927901983261, -0.14365501701831818, -0.06898745894432068, -0.10004855692386627, -0.06188845634460449, -0.05237269774079323, 0.18809983134269714, 0.025137510150671005, 0.273226797580719, -0.1691008061170578, -0.1986374855041504, -0.26017487049102783, 0.056433238089084625, 0.25581619143486023, 0.09606218338012695, -0.2582114338874817, 0.2561090588569641, -0.14479181170463562, -0.25812333822250366, -0.30881136655807495, 0.3103082478046417, 0.15541012585163116, -0.525098979473114, 0.03694208338856697, 0.16145092248916626, 0.16632123291492462, -0.08961234986782074, 0.1419675350189209, 0.13636274635791779, 0.06864175200462341, 0.1380072981119156, -0.004035595804452896, 0.3693373501300812, 0.2155342847108841, -0.04095638170838356, 0.26966047286987305, 0.04955346882343292, -0.1201171875, -0.16362608969211578, 0.11930233240127563, 0.031724054366350174, -0.2905440926551819, -0.01962921768426895, 0.4356480538845062, -0.15255548059940338, 0.24142301082611084, 0.44143056869506836, -0.11877451092004776, -0.02535407431423664, -0.18716216087341309, 0.21855847537517548, 0.14080002903938293, -0.026811998337507248, -0.08513778448104858, -0.005383187904953957, -0.2538849115371704, -0.06525127589702606, 0.32963186502456665, -0.12682324647903442, 0.4315139353275299, 0.1532040238380432, 0.2892070412635803, -0.01847049966454506, -0.05140712484717369, -0.2919025123119354, 0.29054778814315796, 0.25433316826820374, -0.2341015338897705, 0.4157406985759735, -0.10252530872821808, -0.21352770924568176, -0.6377742290496826, -0.370678573846817, -0.08373884856700897, -0.13306306302547455, -0.0448601171374321, -0.06303036212921143, 0.16435381770133972, 0.06143708527088165, 0.07716065645217896, -0.06676213443279266, 0.2787646949291229, -0.18456247448921204, 0.10622963309288025, -0.33188343048095703, -0.3990280032157898, -0.019308272749185562, 0.23811903595924377, 0.01827302761375904, -0.11488048732280731, 0.017430061474442482, -0.04646797850728035, -0.07560302317142487, -0.1490141749382019, 0.11283766478300095, -0.014111075550317764, -0.15261493623256683, 0.13773292303085327, -0.02533198893070221, -0.26240742206573486, -0.2278362661600113, 0.32388442754745483, -0.32887333631515503, 0.004554254934191704, 0.45673584938049316, -0.18968376517295837, -0.05533439293503761, -0.05129329487681389, -0.3140721619129181, -0.5814599394798279, -0.05391008034348488, 0.017290960997343063, 0.03430105373263359, 0.3296334743499756, 0.3480423092842102, 0.03077331930398941, 0.1842595785856247, 0.03400534763932228, -0.059799134731292725, 0.08541799336671829, 0.11920242011547089, 0.3146255910396576, -0.03845217823982239, -0.2886621952056885, -0.3471452593803406, -0.11079111695289612, 0.07097993791103363, 0.076214499771595, -0.31931400299072266, 0.12620192766189575, -0.12603668868541718, 0.05120282992720604, -0.29062455892562866, 0.022035542875528336, 0.44809961318969727, 0.11024513095617294, -0.008791616186499596, 0.21246513724327087, 0.013971656560897827, 0.3060881495475769, 0.04166485369205475, 0.2144853174686432, -0.03469390422105789, 0.17872652411460876, -0.04564070701599121, 0.649557888507843, -0.1418001800775528, -0.3859337270259857, 0.17670127749443054, -0.1262180358171463, -0.17933687567710876, -0.009406283497810364, -0.30027642846107483, -0.0031256917864084244, -0.25873127579689026, -0.03538361191749573, 0.0021560192108154297, -0.28549107909202576, -0.32541424036026, -0.1811380386352539, 0.13426680862903595, -0.16325652599334717, -0.328149676322937, 0.3672772943973541, -0.25074198842048645, 0.2550685405731201, -0.15651383996009827, -0.14477238059043884, -0.16692334413528442, -0.4364982843399048, -0.030233096331357956, 0.1978234350681305, -0.2999429404735565, 0.027162590995430946, -0.5152032971382141, -0.23606868088245392, -0.159562885761261, 0.08459784090518951, 0.36667951941490173, 0.5396202802658081, 0.03030094876885414, 0.0349542573094368, 0.08058609068393707, 0.10107050836086273, 0.41064172983169556, 0.18398253619670868, -0.07503210008144379, 0.18558625876903534, 0.16558785736560822, -0.35793718695640564, -0.28352129459381104, -0.5400989651679993, -0.08220421522855759, 0.252880722284317, 0.09672616422176361, -0.28960806131362915, -0.24265091121196747, 0.22253412008285522, 0.04142831265926361, -0.2890585958957672, -0.04357650876045227, 0.01720808818936348, -0.23117280006408691, -0.20426045358181, 0.10622618347406387, 0.20910266041755676, 0.3887908160686493, -0.23060296475887299, -0.10892002284526825, 0.0180641021579504, 0.206056147813797, 0.17588046193122864, -0.01737889088690281, 0.12107253074645996, -0.127263605594635, -0.27190977334976196, -0.28430864214897156, 0.2212008535861969, 0.12467420101165771, 0.4509953260421753, 0.11753076314926147, -0.3715086877346039, 0.18797567486763, -0.05725711211562157, 0.34091249108314514, 0.007405877113342285, -0.11040902882814407, 0.34728294610977173, 0.1715262085199356, 0.3176766633987427, 0.09935886412858963, -0.028953438624739647, 0.2658730447292328, -0.07713177055120468, -0.49497655034065247, -0.041862331330776215, 0.27453359961509705, -0.07302364706993103, -0.0733688473701477, -0.024151399731636047, -0.20947928726673126, -0.26154154539108276, 0.4185970425605774, 0.34211990237236023, 1.0206481218338013, -0.26038026809692383, 0.3446713387966156, 0.10921020060777664, -0.060601361095905304, 0.4950573742389679, -0.15399709343910217, 0.1934899091720581, -0.5524521470069885, 0.04724031314253807, -0.11169160902500153, -0.19717265665531158, -0.17836490273475647, 0.3437044620513916, -0.3830965459346771, 0.13299992680549622, -0.0964835062623024, 0.19605927169322968, 0.14222727715969086, 0.3196293115615845, 0.20939454436302185, -0.20901530981063843, -0.2368236780166626, -0.003560492768883705, -0.4814993143081665, -0.09908878803253174, -0.03797397017478943, -0.28748077154159546, -0.00013608485460281372, -0.3918524980545044, -0.20003613829612732, 0.1904895007610321, -0.29227837920188904, 0.33843570947647095, 0.5059801936149597, -0.10644319653511047, 0.2228132039308548, 0.19872704148292542, 0.3068532347679138, -0.045633409172296524, 0.061189375817775726, -0.27032357454299927, -0.06260349601507187, 0.11660327762365341, -0.05728581175208092, -0.05342845991253853, 0.4100268483161926, -0.04768283665180206, -0.3138560652732849, 0.31783580780029297, 0.014437015168368816, -0.17577125132083893, 0.15726995468139648, -0.06720136106014252, 0.08750476688146591, -0.4117046892642975, 0.2714477479457855, -0.21885764598846436, -0.3185107409954071, -0.2686833143234253, 0.003916498273611069, 0.01892080157995224, -0.12270393967628479, 0.1043698787689209, 0.3181702792644501, 0.01480036973953247, 0.14292556047439575, 0.16663628816604614, 0.29795411229133606, 0.22282752394676208, 0.5636560916900635, 0.31597214937210083, 0.011753451079130173, -0.20831525325775146, 0.13117176294326782, 0.006908731535077095, -0.8838162422180176, 0.19761709868907928, -0.03137989714741707, -0.263752281665802, 0.2123912274837494, 0.3753276765346527, 0.1270444691181183, 0.4987850487232208, -0.17407964169979095, -0.4247027337551117, -0.39737772941589355, 0.006599836051464081, 0.17426320910453796, 0.0011973865330219269, 0.051423221826553345, 0.5306832790374756, 0.19821889698505402, 0.15471778810024261, -0.20497582852840424, 0.18318001925945282, -0.3399917185306549, 0.2554386258125305, -0.11082495748996735, -0.4195614755153656, -0.03815165162086487, 0.12543293833732605, 0.043873608112335205, 0.0017533842474222183, 0.09149228036403656, -0.054967328906059265, -0.18266494572162628, 0.1793142557144165, 0.27356189489364624, -0.20960791409015656, -0.20474006235599518, -0.004651550203561783, -0.021929755806922913, 0.10297423601150513, -0.07299619913101196, 0.007896631956100464, -0.1585477590560913, 0.5496968626976013, -0.0968373566865921, -0.07829437404870987, -0.3212504982948303, 0.03207142651081085, -0.23294571042060852, -0.05529800057411194, 0.17893534898757935, 0.23104993999004364, 0.1414339393377304, -0.1671890914440155, -0.7330247759819031, 0.14692291617393494, 0.28070420026779175, -0.07894859462976456, 0.2824501097202301, -0.6361714601516724, -0.2515561878681183, -0.12406845390796661, 0.05893612653017044, 0.01782260090112686, -0.29064372181892395, -0.11902491748332977, 0.1500854790210724, 0.07920821756124496, -0.22283422946929932, -0.21998156607151031, -0.007125772535800934, -0.15680654346942902, -0.18953202664852142, 0.43883323669433594, 0.050411518663167953, -0.17817264795303345, -0.09514658153057098, 0.020866937935352325, 0.15026025474071503, -0.1083439439535141, 0.0020462279208004475, 0.598039448261261, -0.13318151235580444, -0.029100973159074783, 0.45607033371925354, -0.0017087869346141815, -0.08082712441682816, 0.011111941188573837, -0.24031910300254822, 0.10640930384397507, -0.18647149205207825, 0.02841591089963913, 0.2730586528778076, 0.005315694957971573, -0.16144344210624695, 0.11166629195213318, 0.018033407628536224, -0.14061060547828674, -0.20857980847358704, 0.5285702347755432, -0.12940387427806854, -0.11113129556179047, -0.20984967052936554, 0.2522200644016266, -0.270111620426178, 0.004977274686098099, -0.1391531229019165, -0.07524119317531586, -0.17433494329452515, -0.216169536113739, -0.19599737226963043, 0.10436341166496277, 0.26758909225463867, 0.26782679557800293, 0.17319390177726746, -0.2923143804073334, 0.010724801570177078, 0.47458377480506897, 0.08574068546295166, -0.22547230124473572, 0.40084344148635864, 0.328563392162323, -0.098918616771698, 0.024349763989448547, 0.3410249948501587, 0.5116844177246094, 0.5268765687942505, -0.2755410671234131, 0.029622230678796768, 0.09985272586345673, -0.17232230305671692, 0.30093109607696533, 0.12202669680118561, 0.5902810096740723, 0.15899956226348877, 0.13224461674690247, -0.023707885295152664, -0.025082306936383247, 0.23306404054164886, -0.036524731665849686, 0.19096532464027405, 0.0803823173046112, 0.6249299049377441, 0.23981893062591553, -0.3591580092906952, -0.1490706205368042, 0.08431817591190338, -0.43413373827934265, 0.0055404058657586575, 0.46048450469970703, -0.04936549440026283, 0.2880004048347473, -0.0646260529756546, -0.02634381875395775, 0.15817223489284515, 0.627022922039032, 0.23330286145210266, 0.268967866897583, -0.3417344093322754, 0.11560587584972382, -0.32565194368362427, 0.3007262051105499, -0.0014738589525222778, -0.08987283706665039, 0.0791967362165451, 0.0009103883057832718, 0.05939709395170212, 0.1766044795513153, 0.12852975726127625, 0.0768040269613266, -0.14709125459194183, 0.23895077407360077, -0.16914263367652893, 0.024043217301368713, 0.08080330491065979, 0.2279125601053238, -0.05940385162830353, -0.3299914598464966, 0.21753191947937012, 0.10713109374046326, -0.01944708824157715, -0.07325703650712967, 0.05404896289110184, 0.12301917374134064, 0.17308077216148376, 0.10390534996986389, 0.03451996669173241, 0.5826877355575562, 0.12415937334299088, -0.0638267919421196, 0.33055737614631653, -0.11481741815805435, -0.17466172575950623, 0.16456179320812225, 0.2476196438074112, 0.6241387128829956, -0.034346871078014374, 0.25568896532058716, -0.4483467936515808, -0.21278606355190277, -0.026164062321186066, 0.0727958157658577, -0.2580461800098419, 0.23881524801254272, -0.2617340683937073, -0.03231411427259445, 0.32029467821121216, -0.00637827068567276, 0.29820162057876587, 0.09396412968635559, -0.42007339000701904, -0.46412184834480286, 0.3670324683189392, -0.2881052494049072, -0.23062863945960999, -0.1451697051525116, 0.11228126287460327, 0.030780106782913208, 0.08315261453390121, -0.6610732078552246, -0.00985535979270935, 0.33231356739997864, -0.026302434504032135, -0.22136418521404266, -0.12052077054977417, 0.012263543903827667, 0.18510222434997559, -0.0976044088602066, 0.2706553339958191, -0.09607893973588943, -0.0646674856543541, -0.4541105628013611, -0.1759289652109146 ]
https://github.com/huggingface/datasets/issues/469
invalid data type 'str' at _convert_outputs in arrow_dataset.py
I didn't know tokenizers could return strings in the token ids. Which tokenizer are you using to get this @Doragd ?
I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str'
21
invalid data type 'str' at _convert_outputs in arrow_dataset.py I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I didn't know tokenizers could return strings in the token ids. Which tokenizer are you using to get this @Doragd ?
[ -0.2228243350982666, 0.024250030517578125, 0.10737118124961853, 0.23030777275562286, 0.5109524130821228, -0.10725949704647064, 0.5323299169540405, 0.07758963108062744, -0.3410608470439911, -0.1247759759426117, 0.036657460033893585, 0.38640740513801575, -0.3696955740451813, 0.04221741855144501, 0.044361136853694916, -0.20246419310569763, -0.08803436905145645, 0.009989947080612183, -0.023253202438354492, -0.05363911762833595, 0.04824294149875641, 0.1829809695482254, -0.1568261831998825, 0.41447770595550537, -0.6451317071914673, -0.1835787445306778, 0.17466366291046143, -0.09639241546392441, -0.0992203801870346, -0.44877856969833374, 0.22027485072612762, -0.10204413533210754, 0.49763670563697815, 0.34723225235939026, -0.00012417118705343455, 0.13803546130657196, 0.10928626358509064, 0.10169446468353271, -0.29087191820144653, -0.30163800716400146, 0.13411536812782288, -0.059384651482105255, 0.4149942100048065, -0.20153960585594177, -0.05718928575515747, -0.26009130477905273, -0.0606258288025856, 0.2617684304714203, 0.38377588987350464, 0.5016975998878479, 0.11732237040996552, 0.168516606092453, 0.24648593366146088, 0.0738130584359169, 0.2595645785331726, 0.3155062198638916, 0.07547719031572342, 0.20712460577487946, 0.016833722591400146, 0.02660575695335865, -0.08569461852312088, 0.07480800151824951, -0.0701286792755127, -0.19977375864982605, 0.21665742993354797, 0.22728313505649567, 0.17457962036132812, -0.14762207865715027, -0.22878491878509521, 0.11988408863544464, 0.43321487307548523, -0.3214257061481476, -0.15594464540481567, 0.00792209804058075, -0.01116220373660326, -0.2727994918823242, -0.006166346371173859, 0.24833130836486816, -0.4277770221233368, 0.16670124232769012, -0.1622595489025116, -0.025467004626989365, -0.37924981117248535, 0.1995561718940735, -0.09251708537340164, 0.5032647848129272, 0.1183696985244751, 0.15681712329387665, 0.1842406541109085, -0.014435797929763794, 0.37171033024787903, 0.08763841539621353, 0.13975456357002258, 0.06214825063943863, -0.31169503927230835, -0.030463719740509987, -0.4463338851928711, -0.6483628153800964, -0.26851406693458557, -0.21252401173114777, 0.16557608544826508, -0.07115226238965988, 0.20472756028175354, 0.20295098423957825, 0.23332171142101288, 0.13880077004432678, -0.21012258529663086, 0.5648381114006042, 0.10009273886680603, -0.15525050461292267, -0.1335459053516388, -0.025088388472795486, -0.3282395303249359, -0.09228960424661636, 0.51212477684021, 0.1628408432006836, 0.125742569565773, -0.005032110959291458, -0.05502255633473396, -0.14883260428905487, -0.2688639760017395, -0.08821742981672287, 0.28471502661705017, 0.18506935238838196, 0.09583508223295212, 0.383220911026001, 0.21541886031627655, 0.1111360415816307, 0.0493779331445694, -0.13524387776851654, 0.035321783274412155, 0.08555580675601959, -0.21797066926956177, -0.11981748789548874, 0.18211247026920319, 0.328197181224823, -0.2699033319950104, 0.12150097638368607, -0.1425367295742035, -0.20853666961193085, 0.0015728343278169632, -0.2935900390148163, -0.005308158695697784, 0.013497207313776016, -0.2574833631515503, 0.30978721380233765, 0.09357541054487228, -0.30359336733818054, 0.0196344256401062, 0.4677716791629791, -0.4638137221336365, -0.4341677129268646, -0.43581998348236084, 0.08996035903692245, 0.3708478808403015, -0.11298727989196777, -0.09231000393629074, 0.0597342774271965, 0.45208659768104553, -0.18882547318935394, 0.1029466912150383, -0.5797590613365173, 0.3521018922328949, -0.015292937867343426, -0.08329898118972778, 0.09054630994796753, -0.4035285413265228, -0.1816476285457611, 0.1696709394454956, -0.15330438315868378, 0.3111136555671692, 0.4423995316028595, -0.3827601671218872, 0.29479190707206726, 0.07952678948640823, 0.01669340580701828, 0.8023694753646851, -0.3571898639202118, -0.21795859932899475, 0.13225501775741577, -0.1704491376876831, -0.3259197473526001, -0.07707256823778152, 0.27369746565818787, 0.09063001722097397, 0.07179848849773407, -0.009403049945831299, 0.39142608642578125, -0.09331489354372025, 0.2531605362892151, -0.3342474102973938, -0.07499298453330994, 0.3700166344642639, 0.3320882022380829, 0.2507387399673462, -0.03353843092918396, 0.06653175503015518, 0.34221649169921875, 0.2596169710159302, -0.14549636840820312, 0.2384001761674881, 0.1618347465991974, 0.018355615437030792, -0.17592434585094452, -0.10522519052028656, -0.1606467068195343, -0.30508825182914734, -0.20202094316482544, -0.3353264629840851, 0.4843737483024597, -0.2394983321428299, 0.08094963431358337, -0.1629115343093872, -0.07293739169836044, -0.11232298612594604, 0.23905333876609802, 0.10807859897613525, 0.08143927901983261, -0.14365501701831818, -0.06898745894432068, -0.10004855692386627, -0.06188845634460449, -0.05237269774079323, 0.18809983134269714, 0.025137510150671005, 0.273226797580719, -0.1691008061170578, -0.1986374855041504, -0.26017487049102783, 0.056433238089084625, 0.25581619143486023, 0.09606218338012695, -0.2582114338874817, 0.2561090588569641, -0.14479181170463562, -0.25812333822250366, -0.30881136655807495, 0.3103082478046417, 0.15541012585163116, -0.525098979473114, 0.03694208338856697, 0.16145092248916626, 0.16632123291492462, -0.08961234986782074, 0.1419675350189209, 0.13636274635791779, 0.06864175200462341, 0.1380072981119156, -0.004035595804452896, 0.3693373501300812, 0.2155342847108841, -0.04095638170838356, 0.26966047286987305, 0.04955346882343292, -0.1201171875, -0.16362608969211578, 0.11930233240127563, 0.031724054366350174, -0.2905440926551819, -0.01962921768426895, 0.4356480538845062, -0.15255548059940338, 0.24142301082611084, 0.44143056869506836, -0.11877451092004776, -0.02535407431423664, -0.18716216087341309, 0.21855847537517548, 0.14080002903938293, -0.026811998337507248, -0.08513778448104858, -0.005383187904953957, -0.2538849115371704, -0.06525127589702606, 0.32963186502456665, -0.12682324647903442, 0.4315139353275299, 0.1532040238380432, 0.2892070412635803, -0.01847049966454506, -0.05140712484717369, -0.2919025123119354, 0.29054778814315796, 0.25433316826820374, -0.2341015338897705, 0.4157406985759735, -0.10252530872821808, -0.21352770924568176, -0.6377742290496826, -0.370678573846817, -0.08373884856700897, -0.13306306302547455, -0.0448601171374321, -0.06303036212921143, 0.16435381770133972, 0.06143708527088165, 0.07716065645217896, -0.06676213443279266, 0.2787646949291229, -0.18456247448921204, 0.10622963309288025, -0.33188343048095703, -0.3990280032157898, -0.019308272749185562, 0.23811903595924377, 0.01827302761375904, -0.11488048732280731, 0.017430061474442482, -0.04646797850728035, -0.07560302317142487, -0.1490141749382019, 0.11283766478300095, -0.014111075550317764, -0.15261493623256683, 0.13773292303085327, -0.02533198893070221, -0.26240742206573486, -0.2278362661600113, 0.32388442754745483, -0.32887333631515503, 0.004554254934191704, 0.45673584938049316, -0.18968376517295837, -0.05533439293503761, -0.05129329487681389, -0.3140721619129181, -0.5814599394798279, -0.05391008034348488, 0.017290960997343063, 0.03430105373263359, 0.3296334743499756, 0.3480423092842102, 0.03077331930398941, 0.1842595785856247, 0.03400534763932228, -0.059799134731292725, 0.08541799336671829, 0.11920242011547089, 0.3146255910396576, -0.03845217823982239, -0.2886621952056885, -0.3471452593803406, -0.11079111695289612, 0.07097993791103363, 0.076214499771595, -0.31931400299072266, 0.12620192766189575, -0.12603668868541718, 0.05120282992720604, -0.29062455892562866, 0.022035542875528336, 0.44809961318969727, 0.11024513095617294, -0.008791616186499596, 0.21246513724327087, 0.013971656560897827, 0.3060881495475769, 0.04166485369205475, 0.2144853174686432, -0.03469390422105789, 0.17872652411460876, -0.04564070701599121, 0.649557888507843, -0.1418001800775528, -0.3859337270259857, 0.17670127749443054, -0.1262180358171463, -0.17933687567710876, -0.009406283497810364, -0.30027642846107483, -0.0031256917864084244, -0.25873127579689026, -0.03538361191749573, 0.0021560192108154297, -0.28549107909202576, -0.32541424036026, -0.1811380386352539, 0.13426680862903595, -0.16325652599334717, -0.328149676322937, 0.3672772943973541, -0.25074198842048645, 0.2550685405731201, -0.15651383996009827, -0.14477238059043884, -0.16692334413528442, -0.4364982843399048, -0.030233096331357956, 0.1978234350681305, -0.2999429404735565, 0.027162590995430946, -0.5152032971382141, -0.23606868088245392, -0.159562885761261, 0.08459784090518951, 0.36667951941490173, 0.5396202802658081, 0.03030094876885414, 0.0349542573094368, 0.08058609068393707, 0.10107050836086273, 0.41064172983169556, 0.18398253619670868, -0.07503210008144379, 0.18558625876903534, 0.16558785736560822, -0.35793718695640564, -0.28352129459381104, -0.5400989651679993, -0.08220421522855759, 0.252880722284317, 0.09672616422176361, -0.28960806131362915, -0.24265091121196747, 0.22253412008285522, 0.04142831265926361, -0.2890585958957672, -0.04357650876045227, 0.01720808818936348, -0.23117280006408691, -0.20426045358181, 0.10622618347406387, 0.20910266041755676, 0.3887908160686493, -0.23060296475887299, -0.10892002284526825, 0.0180641021579504, 0.206056147813797, 0.17588046193122864, -0.01737889088690281, 0.12107253074645996, -0.127263605594635, -0.27190977334976196, -0.28430864214897156, 0.2212008535861969, 0.12467420101165771, 0.4509953260421753, 0.11753076314926147, -0.3715086877346039, 0.18797567486763, -0.05725711211562157, 0.34091249108314514, 0.007405877113342285, -0.11040902882814407, 0.34728294610977173, 0.1715262085199356, 0.3176766633987427, 0.09935886412858963, -0.028953438624739647, 0.2658730447292328, -0.07713177055120468, -0.49497655034065247, -0.041862331330776215, 0.27453359961509705, -0.07302364706993103, -0.0733688473701477, -0.024151399731636047, -0.20947928726673126, -0.26154154539108276, 0.4185970425605774, 0.34211990237236023, 1.0206481218338013, -0.26038026809692383, 0.3446713387966156, 0.10921020060777664, -0.060601361095905304, 0.4950573742389679, -0.15399709343910217, 0.1934899091720581, -0.5524521470069885, 0.04724031314253807, -0.11169160902500153, -0.19717265665531158, -0.17836490273475647, 0.3437044620513916, -0.3830965459346771, 0.13299992680549622, -0.0964835062623024, 0.19605927169322968, 0.14222727715969086, 0.3196293115615845, 0.20939454436302185, -0.20901530981063843, -0.2368236780166626, -0.003560492768883705, -0.4814993143081665, -0.09908878803253174, -0.03797397017478943, -0.28748077154159546, -0.00013608485460281372, -0.3918524980545044, -0.20003613829612732, 0.1904895007610321, -0.29227837920188904, 0.33843570947647095, 0.5059801936149597, -0.10644319653511047, 0.2228132039308548, 0.19872704148292542, 0.3068532347679138, -0.045633409172296524, 0.061189375817775726, -0.27032357454299927, -0.06260349601507187, 0.11660327762365341, -0.05728581175208092, -0.05342845991253853, 0.4100268483161926, -0.04768283665180206, -0.3138560652732849, 0.31783580780029297, 0.014437015168368816, -0.17577125132083893, 0.15726995468139648, -0.06720136106014252, 0.08750476688146591, -0.4117046892642975, 0.2714477479457855, -0.21885764598846436, -0.3185107409954071, -0.2686833143234253, 0.003916498273611069, 0.01892080157995224, -0.12270393967628479, 0.1043698787689209, 0.3181702792644501, 0.01480036973953247, 0.14292556047439575, 0.16663628816604614, 0.29795411229133606, 0.22282752394676208, 0.5636560916900635, 0.31597214937210083, 0.011753451079130173, -0.20831525325775146, 0.13117176294326782, 0.006908731535077095, -0.8838162422180176, 0.19761709868907928, -0.03137989714741707, -0.263752281665802, 0.2123912274837494, 0.3753276765346527, 0.1270444691181183, 0.4987850487232208, -0.17407964169979095, -0.4247027337551117, -0.39737772941589355, 0.006599836051464081, 0.17426320910453796, 0.0011973865330219269, 0.051423221826553345, 0.5306832790374756, 0.19821889698505402, 0.15471778810024261, -0.20497582852840424, 0.18318001925945282, -0.3399917185306549, 0.2554386258125305, -0.11082495748996735, -0.4195614755153656, -0.03815165162086487, 0.12543293833732605, 0.043873608112335205, 0.0017533842474222183, 0.09149228036403656, -0.054967328906059265, -0.18266494572162628, 0.1793142557144165, 0.27356189489364624, -0.20960791409015656, -0.20474006235599518, -0.004651550203561783, -0.021929755806922913, 0.10297423601150513, -0.07299619913101196, 0.007896631956100464, -0.1585477590560913, 0.5496968626976013, -0.0968373566865921, -0.07829437404870987, -0.3212504982948303, 0.03207142651081085, -0.23294571042060852, -0.05529800057411194, 0.17893534898757935, 0.23104993999004364, 0.1414339393377304, -0.1671890914440155, -0.7330247759819031, 0.14692291617393494, 0.28070420026779175, -0.07894859462976456, 0.2824501097202301, -0.6361714601516724, -0.2515561878681183, -0.12406845390796661, 0.05893612653017044, 0.01782260090112686, -0.29064372181892395, -0.11902491748332977, 0.1500854790210724, 0.07920821756124496, -0.22283422946929932, -0.21998156607151031, -0.007125772535800934, -0.15680654346942902, -0.18953202664852142, 0.43883323669433594, 0.050411518663167953, -0.17817264795303345, -0.09514658153057098, 0.020866937935352325, 0.15026025474071503, -0.1083439439535141, 0.0020462279208004475, 0.598039448261261, -0.13318151235580444, -0.029100973159074783, 0.45607033371925354, -0.0017087869346141815, -0.08082712441682816, 0.011111941188573837, -0.24031910300254822, 0.10640930384397507, -0.18647149205207825, 0.02841591089963913, 0.2730586528778076, 0.005315694957971573, -0.16144344210624695, 0.11166629195213318, 0.018033407628536224, -0.14061060547828674, -0.20857980847358704, 0.5285702347755432, -0.12940387427806854, -0.11113129556179047, -0.20984967052936554, 0.2522200644016266, -0.270111620426178, 0.004977274686098099, -0.1391531229019165, -0.07524119317531586, -0.17433494329452515, -0.216169536113739, -0.19599737226963043, 0.10436341166496277, 0.26758909225463867, 0.26782679557800293, 0.17319390177726746, -0.2923143804073334, 0.010724801570177078, 0.47458377480506897, 0.08574068546295166, -0.22547230124473572, 0.40084344148635864, 0.328563392162323, -0.098918616771698, 0.024349763989448547, 0.3410249948501587, 0.5116844177246094, 0.5268765687942505, -0.2755410671234131, 0.029622230678796768, 0.09985272586345673, -0.17232230305671692, 0.30093109607696533, 0.12202669680118561, 0.5902810096740723, 0.15899956226348877, 0.13224461674690247, -0.023707885295152664, -0.025082306936383247, 0.23306404054164886, -0.036524731665849686, 0.19096532464027405, 0.0803823173046112, 0.6249299049377441, 0.23981893062591553, -0.3591580092906952, -0.1490706205368042, 0.08431817591190338, -0.43413373827934265, 0.0055404058657586575, 0.46048450469970703, -0.04936549440026283, 0.2880004048347473, -0.0646260529756546, -0.02634381875395775, 0.15817223489284515, 0.627022922039032, 0.23330286145210266, 0.268967866897583, -0.3417344093322754, 0.11560587584972382, -0.32565194368362427, 0.3007262051105499, -0.0014738589525222778, -0.08987283706665039, 0.0791967362165451, 0.0009103883057832718, 0.05939709395170212, 0.1766044795513153, 0.12852975726127625, 0.0768040269613266, -0.14709125459194183, 0.23895077407360077, -0.16914263367652893, 0.024043217301368713, 0.08080330491065979, 0.2279125601053238, -0.05940385162830353, -0.3299914598464966, 0.21753191947937012, 0.10713109374046326, -0.01944708824157715, -0.07325703650712967, 0.05404896289110184, 0.12301917374134064, 0.17308077216148376, 0.10390534996986389, 0.03451996669173241, 0.5826877355575562, 0.12415937334299088, -0.0638267919421196, 0.33055737614631653, -0.11481741815805435, -0.17466172575950623, 0.16456179320812225, 0.2476196438074112, 0.6241387128829956, -0.034346871078014374, 0.25568896532058716, -0.4483467936515808, -0.21278606355190277, -0.026164062321186066, 0.0727958157658577, -0.2580461800098419, 0.23881524801254272, -0.2617340683937073, -0.03231411427259445, 0.32029467821121216, -0.00637827068567276, 0.29820162057876587, 0.09396412968635559, -0.42007339000701904, -0.46412184834480286, 0.3670324683189392, -0.2881052494049072, -0.23062863945960999, -0.1451697051525116, 0.11228126287460327, 0.030780106782913208, 0.08315261453390121, -0.6610732078552246, -0.00985535979270935, 0.33231356739997864, -0.026302434504032135, -0.22136418521404266, -0.12052077054977417, 0.012263543903827667, 0.18510222434997559, -0.0976044088602066, 0.2706553339958191, -0.09607893973588943, -0.0646674856543541, -0.4541105628013611, -0.1759289652109146 ]
https://github.com/huggingface/datasets/issues/469
invalid data type 'str' at _convert_outputs in arrow_dataset.py
> I didn't know tokenizers could return strings in the token ids. Which tokenizer are you using to get this @Doragd ? i'm sorry that i met this issue in another place (not in huggingface repo).
I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str'
36
invalid data type 'str' at _convert_outputs in arrow_dataset.py I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' > I didn't know tokenizers could return strings in the token ids. Which tokenizer are you using to get this @Doragd ? i'm sorry that i met this issue in another place (not in huggingface repo).
[ -0.2228243350982666, 0.024250030517578125, 0.10737118124961853, 0.23030777275562286, 0.5109524130821228, -0.10725949704647064, 0.5323299169540405, 0.07758963108062744, -0.3410608470439911, -0.1247759759426117, 0.036657460033893585, 0.38640740513801575, -0.3696955740451813, 0.04221741855144501, 0.044361136853694916, -0.20246419310569763, -0.08803436905145645, 0.009989947080612183, -0.023253202438354492, -0.05363911762833595, 0.04824294149875641, 0.1829809695482254, -0.1568261831998825, 0.41447770595550537, -0.6451317071914673, -0.1835787445306778, 0.17466366291046143, -0.09639241546392441, -0.0992203801870346, -0.44877856969833374, 0.22027485072612762, -0.10204413533210754, 0.49763670563697815, 0.34723225235939026, -0.00012417118705343455, 0.13803546130657196, 0.10928626358509064, 0.10169446468353271, -0.29087191820144653, -0.30163800716400146, 0.13411536812782288, -0.059384651482105255, 0.4149942100048065, -0.20153960585594177, -0.05718928575515747, -0.26009130477905273, -0.0606258288025856, 0.2617684304714203, 0.38377588987350464, 0.5016975998878479, 0.11732237040996552, 0.168516606092453, 0.24648593366146088, 0.0738130584359169, 0.2595645785331726, 0.3155062198638916, 0.07547719031572342, 0.20712460577487946, 0.016833722591400146, 0.02660575695335865, -0.08569461852312088, 0.07480800151824951, -0.0701286792755127, -0.19977375864982605, 0.21665742993354797, 0.22728313505649567, 0.17457962036132812, -0.14762207865715027, -0.22878491878509521, 0.11988408863544464, 0.43321487307548523, -0.3214257061481476, -0.15594464540481567, 0.00792209804058075, -0.01116220373660326, -0.2727994918823242, -0.006166346371173859, 0.24833130836486816, -0.4277770221233368, 0.16670124232769012, -0.1622595489025116, -0.025467004626989365, -0.37924981117248535, 0.1995561718940735, -0.09251708537340164, 0.5032647848129272, 0.1183696985244751, 0.15681712329387665, 0.1842406541109085, -0.014435797929763794, 0.37171033024787903, 0.08763841539621353, 0.13975456357002258, 0.06214825063943863, -0.31169503927230835, -0.030463719740509987, -0.4463338851928711, -0.6483628153800964, -0.26851406693458557, -0.21252401173114777, 0.16557608544826508, -0.07115226238965988, 0.20472756028175354, 0.20295098423957825, 0.23332171142101288, 0.13880077004432678, -0.21012258529663086, 0.5648381114006042, 0.10009273886680603, -0.15525050461292267, -0.1335459053516388, -0.025088388472795486, -0.3282395303249359, -0.09228960424661636, 0.51212477684021, 0.1628408432006836, 0.125742569565773, -0.005032110959291458, -0.05502255633473396, -0.14883260428905487, -0.2688639760017395, -0.08821742981672287, 0.28471502661705017, 0.18506935238838196, 0.09583508223295212, 0.383220911026001, 0.21541886031627655, 0.1111360415816307, 0.0493779331445694, -0.13524387776851654, 0.035321783274412155, 0.08555580675601959, -0.21797066926956177, -0.11981748789548874, 0.18211247026920319, 0.328197181224823, -0.2699033319950104, 0.12150097638368607, -0.1425367295742035, -0.20853666961193085, 0.0015728343278169632, -0.2935900390148163, -0.005308158695697784, 0.013497207313776016, -0.2574833631515503, 0.30978721380233765, 0.09357541054487228, -0.30359336733818054, 0.0196344256401062, 0.4677716791629791, -0.4638137221336365, -0.4341677129268646, -0.43581998348236084, 0.08996035903692245, 0.3708478808403015, -0.11298727989196777, -0.09231000393629074, 0.0597342774271965, 0.45208659768104553, -0.18882547318935394, 0.1029466912150383, -0.5797590613365173, 0.3521018922328949, -0.015292937867343426, -0.08329898118972778, 0.09054630994796753, -0.4035285413265228, -0.1816476285457611, 0.1696709394454956, -0.15330438315868378, 0.3111136555671692, 0.4423995316028595, -0.3827601671218872, 0.29479190707206726, 0.07952678948640823, 0.01669340580701828, 0.8023694753646851, -0.3571898639202118, -0.21795859932899475, 0.13225501775741577, -0.1704491376876831, -0.3259197473526001, -0.07707256823778152, 0.27369746565818787, 0.09063001722097397, 0.07179848849773407, -0.009403049945831299, 0.39142608642578125, -0.09331489354372025, 0.2531605362892151, -0.3342474102973938, -0.07499298453330994, 0.3700166344642639, 0.3320882022380829, 0.2507387399673462, -0.03353843092918396, 0.06653175503015518, 0.34221649169921875, 0.2596169710159302, -0.14549636840820312, 0.2384001761674881, 0.1618347465991974, 0.018355615437030792, -0.17592434585094452, -0.10522519052028656, -0.1606467068195343, -0.30508825182914734, -0.20202094316482544, -0.3353264629840851, 0.4843737483024597, -0.2394983321428299, 0.08094963431358337, -0.1629115343093872, -0.07293739169836044, -0.11232298612594604, 0.23905333876609802, 0.10807859897613525, 0.08143927901983261, -0.14365501701831818, -0.06898745894432068, -0.10004855692386627, -0.06188845634460449, -0.05237269774079323, 0.18809983134269714, 0.025137510150671005, 0.273226797580719, -0.1691008061170578, -0.1986374855041504, -0.26017487049102783, 0.056433238089084625, 0.25581619143486023, 0.09606218338012695, -0.2582114338874817, 0.2561090588569641, -0.14479181170463562, -0.25812333822250366, -0.30881136655807495, 0.3103082478046417, 0.15541012585163116, -0.525098979473114, 0.03694208338856697, 0.16145092248916626, 0.16632123291492462, -0.08961234986782074, 0.1419675350189209, 0.13636274635791779, 0.06864175200462341, 0.1380072981119156, -0.004035595804452896, 0.3693373501300812, 0.2155342847108841, -0.04095638170838356, 0.26966047286987305, 0.04955346882343292, -0.1201171875, -0.16362608969211578, 0.11930233240127563, 0.031724054366350174, -0.2905440926551819, -0.01962921768426895, 0.4356480538845062, -0.15255548059940338, 0.24142301082611084, 0.44143056869506836, -0.11877451092004776, -0.02535407431423664, -0.18716216087341309, 0.21855847537517548, 0.14080002903938293, -0.026811998337507248, -0.08513778448104858, -0.005383187904953957, -0.2538849115371704, -0.06525127589702606, 0.32963186502456665, -0.12682324647903442, 0.4315139353275299, 0.1532040238380432, 0.2892070412635803, -0.01847049966454506, -0.05140712484717369, -0.2919025123119354, 0.29054778814315796, 0.25433316826820374, -0.2341015338897705, 0.4157406985759735, -0.10252530872821808, -0.21352770924568176, -0.6377742290496826, -0.370678573846817, -0.08373884856700897, -0.13306306302547455, -0.0448601171374321, -0.06303036212921143, 0.16435381770133972, 0.06143708527088165, 0.07716065645217896, -0.06676213443279266, 0.2787646949291229, -0.18456247448921204, 0.10622963309288025, -0.33188343048095703, -0.3990280032157898, -0.019308272749185562, 0.23811903595924377, 0.01827302761375904, -0.11488048732280731, 0.017430061474442482, -0.04646797850728035, -0.07560302317142487, -0.1490141749382019, 0.11283766478300095, -0.014111075550317764, -0.15261493623256683, 0.13773292303085327, -0.02533198893070221, -0.26240742206573486, -0.2278362661600113, 0.32388442754745483, -0.32887333631515503, 0.004554254934191704, 0.45673584938049316, -0.18968376517295837, -0.05533439293503761, -0.05129329487681389, -0.3140721619129181, -0.5814599394798279, -0.05391008034348488, 0.017290960997343063, 0.03430105373263359, 0.3296334743499756, 0.3480423092842102, 0.03077331930398941, 0.1842595785856247, 0.03400534763932228, -0.059799134731292725, 0.08541799336671829, 0.11920242011547089, 0.3146255910396576, -0.03845217823982239, -0.2886621952056885, -0.3471452593803406, -0.11079111695289612, 0.07097993791103363, 0.076214499771595, -0.31931400299072266, 0.12620192766189575, -0.12603668868541718, 0.05120282992720604, -0.29062455892562866, 0.022035542875528336, 0.44809961318969727, 0.11024513095617294, -0.008791616186499596, 0.21246513724327087, 0.013971656560897827, 0.3060881495475769, 0.04166485369205475, 0.2144853174686432, -0.03469390422105789, 0.17872652411460876, -0.04564070701599121, 0.649557888507843, -0.1418001800775528, -0.3859337270259857, 0.17670127749443054, -0.1262180358171463, -0.17933687567710876, -0.009406283497810364, -0.30027642846107483, -0.0031256917864084244, -0.25873127579689026, -0.03538361191749573, 0.0021560192108154297, -0.28549107909202576, -0.32541424036026, -0.1811380386352539, 0.13426680862903595, -0.16325652599334717, -0.328149676322937, 0.3672772943973541, -0.25074198842048645, 0.2550685405731201, -0.15651383996009827, -0.14477238059043884, -0.16692334413528442, -0.4364982843399048, -0.030233096331357956, 0.1978234350681305, -0.2999429404735565, 0.027162590995430946, -0.5152032971382141, -0.23606868088245392, -0.159562885761261, 0.08459784090518951, 0.36667951941490173, 0.5396202802658081, 0.03030094876885414, 0.0349542573094368, 0.08058609068393707, 0.10107050836086273, 0.41064172983169556, 0.18398253619670868, -0.07503210008144379, 0.18558625876903534, 0.16558785736560822, -0.35793718695640564, -0.28352129459381104, -0.5400989651679993, -0.08220421522855759, 0.252880722284317, 0.09672616422176361, -0.28960806131362915, -0.24265091121196747, 0.22253412008285522, 0.04142831265926361, -0.2890585958957672, -0.04357650876045227, 0.01720808818936348, -0.23117280006408691, -0.20426045358181, 0.10622618347406387, 0.20910266041755676, 0.3887908160686493, -0.23060296475887299, -0.10892002284526825, 0.0180641021579504, 0.206056147813797, 0.17588046193122864, -0.01737889088690281, 0.12107253074645996, -0.127263605594635, -0.27190977334976196, -0.28430864214897156, 0.2212008535861969, 0.12467420101165771, 0.4509953260421753, 0.11753076314926147, -0.3715086877346039, 0.18797567486763, -0.05725711211562157, 0.34091249108314514, 0.007405877113342285, -0.11040902882814407, 0.34728294610977173, 0.1715262085199356, 0.3176766633987427, 0.09935886412858963, -0.028953438624739647, 0.2658730447292328, -0.07713177055120468, -0.49497655034065247, -0.041862331330776215, 0.27453359961509705, -0.07302364706993103, -0.0733688473701477, -0.024151399731636047, -0.20947928726673126, -0.26154154539108276, 0.4185970425605774, 0.34211990237236023, 1.0206481218338013, -0.26038026809692383, 0.3446713387966156, 0.10921020060777664, -0.060601361095905304, 0.4950573742389679, -0.15399709343910217, 0.1934899091720581, -0.5524521470069885, 0.04724031314253807, -0.11169160902500153, -0.19717265665531158, -0.17836490273475647, 0.3437044620513916, -0.3830965459346771, 0.13299992680549622, -0.0964835062623024, 0.19605927169322968, 0.14222727715969086, 0.3196293115615845, 0.20939454436302185, -0.20901530981063843, -0.2368236780166626, -0.003560492768883705, -0.4814993143081665, -0.09908878803253174, -0.03797397017478943, -0.28748077154159546, -0.00013608485460281372, -0.3918524980545044, -0.20003613829612732, 0.1904895007610321, -0.29227837920188904, 0.33843570947647095, 0.5059801936149597, -0.10644319653511047, 0.2228132039308548, 0.19872704148292542, 0.3068532347679138, -0.045633409172296524, 0.061189375817775726, -0.27032357454299927, -0.06260349601507187, 0.11660327762365341, -0.05728581175208092, -0.05342845991253853, 0.4100268483161926, -0.04768283665180206, -0.3138560652732849, 0.31783580780029297, 0.014437015168368816, -0.17577125132083893, 0.15726995468139648, -0.06720136106014252, 0.08750476688146591, -0.4117046892642975, 0.2714477479457855, -0.21885764598846436, -0.3185107409954071, -0.2686833143234253, 0.003916498273611069, 0.01892080157995224, -0.12270393967628479, 0.1043698787689209, 0.3181702792644501, 0.01480036973953247, 0.14292556047439575, 0.16663628816604614, 0.29795411229133606, 0.22282752394676208, 0.5636560916900635, 0.31597214937210083, 0.011753451079130173, -0.20831525325775146, 0.13117176294326782, 0.006908731535077095, -0.8838162422180176, 0.19761709868907928, -0.03137989714741707, -0.263752281665802, 0.2123912274837494, 0.3753276765346527, 0.1270444691181183, 0.4987850487232208, -0.17407964169979095, -0.4247027337551117, -0.39737772941589355, 0.006599836051464081, 0.17426320910453796, 0.0011973865330219269, 0.051423221826553345, 0.5306832790374756, 0.19821889698505402, 0.15471778810024261, -0.20497582852840424, 0.18318001925945282, -0.3399917185306549, 0.2554386258125305, -0.11082495748996735, -0.4195614755153656, -0.03815165162086487, 0.12543293833732605, 0.043873608112335205, 0.0017533842474222183, 0.09149228036403656, -0.054967328906059265, -0.18266494572162628, 0.1793142557144165, 0.27356189489364624, -0.20960791409015656, -0.20474006235599518, -0.004651550203561783, -0.021929755806922913, 0.10297423601150513, -0.07299619913101196, 0.007896631956100464, -0.1585477590560913, 0.5496968626976013, -0.0968373566865921, -0.07829437404870987, -0.3212504982948303, 0.03207142651081085, -0.23294571042060852, -0.05529800057411194, 0.17893534898757935, 0.23104993999004364, 0.1414339393377304, -0.1671890914440155, -0.7330247759819031, 0.14692291617393494, 0.28070420026779175, -0.07894859462976456, 0.2824501097202301, -0.6361714601516724, -0.2515561878681183, -0.12406845390796661, 0.05893612653017044, 0.01782260090112686, -0.29064372181892395, -0.11902491748332977, 0.1500854790210724, 0.07920821756124496, -0.22283422946929932, -0.21998156607151031, -0.007125772535800934, -0.15680654346942902, -0.18953202664852142, 0.43883323669433594, 0.050411518663167953, -0.17817264795303345, -0.09514658153057098, 0.020866937935352325, 0.15026025474071503, -0.1083439439535141, 0.0020462279208004475, 0.598039448261261, -0.13318151235580444, -0.029100973159074783, 0.45607033371925354, -0.0017087869346141815, -0.08082712441682816, 0.011111941188573837, -0.24031910300254822, 0.10640930384397507, -0.18647149205207825, 0.02841591089963913, 0.2730586528778076, 0.005315694957971573, -0.16144344210624695, 0.11166629195213318, 0.018033407628536224, -0.14061060547828674, -0.20857980847358704, 0.5285702347755432, -0.12940387427806854, -0.11113129556179047, -0.20984967052936554, 0.2522200644016266, -0.270111620426178, 0.004977274686098099, -0.1391531229019165, -0.07524119317531586, -0.17433494329452515, -0.216169536113739, -0.19599737226963043, 0.10436341166496277, 0.26758909225463867, 0.26782679557800293, 0.17319390177726746, -0.2923143804073334, 0.010724801570177078, 0.47458377480506897, 0.08574068546295166, -0.22547230124473572, 0.40084344148635864, 0.328563392162323, -0.098918616771698, 0.024349763989448547, 0.3410249948501587, 0.5116844177246094, 0.5268765687942505, -0.2755410671234131, 0.029622230678796768, 0.09985272586345673, -0.17232230305671692, 0.30093109607696533, 0.12202669680118561, 0.5902810096740723, 0.15899956226348877, 0.13224461674690247, -0.023707885295152664, -0.025082306936383247, 0.23306404054164886, -0.036524731665849686, 0.19096532464027405, 0.0803823173046112, 0.6249299049377441, 0.23981893062591553, -0.3591580092906952, -0.1490706205368042, 0.08431817591190338, -0.43413373827934265, 0.0055404058657586575, 0.46048450469970703, -0.04936549440026283, 0.2880004048347473, -0.0646260529756546, -0.02634381875395775, 0.15817223489284515, 0.627022922039032, 0.23330286145210266, 0.268967866897583, -0.3417344093322754, 0.11560587584972382, -0.32565194368362427, 0.3007262051105499, -0.0014738589525222778, -0.08987283706665039, 0.0791967362165451, 0.0009103883057832718, 0.05939709395170212, 0.1766044795513153, 0.12852975726127625, 0.0768040269613266, -0.14709125459194183, 0.23895077407360077, -0.16914263367652893, 0.024043217301368713, 0.08080330491065979, 0.2279125601053238, -0.05940385162830353, -0.3299914598464966, 0.21753191947937012, 0.10713109374046326, -0.01944708824157715, -0.07325703650712967, 0.05404896289110184, 0.12301917374134064, 0.17308077216148376, 0.10390534996986389, 0.03451996669173241, 0.5826877355575562, 0.12415937334299088, -0.0638267919421196, 0.33055737614631653, -0.11481741815805435, -0.17466172575950623, 0.16456179320812225, 0.2476196438074112, 0.6241387128829956, -0.034346871078014374, 0.25568896532058716, -0.4483467936515808, -0.21278606355190277, -0.026164062321186066, 0.0727958157658577, -0.2580461800098419, 0.23881524801254272, -0.2617340683937073, -0.03231411427259445, 0.32029467821121216, -0.00637827068567276, 0.29820162057876587, 0.09396412968635559, -0.42007339000701904, -0.46412184834480286, 0.3670324683189392, -0.2881052494049072, -0.23062863945960999, -0.1451697051525116, 0.11228126287460327, 0.030780106782913208, 0.08315261453390121, -0.6610732078552246, -0.00985535979270935, 0.33231356739997864, -0.026302434504032135, -0.22136418521404266, -0.12052077054977417, 0.012263543903827667, 0.18510222434997559, -0.0976044088602066, 0.2706553339958191, -0.09607893973588943, -0.0646674856543541, -0.4541105628013611, -0.1759289652109146 ]
https://github.com/huggingface/datasets/issues/469
invalid data type 'str' at _convert_outputs in arrow_dataset.py
@akhilkapil do you have strings in your dataset ? When you set the dataset format to "pytorch" you should exclude columns with strings as pytorch can't make tensors out of strings
I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str'
31
invalid data type 'str' at _convert_outputs in arrow_dataset.py I trying to build multi label text classifier model using Transformers lib. I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error File "C:\***\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label. Ex: Data Text , Label #Column Header I'm facing an Network issue, 1 I forgot my password, 2 Error StackTrace: File "C:\**\transformers\trainer.py", line 492, in train for step, inputs in enumerate(epoch_iterator): File "C:\**\tqdm\std.py", line 1104, in __iter__ for obj in iterable: File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__ data = self._next_data() File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__ output_all_columns=self._output_all_columns, File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs v = command(v) TypeError: new(): invalid data type 'str' @akhilkapil do you have strings in your dataset ? When you set the dataset format to "pytorch" you should exclude columns with strings as pytorch can't make tensors out of strings
[ -0.2228243350982666, 0.024250030517578125, 0.10737118124961853, 0.23030777275562286, 0.5109524130821228, -0.10725949704647064, 0.5323299169540405, 0.07758963108062744, -0.3410608470439911, -0.1247759759426117, 0.036657460033893585, 0.38640740513801575, -0.3696955740451813, 0.04221741855144501, 0.044361136853694916, -0.20246419310569763, -0.08803436905145645, 0.009989947080612183, -0.023253202438354492, -0.05363911762833595, 0.04824294149875641, 0.1829809695482254, -0.1568261831998825, 0.41447770595550537, -0.6451317071914673, -0.1835787445306778, 0.17466366291046143, -0.09639241546392441, -0.0992203801870346, -0.44877856969833374, 0.22027485072612762, -0.10204413533210754, 0.49763670563697815, 0.34723225235939026, -0.00012417118705343455, 0.13803546130657196, 0.10928626358509064, 0.10169446468353271, -0.29087191820144653, -0.30163800716400146, 0.13411536812782288, -0.059384651482105255, 0.4149942100048065, -0.20153960585594177, -0.05718928575515747, -0.26009130477905273, -0.0606258288025856, 0.2617684304714203, 0.38377588987350464, 0.5016975998878479, 0.11732237040996552, 0.168516606092453, 0.24648593366146088, 0.0738130584359169, 0.2595645785331726, 0.3155062198638916, 0.07547719031572342, 0.20712460577487946, 0.016833722591400146, 0.02660575695335865, -0.08569461852312088, 0.07480800151824951, -0.0701286792755127, -0.19977375864982605, 0.21665742993354797, 0.22728313505649567, 0.17457962036132812, -0.14762207865715027, -0.22878491878509521, 0.11988408863544464, 0.43321487307548523, -0.3214257061481476, -0.15594464540481567, 0.00792209804058075, -0.01116220373660326, -0.2727994918823242, -0.006166346371173859, 0.24833130836486816, -0.4277770221233368, 0.16670124232769012, -0.1622595489025116, -0.025467004626989365, -0.37924981117248535, 0.1995561718940735, -0.09251708537340164, 0.5032647848129272, 0.1183696985244751, 0.15681712329387665, 0.1842406541109085, -0.014435797929763794, 0.37171033024787903, 0.08763841539621353, 0.13975456357002258, 0.06214825063943863, -0.31169503927230835, -0.030463719740509987, -0.4463338851928711, -0.6483628153800964, -0.26851406693458557, -0.21252401173114777, 0.16557608544826508, -0.07115226238965988, 0.20472756028175354, 0.20295098423957825, 0.23332171142101288, 0.13880077004432678, -0.21012258529663086, 0.5648381114006042, 0.10009273886680603, -0.15525050461292267, -0.1335459053516388, -0.025088388472795486, -0.3282395303249359, -0.09228960424661636, 0.51212477684021, 0.1628408432006836, 0.125742569565773, -0.005032110959291458, -0.05502255633473396, -0.14883260428905487, -0.2688639760017395, -0.08821742981672287, 0.28471502661705017, 0.18506935238838196, 0.09583508223295212, 0.383220911026001, 0.21541886031627655, 0.1111360415816307, 0.0493779331445694, -0.13524387776851654, 0.035321783274412155, 0.08555580675601959, -0.21797066926956177, -0.11981748789548874, 0.18211247026920319, 0.328197181224823, -0.2699033319950104, 0.12150097638368607, -0.1425367295742035, -0.20853666961193085, 0.0015728343278169632, -0.2935900390148163, -0.005308158695697784, 0.013497207313776016, -0.2574833631515503, 0.30978721380233765, 0.09357541054487228, -0.30359336733818054, 0.0196344256401062, 0.4677716791629791, -0.4638137221336365, -0.4341677129268646, -0.43581998348236084, 0.08996035903692245, 0.3708478808403015, -0.11298727989196777, -0.09231000393629074, 0.0597342774271965, 0.45208659768104553, -0.18882547318935394, 0.1029466912150383, -0.5797590613365173, 0.3521018922328949, -0.015292937867343426, -0.08329898118972778, 0.09054630994796753, -0.4035285413265228, -0.1816476285457611, 0.1696709394454956, -0.15330438315868378, 0.3111136555671692, 0.4423995316028595, -0.3827601671218872, 0.29479190707206726, 0.07952678948640823, 0.01669340580701828, 0.8023694753646851, -0.3571898639202118, -0.21795859932899475, 0.13225501775741577, -0.1704491376876831, -0.3259197473526001, -0.07707256823778152, 0.27369746565818787, 0.09063001722097397, 0.07179848849773407, -0.009403049945831299, 0.39142608642578125, -0.09331489354372025, 0.2531605362892151, -0.3342474102973938, -0.07499298453330994, 0.3700166344642639, 0.3320882022380829, 0.2507387399673462, -0.03353843092918396, 0.06653175503015518, 0.34221649169921875, 0.2596169710159302, -0.14549636840820312, 0.2384001761674881, 0.1618347465991974, 0.018355615437030792, -0.17592434585094452, -0.10522519052028656, -0.1606467068195343, -0.30508825182914734, -0.20202094316482544, -0.3353264629840851, 0.4843737483024597, -0.2394983321428299, 0.08094963431358337, -0.1629115343093872, -0.07293739169836044, -0.11232298612594604, 0.23905333876609802, 0.10807859897613525, 0.08143927901983261, -0.14365501701831818, -0.06898745894432068, -0.10004855692386627, -0.06188845634460449, -0.05237269774079323, 0.18809983134269714, 0.025137510150671005, 0.273226797580719, -0.1691008061170578, -0.1986374855041504, -0.26017487049102783, 0.056433238089084625, 0.25581619143486023, 0.09606218338012695, -0.2582114338874817, 0.2561090588569641, -0.14479181170463562, -0.25812333822250366, -0.30881136655807495, 0.3103082478046417, 0.15541012585163116, -0.525098979473114, 0.03694208338856697, 0.16145092248916626, 0.16632123291492462, -0.08961234986782074, 0.1419675350189209, 0.13636274635791779, 0.06864175200462341, 0.1380072981119156, -0.004035595804452896, 0.3693373501300812, 0.2155342847108841, -0.04095638170838356, 0.26966047286987305, 0.04955346882343292, -0.1201171875, -0.16362608969211578, 0.11930233240127563, 0.031724054366350174, -0.2905440926551819, -0.01962921768426895, 0.4356480538845062, -0.15255548059940338, 0.24142301082611084, 0.44143056869506836, -0.11877451092004776, -0.02535407431423664, -0.18716216087341309, 0.21855847537517548, 0.14080002903938293, -0.026811998337507248, -0.08513778448104858, -0.005383187904953957, -0.2538849115371704, -0.06525127589702606, 0.32963186502456665, -0.12682324647903442, 0.4315139353275299, 0.1532040238380432, 0.2892070412635803, -0.01847049966454506, -0.05140712484717369, -0.2919025123119354, 0.29054778814315796, 0.25433316826820374, -0.2341015338897705, 0.4157406985759735, -0.10252530872821808, -0.21352770924568176, -0.6377742290496826, -0.370678573846817, -0.08373884856700897, -0.13306306302547455, -0.0448601171374321, -0.06303036212921143, 0.16435381770133972, 0.06143708527088165, 0.07716065645217896, -0.06676213443279266, 0.2787646949291229, -0.18456247448921204, 0.10622963309288025, -0.33188343048095703, -0.3990280032157898, -0.019308272749185562, 0.23811903595924377, 0.01827302761375904, -0.11488048732280731, 0.017430061474442482, -0.04646797850728035, -0.07560302317142487, -0.1490141749382019, 0.11283766478300095, -0.014111075550317764, -0.15261493623256683, 0.13773292303085327, -0.02533198893070221, -0.26240742206573486, -0.2278362661600113, 0.32388442754745483, -0.32887333631515503, 0.004554254934191704, 0.45673584938049316, -0.18968376517295837, -0.05533439293503761, -0.05129329487681389, -0.3140721619129181, -0.5814599394798279, -0.05391008034348488, 0.017290960997343063, 0.03430105373263359, 0.3296334743499756, 0.3480423092842102, 0.03077331930398941, 0.1842595785856247, 0.03400534763932228, -0.059799134731292725, 0.08541799336671829, 0.11920242011547089, 0.3146255910396576, -0.03845217823982239, -0.2886621952056885, -0.3471452593803406, -0.11079111695289612, 0.07097993791103363, 0.076214499771595, -0.31931400299072266, 0.12620192766189575, -0.12603668868541718, 0.05120282992720604, -0.29062455892562866, 0.022035542875528336, 0.44809961318969727, 0.11024513095617294, -0.008791616186499596, 0.21246513724327087, 0.013971656560897827, 0.3060881495475769, 0.04166485369205475, 0.2144853174686432, -0.03469390422105789, 0.17872652411460876, -0.04564070701599121, 0.649557888507843, -0.1418001800775528, -0.3859337270259857, 0.17670127749443054, -0.1262180358171463, -0.17933687567710876, -0.009406283497810364, -0.30027642846107483, -0.0031256917864084244, -0.25873127579689026, -0.03538361191749573, 0.0021560192108154297, -0.28549107909202576, -0.32541424036026, -0.1811380386352539, 0.13426680862903595, -0.16325652599334717, -0.328149676322937, 0.3672772943973541, -0.25074198842048645, 0.2550685405731201, -0.15651383996009827, -0.14477238059043884, -0.16692334413528442, -0.4364982843399048, -0.030233096331357956, 0.1978234350681305, -0.2999429404735565, 0.027162590995430946, -0.5152032971382141, -0.23606868088245392, -0.159562885761261, 0.08459784090518951, 0.36667951941490173, 0.5396202802658081, 0.03030094876885414, 0.0349542573094368, 0.08058609068393707, 0.10107050836086273, 0.41064172983169556, 0.18398253619670868, -0.07503210008144379, 0.18558625876903534, 0.16558785736560822, -0.35793718695640564, -0.28352129459381104, -0.5400989651679993, -0.08220421522855759, 0.252880722284317, 0.09672616422176361, -0.28960806131362915, -0.24265091121196747, 0.22253412008285522, 0.04142831265926361, -0.2890585958957672, -0.04357650876045227, 0.01720808818936348, -0.23117280006408691, -0.20426045358181, 0.10622618347406387, 0.20910266041755676, 0.3887908160686493, -0.23060296475887299, -0.10892002284526825, 0.0180641021579504, 0.206056147813797, 0.17588046193122864, -0.01737889088690281, 0.12107253074645996, -0.127263605594635, -0.27190977334976196, -0.28430864214897156, 0.2212008535861969, 0.12467420101165771, 0.4509953260421753, 0.11753076314926147, -0.3715086877346039, 0.18797567486763, -0.05725711211562157, 0.34091249108314514, 0.007405877113342285, -0.11040902882814407, 0.34728294610977173, 0.1715262085199356, 0.3176766633987427, 0.09935886412858963, -0.028953438624739647, 0.2658730447292328, -0.07713177055120468, -0.49497655034065247, -0.041862331330776215, 0.27453359961509705, -0.07302364706993103, -0.0733688473701477, -0.024151399731636047, -0.20947928726673126, -0.26154154539108276, 0.4185970425605774, 0.34211990237236023, 1.0206481218338013, -0.26038026809692383, 0.3446713387966156, 0.10921020060777664, -0.060601361095905304, 0.4950573742389679, -0.15399709343910217, 0.1934899091720581, -0.5524521470069885, 0.04724031314253807, -0.11169160902500153, -0.19717265665531158, -0.17836490273475647, 0.3437044620513916, -0.3830965459346771, 0.13299992680549622, -0.0964835062623024, 0.19605927169322968, 0.14222727715969086, 0.3196293115615845, 0.20939454436302185, -0.20901530981063843, -0.2368236780166626, -0.003560492768883705, -0.4814993143081665, -0.09908878803253174, -0.03797397017478943, -0.28748077154159546, -0.00013608485460281372, -0.3918524980545044, -0.20003613829612732, 0.1904895007610321, -0.29227837920188904, 0.33843570947647095, 0.5059801936149597, -0.10644319653511047, 0.2228132039308548, 0.19872704148292542, 0.3068532347679138, -0.045633409172296524, 0.061189375817775726, -0.27032357454299927, -0.06260349601507187, 0.11660327762365341, -0.05728581175208092, -0.05342845991253853, 0.4100268483161926, -0.04768283665180206, -0.3138560652732849, 0.31783580780029297, 0.014437015168368816, -0.17577125132083893, 0.15726995468139648, -0.06720136106014252, 0.08750476688146591, -0.4117046892642975, 0.2714477479457855, -0.21885764598846436, -0.3185107409954071, -0.2686833143234253, 0.003916498273611069, 0.01892080157995224, -0.12270393967628479, 0.1043698787689209, 0.3181702792644501, 0.01480036973953247, 0.14292556047439575, 0.16663628816604614, 0.29795411229133606, 0.22282752394676208, 0.5636560916900635, 0.31597214937210083, 0.011753451079130173, -0.20831525325775146, 0.13117176294326782, 0.006908731535077095, -0.8838162422180176, 0.19761709868907928, -0.03137989714741707, -0.263752281665802, 0.2123912274837494, 0.3753276765346527, 0.1270444691181183, 0.4987850487232208, -0.17407964169979095, -0.4247027337551117, -0.39737772941589355, 0.006599836051464081, 0.17426320910453796, 0.0011973865330219269, 0.051423221826553345, 0.5306832790374756, 0.19821889698505402, 0.15471778810024261, -0.20497582852840424, 0.18318001925945282, -0.3399917185306549, 0.2554386258125305, -0.11082495748996735, -0.4195614755153656, -0.03815165162086487, 0.12543293833732605, 0.043873608112335205, 0.0017533842474222183, 0.09149228036403656, -0.054967328906059265, -0.18266494572162628, 0.1793142557144165, 0.27356189489364624, -0.20960791409015656, -0.20474006235599518, -0.004651550203561783, -0.021929755806922913, 0.10297423601150513, -0.07299619913101196, 0.007896631956100464, -0.1585477590560913, 0.5496968626976013, -0.0968373566865921, -0.07829437404870987, -0.3212504982948303, 0.03207142651081085, -0.23294571042060852, -0.05529800057411194, 0.17893534898757935, 0.23104993999004364, 0.1414339393377304, -0.1671890914440155, -0.7330247759819031, 0.14692291617393494, 0.28070420026779175, -0.07894859462976456, 0.2824501097202301, -0.6361714601516724, -0.2515561878681183, -0.12406845390796661, 0.05893612653017044, 0.01782260090112686, -0.29064372181892395, -0.11902491748332977, 0.1500854790210724, 0.07920821756124496, -0.22283422946929932, -0.21998156607151031, -0.007125772535800934, -0.15680654346942902, -0.18953202664852142, 0.43883323669433594, 0.050411518663167953, -0.17817264795303345, -0.09514658153057098, 0.020866937935352325, 0.15026025474071503, -0.1083439439535141, 0.0020462279208004475, 0.598039448261261, -0.13318151235580444, -0.029100973159074783, 0.45607033371925354, -0.0017087869346141815, -0.08082712441682816, 0.011111941188573837, -0.24031910300254822, 0.10640930384397507, -0.18647149205207825, 0.02841591089963913, 0.2730586528778076, 0.005315694957971573, -0.16144344210624695, 0.11166629195213318, 0.018033407628536224, -0.14061060547828674, -0.20857980847358704, 0.5285702347755432, -0.12940387427806854, -0.11113129556179047, -0.20984967052936554, 0.2522200644016266, -0.270111620426178, 0.004977274686098099, -0.1391531229019165, -0.07524119317531586, -0.17433494329452515, -0.216169536113739, -0.19599737226963043, 0.10436341166496277, 0.26758909225463867, 0.26782679557800293, 0.17319390177726746, -0.2923143804073334, 0.010724801570177078, 0.47458377480506897, 0.08574068546295166, -0.22547230124473572, 0.40084344148635864, 0.328563392162323, -0.098918616771698, 0.024349763989448547, 0.3410249948501587, 0.5116844177246094, 0.5268765687942505, -0.2755410671234131, 0.029622230678796768, 0.09985272586345673, -0.17232230305671692, 0.30093109607696533, 0.12202669680118561, 0.5902810096740723, 0.15899956226348877, 0.13224461674690247, -0.023707885295152664, -0.025082306936383247, 0.23306404054164886, -0.036524731665849686, 0.19096532464027405, 0.0803823173046112, 0.6249299049377441, 0.23981893062591553, -0.3591580092906952, -0.1490706205368042, 0.08431817591190338, -0.43413373827934265, 0.0055404058657586575, 0.46048450469970703, -0.04936549440026283, 0.2880004048347473, -0.0646260529756546, -0.02634381875395775, 0.15817223489284515, 0.627022922039032, 0.23330286145210266, 0.268967866897583, -0.3417344093322754, 0.11560587584972382, -0.32565194368362427, 0.3007262051105499, -0.0014738589525222778, -0.08987283706665039, 0.0791967362165451, 0.0009103883057832718, 0.05939709395170212, 0.1766044795513153, 0.12852975726127625, 0.0768040269613266, -0.14709125459194183, 0.23895077407360077, -0.16914263367652893, 0.024043217301368713, 0.08080330491065979, 0.2279125601053238, -0.05940385162830353, -0.3299914598464966, 0.21753191947937012, 0.10713109374046326, -0.01944708824157715, -0.07325703650712967, 0.05404896289110184, 0.12301917374134064, 0.17308077216148376, 0.10390534996986389, 0.03451996669173241, 0.5826877355575562, 0.12415937334299088, -0.0638267919421196, 0.33055737614631653, -0.11481741815805435, -0.17466172575950623, 0.16456179320812225, 0.2476196438074112, 0.6241387128829956, -0.034346871078014374, 0.25568896532058716, -0.4483467936515808, -0.21278606355190277, -0.026164062321186066, 0.0727958157658577, -0.2580461800098419, 0.23881524801254272, -0.2617340683937073, -0.03231411427259445, 0.32029467821121216, -0.00637827068567276, 0.29820162057876587, 0.09396412968635559, -0.42007339000701904, -0.46412184834480286, 0.3670324683189392, -0.2881052494049072, -0.23062863945960999, -0.1451697051525116, 0.11228126287460327, 0.030780106782913208, 0.08315261453390121, -0.6610732078552246, -0.00985535979270935, 0.33231356739997864, -0.026302434504032135, -0.22136418521404266, -0.12052077054977417, 0.012263543903827667, 0.18510222434997559, -0.0976044088602066, 0.2706553339958191, -0.09607893973588943, -0.0646674856543541, -0.4541105628013611, -0.1759289652109146 ]
https://github.com/huggingface/datasets/issues/468
UnicodeDecodeError while loading PAN-X task of XTREME dataset
Indeed. Solution 1 is the simplest. This is actually a recurring problem. I think we should scan all the datasets with regexpr to fix the use of `open()` without encodings. And probably add a test in the CI to forbid using this in the future.
Hi 🤗 team! ## Description of the problem I'm running into a `UnicodeDecodeError` while trying to load the PAN-X subset the XTREME dataset: ``` --------------------------------------------------------------------------- UnicodeDecodeError Traceback (most recent call last) <ipython-input-5-1d61f439b843> in <module> ----> 1 dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data') /usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 528 ignore_verifications = ignore_verifications or save_infos 529 # Download/copy dataset processing script --> 530 module_path, hash = prepare_module(path, download_config=download_config, dataset=True) 531 532 # Get dataset builder class from the processing script /usr/local/lib/python3.6/dist-packages/nlp/load.py in prepare_module(path, download_config, dataset, force_local_path, **download_kwargs) 265 266 # Download external imports if needed --> 267 imports = get_imports(local_path) 268 local_imports = [] 269 library_imports = [] /usr/local/lib/python3.6/dist-packages/nlp/load.py in get_imports(file_path) 156 lines = [] 157 with open(file_path, mode="r") as f: --> 158 lines.extend(f.readlines()) 159 160 logger.info("Checking %s for additional imports.", file_path) /usr/lib/python3.6/encodings/ascii.py in decode(self, input, final) 24 class IncrementalDecoder(codecs.IncrementalDecoder): 25 def decode(self, input, final=False): ---> 26 return codecs.ascii_decode(input, self.errors)[0] 27 28 class StreamWriter(Codec,codecs.StreamWriter): UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 111: ordinal not in range(128) ``` ## Steps to reproduce Install from nlp's master branch ```python pip install git+https://github.com/huggingface/nlp.git ``` then run ```python from nlp import load_dataset # AmazonPhotos.zip is located in data/ dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data') ``` ## OS / platform details - `nlp` version: latest from master - Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyTorch version (GPU?): 1.4.0 (True) - Tensorflow version (GPU?): 2.1.0 (True) - Using GPU in script?: True - Using distributed or parallel set-up in script?: False ## Proposed solution Either change [line 762](https://github.com/huggingface/nlp/blob/7ada00b1d62f94eee22a7df38c6b01e3f27194b7/datasets/xtreme/xtreme.py#L762) in `xtreme.py` to include UTF-8 encoding: ``` # old with open(filepath) as f # new with open(filepath, encoding='utf-8') as f ``` or raise a warning that suggests setting the locale explicitly, e.g. ```python import locale locale.setlocale(locale.LC_ALL, 'C.UTF-8') ``` I have a preference for the first solution. Let me know if you agree and I'll be happy to implement the simple fix!
45
UnicodeDecodeError while loading PAN-X task of XTREME dataset Hi 🤗 team! ## Description of the problem I'm running into a `UnicodeDecodeError` while trying to load the PAN-X subset the XTREME dataset: ``` --------------------------------------------------------------------------- UnicodeDecodeError Traceback (most recent call last) <ipython-input-5-1d61f439b843> in <module> ----> 1 dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data') /usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 528 ignore_verifications = ignore_verifications or save_infos 529 # Download/copy dataset processing script --> 530 module_path, hash = prepare_module(path, download_config=download_config, dataset=True) 531 532 # Get dataset builder class from the processing script /usr/local/lib/python3.6/dist-packages/nlp/load.py in prepare_module(path, download_config, dataset, force_local_path, **download_kwargs) 265 266 # Download external imports if needed --> 267 imports = get_imports(local_path) 268 local_imports = [] 269 library_imports = [] /usr/local/lib/python3.6/dist-packages/nlp/load.py in get_imports(file_path) 156 lines = [] 157 with open(file_path, mode="r") as f: --> 158 lines.extend(f.readlines()) 159 160 logger.info("Checking %s for additional imports.", file_path) /usr/lib/python3.6/encodings/ascii.py in decode(self, input, final) 24 class IncrementalDecoder(codecs.IncrementalDecoder): 25 def decode(self, input, final=False): ---> 26 return codecs.ascii_decode(input, self.errors)[0] 27 28 class StreamWriter(Codec,codecs.StreamWriter): UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 111: ordinal not in range(128) ``` ## Steps to reproduce Install from nlp's master branch ```python pip install git+https://github.com/huggingface/nlp.git ``` then run ```python from nlp import load_dataset # AmazonPhotos.zip is located in data/ dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data') ``` ## OS / platform details - `nlp` version: latest from master - Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyTorch version (GPU?): 1.4.0 (True) - Tensorflow version (GPU?): 2.1.0 (True) - Using GPU in script?: True - Using distributed or parallel set-up in script?: False ## Proposed solution Either change [line 762](https://github.com/huggingface/nlp/blob/7ada00b1d62f94eee22a7df38c6b01e3f27194b7/datasets/xtreme/xtreme.py#L762) in `xtreme.py` to include UTF-8 encoding: ``` # old with open(filepath) as f # new with open(filepath, encoding='utf-8') as f ``` or raise a warning that suggests setting the locale explicitly, e.g. ```python import locale locale.setlocale(locale.LC_ALL, 'C.UTF-8') ``` I have a preference for the first solution. Let me know if you agree and I'll be happy to implement the simple fix! Indeed. Solution 1 is the simplest. This is actually a recurring problem. I think we should scan all the datasets with regexpr to fix the use of `open()` without encodings. And probably add a test in the CI to forbid using this in the future.
[ -0.3326016664505005, -0.09301018714904785, -0.1336478739976883, 0.2554299831390381, 0.35217469930648804, -0.02775009721517563, 0.22498254477977753, 0.349646657705307, -0.028698645532131195, 0.038228847086429596, -0.090410977602005, 0.15027901530265808, -0.07617440819740295, -0.1970365196466446, 0.189105823636055, -0.24670270085334778, -0.07382719963788986, 0.18245789408683777, 0.107805997133255, 0.006992131471633911, -0.355888307094574, 0.11441344022750854, -0.18699580430984497, 0.26370978355407715, -0.37714821100234985, 0.0810823142528534, 0.29786550998687744, 0.32046493887901306, -0.19328036904335022, -0.6116119027137756, 0.413036584854126, -0.05366385355591774, 0.4325031042098999, 0.3163447678089142, -0.00010860412294277921, 0.0825856477022171, 0.3929113745689392, -0.13196930289268494, -0.3346783220767975, -0.19399841129779816, -0.5915243029594421, -0.1812518984079361, -0.009823587723076344, -0.25958824157714844, 0.1902402937412262, 0.05620751902461052, -0.06423573195934296, -0.383046418428421, 0.1811341494321823, 0.2071898728609085, 0.24163873493671417, 0.3705643117427826, 0.021338585764169693, 0.0912286788225174, -0.045574285089969635, 0.10742667317390442, -0.15425564348697662, 0.24941964447498322, 0.4346233606338501, 0.06277524679899216, -0.01914871484041214, 0.2926935851573944, -0.048616331070661545, 0.24812042713165283, -0.10235583037137985, 0.13064584136009216, 0.1399906724691391, -0.4660046398639679, 0.113483726978302, 0.0036376304924488068, 0.27187424898147583, -0.36644455790519714, -0.28655827045440674, -0.22526448965072632, -0.10946997255086899, -0.5443429350852966, 0.2644946873188019, 0.09056469053030014, -0.15965935587882996, -0.021132666617631912, 0.11315891891717911, -0.04238774999976158, -0.17351914942264557, 0.0391211062669754, 0.054360583424568176, 0.3878195285797119, -0.06007387489080429, -0.05132221430540085, -0.0941750705242157, -0.1786016970872879, 0.4082854688167572, -0.14587876200675964, -0.1436944454908371, 0.3246290385723114, -0.28636378049850464, 0.07242212444543839, -0.05504665523767471, -0.3371765613555908, 0.066815584897995, -0.04631040245294571, -0.07882335036993027, 0.2744792699813843, -0.04955476149916649, 0.05319615453481674, 0.309305876493454, 0.15567533671855927, 0.20950764417648315, 0.22455653548240662, 0.18349871039390564, 0.19822368025779724, 0.08294370770454407, -0.0012047290802001953, -0.17585399746894836, -0.17713217437267303, 0.36548417806625366, 0.19347181916236877, 0.5531738996505737, -0.31916043162345886, -0.12211543321609497, 0.008483701385557652, 0.17288532853126526, -0.17872481048107147, 0.044403716921806335, 0.014408551156520844, 0.22232972085475922, 0.5070403218269348, -0.22240707278251648, 0.2185739427804947, -0.46227461099624634, -0.12834671139717102, -0.13588999211788177, 0.17961061000823975, -0.14607833325862885, -0.07831251621246338, 0.09638933837413788, 0.12528850138187408, 0.16314458847045898, -0.14224109053611755, 0.35790735483169556, -0.06938101351261139, 0.039650462567806244, -0.20392873883247375, -0.22019562125205994, 0.013781700283288956, 0.13078361749649048, 0.10396253317594528, 0.05515046417713165, -0.1753351092338562, -0.03696782886981964, 0.21710985898971558, -0.1871834397315979, -0.20701052248477936, -0.07155430316925049, 0.26298239827156067, 0.026773814111948013, 0.02515368163585663, -0.41346725821495056, -0.08873647451400757, 0.3430742025375366, 0.06208815798163414, 0.11399035155773163, -0.2957775592803955, 0.040441807359457016, -0.08587665110826492, 0.2037120759487152, 0.34305280447006226, -0.13216379284858704, 0.04646310210227966, 0.1779048889875412, -0.15501180291175842, 0.22462892532348633, 0.29674461483955383, -0.19222794473171234, 0.09375421702861786, -0.09892157465219498, 0.5539207458496094, 0.5879896879196167, -0.4102403521537781, -0.4520798325538635, 0.1696794629096985, -0.2588971257209778, 0.19520056247711182, -0.11641503125429153, 0.10705607384443283, 0.3267490565776825, -0.11743206530809402, 0.30661994218826294, 0.6193350553512573, -0.11055119335651398, 0.1110309436917305, -0.21586385369300842, 0.024581922218203545, 0.0014838464558124542, 0.27852508425712585, 0.2359108328819275, -0.19382047653198242, 0.11450514197349548, 0.26417943835258484, 0.2436515986919403, -0.3050071895122528, 0.1434532254934311, 0.27761971950531006, 0.09951117634773254, 0.050675809383392334, -0.1596451997756958, -0.3252394199371338, -0.2702022194862366, 0.2318236231803894, -0.1383482962846756, 0.10854695737361908, -0.37143850326538086, 0.040146224200725555, -0.2963207960128784, 0.04479379951953888, -0.5638591647148132, -0.12139365077018738, 0.1630701720714569, 0.20128197968006134, 0.07950986921787262, 0.06130826845765114, -0.30850833654403687, 0.27930617332458496, -0.10502637922763824, -0.05655418708920479, -0.5994651913642883, 0.25911983847618103, -0.06749384850263596, -0.3134041130542755, -0.07478576898574829, 0.32253342866897583, 0.08286849409341812, -0.13502037525177002, -0.33673983812332153, 0.27879711985588074, -0.08552524447441101, 0.014384515583515167, 0.06644348800182343, -0.17046691477298737, 0.24252064526081085, -0.42109376192092896, 0.16162905097007751, 0.07192611694335938, 0.12785370647907257, 0.015131108462810516, 0.14680427312850952, 0.3288502097129822, 0.009638888761401176, 0.00022099167108535767, -0.002229541540145874, -0.04264398291707039, 0.4274255633354187, -0.002032361924648285, 0.08647016435861588, -0.25726062059402466, 0.23397508263587952, -0.023823171854019165, 0.16265708208084106, -0.056380242109298706, -0.19473128020763397, -0.08841525763273239, 0.5688626170158386, -0.13657130300998688, 0.196164071559906, 0.12719984352588654, -0.022312209010124207, 0.09121869504451752, -0.08031119406223297, 0.016140881925821304, 0.2614575922489166, 0.01819567382335663, 0.055570099502801895, 0.006880659610033035, 0.10758935660123825, 0.029094893485307693, 0.14123839139938354, -0.0843672901391983, -0.0864124447107315, -0.07107684761285782, -0.08670349419116974, -0.03006628528237343, -0.33355873823165894, -0.1923588216304779, -0.10553666204214096, 0.3316012918949127, -0.16600264608860016, -0.05351940914988518, -0.17444270849227905, -0.19153043627738953, 0.037373121827840805, -0.1773095726966858, -0.16402460634708405, -0.2362438589334488, -0.23185963928699493, 0.02553577348589897, 0.12546829879283905, 0.32209688425064087, -0.4353741705417633, -0.3569757342338562, 0.12765546143054962, -0.3397229015827179, 0.03162158280611038, -0.2119201421737671, -0.2546372413635254, 0.10599640011787415, 0.3112902045249939, 0.17804783582687378, 0.07554148137569427, -0.38968878984451294, 0.11556866765022278, -0.24738922715187073, -0.0755903497338295, 0.05932816118001938, -0.3163173198699951, 0.1726507544517517, -0.03935788571834564, 0.08392214775085449, -0.05629690736532211, -0.18118757009506226, 0.29167184233665466, -0.23339961469173431, -0.1716853827238083, 0.20625831186771393, 0.0019382371101528406, -0.19655928015708923, 0.002421785145998001, -0.11964917927980423, -0.32808586955070496, -0.3669333755970001, 0.0012900829315185547, -0.07779845595359802, 0.18527893722057343, 0.14429666101932526, -0.2602294087409973, -0.11823489516973495, 0.11433707177639008, -0.13347388803958893, -0.15365895628929138, -0.4095715582370758, 0.48747408390045166, -0.37228429317474365, -0.21433435380458832, -0.02190151810646057, -0.17569305002689362, 0.4781990647315979, 0.130803182721138, -0.22841089963912964, -0.002828415483236313, -0.32693642377853394, 0.29392382502555847, 0.007002700120210648, 0.018922746181488037, 0.13988357782363892, 0.0004283948801457882, 0.0058591049164533615, 0.04151862859725952, -0.05404352769255638, -0.19609925150871277, 0.27664631605148315, 0.1708439290523529, 0.10095503181219101, 0.3835441768169403, -0.12196826934814453, 0.1801290512084961, -0.04923483729362488, 0.3242916762828827, 0.5478320717811584, 0.09550164639949799, 0.0651271641254425, -0.023380011320114136, -0.42218053340911865, -0.048958878964185715, -0.055107101798057556, 0.04864101856946945, 0.007995612919330597, -0.03251465782523155, -0.10515693575143814, -0.071055568754673, -0.18580998480319977, -0.15421776473522186, -0.26815658807754517, 0.14978821575641632, -0.24034416675567627, 0.24493920803070068, -0.1164385974407196, 0.007653981447219849, -0.3299103081226349, 0.02378515526652336, -0.07131941616535187, 0.1350255012512207, 0.21469254791736603, 0.07934661954641342, -0.19520176947116852, 0.36819353699684143, -0.4347120523452759, 0.09981543570756912, 0.3249461054801941, 0.7038307189941406, 0.03269660845398903, 0.05393914133310318, 0.041440416127443314, -0.04729270190000534, -0.057715073227882385, -0.1116308942437172, 0.15587586164474487, 0.1666964888572693, -0.22094883024692535, -0.24022184312343597, -0.039599042385816574, -0.10526864975690842, 0.3003044128417969, 0.22276267409324646, -0.035433053970336914, -0.34227028489112854, -0.10957273840904236, 0.3165021538734436, 0.18252450227737427, -0.1780322939157486, -0.040058840066194534, -0.4110570549964905, -0.5928242206573486, -0.41348502039909363, 0.04321487993001938, 0.2406066507101059, 0.4273463189601898, 0.33781635761260986, 0.16509830951690674, -0.2048252820968628, -0.2078792154788971, 0.22172406315803528, 0.3031235337257385, 0.09479015320539474, 0.06851156800985336, 0.07181952893733978, -0.23382332921028137, -0.394233763217926, 0.1363058239221573, 0.5306164026260376, 0.10898473858833313, -0.7092863321304321, -0.078453429043293, -0.20329426229000092, 0.2511306405067444, 0.05987616628408432, -0.05416947975754738, 0.11218832433223724, -0.1826990395784378, 0.09386339783668518, 0.043719060719013214, 0.10918471217155457, 0.14487506449222565, 0.21288377046585083, -0.6021425724029541, -0.4522860646247864, 0.19718769192695618, 0.016385119408369064, 0.295274555683136, 0.3392176926136017, -0.16427908837795258, -0.3164372444152832, -0.08954792469739914, 0.1628364473581314, 0.5518419146537781, 0.04991624876856804, 0.11469285190105438, 0.3466673195362091, 0.0413421094417572, 0.05824102461338043, 0.0459604486823082, 0.18356597423553467, -0.20966345071792603, -0.2382662445306778, -0.05437972769141197, -0.025275982916355133, 0.16580793261528015, -0.05431421846151352, 0.08720126748085022, 0.2775231599807739, 0.07343325018882751, 0.03513255715370178, 0.24590936303138733, 0.19846393167972565, -0.27469953894615173, -0.4539569318294525, -0.5819104909896851, 0.15325233340263367, -0.3220197558403015, -0.03099777176976204, -0.196727454662323, -0.2522434592247009, 0.026723865419626236, -0.22272494435310364, 0.04419530928134918, 0.2248591184616089, -0.15571387112140656, 0.2739739418029785, -0.16501642763614655, -0.5444099307060242, 0.20623189210891724, 0.08807139843702316, 0.3015844225883484, -0.07060059905052185, 0.13508117198944092, 0.17312946915626526, 0.1769673377275467, -0.021634621545672417, -0.08284512907266617, -0.025375042110681534, 0.01739676669239998, -0.03103146329522133, -0.24992898106575012, 0.06988640129566193, -0.0188625305891037, -0.35666173696517944, -0.22131723165512085, 0.20036789774894714, -0.0024182572960853577, -0.08731698244810104, -0.2053954005241394, -0.19939300417900085, 0.01750633865594864, -0.18964873254299164, 0.1594204306602478, 0.062167637050151825, -0.23429414629936218, 0.08306383341550827, 0.03206126019358635, -0.3447245955467224, 0.018339797854423523, 0.09498986601829529, 0.17935949563980103, -0.40320268273353577, 0.5781170129776001, 0.10798530280590057, -0.08765523135662079, -0.12300597131252289, 0.05097681283950806, 0.1880110204219818, -0.5171361565589905, 0.04440778121352196, -0.006968316622078419, 0.09803587198257446, -0.1275510936975479, 0.09850399941205978, 0.01087428629398346, -0.09612902253866196, 0.16773638129234314, -0.41631919145584106, -0.5901718139648438, 0.11634546518325806, -0.12011659145355225, 0.21328650414943695, 0.08907953649759293, 0.14830653369426727, -0.1083182692527771, -0.04774099588394165, -0.30425065755844116, 0.11322098970413208, -0.31677788496017456, 0.2198818176984787, 0.2084016352891922, -0.07896416634321213, 0.04661007598042488, 0.055028464645147324, 0.20114316046237946, 0.3281203508377075, -0.07663939148187637, -0.19023847579956055, 0.03406139835715294, 0.08731182664632797, -0.08670438826084137, -0.45762985944747925, -0.01823534443974495, 0.22221992909908295, -0.05974288657307625, -0.13535930216312408, 0.1167742908000946, 0.18542057275772095, -0.06264849007129669, 0.07207118719816208, 0.1372980922460556, 0.10723020136356354, -0.12613776326179504, 0.2981199324131012, -0.20956331491470337, 0.4348076581954956, 0.03867236524820328, 0.2651926875114441, 0.08830706030130386, 0.07211792469024658, -0.23118507862091064, -0.10483188182115555, 0.11809860169887543, 0.18147125840187073, 0.14326241612434387, -0.5272974967956543, 0.17888081073760986, 0.2601991593837738, -0.046118706464767456, 0.37600892782211304, -0.1835515946149826, -0.01653875969350338, 0.12088977545499802, 0.24170269072055817, -0.14114604890346527, -0.06865895539522171, 0.3440251350402832, -0.21444430947303772, 0.00010650232434272766, 0.44602441787719727, 0.15173181891441345, 0.11513644456863403, 0.2358342558145523, 0.10733213275671005, 0.2825598418712616, -0.006899792701005936, 0.2959382236003876, 0.47516369819641113, -0.10158592462539673, -0.04765292629599571, 0.23228532075881958, 0.13435649871826172, 0.018418043851852417, 0.6424040198326111, -0.4427729845046997, 0.53534996509552, -0.05050428956747055, 0.2583879828453064, -0.32247206568717957, -0.3795403838157654, -0.2869466245174408, -0.16316336393356323, -0.014801844954490662, 0.23669743537902832, 0.16034838557243347, -0.32388609647750854, -0.18912945687770844, 0.004872751422226429, -0.04392492398619652, 0.16545860469341278, -0.22765889763832092, 0.13106153905391693, -0.05016680806875229, -0.018656596541404724, -0.13771989941596985, -0.01875637285411358, 0.011309150606393814, 0.18847739696502686, -0.03821885585784912, 0.23339775204658508, -0.10125723481178284, -0.0860913097858429, 0.1590765118598938, 0.2796645164489746, -0.06504138559103012, -0.26434439420700073, 0.46347370743751526, 0.5010713934898376, -0.011483244597911835, -0.020964689552783966, 0.18908573687076569, 0.357421875, 0.43471866846084595, -0.22350473701953888, 0.10345873236656189, 0.0009245183318853378, 0.018582182005047798, 0.05001351237297058, 0.14360743761062622, 0.01405564695596695, 0.683559000492096, 0.1786804497241974, 0.2524064779281616, -0.1252032369375229, -0.016752921044826508, 0.0970182716846466, -0.2486758530139923, 0.03302755579352379, 0.26611536741256714, 0.1370357871055603, -0.03237355127930641, -0.2701374590396881, -0.09492339938879013, -0.2792065143585205, 0.006541910581290722, 0.38469329476356506, 0.021352989599108696, 0.10605417937040329, -0.13153207302093506, 0.07637843489646912, 0.002045039087533951, 0.4745557904243469, 0.34034526348114014, -0.014447487890720367, -0.30348268151283264, -0.20724856853485107, -0.7285962104797363, 0.194360613822937, -0.19841495156288147, -0.32850176095962524, 0.24970833957195282, -0.0827103927731514, -0.0733969435095787, 0.3360483646392822, 0.2181289792060852, 0.3987618088722229, 0.07366078346967697, 0.13134336471557617, -0.317384272813797, -0.03503158316016197, 0.44393759965896606, 0.07822886109352112, -0.08435706049203873, -0.34023648500442505, 0.10982872545719147, 0.07426697015762329, 0.10897909849882126, -0.19356867671012878, -0.02078961953520775, -0.06904418766498566, -0.1324373483657837, 0.3674139678478241, 0.2805417776107788, 0.39301741123199463, -0.1928330361843109, -0.12261734157800674, -0.1714542657136917, -0.31763920187950134, -0.08104865252971649, 0.3091637194156647, 0.08836302161216736, 0.5725011825561523, 0.010407129302620888, -0.08740736544132233, -0.6893695592880249, 0.3223954737186432, -0.13011258840560913, 0.0926094725728035, 0.00337357260286808, 0.14715826511383057, -0.07454990595579147, 0.06257107853889465, 0.006927468813955784, 0.1489863097667694, 0.04574839398264885, 0.4057678282260895, -0.170919269323349, -0.5643856525421143, 0.3966760039329529, -0.08558787405490875, -0.6857149600982666, -0.11039236187934875, 0.010793425142765045, -0.02882656455039978, -0.0517251193523407, -0.35399866104125977, 0.30045971274375916, 0.23698022961616516, -0.007976643741130829, -0.17234951257705688, 0.20726744830608368, 0.032172657549381256, 0.04026306793093681, -0.004320546984672546, 0.4464663863182068, -0.11061864346265793, -0.06295491009950638, 0.13786813616752625, -0.2023233026266098 ]
https://github.com/huggingface/datasets/issues/468
UnicodeDecodeError while loading PAN-X task of XTREME dataset
I've created a simple function that seems to do the trick: ```python def apply_encoding_on_file_open(filepath: str): """Apply UTF-8 encoding for all instances where a non-binary file is opened.""" with open(filepath, 'r', encoding='utf-8') as input_file: regexp = re.compile(r""" (?!.*\b(?:encoding|rb|wb|wb+|ab|ab+)\b) (open) \((.*)\) """) input_text = input_file.read() match = regexp.search(input_text) if match: print('Found match!', match.group()) # append utf-8 encoding to matching groups in-place output = regexp.sub(lambda m: m.group()[:-1]+', encoding="utf-8")', input_text) with open(filepath, 'w', encoding='utf-8') as output_file: output_file.write(output) else: print("No match found!") ``` The regexp does a negative lookahead to avoid matching on cases where the encoding is already specified or when binary files are involved. From an implementation perspective: * Would it make sense to include this function in `nlp-cli` so that we can run something like ``` nlp-cli fix_encoding path/to/folder ``` and the command recursively fixes all files in the target? * What is the desired behaviour in the CI test? Here we could either have a simple script that we run as a `job` in the CI and raises an error if a missing encoding is detected. Alternatively we could incorporate this behaviour into the CLI and run that in the CI. Please let me know what you prefer among the alternatives.
Hi 🤗 team! ## Description of the problem I'm running into a `UnicodeDecodeError` while trying to load the PAN-X subset the XTREME dataset: ``` --------------------------------------------------------------------------- UnicodeDecodeError Traceback (most recent call last) <ipython-input-5-1d61f439b843> in <module> ----> 1 dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data') /usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 528 ignore_verifications = ignore_verifications or save_infos 529 # Download/copy dataset processing script --> 530 module_path, hash = prepare_module(path, download_config=download_config, dataset=True) 531 532 # Get dataset builder class from the processing script /usr/local/lib/python3.6/dist-packages/nlp/load.py in prepare_module(path, download_config, dataset, force_local_path, **download_kwargs) 265 266 # Download external imports if needed --> 267 imports = get_imports(local_path) 268 local_imports = [] 269 library_imports = [] /usr/local/lib/python3.6/dist-packages/nlp/load.py in get_imports(file_path) 156 lines = [] 157 with open(file_path, mode="r") as f: --> 158 lines.extend(f.readlines()) 159 160 logger.info("Checking %s for additional imports.", file_path) /usr/lib/python3.6/encodings/ascii.py in decode(self, input, final) 24 class IncrementalDecoder(codecs.IncrementalDecoder): 25 def decode(self, input, final=False): ---> 26 return codecs.ascii_decode(input, self.errors)[0] 27 28 class StreamWriter(Codec,codecs.StreamWriter): UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 111: ordinal not in range(128) ``` ## Steps to reproduce Install from nlp's master branch ```python pip install git+https://github.com/huggingface/nlp.git ``` then run ```python from nlp import load_dataset # AmazonPhotos.zip is located in data/ dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data') ``` ## OS / platform details - `nlp` version: latest from master - Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyTorch version (GPU?): 1.4.0 (True) - Tensorflow version (GPU?): 2.1.0 (True) - Using GPU in script?: True - Using distributed or parallel set-up in script?: False ## Proposed solution Either change [line 762](https://github.com/huggingface/nlp/blob/7ada00b1d62f94eee22a7df38c6b01e3f27194b7/datasets/xtreme/xtreme.py#L762) in `xtreme.py` to include UTF-8 encoding: ``` # old with open(filepath) as f # new with open(filepath, encoding='utf-8') as f ``` or raise a warning that suggests setting the locale explicitly, e.g. ```python import locale locale.setlocale(locale.LC_ALL, 'C.UTF-8') ``` I have a preference for the first solution. Let me know if you agree and I'll be happy to implement the simple fix!
200
UnicodeDecodeError while loading PAN-X task of XTREME dataset Hi 🤗 team! ## Description of the problem I'm running into a `UnicodeDecodeError` while trying to load the PAN-X subset the XTREME dataset: ``` --------------------------------------------------------------------------- UnicodeDecodeError Traceback (most recent call last) <ipython-input-5-1d61f439b843> in <module> ----> 1 dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data') /usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 528 ignore_verifications = ignore_verifications or save_infos 529 # Download/copy dataset processing script --> 530 module_path, hash = prepare_module(path, download_config=download_config, dataset=True) 531 532 # Get dataset builder class from the processing script /usr/local/lib/python3.6/dist-packages/nlp/load.py in prepare_module(path, download_config, dataset, force_local_path, **download_kwargs) 265 266 # Download external imports if needed --> 267 imports = get_imports(local_path) 268 local_imports = [] 269 library_imports = [] /usr/local/lib/python3.6/dist-packages/nlp/load.py in get_imports(file_path) 156 lines = [] 157 with open(file_path, mode="r") as f: --> 158 lines.extend(f.readlines()) 159 160 logger.info("Checking %s for additional imports.", file_path) /usr/lib/python3.6/encodings/ascii.py in decode(self, input, final) 24 class IncrementalDecoder(codecs.IncrementalDecoder): 25 def decode(self, input, final=False): ---> 26 return codecs.ascii_decode(input, self.errors)[0] 27 28 class StreamWriter(Codec,codecs.StreamWriter): UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 111: ordinal not in range(128) ``` ## Steps to reproduce Install from nlp's master branch ```python pip install git+https://github.com/huggingface/nlp.git ``` then run ```python from nlp import load_dataset # AmazonPhotos.zip is located in data/ dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data') ``` ## OS / platform details - `nlp` version: latest from master - Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyTorch version (GPU?): 1.4.0 (True) - Tensorflow version (GPU?): 2.1.0 (True) - Using GPU in script?: True - Using distributed or parallel set-up in script?: False ## Proposed solution Either change [line 762](https://github.com/huggingface/nlp/blob/7ada00b1d62f94eee22a7df38c6b01e3f27194b7/datasets/xtreme/xtreme.py#L762) in `xtreme.py` to include UTF-8 encoding: ``` # old with open(filepath) as f # new with open(filepath, encoding='utf-8') as f ``` or raise a warning that suggests setting the locale explicitly, e.g. ```python import locale locale.setlocale(locale.LC_ALL, 'C.UTF-8') ``` I have a preference for the first solution. Let me know if you agree and I'll be happy to implement the simple fix! I've created a simple function that seems to do the trick: ```python def apply_encoding_on_file_open(filepath: str): """Apply UTF-8 encoding for all instances where a non-binary file is opened.""" with open(filepath, 'r', encoding='utf-8') as input_file: regexp = re.compile(r""" (?!.*\b(?:encoding|rb|wb|wb+|ab|ab+)\b) (open) \((.*)\) """) input_text = input_file.read() match = regexp.search(input_text) if match: print('Found match!', match.group()) # append utf-8 encoding to matching groups in-place output = regexp.sub(lambda m: m.group()[:-1]+', encoding="utf-8")', input_text) with open(filepath, 'w', encoding='utf-8') as output_file: output_file.write(output) else: print("No match found!") ``` The regexp does a negative lookahead to avoid matching on cases where the encoding is already specified or when binary files are involved. From an implementation perspective: * Would it make sense to include this function in `nlp-cli` so that we can run something like ``` nlp-cli fix_encoding path/to/folder ``` and the command recursively fixes all files in the target? * What is the desired behaviour in the CI test? Here we could either have a simple script that we run as a `job` in the CI and raises an error if a missing encoding is detected. Alternatively we could incorporate this behaviour into the CLI and run that in the CI. Please let me know what you prefer among the alternatives.
[ -0.3326016664505005, -0.09301018714904785, -0.1336478739976883, 0.2554299831390381, 0.35217469930648804, -0.02775009721517563, 0.22498254477977753, 0.349646657705307, -0.028698645532131195, 0.038228847086429596, -0.090410977602005, 0.15027901530265808, -0.07617440819740295, -0.1970365196466446, 0.189105823636055, -0.24670270085334778, -0.07382719963788986, 0.18245789408683777, 0.107805997133255, 0.006992131471633911, -0.355888307094574, 0.11441344022750854, -0.18699580430984497, 0.26370978355407715, -0.37714821100234985, 0.0810823142528534, 0.29786550998687744, 0.32046493887901306, -0.19328036904335022, -0.6116119027137756, 0.413036584854126, -0.05366385355591774, 0.4325031042098999, 0.3163447678089142, -0.00010860412294277921, 0.0825856477022171, 0.3929113745689392, -0.13196930289268494, -0.3346783220767975, -0.19399841129779816, -0.5915243029594421, -0.1812518984079361, -0.009823587723076344, -0.25958824157714844, 0.1902402937412262, 0.05620751902461052, -0.06423573195934296, -0.383046418428421, 0.1811341494321823, 0.2071898728609085, 0.24163873493671417, 0.3705643117427826, 0.021338585764169693, 0.0912286788225174, -0.045574285089969635, 0.10742667317390442, -0.15425564348697662, 0.24941964447498322, 0.4346233606338501, 0.06277524679899216, -0.01914871484041214, 0.2926935851573944, -0.048616331070661545, 0.24812042713165283, -0.10235583037137985, 0.13064584136009216, 0.1399906724691391, -0.4660046398639679, 0.113483726978302, 0.0036376304924488068, 0.27187424898147583, -0.36644455790519714, -0.28655827045440674, -0.22526448965072632, -0.10946997255086899, -0.5443429350852966, 0.2644946873188019, 0.09056469053030014, -0.15965935587882996, -0.021132666617631912, 0.11315891891717911, -0.04238774999976158, -0.17351914942264557, 0.0391211062669754, 0.054360583424568176, 0.3878195285797119, -0.06007387489080429, -0.05132221430540085, -0.0941750705242157, -0.1786016970872879, 0.4082854688167572, -0.14587876200675964, -0.1436944454908371, 0.3246290385723114, -0.28636378049850464, 0.07242212444543839, -0.05504665523767471, -0.3371765613555908, 0.066815584897995, -0.04631040245294571, -0.07882335036993027, 0.2744792699813843, -0.04955476149916649, 0.05319615453481674, 0.309305876493454, 0.15567533671855927, 0.20950764417648315, 0.22455653548240662, 0.18349871039390564, 0.19822368025779724, 0.08294370770454407, -0.0012047290802001953, -0.17585399746894836, -0.17713217437267303, 0.36548417806625366, 0.19347181916236877, 0.5531738996505737, -0.31916043162345886, -0.12211543321609497, 0.008483701385557652, 0.17288532853126526, -0.17872481048107147, 0.044403716921806335, 0.014408551156520844, 0.22232972085475922, 0.5070403218269348, -0.22240707278251648, 0.2185739427804947, -0.46227461099624634, -0.12834671139717102, -0.13588999211788177, 0.17961061000823975, -0.14607833325862885, -0.07831251621246338, 0.09638933837413788, 0.12528850138187408, 0.16314458847045898, -0.14224109053611755, 0.35790735483169556, -0.06938101351261139, 0.039650462567806244, -0.20392873883247375, -0.22019562125205994, 0.013781700283288956, 0.13078361749649048, 0.10396253317594528, 0.05515046417713165, -0.1753351092338562, -0.03696782886981964, 0.21710985898971558, -0.1871834397315979, -0.20701052248477936, -0.07155430316925049, 0.26298239827156067, 0.026773814111948013, 0.02515368163585663, -0.41346725821495056, -0.08873647451400757, 0.3430742025375366, 0.06208815798163414, 0.11399035155773163, -0.2957775592803955, 0.040441807359457016, -0.08587665110826492, 0.2037120759487152, 0.34305280447006226, -0.13216379284858704, 0.04646310210227966, 0.1779048889875412, -0.15501180291175842, 0.22462892532348633, 0.29674461483955383, -0.19222794473171234, 0.09375421702861786, -0.09892157465219498, 0.5539207458496094, 0.5879896879196167, -0.4102403521537781, -0.4520798325538635, 0.1696794629096985, -0.2588971257209778, 0.19520056247711182, -0.11641503125429153, 0.10705607384443283, 0.3267490565776825, -0.11743206530809402, 0.30661994218826294, 0.6193350553512573, -0.11055119335651398, 0.1110309436917305, -0.21586385369300842, 0.024581922218203545, 0.0014838464558124542, 0.27852508425712585, 0.2359108328819275, -0.19382047653198242, 0.11450514197349548, 0.26417943835258484, 0.2436515986919403, -0.3050071895122528, 0.1434532254934311, 0.27761971950531006, 0.09951117634773254, 0.050675809383392334, -0.1596451997756958, -0.3252394199371338, -0.2702022194862366, 0.2318236231803894, -0.1383482962846756, 0.10854695737361908, -0.37143850326538086, 0.040146224200725555, -0.2963207960128784, 0.04479379951953888, -0.5638591647148132, -0.12139365077018738, 0.1630701720714569, 0.20128197968006134, 0.07950986921787262, 0.06130826845765114, -0.30850833654403687, 0.27930617332458496, -0.10502637922763824, -0.05655418708920479, -0.5994651913642883, 0.25911983847618103, -0.06749384850263596, -0.3134041130542755, -0.07478576898574829, 0.32253342866897583, 0.08286849409341812, -0.13502037525177002, -0.33673983812332153, 0.27879711985588074, -0.08552524447441101, 0.014384515583515167, 0.06644348800182343, -0.17046691477298737, 0.24252064526081085, -0.42109376192092896, 0.16162905097007751, 0.07192611694335938, 0.12785370647907257, 0.015131108462810516, 0.14680427312850952, 0.3288502097129822, 0.009638888761401176, 0.00022099167108535767, -0.002229541540145874, -0.04264398291707039, 0.4274255633354187, -0.002032361924648285, 0.08647016435861588, -0.25726062059402466, 0.23397508263587952, -0.023823171854019165, 0.16265708208084106, -0.056380242109298706, -0.19473128020763397, -0.08841525763273239, 0.5688626170158386, -0.13657130300998688, 0.196164071559906, 0.12719984352588654, -0.022312209010124207, 0.09121869504451752, -0.08031119406223297, 0.016140881925821304, 0.2614575922489166, 0.01819567382335663, 0.055570099502801895, 0.006880659610033035, 0.10758935660123825, 0.029094893485307693, 0.14123839139938354, -0.0843672901391983, -0.0864124447107315, -0.07107684761285782, -0.08670349419116974, -0.03006628528237343, -0.33355873823165894, -0.1923588216304779, -0.10553666204214096, 0.3316012918949127, -0.16600264608860016, -0.05351940914988518, -0.17444270849227905, -0.19153043627738953, 0.037373121827840805, -0.1773095726966858, -0.16402460634708405, -0.2362438589334488, -0.23185963928699493, 0.02553577348589897, 0.12546829879283905, 0.32209688425064087, -0.4353741705417633, -0.3569757342338562, 0.12765546143054962, -0.3397229015827179, 0.03162158280611038, -0.2119201421737671, -0.2546372413635254, 0.10599640011787415, 0.3112902045249939, 0.17804783582687378, 0.07554148137569427, -0.38968878984451294, 0.11556866765022278, -0.24738922715187073, -0.0755903497338295, 0.05932816118001938, -0.3163173198699951, 0.1726507544517517, -0.03935788571834564, 0.08392214775085449, -0.05629690736532211, -0.18118757009506226, 0.29167184233665466, -0.23339961469173431, -0.1716853827238083, 0.20625831186771393, 0.0019382371101528406, -0.19655928015708923, 0.002421785145998001, -0.11964917927980423, -0.32808586955070496, -0.3669333755970001, 0.0012900829315185547, -0.07779845595359802, 0.18527893722057343, 0.14429666101932526, -0.2602294087409973, -0.11823489516973495, 0.11433707177639008, -0.13347388803958893, -0.15365895628929138, -0.4095715582370758, 0.48747408390045166, -0.37228429317474365, -0.21433435380458832, -0.02190151810646057, -0.17569305002689362, 0.4781990647315979, 0.130803182721138, -0.22841089963912964, -0.002828415483236313, -0.32693642377853394, 0.29392382502555847, 0.007002700120210648, 0.018922746181488037, 0.13988357782363892, 0.0004283948801457882, 0.0058591049164533615, 0.04151862859725952, -0.05404352769255638, -0.19609925150871277, 0.27664631605148315, 0.1708439290523529, 0.10095503181219101, 0.3835441768169403, -0.12196826934814453, 0.1801290512084961, -0.04923483729362488, 0.3242916762828827, 0.5478320717811584, 0.09550164639949799, 0.0651271641254425, -0.023380011320114136, -0.42218053340911865, -0.048958878964185715, -0.055107101798057556, 0.04864101856946945, 0.007995612919330597, -0.03251465782523155, -0.10515693575143814, -0.071055568754673, -0.18580998480319977, -0.15421776473522186, -0.26815658807754517, 0.14978821575641632, -0.24034416675567627, 0.24493920803070068, -0.1164385974407196, 0.007653981447219849, -0.3299103081226349, 0.02378515526652336, -0.07131941616535187, 0.1350255012512207, 0.21469254791736603, 0.07934661954641342, -0.19520176947116852, 0.36819353699684143, -0.4347120523452759, 0.09981543570756912, 0.3249461054801941, 0.7038307189941406, 0.03269660845398903, 0.05393914133310318, 0.041440416127443314, -0.04729270190000534, -0.057715073227882385, -0.1116308942437172, 0.15587586164474487, 0.1666964888572693, -0.22094883024692535, -0.24022184312343597, -0.039599042385816574, -0.10526864975690842, 0.3003044128417969, 0.22276267409324646, -0.035433053970336914, -0.34227028489112854, -0.10957273840904236, 0.3165021538734436, 0.18252450227737427, -0.1780322939157486, -0.040058840066194534, -0.4110570549964905, -0.5928242206573486, -0.41348502039909363, 0.04321487993001938, 0.2406066507101059, 0.4273463189601898, 0.33781635761260986, 0.16509830951690674, -0.2048252820968628, -0.2078792154788971, 0.22172406315803528, 0.3031235337257385, 0.09479015320539474, 0.06851156800985336, 0.07181952893733978, -0.23382332921028137, -0.394233763217926, 0.1363058239221573, 0.5306164026260376, 0.10898473858833313, -0.7092863321304321, -0.078453429043293, -0.20329426229000092, 0.2511306405067444, 0.05987616628408432, -0.05416947975754738, 0.11218832433223724, -0.1826990395784378, 0.09386339783668518, 0.043719060719013214, 0.10918471217155457, 0.14487506449222565, 0.21288377046585083, -0.6021425724029541, -0.4522860646247864, 0.19718769192695618, 0.016385119408369064, 0.295274555683136, 0.3392176926136017, -0.16427908837795258, -0.3164372444152832, -0.08954792469739914, 0.1628364473581314, 0.5518419146537781, 0.04991624876856804, 0.11469285190105438, 0.3466673195362091, 0.0413421094417572, 0.05824102461338043, 0.0459604486823082, 0.18356597423553467, -0.20966345071792603, -0.2382662445306778, -0.05437972769141197, -0.025275982916355133, 0.16580793261528015, -0.05431421846151352, 0.08720126748085022, 0.2775231599807739, 0.07343325018882751, 0.03513255715370178, 0.24590936303138733, 0.19846393167972565, -0.27469953894615173, -0.4539569318294525, -0.5819104909896851, 0.15325233340263367, -0.3220197558403015, -0.03099777176976204, -0.196727454662323, -0.2522434592247009, 0.026723865419626236, -0.22272494435310364, 0.04419530928134918, 0.2248591184616089, -0.15571387112140656, 0.2739739418029785, -0.16501642763614655, -0.5444099307060242, 0.20623189210891724, 0.08807139843702316, 0.3015844225883484, -0.07060059905052185, 0.13508117198944092, 0.17312946915626526, 0.1769673377275467, -0.021634621545672417, -0.08284512907266617, -0.025375042110681534, 0.01739676669239998, -0.03103146329522133, -0.24992898106575012, 0.06988640129566193, -0.0188625305891037, -0.35666173696517944, -0.22131723165512085, 0.20036789774894714, -0.0024182572960853577, -0.08731698244810104, -0.2053954005241394, -0.19939300417900085, 0.01750633865594864, -0.18964873254299164, 0.1594204306602478, 0.062167637050151825, -0.23429414629936218, 0.08306383341550827, 0.03206126019358635, -0.3447245955467224, 0.018339797854423523, 0.09498986601829529, 0.17935949563980103, -0.40320268273353577, 0.5781170129776001, 0.10798530280590057, -0.08765523135662079, -0.12300597131252289, 0.05097681283950806, 0.1880110204219818, -0.5171361565589905, 0.04440778121352196, -0.006968316622078419, 0.09803587198257446, -0.1275510936975479, 0.09850399941205978, 0.01087428629398346, -0.09612902253866196, 0.16773638129234314, -0.41631919145584106, -0.5901718139648438, 0.11634546518325806, -0.12011659145355225, 0.21328650414943695, 0.08907953649759293, 0.14830653369426727, -0.1083182692527771, -0.04774099588394165, -0.30425065755844116, 0.11322098970413208, -0.31677788496017456, 0.2198818176984787, 0.2084016352891922, -0.07896416634321213, 0.04661007598042488, 0.055028464645147324, 0.20114316046237946, 0.3281203508377075, -0.07663939148187637, -0.19023847579956055, 0.03406139835715294, 0.08731182664632797, -0.08670438826084137, -0.45762985944747925, -0.01823534443974495, 0.22221992909908295, -0.05974288657307625, -0.13535930216312408, 0.1167742908000946, 0.18542057275772095, -0.06264849007129669, 0.07207118719816208, 0.1372980922460556, 0.10723020136356354, -0.12613776326179504, 0.2981199324131012, -0.20956331491470337, 0.4348076581954956, 0.03867236524820328, 0.2651926875114441, 0.08830706030130386, 0.07211792469024658, -0.23118507862091064, -0.10483188182115555, 0.11809860169887543, 0.18147125840187073, 0.14326241612434387, -0.5272974967956543, 0.17888081073760986, 0.2601991593837738, -0.046118706464767456, 0.37600892782211304, -0.1835515946149826, -0.01653875969350338, 0.12088977545499802, 0.24170269072055817, -0.14114604890346527, -0.06865895539522171, 0.3440251350402832, -0.21444430947303772, 0.00010650232434272766, 0.44602441787719727, 0.15173181891441345, 0.11513644456863403, 0.2358342558145523, 0.10733213275671005, 0.2825598418712616, -0.006899792701005936, 0.2959382236003876, 0.47516369819641113, -0.10158592462539673, -0.04765292629599571, 0.23228532075881958, 0.13435649871826172, 0.018418043851852417, 0.6424040198326111, -0.4427729845046997, 0.53534996509552, -0.05050428956747055, 0.2583879828453064, -0.32247206568717957, -0.3795403838157654, -0.2869466245174408, -0.16316336393356323, -0.014801844954490662, 0.23669743537902832, 0.16034838557243347, -0.32388609647750854, -0.18912945687770844, 0.004872751422226429, -0.04392492398619652, 0.16545860469341278, -0.22765889763832092, 0.13106153905391693, -0.05016680806875229, -0.018656596541404724, -0.13771989941596985, -0.01875637285411358, 0.011309150606393814, 0.18847739696502686, -0.03821885585784912, 0.23339775204658508, -0.10125723481178284, -0.0860913097858429, 0.1590765118598938, 0.2796645164489746, -0.06504138559103012, -0.26434439420700073, 0.46347370743751526, 0.5010713934898376, -0.011483244597911835, -0.020964689552783966, 0.18908573687076569, 0.357421875, 0.43471866846084595, -0.22350473701953888, 0.10345873236656189, 0.0009245183318853378, 0.018582182005047798, 0.05001351237297058, 0.14360743761062622, 0.01405564695596695, 0.683559000492096, 0.1786804497241974, 0.2524064779281616, -0.1252032369375229, -0.016752921044826508, 0.0970182716846466, -0.2486758530139923, 0.03302755579352379, 0.26611536741256714, 0.1370357871055603, -0.03237355127930641, -0.2701374590396881, -0.09492339938879013, -0.2792065143585205, 0.006541910581290722, 0.38469329476356506, 0.021352989599108696, 0.10605417937040329, -0.13153207302093506, 0.07637843489646912, 0.002045039087533951, 0.4745557904243469, 0.34034526348114014, -0.014447487890720367, -0.30348268151283264, -0.20724856853485107, -0.7285962104797363, 0.194360613822937, -0.19841495156288147, -0.32850176095962524, 0.24970833957195282, -0.0827103927731514, -0.0733969435095787, 0.3360483646392822, 0.2181289792060852, 0.3987618088722229, 0.07366078346967697, 0.13134336471557617, -0.317384272813797, -0.03503158316016197, 0.44393759965896606, 0.07822886109352112, -0.08435706049203873, -0.34023648500442505, 0.10982872545719147, 0.07426697015762329, 0.10897909849882126, -0.19356867671012878, -0.02078961953520775, -0.06904418766498566, -0.1324373483657837, 0.3674139678478241, 0.2805417776107788, 0.39301741123199463, -0.1928330361843109, -0.12261734157800674, -0.1714542657136917, -0.31763920187950134, -0.08104865252971649, 0.3091637194156647, 0.08836302161216736, 0.5725011825561523, 0.010407129302620888, -0.08740736544132233, -0.6893695592880249, 0.3223954737186432, -0.13011258840560913, 0.0926094725728035, 0.00337357260286808, 0.14715826511383057, -0.07454990595579147, 0.06257107853889465, 0.006927468813955784, 0.1489863097667694, 0.04574839398264885, 0.4057678282260895, -0.170919269323349, -0.5643856525421143, 0.3966760039329529, -0.08558787405490875, -0.6857149600982666, -0.11039236187934875, 0.010793425142765045, -0.02882656455039978, -0.0517251193523407, -0.35399866104125977, 0.30045971274375916, 0.23698022961616516, -0.007976643741130829, -0.17234951257705688, 0.20726744830608368, 0.032172657549381256, 0.04026306793093681, -0.004320546984672546, 0.4464663863182068, -0.11061864346265793, -0.06295491009950638, 0.13786813616752625, -0.2023233026266098 ]
https://github.com/huggingface/datasets/issues/468
UnicodeDecodeError while loading PAN-X task of XTREME dataset
I realised I was overthinking the problem, so decided to just run the regexp over the codebase and make the PR. In other words, we can ignore my comments about using the CLI 😸
Hi 🤗 team! ## Description of the problem I'm running into a `UnicodeDecodeError` while trying to load the PAN-X subset the XTREME dataset: ``` --------------------------------------------------------------------------- UnicodeDecodeError Traceback (most recent call last) <ipython-input-5-1d61f439b843> in <module> ----> 1 dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data') /usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 528 ignore_verifications = ignore_verifications or save_infos 529 # Download/copy dataset processing script --> 530 module_path, hash = prepare_module(path, download_config=download_config, dataset=True) 531 532 # Get dataset builder class from the processing script /usr/local/lib/python3.6/dist-packages/nlp/load.py in prepare_module(path, download_config, dataset, force_local_path, **download_kwargs) 265 266 # Download external imports if needed --> 267 imports = get_imports(local_path) 268 local_imports = [] 269 library_imports = [] /usr/local/lib/python3.6/dist-packages/nlp/load.py in get_imports(file_path) 156 lines = [] 157 with open(file_path, mode="r") as f: --> 158 lines.extend(f.readlines()) 159 160 logger.info("Checking %s for additional imports.", file_path) /usr/lib/python3.6/encodings/ascii.py in decode(self, input, final) 24 class IncrementalDecoder(codecs.IncrementalDecoder): 25 def decode(self, input, final=False): ---> 26 return codecs.ascii_decode(input, self.errors)[0] 27 28 class StreamWriter(Codec,codecs.StreamWriter): UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 111: ordinal not in range(128) ``` ## Steps to reproduce Install from nlp's master branch ```python pip install git+https://github.com/huggingface/nlp.git ``` then run ```python from nlp import load_dataset # AmazonPhotos.zip is located in data/ dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data') ``` ## OS / platform details - `nlp` version: latest from master - Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyTorch version (GPU?): 1.4.0 (True) - Tensorflow version (GPU?): 2.1.0 (True) - Using GPU in script?: True - Using distributed or parallel set-up in script?: False ## Proposed solution Either change [line 762](https://github.com/huggingface/nlp/blob/7ada00b1d62f94eee22a7df38c6b01e3f27194b7/datasets/xtreme/xtreme.py#L762) in `xtreme.py` to include UTF-8 encoding: ``` # old with open(filepath) as f # new with open(filepath, encoding='utf-8') as f ``` or raise a warning that suggests setting the locale explicitly, e.g. ```python import locale locale.setlocale(locale.LC_ALL, 'C.UTF-8') ``` I have a preference for the first solution. Let me know if you agree and I'll be happy to implement the simple fix!
34
UnicodeDecodeError while loading PAN-X task of XTREME dataset Hi 🤗 team! ## Description of the problem I'm running into a `UnicodeDecodeError` while trying to load the PAN-X subset the XTREME dataset: ``` --------------------------------------------------------------------------- UnicodeDecodeError Traceback (most recent call last) <ipython-input-5-1d61f439b843> in <module> ----> 1 dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data') /usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 528 ignore_verifications = ignore_verifications or save_infos 529 # Download/copy dataset processing script --> 530 module_path, hash = prepare_module(path, download_config=download_config, dataset=True) 531 532 # Get dataset builder class from the processing script /usr/local/lib/python3.6/dist-packages/nlp/load.py in prepare_module(path, download_config, dataset, force_local_path, **download_kwargs) 265 266 # Download external imports if needed --> 267 imports = get_imports(local_path) 268 local_imports = [] 269 library_imports = [] /usr/local/lib/python3.6/dist-packages/nlp/load.py in get_imports(file_path) 156 lines = [] 157 with open(file_path, mode="r") as f: --> 158 lines.extend(f.readlines()) 159 160 logger.info("Checking %s for additional imports.", file_path) /usr/lib/python3.6/encodings/ascii.py in decode(self, input, final) 24 class IncrementalDecoder(codecs.IncrementalDecoder): 25 def decode(self, input, final=False): ---> 26 return codecs.ascii_decode(input, self.errors)[0] 27 28 class StreamWriter(Codec,codecs.StreamWriter): UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 111: ordinal not in range(128) ``` ## Steps to reproduce Install from nlp's master branch ```python pip install git+https://github.com/huggingface/nlp.git ``` then run ```python from nlp import load_dataset # AmazonPhotos.zip is located in data/ dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data') ``` ## OS / platform details - `nlp` version: latest from master - Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyTorch version (GPU?): 1.4.0 (True) - Tensorflow version (GPU?): 2.1.0 (True) - Using GPU in script?: True - Using distributed or parallel set-up in script?: False ## Proposed solution Either change [line 762](https://github.com/huggingface/nlp/blob/7ada00b1d62f94eee22a7df38c6b01e3f27194b7/datasets/xtreme/xtreme.py#L762) in `xtreme.py` to include UTF-8 encoding: ``` # old with open(filepath) as f # new with open(filepath, encoding='utf-8') as f ``` or raise a warning that suggests setting the locale explicitly, e.g. ```python import locale locale.setlocale(locale.LC_ALL, 'C.UTF-8') ``` I have a preference for the first solution. Let me know if you agree and I'll be happy to implement the simple fix! I realised I was overthinking the problem, so decided to just run the regexp over the codebase and make the PR. In other words, we can ignore my comments about using the CLI 😸
[ -0.3326016664505005, -0.09301018714904785, -0.1336478739976883, 0.2554299831390381, 0.35217469930648804, -0.02775009721517563, 0.22498254477977753, 0.349646657705307, -0.028698645532131195, 0.038228847086429596, -0.090410977602005, 0.15027901530265808, -0.07617440819740295, -0.1970365196466446, 0.189105823636055, -0.24670270085334778, -0.07382719963788986, 0.18245789408683777, 0.107805997133255, 0.006992131471633911, -0.355888307094574, 0.11441344022750854, -0.18699580430984497, 0.26370978355407715, -0.37714821100234985, 0.0810823142528534, 0.29786550998687744, 0.32046493887901306, -0.19328036904335022, -0.6116119027137756, 0.413036584854126, -0.05366385355591774, 0.4325031042098999, 0.3163447678089142, -0.00010860412294277921, 0.0825856477022171, 0.3929113745689392, -0.13196930289268494, -0.3346783220767975, -0.19399841129779816, -0.5915243029594421, -0.1812518984079361, -0.009823587723076344, -0.25958824157714844, 0.1902402937412262, 0.05620751902461052, -0.06423573195934296, -0.383046418428421, 0.1811341494321823, 0.2071898728609085, 0.24163873493671417, 0.3705643117427826, 0.021338585764169693, 0.0912286788225174, -0.045574285089969635, 0.10742667317390442, -0.15425564348697662, 0.24941964447498322, 0.4346233606338501, 0.06277524679899216, -0.01914871484041214, 0.2926935851573944, -0.048616331070661545, 0.24812042713165283, -0.10235583037137985, 0.13064584136009216, 0.1399906724691391, -0.4660046398639679, 0.113483726978302, 0.0036376304924488068, 0.27187424898147583, -0.36644455790519714, -0.28655827045440674, -0.22526448965072632, -0.10946997255086899, -0.5443429350852966, 0.2644946873188019, 0.09056469053030014, -0.15965935587882996, -0.021132666617631912, 0.11315891891717911, -0.04238774999976158, -0.17351914942264557, 0.0391211062669754, 0.054360583424568176, 0.3878195285797119, -0.06007387489080429, -0.05132221430540085, -0.0941750705242157, -0.1786016970872879, 0.4082854688167572, -0.14587876200675964, -0.1436944454908371, 0.3246290385723114, -0.28636378049850464, 0.07242212444543839, -0.05504665523767471, -0.3371765613555908, 0.066815584897995, -0.04631040245294571, -0.07882335036993027, 0.2744792699813843, -0.04955476149916649, 0.05319615453481674, 0.309305876493454, 0.15567533671855927, 0.20950764417648315, 0.22455653548240662, 0.18349871039390564, 0.19822368025779724, 0.08294370770454407, -0.0012047290802001953, -0.17585399746894836, -0.17713217437267303, 0.36548417806625366, 0.19347181916236877, 0.5531738996505737, -0.31916043162345886, -0.12211543321609497, 0.008483701385557652, 0.17288532853126526, -0.17872481048107147, 0.044403716921806335, 0.014408551156520844, 0.22232972085475922, 0.5070403218269348, -0.22240707278251648, 0.2185739427804947, -0.46227461099624634, -0.12834671139717102, -0.13588999211788177, 0.17961061000823975, -0.14607833325862885, -0.07831251621246338, 0.09638933837413788, 0.12528850138187408, 0.16314458847045898, -0.14224109053611755, 0.35790735483169556, -0.06938101351261139, 0.039650462567806244, -0.20392873883247375, -0.22019562125205994, 0.013781700283288956, 0.13078361749649048, 0.10396253317594528, 0.05515046417713165, -0.1753351092338562, -0.03696782886981964, 0.21710985898971558, -0.1871834397315979, -0.20701052248477936, -0.07155430316925049, 0.26298239827156067, 0.026773814111948013, 0.02515368163585663, -0.41346725821495056, -0.08873647451400757, 0.3430742025375366, 0.06208815798163414, 0.11399035155773163, -0.2957775592803955, 0.040441807359457016, -0.08587665110826492, 0.2037120759487152, 0.34305280447006226, -0.13216379284858704, 0.04646310210227966, 0.1779048889875412, -0.15501180291175842, 0.22462892532348633, 0.29674461483955383, -0.19222794473171234, 0.09375421702861786, -0.09892157465219498, 0.5539207458496094, 0.5879896879196167, -0.4102403521537781, -0.4520798325538635, 0.1696794629096985, -0.2588971257209778, 0.19520056247711182, -0.11641503125429153, 0.10705607384443283, 0.3267490565776825, -0.11743206530809402, 0.30661994218826294, 0.6193350553512573, -0.11055119335651398, 0.1110309436917305, -0.21586385369300842, 0.024581922218203545, 0.0014838464558124542, 0.27852508425712585, 0.2359108328819275, -0.19382047653198242, 0.11450514197349548, 0.26417943835258484, 0.2436515986919403, -0.3050071895122528, 0.1434532254934311, 0.27761971950531006, 0.09951117634773254, 0.050675809383392334, -0.1596451997756958, -0.3252394199371338, -0.2702022194862366, 0.2318236231803894, -0.1383482962846756, 0.10854695737361908, -0.37143850326538086, 0.040146224200725555, -0.2963207960128784, 0.04479379951953888, -0.5638591647148132, -0.12139365077018738, 0.1630701720714569, 0.20128197968006134, 0.07950986921787262, 0.06130826845765114, -0.30850833654403687, 0.27930617332458496, -0.10502637922763824, -0.05655418708920479, -0.5994651913642883, 0.25911983847618103, -0.06749384850263596, -0.3134041130542755, -0.07478576898574829, 0.32253342866897583, 0.08286849409341812, -0.13502037525177002, -0.33673983812332153, 0.27879711985588074, -0.08552524447441101, 0.014384515583515167, 0.06644348800182343, -0.17046691477298737, 0.24252064526081085, -0.42109376192092896, 0.16162905097007751, 0.07192611694335938, 0.12785370647907257, 0.015131108462810516, 0.14680427312850952, 0.3288502097129822, 0.009638888761401176, 0.00022099167108535767, -0.002229541540145874, -0.04264398291707039, 0.4274255633354187, -0.002032361924648285, 0.08647016435861588, -0.25726062059402466, 0.23397508263587952, -0.023823171854019165, 0.16265708208084106, -0.056380242109298706, -0.19473128020763397, -0.08841525763273239, 0.5688626170158386, -0.13657130300998688, 0.196164071559906, 0.12719984352588654, -0.022312209010124207, 0.09121869504451752, -0.08031119406223297, 0.016140881925821304, 0.2614575922489166, 0.01819567382335663, 0.055570099502801895, 0.006880659610033035, 0.10758935660123825, 0.029094893485307693, 0.14123839139938354, -0.0843672901391983, -0.0864124447107315, -0.07107684761285782, -0.08670349419116974, -0.03006628528237343, -0.33355873823165894, -0.1923588216304779, -0.10553666204214096, 0.3316012918949127, -0.16600264608860016, -0.05351940914988518, -0.17444270849227905, -0.19153043627738953, 0.037373121827840805, -0.1773095726966858, -0.16402460634708405, -0.2362438589334488, -0.23185963928699493, 0.02553577348589897, 0.12546829879283905, 0.32209688425064087, -0.4353741705417633, -0.3569757342338562, 0.12765546143054962, -0.3397229015827179, 0.03162158280611038, -0.2119201421737671, -0.2546372413635254, 0.10599640011787415, 0.3112902045249939, 0.17804783582687378, 0.07554148137569427, -0.38968878984451294, 0.11556866765022278, -0.24738922715187073, -0.0755903497338295, 0.05932816118001938, -0.3163173198699951, 0.1726507544517517, -0.03935788571834564, 0.08392214775085449, -0.05629690736532211, -0.18118757009506226, 0.29167184233665466, -0.23339961469173431, -0.1716853827238083, 0.20625831186771393, 0.0019382371101528406, -0.19655928015708923, 0.002421785145998001, -0.11964917927980423, -0.32808586955070496, -0.3669333755970001, 0.0012900829315185547, -0.07779845595359802, 0.18527893722057343, 0.14429666101932526, -0.2602294087409973, -0.11823489516973495, 0.11433707177639008, -0.13347388803958893, -0.15365895628929138, -0.4095715582370758, 0.48747408390045166, -0.37228429317474365, -0.21433435380458832, -0.02190151810646057, -0.17569305002689362, 0.4781990647315979, 0.130803182721138, -0.22841089963912964, -0.002828415483236313, -0.32693642377853394, 0.29392382502555847, 0.007002700120210648, 0.018922746181488037, 0.13988357782363892, 0.0004283948801457882, 0.0058591049164533615, 0.04151862859725952, -0.05404352769255638, -0.19609925150871277, 0.27664631605148315, 0.1708439290523529, 0.10095503181219101, 0.3835441768169403, -0.12196826934814453, 0.1801290512084961, -0.04923483729362488, 0.3242916762828827, 0.5478320717811584, 0.09550164639949799, 0.0651271641254425, -0.023380011320114136, -0.42218053340911865, -0.048958878964185715, -0.055107101798057556, 0.04864101856946945, 0.007995612919330597, -0.03251465782523155, -0.10515693575143814, -0.071055568754673, -0.18580998480319977, -0.15421776473522186, -0.26815658807754517, 0.14978821575641632, -0.24034416675567627, 0.24493920803070068, -0.1164385974407196, 0.007653981447219849, -0.3299103081226349, 0.02378515526652336, -0.07131941616535187, 0.1350255012512207, 0.21469254791736603, 0.07934661954641342, -0.19520176947116852, 0.36819353699684143, -0.4347120523452759, 0.09981543570756912, 0.3249461054801941, 0.7038307189941406, 0.03269660845398903, 0.05393914133310318, 0.041440416127443314, -0.04729270190000534, -0.057715073227882385, -0.1116308942437172, 0.15587586164474487, 0.1666964888572693, -0.22094883024692535, -0.24022184312343597, -0.039599042385816574, -0.10526864975690842, 0.3003044128417969, 0.22276267409324646, -0.035433053970336914, -0.34227028489112854, -0.10957273840904236, 0.3165021538734436, 0.18252450227737427, -0.1780322939157486, -0.040058840066194534, -0.4110570549964905, -0.5928242206573486, -0.41348502039909363, 0.04321487993001938, 0.2406066507101059, 0.4273463189601898, 0.33781635761260986, 0.16509830951690674, -0.2048252820968628, -0.2078792154788971, 0.22172406315803528, 0.3031235337257385, 0.09479015320539474, 0.06851156800985336, 0.07181952893733978, -0.23382332921028137, -0.394233763217926, 0.1363058239221573, 0.5306164026260376, 0.10898473858833313, -0.7092863321304321, -0.078453429043293, -0.20329426229000092, 0.2511306405067444, 0.05987616628408432, -0.05416947975754738, 0.11218832433223724, -0.1826990395784378, 0.09386339783668518, 0.043719060719013214, 0.10918471217155457, 0.14487506449222565, 0.21288377046585083, -0.6021425724029541, -0.4522860646247864, 0.19718769192695618, 0.016385119408369064, 0.295274555683136, 0.3392176926136017, -0.16427908837795258, -0.3164372444152832, -0.08954792469739914, 0.1628364473581314, 0.5518419146537781, 0.04991624876856804, 0.11469285190105438, 0.3466673195362091, 0.0413421094417572, 0.05824102461338043, 0.0459604486823082, 0.18356597423553467, -0.20966345071792603, -0.2382662445306778, -0.05437972769141197, -0.025275982916355133, 0.16580793261528015, -0.05431421846151352, 0.08720126748085022, 0.2775231599807739, 0.07343325018882751, 0.03513255715370178, 0.24590936303138733, 0.19846393167972565, -0.27469953894615173, -0.4539569318294525, -0.5819104909896851, 0.15325233340263367, -0.3220197558403015, -0.03099777176976204, -0.196727454662323, -0.2522434592247009, 0.026723865419626236, -0.22272494435310364, 0.04419530928134918, 0.2248591184616089, -0.15571387112140656, 0.2739739418029785, -0.16501642763614655, -0.5444099307060242, 0.20623189210891724, 0.08807139843702316, 0.3015844225883484, -0.07060059905052185, 0.13508117198944092, 0.17312946915626526, 0.1769673377275467, -0.021634621545672417, -0.08284512907266617, -0.025375042110681534, 0.01739676669239998, -0.03103146329522133, -0.24992898106575012, 0.06988640129566193, -0.0188625305891037, -0.35666173696517944, -0.22131723165512085, 0.20036789774894714, -0.0024182572960853577, -0.08731698244810104, -0.2053954005241394, -0.19939300417900085, 0.01750633865594864, -0.18964873254299164, 0.1594204306602478, 0.062167637050151825, -0.23429414629936218, 0.08306383341550827, 0.03206126019358635, -0.3447245955467224, 0.018339797854423523, 0.09498986601829529, 0.17935949563980103, -0.40320268273353577, 0.5781170129776001, 0.10798530280590057, -0.08765523135662079, -0.12300597131252289, 0.05097681283950806, 0.1880110204219818, -0.5171361565589905, 0.04440778121352196, -0.006968316622078419, 0.09803587198257446, -0.1275510936975479, 0.09850399941205978, 0.01087428629398346, -0.09612902253866196, 0.16773638129234314, -0.41631919145584106, -0.5901718139648438, 0.11634546518325806, -0.12011659145355225, 0.21328650414943695, 0.08907953649759293, 0.14830653369426727, -0.1083182692527771, -0.04774099588394165, -0.30425065755844116, 0.11322098970413208, -0.31677788496017456, 0.2198818176984787, 0.2084016352891922, -0.07896416634321213, 0.04661007598042488, 0.055028464645147324, 0.20114316046237946, 0.3281203508377075, -0.07663939148187637, -0.19023847579956055, 0.03406139835715294, 0.08731182664632797, -0.08670438826084137, -0.45762985944747925, -0.01823534443974495, 0.22221992909908295, -0.05974288657307625, -0.13535930216312408, 0.1167742908000946, 0.18542057275772095, -0.06264849007129669, 0.07207118719816208, 0.1372980922460556, 0.10723020136356354, -0.12613776326179504, 0.2981199324131012, -0.20956331491470337, 0.4348076581954956, 0.03867236524820328, 0.2651926875114441, 0.08830706030130386, 0.07211792469024658, -0.23118507862091064, -0.10483188182115555, 0.11809860169887543, 0.18147125840187073, 0.14326241612434387, -0.5272974967956543, 0.17888081073760986, 0.2601991593837738, -0.046118706464767456, 0.37600892782211304, -0.1835515946149826, -0.01653875969350338, 0.12088977545499802, 0.24170269072055817, -0.14114604890346527, -0.06865895539522171, 0.3440251350402832, -0.21444430947303772, 0.00010650232434272766, 0.44602441787719727, 0.15173181891441345, 0.11513644456863403, 0.2358342558145523, 0.10733213275671005, 0.2825598418712616, -0.006899792701005936, 0.2959382236003876, 0.47516369819641113, -0.10158592462539673, -0.04765292629599571, 0.23228532075881958, 0.13435649871826172, 0.018418043851852417, 0.6424040198326111, -0.4427729845046997, 0.53534996509552, -0.05050428956747055, 0.2583879828453064, -0.32247206568717957, -0.3795403838157654, -0.2869466245174408, -0.16316336393356323, -0.014801844954490662, 0.23669743537902832, 0.16034838557243347, -0.32388609647750854, -0.18912945687770844, 0.004872751422226429, -0.04392492398619652, 0.16545860469341278, -0.22765889763832092, 0.13106153905391693, -0.05016680806875229, -0.018656596541404724, -0.13771989941596985, -0.01875637285411358, 0.011309150606393814, 0.18847739696502686, -0.03821885585784912, 0.23339775204658508, -0.10125723481178284, -0.0860913097858429, 0.1590765118598938, 0.2796645164489746, -0.06504138559103012, -0.26434439420700073, 0.46347370743751526, 0.5010713934898376, -0.011483244597911835, -0.020964689552783966, 0.18908573687076569, 0.357421875, 0.43471866846084595, -0.22350473701953888, 0.10345873236656189, 0.0009245183318853378, 0.018582182005047798, 0.05001351237297058, 0.14360743761062622, 0.01405564695596695, 0.683559000492096, 0.1786804497241974, 0.2524064779281616, -0.1252032369375229, -0.016752921044826508, 0.0970182716846466, -0.2486758530139923, 0.03302755579352379, 0.26611536741256714, 0.1370357871055603, -0.03237355127930641, -0.2701374590396881, -0.09492339938879013, -0.2792065143585205, 0.006541910581290722, 0.38469329476356506, 0.021352989599108696, 0.10605417937040329, -0.13153207302093506, 0.07637843489646912, 0.002045039087533951, 0.4745557904243469, 0.34034526348114014, -0.014447487890720367, -0.30348268151283264, -0.20724856853485107, -0.7285962104797363, 0.194360613822937, -0.19841495156288147, -0.32850176095962524, 0.24970833957195282, -0.0827103927731514, -0.0733969435095787, 0.3360483646392822, 0.2181289792060852, 0.3987618088722229, 0.07366078346967697, 0.13134336471557617, -0.317384272813797, -0.03503158316016197, 0.44393759965896606, 0.07822886109352112, -0.08435706049203873, -0.34023648500442505, 0.10982872545719147, 0.07426697015762329, 0.10897909849882126, -0.19356867671012878, -0.02078961953520775, -0.06904418766498566, -0.1324373483657837, 0.3674139678478241, 0.2805417776107788, 0.39301741123199463, -0.1928330361843109, -0.12261734157800674, -0.1714542657136917, -0.31763920187950134, -0.08104865252971649, 0.3091637194156647, 0.08836302161216736, 0.5725011825561523, 0.010407129302620888, -0.08740736544132233, -0.6893695592880249, 0.3223954737186432, -0.13011258840560913, 0.0926094725728035, 0.00337357260286808, 0.14715826511383057, -0.07454990595579147, 0.06257107853889465, 0.006927468813955784, 0.1489863097667694, 0.04574839398264885, 0.4057678282260895, -0.170919269323349, -0.5643856525421143, 0.3966760039329529, -0.08558787405490875, -0.6857149600982666, -0.11039236187934875, 0.010793425142765045, -0.02882656455039978, -0.0517251193523407, -0.35399866104125977, 0.30045971274375916, 0.23698022961616516, -0.007976643741130829, -0.17234951257705688, 0.20726744830608368, 0.032172657549381256, 0.04026306793093681, -0.004320546984672546, 0.4464663863182068, -0.11061864346265793, -0.06295491009950638, 0.13786813616752625, -0.2023233026266098 ]
https://github.com/huggingface/datasets/issues/444
Keep loading old file even I specify a new file in load_dataset
This is the only fix I could come up with without touching the repo's code. ```python from nlp.builder import FORCE_REDOWNLOAD dataset = load_dataset('csv', data_file='./a.csv', download_mode=FORCE_REDOWNLOAD, version='0.0.1') ``` You'll have to change the version each time you want to load a different csv file. If you're willing to add a ```print```, you can go to ```nlp.load``` and add ```print(builder_instance.cache_dir)``` right before the ```return ds``` in the ```load_dataset``` method. It'll print the cache folder, and you'll just have to erase it (and then you won't need the change here above).
I used load a file called 'a.csv' by ``` dataset = load_dataset('csv', data_file='./a.csv') ``` And after a while, I tried to load another csv called 'b.csv' ``` dataset = load_dataset('csv', data_file='./b.csv') ``` However, the new dataset seems to remain the old 'a.csv' and not loading new csv file. Even worse, after I load a.csv, the load_dataset function keeps loading the 'a.csv' afterward. Is this a cache problem?
88
Keep loading old file even I specify a new file in load_dataset I used load a file called 'a.csv' by ``` dataset = load_dataset('csv', data_file='./a.csv') ``` And after a while, I tried to load another csv called 'b.csv' ``` dataset = load_dataset('csv', data_file='./b.csv') ``` However, the new dataset seems to remain the old 'a.csv' and not loading new csv file. Even worse, after I load a.csv, the load_dataset function keeps loading the 'a.csv' afterward. Is this a cache problem? This is the only fix I could come up with without touching the repo's code. ```python from nlp.builder import FORCE_REDOWNLOAD dataset = load_dataset('csv', data_file='./a.csv', download_mode=FORCE_REDOWNLOAD, version='0.0.1') ``` You'll have to change the version each time you want to load a different csv file. If you're willing to add a ```print```, you can go to ```nlp.load``` and add ```print(builder_instance.cache_dir)``` right before the ```return ds``` in the ```load_dataset``` method. It'll print the cache folder, and you'll just have to erase it (and then you won't need the change here above).
[ -0.08887521922588348, 0.28237971663475037, -0.0012340210378170013, 0.16190119087696075, -0.1625482141971588, 0.07773289829492569, 0.1432158499956131, 0.2737467288970947, 0.36268413066864014, -0.11332884430885315, 0.11638090014457703, 0.18982955813407898, 0.18027693033218384, -0.0821293517947197, 0.195076122879982, 0.3331557512283325, -0.0630541667342186, 0.5072544813156128, 0.13660699129104614, -0.014682173728942871, -0.3488636016845703, 0.1107332780957222, -0.09431511163711548, -0.0725020319223404, -0.19264335930347443, 0.1469479203224182, -0.04384375363588333, 0.13965284824371338, -0.20569738745689392, -0.48881497979164124, 0.38091862201690674, 0.3573817014694214, 0.2581090033054352, 0.46606504917144775, -0.00011529819312272593, -0.011940859258174896, 0.24764780700206757, 0.06824491173028946, -0.5148957967758179, -0.3869972825050354, 0.03146655857563019, -0.5372768640518188, 0.3891548812389374, -0.184178426861763, -0.10161502659320831, -0.08597773313522339, 0.18401013314723969, -0.05013177543878555, 0.5789203643798828, 0.21383586525917053, 0.19516734778881073, -0.1492290049791336, 0.017136815935373306, -0.013008549809455872, 0.11139534413814545, -0.20911116898059845, 0.16253520548343658, 0.3535638749599457, 0.11168944090604782, -0.2694222629070282, -0.2668684422969818, 0.03429009020328522, -0.2663346827030182, 0.23552779853343964, 0.2771698832511902, 0.008172969333827496, 0.2694101929664612, -0.05169101059436798, 0.02978701889514923, -0.03891359269618988, 0.6603614687919617, -0.03370971977710724, -0.12314824014902115, -0.26261377334594727, 0.02860216423869133, -0.5128680467605591, 0.13469257950782776, 0.18744252622127533, -0.08094687759876251, -0.046116720885038376, -0.20426727831363678, -0.40575602650642395, -0.018812011927366257, 0.25345778465270996, 0.11124294996261597, 0.12345487624406815, -0.06472015380859375, 0.22892308235168457, 0.2850901782512665, 0.17470839619636536, 0.2771390378475189, -0.11666946113109589, -0.21236151456832886, 0.24478386342525482, -0.4885709285736084, -0.02011869102716446, 0.11230574548244476, 0.12820735573768616, -0.11361613869667053, 0.13729149103164673, 0.23208634555339813, 0.010971328243613243, -0.14968803524971008, 0.1623387336730957, 0.327961802482605, 0.3042568266391754, 0.27172261476516724, -0.14691437780857086, 0.1787363886833191, 0.15810614824295044, -0.382192462682724, -0.09424211829900742, -0.04210442304611206, -0.27118515968322754, 0.23788897693157196, -0.1810321807861328, 0.3370940685272217, -0.16682623326778412, -0.05085147172212601, 0.0400007963180542, 0.11585884541273117, -0.22638039290905, 0.017254656180739403, 0.4845024347305298, -0.1868889182806015, 0.1356288194656372, 0.15831324458122253, 0.04636175185441971, -0.5059082508087158, -0.16128334403038025, -0.08984945714473724, -0.1798769235610962, -0.3385735750198364, 0.07265017181634903, 0.4552687406539917, -0.2072432041168213, 0.3022797107696533, 0.33588936924934387, -0.2005395144224167, -0.3571435809135437, 0.07426787912845612, 0.1200312077999115, -0.025085456669330597, 0.0515105314552784, 0.09026359021663666, 0.3180943727493286, 0.02414194494485855, -0.5446962118148804, -0.17386099696159363, 0.15585878491401672, -0.5722802877426147, -0.3847288191318512, 0.037687089294195175, 0.17738845944404602, -0.15083330869674683, -0.124248206615448, -0.0813760831952095, -0.054961416870355606, 0.15266892313957214, -0.4405645430088043, -0.22408026456832886, -0.16031497716903687, -0.2302430123090744, -0.2056121528148651, -0.06031248718500137, 0.5919471979141235, -0.10798706114292145, -0.006906177848577499, -0.17320369184017181, 0.10789506137371063, -0.13072648644447327, 0.11004781723022461, -0.19663062691688538, -0.002677448093891144, -0.22927123308181763, -0.5279221534729004, 0.6706694960594177, -0.09091314673423767, -0.4825633466243744, 0.21087484061717987, -0.16274461150169373, 0.14707501232624054, 0.15838481485843658, 0.20925495028495789, -0.16600409150123596, -0.15865446627140045, 0.04425526782870293, 0.2686128616333008, 0.11366068571805954, 0.01119646243751049, -0.13442042469978333, -0.2561935484409332, 0.23144562542438507, 0.031454723328351974, -0.16900475323200226, 0.2235100269317627, -0.024848371744155884, 0.1354246437549591, 0.2736144959926605, 0.02812514267861843, 0.03728681057691574, -0.02117525041103363, -0.018824439495801926, 0.09387875348329544, -0.03877817839384079, 0.20742163062095642, -0.6352764964103699, 0.21080559492111206, -0.18574745953083038, -0.37610241770744324, 0.1938493847846985, -0.06488365679979324, -0.2942902743816376, -0.22551259398460388, -0.450682669878006, -0.20557507872581482, 0.018885545432567596, 0.3500683903694153, 0.09249939024448395, -0.10763554275035858, -0.15275059640407562, 0.37228384613990784, -0.07438165694475174, -0.06785290688276291, -0.5102143883705139, 0.11390717327594757, 0.019744250923395157, -0.06366318464279175, 0.11345385015010834, 0.2977809011936188, 0.3451765179634094, -0.02301650680601597, -0.11211375147104263, 0.24231931567192078, -0.08024469017982483, 0.3043350875377655, 0.00624745711684227, -0.3474617004394531, 0.00045447051525115967, 0.2994793653488159, 0.13328047096729279, 0.10172025859355927, -0.00839755218476057, -0.016876980662345886, -0.07999690622091293, 0.3322358727455139, -0.05603449419140816, 0.30851510167121887, 0.06339410692453384, -0.16733254492282867, 0.22752434015274048, -0.3927997648715973, 0.20671987533569336, -0.17773611843585968, 0.2628151476383209, 0.24795109033584595, 0.1953122317790985, 0.26465025544166565, -0.08291075378656387, 0.06501815468072891, 0.46716535091400146, -0.04698145389556885, -0.29236289858818054, 0.16428276896476746, -0.08411788195371628, -0.1841212511062622, -0.12369932234287262, 0.36323797702789307, 0.4298814535140991, 0.14775051176548004, -0.18183355033397675, 0.08226709067821503, -0.06678254157304764, -0.23044238984584808, 0.11016544699668884, -0.20132382214069366, 0.2853395342826843, 0.2399769127368927, 0.25794437527656555, -0.09999634325504303, -0.35013264417648315, 0.3381071090698242, 0.22407081723213196, 0.11032675206661224, -0.07968837022781372, 0.20684298872947693, -0.5125062465667725, -0.19354674220085144, -0.5543275475502014, 0.0061854710802435875, -0.24691200256347656, -0.09692178666591644, -0.07545579224824905, 0.6249873042106628, 0.22461876273155212, 0.10398969054222107, 0.052642714232206345, 0.34065863490104675, -0.14747270941734314, -0.30655983090400696, 0.02910389006137848, -0.3341250717639923, -0.3812091052532196, -0.045645102858543396, 0.2931636571884155, -0.07421562820672989, 0.2642604410648346, 0.04022955894470215, -0.14073961973190308, -0.21856462955474854, -0.13378532230854034, -0.09872323274612427, 0.12719008326530457, 0.291570246219635, -0.18333005905151367, 0.16283458471298218, 0.13835042715072632, -0.2592161297798157, 0.1522708684206009, -0.4241507351398468, -0.025114037096500397, 0.1721179485321045, -0.08598055690526962, 0.1537032574415207, -0.011824125424027443, -0.4226042330265045, -0.22250358760356903, -0.27360236644744873, 0.13907472789287567, 0.15972521901130676, 0.15198424458503723, 0.35980257391929626, -0.10878490656614304, -0.1524830013513565, -0.10719805955886841, 0.23384009301662445, -0.3367554843425751, -0.27922895550727844, 0.285832941532135, -0.18889915943145752, -0.25458213686943054, 0.2504909634590149, -0.015303844586014748, 0.20397290587425232, -0.10134995728731155, -0.6121989488601685, -0.07070315629243851, -0.009310504421591759, -0.027772758156061172, 0.0958583801984787, 0.05533893406391144, 0.1928490698337555, -0.1464693546295166, -0.0504266694188118, -0.03921322524547577, -0.18028360605239868, -0.008839979767799377, 0.2555663287639618, 0.40610063076019287, 0.20513111352920532, 0.15472595393657684, -0.29639336466789246, 0.5076723694801331, 0.39960068464279175, -0.12590736150741577, 0.41051381826400757, -0.007669186219573021, 0.45293012261390686, -0.3399047255516052, -0.17431314289569855, -0.10874146968126297, -0.15069153904914856, -0.07751524448394775, 0.18826645612716675, 0.04596009850502014, -0.17702147364616394, -0.21230940520763397, -0.08546078205108643, -0.04287846013903618, -0.33249643445014954, 0.10214342176914215, -0.13242660462856293, 0.0285499207675457, 0.40368443727493286, -0.2121618390083313, -0.26387542486190796, -0.41084954142570496, -0.36455094814300537, 0.30812665820121765, 0.08579245209693909, 0.026967812329530716, -0.06448124349117279, -0.03047916665673256, -0.31241297721862793, 0.21003392338752747, -0.03347407653927803, 0.11086878925561905, 0.1170169860124588, 0.07382640987634659, 0.23523786664009094, 0.02461833879351616, 0.6076542139053345, -0.036141298711299896, 0.14421115815639496, 0.15105091035366058, 0.056335531175136566, -0.13860133290290833, -0.05425947532057762, 0.29573217034339905, 0.4776972532272339, 0.20105311274528503, 0.06848353147506714, -0.015031673014163971, -0.461392879486084, 0.12720924615859985, 0.31260278820991516, -0.36894166469573975, -0.4041791260242462, -0.4548130929470062, 0.152354896068573, -0.3105376958847046, -0.21868255734443665, -0.45363372564315796, 0.18927882611751556, -0.23441316187381744, -0.11438660323619843, -0.1408667415380478, 0.033992987126111984, -0.026932016015052795, 0.0028768889605998993, 0.3091118335723877, 0.4205058217048645, -0.052141763269901276, 0.19258053600788116, 0.2409769743680954, -0.1799013912677765, 0.4959925413131714, -0.03645947948098183, 0.00434509664773941, 0.01090770959854126, 0.06075555458664894, 0.274812787771225, 0.27712613344192505, 0.002977322321385145, 0.15325868129730225, -0.08883703500032425, -0.09547847509384155, -0.17064742743968964, -0.12723024189472198, 0.1746075600385666, -0.01929856836795807, -0.2430470585823059, -0.6247787475585938, 0.5867565870285034, -0.22819814085960388, -0.09580198675394058, 0.07711926102638245, -0.4297845959663391, 0.0043199798092246056, 0.328488290309906, -0.3328562378883362, 0.7670228481292725, 0.013623487204313278, 0.258422315120697, 0.06887543201446533, 0.0857934057712555, 0.7262020111083984, -0.353488564491272, 0.15852876007556915, -0.24063846468925476, 0.02687727101147175, 0.06710165739059448, -0.01569339632987976, -0.03736952692270279, 0.06110050529241562, -0.23648211359977722, 0.538580060005188, 0.19413025677204132, 0.2164645940065384, 0.1895292103290558, 0.5119620561599731, -0.013974497094750404, -0.17160582542419434, -0.38868066668510437, 0.06553564965724945, -0.11316168308258057, 0.2626153528690338, -0.15087467432022095, -0.16216616332530975, 0.32135695219039917, -0.07852447032928467, 0.1230560839176178, 0.24609404802322388, 0.06875155121088028, 0.22048571705818176, -0.10854437947273254, -0.3991330862045288, -0.03350518271327019, 0.18648816645145416, -0.03182922303676605, -0.004057407379150391, -0.21049673855304718, 0.24326178431510925, 0.07584661990404129, 0.10488125681877136, -0.2682758867740631, -0.09885038435459137, 0.3014583885669708, 0.03775182366371155, -0.3364548981189728, 0.11176100373268127, -0.10592371225357056, -0.40963608026504517, 0.11024788022041321, 0.3318058252334595, 0.07654064148664474, -0.15328055620193481, -0.2351972907781601, 0.19308221340179443, 0.08148269355297089, -0.09873852133750916, 0.12441036105155945, 0.0387883335351944, -0.05303499847650528, -0.04135745018720627, 0.026092039421200752, -0.47638988494873047, 0.06090439856052399, 0.38724416494369507, 0.26438653469085693, -0.09106731414794922, 0.6199370622634888, -0.05440840870141983, 0.1009746789932251, -0.1384756863117218, -0.15531544387340546, 0.003981584683060646, -0.34792083501815796, 0.07350935786962509, 0.30344951152801514, 0.22193993628025055, 0.338500052690506, 0.07014887034893036, -0.17256313562393188, 0.18922236561775208, 0.022978145629167557, -0.44240429997444153, -0.2097519189119339, -0.1800866276025772, -0.24896834790706635, 0.14253400266170502, 0.30697086453437805, -0.01828698441386223, 0.17661982774734497, 0.4221719801425934, -0.242264524102211, 0.21792425215244293, 0.03638678044080734, 0.2837197780609131, 0.17946814000606537, -0.14550358057022095, -0.2760019600391388, -0.22384485602378845, -0.03975754231214523, -0.12760718166828156, -0.3365156054496765, -0.2114666998386383, -0.2694690525531769, 0.17385143041610718, 0.05608168989419937, 0.24058496952056885, -0.34862565994262695, -0.3961261510848999, 0.24734483659267426, -0.1670856922864914, 0.1138700395822525, -0.2556157410144806, 0.05199363827705383, 0.05673721805214882, 0.02733800932765007, 0.13731354475021362, -0.11268661171197891, 0.12047514319419861, -0.28193992376327515, 0.3032243251800537, 0.17211106419563293, 0.02678385190665722, -0.2301592379808426, 0.20229485630989075, -0.46276751160621643, -0.1068914607167244, -0.04967054724693298, 0.046847376972436905, 0.1288539618253708, -0.33957386016845703, -0.04164033755660057, 0.013371961191296577, 0.19937573373317719, 0.5579789876937866, 0.009369763545691967, -0.05097191780805588, 0.29499801993370056, 0.13519707322120667, -0.27856796979904175, 0.1379580795764923, 0.4374047815799713, 0.06193707138299942, -0.04894767701625824, 0.12740221619606018, 0.22592481970787048, -0.2998068332672119, 0.20561483502388, 0.2648718059062958, 0.35711565613746643, -0.4329586625099182, 0.3450424075126648, 0.15106503665447235, 0.29421406984329224, -0.045223165303468704, 0.45778822898864746, 0.2673683762550354, -0.0011889860033988953, 0.31785517930984497, -0.11510125547647476, -0.05534368008375168, 0.08979551494121552, 0.2091725617647171, -0.2968592941761017, -0.3625844120979309, 0.10967099666595459, 0.5631203055381775, -0.04965275526046753, 0.1745135337114334, 0.17605732381343842, 0.5881564617156982, -0.08914502710103989, -0.10319484770298004, -0.40321260690689087, 0.4081052541732788, -0.10669783502817154, -0.29567503929138184, -0.11008021235466003, -0.01774156093597412, -0.1267819106578827, 0.2605084776878357, -0.09651495516300201, 0.0007650554180145264, 0.054717984050512314, 0.11652660369873047, -0.2532097101211548, -0.6731387972831726, 0.14903876185417175, 0.09119167178869247, 0.07184652984142303, -0.12211968004703522, 0.3966827988624573, -0.10086466372013092, 0.0015576854348182678, 0.10638764500617981, 0.15154805779457092, 0.29853886365890503, 0.2616485357284546, -0.026119057089090347, 0.21501952409744263, 0.09843012690544128, -0.09906560927629471, -0.27250516414642334, 0.15220965445041656, 0.15886303782463074, 0.07352454960346222, 0.07372413575649261, 0.1271311640739441, -0.145631805062294, 0.19104163348674774, 0.28082823753356934, 0.01779789663851261, -0.4239729940891266, 0.2723129391670227, 0.4910108149051666, -0.10041452199220657, -0.1347145289182663, 0.15018564462661743, -0.5083785057067871, 0.08702246844768524, 0.26660123467445374, -0.027471981942653656, 0.15719592571258545, -0.2614785134792328, 0.06476178765296936, -0.09933909773826599, 0.43988069891929626, -0.0613912008702755, 0.030148236081004143, -0.24129939079284668, -0.21176676452159882, -1.0339395999908447, 0.11084189265966415, -0.08598597347736359, 0.06751719117164612, 0.029855459928512573, 0.16386397182941437, -0.1324930489063263, -0.01990506798028946, -0.03333929181098938, -0.0068989284336566925, 0.2087886482477188, -0.06338926404714584, -0.24287383258342743, -0.1244170218706131, 0.18829330801963806, 0.16331246495246887, -0.15821734070777893, -0.12727178633213043, 0.03620950132608414, -0.27691781520843506, -0.016971927136182785, 0.06820113956928253, 0.045056089758872986, 0.2270137071609497, 0.30521541833877563, 0.4869484305381775, -0.047995179891586304, 0.1529431939125061, -0.052688948810100555, 0.1403118520975113, -0.4018547534942627, -0.15426796674728394, -0.11856101453304291, -0.23953428864479065, 0.014693612232804298, 0.20927298069000244, -0.3926819860935211, 0.3989505171775818, -0.34082984924316406, 0.05816884711384773, -0.16705408692359924, -0.10508944094181061, 0.08831290155649185, -0.11838320642709732, 0.002345532178878784, 0.33445969223976135, 0.05446845665574074, 0.5390544533729553, -0.07186515629291534, 0.20237022638320923, -0.30118632316589355, 0.019257018342614174, 0.3384811282157898, -0.44516175985336304, -0.22496233880519867, 0.19393125176429749, 0.3209461569786072, -0.08093919605016708, -0.011181892827153206, -0.2096015214920044, 0.16008594632148743, 0.26239004731178284, 0.049774445593357086, -0.171638622879982, 0.398525595664978, -0.19400179386138916, 0.03399001434445381, -0.07561006397008896, 0.20515570044517517, 0.414453387260437, -0.4878878593444824, 0.020220477133989334, -0.26169154047966003 ]
https://github.com/huggingface/datasets/issues/443
Cannot unpickle saved .pt dataset with torch.save()/load()
This seems to be fixed in a non-released version. Installing nlp from source ``` git clone https://github.com/huggingface/nlp cd nlp pip install . ``` solves the issue.
Saving a formatted torch dataset to file using `torch.save()`. Loading the same file fails during unpickling: ```python >>> import torch >>> import nlp >>> squad = nlp.load_dataset("squad.py", split="train") >>> squad Dataset(features: {'source_text': Value(dtype='string', id=None), 'target_text': Value(dtype='string', id=None)}, num_rows: 87599) >>> squad = squad.map(create_features, batched=True) >>> squad.set_format(type="torch", columns=["source_ids", "target_ids", "attention_mask"]) >>> torch.save(squad, "squad.pt") >>> squad_pt = torch.load("squad.pt") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/torch/serialization.py", line 593, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/torch/serialization.py", line 773, in _legacy_load result = unpickler.load() File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/nlp/splits.py", line 493, in __setitem__ raise ValueError("Cannot add elem. Use .add() instead.") ValueError: Cannot add elem. Use .add() instead. ``` where `create_features` is a function that tokenizes the data using `batch_encode_plus` and returns a Dict with `input_ids`, `target_ids` and `attention_mask`. ```python def create_features(batch): source_text_encoding = tokenizer.batch_encode_plus( batch["source_text"], max_length=max_source_length, pad_to_max_length=True, truncation=True) target_text_encoding = tokenizer.batch_encode_plus( batch["target_text"], max_length=max_target_length, pad_to_max_length=True, truncation=True) features = { "source_ids": source_text_encoding["input_ids"], "target_ids": target_text_encoding["input_ids"], "attention_mask": source_text_encoding["attention_mask"] } return features ``` I found a similar issue in [issue 5267 in the huggingface/transformers repo](https://github.com/huggingface/transformers/issues/5267) which was solved by downgrading to `nlp==0.2.0`. That did not solve this problem, however.
26
Cannot unpickle saved .pt dataset with torch.save()/load() Saving a formatted torch dataset to file using `torch.save()`. Loading the same file fails during unpickling: ```python >>> import torch >>> import nlp >>> squad = nlp.load_dataset("squad.py", split="train") >>> squad Dataset(features: {'source_text': Value(dtype='string', id=None), 'target_text': Value(dtype='string', id=None)}, num_rows: 87599) >>> squad = squad.map(create_features, batched=True) >>> squad.set_format(type="torch", columns=["source_ids", "target_ids", "attention_mask"]) >>> torch.save(squad, "squad.pt") >>> squad_pt = torch.load("squad.pt") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/torch/serialization.py", line 593, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/torch/serialization.py", line 773, in _legacy_load result = unpickler.load() File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/nlp/splits.py", line 493, in __setitem__ raise ValueError("Cannot add elem. Use .add() instead.") ValueError: Cannot add elem. Use .add() instead. ``` where `create_features` is a function that tokenizes the data using `batch_encode_plus` and returns a Dict with `input_ids`, `target_ids` and `attention_mask`. ```python def create_features(batch): source_text_encoding = tokenizer.batch_encode_plus( batch["source_text"], max_length=max_source_length, pad_to_max_length=True, truncation=True) target_text_encoding = tokenizer.batch_encode_plus( batch["target_text"], max_length=max_target_length, pad_to_max_length=True, truncation=True) features = { "source_ids": source_text_encoding["input_ids"], "target_ids": target_text_encoding["input_ids"], "attention_mask": source_text_encoding["attention_mask"] } return features ``` I found a similar issue in [issue 5267 in the huggingface/transformers repo](https://github.com/huggingface/transformers/issues/5267) which was solved by downgrading to `nlp==0.2.0`. That did not solve this problem, however. This seems to be fixed in a non-released version. Installing nlp from source ``` git clone https://github.com/huggingface/nlp cd nlp pip install . ``` solves the issue.
[ -0.1386735737323761, -0.18403688073158264, 0.14232289791107178, 0.28548938035964966, 0.38725823163986206, 0.07398631423711777, 0.4242343604564667, 0.15449495613574982, -0.181862473487854, 0.00889827311038971, -0.2541102468967438, 0.7546948790550232, -0.3429296910762787, -0.16271966695785522, -0.00877604354172945, -0.2707044780254364, -0.022457130253314972, -0.09998251497745514, 0.16353991627693176, 0.0048668161034584045, -0.12398035079240799, 0.17104916274547577, -0.2978938817977905, -0.06452976167201996, -0.20809786021709442, -0.20489870011806488, -0.0015917494893074036, 0.39806240797042847, 0.06511038541793823, -0.3406358063220978, 0.19455042481422424, -0.15630121529102325, 0.09155512601137161, 0.46898725628852844, -0.000121769800898619, -0.03822473809123039, 0.12661559879779816, -0.22940349578857422, -0.4221741557121277, -0.10443355143070221, 0.4167328178882599, -0.1648721843957901, 0.27940914034843445, -0.3884238302707672, -0.04677682742476463, 0.13058578968048096, 0.014289166778326035, -0.30211740732192993, 0.1780151128768921, 0.09917783737182617, 0.1452198475599289, 0.6736459732055664, 0.028920453041791916, -0.02808808907866478, 0.24414703249931335, 0.1641836315393448, -0.2486748844385147, 0.2910866439342499, 0.10413683950901031, 0.0843072384595871, -0.1918398141860962, 0.06326049566268921, -0.3168008029460907, -0.14751291275024414, 0.11342917382717133, -0.06229115277528763, -0.6752679944038391, -0.2057635337114334, 0.20551341772079468, 0.17675015330314636, 0.2703265845775604, -0.30252039432525635, -0.3350047767162323, -0.17994800209999084, 0.19474287331104279, -0.31145986914634705, 0.1561121642589569, 0.30044978857040405, -0.11588537693023682, -0.08643919229507446, -0.1456921249628067, -0.029999034479260445, 0.025889568030834198, 0.2111261487007141, 0.43048763275146484, -0.03532809019088745, -0.09989839047193527, 0.38805660605430603, 0.09980099648237228, -0.04815983027219772, 0.00784273911267519, -0.10471710562705994, 0.10411816835403442, 0.00927237793803215, -0.2710995674133301, 0.09643678367137909, -0.03642028570175171, -0.0696302130818367, -0.07938603311777115, 0.3811091184616089, 0.5383754372596741, 0.11459184437990189, 0.23110604286193848, 0.22592878341674805, 0.2127758413553238, 0.05712592974305153, 0.25543689727783203, 0.3450379967689514, 0.017732832580804825, -0.3164447844028473, -0.08452603220939636, 0.059880562126636505, 0.14685331284999847, -0.21134664118289948, 0.18737056851387024, 0.09211751818656921, 0.011566683650016785, -0.07376626878976822, -0.2611564099788666, -0.07327635586261749, -0.11648185551166534, -0.22302871942520142, -0.038712356239557266, 0.15215852856636047, -0.007468942552804947, 0.08857019245624542, 0.0037147626280784607, 0.3209429979324341, -0.34400731325149536, -0.02277373895049095, -0.05241500213742256, 0.08578142523765564, -0.17222362756729126, -0.05388675630092621, 0.3327806293964386, -0.43294385075569153, 0.2967669367790222, -0.02948625013232231, -0.18547476828098297, -0.07067421078681946, -0.06061380356550217, -0.25707319378852844, 0.1994282454252243, -0.1585467904806137, 0.2861679196357727, 0.15995657444000244, 0.10739913582801819, 0.026673220098018646, -0.057005468755960464, 0.12782615423202515, -0.2086871862411499, -0.21741607785224915, -0.22170589864253998, 0.06415080279111862, -0.1422474980354309, -0.1611870974302292, -0.18565958738327026, -0.07413777709007263, 0.1521253138780594, -0.1553194671869278, 0.1956334412097931, -0.1929909735918045, -0.16050179302692413, -0.3936680853366852, 0.0562317818403244, 0.3869011402130127, -0.23879726231098175, -0.13306216895580292, 0.4711279273033142, -0.16884811222553253, 0.18276609480381012, 0.2557336688041687, -0.2038458287715912, 0.20762482285499573, -0.292052298784256, 0.13002024590969086, 0.5466672778129578, -0.49012842774391174, -0.2935791313648224, 0.16813860833644867, 0.010487072169780731, 0.08904912322759628, -0.008171916007995605, 0.12680388987064362, 0.011718293651938438, -0.030325472354888916, 0.10826396942138672, 0.35925453901290894, -0.024014605209231377, -0.19204533100128174, -0.39109039306640625, -0.06721405684947968, 0.5623111128807068, 0.10396814346313477, -0.045083146542310715, 0.005122274160385132, 0.14899244904518127, 0.164360910654068, 0.2806621491909027, -0.13351909816265106, 0.07904110103845596, 0.2275400310754776, 0.04792678728699684, -0.04792968928813934, -0.061427146196365356, -0.11174892634153366, -0.7583838701248169, 0.142573744058609, -0.4217595160007477, -0.20415827631950378, 0.04600350186228752, 0.01943400129675865, -0.00968688353896141, -0.2699633538722992, -0.46728965640068054, -0.25359049439430237, -0.07019440084695816, 0.03505658358335495, -0.0027182605117559433, -0.10186637938022614, -0.28826668858528137, -0.058700062334537506, 0.017072277143597603, 0.0949505940079689, -0.4358217716217041, 0.03511175513267517, -0.10083705931901932, -0.6016010046005249, 0.07889728248119354, 0.33460426330566406, 0.19922176003456116, -0.2135375738143921, -0.1547774374485016, 0.5112801194190979, -0.18784670531749725, 0.04584285616874695, -0.09114757925271988, -0.3962250351905823, -0.025768650695681572, -0.3873726427555084, -0.13877765834331512, 0.30574318766593933, 0.16510270535945892, -0.14394718408584595, -0.4406927525997162, 0.47397685050964355, -0.13703177869319916, -0.06940754503011703, 0.14283093810081482, -0.1771290898323059, -0.04021107405424118, -0.1298944354057312, -0.08502354472875595, -0.007481366395950317, 0.04417482018470764, 0.250082790851593, 0.4493274390697479, -0.059943608939647675, -0.4387771189212799, -0.06660974770784378, 0.2690049111843109, 0.18277962505817413, 0.15105204284191132, 0.0907955914735794, -0.08655103296041489, -0.14625705778598785, -0.09943652153015137, -0.5965243577957153, 0.46997594833374023, 0.00795622169971466, -0.09643520414829254, -0.07733345031738281, 0.1617998331785202, -0.16235268115997314, 0.024682700634002686, 0.029241371899843216, 0.021562356501817703, 0.5249426364898682, 0.31054022908210754, 0.1777423471212387, -0.3436547517776489, 0.09389662742614746, -0.00829765759408474, -0.015435932204127312, -0.22872811555862427, 0.20084422826766968, -0.2161114513874054, -0.007768277078866959, -0.2932499051094055, 0.022531799972057343, -0.4134536683559418, -0.26591014862060547, -0.020413223654031754, 0.41882064938545227, 0.16916674375534058, 0.213192880153656, 0.03270489349961281, 0.08866840600967407, 0.1502605527639389, -0.28739386796951294, 0.08785581588745117, -0.1656797081232071, -0.13698932528495789, -0.03661779686808586, 0.09889674186706543, -0.1391293704509735, 0.5425945520401001, 0.24885080754756927, 0.0985449030995369, -0.254001647233963, 0.13229262828826904, 0.19863659143447876, 0.04051510989665985, 0.02833215519785881, 0.1583034098148346, 0.07732584327459335, -0.24818742275238037, -0.26645398139953613, 0.29118749499320984, -0.11914555728435516, -0.18611787259578705, 0.08011795580387115, 0.010900123044848442, -0.022456565871834755, -0.005022706463932991, -0.6097731590270996, -0.22468416392803192, -0.2241443395614624, 0.2270321547985077, -0.04911767691373825, 0.08155353367328644, 0.17417611181735992, 0.004865820519626141, 0.2601935863494873, 0.06243452802300453, -0.1001795157790184, -0.012652244418859482, -0.25333312153816223, 0.21581006050109863, -0.1460837423801422, -0.4376556873321533, 0.027398783713579178, 0.09299901872873306, -0.10166256129741669, 0.11422320455312729, -0.040671683847904205, 0.023393888026475906, 0.1410515308380127, 0.29242923855781555, -0.26558494567871094, 0.11492342501878738, 0.3443346917629242, 0.043017029762268066, 0.07788470387458801, -0.030662832781672478, -0.24570658802986145, 0.05969617888331413, 0.15545342862606049, 0.35132721066474915, -0.020623978227376938, 0.03923621401190758, 0.1629592776298523, 0.8619161248207092, 0.18552663922309875, -0.2794862985610962, 0.3941231667995453, -0.02922884188592434, 0.27529817819595337, -0.2377852499485016, -0.44693174958229065, 0.4460180997848511, -0.17337098717689514, 0.3204529285430908, 0.060732562094926834, -0.2573394477367401, -0.011322017759084702, -0.06358543783426285, 0.27178940176963806, -0.1492319405078888, -0.24960774183273315, 0.2806568443775177, -0.23851743340492249, 0.10495270788669586, -0.18145768344402313, 0.22750556468963623, -0.0711081400513649, -0.35094359517097473, -0.0032612616196274757, 0.16436776518821716, 0.41097456216812134, 0.16167110204696655, -0.4156171977519989, 0.004046281799674034, -0.4042145311832428, 0.39570313692092896, 0.16158154606819153, 0.40105268359184265, -0.0990787148475647, -0.2193678617477417, 0.13325604796409607, 0.11810007691383362, 0.4137422442436218, 0.009663904085755348, -0.06072307378053665, 0.3061220049858093, -0.16282440721988678, -0.5174524784088135, 0.012781564146280289, 0.022016305476427078, 0.41534027457237244, 0.16185244917869568, 0.2548167109489441, -0.1388518214225769, -0.15108641982078552, 0.16360051929950714, 0.36994174122810364, -0.19340567290782928, -0.1140032410621643, -0.05749938264489174, -0.14290082454681396, -0.4427405297756195, -0.061673395335674286, -0.08531086146831512, 0.26704537868499756, -0.001704589230939746, 0.2492295652627945, -0.1672128438949585, -0.21095013618469238, 0.0936298593878746, -0.38074007630348206, 0.28511103987693787, -0.0029865477699786425, 0.06523539125919342, 0.02341993898153305, 0.40808960795402527, 0.03735038638114929, 0.251578688621521, -0.2945898771286011, 0.2742481231689453, 0.1988430619239807, -0.0704244002699852, 0.1691574603319168, 0.23722103238105774, 0.05213985592126846, 0.11210007965564728, -0.3705202639102936, -0.0667923092842102, 0.12626740336418152, -0.0717884823679924, 0.08333783596754074, -0.33042603731155396, -0.2719466984272003, -0.0292307510972023, 0.23215773701667786, 0.030072536319494247, 0.2362712174654007, 0.11663045734167099, -0.5146973133087158, -0.09241531044244766, 0.5315943360328674, 0.05635245889425278, 0.9179924130439758, -0.17723773419857025, 0.32608652114868164, -0.032126251608133316, 0.14012204110622406, 0.2217620313167572, 0.05998564511537552, 0.18313662707805634, -0.5430383086204529, 0.18568381667137146, 0.07395953685045242, -0.052421875298023224, 0.07436153292655945, 0.1941395252943039, -0.10640314221382141, 0.35492825508117676, -0.21080659329891205, 0.02852642722427845, -0.15037882328033447, 0.3296603560447693, 0.07671700417995453, -0.23524680733680725, -0.21082565188407898, 0.0077413879334926605, -0.21418653428554535, 0.4785357415676117, 0.10973002016544342, -0.09008211642503738, 0.0994531512260437, -0.18066740036010742, -0.08637432008981705, 0.13818147778511047, -0.1973126083612442, 0.5574920773506165, 0.12916171550750732, -0.8781002163887024, -0.05912679433822632, 0.6718170642852783, -0.011831499636173248, -0.23207618296146393, 0.054975476115942, 0.1600879281759262, 0.2959398329257965, -0.12298262864351273, -0.209771528840065, 0.11900721490383148, 0.48596858978271484, -0.09892451763153076, 0.06464798003435135, 0.17700442671775818, -0.11379197984933853, -0.32832980155944824, -0.15561223030090332, 0.29935890436172485, 0.3328760862350464, -0.4707869291305542, -0.42732566595077515, -0.22042584419250488, -0.23645715415477753, -0.15102025866508484, -0.021564539521932602, 0.09503690898418427, 0.17878417670726776, 0.17005886137485504, 0.14841976761817932, -0.14621901512145996, 0.015676794573664665, 0.8382949829101562, -0.23448291420936584, -0.34322527050971985, 0.5526188611984253, 0.26600414514541626, -0.1367073357105255, -0.2085973024368286, 0.19266167283058167, 0.0007451511919498444, -0.328069269657135, 0.12508812546730042, -0.07697734981775284, 0.3351728320121765, 0.14623846113681793, 0.22127103805541992, -0.09757407009601593, -0.038796789944171906, 0.012082654982805252, -0.056308891624212265, -0.48432958126068115, -0.18466593325138092, 0.1859748512506485, 0.06488069891929626, 0.04868555814027786, 0.40985047817230225, 0.30816397070884705, 0.03420870378613472, -0.18434052169322968, 0.3117743134498596, -0.03076673112809658, 0.212167888879776, 0.47739237546920776, -0.13586294651031494, -0.09036169201135635, -0.006337410770356655, 0.030529571697115898, 0.07703830301761627, -0.11193281412124634, -0.14472696185112, -0.22197242081165314, 0.17349520325660706, 0.18601149320602417, -0.21568389236927032, -0.26470422744750977, -0.009542100131511688, 0.19226166605949402, -0.22607317566871643, 0.18102458119392395, 0.3889676630496979, 0.022413108497858047, 0.15938347578048706, -0.2167813926935196, 0.25235509872436523, -0.05278465524315834, -0.07522975653409958, -0.10531440377235413, 0.10623075067996979, 0.12379579246044159, -0.07366842031478882, 0.028034277260303497, -0.03514966741204262, -0.2667635977268219, -0.14142265915870667, 0.47921574115753174, 0.2084566056728363, 0.01860630139708519, -0.38384222984313965, -0.09467658400535583, -0.3431570827960968, 0.011434148997068405, 0.16308951377868652, -0.29230672121047974, -0.13631251454353333, 0.10539136826992035, 0.015487460419535637, 0.002562291920185089, 0.02115667425096035, 0.25023728609085083, 0.04748369753360748, -0.09921533614397049, 0.09059283882379532, -0.005088485777378082, 0.0905461311340332, -0.2394503802061081, 0.09692802280187607, 0.27442389726638794, -0.33392757177352905, 0.1398557871580124, 0.10694971680641174, 0.0865374207496643, -0.002141207456588745, 0.13512997329235077, -0.12573635578155518, 0.23607885837554932, 0.1482812762260437, -0.011764176189899445, 0.6780450344085693, 0.11480200290679932, 0.0790787935256958, 0.23906591534614563, -0.48527753353118896, -0.29170554876327515, -0.06726682186126709, 0.2548881769180298, 0.3690395951271057, 0.016679532825946808, 0.8710447549819946, -0.4937480092048645, -0.4484511613845825, 0.23436182737350464, 0.5710675120353699, -0.16300493478775024, -0.23349875211715698, -0.11919299513101578, -0.05697191134095192, 0.03929220885038376, 0.21502122282981873, -0.41839614510536194, 0.19411969184875488, 0.20406116545200348, 0.23102116584777832, -0.26080840826034546, -0.15718130767345428, 0.04559318721294403, 0.0524485819041729, 0.05397568270564079, 0.010927844792604446, -0.07490257173776627, -0.015289194881916046, -0.0038116946816444397, -0.04220057651400566, 0.28007781505584717, 0.2520424723625183, 0.26273587346076965, -0.2105845957994461, 0.0034329774789512157, 0.05936659127473831, 0.11378853023052216, 0.01211327314376831, -0.04184702783823013, -0.023741349577903748, -0.2986754775047302, 0.3994516432285309, 0.008803721517324448, -0.09232119470834732, 0.030780386179685593, 0.26372578740119934, 0.10433557629585266, -0.11446689069271088, -0.006139665842056274, -0.06967713683843613, -0.3914438486099243, -0.24462077021598816, -0.014635369181632996, -0.09809087216854095, 0.09523036330938339, 0.26056963205337524, 0.40642666816711426, 0.15911370515823364, -0.051300615072250366, 0.046647682785987854, 0.08264707028865814, 0.5026721954345703, 0.19732095301151276, -0.43501386046409607, -0.2800352871417999, 0.1274707317352295, -0.4370200037956238, 0.07920339703559875, 0.16884227097034454, 0.10760864615440369, -0.015812769532203674, 0.24628759920597076, -0.04971938580274582, 0.1373990774154663, -0.05687279999256134, -0.02294112928211689, 0.4012258052825928, 0.30322274565696716, -0.35616815090179443, -0.06887447834014893, -0.17657138407230377, 0.10892406851053238, 0.12259049713611603, -0.3322439193725586, -0.04999728873372078, 0.19903185963630676, 0.0644451379776001, -0.33128929138183594, -0.5067591667175293, 0.05396813526749611, 0.26149699091911316, 0.26606178283691406, -0.06596922874450684, 0.3709567189216614, -0.04396287724375725, -0.32602035999298096, 0.03450823575258255, -0.166618213057518, 0.17275148630142212, 0.11324242502450943, 0.15739013254642487, 0.45337873697280884, 0.01611494831740856, 0.1369047909975052, -0.4455275535583496, 0.5350674390792847, -0.05194835364818573, 0.12403807044029236, -0.10020942986011505, 0.16670456528663635, 0.07703039795160294, 0.2301449477672577, 0.08320293575525284, 0.5846359133720398, -0.1828310340642929, 0.3271811604499817, -0.6916030645370483, -0.3220059871673584, 0.500527024269104, -0.217601478099823, -0.16315071284770966, 0.024638190865516663, 0.13235683739185333, 0.20691663026809692, 0.18322107195854187, -0.620257556438446, -0.07626719772815704, 0.21320028603076935, -0.24264386296272278, -0.16371673345565796, -0.01855037361383438, -0.31846883893013, -0.02234022133052349, 0.05805942043662071, 0.35369807481765747, 0.2758459746837616, -0.03695456683635712, 0.04760672524571419, -0.1522228717803955 ]
https://github.com/huggingface/datasets/issues/439
Issues: Adding a FAISS or Elastic Search index to a Dataset
`DPRContextEncoder` and `DPRContextEncoderTokenizer` will be available in the next release of `transformers`. Right now you can experiment with it by installing `transformers` from the master branch. You can also check the docs of DPR [here](https://huggingface.co/transformers/master/model_doc/dpr.html). Moreover all the indexing features will also be available in the next release of `nlp`.
It seems the DPRContextEncoder, DPRContextEncoderTokenizer cited[ in this documentation](https://huggingface.co/nlp/faiss_and_ea.html) is not implemented ? It didnot work with the standard nlp installation . Also, I couldn't find or use it with the latest nlp install from github in Colab. Is there any dependency on the latest PyArrow 1.0.0 ? Is it yet to be made generally available ?
50
Issues: Adding a FAISS or Elastic Search index to a Dataset It seems the DPRContextEncoder, DPRContextEncoderTokenizer cited[ in this documentation](https://huggingface.co/nlp/faiss_and_ea.html) is not implemented ? It didnot work with the standard nlp installation . Also, I couldn't find or use it with the latest nlp install from github in Colab. Is there any dependency on the latest PyArrow 1.0.0 ? Is it yet to be made generally available ? `DPRContextEncoder` and `DPRContextEncoderTokenizer` will be available in the next release of `transformers`. Right now you can experiment with it by installing `transformers` from the master branch. You can also check the docs of DPR [here](https://huggingface.co/transformers/master/model_doc/dpr.html). Moreover all the indexing features will also be available in the next release of `nlp`.
[ 0.03650180622935295, -0.14092513918876648, -0.07937222719192505, -0.1369616836309433, -0.15599094331264496, -0.32423296570777893, -0.1591324657201767, 0.182187020778656, -0.3461932837963104, 0.015833847224712372, -0.06638821959495544, 0.32067620754241943, -0.11251895874738693, -0.044295988976955414, 0.04479026049375534, -0.24587500095367432, 0.24759605526924133, 0.41393154859542847, 0.1482360064983368, -0.15518273413181305, -0.05327615886926651, 0.2191123366355896, -0.2554687261581421, 0.046706028282642365, -0.4506136178970337, 0.1217011883854866, -0.41231873631477356, -0.2625604569911957, -0.1536475569009781, -0.5197573304176331, 0.47824347019195557, 0.12435974180698395, 0.26784035563468933, 0.07432420551776886, -0.00011794937745435163, -0.022439997643232346, 0.5727149248123169, 0.06420877575874329, -0.10993047058582306, 0.10773967951536179, 0.04505922645330429, -0.012622558511793613, 0.5089784264564514, -0.06820950657129288, -0.04915303736925125, -0.313418984413147, 0.20579595863819122, 0.5061594247817993, 0.337870717048645, 0.0675184428691864, 0.12060332298278809, -0.017821406945586205, 0.349801629781723, -0.021093659102916718, 0.4944708049297333, 0.10880395770072937, -0.1879487931728363, -0.06029297783970833, 0.4111688733100891, 0.016482949256896973, -0.03692763298749924, 0.06354603171348572, 0.1623753160238266, -0.23191653192043304, 0.11690972000360489, 0.21940730512142181, 0.14128988981246948, -0.3700340986251831, -0.010380394756793976, 0.12500466406345367, 0.24877747893333435, -0.16830110549926758, -0.46900561451911926, -0.13588280975818634, 0.013143879361450672, -0.3554193675518036, 0.3728211224079132, -0.2848742604255676, -0.12118440866470337, 0.1636745035648346, -0.029998822137713432, -0.2509264647960663, -0.16113102436065674, 0.32470703125, -0.18132205307483673, 0.5299862623214722, 0.060514070093631744, -0.2540726065635681, 0.23101964592933655, -0.24157442152500153, 0.1807149201631546, 0.10006394982337952, 0.017224878072738647, 0.3674333989620209, -0.13819311559200287, -0.2774772644042969, 0.22773945331573486, 0.11339417099952698, -0.1607009470462799, 0.03224966302514076, -0.40910786390304565, 0.14597319066524506, 0.14597679674625397, 0.08799927681684494, -0.16911937296390533, 0.25710272789001465, 0.10858350992202759, -0.08994538336992264, 0.24590009450912476, -0.4051269590854645, 0.11257348954677582, 0.1378309279680252, 0.046691641211509705, 0.16229280829429626, -0.36344602704048157, -0.3564535975456238, -0.15489248931407928, -0.1499222218990326, 0.05513746291399002, -0.2625107169151306, -0.22479316592216492, -0.3351934254169464, -0.11806773394346237, 0.29784244298934937, 0.1253291666507721, -0.39707648754119873, 0.07241334766149521, 0.1841660737991333, -0.13411663472652435, 0.0026783812791109085, -0.06408660858869553, -0.15699799358844757, -0.175543874502182, 0.26454952359199524, 0.2724643647670746, -0.30284640192985535, 0.162821426987648, -0.19748979806900024, -0.22745810449123383, 0.2945091128349304, -0.27959075570106506, 0.12166331708431244, -0.00802815705537796, 0.2258056253194809, -0.1684643030166626, -0.10235854983329773, -0.46555981040000916, -0.16203618049621582, -0.2403615117073059, 0.06331990659236908, -0.06468500941991806, -0.2811257541179657, -0.3323865234851837, 0.11537306010723114, -0.2723728120326996, -0.27523913979530334, 0.36536461114883423, 0.6273084282875061, -0.10543297976255417, -0.14637546241283417, 0.03708217293024063, 0.11171766370534897, 0.26490598917007446, -0.09083195775747299, 0.12790179252624512, -0.06697490811347961, -0.23927342891693115, -0.38738322257995605, -0.11928874254226685, 0.1379828155040741, 0.027055583894252777, 0.22127769887447357, -0.2794342339038849, 0.24512964487075806, 0.029138831421732903, 0.5474950075149536, 0.6518901586532593, -0.2099926471710205, -0.127574622631073, 0.06076137349009514, 0.12204566597938538, -0.24432799220085144, -0.0022640377283096313, -0.1838950365781784, 0.13569840788841248, -0.030751939862966537, -0.02003747969865799, 0.25759243965148926, 0.05760093033313751, -0.3025505244731903, -0.27305760979652405, -0.3634375333786011, 0.32746678590774536, 0.37708237767219543, 0.15714424848556519, -0.07950293272733688, 0.23274528980255127, -0.30326658487319946, -0.0990578755736351, -0.0700976699590683, -0.03422576189041138, 0.1696019023656845, 0.1677805334329605, 0.07993918657302856, 0.3260691463947296, -0.2400522232055664, -0.10483851283788681, -0.0388668067753315, -0.6121025085449219, 0.5534064769744873, -0.1013176292181015, 0.02614074945449829, 0.035775329917669296, 0.013710951432585716, 0.005804937332868576, -0.3206295967102051, 0.016150709241628647, -0.11234056949615479, 0.2814396321773529, 0.1460617035627365, -0.3020924925804138, -0.06395665556192398, 0.38132208585739136, 0.08597402274608612, -0.2923623025417328, 0.40718623995780945, -0.22095970809459686, -0.5338466763496399, 0.04976137727499008, 0.2604350745677948, 0.09687191247940063, -0.14648227393627167, -0.017007173970341682, 0.10787934809923172, -0.30018436908721924, -0.1210716962814331, 0.2546682357788086, 0.18516716361045837, 0.20655140280723572, -0.472092866897583, 0.011243540793657303, 0.08189207315444946, -0.0036513747181743383, -0.016153816133737564, -0.09213433414697647, 0.2416178584098816, 0.4846384525299072, 0.09552034735679626, 0.23774902522563934, -0.1293531358242035, 0.27882570028305054, -0.19299916923046112, 0.045929037034511566, 0.08984959125518799, 0.15394049882888794, -0.0809655636548996, 0.20042181015014648, 0.0485231839120388, -0.20477022230625153, 0.14113034307956696, 0.28661638498306274, -0.21455904841423035, 0.033679381012916565, 0.5055496692657471, -0.20395928621292114, -0.29531535506248474, 0.002782205119729042, -0.4623141586780548, 0.21440854668617249, 0.3736824691295624, -0.09189125895500183, -0.1253003031015396, -0.20863503217697144, -0.27703046798706055, 0.2586477994918823, 0.0922292172908783, -0.07395190000534058, -0.07278385013341904, 0.3840743601322174, 0.16887035965919495, -0.24304109811782837, -0.4180769622325897, -0.07684273272752762, -0.09940673410892487, -0.027301330119371414, -0.0034198779612779617, -0.2512783408164978, -0.41781625151634216, 0.06910322606563568, -0.16398681700229645, -0.43511784076690674, -0.19907517731189728, 0.4360964894294739, -0.22164219617843628, -0.06735450029373169, 0.47330033779144287, 0.1288909614086151, 0.23707228899002075, -0.14314401149749756, 0.007105302065610886, -0.4106118679046631, -0.21033267676830292, -0.5618738532066345, 0.019208308309316635, -0.1001330241560936, 0.22543801367282867, 0.0012151207774877548, 0.06464579701423645, 0.21621428430080414, 0.2121964693069458, -0.7024004459381104, 0.3988605737686157, -0.08643581718206406, 0.262784481048584, -0.1488773375749588, -0.5324490070343018, -0.22677375376224518, -0.4946589171886444, 0.007794404402375221, -0.19521695375442505, -0.10206566005945206, 0.0882287248969078, -0.060255348682403564, -0.22693227231502533, -0.10903456807136536, -0.38140755891799927, -0.5280779004096985, -0.15704625844955444, 0.20401322841644287, -0.06790996342897415, 0.1073896586894989, 0.31811287999153137, -0.050650693476200104, 0.11002194881439209, -0.21289430558681488, 0.004577972460538149, -0.023525137454271317, 0.3745417296886444, 0.6374520659446716, -0.06003899127244949, -0.3186366856098175, -0.2763057351112366, -0.3181280493736267, -0.059360843151807785, 0.14652962982654572, -0.11406917870044708, 0.11440979689359665, -0.21334879100322723, 0.09330685436725616, 0.2897825837135315, 0.22703146934509277, 0.5762736797332764, 0.14081338047981262, -0.11085861921310425, 0.05716285854578018, -0.24298310279846191, 0.14318488538265228, 0.19347083568572998, 0.391470730304718, -0.19204875826835632, -0.05818670243024826, -0.2578210234642029, 0.7521787881851196, -0.1656462848186493, -0.3004692792892456, 0.3863743245601654, 0.07965286076068878, 0.12357623875141144, 0.02498246356844902, -0.11620471626520157, 0.201102614402771, 0.03110283613204956, 0.09220095723867416, 0.4274141192436218, 0.06002416834235191, -0.7173543572425842, -0.20913571119308472, -0.07137362658977509, -0.36077094078063965, -0.07381892949342728, 0.010171052068471909, 0.23643635213375092, 0.332514226436615, -0.009452437981963158, 0.05437003821134567, -0.1251540631055832, -0.24960049986839294, 0.0913432240486145, 0.01564302295446396, 0.04759442061185837, -0.10019766539335251, 0.07039493322372437, -0.3965111970901489, -0.2799775302410126, 0.3130532503128052, 0.2775227725505829, 0.12955333292484283, -0.09855102002620697, 0.014092355966567993, 0.30316162109375, 0.046434033662080765, 0.473294198513031, -0.0971064567565918, -0.28178757429122925, 0.3034760653972626, 0.18763859570026398, -0.36343473196029663, -0.06936170905828476, -0.41062620282173157, 0.12943920493125916, 0.4587608873844147, 0.22167010605335236, -0.22736644744873047, -0.025594711303710938, 0.11462971568107605, -0.3202499747276306, -0.12481178343296051, -0.35082653164863586, -0.13689164817333221, -0.16140234470367432, -0.048023466020822525, 0.008691161870956421, -0.03886862099170685, 0.12234901636838913, -0.11722531914710999, -0.12304605543613434, -0.14394183456897736, -0.015190626494586468, -0.05308853089809418, 0.37895628809928894, -0.010701360180974007, -0.2664451003074646, 0.06140385940670967, 0.1220490038394928, -0.06385855376720428, 0.06914248317480087, 0.06675392389297485, 0.10882461071014404, 0.05505749583244324, 0.21268552541732788, 0.05443863198161125, 0.41076505184173584, 0.28986045718193054, 0.04063033312559128, 0.3420209288597107, -0.19642166793346405, 0.038148730993270874, -0.0950252041220665, -0.18676206469535828, 0.3242320418357849, -0.01634635403752327, -0.07340369373559952, 0.1530248373746872, 0.6108980774879456, 0.04100776091217995, -0.24921318888664246, -0.29419460892677307, 0.4948923587799072, -0.20217549800872803, 0.9087716341018677, 0.017032966017723083, 1.1333749294281006, 0.13969236612319946, 0.061103761196136475, 0.24625477194786072, -0.08421298116445541, 0.603317141532898, -0.40796995162963867, 0.39658409357070923, -0.18738462030887604, 0.14779791235923767, 0.04544207453727722, -0.15106377005577087, 0.09598123282194138, 0.12722770869731903, -0.4280607998371124, 0.27062469720840454, 0.5491980314254761, -0.3083287179470062, 0.19350793957710266, 0.4062751829624176, 0.27133509516716003, -0.14100036025047302, -0.31171032786369324, 0.04274250566959381, 0.13936538994312286, 0.3951970934867859, 0.015700317919254303, -0.4653589129447937, -0.18145529925823212, -0.16942162811756134, -0.17138053476810455, 0.2771301567554474, 0.19369807839393616, 0.10361813753843307, 0.641237735748291, -0.010770544409751892, 0.34173399209976196, -0.14036960899829865, 0.14610880613327026, -0.22616185247898102, -0.3170701563358307, 0.3154670298099518, -0.1712605357170105, -0.07215387374162674, 0.14936800301074982, 0.09743254631757736, 0.42822781205177307, -0.08954565227031708, -0.2788541316986084, 0.14906898140907288, 0.02209562435746193, -0.1760275661945343, -0.23147837817668915, -0.22736193239688873, -0.4244581460952759, -0.059706494212150574, 0.38944485783576965, 0.10865452140569687, -0.04487374424934387, -0.08189565688371658, 0.1337122768163681, 0.06572780013084412, -0.060847267508506775, 0.3853740394115448, 0.16242067515850067, 0.10915839672088623, -0.1178535670042038, 0.4234659671783447, 0.1116664707660675, -0.04485640302300453, 0.29960206151008606, 0.08489024639129639, -0.3486422300338745, 0.007348604500293732, -0.5456365346908569, -0.016850559040904045, -0.4922616481781006, -0.055906299501657486, 0.028560373932123184, -0.28652429580688477, 0.08791127055883408, 0.2721908688545227, 0.16716603934764862, -0.050201475620269775, -0.4117504358291626, 0.06142552196979523, -0.1304938793182373, 0.4549991488456726, 0.009422574192285538, 0.13886557519435883, -0.05783335864543915, 0.23274993896484375, 0.25301703810691833, 0.422158420085907, -0.2839444577693939, -0.14414803683757782, -0.14752636849880219, 0.23859918117523193, -0.2370135486125946, -0.4023131728172302, 0.14791598916053772, 0.023820076137781143, 0.011410368606448174, 0.08194288611412048, -0.09606155008077621, -0.07423271238803864, -0.03926197811961174, 0.13499997556209564, 0.26215192675590515, -0.1402873992919922, -0.32607191801071167, -0.00022819265723228455, 0.10002771019935608, -0.09544569253921509, -0.09836806356906891, -0.2853766083717346, 0.0039756447076797485, 0.2688608169555664, 0.31016474962234497, -0.19687414169311523, 0.2346114069223404, 0.12851130962371826, 0.1994066834449768, 0.40683799982070923, 0.25515490770339966, 0.2564767003059387, -0.14162027835845947, -0.07473696768283844, 0.1387980431318283, 0.1374046355485916, 0.12610086798667908, 0.058917086571455, 0.2528769373893738, -0.3256136178970337, -0.2401995211839676, -0.2625831067562103, 0.1354915201663971, 0.24620431661605835, -0.11962826550006866, -0.11887500435113907, 0.4286918640136719, 0.09114060550928116, -0.31637468934059143, -0.0043921987526118755, 0.36975550651550293, 0.2083338350057602, -0.07832939922809601, -0.09643783420324326, 0.5143995881080627, 0.027367815375328064, 0.11320245265960693, 0.1560065746307373, 0.1627742201089859, 0.3030822277069092, -0.31915512681007385, -0.019468124955892563, 0.09856602549552917, 0.0524456650018692, 0.43923431634902954, 0.05368641018867493, 0.1793842315673828, 0.19577141106128693, -0.12822535634040833, 0.22073763608932495, -0.25645753741264343, 0.26052436232566833, 0.24636948108673096, 0.09807130694389343, 0.029284942895174026, 0.041711606085300446, 0.6925806999206543, 0.013314776122570038, 0.10296754539012909, 0.3768167197704315, 0.40463966131210327, -0.14693306386470795, -0.13156649470329285, 0.37303024530410767, 0.039192453026771545, -0.31563255190849304, 0.3761720657348633, -0.036409277468919754, -0.21044418215751648, -0.025673700496554375, -0.06675641238689423, -0.17850545048713684, 0.04510773718357086, 0.044832807034254074, -0.13648870587348938, -0.2802780866622925, 0.197108656167984, 0.11873184889554977, 0.3354719579219818, 0.18927015364170074, 0.3666154742240906, -0.22456006705760956, -0.23135975003242493, 0.042457934468984604, 0.4983384609222412, 0.22460956871509552, 0.1280287802219391, -0.6307684183120728, 0.06057504564523697, -0.09176869690418243, -0.1626628339290619, -0.03577464446425438, 0.3476504683494568, 0.14038491249084473, 0.29713693261146545, -0.14981862902641296, -0.009017612785100937, -0.0943761095404625, -0.12138836085796356, 0.009582124650478363, 0.26881083846092224, -0.0016037952154874802, 0.17078888416290283, 0.23495255410671234, -0.22774827480316162, 0.09783382713794708, -0.16150081157684326, -0.4631519913673401, 0.20859752595424652, 0.21343673765659332, -0.1320757418870926, -0.059651296585798264, 0.009456081315875053, 0.061069197952747345, 0.1110362559556961, 0.4639381766319275, 0.5046030879020691, 0.46342024207115173, 0.05345183610916138, -0.10978391766548157, -0.06321720033884048, 0.06615050137042999, -0.004286225885152817, 0.006569819524884224, 0.2461320012807846, 0.16954068839550018, -0.013082727789878845, 0.04586805775761604, -0.016437694430351257, 0.22428853809833527, 0.009721864946186543, -0.02795150876045227, -0.334608793258667, 0.20386487245559692, -0.30204784870147705, -0.06167915463447571, -0.1221170723438263, 0.2529072165489197, 0.04355410113930702, -0.12629300355911255, -0.07403767853975296, -0.2473907321691513, -0.006357166916131973, 0.1367197483778, 0.07003005594015121, 0.4863358736038208, 0.2643500566482544, 0.28584516048431396, -0.1685403287410736, 0.3572322130203247, -0.14913016557693481, -0.26840847730636597, -0.03692343086004257, -0.09440716356039047, -0.04096787050366402, -0.08801237493753433, -0.23587240278720856, -0.203302800655365, -0.19651080667972565, 0.0558076836168766, -0.2785724103450775, -0.0634651780128479, -0.11411523073911667, -0.05479934811592102, -0.26861339807510376, 0.0321199893951416, -0.038670096546411514, 0.07909226417541504, -0.07982958853244781, 0.17047326266765594, -0.26916244626045227, -0.2769070565700531, 0.4201644957065582, -0.42253199219703674, 0.008114848285913467, 0.04344829544425011, 0.026599042117595673, 0.6671047210693359, 0.11056680977344513, -0.550387978553772, -0.2402535080909729, 0.08079706132411957, 0.023899467661976814, -0.11518540978431702, 0.08764997124671936, 0.3364039659500122, -0.19654928147792816, -0.20176799595355988, 0.005570515990257263, 0.24253582954406738, 0.09386051446199417, -0.375927597284317, -0.22070463001728058 ]
https://github.com/huggingface/datasets/issues/439
Issues: Adding a FAISS or Elastic Search index to a Dataset
@lhoestq I tried installing transformer from the master branch. Python imports for DPR again didnt' work. Anyways, Looking forward to trying it in the next release of nlp
It seems the DPRContextEncoder, DPRContextEncoderTokenizer cited[ in this documentation](https://huggingface.co/nlp/faiss_and_ea.html) is not implemented ? It didnot work with the standard nlp installation . Also, I couldn't find or use it with the latest nlp install from github in Colab. Is there any dependency on the latest PyArrow 1.0.0 ? Is it yet to be made generally available ?
28
Issues: Adding a FAISS or Elastic Search index to a Dataset It seems the DPRContextEncoder, DPRContextEncoderTokenizer cited[ in this documentation](https://huggingface.co/nlp/faiss_and_ea.html) is not implemented ? It didnot work with the standard nlp installation . Also, I couldn't find or use it with the latest nlp install from github in Colab. Is there any dependency on the latest PyArrow 1.0.0 ? Is it yet to be made generally available ? @lhoestq I tried installing transformer from the master branch. Python imports for DPR again didnt' work. Anyways, Looking forward to trying it in the next release of nlp
[ 0.05924319848418236, -0.01417938619852066, -0.12304705381393433, -0.17468374967575073, -0.21370063722133636, -0.30943411588668823, -0.2024400383234024, 0.18782272934913635, -0.27312716841697693, -0.018002673983573914, 0.12586110830307007, 0.4488866329193115, -0.12000582367181778, 0.012810425832867622, 0.02721221372485161, -0.20129108428955078, 0.27565109729766846, 0.4141334593296051, 0.18807746469974518, -0.18029698729515076, -0.063946433365345, 0.26606184244155884, -0.3757493495941162, 0.10843010246753693, -0.37333932518959045, 0.11951273679733276, -0.4001515209674835, -0.17946821451187134, -0.20722918212413788, -0.5200278759002686, 0.49828284978866577, 0.12001347541809082, 0.1677703559398651, -0.005415283143520355, -0.00011686447396641597, -0.08343715965747833, 0.594962477684021, 0.046775154769420624, -0.06841737031936646, 0.05200783908367157, 0.047599777579307556, -0.11528335511684418, 0.5010395646095276, -0.04782344773411751, 0.016451694071292877, -0.3274896740913391, 0.20201972126960754, 0.44458097219467163, 0.2767573595046997, 0.14241477847099304, 0.13963624835014343, -0.14050161838531494, 0.3247394263744354, -0.039744723588228226, 0.4015783965587616, -0.044249892234802246, -0.124200738966465, -0.08190980553627014, 0.44570019841194153, -0.07743113487958908, 0.006358787417411804, -0.04404515027999878, 0.09880553185939789, -0.18190644681453705, 0.10662190616130829, 0.1319276988506317, 0.23206433653831482, -0.38284793496131897, -0.022904053330421448, 0.04977693036198616, 0.1373976320028305, -0.08453718572854996, -0.3730427324771881, -0.12819251418113708, 0.10723112523555756, -0.4572899639606476, 0.4009217619895935, -0.2419733703136444, -0.21648009121418, 0.10593873262405396, -0.027304787188768387, -0.3213634192943573, -0.20799334347248077, 0.31748729944229126, -0.21342164278030396, 0.4697525203227997, 0.051469702273607254, -0.22006884217262268, 0.23390673100948334, -0.22005368769168854, 0.2091207057237625, 0.1614212840795517, 0.004657246172428131, 0.3524920642375946, -0.0736418068408966, -0.20802746713161469, 0.2646896541118622, 0.2331189215183258, -0.177054762840271, 0.08179488778114319, -0.42863988876342773, 0.15959203243255615, 0.09531594067811966, 0.081504225730896, -0.1969236433506012, 0.20004598796367645, 0.0850958526134491, -0.1773299276828766, 0.27520230412483215, -0.31916436553001404, 0.09640173614025116, 0.22662505507469177, -0.021395154297351837, 0.07575812190771103, -0.4990966022014618, -0.32580146193504333, -0.16402775049209595, -0.1835739016532898, -0.0718296468257904, -0.16958123445510864, -0.3082045316696167, -0.27475231885910034, -0.17425379157066345, 0.20967146754264832, 0.07246975600719452, -0.21161338686943054, 0.2005259394645691, 0.20568636059761047, -0.1665836125612259, -0.09481927752494812, -0.02242402918636799, -0.04035065695643425, -0.2784212529659271, 0.20055590569972992, 0.256753146648407, -0.2662537097930908, 0.22356939315795898, -0.1683194786310196, -0.23479042947292328, 0.33735233545303345, -0.2714017629623413, 0.14394426345825195, -0.034865446388721466, 0.13483935594558716, -0.12386497855186462, -0.1286255419254303, -0.4871383011341095, -0.20919567346572876, -0.1740943193435669, 0.049970872700214386, -0.012680478394031525, -0.16846947371959686, -0.3270561695098877, 0.14551131427288055, -0.22880876064300537, -0.3878190517425537, 0.4384016692638397, 0.6058791279792786, -0.15491804480552673, -0.0916505679488182, 0.0036905109882354736, 0.0008418150246143341, 0.3148562014102936, -0.10323058068752289, 0.10832183808088303, -0.12961088120937347, -0.3205520510673523, -0.3506694734096527, -0.11140117794275284, 0.13021911680698395, 0.08366995304822922, 0.20017115771770477, -0.20397664606571198, 0.20880413055419922, 0.08425626158714294, 0.5598306059837341, 0.7137578129768372, -0.24940471351146698, -0.0825682282447815, 0.09015994518995285, 0.13994185626506805, -0.23110553622245789, 0.0015102848410606384, -0.1959904134273529, 0.12998047471046448, -0.03486379235982895, 0.06938401609659195, 0.36182093620300293, 0.08507105708122253, -0.3851502239704132, -0.29086992144584656, -0.4074510633945465, 0.34963715076446533, 0.33681267499923706, 0.23581580817699432, -0.0990295335650444, 0.14160361886024475, -0.2938738167285919, -0.03597287833690643, -0.12763908505439758, 0.005338028073310852, 0.0921129584312439, 0.09348616003990173, 0.1497267782688141, 0.247984379529953, -0.22447627782821655, 0.06103898212313652, -0.05967132747173309, -0.5969669818878174, 0.535866916179657, 0.031545013189315796, 0.10641604661941528, 0.021718289703130722, -0.03048790991306305, -0.042189184576272964, -0.3593745231628418, 0.04651506990194321, -0.05844302475452423, 0.34877660870552063, 0.2340882271528244, -0.285308837890625, -0.08359826356172562, 0.28473803400993347, 0.0492270328104496, -0.209005668759346, 0.31892362236976624, -0.263842910528183, -0.5850799083709717, 0.13591177761554718, 0.37341853976249695, 0.0751916691660881, -0.07196979224681854, 0.061220984905958176, 0.07646485418081284, -0.36009106040000916, -0.15456421673297882, 0.1580304205417633, 0.024553045630455017, 0.21976767480373383, -0.3405792713165283, 0.049457281827926636, 0.03650888800621033, -0.010200316086411476, 0.028203032910823822, 0.04330642521381378, 0.2037341296672821, 0.527142345905304, 0.0429544597864151, 0.2765483856201172, -0.015038840472698212, 0.3046872615814209, -0.21036064624786377, 0.08349290490150452, 0.12266895174980164, 0.17658817768096924, -0.150162935256958, 0.1475784182548523, -0.06685644388198853, -0.3327256441116333, 0.22879332304000854, 0.29196351766586304, -0.1852935403585434, 0.0069526247680187225, 0.4050532281398773, -0.16853368282318115, -0.3128296732902527, 0.032331496477127075, -0.5013372898101807, 0.3017619848251343, 0.3670203685760498, -0.12852375209331512, -0.07405834645032883, -0.33264943957328796, -0.35645347833633423, 0.29850682616233826, 0.005343340337276459, -0.10359136015176773, -0.10531444102525711, 0.36902204155921936, 0.1527140736579895, -0.24607661366462708, -0.3854290246963501, -0.04785391688346863, -0.0822339802980423, -0.023408815264701843, -0.006143033504486084, -0.4174496531486511, -0.5681114792823792, 0.09786874055862427, -0.14543356001377106, -0.309905469417572, -0.2747792899608612, 0.4315371513366699, -0.1552889496088028, -0.002464061602950096, 0.45692089200019836, 0.08840888738632202, 0.27360907196998596, -0.15152175724506378, 0.10129289329051971, -0.4035409092903137, -0.256089448928833, -0.5996544361114502, 0.046174634248018265, -0.0070877657271921635, 0.27017614245414734, 0.08835016936063766, 0.027943314984440804, 0.12300927937030792, 0.16593389213085175, -0.6194008588790894, 0.34827545285224915, -0.1487366259098053, 0.2856455445289612, -0.09405380487442017, -0.551142692565918, -0.2057676762342453, -0.42682361602783203, -0.054747555404901505, -0.22710885107517242, -0.14688199758529663, 0.018863163888454437, -0.05729172006249428, -0.32295703887939453, -0.14802324771881104, -0.40843403339385986, -0.4351571202278137, -0.14015264809131622, 0.21424175798892975, 0.03953889384865761, 0.05885111540555954, 0.19757436215877533, -0.07571128010749817, 0.18707740306854248, -0.17901955544948578, 0.07745237648487091, -0.04847178980708122, 0.40859758853912354, 0.5637877583503723, -0.0856352373957634, -0.4115513861179352, -0.16694621741771698, -0.2422402799129486, 0.028518399223685265, 0.14716246724128723, -0.182851642370224, 0.05803463235497475, -0.14036214351654053, 0.16326403617858887, 0.2589234709739685, 0.25892165303230286, 0.5880926847457886, 0.0734352245926857, -0.11345456540584564, 0.030512884259223938, -0.21203260123729706, 0.1438654214143753, 0.08834768831729889, 0.3923083245754242, -0.11755029112100601, -0.022172141820192337, -0.20292405784130096, 0.6386983394622803, -0.15494035184383392, -0.3184790015220642, 0.3930824100971222, 0.06978960335254669, 0.12988168001174927, 0.005489878356456757, -0.08381296694278717, 0.29434648156166077, 0.0505584254860878, 0.20660758018493652, 0.38360023498535156, -0.02162947505712509, -0.691345751285553, -0.21003898978233337, -0.011665267869830132, -0.30254197120666504, 0.007762432098388672, -0.10398785769939423, 0.06149374693632126, 0.3284471035003662, 0.012121070176362991, 0.053396470844745636, 0.007418310269713402, -0.21606209874153137, 0.09847651422023773, -0.011918395757675171, 0.09436768293380737, -0.08914589136838913, 0.04296925291419029, -0.44136059284210205, -0.2340088188648224, 0.34784191846847534, 0.17162306606769562, 0.15266165137290955, -0.1299135535955429, -0.0009560659527778625, 0.2992299199104309, -0.024338800460100174, 0.33167651295661926, -0.12494600564241409, -0.33915024995803833, 0.4021455645561218, 0.30339401960372925, -0.3724465072154999, -0.1119728833436966, -0.3990401327610016, 0.17474310100078583, 0.4907321035861969, 0.20353545248508453, -0.11726692318916321, -0.0463109090924263, 0.1898668259382248, -0.33916133642196655, -0.05707802250981331, -0.2467091977596283, -0.11301979422569275, -0.2649119794368744, -0.08472704887390137, 0.0074502453207969666, -0.07211924344301224, 0.13369324803352356, -0.18442164361476898, -0.05504473298788071, -0.1349463164806366, -0.015063411556184292, -0.04776223003864288, 0.33564993739128113, -0.11102735251188278, -0.22251562774181366, 0.07345134019851685, 0.012491375207901001, 0.05516904965043068, 0.03207577019929886, 0.01169871911406517, 0.19283360242843628, 0.1264001727104187, 0.2378137707710266, -0.04012017324566841, 0.4711706042289734, 0.3158338665962219, 0.04173756390810013, 0.3017105162143707, -0.39493194222450256, 0.03747795149683952, -0.0748535618185997, -0.1443202644586563, 0.37661153078079224, -0.0541476309299469, -0.012925435788929462, 0.12146133184432983, 0.44069454073905945, 0.11192965507507324, -0.22884422540664673, -0.2961523234844208, 0.4306161403656006, -0.2071007937192917, 0.8095927834510803, 0.04169948771595955, 1.0631247758865356, 0.2075321525335312, 0.10212770849466324, 0.321492075920105, -0.07763855904340744, 0.6415964365005493, -0.3527666926383972, 0.3848254084587097, -0.20348188281059265, 0.36403703689575195, 0.05026773363351822, -0.1063917875289917, 0.23133212327957153, 0.06510680913925171, -0.4607401192188263, 0.3050266206264496, 0.631683349609375, -0.5515397787094116, 0.2387441247701645, 0.2986891567707062, 0.22887557744979858, -0.10006880760192871, -0.32621559500694275, 0.06511159241199493, 0.14588269591331482, 0.3255539834499359, 0.029945552349090576, -0.39020437002182007, -0.2425747662782669, -0.1544923186302185, -0.18282794952392578, 0.3070859909057617, 0.2162064164876938, 0.02566540800035, 0.5504892468452454, -0.048051558434963226, 0.34290555119514465, -0.18307417631149292, 0.20199531316757202, -0.22145183384418488, -0.2795243561267853, 0.20592713356018066, -0.1806643009185791, -0.18639107048511505, 0.2789822220802307, 0.11085615307092667, 0.47830402851104736, -0.17852583527565002, -0.24716722965240479, 0.2273504137992859, -0.01198518555611372, -0.1021621897816658, -0.41089051961898804, -0.17237789928913116, -0.38012242317199707, 0.03145165741443634, 0.24456144869327545, 0.13891664147377014, 0.07636977732181549, -0.03906398266553879, 0.1476030796766281, 0.02757282555103302, -0.030405687168240547, 0.45207643508911133, 0.097859226167202, 0.14626343548297882, -0.07964438199996948, 0.3522554039955139, 0.08280564099550247, -0.10169853270053864, 0.33601951599121094, 0.039118554443120956, -0.31506645679473877, -0.03595037758350372, -0.5736914277076721, -0.05913978070020676, -0.3388129770755768, -0.10817411541938782, 0.07872604578733444, -0.2951440215110779, 0.0935453325510025, 0.2771797776222229, 0.0542384572327137, -0.03784498572349548, -0.2932753264904022, 0.001648440957069397, -0.008525221608579159, 0.40361571311950684, -0.09167751669883728, 0.048351459205150604, -0.03716959059238434, 0.3229557275772095, 0.31996017694473267, 0.3426152467727661, -0.2777293920516968, -0.07343371957540512, -0.1637008935213089, 0.2091822475194931, -0.16362982988357544, -0.34711629152297974, -0.016035059466958046, 0.04604495316743851, 0.031934693455696106, 0.092989481985569, -0.02887924388051033, -0.08721207827329636, -0.006376035511493683, 0.11653882265090942, 0.3504096567630768, -0.1507750302553177, -0.1828802227973938, -0.07519438117742538, 0.03937011957168579, 0.05810188129544258, -0.11206430196762085, -0.3036644458770752, -0.10696534812450409, 0.3208750784397125, 0.20558112859725952, -0.06684309989213943, 0.36381447315216064, 0.16546198725700378, 0.1632007360458374, 0.4954347610473633, 0.17438094317913055, 0.25578242540359497, -0.006272757425904274, -0.03771675378084183, 0.11783544719219208, 0.10684019327163696, -0.00027905404567718506, 0.11375712603330612, 0.2845744490623474, -0.3544379472732544, -0.23787450790405273, -0.32080262899398804, 0.12122100591659546, 0.37108540534973145, -0.17730148136615753, -0.10210543870925903, 0.5498794913291931, 0.10401973128318787, -0.3391270339488983, 0.044836416840553284, 0.3776494860649109, 0.18362274765968323, -0.1782507598400116, -0.16130584478378296, 0.5033274292945862, -0.12371885776519775, 0.06557268649339676, 0.16938480734825134, 0.028103943914175034, 0.19257017970085144, -0.32022160291671753, -0.11766712367534637, 0.12803812325000763, -0.02565949782729149, 0.29177120327949524, 0.06848828494548798, 0.14585357904434204, 0.22147800028324127, -0.03405117243528366, 0.16997171938419342, -0.13142478466033936, 0.2671307921409607, 0.20831771194934845, 0.10475276410579681, -0.045194368809461594, 0.018085822463035583, 0.6436560153961182, -0.003591887652873993, 0.09949798136949539, 0.449921578168869, 0.35442787408828735, -0.19105549156665802, -0.09708704799413681, 0.4414845407009125, 0.017756642773747444, -0.32827603816986084, 0.2047422081232071, -0.04658772796392441, -0.20827370882034302, -0.0006450489163398743, -0.047200631350278854, -0.10114580392837524, 0.12033699452877045, 0.08429906517267227, -0.19946514070034027, -0.348993182182312, 0.14375871419906616, 0.028549298644065857, 0.3482126295566559, 0.23549336194992065, 0.38134485483169556, -0.29063642024993896, -0.20810502767562866, 0.06291674077510834, 0.5100594758987427, 0.3198826014995575, 0.2481946498155594, -0.6800211071968079, -0.06428822875022888, -0.15473927557468414, -0.13073065876960754, -0.11884833127260208, 0.44708821177482605, 0.2539404034614563, 0.30181095004081726, -0.10083183646202087, 0.0009343773126602173, -0.09103816747665405, 0.012266132980585098, 0.07309744507074356, 0.15656423568725586, -0.10251486301422119, 0.18448780477046967, 0.25337105989456177, -0.1798575520515442, 0.0738394558429718, -0.10976072400808334, -0.5304474830627441, 0.2042805701494217, 0.19036854803562164, -0.004753323271870613, -0.06751424074172974, -0.12933839857578278, 0.0647716373205185, 0.08524772524833679, 0.45046982169151306, 0.5197362899780273, 0.3963971436023712, 0.14085768163204193, -0.22113244235515594, -0.04733647033572197, 0.11545215547084808, -0.05043311044573784, -0.11426904797554016, 0.13081158697605133, 0.24895350635051727, 0.009739585220813751, 0.04869294539093971, -0.05113588273525238, 0.2500562369823456, 0.030925631523132324, -0.009008102118968964, -0.35276296734809875, 0.2127007395029068, -0.1986590474843979, -0.05649597942829132, -0.11718811094760895, 0.23766151070594788, 0.057197608053684235, -0.21423429250717163, -0.032686732709407806, -0.16929662227630615, 0.02337133139371872, 0.14508609473705292, 0.20617510378360748, 0.4772188365459442, 0.34723910689353943, 0.3181169033050537, -0.08006897568702698, 0.28274667263031006, -0.26546692848205566, -0.23036140203475952, -0.10086944699287415, -0.015666693449020386, -0.07276065647602081, -0.1788674294948578, -0.1909889429807663, -0.15511706471443176, -0.15086111426353455, 0.08010318875312805, -0.307598352432251, 0.03041999414563179, -0.11233510076999664, -0.061869293451309204, -0.2379005253314972, 0.11161095649003983, -0.11982637643814087, 0.10636268556118011, -0.14968663454055786, 0.2067834585905075, -0.37194716930389404, -0.22879289090633392, 0.334647536277771, -0.49122151732444763, -0.029173368588089943, 0.061373285949230194, 0.03296355903148651, 0.5240914225578308, 0.052262045443058014, -0.42739927768707275, -0.3150721490383148, 0.0883793905377388, 0.02202971652150154, -0.11358186602592468, 0.11764770746231079, 0.2750375270843506, -0.22033579647541046, -0.13016435503959656, -0.03673680126667023, 0.18774011731147766, 0.05692148953676224, -0.26481345295906067, -0.23743805289268494 ]
https://github.com/huggingface/datasets/issues/438
New Datasets: IWSLT15+, ITTB
Thanks Sam, we now have a very detailed tutorial and template on how to add a new dataset to the library. It typically take 1-2 hours to add one. Do you want to give it a try ? The tutorial on writing a new dataset loading script is here: https://huggingface.co/nlp/add_dataset.html And the part on how to share a new dataset is here: https://huggingface.co/nlp/share_dataset.html
**Links:** [iwslt](https://pytorchnlp.readthedocs.io/en/latest/_modules/torchnlp/datasets/iwslt.html) Don't know if that link is up to date. [ittb](http://www.cfilt.iitb.ac.in/iitb_parallel/) **Motivation**: replicate mbart finetuning results (table below) ![image](https://user-images.githubusercontent.com/6045025/88490093-0c1c8c00-cf67-11ea-960d-8dcaad2aa8eb.png) For future readers, we already have the following language pairs in the wmt namespaces: ``` wmt14: ['cs-en', 'de-en', 'fr-en', 'hi-en', 'ru-en'] wmt15: ['cs-en', 'de-en', 'fi-en', 'fr-en', 'ru-en'] wmt16: ['cs-en', 'de-en', 'fi-en', 'ro-en', 'ru-en', 'tr-en'] wmt17: ['cs-en', 'de-en', 'fi-en', 'lv-en', 'ru-en', 'tr-en', 'zh-en'] wmt18: ['cs-en', 'de-en', 'et-en', 'fi-en', 'kk-en', 'ru-en', 'tr-en', 'zh-en'] wmt19: ['cs-en', 'de-en', 'fi-en', 'gu-en', 'kk-en', 'lt-en', 'ru-en', 'zh-en', 'fr-de'] ```
63
New Datasets: IWSLT15+, ITTB **Links:** [iwslt](https://pytorchnlp.readthedocs.io/en/latest/_modules/torchnlp/datasets/iwslt.html) Don't know if that link is up to date. [ittb](http://www.cfilt.iitb.ac.in/iitb_parallel/) **Motivation**: replicate mbart finetuning results (table below) ![image](https://user-images.githubusercontent.com/6045025/88490093-0c1c8c00-cf67-11ea-960d-8dcaad2aa8eb.png) For future readers, we already have the following language pairs in the wmt namespaces: ``` wmt14: ['cs-en', 'de-en', 'fr-en', 'hi-en', 'ru-en'] wmt15: ['cs-en', 'de-en', 'fi-en', 'fr-en', 'ru-en'] wmt16: ['cs-en', 'de-en', 'fi-en', 'ro-en', 'ru-en', 'tr-en'] wmt17: ['cs-en', 'de-en', 'fi-en', 'lv-en', 'ru-en', 'tr-en', 'zh-en'] wmt18: ['cs-en', 'de-en', 'et-en', 'fi-en', 'kk-en', 'ru-en', 'tr-en', 'zh-en'] wmt19: ['cs-en', 'de-en', 'fi-en', 'gu-en', 'kk-en', 'lt-en', 'ru-en', 'zh-en', 'fr-de'] ``` Thanks Sam, we now have a very detailed tutorial and template on how to add a new dataset to the library. It typically take 1-2 hours to add one. Do you want to give it a try ? The tutorial on writing a new dataset loading script is here: https://huggingface.co/nlp/add_dataset.html And the part on how to share a new dataset is here: https://huggingface.co/nlp/share_dataset.html
[ -0.33348312973976135, -0.37220293283462524, -0.09247656166553497, 0.017887257039546967, -0.18270030617713928, 0.10935268551111221, 0.36885184049606323, 0.2643736004829407, -0.1256052553653717, 0.3148266077041626, -0.46133458614349365, -0.07763894647359848, -0.06480253487825394, 0.1805536448955536, 0.10165265202522278, 0.15591290593147278, 0.013673469424247742, -0.023578137159347534, -0.18101665377616882, -0.05436471849679947, -0.2652767300605774, 0.26641592383384705, -0.1272374391555786, -0.18157558143138885, -0.32803934812545776, 0.04832156002521515, -0.3616872727870941, 0.1481470763683319, -0.17817945778369904, -0.3179265260696411, -0.09628310799598694, 0.20186781883239746, 0.004357777535915375, 0.23684459924697876, -0.00010703551379265264, -0.19055232405662537, -0.07628186047077179, -0.0908375009894371, -0.3510013818740845, 0.10066215693950653, -0.26467201113700867, -0.2651139199733734, -0.1263941079378128, -0.2893672585487366, -0.387286901473999, -0.06717992573976517, -0.11511476337909698, -0.3258391320705414, 0.04245676100254059, 0.20007649064064026, 0.25929298996925354, 0.2519879937171936, -0.3639664053916931, -0.23191776871681213, 0.020440515130758286, -0.17258745431900024, -0.19831858575344086, -0.06941913068294525, 0.5608639717102051, 0.2720479965209961, -0.25472500920295715, 0.22210344672203064, -0.00034710392355918884, 0.19211725890636444, -0.0048932284116744995, 0.12117842584848404, 0.3246237337589264, -0.006518013775348663, -0.159353107213974, 0.408693790435791, 0.37406110763549805, -0.11641452461481094, -0.28300589323043823, -0.059363190084695816, -0.19007675349712372, -0.23035110533237457, -0.21050849556922913, 0.0816255733370781, -0.11966793239116669, 0.12493070960044861, -0.041516244411468506, 0.08680139482021332, -0.24729400873184204, 0.11618247628211975, -0.09231191873550415, 0.9784519672393799, -0.00900494959205389, -0.08942218869924545, -0.03425975516438484, -0.25455915927886963, -0.045578885823488235, -0.1130446195602417, 0.016511090099811554, -0.060128916054964066, -0.08616383373737335, -0.2744802236557007, 0.29247260093688965, 0.04346912354230881, -0.062224846333265305, 0.0590406097471714, 0.10297468304634094, 0.07115209102630615, 0.332505464553833, -0.09348971396684647, -0.2517029643058777, 0.05512499436736107, -0.13442155718803406, -0.40630221366882324, 0.092987060546875, -0.13099612295627594, 0.049163322895765305, 0.13832032680511475, 0.1221533715724945, -0.19842857122421265, -0.501650333404541, 0.00562638696283102, -0.10080680251121521, 0.008308615535497665, -0.18516048789024353, -0.06333623826503754, 0.1519848108291626, -0.21738357841968536, -0.09835879504680634, 0.15660332143306732, 0.03310345485806465, 0.012133315205574036, 0.14112648367881775, -0.01013704389333725, -0.24066142737865448, -0.2322075515985489, -0.15205968916416168, 0.10093079507350922, -0.20264430344104767, 0.028398441150784492, 0.3800959587097168, 0.5238027572631836, -0.04189830273389816, -0.018972503021359444, 0.21955052018165588, 0.40004876255989075, -0.06965397298336029, 0.10283321142196655, 0.7088273763656616, 0.15784913301467896, -0.09992966055870056, 0.0830124095082283, -0.09320101141929626, 0.10642144083976746, -0.28862273693084717, -0.06970395892858505, 0.22612425684928894, -0.11556021124124527, -0.09219471365213394, 0.271384596824646, -0.17846910655498505, -0.2367863655090332, 0.5732962489128113, 0.41838353872299194, -0.09489289671182632, -0.009186726063489914, -0.05276157706975937, 0.08094534277915955, -0.310098260641098, -0.12586189806461334, 0.08374845236539841, 0.22885984182357788, -0.5910977721214294, -0.11008293926715851, -0.13144990801811218, 0.21896633505821228, 0.22305627167224884, 0.11253136396408081, -0.04302351549267769, 0.16504822671413422, -0.22226350009441376, 0.3110179901123047, -0.016475580632686615, 0.01065470278263092, 0.11348209530115128, -0.039274413138628006, -0.1310182511806488, -0.1334380954504013, 0.42401790618896484, 0.191364124417305, 0.2322642058134079, -0.1136513277888298, -0.16478696465492249, 0.20352812111377716, -0.25174078345298767, 0.042108677327632904, -0.24513867497444153, -0.23006878793239594, 0.5268049240112305, 0.11101824045181274, 0.1924532949924469, -0.3725343346595764, 0.0999872162938118, 0.16590631008148193, 0.46895474195480347, -0.277391254901886, 0.13454316556453705, -0.1531641036272049, 0.30695641040802, -0.06783373653888702, 0.16365396976470947, -0.2083522379398346, -0.015485294163227081, 0.14241349697113037, -0.1754947006702423, 0.6150252223014832, 0.21487462520599365, 0.34198808670043945, 0.017672020941972733, -0.06503096222877502, -0.2481771856546402, -0.20176813006401062, 0.28063443303108215, 0.27543604373931885, -0.1205318421125412, -0.28365230560302734, -0.12000259757041931, -0.014104045927524567, -0.07942335307598114, -0.11260966956615448, -0.3751194477081299, 0.04133467376232147, -0.12443765252828598, -0.02307872846722603, 0.11000670492649078, 0.4384019374847412, 0.05606859549880028, -0.11760315299034119, -0.0888804942369461, 0.09165383875370026, -0.20732347667217255, 0.2806425094604492, 0.25975948572158813, 0.5066587328910828, 0.1799173206090927, -0.33029577136039734, 0.26401031017303467, -0.03704449534416199, 0.002061342354863882, -0.14708508551120758, 0.24588081240653992, 0.4308541417121887, -0.1414056271314621, 0.28911206126213074, 0.032219961285591125, -0.12047311663627625, 0.1530536413192749, -0.140721395611763, -0.17740555107593536, -0.2646361291408539, 0.2876602113246918, -0.0283268503844738, 0.030748184770345688, -0.03725110739469528, 0.3311648964881897, 0.3989805579185486, 0.41069671511650085, 0.10123980045318604, 0.0374431312084198, -0.12338308244943619, -0.08567238599061966, -0.11400926858186722, 0.19634293019771576, -0.14814043045043945, 0.1982426643371582, 0.39412692189216614, 0.29306840896606445, -0.006303144618868828, -0.008145670406520367, -0.26745370030403137, 0.36823251843452454, 0.08315925300121307, -0.08061199635267258, 0.3035699129104614, -0.10257287323474884, -0.07970073819160461, -0.3303620517253876, 0.046431031078100204, 0.0004444606602191925, -0.04679063707590103, 0.049088384956121445, 0.017367450520396233, -0.23491473495960236, -0.16080984473228455, -0.23347342014312744, -0.35516446828842163, -0.08006156980991364, -0.39917632937431335, 0.29407399892807007, -0.00919058546423912, -0.257459431886673, 0.14910097420215607, 0.09345237910747528, 0.5956975817680359, -0.1647152155637741, 0.3882248103618622, -0.20320004224777222, -0.24124214053153992, -0.23542183637619019, 0.3034730553627014, 0.1065891832113266, 0.03333304822444916, 0.5829259753227234, -0.2871762812137604, 0.16920997202396393, -0.08150793612003326, -0.47286975383758545, 0.17431947588920593, 0.015184486284852028, 0.08408606797456741, 0.22463102638721466, 0.00639362633228302, 0.190729558467865, -0.2680407464504242, 0.14731763303279877, -0.1281915009021759, -0.0734214186668396, -0.06609837710857391, -0.2781064510345459, -0.35670673847198486, -0.010130947455763817, -0.8072681427001953, -0.46680930256843567, -0.2272169142961502, -0.0012445226311683655, -0.27468737959861755, 0.07711908966302872, 0.24220770597457886, -0.11273687332868576, 0.1935001015663147, -0.14838431775569916, 0.12133072316646576, -0.23729172348976135, -0.07256872206926346, 0.23383530974388123, -0.3333702087402344, -0.19175827503204346, 0.0768793374300003, -0.004526756703853607, 0.32150089740753174, -0.13923177123069763, -0.02569866180419922, 0.40026596188545227, 0.048440903425216675, 0.2887953519821167, 0.3326582610607147, 0.44523119926452637, 0.21244177222251892, 0.21431893110275269, -0.2785188555717468, -0.34472838044166565, -0.0780804231762886, 0.027750462293624878, 0.18799149990081787, 0.2707406282424927, 0.12328244745731354, -0.04487333446741104, 0.13651679456233978, 0.4299824833869934, 0.11626739799976349, -0.158979132771492, 0.2109697163105011, 0.09021805226802826, -0.017117474228143692, 0.054747335612773895, -0.46090176701545715, 0.4322130084037781, -0.07531429827213287, -0.09087313711643219, 0.6659479141235352, -0.03560032695531845, -0.0778806209564209, -0.1606566607952118, 0.4709327518939972, -0.06695115566253662, -0.2566487789154053, 0.08663862198591232, -0.04738509654998779, 0.2723078429698944, 0.15393587946891785, -0.3449324071407318, -0.357587069272995, -0.25580137968063354, 0.047998033463954926, 0.05530689284205437, -0.1811760663986206, -0.1124146357178688, 0.01722702756524086, 0.050877731293439865, -0.44867247343063354, 0.17481181025505066, 0.24145644903182983, 0.3168322741985321, -0.21653686463832855, -0.11818452179431915, -0.051766589283943176, 0.15438495576381683, 0.15417417883872986, -0.3376965820789337, -0.09229937195777893, 0.1863250434398651, -0.14688292145729065, -0.05564796179533005, 0.06421604752540588, -0.488421767950058, 0.016567273065447807, 0.406890332698822, 0.002916984260082245, -0.09577914327383041, -0.24740596115589142, 0.08395462483167648, 0.35825803875923157, -0.2509706914424896, -0.05927237868309021, 0.06003469601273537, -0.016442524269223213, -0.05806777626276016, 0.08678897470235825, 0.0004026908427476883, 0.12734998762607574, 0.01022595725953579, 0.08212192356586456, 0.17961406707763672, -0.08332329988479614, 0.25494664907455444, 0.18051426112651825, -0.1419225037097931, 0.26168331503868103, -0.01948660984635353, 0.05516576021909714, 0.39261576533317566, 0.1041790097951889, 0.2982863783836365, -0.2377614676952362, -0.01680275797843933, 0.12319035828113556, -0.27351897954940796, 0.3650423288345337, 0.5031768083572388, 0.05421648919582367, 0.06837033480405807, 0.13485828042030334, 0.03561088815331459, -0.3472726047039032, 0.18988865613937378, -0.15379388630390167, 0.22925037145614624, -0.12347117066383362, 0.16084566712379456, 0.004398830235004425, -0.13183243572711945, -0.13932174444198608, 0.17646238207817078, 0.03699637949466705, -0.41770535707473755, 0.08132029324769974, 0.2697206139564514, 0.9081615805625916, 0.11663906276226044, 0.15859834849834442, 0.2479415237903595, -0.10695618391036987, -0.1235681027173996, -0.08718666434288025, 0.01640796847641468, -0.22271643579006195, 0.07238636165857315, -0.002510109916329384, 0.08840864896774292, -0.0037565678358078003, 0.40091508626937866, -0.055159710347652435, 0.13939283788204193, 0.5569095611572266, 0.10163040459156036, 0.15859562158584595, 0.2449045479297638, 0.13263863325119019, -0.4203196167945862, -0.010384872555732727, 0.24843618273735046, -0.07077905535697937, -0.15530483424663544, -0.13577453792095184, -0.11431446671485901, 0.08530335128307343, 0.05399945378303528, -0.2807549238204956, -0.04070250317454338, -0.5479029417037964, 0.13623055815696716, -0.4296947419643402, -0.17376278340816498, 0.11247700452804565, -0.2767394483089447, 0.3626980185508728, -0.005013652145862579, -0.19616934657096863, -0.0884709358215332, -0.15990972518920898, 0.14442788064479828, -0.23475506901741028, -0.0022884923964738846, 0.34366676211357117, -0.22971111536026, -0.2189774066209793, -0.18521416187286377, 0.15444377064704895, -0.1659739762544632, 0.036971256136894226, 0.05602011829614639, 0.4264524579048157, -0.12476754188537598, 0.2401200830936432, 0.3004263639450073, -0.1864316165447235, -0.28892672061920166, 0.1699923723936081, 0.05301975458860397, -0.46620601415634155, 0.4557085633277893, 0.010396722704172134, -0.10185695439577103, -0.2058895230293274, 0.14221110939979553, 0.16399458050727844, 0.10202421247959137, 0.08893254399299622, 0.47266608476638794, -0.2444574534893036, -0.333705335855484, 0.10857660323381424, 0.26422640681266785, -0.2122596800327301, 0.04644636809825897, 0.2941993176937103, -0.24515938758850098, 0.03277641534805298, 0.5464963316917419, 0.4080556035041809, 0.09270243346691132, -0.2307903915643692, -0.06317402422428131, -0.14032359421253204, 0.19812005758285522, 0.0118740014731884, 0.5117031931877136, -0.02659105882048607, 0.20048308372497559, -0.11856555193662643, -0.034128203988075256, -0.4652319550514221, -0.040200427174568176, 0.0808371976017952, 0.09372920542955399, -0.101930171251297, -0.275119811296463, -0.11940973997116089, 0.17396695911884308, 0.12880145013332367, -0.1284702569246292, -0.25715774297714233, -0.29867053031921387, -0.26050668954849243, 0.08467157930135727, 0.08102981746196747, -0.20164981484413147, 0.09106598049402237, 0.04735764116048813, -0.033305566757917404, -0.1721799224615097, 0.11912043392658234, -0.024367153644561768, -0.07949912548065186, 0.3310456871986389, 0.39112305641174316, -0.42664557695388794, -0.06465203315019608, 0.018730325624346733, 0.3707016110420227, 0.00601823627948761, 0.12508761882781982, 0.2350398153066635, 0.11733098328113556, -0.19711586833000183, 0.3461296260356903, 0.20297089219093323, 0.16627898812294006, -0.09806408733129501, 0.11627444624900818, -0.010770626366138458, -0.1371084749698639, 0.27115607261657715, 0.24956142902374268, 0.06444276124238968, 0.09914683550596237, -0.3754113018512726, 0.05038914084434509, 0.2874406576156616, -0.40115785598754883, -0.07833980768918991, -0.007846858352422714, -0.017827030271291733, 0.33040785789489746, 0.2903856039047241, 0.42992353439331055, -0.07865496724843979, 0.17881301045417786, -0.01678711734712124, -0.26484090089797974, -0.12440547347068787, 0.08361011743545532, 0.10680690407752991, -0.05988865718245506, 0.15517719089984894, 0.1306486576795578, -0.19347907602787018, 0.008345752954483032, 0.06590546667575836, -0.07721336930990219, 0.9309548735618591, -0.02501799911260605, 0.032941609621047974, 0.29346248507499695, -0.09050647914409637, 0.13612975180149078, -0.35874658823013306, 0.10307697206735611, 0.22929197549819946, 0.13882339000701904, 0.27204644680023193, 0.06963905692100525, -0.30484500527381897, -0.23122446238994598, 0.20993128418922424, -0.36890390515327454, -0.06488685309886932, 0.047106318175792694, -0.2788589596748352, -0.2459995448589325, -0.12394078075885773, -0.07924307882785797, 0.06448859721422195, 0.3866286873817444, 0.06306198984384537, 0.130250945687294, -0.16849158704280853, -0.09244851022958755, -0.08439553529024124, 0.02184295654296875, -0.18032312393188477, 0.3002912998199463, 0.40298694372177124, -0.24648749828338623, -0.07923965156078339, 0.42371127009391785, 0.06257916986942291, -0.024884864687919617, -0.17149339616298676, 0.17500688135623932, -0.22625525295734406, -0.14026334881782532, -0.19072610139846802, 0.2400515377521515, -0.01894579827785492, -0.26058387756347656, 0.25058305263519287, 0.1317293345928192, -0.12625928223133087, -0.16686385869979858, 0.16348639130592346, -0.5733743906021118, -0.025980396196246147, 0.03375495225191116, 0.15636920928955078, -0.08798062801361084, -0.14323125779628754, 0.2840704917907715, -0.3045536279678345, 0.027931924909353256, 0.26566219329833984, -0.3911348879337311, 0.04527262970805168, 0.002391268964856863, 0.11173275113105774, -0.04168184474110603, 0.747410774230957, 0.14180009067058563, -0.14859631657600403, -0.3499351441860199, -0.2589433193206787, -0.37208256125450134, -0.08151677995920181, 0.1000944972038269, 0.38155999779701233, -0.35380756855010986, 0.10647756606340408, 0.2908453941345215, 0.12034475058317184, 0.17830505967140198, 0.11558521538972855, -0.10992272943258286, 0.11226461827754974, -0.5181725025177002, -0.00415593758225441, 0.3043665885925293, 0.28145214915275574, -0.020270101726055145, 0.07760939747095108, 0.0000656023621559143, -0.07395864278078079, 0.13148248195648193, -0.17225264012813568, -0.17675650119781494, 0.31353914737701416, 0.22740842401981354, -0.06413927674293518, 0.27427566051483154, 0.3530700206756592, -0.36391714215278625, -0.17651128768920898, -0.25513795018196106, -0.1928952932357788, -0.031215060502290726, 0.2922397553920746, 0.09067937731742859, 0.3055391013622284, 0.011189291253685951, -0.17741674184799194, -0.04604267328977585, -0.29825159907341003, -0.007423967123031616, -0.0276961550116539, -0.24275684356689453, 0.20529186725616455, -0.1747414767742157, 0.32019755244255066, 0.09318933635950089, 0.5315695405006409, -0.06532173603773117, 0.2351943403482437, -0.16212037205696106, -0.39915433526039124, 0.30554917454719543, 0.09068871289491653, -0.3430291712284088, -0.27229544520378113, 0.19457438588142395, -0.04639590531587601, 0.29409658908843994, -0.3802626430988312, -0.19472089409828186, 0.15686199069023132, 0.0015749875456094742, 0.10563774406909943, 0.5221006274223328, 0.3171333372592926, -0.15150563418865204, -0.12471078336238861, -0.07631310820579529, 0.43201279640197754, -0.24021893739700317, -0.3114912211894989, -0.21364174783229828 ]
https://github.com/huggingface/datasets/issues/438
New Datasets: IWSLT15+, ITTB
Hi @sshleifer, I'm trying to add IWSLT using the link you provided but the download urls are not working. Only `[en, de]` pair is working. For others language pairs it throws a `404` error.
**Links:** [iwslt](https://pytorchnlp.readthedocs.io/en/latest/_modules/torchnlp/datasets/iwslt.html) Don't know if that link is up to date. [ittb](http://www.cfilt.iitb.ac.in/iitb_parallel/) **Motivation**: replicate mbart finetuning results (table below) ![image](https://user-images.githubusercontent.com/6045025/88490093-0c1c8c00-cf67-11ea-960d-8dcaad2aa8eb.png) For future readers, we already have the following language pairs in the wmt namespaces: ``` wmt14: ['cs-en', 'de-en', 'fr-en', 'hi-en', 'ru-en'] wmt15: ['cs-en', 'de-en', 'fi-en', 'fr-en', 'ru-en'] wmt16: ['cs-en', 'de-en', 'fi-en', 'ro-en', 'ru-en', 'tr-en'] wmt17: ['cs-en', 'de-en', 'fi-en', 'lv-en', 'ru-en', 'tr-en', 'zh-en'] wmt18: ['cs-en', 'de-en', 'et-en', 'fi-en', 'kk-en', 'ru-en', 'tr-en', 'zh-en'] wmt19: ['cs-en', 'de-en', 'fi-en', 'gu-en', 'kk-en', 'lt-en', 'ru-en', 'zh-en', 'fr-de'] ```
34
New Datasets: IWSLT15+, ITTB **Links:** [iwslt](https://pytorchnlp.readthedocs.io/en/latest/_modules/torchnlp/datasets/iwslt.html) Don't know if that link is up to date. [ittb](http://www.cfilt.iitb.ac.in/iitb_parallel/) **Motivation**: replicate mbart finetuning results (table below) ![image](https://user-images.githubusercontent.com/6045025/88490093-0c1c8c00-cf67-11ea-960d-8dcaad2aa8eb.png) For future readers, we already have the following language pairs in the wmt namespaces: ``` wmt14: ['cs-en', 'de-en', 'fr-en', 'hi-en', 'ru-en'] wmt15: ['cs-en', 'de-en', 'fi-en', 'fr-en', 'ru-en'] wmt16: ['cs-en', 'de-en', 'fi-en', 'ro-en', 'ru-en', 'tr-en'] wmt17: ['cs-en', 'de-en', 'fi-en', 'lv-en', 'ru-en', 'tr-en', 'zh-en'] wmt18: ['cs-en', 'de-en', 'et-en', 'fi-en', 'kk-en', 'ru-en', 'tr-en', 'zh-en'] wmt19: ['cs-en', 'de-en', 'fi-en', 'gu-en', 'kk-en', 'lt-en', 'ru-en', 'zh-en', 'fr-de'] ``` Hi @sshleifer, I'm trying to add IWSLT using the link you provided but the download urls are not working. Only `[en, de]` pair is working. For others language pairs it throws a `404` error.
[ -0.3510955572128296, -0.4201573133468628, -0.05547546595335007, 0.0014696866273880005, -0.20521403849124908, 0.1677960753440857, 0.30961480736732483, 0.23120103776454926, -0.10787871479988098, 0.3268696665763855, -0.47467952966690063, -0.07170797884464264, -0.05303066968917847, 0.07614275068044662, 0.11264820396900177, 0.20314548909664154, -0.04159744828939438, 0.006206944584846497, -0.20500299334526062, -0.03675692528486252, -0.281189501285553, 0.2966845631599426, -0.15657870471477509, -0.16284705698490143, -0.3049379587173462, 0.10756006091833115, -0.32324111461639404, 0.12899690866470337, -0.0864085927605629, -0.2628646790981293, -0.07100362330675125, 0.18117265403270721, -0.04867992550134659, 0.09398417174816132, -0.00011271288531133905, -0.1136941909790039, 0.011660099029541016, -0.10167574882507324, -0.32407402992248535, 0.04581243544816971, -0.3665420711040497, -0.2639511227607727, -0.2142890840768814, -0.3062402307987213, -0.436786413192749, 0.02722305804491043, -0.18320031464099884, -0.35649654269218445, -0.005296595394611359, 0.1945139616727829, 0.223588764667511, 0.34572941064834595, -0.31439951062202454, -0.2822669744491577, 0.05673864483833313, -0.26436686515808105, -0.18386149406433105, -0.02666238695383072, 0.4762517511844635, 0.3321323096752167, -0.053120993077754974, 0.2584945261478424, 0.027001572772860527, 0.13343125581741333, -0.034909918904304504, 0.1428128331899643, 0.3649301826953888, 0.01739451102912426, -0.07273485511541367, 0.3325249254703522, 0.40823501348495483, -0.05556030571460724, -0.29530495405197144, 0.024361133575439453, -0.18667122721672058, -0.18364091217517853, -0.16567716002464294, -0.015044113621115685, -0.0690905898809433, 0.18003220856189728, -0.0824475884437561, 0.07074858993291855, -0.23179377615451813, 0.2495977133512497, -0.05819552391767502, 0.9896836280822754, 0.02685677632689476, -0.027305439114570618, 0.06274339556694031, -0.2822173237800598, -0.12784971296787262, -0.101894810795784, 0.034972645342350006, -0.05354597792029381, -0.047244805842638016, -0.1655711829662323, 0.3346600830554962, 0.1215328723192215, -0.11511256545782089, 0.0373833142220974, 0.026278134435415268, 0.01812019757926464, 0.3821304142475128, -0.10263630002737045, -0.33999550342559814, 0.14682166278362274, -0.13713955879211426, -0.35768505930900574, 0.06766889244318008, -0.08888550102710724, 0.08499805629253387, 0.12745407223701477, 0.09897437691688538, -0.23523582518100739, -0.5490617752075195, -0.027497548609972, -0.14317570626735687, -0.0249166376888752, -0.3145846128463745, -0.04801637679338455, 0.023061655461788177, -0.2022247612476349, -0.08351629972457886, 0.22775518894195557, 0.07446490228176117, -0.010638438165187836, 0.2954712510108948, 0.05560233071446419, -0.26348721981048584, -0.1860874742269516, -0.15682290494441986, 0.22142529487609863, -0.1861114352941513, 0.0067130522802472115, 0.3576878309249878, 0.540777325630188, -0.09047853946685791, -0.07710860669612885, 0.23040415346622467, 0.3313201367855072, -0.2134878933429718, 0.08810931444168091, 0.6882413625717163, 0.1761733442544937, -0.05308551341295242, 0.1961781233549118, -0.12713313102722168, 0.12903781235218048, -0.2527998089790344, 0.03501005098223686, 0.18687018752098083, -0.1165919154882431, -0.08311062306165695, 0.23089253902435303, -0.1885022073984146, -0.25575414299964905, 0.6013912558555603, 0.2973749041557312, 0.028798386454582214, -0.05968321114778519, -0.08150022476911545, 0.09769081324338913, -0.33477380871772766, -0.030105117708444595, 0.1800963133573532, 0.2333531379699707, -0.657219648361206, -0.1665283441543579, -0.20681847631931305, 0.2950187921524048, 0.3693433701992035, 0.17969223856925964, -0.0453510656952858, 0.29243630170822144, -0.2584976851940155, 0.41988980770111084, 0.0101504847407341, -0.004906147718429565, -0.006970833986997604, -0.11603358387947083, -0.14948680996894836, -0.07442650198936462, 0.4314524233341217, 0.24106672406196594, 0.14578001201152802, -0.034859366714954376, -0.14433741569519043, 0.1764112412929535, -0.1311482936143875, -0.03183237835764885, -0.2274167686700821, -0.1784525364637375, 0.5984964966773987, 0.10685421526432037, 0.17801202833652496, -0.3074256479740143, 0.12916269898414612, 0.23626495897769928, 0.46517613530158997, -0.3246692419052124, 0.22008079290390015, -0.13108912110328674, 0.36704036593437195, -0.0452757254242897, 0.15719641745090485, -0.16882362961769104, 0.07657617330551147, 0.1847001314163208, -0.14894604682922363, 0.6234942078590393, 0.15398938953876495, 0.38735729455947876, -0.08781647682189941, -0.04497741162776947, -0.3361426591873169, -0.17874553799629211, 0.20855118334293365, 0.3206883668899536, -0.18278196454048157, -0.3383506238460541, -0.028722673654556274, -0.039056457579135895, -0.048093002289533615, -0.2065083533525467, -0.40265709161758423, 0.13540537655353546, -0.21295204758644104, -0.05217017978429794, 0.10302074253559113, 0.5125246644020081, 0.10337640345096588, -0.06996506452560425, -0.12445490807294846, 0.09624527394771576, -0.3203611373901367, 0.3039592504501343, 0.2060094177722931, 0.3942086100578308, 0.13108685612678528, -0.38351574540138245, 0.19986514747142792, 0.023783480748534203, 0.02381780743598938, -0.15495216846466064, 0.3204912543296814, 0.3441518545150757, -0.07730008661746979, 0.30105122923851013, -0.03378916531801224, -0.14547550678253174, 0.14178568124771118, -0.1534954011440277, -0.1454744189977646, -0.36166179180145264, 0.31385648250579834, -0.033794645220041275, 0.04718561843037605, -0.11389690637588501, 0.3828149437904358, 0.4016866683959961, 0.38526952266693115, 0.11359882354736328, 0.10793199390172958, -0.08444809168577194, -0.04367608577013016, -0.04926276206970215, 0.22826269268989563, -0.2101130336523056, 0.23383259773254395, 0.3430878221988678, 0.2765446603298187, 0.018330292776226997, -0.008296615444123745, -0.22463645040988922, 0.3973412811756134, 0.07747022807598114, -0.12213905900716782, 0.28969231247901917, -0.10761627554893494, -0.0456986241042614, -0.2772289514541626, 0.10484319925308228, 0.01166231743991375, -0.06932064890861511, -0.10931000113487244, -0.04163189232349396, -0.34118959307670593, -0.2628667652606964, -0.23888206481933594, -0.33469802141189575, -0.09197081625461578, -0.4030725061893463, 0.2417885661125183, -0.04800815507769585, -0.26138466596603394, 0.25180286169052124, 0.10390132665634155, 0.5412715077400208, -0.13960136473178864, 0.2570074200630188, -0.20988866686820984, -0.16344596445560455, -0.3350370526313782, 0.26154452562332153, 0.0714799165725708, -0.009689242579042912, 0.633712887763977, -0.28772613406181335, 0.228516086935997, -0.037115298211574554, -0.4671827256679535, 0.11310423910617828, 0.083407923579216, 0.02887202426791191, 0.2216671109199524, 0.013843066990375519, 0.20173147320747375, -0.34705960750579834, 0.22138018906116486, -0.060305140912532806, -0.06532059609889984, -0.17382895946502686, -0.26516643166542053, -0.44497594237327576, -0.03218352794647217, -0.767731249332428, -0.4418918490409851, -0.2651731073856354, -0.08650197088718414, -0.3642120361328125, 0.07672949135303497, 0.2934865951538086, -0.15014144778251648, 0.21956561505794525, -0.07298724353313446, 0.11997608095407486, -0.28608378767967224, 0.09947331249713898, 0.3871661424636841, -0.2667459547519684, -0.21497561037540436, 0.14250239729881287, 0.010607648640871048, 0.3104970455169678, -0.15210610628128052, 0.0015573054552078247, 0.4561624526977539, 0.08439920842647552, 0.2617928683757782, 0.326442152261734, 0.5436181426048279, 0.1978023201227188, 0.1510169506072998, -0.24131153523921967, -0.3730677366256714, -0.18423956632614136, 0.15677447617053986, 0.1619572639465332, 0.4169946014881134, 0.14457488059997559, 0.06452864408493042, 0.15116997063159943, 0.42194557189941406, 0.11032868921756744, -0.1442943811416626, 0.29311710596084595, 0.04830627888441086, -0.026536274701356888, -0.038895249366760254, -0.5767925977706909, 0.4208674728870392, -0.025616183876991272, -0.10823308676481247, 0.6724066138267517, -0.06650429219007492, -0.05110733211040497, -0.20365256071090698, 0.4617713987827301, -0.050965651869773865, -0.2799990475177765, -0.00897405669093132, 0.044218651950359344, 0.2523646652698517, 0.18769721686840057, -0.33716535568237305, -0.3310944139957428, -0.34796062111854553, 0.1593681126832962, 0.08009833097457886, -0.22423908114433289, -0.08493615686893463, 0.06127992644906044, -0.07109327614307404, -0.4463779330253601, 0.2790631055831909, 0.33625295758247375, 0.3429732620716095, -0.21306760609149933, -0.15206199884414673, -0.008081585168838501, 0.15164628624916077, 0.26314204931259155, -0.36196771264076233, 0.03872844576835632, 0.19359815120697021, -0.05854925513267517, -0.035601578652858734, -0.003346838057041168, -0.4417608678340912, 0.009729363024234772, 0.5186344385147095, -0.05173259973526001, -0.13013902306556702, -0.08958590030670166, 0.10409390926361084, 0.27935343980789185, -0.26806050539016724, -0.11816350370645523, 0.035395052284002304, -0.05347355455160141, -0.08410708606243134, -0.010660015046596527, 0.01633441634476185, 0.2835988402366638, 0.06649971008300781, 0.11807893216609955, 0.20263326168060303, -0.23887819051742554, 0.28102999925613403, 0.09620952606201172, -0.06501512974500656, 0.3816203773021698, -0.03991993889212608, 0.06557001173496246, 0.35263097286224365, 0.020624807104468346, 0.2904706597328186, -0.30220094323158264, 0.014808841049671173, 0.12986081838607788, -0.3256891369819641, 0.32355788350105286, 0.5054843425750732, -0.01884094625711441, 0.02471492439508438, 0.13842472434043884, -0.03179141879081726, -0.2004704773426056, 0.23711691796779633, -0.15193518996238708, 0.2129075974225998, -0.09473000466823578, 0.184076189994812, 0.05507879704236984, -0.11664345860481262, -0.10405486077070236, 0.17486678063869476, 0.13630463182926178, -0.494178831577301, -0.07324084639549255, 0.22961732745170593, 0.9664264917373657, 0.19048862159252167, 0.13841216266155243, 0.2758404314517975, -0.033502623438835144, -0.06578405201435089, 0.048211172223091125, 0.050811633467674255, -0.18691128492355347, 0.18474678695201874, -0.030697273090481758, 0.07525236904621124, -0.02177191525697708, 0.43145549297332764, -0.036934517323970795, 0.13548025488853455, 0.5156271457672119, 0.13836240768432617, 0.2337653785943985, 0.22053837776184082, 0.2501477599143982, -0.4087947607040405, -0.07564783096313477, 0.17379620671272278, -0.09411007165908813, -0.02867116406559944, -0.14617833495140076, -0.1536177694797516, 0.03461064025759697, -0.004265911877155304, -0.27226126194000244, 0.07897099107503891, -0.5890011191368103, 0.27493566274642944, -0.4028262495994568, -0.11980056762695312, 0.17472334206104279, -0.3142213523387909, 0.30088669061660767, 0.05654639005661011, -0.22697684168815613, -0.06261059641838074, -0.1554572880268097, 0.09630432724952698, -0.23858630657196045, 0.02074342593550682, 0.29237812757492065, -0.3063320219516754, -0.19596508145332336, -0.16129615902900696, 0.1649288535118103, -0.2451208233833313, 0.09035149216651917, 0.024809833616018295, 0.3714936375617981, -0.09854146838188171, 0.11553911864757538, 0.33948814868927, -0.08723171055316925, -0.28867852687835693, 0.10704663395881653, -0.019257918000221252, -0.5331581830978394, 0.3946992754936218, -0.0765468180179596, -0.07478330284357071, -0.12778408825397491, 0.27395161986351013, 0.07007904350757599, 0.1094871461391449, 0.20581361651420593, 0.44491320848464966, -0.2676795423030853, -0.21781641244888306, 0.04352028667926788, 0.20484909415245056, -0.21411514282226562, 0.008879780769348145, 0.31812649965286255, -0.2386738657951355, -0.054053306579589844, 0.6365111470222473, 0.4068296551704407, 0.17382138967514038, -0.19674047827720642, -0.15196312963962555, -0.12259324640035629, 0.13492698967456818, 0.06225385144352913, 0.492979496717453, -0.047907017171382904, 0.2813068628311157, -0.0494193434715271, -0.14671990275382996, -0.39664316177368164, -0.1032465472817421, 0.03902252018451691, 0.10376431047916412, -0.01489941030740738, -0.2560124695301056, -0.0667772963643074, 0.20313625037670135, 0.0904708206653595, -0.1550721973180771, -0.28297901153564453, -0.22000375390052795, -0.21446403861045837, 0.08864232152700424, 0.11741314828395844, -0.2440498322248459, 0.10411155223846436, -0.027159778401255608, 0.0535266250371933, -0.10229679197072983, 0.14139460027217865, -0.12613673508167267, -0.15799665451049805, 0.22468695044517517, 0.38016277551651, -0.5120627880096436, -0.1245451346039772, 0.07053899765014648, 0.3344869017601013, -0.004978843033313751, 0.15002323687076569, 0.2852221131324768, 0.11694303900003433, -0.16421329975128174, 0.3835917115211487, 0.11379355192184448, 0.15235012769699097, -0.04380578547716141, 0.11363234370946884, -0.12485656142234802, -0.17118117213249207, 0.25980931520462036, 0.3023608326911926, 0.08085272461175919, 0.023044073954224586, -0.4058656692504883, -0.03520525246858597, 0.21593353152275085, -0.44224491715431213, -0.0763636901974678, -0.04546186700463295, -0.0431358702480793, 0.2890424430370331, 0.29463207721710205, 0.3833945393562317, -0.09361164271831512, 0.21464680135250092, 0.009151026606559753, -0.2317991852760315, -0.10631218552589417, -0.049809496849775314, 0.12427692115306854, -0.12738069891929626, 0.20687462389469147, 0.070561982691288, -0.25223326683044434, -0.012562759220600128, 0.035779088735580444, -0.039327822625637054, 0.9443352222442627, 0.05542461574077606, 0.12772886455059052, 0.2607846260070801, -0.15259753167629242, 0.14440856873989105, -0.4156583547592163, 0.09073594957590103, 0.22287312150001526, 0.088528573513031, 0.16590116918087006, 0.10514011979103088, -0.3098653256893158, -0.18881337344646454, 0.3234921395778656, -0.3527396321296692, -0.1041436642408371, 0.0336158350110054, -0.2721528112888336, -0.25602173805236816, -0.17531773447990417, -0.048517096787691116, 0.07555028796195984, 0.3166671395301819, 0.03225495666265488, 0.12805533409118652, -0.16003048419952393, -0.15471872687339783, -0.11637825518846512, 0.009621359407901764, -0.21666844189167023, 0.29533296823501587, 0.35769182443618774, -0.21178656816482544, -0.05179162696003914, 0.37193435430526733, 0.11565203219652176, 0.027774762362241745, -0.050783488899469376, 0.12828928232192993, -0.22016459703445435, -0.19604726135730743, -0.17853058874607086, 0.30157917737960815, 0.02817373350262642, -0.29697251319885254, 0.28752949833869934, 0.05890921503305435, -0.10923740267753601, -0.1599844992160797, 0.17985956370830536, -0.4980970025062561, -0.058987248688936234, 0.08350643515586853, 0.030812684446573257, -0.11729393899440765, -0.19617362320423126, 0.26969942450523376, -0.23497694730758667, 0.05296994745731354, 0.23625265061855316, -0.4396253824234009, 0.005742592737078667, 0.026363909244537354, 0.08010347187519073, -0.0749601274728775, 0.7365744113922119, 0.09806670993566513, -0.1362929344177246, -0.3667149543762207, -0.2292541265487671, -0.4123726785182953, -0.11632584780454636, 0.17679616808891296, 0.3161047101020813, -0.36123496294021606, 0.07957328110933304, 0.20179197192192078, -0.03293076157569885, 0.24646197259426117, 0.1410086303949356, -0.057345375418663025, 0.09532992541790009, -0.421714186668396, -0.02865549549460411, 0.27185705304145813, 0.21048836410045624, -0.01821400597691536, 0.07031813263893127, -0.03462537005543709, -0.08342649787664413, 0.08494884520769119, -0.1449539065361023, -0.21168772876262665, 0.2417704164981842, 0.2613487243652344, -0.044150397181510925, 0.2784499526023865, 0.49274563789367676, -0.38668742775917053, -0.0587775856256485, -0.25528353452682495, -0.22771665453910828, 0.021143224090337753, 0.2991316020488739, 0.01887781172990799, 0.31664547324180603, 0.06031438708305359, -0.12281487882137299, -0.06442540138959885, -0.32329949736595154, 0.05117642134428024, -0.02162924036383629, -0.2860189974308014, 0.244861900806427, -0.2956741154193878, 0.39966222643852234, 0.12117275595664978, 0.4754555821418762, -0.03919760882854462, 0.2557395398616791, -0.27012568712234497, -0.4410155117511749, 0.3719331622123718, 0.0036642057821154594, -0.3797161877155304, -0.30958235263824463, 0.2952941060066223, -0.10296230763196945, 0.21302565932273865, -0.4063837230205536, -0.3061908781528473, 0.20614290237426758, 0.032886091619729996, 0.06011432781815529, 0.5993678569793701, 0.31198179721832275, -0.08038277924060822, -0.08604902774095535, -0.1394547075033188, 0.47704389691352844, -0.23248523473739624, -0.294169545173645, -0.2447916567325592 ]
https://github.com/huggingface/datasets/issues/436
Google Colab - load_dataset - PyArrow exception
+1! this is the reason our tests are failing at [TextAttack](https://github.com/QData/TextAttack) (Though it's worth noting if we fixed the version number of pyarrow to 0.16.0 that would fix our problem too. But in this case we'll just wait for you all to update)
With latest PyArrow 1.0.0 installed, I get the following exception . Restarting colab has the same issue ImportWarning: To use `nlp`, the module `pyarrow>=0.16.0` is required, and the current version of `pyarrow` doesn't match this condition. If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`. The error goes only when I install version 0.16.0 i.e. !pip install pyarrow==0.16.0
43
Google Colab - load_dataset - PyArrow exception With latest PyArrow 1.0.0 installed, I get the following exception . Restarting colab has the same issue ImportWarning: To use `nlp`, the module `pyarrow>=0.16.0` is required, and the current version of `pyarrow` doesn't match this condition. If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`. The error goes only when I install version 0.16.0 i.e. !pip install pyarrow==0.16.0 +1! this is the reason our tests are failing at [TextAttack](https://github.com/QData/TextAttack) (Though it's worth noting if we fixed the version number of pyarrow to 0.16.0 that would fix our problem too. But in this case we'll just wait for you all to update)
[ -0.36298131942749023, 0.25222283601760864, 0.029283110052347183, 0.06686654686927795, -0.06560678035020828, -0.31795287132263184, 0.3687325119972229, 0.145565465092659, -0.1377861052751541, 0.15375638008117676, -0.0934412032365799, 0.42297062277793884, -0.11837118119001389, 0.02392236329615116, 0.1916106939315796, -0.04609247297048569, 0.045405931770801544, 0.3213033378124237, -0.10093390941619873, 0.21287398040294647, -0.13278107345104218, 0.3483653962612152, -0.5873012542724609, 0.2542984187602997, -0.23757486045360565, -0.0698927715420723, -0.011701913550496101, -0.022168919444084167, -0.12657956779003143, -0.7411343455314636, 0.31763342022895813, -0.07895632088184357, 0.0764138475060463, 0.39934274554252625, -0.00011734930012607947, 0.014425709843635559, 0.48224401473999023, 0.07286044955253601, -0.20693345367908478, -0.387215256690979, 0.038675419986248016, -0.22775068879127502, 0.31386417150497437, 0.03737134486436844, 0.035888008773326874, 0.15121084451675415, 0.22121451795101166, 0.4453001618385315, 0.3842611312866211, 0.49771204590797424, 0.140852153301239, 0.1463237851858139, 0.23708786070346832, 0.06509348750114441, 0.509989321231842, -0.2810862064361572, -0.1513424664735794, 0.49552851915359497, 0.3179699182510376, -0.1587507575750351, -0.03686768561601639, 0.10349158942699432, -0.15346010029315948, 0.08655912429094315, 0.00308401882648468, 0.10412149876356125, -0.20004558563232422, -0.12589234113693237, -0.03602196276187897, 0.2756787836551666, 0.3768586218357086, -0.4508688151836395, -0.24919778108596802, -0.013174984604120255, 0.11853735148906708, -0.6331672668457031, 0.2870853841304779, 0.1160997673869133, -0.2995825409889221, 0.26484960317611694, -0.11152377724647522, 0.010753870941698551, -0.14503291249275208, 0.11355173587799072, -0.023641422390937805, 0.6451190710067749, 0.012621119618415833, 0.12861362099647522, 0.16339422762393951, -0.04055386781692505, 0.45245829224586487, 0.1952839195728302, -0.027437914162874222, 0.129108726978302, -0.07823508977890015, 0.09924794733524323, -0.18887895345687866, 0.09849613159894943, 0.18030992150306702, -0.116536945104599, 0.024916179478168488, 0.04849357530474663, -0.003261072561144829, 0.3548349440097809, -0.04180492088198662, 0.1982092261314392, 0.17644712328910828, -0.07546254992485046, 0.40001052618026733, 0.21956321597099304, -0.15643765032291412, 0.10642330348491669, 0.08055415004491806, -0.3143383860588074, 0.011678814888000488, -0.09237987548112869, 0.24312318861484528, -0.33422014117240906, -0.44806087017059326, -0.2376198172569275, -0.5925037860870361, -0.05882823094725609, -0.005785900168120861, 0.3084491789340973, -0.10262888669967651, -0.25433436036109924, 0.044054076075553894, 0.362756609916687, -0.3065454959869385, -0.10348285734653473, -0.0444495789706707, 0.13588343560695648, -0.1913888305425644, 0.09981736540794373, 0.3135397434234619, -0.19872280955314636, 0.24184076488018036, 0.06003996729850769, -0.06561107933521271, 0.11172597110271454, -0.14277979731559753, -0.19404755532741547, -0.08098462969064713, 0.27632924914360046, 0.12911953032016754, -0.1630799025297165, -0.17710347473621368, -0.43459564447402954, -0.19286981225013733, 0.3411635160446167, -0.14027458429336548, -0.22191520035266876, 0.03383423015475273, 0.12344355881214142, -0.31553351879119873, -0.295439213514328, -0.29150599241256714, 0.24210546910762787, -0.11541708558797836, -0.332515150308609, 0.005154460668563843, -0.3383244276046753, -0.2549367845058441, -0.005229055881500244, 0.10198643803596497, 0.3170403242111206, -0.33841440081596375, -0.03783706575632095, -0.0716526135802269, -0.13129863142967224, 0.1759166717529297, 0.1195298433303833, -0.13562826812267303, 0.05288931727409363, -0.08104776591062546, 0.37073731422424316, 0.10331626236438751, -0.08004175126552582, -0.31518733501434326, -0.10955740511417389, -0.0785585269331932, -0.12707053124904633, -0.056167103350162506, -0.21934238076210022, -0.29825982451438904, -0.04506053403019905, 0.20913134515285492, 0.21972663700580597, 0.07645049691200256, 0.048554763197898865, -0.31252601742744446, -0.28325632214546204, 0.27703529596328735, 0.1366286277770996, 0.043674618005752563, -0.23767468333244324, -0.004484310746192932, -0.3707594573497772, 0.01895684376358986, -0.1722552627325058, -0.25146010518074036, -0.03751616179943085, 0.3037084937095642, -0.26702696084976196, -0.07092873752117157, -0.004936825484037399, -0.2513348162174225, 0.09999064356088638, -0.1986764669418335, 0.33062466979026794, -0.21120403707027435, -0.10168493539094925, -0.3360035717487335, 0.2426893562078476, 0.1568351686000824, -0.0757179856300354, 0.053742922842502594, 0.013993196189403534, 0.12949062883853912, 0.44556212425231934, -0.03428720310330391, 0.1879512518644333, -0.00599188357591629, 0.14840783178806305, 0.25854256749153137, 0.18225985765457153, -0.30086544156074524, -0.5154078006744385, 0.2087286412715912, 0.17767736315727234, 0.0894753634929657, 0.0034557702019810677, -0.07240147888660431, 0.17654359340667725, -0.009274601936340332, 0.07639437913894653, -0.26712483167648315, -0.2846681475639343, 0.10674198716878891, -0.46815598011016846, -0.0044745150953531265, 0.025845125317573547, -0.03971948102116585, 0.03681875020265579, 0.34394222497940063, 0.19390146434307098, 0.08609830588102341, -0.0027807876467704773, 0.1075390875339508, -0.08369337767362595, 0.12145306169986725, -0.1025407612323761, 0.18624760210514069, 0.1555069386959076, 0.18888363242149353, 0.1804468035697937, 0.35165807604789734, -0.08173678815364838, -0.19290581345558167, 0.020945541560649872, 0.5004720091819763, -0.010415134951472282, 0.3968641757965088, 0.2594713270664215, -0.1391996443271637, -0.224968820810318, 0.19842949509620667, -0.26251158118247986, 0.3533535599708557, 0.153049498796463, -0.06978543102741241, 0.3267533481121063, -0.26910555362701416, -0.3553435802459717, 0.19394317269325256, 0.040157485753297806, 0.2229405641555786, -0.016498886048793793, 0.38502267003059387, -0.00007156375795602798, -0.44638365507125854, -0.2158679962158203, -0.024114396423101425, 0.29025164246559143, -0.1957816183567047, 0.23334713280200958, -0.27889934182167053, -0.47865766286849976, -0.3216554522514343, -0.3746161460876465, -0.26448848843574524, -0.1139180064201355, 0.1861756592988968, 0.08757852017879486, 0.020913682878017426, 0.21716630458831787, 0.3065691888332367, 0.25341734290122986, -0.24055686593055725, -0.2795986235141754, -0.29332664608955383, -0.2630262076854706, -0.6036443710327148, 0.040145304054021835, 0.3904750943183899, 0.17002244293689728, 0.16200414299964905, -0.16851626336574554, -0.06093798577785492, 0.41202786564826965, -0.5072563290596008, 0.06287681311368942, -0.18831714987754822, 0.3759167790412903, 0.025406308472156525, -0.16158442199230194, -0.4956682324409485, -0.4668348431587219, 0.07762482017278671, -0.3616179823875427, -0.2719081938266754, 0.0947318747639656, -0.08236327022314072, -0.05332527309656143, -0.21266768872737885, -0.42889025807380676, -0.4334755837917328, -0.1762179732322693, 0.29124414920806885, 0.11143092811107635, 0.08758699893951416, 0.43214529752731323, 0.1826333999633789, 0.383896142244339, -0.07881422340869904, -0.015647582709789276, 0.05687389150261879, 0.15797929465770721, 0.17090153694152832, -0.11303532123565674, -0.2863183319568634, 0.08400247991085052, -0.05555806681513786, 0.1250373274087906, -0.13184721767902374, -0.5317521095275879, -0.28159716725349426, -0.056102193892002106, 0.12255233526229858, 0.25387340784072876, 0.023474447429180145, 0.33967331051826477, 0.06294965744018555, -0.03197745606303215, 0.07321910560131073, -0.4039270877838135, 0.033862676471471786, -0.05149020254611969, -0.028492189943790436, 0.08025115728378296, 0.1063997820019722, -0.06779209524393082, 0.7185685038566589, -0.1301940381526947, -0.1091860830783844, 0.39722996950149536, -0.10398045927286148, 0.16486747562885284, -0.23605594038963318, -0.023485077545046806, 0.10256443917751312, -0.01778005063533783, -0.16063375771045685, 0.27490535378456116, -0.16227731108665466, -0.4740836024284363, -0.19053475558757782, -0.1989642232656479, -0.2541109621524811, -0.29113027453422546, 0.1263333410024643, 0.3540949821472168, 0.04269266501069069, 0.05014136806130409, -0.1241021677851677, 0.10966424643993378, -0.33389946818351746, -0.07629381120204926, -0.046139106154441833, -0.1030329093337059, -0.03807566687464714, 0.04964214935898781, -0.46559903025627136, -0.45658206939697266, 0.3199995756149292, 0.42372530698776245, 0.22643060982227325, -0.06852730363607407, 0.0034590475261211395, -0.07610833644866943, -0.2204844206571579, -0.07254737615585327, 0.017899585887789726, -0.014448832720518112, 0.32992878556251526, 0.12919878959655762, -0.0789630189538002, -0.17273424565792084, -0.3289526104927063, -0.08921505510807037, 0.3047026991844177, -0.08361010253429413, -0.3240819573402405, 0.15374232828617096, 0.4683859944343567, 0.3481385111808777, 0.21292391419410706, 0.19878555834293365, -0.32158389687538147, -0.3988631069660187, -0.13834334909915924, 0.23975279927253723, 0.05476073920726776, 0.34666645526885986, -0.1757504642009735, 0.22794349491596222, 0.09482195228338242, -0.13611680269241333, 0.02705242484807968, 0.4200955629348755, -0.007374333217740059, -0.04131317138671875, -0.012785278260707855, -0.1898573786020279, -0.40064674615859985, 0.1230432316660881, 0.6168130040168762, 0.13522681593894958, -0.24127328395843506, -0.2904059588909149, 0.15641911327838898, 0.4171551764011383, 0.19685892760753632, -0.09512031823396683, 0.08530911058187485, -0.2908741533756256, -0.12725740671157837, 0.17971445620059967, 0.09007766842842102, 0.14242742955684662, 0.1347000151872635, -0.014332364313304424, 0.13343076407909393, 0.6629956960678101, 0.06059842184185982, -0.019560806453227997, 0.18408305943012238, -0.0039887577295303345, -0.3596175014972687, 0.4945666193962097, -0.016560770571231842, 0.9023045301437378, 0.005278073251247406, 0.1025124192237854, 0.5774904489517212, -0.010711323469877243, 0.34121549129486084, 0.08777548372745514, 0.2345590442419052, -0.4027552008628845, -0.09810814261436462, 0.09094692766666412, -0.16327816247940063, 0.1461862027645111, -0.13111738860607147, -0.5301917195320129, 0.23455211520195007, 0.35082387924194336, 0.07678959518671036, 0.3780788779258728, 0.16932131350040436, -0.1686760038137436, -0.008611300960183144, -0.4974393844604492, 0.07248861342668533, -0.07946175336837769, 0.18585704267024994, -0.20106428861618042, 0.025602873414754868, 0.012619022279977798, -0.27724289894104004, -0.441392719745636, 0.34477150440216064, -0.42481958866119385, -0.11896294355392456, 0.43661022186279297, -0.23452827334403992, 0.2927359342575073, 0.11342945694923401, 0.23669859766960144, 0.14305146038532257, -0.19893687963485718, 0.2038394808769226, -0.17900756001472473, -0.21648038923740387, 0.19338186085224152, 0.10815082490444183, 0.23537708818912506, -0.19601687788963318, -0.2463553547859192, 0.14337857067584991, 0.028234772384166718, -0.29938220977783203, 0.2750104069709778, 0.0317361056804657, -0.04796002060174942, -0.04971395060420036, 0.08182494342327118, 0.12914809584617615, 0.10138951241970062, -0.17262466251850128, 0.09945255517959595, -0.014350943267345428, -0.09686373919248581, 0.18499396741390228, 0.02562352456152439, -0.27390384674072266, -0.0856633186340332, 0.31912434101104736, -0.11602430790662766, 0.12270112335681915, 0.6109802722930908, 0.35822594165802, -0.013536397367715836, -0.1439749300479889, -0.19544100761413574, -0.19763363897800446, -0.3472577631473541, 0.1349233239889145, -0.08934738487005234, -0.08295492082834244, 0.20653297007083893, 0.635837733745575, 0.03213224560022354, 0.034259796142578125, 0.03223704919219017, -0.43785765767097473, -0.1001109629869461, 0.29359856247901917, 0.31927165389060974, 0.003618713468313217, 0.33271536231040955, 0.29871517419815063, 0.23752444982528687, -0.003165915608406067, -0.24295569956302643, 0.12840701639652252, -0.2802477478981018, 0.17136967182159424, -0.2991991639137268, -0.14533886313438416, 0.27839186787605286, 0.09766422212123871, 0.029256200417876244, 0.20569977164268494, -0.07731400430202484, -0.2213222086429596, -0.16462163627147675, 0.10921917855739594, 0.1179894357919693, -0.25784537196159363, -0.09890274703502655, -0.06654413789510727, 0.23094826936721802, 0.040410444140434265, 0.08348965644836426, -0.1175374761223793, -0.2224591225385666, 0.24608539044857025, 0.08183012902736664, 0.3629990816116333, -0.172878235578537, -0.035627372562885284, -0.4094325006008148, 0.37834030389785767, 0.2551010251045227, 0.22783160209655762, 0.11267025023698807, -0.0049375444650650024, 0.1982799917459488, -0.053247757256031036, -0.15982507169246674, 0.058852311223745346, 0.05493345111608505, -0.40884196758270264, -0.09785329550504684, -0.3386644423007965, 0.16938167810440063, 0.32650282979011536, -0.1732736974954605, -0.17915436625480652, 0.45395341515541077, 0.11843471229076385, -0.4062664806842804, -0.00429042661562562, 0.15416568517684937, 0.12956669926643372, -0.007892612367868423, 0.2604042887687683, 0.22045567631721497, -0.14309453964233398, 0.07290073484182358, 0.20423442125320435, 0.2934797406196594, 0.07108952105045319, -0.1808236986398697, 0.22781671583652496, -0.21069979667663574, 0.09912218153476715, 0.18737362325191498, 0.04731753095984459, 0.4222981035709381, 0.15606117248535156, -0.28562504053115845, 0.20942498743534088, -0.27419155836105347, 0.24128457903862, 0.12571892142295837, -0.198506161570549, 0.09646189957857132, 0.4508845806121826, 0.290730744600296, -0.10116357356309891, 0.21075093746185303, 0.5228332281112671, -0.13163892924785614, 0.09808783233165741, -0.18573631346225739, 0.26798558235168457, -0.017108891159296036, -0.12364573776721954, -0.0687999427318573, 0.035530783236026764, -0.18545958399772644, 0.15018750727176666, -0.14708033204078674, -0.009515099227428436, 0.39605188369750977, 0.21031855046749115, -0.2445913702249527, -0.0783880352973938, 0.014613455161452293, 0.1155373603105545, 0.06769344210624695, -0.17532837390899658, 0.3981393873691559, 0.09470219910144806, -0.18716087937355042, -0.09087617695331573, 0.6913027167320251, 0.5602603554725647, 0.1460425853729248, -0.33981743454933167, -0.12166594713926315, -0.3152952790260315, 0.010718127712607384, -0.10497650504112244, 0.2884887456893921, 0.3598894476890564, 0.46983039379119873, 0.250514954328537, 0.07437624782323837, -0.09025764465332031, 0.3026508688926697, 0.16447041928768158, -0.17919720709323883, -0.07828432321548462, 0.03112626075744629, 0.124298095703125, -0.14124715328216553, -0.3082646131515503, 0.027675308287143707, -0.10408739745616913, 0.3828434646129608, 0.18283246457576752, -0.027629198506474495, -0.0220516137778759, -0.10876166820526123, 0.042198874056339264, 0.23381920158863068, 0.5969292521476746, 0.466042697429657, 0.5083931684494019, -0.3644017279148102, -0.17659208178520203, -0.5498262643814087, 0.11051192879676819, -0.3375612795352936, -0.01911359280347824, 0.04307073354721069, -0.13093861937522888, -0.12243134528398514, 0.36556529998779297, -0.2373732179403305, 0.43228965997695923, -0.34099090099334717, -0.18122577667236328, -0.41657206416130066, 0.028593631461262703, 0.015204168856143951, -0.2957246005535126, -0.13292449712753296, -0.24557644128799438, 0.2400442510843277, -0.6261123418807983, -0.06808442622423172, -0.11214609444141388, -0.22245848178863525, 0.17805419862270355, 0.11087942123413086, 0.4410927891731262, 0.1155422031879425, 0.5288141965866089, 0.006033848971128464, 0.09915982186794281, -0.11563242971897125, -0.3268682658672333, -0.16959261894226074, 0.15659767389297485, 0.08985205739736557, 0.1825839877128601, 0.002996271476149559, 0.22660407423973083, -0.08418348431587219, 0.5815635919570923, -0.04080069437623024, 0.2421082705259323, 0.2631014883518219, 0.031238993629813194, -0.0804879292845726, -0.08279165625572205, -0.03334289789199829, 0.20001214742660522, -0.05443183332681656, -0.1092597246170044, -0.5326641798019409, -0.41325968503952026, 0.3147663474082947, -0.5150574445724487, -0.07206004858016968, -0.2050067037343979, 0.08679424226284027, 0.2675548791885376, -0.31007692217826843, -0.6111449599266052, 0.050303615629673004, 0.2234051376581192, 0.09546080231666565, -0.41490861773490906, 0.1335819810628891, 0.28994491696357727, 0.046274613589048386, -0.09485207498073578, 0.4303208887577057, 0.04088220372796059, -0.06069721281528473, -0.23439183831214905, -0.29219961166381836 ]
https://github.com/huggingface/datasets/issues/436
Google Colab - load_dataset - PyArrow exception
Came to raise this issue, great to see other already have and it's being fixed so soon! As an aside, since no one wrote this already, it seems like the version check only looks at the second part of the version number making sure it is >16, but pyarrow newest version is 1.0.0 so the second past is 0!
With latest PyArrow 1.0.0 installed, I get the following exception . Restarting colab has the same issue ImportWarning: To use `nlp`, the module `pyarrow>=0.16.0` is required, and the current version of `pyarrow` doesn't match this condition. If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`. The error goes only when I install version 0.16.0 i.e. !pip install pyarrow==0.16.0
59
Google Colab - load_dataset - PyArrow exception With latest PyArrow 1.0.0 installed, I get the following exception . Restarting colab has the same issue ImportWarning: To use `nlp`, the module `pyarrow>=0.16.0` is required, and the current version of `pyarrow` doesn't match this condition. If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`. The error goes only when I install version 0.16.0 i.e. !pip install pyarrow==0.16.0 Came to raise this issue, great to see other already have and it's being fixed so soon! As an aside, since no one wrote this already, it seems like the version check only looks at the second part of the version number making sure it is >16, but pyarrow newest version is 1.0.0 so the second past is 0!
[ -0.35636022686958313, 0.2692834436893463, 0.040354106575250626, 0.02550894021987915, -0.10822592675685883, -0.2124159336090088, 0.16984084248542786, 0.22092780470848083, -0.14622586965560913, 0.1146727204322815, 0.09565469622612, 0.5587818026542664, -0.29847782850265503, 0.0380702018737793, 0.06230585649609566, -0.08091866970062256, 0.13042446970939636, 0.3858686089515686, 0.06107369810342789, 0.1696230173110962, -0.2576373517513275, 0.30709388852119446, -0.44199150800704956, 0.24948222935199738, -0.29841098189353943, 0.013922417536377907, 0.019361792132258415, 0.07734587788581848, -0.3677998483181, -0.6848933100700378, 0.46371233463287354, -0.13720963895320892, 0.2255123406648636, 0.3252451717853546, -0.00011749898840207607, -0.012684624642133713, 0.49808067083358765, 0.10903558135032654, -0.19484375417232513, -0.4525272250175476, 0.09622948616743088, -0.48266151547431946, 0.3875707685947418, 0.009749159216880798, 0.04578639566898346, -0.026452939957380295, 0.3028810918331146, 0.6757777333259583, 0.2657577693462372, 0.21768440306186676, 0.1667814701795578, 0.22138768434524536, 0.4098857343196869, 0.025735188275575638, 0.49483704566955566, -0.2362096756696701, -0.10345011204481125, 0.7628588080406189, 0.20072895288467407, -0.3635469675064087, 0.059191156178712845, 0.16096314787864685, -0.28427764773368835, 0.007997047156095505, 0.08681534230709076, -0.009361515752971172, -0.028280392289161682, -0.28035640716552734, -0.0704241394996643, 0.23345458507537842, 0.2786678373813629, -0.37276068329811096, -0.2139846533536911, -0.03694143518805504, 0.16852612793445587, -0.5201525092124939, 0.20318791270256042, 0.20613206923007965, -0.24792630970478058, 0.21666982769966125, 0.042311690747737885, -0.036325853317976, -0.16775335371494293, 0.18880680203437805, -0.15946035087108612, 0.7550787925720215, 0.09104826301336288, 0.1258878856897354, 0.2515868842601776, -0.05955541133880615, 0.5646762847900391, 0.2610052525997162, -0.017178136855363846, 0.195746511220932, -0.01814456656575203, 0.04401195049285889, 0.008214376866817474, 0.5163198709487915, 0.029362566769123077, -0.3448956608772278, 0.009650550782680511, -0.05346061289310455, 0.12654276192188263, 0.4474959075450897, 0.02496558055281639, -0.06343381106853485, 0.003209330141544342, -0.12590616941452026, 0.3919038772583008, 0.021887585520744324, 0.15789493918418884, 0.10303673893213272, 0.026926051825284958, -0.37168970704078674, -0.005163930356502533, -0.03941432386636734, 0.34152060747146606, -0.20933562517166138, -0.3028338849544525, -0.25671619176864624, -0.5051162242889404, -0.008798235096037388, 0.08194511383771896, 0.19598764181137085, -0.18842767179012299, -0.04566080868244171, -0.01350395753979683, 0.13324356079101562, -0.2568022608757019, -0.11320360749959946, -0.0069238669238984585, 0.17494171857833862, -0.23375077545642853, 0.008289370685815811, 0.24887816607952118, -0.1568792760372162, 0.2385912835597992, 0.18391869962215424, -0.1583384871482849, 0.1740046739578247, -0.087979756295681, -0.1543874442577362, -0.16907504200935364, 0.34637290239334106, 0.09480974078178406, -0.0689554288983345, -0.15497078001499176, -0.4418061375617981, -0.2765377461910248, 0.3989025950431824, -0.21785181760787964, -0.37795162200927734, -0.277635782957077, 0.13909004628658295, -0.4142240881919861, -0.19775241613388062, -0.22864747047424316, 0.19751782715320587, -0.0626462772488594, -0.5185406804084778, -0.11069736629724503, -0.4185699224472046, -0.2588014006614685, -0.21674586832523346, -0.03550039604306221, 0.23131495714187622, -0.42131713032722473, -0.001321360468864441, -0.20529451966285706, -0.1577334851026535, 0.2029188871383667, 0.12417300045490265, -0.2396298348903656, 0.0035153627395629883, -0.0710434764623642, 0.20063062012195587, 0.32936516404151917, -0.10115520656108856, -0.3482886552810669, 0.0037730620242655277, -0.12435582280158997, -0.07968413829803467, -0.050357915461063385, -0.014626353047788143, -0.20754392445087433, -0.10266896337270737, 0.11150579154491425, 0.21918343007564545, -0.06289198994636536, 0.05185363441705704, -0.32014963030815125, -0.28223082423210144, 0.24093997478485107, 0.17954176664352417, 0.029073117300868034, -0.13222452998161316, 0.12514621019363403, -0.05116839334368706, 0.15069124102592468, -0.1088007390499115, -0.19568206369876862, -0.00683131068944931, 0.3765251040458679, -0.18615327775478363, -0.12130147218704224, -0.025211654603481293, -0.42462581396102905, 0.13970252871513367, -0.20817050337791443, 0.21053476631641388, -0.18135811388492584, -0.13879826664924622, -0.15854138135910034, 0.20243369042873383, 0.09172016382217407, 0.08649285137653351, 0.05748840421438217, -0.05384214222431183, 0.14829932153224945, 0.22368772327899933, 0.03740791603922844, 0.048823677003383636, 0.04236524552106857, 0.11621212959289551, -0.007512206211686134, 0.28531044721603394, -0.39391621947288513, -0.514802098274231, 0.11042013764381409, 0.15654641389846802, 0.14467327296733856, 0.0030894989613443613, 0.04738809913396835, 0.09853354841470718, 0.030292443931102753, 0.1519058644771576, -0.40958669781684875, -0.16294999420642853, 0.17210839688777924, -0.43605002760887146, 0.09034311026334763, -0.0005218777805566788, -0.08930011093616486, 0.13817405700683594, 0.3890046775341034, 0.2938121557235718, 0.1787320226430893, -0.07718933373689651, -0.047858212143182755, 0.006872698664665222, 0.01082410104572773, -0.021976333111524582, 0.06160791218280792, 0.007906228303909302, 0.1270691305398941, 0.30676472187042236, 0.11655004322528839, 0.013009200803935528, -0.3182845711708069, 0.14580027759075165, 0.4736980199813843, 0.07876549661159515, 0.16122032701969147, 0.12029054760932922, -0.0150471031665802, -0.20196029543876648, 0.2824191749095917, -0.20049132406711578, 0.23642686009407043, 0.24883787333965302, -0.07919581234455109, 0.286241352558136, -0.3475000858306885, -0.24639593064785004, 0.06621958315372467, 0.07955529540777206, 0.24783451855182648, 0.054560836404561996, 0.28006497025489807, 0.04408612474799156, -0.3395348787307739, -0.04050063341856003, -0.0013772612437605858, 0.3130810558795929, -0.1538745015859604, 0.22804389894008636, -0.3657151758670807, -0.5152044296264648, -0.2934386432170868, -0.3485787510871887, -0.4190288782119751, -0.045573875308036804, 0.07445049285888672, 0.3852241337299347, 0.0903393030166626, 0.22604268789291382, 0.3749234676361084, 0.02674521505832672, -0.2834898829460144, -0.2804329991340637, -0.16223052144050598, -0.31871673464775085, -0.5653553009033203, 0.005158897489309311, 0.27417150139808655, 0.14640279114246368, 0.18340539932250977, -0.17474941909313202, -0.037433773279190063, 0.1914408951997757, -0.6024136543273926, 0.0411873422563076, -0.27081120014190674, 0.3899640142917633, 0.1654326617717743, -0.07561704516410828, -0.426109254360199, -0.3029904365539551, 0.04996635392308235, -0.2672175467014313, -0.23110301792621613, -0.07755643129348755, -0.3112013638019562, 0.10565800964832306, -0.20254355669021606, -0.018319815397262573, -0.5836755633354187, -0.25590401887893677, 0.07281067967414856, 0.08247366547584534, 0.19669832289218903, 0.31123602390289307, 0.27787744998931885, 0.20483574271202087, 0.09991761296987534, -0.17804007232189178, 0.07444741576910019, 0.07287448644638062, 0.2003842443227768, -0.1788436472415924, -0.24103079736232758, 0.217235267162323, -0.12020822614431381, 0.021111110225319862, -0.054061755537986755, -0.44645047187805176, -0.4577823579311371, 0.04011185094714165, 0.3177596628665924, 0.17633506655693054, -0.03805521875619888, 0.41693294048309326, 0.09203456342220306, 0.021322300657629967, 0.01100720465183258, -0.41040727496147156, -0.22252994775772095, 0.030742453411221504, 0.1950930804014206, 0.1226705014705658, 0.2151467502117157, -0.07812134176492691, 0.6302809715270996, -0.2324964702129364, -0.13358694314956665, 0.4108281433582306, -0.11306240409612656, 0.26410913467407227, -0.044530607759952545, -0.044188614934682846, 0.0038075263146311045, 0.0769345685839653, -0.07625462114810944, 0.21267461776733398, -0.14276933670043945, -0.5381873250007629, -0.20420129597187042, -0.24475735425949097, -0.2156708538532257, -0.1774832010269165, 0.08369521796703339, 0.4492427110671997, 0.16353175044059753, 0.11254829168319702, -0.123743936419487, 0.014829035848379135, -0.35182061791419983, -0.18381287157535553, 0.06592381745576859, -0.1047118529677391, 0.08823296427726746, 0.313083291053772, -0.5570729970932007, -0.3975990414619446, 0.35360845923423767, 0.42606160044670105, 0.003599155694246292, 0.06745927035808563, -0.058137618005275726, 0.05630773305892944, -0.12319537252187729, 0.09491805732250214, -0.05097474902868271, -0.003971092402935028, 0.23757949471473694, 0.17186981439590454, -0.2469349056482315, -0.19550968706607819, -0.11564308404922485, 0.09925147145986557, 0.29496142268180847, -0.0017339512705802917, -0.26601549983024597, 0.07757305353879929, 0.5640846490859985, 0.4030723571777344, 0.0865185558795929, 0.041852258145809174, -0.45081838965415955, -0.43988361954689026, 0.0007964633405208588, 0.07571849226951599, -0.04691942408680916, 0.2802652418613434, -0.14937564730644226, 0.1977665275335312, 0.18386206030845642, -0.1324864774942398, -0.11312161386013031, 0.4778260290622711, 0.07200015336275101, 0.05059283971786499, -0.07456205040216446, -0.1453448235988617, -0.2305828034877777, 0.3679276704788208, 0.49351876974105835, 0.1361139714717865, -0.0545002818107605, -0.10770528763532639, 0.34208476543426514, 0.2212437093257904, 0.12680135667324066, -0.05178738385438919, 0.029638048261404037, -0.10305418074131012, -0.21112225949764252, 0.23389500379562378, -0.003501802682876587, 0.08970830589532852, -0.034703806042671204, -0.26270592212677, 0.12977521121501923, 0.6660520434379578, 0.20217882096767426, -0.08822662383317947, 0.025741463527083397, -0.011451125144958496, -0.19905900955200195, 0.34811699390411377, 0.07435669749975204, 0.8326452374458313, -0.02589406818151474, 0.07674836367368698, 0.6967664361000061, -0.11951906234025955, 0.6577324271202087, 0.2338552325963974, 0.32348763942718506, -0.35177847743034363, 0.05253245681524277, 0.03925517201423645, -0.07630855590105057, 0.114175945520401, -0.16065502166748047, -0.435773640871048, 0.2853175699710846, 0.27057909965515137, 0.04297604411840439, 0.3506111800670624, 0.15007929503917694, -0.06479594856500626, 0.02637803740799427, -0.3548259437084198, 0.07938175648450851, -0.17171341180801392, 0.23683129251003265, -0.3579493463039398, -0.09899414330720901, 0.07264775037765503, -0.37371015548706055, -0.4061589241027832, 0.19801878929138184, -0.3119504749774933, -0.08599100261926651, 0.2118493616580963, -0.4263002276420593, 0.0714578926563263, 0.004807505756616592, -0.019904732704162598, 0.030170686542987823, -0.1736842542886734, 0.21353808045387268, 0.027787551283836365, -0.26821669936180115, -0.09509701281785965, 0.15930375456809998, 0.1995508074760437, -0.18099528551101685, -0.18069159984588623, 0.11419731378555298, -0.0766466036438942, -0.1602272093296051, 0.11030110716819763, 0.21794722974300385, -0.15760208666324615, 0.2590271830558777, 0.0707155168056488, 0.020860016345977783, 0.20435787737369537, -0.15483027696609497, 0.1161690354347229, -0.03162539005279541, 0.09684709459543228, 0.14474621415138245, -0.13221979141235352, -0.25699806213378906, -0.12968651950359344, 0.2917926013469696, 0.06488090753555298, 0.13387621939182281, 0.41785043478012085, 0.23000137507915497, -0.08086474239826202, -0.09245835244655609, -0.1907215714454651, -0.2852124273777008, -0.3821767270565033, 0.04743371531367302, 0.1602165848016739, 0.12086288630962372, 0.23634177446365356, 0.432594895362854, 0.1759965717792511, 0.03496943786740303, -0.0027743764221668243, -0.36109596490859985, -0.15834590792655945, 0.34789419174194336, 0.11188425123691559, -0.09183424711227417, 0.24123680591583252, 0.4302354156970978, 0.2563733458518982, -0.2707996070384979, -0.24388208985328674, 0.2088712602853775, -0.07748405635356903, 0.19959771633148193, -0.1697116196155548, -0.03847719728946686, 0.03257766366004944, 0.03210395947098732, 0.039129048585891724, 0.10349820554256439, -0.0770384669303894, -0.19864070415496826, -0.10420423746109009, 0.1216508001089096, 0.1287725865840912, -0.23630063235759735, -0.11177604645490646, -0.10118265450000763, 0.07654108107089996, 0.15679369866847992, 0.0715918242931366, 0.0031401030719280243, -0.17350834608078003, 0.14974352717399597, 0.14444680511951447, 0.28426826000213623, 0.012926440685987473, 0.11315596848726273, -0.2149544656276703, 0.4630049467086792, 0.2806183099746704, 0.36079826951026917, 0.1898019164800644, 0.07855093479156494, 0.2958897650241852, -0.15037801861763, -0.2741982936859131, -0.11272070556879044, 0.01569540798664093, -0.31673264503479004, -0.05848344415426254, -0.33182960748672485, 0.21497876942157745, 0.32157084345817566, -0.07765703648328781, -0.18744954466819763, 0.5202889442443848, 0.12152303010225296, -0.4359511137008667, 0.09138000011444092, 0.19158528745174408, 0.14525093138217926, -0.049245335161685944, 0.26151299476623535, 0.23119273781776428, -0.0020166561007499695, 0.213494673371315, 0.21701788902282715, 0.263914555311203, 0.2480226457118988, -0.018077556043863297, 0.25371941924095154, -0.10215085744857788, 0.12752477824687958, 0.21332383155822754, 0.19085310399532318, 0.37311485409736633, 0.02138182893395424, -0.2727660536766052, 0.1267821341753006, -0.2584770917892456, 0.07013523578643799, 0.015273422002792358, -0.445584237575531, -0.06126263365149498, 0.32972174882888794, 0.27981454133987427, -0.21265992522239685, 0.21821348369121552, 0.35162994265556335, -0.0680861845612526, -0.05100772902369499, -0.17031024396419525, 0.33142492175102234, -0.10200602561235428, -0.01533442921936512, -0.007572093978524208, 0.04846224933862686, -0.15119022130966187, 0.23742035031318665, -0.06311500072479248, -0.08508487045764923, 0.1830565631389618, 0.21442082524299622, -0.29294270277023315, -0.1625155210494995, 0.05258943513035774, 0.2145339548587799, -0.08693819493055344, -0.06501656025648117, 0.33255791664123535, -0.13093848526477814, -0.3034473657608032, -0.22528812289237976, 0.4857276976108551, 0.5330041646957397, 0.30111679434776306, -0.2612903416156769, -0.22225920855998993, -0.27249106764793396, 0.09346199780702591, -0.16097129881381989, 0.09102346748113632, 0.40103811025619507, 0.4848839342594147, 0.2285536676645279, 0.0634375512599945, -0.12811465561389923, 0.3109261095523834, 0.15886060893535614, -0.045451946556568146, -0.08728580176830292, 0.0489250011742115, 0.08793730288743973, -0.08463311940431595, -0.13881567120552063, 0.14353828132152557, -0.26902928948402405, 0.4802118241786957, 0.18941451609134674, 0.28152793645858765, -0.08881493657827377, -0.1190425381064415, 0.033463750034570694, 0.12055075168609619, 0.5594956278800964, 0.4931658208370209, 0.5704355835914612, -0.19833600521087646, -0.2719707489013672, -0.6176348924636841, 0.18322977423667908, -0.5359070301055908, 0.21797114610671997, 0.07530133426189423, -0.051567479968070984, -0.2211536467075348, 0.3695659041404724, -0.20848818123340607, 0.1653885543346405, -0.17041967809200287, -0.19187931716442108, -0.26231250166893005, -0.03853980824351311, 0.06601923704147339, -0.3587389588356018, -0.0989605113863945, -0.27717867493629456, 0.14496192336082458, -0.7602847814559937, -0.012444086372852325, -0.3348178267478943, -0.2329116016626358, 0.07994982600212097, 0.18442466855049133, 0.5588228702545166, 0.12729208171367645, 0.46839696168899536, 0.13974794745445251, 0.016538603231310844, -0.29161950945854187, -0.26195237040519714, -0.3168056309223175, 0.23443195223808289, 0.09304271638393402, 0.22118422389030457, -0.11723987013101578, 0.13495588302612305, -0.2433464229106903, 0.4795069992542267, -0.1296815276145935, 0.18606936931610107, 0.26577410101890564, 0.033579930663108826, -0.1438547670841217, -0.050599437206983566, -0.23590797185897827, 0.00070185586810112, 0.027832558378577232, 0.029366252943873405, -0.5606938600540161, -0.3480980396270752, 0.3855326771736145, -0.47101911902427673, 0.029596105217933655, -0.2068924754858017, 0.10317336767911911, 0.1791050136089325, -0.3120691180229187, -0.3964773714542389, 0.1284196674823761, 0.28035619854927063, 0.10818970203399658, -0.30015018582344055, 0.13388022780418396, 0.03650033101439476, -0.06327921152114868, -0.06915872544050217, 0.20663797855377197, -0.028769884258508682, -0.29447290301322937, -0.11398027837276459, -0.2467905730009079 ]
https://github.com/huggingface/datasets/issues/436
Google Colab - load_dataset - PyArrow exception
> Indeed, we’ll make a new PyPi release next week to solve this. Cc @lhoestq Yes definitely
With latest PyArrow 1.0.0 installed, I get the following exception . Restarting colab has the same issue ImportWarning: To use `nlp`, the module `pyarrow>=0.16.0` is required, and the current version of `pyarrow` doesn't match this condition. If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`. The error goes only when I install version 0.16.0 i.e. !pip install pyarrow==0.16.0
17
Google Colab - load_dataset - PyArrow exception With latest PyArrow 1.0.0 installed, I get the following exception . Restarting colab has the same issue ImportWarning: To use `nlp`, the module `pyarrow>=0.16.0` is required, and the current version of `pyarrow` doesn't match this condition. If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`. The error goes only when I install version 0.16.0 i.e. !pip install pyarrow==0.16.0 > Indeed, we’ll make a new PyPi release next week to solve this. Cc @lhoestq Yes definitely
[ -0.34277400374412537, 0.29933542013168335, 0.02786608785390854, 0.0008248612284660339, -0.05337397754192352, -0.2322775423526764, 0.2582431435585022, 0.17909598350524902, -0.23289652168750763, 0.1098071038722992, -0.003500282298773527, 0.6347985863685608, -0.2590237855911255, 0.11069460958242416, 0.11114762723445892, -0.09662578999996185, 0.12247787415981293, 0.38423264026641846, 0.03207806497812271, 0.11502781510353088, -0.23211456835269928, 0.30130600929260254, -0.4014837145805359, 0.27361488342285156, -0.3001123368740082, -0.017891066148877144, -0.033627115190029144, 0.09696242213249207, -0.28672659397125244, -0.6638888716697693, 0.4799576997756958, -0.046113815158605576, 0.24911943078041077, 0.21772955358028412, -0.00011209632066311315, 0.0018577948212623596, 0.4446175694465637, 0.05884411931037903, -0.19805748760700226, -0.40296435356140137, 0.0341196209192276, -0.47382476925849915, 0.41453316807746887, -0.09840189665555954, 0.00983915850520134, -0.023378517478704453, 0.26218441128730774, 0.6624272465705872, 0.3113095760345459, 0.20260845124721527, 0.2112782746553421, 0.2363436222076416, 0.32347702980041504, 0.007409938611090183, 0.42272406816482544, -0.15751364827156067, -0.0963936299085617, 0.7648114562034607, 0.14293575286865234, -0.3419240117073059, 0.00897575169801712, 0.10319508612155914, -0.27885666489601135, 0.028960280120372772, 0.021921921521425247, 0.007011335343122482, -0.14720407128334045, -0.3071439564228058, -0.06391102820634842, 0.27355045080184937, 0.24623030424118042, -0.3698071241378784, -0.17044472694396973, -0.00987512618303299, 0.15774016082286835, -0.5250219106674194, 0.1430397778749466, 0.24699226021766663, -0.3028101921081543, 0.20587508380413055, 0.12861935794353485, -0.11883251368999481, -0.18605732917785645, 0.17150989174842834, -0.11713537573814392, 0.7375600337982178, 0.13355538249015808, 0.11525562405586243, 0.28058815002441406, -0.05674256384372711, 0.5407665967941284, 0.3088671863079071, -0.07927055656909943, 0.12028621882200241, -0.04272528365254402, 0.021169207990169525, 0.022546160966157913, 0.34090977907180786, 0.02490871772170067, -0.24730829894542694, 0.025585215538740158, 0.022566646337509155, 0.12562215328216553, 0.450328528881073, 0.05996125563979149, -0.048491138964891434, -0.045334674417972565, -0.004633736331015825, 0.42679035663604736, -0.0066435737535357475, 0.13695666193962097, 0.08084101229906082, -0.012274164706468582, -0.28476110100746155, -0.017037170007824898, -0.06765373051166534, 0.2775864601135254, -0.16117750108242035, -0.3963495194911957, -0.2821989953517914, -0.4359756410121918, 0.023858506232500076, 0.0372936874628067, 0.1950215846300125, -0.12001963704824448, -0.10235387831926346, 0.012181509286165237, 0.15171965956687927, -0.26963549852371216, -0.08002347499132156, -0.03343646228313446, 0.19527915120124817, -0.22374095022678375, 0.0621652752161026, 0.23171387612819672, -0.15111584961414337, 0.21367432177066803, 0.1638040691614151, -0.10622741281986237, 0.23101118206977844, -0.029430722817778587, -0.13417024910449982, -0.1386498510837555, 0.2887902557849884, 0.1331017017364502, -0.08390989899635315, -0.17246827483177185, -0.3421241044998169, -0.2602788209915161, 0.38349711894989014, -0.28102928400039673, -0.34865766763687134, -0.30575382709503174, 0.17158041894435883, -0.3623223304748535, -0.22984981536865234, -0.24155092239379883, 0.19250796735286713, -0.10008972138166428, -0.5023193359375, -0.1039685532450676, -0.35213929414749146, -0.07175804674625397, -0.20183859765529633, -0.029296940192580223, 0.20348376035690308, -0.3529720902442932, -0.03531336039304733, -0.11821944266557693, -0.15450528264045715, 0.28505849838256836, 0.20023372769355774, -0.2665146291255951, 0.0042181313037872314, -0.11327733844518661, 0.2782347798347473, 0.2827669680118561, -0.07820139825344086, -0.35041967034339905, -0.024628933519124985, -0.08844342827796936, -0.1190679743885994, -0.056547023355960846, -0.011274184100329876, -0.07932733744382858, -0.07983912527561188, 0.18837305903434753, 0.22899369895458221, -0.020691221579909325, 0.08995478600263596, -0.34442541003227234, -0.33589568734169006, 0.28054654598236084, 0.19202975928783417, 0.07223711907863617, -0.17895451188087463, 0.0699494332075119, -0.045972198247909546, 0.1574612557888031, -0.16992221772670746, -0.18141578137874603, 0.008677162230014801, 0.4186849594116211, -0.1727125495672226, -0.12129540741443634, 0.014960601925849915, -0.36362215876579285, 0.06538863480091095, -0.24998851120471954, 0.3446650803089142, -0.16897691786289215, -0.13835440576076508, -0.09686242043972015, 0.15402233600616455, -0.0032701529562473297, 0.044844210147857666, 0.11417566239833832, -0.06921997666358948, 0.0930163562297821, 0.23077292740345, 0.013985957950353622, 0.07003024965524673, 0.09744660556316376, 0.09029446542263031, 0.07552939653396606, 0.32006266713142395, -0.3432157337665558, -0.5013926029205322, 0.15589158236980438, 0.19194966554641724, 0.09549354016780853, -0.015271052718162537, 0.05957593768835068, 0.07016080617904663, -0.041491761803627014, 0.10121418535709381, -0.32476189732551575, -0.18534068763256073, 0.2462165355682373, -0.49933844804763794, 0.08039391040802002, 0.013168016448616982, -0.07524092495441437, 0.12654376029968262, 0.4028700292110443, 0.3070373833179474, 0.18033210933208466, -0.05663347989320755, -0.003465034067630768, 0.060174524784088135, 0.1596658080816269, -0.027966918423771858, 0.07234666496515274, 0.0341920405626297, 0.1038164496421814, 0.3129443824291229, 0.11962796747684479, -0.022380566224455833, -0.35518956184387207, 0.1838100254535675, 0.471106618642807, 0.062361668795347214, 0.25832757353782654, 0.2070445716381073, -0.09680486470460892, -0.19115346670150757, 0.29632243514060974, -0.22389253973960876, 0.2534523010253906, 0.26179075241088867, -0.07686120271682739, 0.250349223613739, -0.31054794788360596, -0.3091449737548828, 0.09439194202423096, 0.04212789237499237, 0.1733684539794922, 0.02485169842839241, 0.3159971833229065, 0.011051857843995094, -0.38235580921173096, -0.054147832095623016, 0.002007424831390381, 0.2897810637950897, -0.16076889634132385, 0.22922061383724213, -0.3812181353569031, -0.584412157535553, -0.2033061385154724, -0.37617936730384827, -0.3669307231903076, -0.07431640475988388, 0.08380261063575745, 0.31037455797195435, 0.05438722297549248, 0.25576430559158325, 0.40263497829437256, 0.06971752643585205, -0.23279473185539246, -0.24343286454677582, -0.20931191742420197, -0.41309231519699097, -0.5413900017738342, 0.06757496297359467, 0.2533714473247528, 0.14990611374378204, 0.20013535022735596, -0.17144055664539337, 0.016950730234384537, 0.10438074916601181, -0.5898128151893616, 0.1002965196967125, -0.22473426163196564, 0.3380070924758911, 0.10600607842206955, -0.07941551506519318, -0.39445602893829346, -0.38282766938209534, 0.10792626440525055, -0.2567720115184784, -0.18134818971157074, 0.008591486141085625, -0.3333752751350403, 0.0928746834397316, -0.21608446538448334, -0.10321160405874252, -0.6534886360168457, -0.26566749811172485, 0.15105244517326355, 0.11695854365825653, 0.12992599606513977, 0.3539070785045624, 0.22919593751430511, 0.18245723843574524, 0.049074165523052216, -0.1751549243927002, -0.011447545140981674, 0.02906007692217827, 0.2000274807214737, -0.2042189985513687, -0.29456597566604614, 0.14725857973098755, -0.16737455129623413, 0.09318037331104279, -0.0429624505341053, -0.42154693603515625, -0.441727876663208, 0.0855792686343193, 0.38402119278907776, 0.15430490672588348, -0.006745217368006706, 0.34198033809661865, 0.09561429172754288, -0.03419915586709976, 0.08397132903337479, -0.315102219581604, -0.0966731533408165, 0.11710277199745178, 0.14175260066986084, 0.04345894977450371, 0.1518183946609497, -0.10930076241493225, 0.6300569176673889, -0.2139456570148468, -0.10772103071212769, 0.450952410697937, -0.10720499604940414, 0.3438107967376709, -0.09441421180963516, -0.07529208064079285, 0.048007458448410034, 0.04402441531419754, -0.0963844433426857, 0.19734525680541992, -0.20021465420722961, -0.549432098865509, -0.1968810111284256, -0.22612646222114563, -0.17906546592712402, -0.27191004157066345, 0.09059037268161774, 0.4456663429737091, 0.15527349710464478, 0.11976735293865204, -0.11329910159111023, -0.014235341921448708, -0.33946678042411804, -0.1343710571527481, 0.03645661473274231, -0.10166079550981522, 0.03466936573386192, 0.2814475893974304, -0.5303831100463867, -0.5247488021850586, 0.2502900958061218, 0.3806586265563965, 0.021502336487174034, 0.008142922073602676, -0.06261111795902252, 0.08721067011356354, -0.10629037767648697, 0.06844590604305267, 0.09222083538770676, -0.09713590145111084, 0.2445693016052246, 0.2222726047039032, -0.23400990664958954, -0.19204765558242798, -0.19349198043346405, 0.16396641731262207, 0.30896735191345215, 0.004729136824607849, -0.3216294050216675, 0.0847138836979866, 0.5238490104675293, 0.3645198941230774, 0.05462716147303581, 0.05351719632744789, -0.380959689617157, -0.5595182776451111, -0.06022203713655472, 0.07335603982210159, -0.03927534818649292, 0.27753564715385437, -0.15300050377845764, 0.15383242070674896, 0.10331359505653381, -0.15284305810928345, -0.10437054932117462, 0.49471771717071533, 0.09368424862623215, -0.012978342361748219, -0.00045457854866981506, -0.1389581561088562, -0.28879496455192566, 0.394998162984848, 0.45439717173576355, 0.1464986950159073, -0.0440172404050827, -0.046885885298252106, 0.21948395669460297, 0.2195364385843277, 0.06620583683252335, -0.0709814727306366, 0.11148989945650101, -0.2176196128129959, -0.1598273664712906, 0.15624171495437622, 0.056201670318841934, 0.08165667206048965, -0.03208032250404358, -0.22925233840942383, 0.05580393970012665, 0.6698863506317139, 0.1846267580986023, -0.06931299716234207, -0.027919724583625793, -0.04302850365638733, -0.2264951914548874, 0.3169514536857605, 0.10455045849084854, 0.8228824138641357, -0.04894158989191055, 0.14417466521263123, 0.7622261047363281, -0.02966817282140255, 0.6805462837219238, 0.1497800648212433, 0.3072376251220703, -0.38352566957473755, 0.05880182981491089, 0.07282590866088867, -0.060989975929260254, 0.07314786314964294, -0.14550070464611053, -0.39305543899536133, 0.2606291174888611, 0.2867891788482666, -0.026476729661226273, 0.28778544068336487, 0.14199873805046082, -0.026943599805235863, -0.053149882704019547, -0.34529078006744385, 0.10842473804950714, -0.1777222603559494, 0.20797155797481537, -0.3530266284942627, -0.1281888782978058, 0.08710987865924835, -0.3031856417655945, -0.35911619663238525, 0.25816720724105835, -0.29690292477607727, 0.04687850922346115, 0.17427268624305725, -0.45962053537368774, 0.016595643013715744, -0.07845114171504974, -0.062058791518211365, -0.03717100992798805, -0.15623360872268677, 0.1665724664926529, 0.00041057169437408447, -0.30371594429016113, -0.05375449359416962, 0.22566759586334229, 0.21890412271022797, -0.2000868320465088, -0.18932726979255676, 0.187737375497818, -0.04952698200941086, -0.18750856816768646, 0.1061263382434845, 0.20454873144626617, -0.11429868638515472, 0.1869375854730606, 0.07943423092365265, 0.0730263739824295, 0.19065618515014648, -0.13561458885669708, 0.14219608902931213, 0.020757973194122314, 0.07782358676195145, 0.15630924701690674, -0.053573984652757645, -0.18598556518554688, -0.16438303887844086, 0.22527602314949036, 0.09670331329107285, 0.18613161146640778, 0.45582130551338196, 0.17412635684013367, -0.08323892951011658, -0.1470932960510254, -0.14633285999298096, -0.321768581867218, -0.36535096168518066, 0.07739552855491638, 0.2588832676410675, 0.12888656556606293, 0.21838116645812988, 0.39140379428863525, 0.11392811685800552, 0.023352958261966705, -0.044860921800136566, -0.3423524498939514, -0.21973887085914612, 0.32766810059547424, 0.057459983974695206, -0.06915225088596344, 0.2971719205379486, 0.42407605051994324, 0.19786173105239868, -0.2634889781475067, -0.29025009274482727, 0.18048888444900513, -0.16758228838443756, 0.16671088337898254, -0.11062128841876984, -0.1134621724486351, 0.05691920593380928, 0.07130753993988037, 0.08571542799472809, 0.10604005306959152, -0.0339437797665596, -0.23480191826820374, -0.08593903481960297, 0.0918135792016983, 0.16146564483642578, -0.2099699079990387, -0.11057813465595245, -0.11622156947851181, 0.05522617697715759, 0.1327284276485443, 0.08402387797832489, -0.02907625399529934, -0.23904062807559967, 0.16473379731178284, 0.13772882521152496, 0.22502225637435913, -0.0005173943936824799, 0.15142521262168884, -0.1787550151348114, 0.422207772731781, 0.2305237203836441, 0.33706507086753845, 0.10937825590372086, 0.09825929999351501, 0.31433403491973877, -0.12148911505937576, -0.15712817013263702, -0.13496726751327515, 0.040111951529979706, -0.34938687086105347, -0.02804432436823845, -0.38542136549949646, 0.1530691236257553, 0.3556865453720093, -0.08811083436012268, -0.18752244114875793, 0.5486340522766113, 0.1611548215150833, -0.4660818576812744, 0.05233243480324745, 0.08504097163677216, 0.054478082805871964, -0.046883948147296906, 0.24231472611427307, 0.2471877932548523, -0.0384102500975132, 0.2116464078426361, 0.19331616163253784, 0.2679803967475891, 0.26157140731811523, 0.00408397801220417, 0.22762076556682587, -0.13584622740745544, 0.12435893714427948, 0.2575100362300873, 0.18379876017570496, 0.37273842096328735, 0.037141408771276474, -0.3018251657485962, 0.21146410703659058, -0.2427949607372284, 0.07616013288497925, 0.047559864819049835, -0.4293705224990845, -0.12986552715301514, 0.21083691716194153, 0.28409820795059204, -0.18936818838119507, 0.17552608251571655, 0.43410733342170715, -0.11559174209833145, 0.0032044993713498116, -0.17226582765579224, 0.4161438047885895, -0.1437198519706726, -0.026285307481884956, 0.057835035026073456, 0.02142716944217682, -0.06301549077033997, 0.2276250422000885, -0.1368110030889511, -0.11640423536300659, 0.22308117151260376, 0.19550561904907227, -0.19404594600200653, -0.14349021017551422, 0.06301912665367126, 0.23894080519676208, -0.11769557744264603, -0.017622556537389755, 0.2848544716835022, -0.07447071373462677, -0.3305775821208954, -0.25185343623161316, 0.5178362131118774, 0.5570288300514221, 0.29441598057746887, -0.3138180077075958, -0.22810934484004974, -0.2676800787448883, 0.09818990528583527, -0.13675493001937866, 0.07342226803302765, 0.45133715867996216, 0.43817275762557983, 0.18123650550842285, 0.10114280879497528, -0.17972582578659058, 0.2612932026386261, 0.20132391154766083, -0.03681699186563492, -0.030332330614328384, 0.04527205228805542, 0.08535806834697723, -0.10820777714252472, -0.16083382070064545, 0.009869053959846497, -0.26835960149765015, 0.418689489364624, 0.21068766713142395, 0.21662841737270355, -0.10777050256729126, -0.1446017473936081, 0.07572878897190094, 0.11246691644191742, 0.6587205529212952, 0.41523513197898865, 0.5267049670219421, -0.2332034707069397, -0.2329096794128418, -0.5888137817382812, 0.206811785697937, -0.4867604374885559, 0.09171899408102036, 0.035930655896663666, -0.049041226506233215, -0.18554574251174927, 0.3980051875114441, -0.2160433679819107, 0.32552069425582886, -0.12396977841854095, -0.28679144382476807, -0.33911189436912537, -0.02710169181227684, 0.018910054117441177, -0.3432715833187103, -0.09600970149040222, -0.24294120073318481, 0.1460622400045395, -0.6712967157363892, 0.05364236980676651, -0.31015294790267944, -0.1983031928539276, 0.049585696309804916, 0.15956145524978638, 0.566331148147583, 0.12403243780136108, 0.5083736181259155, 0.11582127958536148, 0.010375184938311577, -0.127268448472023, -0.38059648871421814, -0.24222886562347412, 0.2114134132862091, 0.13761039078235626, 0.12878262996673584, -0.07625476270914078, 0.07946497201919556, -0.24559447169303894, 0.43172869086265564, -0.14618192613124847, 0.13927119970321655, 0.21354608237743378, 0.10064870864152908, -0.08607655763626099, -0.0981784239411354, -0.20941507816314697, 0.04868985712528229, -0.000639498233795166, -0.025748223066329956, -0.5031929612159729, -0.34797927737236023, 0.3578090965747833, -0.49540334939956665, 0.01601206138730049, -0.17221906781196594, 0.07517260313034058, 0.07588426768779755, -0.2522551715373993, -0.3977369964122772, 0.16558343172073364, 0.26350319385528564, 0.07352448999881744, -0.29148218035697937, 0.13515663146972656, 0.007212535943835974, -0.08722332119941711, -0.1138576865196228, 0.22763033211231232, 0.025294387713074684, -0.2854978144168854, -0.11057737469673157, -0.19002728164196014 ]