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.1538136303, -0.2194945961, -0.0950480327, 0.1538351476, -0.0239239112, 0.0457142219, 0.1359893531, 0.4179362059, 0.3139533997, -0.1768577099, 0.1352539659, 0.2417801023, -0.13237077, 0.2570712864, 0.2852427959, 0.0912736952, -0.0661658719, 0.2590823174, 0.0090139993, -0.1174313203, 0.1052108034, 0.0947559327, -0.2691367269, -0.2267980278, -0.1341263056, 0.0427628681, -0.0179619752, 0.0809901506, -0.1078436896, -0.2789717615, 0.0466632992, 0.1192352697, -0.0135054626, 0.2386161834, -0.0001188215, -0.2400175035, 0.4164004624, 0.0876649469, -0.2083814144, -0.1413669139, 0.3876320422, -0.5893999338, 0.221742183, -0.0976362824, -0.0658546239, 0.0419177823, 0.0641735345, -0.0316153839, 0.0141375624, 0.081360653, 0.118616052, -0.0696919486, -0.195496425, 0.24578996, 0.0393075719, 0.2178892642, 0.0103266984, 0.3551193476, 0.459106952, -0.2080252767, -0.2608444393, 0.0574854873, -0.1576687992, 0.1157765761, 0.2842022479, 0.0538218394, -0.1553235203, -0.0795962065, 0.1041075066, 0.3164954185, 0.5134062171, -0.1090568006, 0.0126286931, -0.4890190661, 0.0140089616, -0.2325049341, 0.2363929749, 0.2235958576, -0.2313874066, -0.2666048706, -0.4041787982, -0.3050925136, -0.0624962561, 0.2165594846, 0.1770123392, 0.0690087527, -0.0753794909, 0.1108510792, 0.2798572481, 0.0148910768, -0.1217616051, -0.0262429565, 0.2419859469, 0.4380360246, -0.3837108016, -0.107704781, 0.1144535094, 0.2436064184, 0.1071792692, 0.1331066489, 0.0522233881, 0.0372731648, -0.1837208867, -0.0216732696, 0.2654948831, 0.4267694652, -0.1390134096, -0.1967365891, 0.3785613775, -0.0578015335, -0.1065246388, 0.2549195886, -0.1018856391, -0.1470218003, -0.0624275208, -0.4120218158, -0.1541310847, -0.4001075029, -0.0897246152, -0.1155259833, 0.100811556, -0.2847557962, 0.0834819525, 0.2124908119, -0.355864495, 0.2891805172, 0.1108581275, -0.0932927728, -0.3905104399, 0.1106142178, -0.0973508358, 0.0845340714, -0.156490773, 0.231957078, 0.5620114207, -0.1151945144, 0.1986724585, 0.1585438848, -0.1802901626, -0.1654037237, -0.3062999249, -0.2818942964, -0.1220205352, -0.0347552747, -0.0456169322, 0.2278313637, 0.0319258198, 0.2941395938, -0.3541755676, 0.1221791953, -0.360490799, -0.1590795815, 0.0083841011, 0.1173996404, -0.4411826134, -0.4041284621, -0.2906875014, 0.4033416808, -0.0657472163, -0.18364501, -0.2509908378, -0.0534895547, -0.3046064973, 0.026560273, 0.1459078342, 0.2639086545, -0.0665441006, -0.0997293144, -0.0743313581, 0.3339369893, 0.3001452684, 0.5857616067, -0.1756267399, 0.2770580649, -0.1778493226, 0.0134643912, 0.4331522584, 0.0287085101, -0.3839408755, 0.4948648512, -0.255127728, 0.0936981067, 0.1792031378, 0.3430298269, -0.0211701728, -0.1265483499, 0.2647035122, 0.5780932307, 0.2108376622, 0.2118264884, -0.4929422736, -0.1691844016, 0.2549583316, 0.4343911409, -0.1443445385, -0.040195737, -0.0740320235, 0.1021755785, 0.4322358072, 0.1786888689, -0.1159981564, 0.3622045517, -0.1837666929, 0.1298583448, 0.0351087898, 0.1390739381, -0.1245254427, 0.1571699083, 0.1711614281, 0.1409961432, 0.3427329957, 0.1587993801, -0.2499694526, -0.2745953202, 0.114489764, 0.1902354211, -0.0246140696, -0.043202199, 0.1091302633, 0.2025135905, -0.2353195697, 0.326387763, -0.1443890035, -0.1601640135, -0.4143636525, -0.0626250356, 0.2259680182, -0.1562426686, 0.3617385626, 0.3640158474, -0.1199450046, -0.0392700024, -0.1009060815, -0.0439307876, -0.3276136518, 0.2787544727, 0.0462333821, 0.0630744174, 0.0254492704, -0.020510599, 0.3717828393, 0.1491748393, 0.2595146, -0.3600085974, -0.2161256075, 0.3663825989, -0.2371298671, 0.2518212497, 0.1492191553, -0.4946301281, 0.0410463437, -0.1400920153, 0.1856496334, 0.2630782723, 0.9809720516, 0.0491883978, 0.5438914299, 0.237486124, -0.186026752, 0.0135344751, 0.4733050764, -0.0671332628, -0.1612818837, 0.5493711233, -0.0972786397, -0.3391582966, -0.0454707965, -0.1855876148, 0.3958616257, 0.2632414103, 0.0271008387, 0.1346807778, -0.0331410654, -0.2451710403, 0.1936381459, -0.1551496089, 0.17237252, 0.1338719875, 0.3242036402, 0.097715959, -0.4654925466, -0.170881018, -0.0920764357, 0.3634903431, -0.1205447018, -0.0147361867, -0.0754011646, -0.3507580161, -0.2301570475, -0.0362832323, -0.3193769753, -0.1914124489, 0.0126558691, 0.1060667485, 0.4186266363, -0.1617040932, 0.039875187, 0.1301962137, -0.2356346399, -0.446917057, -0.3646008372, -0.102306053, -0.3111703098, -0.0221492872, 0.2604714632, 0.2491405606, 0.3346447647, 0.1370209157, -0.2228449285, 0.2680354714, -0.1485189199, -0.2124431729, -0.1045695841, -0.0095216669, -0.1503896713, 0.207289353, 0.203045398, 0.0171596184, 0.1038346291, -0.4042709768, -0.0231149569, 0.1369470358, -0.0257652048, 0.011045672, -0.0730466694, -0.2641471922, -0.2755765617, -0.2684981227, 0.547409296, 0.1586173773, 0.1890622824, 0.2368094325, -0.222782433, 0.2654805183, 0.0499281995, 0.2723815739, -0.0391039886, -0.1843653619, 0.2653583288, 0.2940632403, -0.2037299573, -0.2006462514, 0.107031256, 0.1367928535, -0.0888873488, -0.7485920191, 0.2411627471, -0.4384425282, -0.0879486054, -0.0570078902, 0.1646112949, 0.2118795961, -0.2826983929, -0.0507269129, 0.252030611, -0.2270191908, -0.0051460899, -0.019230891, 0.1749125123, -0.1399844736, 0.4712073803, -0.0711434335, 0.0566897169, 0.1988452971, -0.080858998, 0.219743371, -0.0378410034, 0.1163277477, -0.2227661312, -0.2527056336, 0.2082593292, -0.0971234664, -0.0405657515, 0.3472689092, 0.1087500453, -0.3780518472, -0.3060778379, -0.1786082685, -0.0703599006, -0.0841787085, 0.1630299389, -0.2872514129, -0.1635907739, -0.02807758, -0.1237447709, -0.2175314873, -0.7590792179, -0.1072116494, 0.1878440678, 0.1177789047, 0.0067718327, -0.1637415737, 0.0266662017, -0.8222564459, 0.1097551137, -0.2407435328, 0.3917475939, 0.0051583499, -0.1589804739, 0.396414876, -0.1695563793, 0.2948713005, 0.3480370939, 0.104922384, 0.1405109763, -0.1382959485, -0.4310264885, -0.0184934661, -0.1026416123, 0.2042779028, 0.6005518436, 0.3204453588, -0.2217419147, -0.1375668496, 0.1410610527, 0.2688468099, -0.0296869129, -0.6407155395, -0.3850317299, -0.203902036, 0.017688036, 0.0526272245, -0.2620925009, 0.1665071696, -0.1924743652, 0.0582245141, 0.1080173999, -0.0836958587, 0.2440250516, -0.0485574305, -0.2378833741, 0.1179619506, 0.3290277421, -0.0206174012, 0.2147843093, -0.5225411057, 0.484550029, 0.2467737943, 0.1944155395, -0.051272694, 0.103171885, 0.4254480302, 0.3236662745, 0.1285507828, 0.1109715402, -0.2379470319, 0.2317787707, -0.2935090065, -0.00062076, 0.1391832381, -0.0066115744, -0.3307590783, -0.3948571086, 0.8833643198, 0.1604795605, 0.0862204283, 0.3740404248, -0.387963593, 0.010138981, 0.1129835546, -0.3719638586, 0.8148233891, -0.4314714372, 0.2765330076, -0.0590740852, 0.0877640843, 0.3967081308, -0.1042750627, 0.0209743828, -0.4423851371, 0.092284739, 0.2870863378, -0.0151305348, -0.117352441, 0.1940272301, -0.1858385354, 0.4905818701, 0.3192148507, -0.2694951594, -0.1522087455, 0.7354370356, -0.1749260724, -0.2167397588, -0.6459861994, 0.0870802328, -0.3232803047, 0.5647562146, 0.0320596583, 0.1008215249, -0.0531554781, -0.0877464339, -0.2761623263, 0.1468394101, -0.0159175061, -0.1591124237, -0.0253691003, -0.2758975029, 0.2373277247, 0.0997475088, -0.1956421435, 0.2086946368, -0.2587707937, 0.1135696173, -0.4159816206, 0.1700323373, 0.5306612849, 0.0424903743, 0.1286772043, -0.1998656094, -0.0250678509, -0.2198508084, 0.0235131867, -0.1915743053, -0.1013420969, 0.1327844262, 0.0029749116, 0.0669257641, -0.2910993397, 0.260826081, 0.1093741655, 0.0212024674, 0.0503932312, 0.4311576486, 0.0453743115, 0.3068484664, 0.0473052114, -0.3876749873, -0.052299656, 0.5366801023, 0.1274871975, -0.2194700688, 0.4549703896, 0.3048581183, -0.1194841638, -0.1240125, -0.0843770057, -0.0591269284, -0.2533000708, 0.0543560944, 0.2050639987, 0.0701523125, 0.2456111312, 0.0874526501, -0.1702504307, -0.1359897107, 0.0609176904, -0.4060441554, -0.3884433508, 0.0203083344, -0.0279723629, -0.0565354377, 0.0271125063, 0.000215495, 0.2553325295, 0.3067405522, -0.1939478517, 0.1568153501, 0.0301957428, 0.0572671294, 0.1338681579, -0.3019948006, 0.0996771753, 0.194974035, 0.0877971053, -0.1048571765, 0.1284297109, -0.2024478912, 0.0640578642, 0.1629899293, -0.0517631657, 0.0146520622, -0.0578788482, -0.2419183999, -0.0619421937, -0.1997777969, -0.06470301, -0.057280302, -0.0321859457, -0.020148363, -0.0409633368, -0.0384066589, 0.037593469, 0.2064876258, -0.4180057347, 0.2450839877, 0.1308737546, -0.0194784552, 0.2973196805, 0.0806588009, -0.5015333891, -0.0753708854, 0.1877053231, 0.1760766506, 0.1198441088, -0.1874105632, 0.087827459, -0.0222262312, 0.200706169, 0.5044087768, 0.0197263435, -0.2055372596, 0.1735663116, 0.0793798268, -0.1997904032, 0.0575188547, 0.2935535312, 0.1656488925, -0.0971026421, 0.1810157299, 0.1531105787, 0.033918798, -0.2126948982, -0.2405850589, 0.3971410096, -0.2115808427, -0.281998992, 0.0333870277, 0.163155973, -0.2190025151, 0.1968733221, 0.1078830659, 0.0027400106, 0.3443063796, 0.1866303086, 0.240371272, -0.0087088738, 0.4980347157, -0.4289355278, -0.2252037078, -0.2206611335, 0.4912686944, 0.1481183469, 0.1297489554, -0.0765362382, 0.3688556552, -0.0934266895, 0.0200452097, -0.2058986425, 0.1213425547, -0.0305214822, -0.0982712284, 0.1794664413, 0.1005722135, -0.2097426802, 0.2337901443, -0.2923447788, 0.072654888, -0.0779220909, 0.2915318608, -0.0786124915, -0.4484071136, -0.0169524103, -0.0345751569, 0.2662853003, -0.1513133645, 0.2016661912, -0.2848910391, 0.0933899209, 0.0807094872, 0.2364780754, 0.2884941399, 0.3609553277, 0.0017196499, 0.0992552266, -0.1842442751, 0.0128814578, -0.1870211959, 0.4430472553, 0.2176153213, 0.4096031487, 0.0002739094, -0.0485137738, -0.0907899663, 0.1589914858, -0.1634994894, -0.2090654522, -0.1326420903, 0.3491034508, 0.212805301, -0.2817459106, -0.6433494091, 0.0883393884, -0.2993734777, -0.1925559789, 0.1242976785, -0.0390460715, -0.0400075838, -0.1342172027, 0.0340583101, -0.2491404861, 0.6754309535, 0.398175627, 0.3670076132, -0.0854020938, -0.2425557077, -0.516557157, -0.1479378194, -0.2220450342, -0.1068291217, 0.0941357017, 0.2349835038, 0.0108164959, 0.0494083352, -0.403229475, 0.1061643511, -0.0794842094, -0.2023796439, -0.2679604292, 0.0747055635, -0.2873655558, 0.0908481777, -0.1399202645, -0.1393684447, 0.0178874433, -0.296646446, -0.104866907, -0.1611985862, 0.1833266616, -0.0955509096, 0.4189109504, 0.2183755636, -0.0168885086, 0.3727633059, 0.0274848416, -0.1051084995, -0.4040207267, 0.0599322766, -0.2096919417, 0.2013245225, 0.0908447877, -0.0278294086, -0.0458417423, 0.2639582455, 0.0952993482, 0.2681597173, -0.2644181848, 0.0143084936, 0.0921965316, -0.3141652942, -0.0095514208, 0.3425395191, -0.0030010082, 0.4836660028, -0.0296046175, -0.0528521314, -0.5216858983, 0.0340327695, 0.3458126187, -0.2806147933, -0.0370055586, -0.172982797, 0.3743340969, 0.050303787, 0.2137227058, -0.4686454237, -0.028810516, 0.2371794581, 0.1576629579, -0.0020755902, 0.5520821214, -0.063530162, -0.1372726411, 0.017242834, 0.2021825612, -0.0614262857, -0.1073468924, -0.2837384045, -0.1530962735 ]
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.1519208997, -0.1488331705, -0.115712367, 0.2396362275, 0.0376229361, 0.0494575053, 0.1378421783, 0.4157027006, 0.2257432342, -0.220219776, 0.1811742187, 0.2084627151, -0.1486446708, 0.2225390375, 0.2400523126, 0.1334552765, -0.0106431544, 0.2384754121, -0.0394380577, -0.1812112927, 0.0848224834, -0.0164611898, -0.1985273957, -0.2775100768, -0.2173949331, -0.0564305708, -0.0055381432, 0.0889179409, -0.1562846452, -0.2468100637, -0.0427507348, 0.0652193725, -0.0512205288, 0.1408248097, -0.0001163276, -0.2455975562, 0.4251796007, 0.1135243028, -0.1921710968, -0.0729342103, 0.2216127515, -0.6238470078, 0.0891683772, -0.0979589373, -0.0205340832, -0.0389110669, 0.0668589771, -0.075063318, 0.0484488457, 0.036764469, 0.114106521, -0.1823952496, -0.2229849696, 0.2734904587, 0.0973573178, 0.2033152878, -0.0078115314, 0.4100628197, 0.328112781, -0.1822444499, -0.2425542623, 0.0311107412, -0.1526715457, 0.068631053, 0.2688615024, 0.0768637061, -0.0380758755, -0.1262120456, 0.1172827259, 0.2772989571, 0.5142141581, -0.0743168592, -0.0818330646, -0.3553851843, 0.0407787412, -0.1829120964, 0.3108656704, 0.2620791793, -0.2431780994, -0.2519624233, -0.3767658472, -0.3107423186, -0.0358886644, 0.1691657156, 0.1969482154, -0.0173002593, 0.0154274665, 0.1115542203, 0.2200428247, -0.0238083191, -0.0098398048, -0.0847473741, 0.2152493596, 0.3841083646, -0.3390985429, -0.0486885123, 0.0806411952, 0.2237044275, 0.0989987552, 0.1023347378, 0.0983229578, 0.0823981836, -0.0574503765, -0.0001836671, 0.1947004795, 0.2265610546, -0.1181397513, -0.2156524211, 0.3537074924, -0.2414892614, -0.2157759964, 0.2924396098, -0.1502348781, -0.1643950194, 0.0223637, -0.3545994461, -0.2640549242, -0.3176329136, 0.0175317824, -0.062175028, -0.0178756714, -0.3224635124, 0.0862380788, 0.2377759069, -0.4192527235, 0.1554701775, -0.0714039877, -0.1302157938, -0.2981192172, 0.127715081, -0.1737807393, 0.0912980586, -0.2290062755, 0.2068091035, 0.5647193789, -0.1109808907, 0.1604577601, 0.2225557566, -0.2360694855, -0.1250257343, -0.2276327163, -0.3216440678, -0.0550679229, -0.0739353597, -0.0266833454, 0.2162743509, -0.025133688, 0.3782802224, -0.3872928619, 0.1844603568, -0.3624751866, -0.1348640025, 0.0935597122, 0.1424205303, -0.4249197841, -0.2871741951, -0.1541261375, 0.3690339923, -0.0186954662, -0.1710001826, -0.3164307177, -0.0107480418, -0.1685535163, -0.0905547664, 0.1508932114, 0.189743191, -0.0913727209, 0.0287130103, -0.0428014845, 0.3228217363, 0.3777248561, 0.5567442179, -0.2224966288, 0.2703513801, -0.1818805337, 0.0393541008, 0.5186567307, 0.1584901363, -0.4370106161, 0.5346630216, -0.2084818333, 0.0218874514, 0.2098893821, 0.3564037383, 0.020329237, -0.0231738072, 0.3230542541, 0.6156228185, 0.1618904024, 0.2482871115, -0.5206921697, -0.1039236635, 0.3324404359, 0.3731045127, -0.108113721, -0.0000857189, 0.0307737552, 0.1343972832, 0.4153929055, 0.1156589463, -0.0639220849, 0.3338143826, -0.1479676664, -0.0461846814, 0.027615983, 0.1599301547, -0.1134733707, 0.1602134705, 0.1607996076, 0.1595622897, 0.2463896275, 0.1536943913, -0.1623035967, -0.2808183134, 0.1097997352, 0.2023738325, -0.0130556561, -0.0812411606, 0.0570365638, 0.128744036, -0.1415067911, 0.3597146273, -0.227753073, -0.1650278866, -0.3817076087, -0.0339086875, 0.2300841957, -0.1821877658, 0.3948883712, 0.3099307716, -0.1314731836, -0.0184686333, -0.1039194465, -0.1602776647, -0.2824918926, 0.2352556586, 0.0922761932, 0.1354864687, 0.0085613485, -0.0969766378, 0.4391184449, 0.027645696, 0.2238955349, -0.4000406861, -0.1980138421, 0.4823371172, -0.2769954205, 0.1535594165, 0.0893525183, -0.4861750603, 0.1651916057, -0.1509472132, 0.2142754793, 0.2887516618, 0.8977125287, 0.0871162117, 0.6330669522, 0.3522446156, -0.0897754431, 0.0587164797, 0.5588099957, 0.0003703013, -0.2278030515, 0.4814255536, -0.1175046191, -0.4113436341, -0.0957966894, -0.1145304069, 0.342390269, 0.2279919386, 0.0552583486, 0.0877817869, -0.0244913697, -0.2676414251, 0.2117272168, -0.1949854195, 0.2195498943, 0.1812285781, 0.3146228194, 0.0641857684, -0.4541728497, -0.1606374681, 0.0818961114, 0.4434015453, -0.0880118906, -0.0837818831, -0.0655640885, -0.2384916991, -0.1835357994, 0.042312786, -0.3184980452, -0.2116200775, -0.0081896512, 0.0785564631, 0.3982799053, -0.1201592311, 0.0863152742, 0.0470028818, -0.2222499847, -0.4293798506, -0.3244929314, -0.1780238748, -0.2633098364, -0.002163928, 0.3373177946, 0.2433393747, 0.3579894602, 0.1530640125, -0.2724924088, 0.2025842071, -0.1350714266, -0.2082979977, -0.0527463369, 0.030691037, -0.1651144773, 0.1683883965, 0.1188063771, -0.0561860986, 0.1184153408, -0.3244406879, -0.104257524, 0.1782278568, -0.0425555259, 0.021690134, -0.0231980793, -0.2697673738, -0.2457211316, -0.2183194458, 0.4573233724, 0.0718534887, 0.20804286, 0.1711176038, -0.1983994693, 0.192903623, 0.0591403842, 0.237770915, -0.0346502811, -0.3612533212, 0.3110781908, 0.2732951343, -0.2055794299, -0.2129629403, -0.0003867224, 0.145183742, 0.1592359692, -0.6935852766, 0.3073457479, -0.4094817042, 0.000977315, -0.0250766221, 0.1169297397, 0.1280314326, -0.1906651706, -0.0838195533, 0.2492343634, -0.160361439, 0.0423887521, -0.0349026322, 0.2069485486, -0.0972284526, 0.4938472807, -0.0372571386, 0.1877986193, 0.1699877083, -0.1237930954, 0.1305233538, 0.0071464423, 0.0334261283, -0.1676993072, -0.2454052418, 0.2036918551, -0.0900603384, -0.0877124444, 0.2772508264, 0.0523031019, -0.4173798263, -0.2477499992, -0.1811404824, -0.1873636842, -0.0918232799, 0.2865214348, -0.5284757018, -0.0481065661, 0.0373418629, -0.1261237264, -0.2916548252, -0.7598496079, -0.0795494467, 0.0665853918, 0.1641318649, -0.0017775483, -0.1557509452, -0.0200944487, -0.8061320782, 0.041666422, -0.1593800187, 0.4539014995, 0.0435039401, -0.1204276085, 0.3541274965, -0.2013695389, 0.3818625808, 0.2417007834, 0.2068857402, 0.0798383057, -0.2099680007, -0.2572872341, 0.0196316764, -0.089779906, 0.282112658, 0.5095998645, 0.3365418017, -0.2804056406, -0.1695025861, 0.0357936844, 0.2459881753, -0.0216899663, -0.5882355571, -0.267020762, -0.1094953418, 0.0767494142, 0.0446320362, -0.3609042168, 0.2183084637, -0.2051840574, 0.0153709799, -0.0070325602, 0.000939019, 0.329997927, 0.0006130785, -0.2278038859, 0.0404116958, 0.4593440592, -0.1085021198, 0.2746824324, -0.4829618037, 0.4173163772, 0.2848147154, 0.1655388921, -0.1102579385, 0.044088766, 0.4188211858, 0.2915813923, 0.0836195797, 0.0606898069, -0.1767794788, 0.160706982, -0.2304639816, 0.0047923177, 0.1330130398, 0.0144370273, -0.4678264856, -0.4470432401, 0.820092082, 0.1840218604, 0.0756420046, 0.4255054593, -0.4305787385, 0.0649194494, 0.1462247074, -0.307430476, 0.8372448087, -0.4523186386, 0.2127174139, -0.1174647883, 0.1125613078, 0.4033431113, -0.1171924397, 0.023285564, -0.5333120823, 0.0126796402, 0.315954864, -0.0936964378, -0.098232381, 0.3226340711, -0.0720535889, 0.3586010933, 0.3544499576, -0.2024099231, -0.1047167256, 0.7358257771, -0.096438922, -0.227733016, -0.610696137, 0.0926400349, -0.3161288798, 0.3682955801, 0.0124188848, 0.0283612795, -0.0909687206, 0.0002192259, -0.2489505112, 0.1964832544, 0.0222943462, -0.0129737379, -0.066441372, -0.3269299269, 0.1552101225, 0.0258800667, -0.119614765, 0.2387781441, -0.2393496484, 0.1571931392, -0.386593163, 0.1956169903, 0.5479068756, 0.018488802, 0.1701102108, -0.2476157695, -0.0154641867, -0.179460153, -0.0350059643, -0.2775330245, -0.1322492063, 0.0984090865, -0.0219796672, 0.127895996, -0.2948840857, 0.2470290363, -0.0133967102, -0.0488163419, 0.0624469891, 0.4836606979, 0.0340440273, 0.39234519, 0.079334408, -0.386413306, -0.0471246839, 0.5738091469, 0.1745924205, -0.18395482, 0.420253545, 0.2087325603, -0.1922677159, -0.1615165174, -0.0472019911, -0.1382565647, -0.165614143, 0.039320346, 0.1203706861, 0.0757085532, 0.2407543957, -0.0242267735, -0.0969844908, -0.0998344645, 0.1119724214, -0.4448236823, -0.3277876377, 0.0251973029, -0.0319349244, -0.0785999894, -0.028431192, 0.0876648054, 0.1883687079, 0.4070272148, -0.2081249654, 0.1860577762, 0.0399077162, 0.1396622062, 0.0374502465, -0.34089607, 0.0609890819, 0.2001641095, 0.1273372471, -0.076877363, 0.112662524, -0.2216011584, 0.0783967674, 0.1619155258, -0.0161785018, 0.0360278934, -0.0057048947, -0.228523612, -0.1336788535, -0.1288512498, -0.1332196593, -0.0244700201, -0.0271547288, -0.0701316446, 0.0374015048, 0.0630753785, -0.0289534293, 0.2631287277, -0.4573255479, 0.1790240556, 0.0408202559, 0.0016274331, 0.279696703, -0.0150453299, -0.5266517401, -0.1142406762, 0.1430064142, 0.0916514397, 0.2667954564, -0.1470526755, 0.0916665494, 0.0101626329, 0.2162151635, 0.4975887537, 0.1279038787, -0.2263849378, 0.2040486038, 0.0754473954, -0.2107712626, -0.0211812183, 0.2762136459, 0.073347047, -0.1190045327, 0.1031394303, 0.1193348318, 0.0505637378, -0.3744418621, -0.3314026296, 0.3522184789, -0.3175424635, -0.319158107, 0.0585375279, 0.1417464465, -0.1946665794, 0.2622627914, 0.123229906, -0.0285970941, 0.5310928226, 0.2104305625, 0.3036753833, 0.0958805233, 0.4896481335, -0.3807522357, -0.2418750525, -0.1851464361, 0.5272123814, 0.0734565109, 0.0661836267, -0.1291833073, 0.3042570949, 0.029554829, 0.0364181474, -0.2261735648, 0.1182019711, -0.050620418, -0.0577842891, 0.2026012838, 0.0818913281, -0.20654127, 0.2879895568, -0.3173886836, 0.0886033028, 0.0695467293, 0.3331949115, 0.0021918118, -0.3964433372, 0.1359231025, -0.019642245, 0.2442288101, -0.2184237242, 0.0984250754, -0.311154902, 0.0590209141, 0.0256311856, 0.1395990849, 0.2233560383, 0.3780042827, -0.0324324518, 0.0409347005, -0.0881011114, -0.0551776737, -0.2662888467, 0.5282589197, 0.2188620269, 0.4217070341, 0.0443364307, -0.0360292383, -0.1194536239, 0.0805530697, -0.0876427144, -0.1781398058, 0.0074759983, 0.2960137427, 0.2574976981, -0.304125309, -0.4800011218, 0.0982156917, -0.2988274693, -0.387119621, 0.1855522394, -0.056383539, -0.0452755801, -0.1175370514, 0.049616158, -0.3259601593, 0.7584061027, 0.405570358, 0.3671918213, -0.1711864471, -0.2273598909, -0.474766463, -0.1068916768, -0.1883243173, -0.0390510745, 0.036222335, 0.3119153082, 0.1116375625, 0.0585514382, -0.5351699591, 0.2161413431, -0.1605438292, -0.0492740721, -0.2908782959, 0.1094958782, -0.3576446176, 0.0739116073, -0.1917957664, -0.2154418677, 0.1510278583, -0.2720610201, -0.0632469356, -0.1666840166, 0.0175183266, 0.0176631883, 0.4537419081, 0.3330732286, 0.0163751896, 0.4121359587, -0.0482987463, -0.0997285396, -0.3684398532, 0.044854939, -0.1481304467, 0.3600823283, 0.1196822226, -0.0243294463, 0.0052560233, 0.3650526702, 0.1344745457, 0.259598434, -0.3519542813, 0.0271038972, 0.0509631187, -0.2954759598, 0.0557379723, 0.3249191642, -0.0039187744, 0.4142500162, -0.0009482428, -0.1247327626, -0.492636025, 0.0283453166, 0.274346441, -0.3181953728, -0.0327873752, -0.1831092983, 0.3310079575, 0.0620221235, 0.2665612996, -0.3928838968, -0.0350355431, 0.2672194839, 0.0293980129, 0.0250361562, 0.5127061009, 0.0603037477, -0.1070544794, -0.0263857953, 0.033989206, -0.1410607696, -0.1633296311, -0.3431575894, -0.1546512544 ]
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.1468623579, -0.1677478105, -0.1159890592, 0.2507624626, 0.0116755962, 0.1286734641, 0.2028605044, 0.4360563457, 0.2853423357, -0.2157857269, 0.1411365569, 0.1851586699, -0.1777908951, 0.1772635281, 0.2101215273, 0.1729483604, -0.0373954885, 0.2307505608, 0.0664632469, -0.1615088731, 0.0738640726, 0.0152552892, -0.2379417419, -0.2696353793, -0.1859086752, 0.0080165174, 0.0108229294, 0.045906581, -0.1581697166, -0.2418573052, -0.0402302444, 0.1110756397, -0.0026758537, 0.2269130498, -0.0001188803, -0.2230948508, 0.4324374199, 0.0995654017, -0.1644922346, -0.0787231997, 0.2473838776, -0.5807965398, 0.1536248177, -0.111524649, -0.0279732347, -0.0242867135, 0.0849894136, -0.0908505693, 0.0091995597, 0.0936384127, 0.0956711695, -0.1501469463, -0.2433139086, 0.2775404453, 0.1566741914, 0.1584055275, 0.0178573653, 0.3768332005, 0.3840215206, -0.1982914507, -0.2379698306, 0.0691019148, -0.2044365406, 0.0671158433, 0.2822949886, 0.0695497692, -0.062749669, -0.1067554206, 0.0847104341, 0.2903835177, 0.5367581844, -0.0819914415, -0.0145146176, -0.4157761633, -0.0333931968, -0.1956956536, 0.2631214261, 0.2212338448, -0.1917859167, -0.2598746419, -0.4269600809, -0.2712005973, -0.0346586257, 0.1871251613, 0.1697663367, 0.0125531815, 0.0180827901, 0.1133253276, 0.2346081883, -0.0057956544, -0.0303431191, -0.1031937152, 0.2266776562, 0.4136861861, -0.3679285049, -0.0799880028, 0.0814782381, 0.2051121294, 0.0756681859, 0.1108647585, 0.0774828494, 0.1088114679, -0.135356158, 0.0001638122, 0.2267835587, 0.304184854, -0.1098387167, -0.1708536744, 0.3388780057, -0.1978960484, -0.2392961532, 0.2261635214, -0.1341166794, -0.1949006468, 0.0409325436, -0.3911289573, -0.2186790705, -0.3882548213, -0.0161749534, -0.1021415517, -0.0117926672, -0.2803949118, 0.0991439819, 0.2328175306, -0.3714705408, 0.1882843077, 0.025662899, -0.1213442683, -0.3319732249, 0.1176177114, -0.134850651, 0.0648254901, -0.2003653049, 0.2102784812, 0.5573930144, -0.108111918, 0.1549532115, 0.1407556683, -0.1908708066, -0.1235961914, -0.2451801896, -0.3195974529, -0.0517159477, -0.0391322747, -0.0603998303, 0.2393612564, 0.0170848649, 0.2906762362, -0.3809717894, 0.1462775469, -0.3813500106, -0.0917469338, 0.0715358183, 0.1255022734, -0.4116356969, -0.3418389559, -0.1967472136, 0.3686624467, -0.0151025951, -0.2297457755, -0.2660703659, -0.0707728118, -0.23377648, -0.0221741218, 0.1182157472, 0.2390013635, -0.1117660254, 0.0041147768, -0.0702945739, 0.3350042999, 0.2934180498, 0.5889776349, -0.1977967322, 0.2587455511, -0.2076938748, 0.0664704889, 0.453396678, 0.0793924257, -0.4505613446, 0.5086811185, -0.2272728682, 0.026211895, 0.2360356748, 0.4096687436, 0.0190484114, -0.086527355, 0.3309940696, 0.5486657619, 0.2094084471, 0.1983354688, -0.5275842547, -0.104578793, 0.3166624308, 0.4256466031, -0.0732964128, -0.0420420095, 0.0342000388, 0.1110455319, 0.4546041191, 0.1974329203, -0.0950348824, 0.3816898167, -0.1414045095, 0.0289917886, 0.0420627892, 0.1356698871, -0.0766890794, 0.1253722459, 0.1800881028, 0.1044865996, 0.255592525, 0.158617571, -0.1795032471, -0.2985087931, 0.0688033774, 0.1966094226, -0.0417996049, -0.0983961001, -0.0063333437, 0.189455986, -0.1755674034, 0.3249533772, -0.22636801, -0.1705372781, -0.3540983796, -0.0508142859, 0.2618774474, -0.165866673, 0.34876436, 0.269121021, -0.1280284822, -0.0214636512, -0.0956853926, -0.1553690732, -0.2626425624, 0.2162463963, 0.0798504204, 0.1474855691, -0.0038794912, -0.0686584711, 0.4277428091, 0.1416681707, 0.2356413007, -0.3945387006, -0.2611132562, 0.423981905, -0.239942506, 0.1925335824, 0.100041084, -0.5276620984, 0.0952796936, -0.1499475986, 0.1792488694, 0.3012717962, 0.9152837992, 0.0748971477, 0.5796504617, 0.3361263275, -0.0965634659, 0.0237048864, 0.5802974105, -0.0135958456, -0.2307461053, 0.5299870372, -0.1376433522, -0.3367550969, -0.0907451361, -0.1596768349, 0.3672907054, 0.2584279776, 0.0612426214, 0.0831919461, -0.0067600682, -0.2745862007, 0.1860844195, -0.174849093, 0.1555585414, 0.1842085421, 0.3061495423, 0.0672387034, -0.4513899386, -0.1900631934, 0.0111348704, 0.3954621851, -0.1219164208, -0.0600741655, -0.0622060485, -0.286000967, -0.199925527, 0.0116269961, -0.3100396097, -0.2185954154, 0.0391217321, 0.094537288, 0.4434688687, -0.1405887008, 0.0237834901, 0.091980204, -0.1460933685, -0.5046124458, -0.3176472485, -0.1240732223, -0.305752635, -0.0356729254, 0.3436003923, 0.2066269666, 0.2857855558, 0.158076942, -0.2393469065, 0.2140688002, -0.1337425113, -0.2464988083, -0.0655811578, 0.0074958559, -0.1984961927, 0.1913419068, 0.1513048708, -0.0254355986, 0.0704559982, -0.3434504271, -0.0498986393, 0.1691688001, 0.0141742006, 0.0251851119, -0.0353947021, -0.2966687381, -0.2575834095, -0.194280386, 0.5056716204, 0.1282690912, 0.1918306798, 0.2333412766, -0.1564409137, 0.2238170207, 0.0130964778, 0.1960709095, -0.0103011224, -0.3355054557, 0.3539385796, 0.3149787784, -0.1909899861, -0.1845136881, 0.0784602538, 0.0577198416, 0.0648785681, -0.7292479277, 0.3334603608, -0.4247235656, -0.0589506999, -0.0232273787, 0.0763257146, 0.1828998029, -0.2181565911, -0.0653542057, 0.2649849653, -0.1422680914, 0.0547602735, -0.0414542854, 0.2459864467, -0.1490636617, 0.4429352582, -0.041602511, 0.1310740411, 0.1429376453, -0.1276000142, 0.1752117574, -0.0469573289, 0.0878356397, -0.2085816562, -0.2550732493, 0.1639944017, -0.0698844045, -0.1226181239, 0.3286094666, 0.1117336005, -0.4102242887, -0.257324338, -0.1881202757, -0.1360911876, -0.0913286954, 0.2339009643, -0.4632796943, -0.1695212722, -0.0002383068, -0.12345016, -0.2706370652, -0.8070899844, -0.0899768621, 0.1939155757, 0.1134905368, -0.0124874786, -0.1416272074, 0.0572750419, -0.7214741707, 0.091646865, -0.2255842537, 0.4330694079, 0.0095032677, -0.1530500203, 0.3658154905, -0.141642794, 0.3453769386, 0.2615405619, 0.2158102393, 0.1648541093, -0.1457088143, -0.3058148026, -0.0606586337, -0.1359807998, 0.2373660356, 0.5244657993, 0.3955211937, -0.1596053243, -0.1255626678, 0.0321965106, 0.2663289905, -0.0455254726, -0.6147634983, -0.3400330544, -0.1236436814, 0.0839364454, 0.0548788086, -0.2561669052, 0.1641589999, -0.2225333154, 0.0019967332, 0.0160446186, -0.0569870546, 0.3316158056, -0.0649502799, -0.1972470582, 0.0483911708, 0.3828940392, -0.109541446, 0.2603669167, -0.513504684, 0.4005389512, 0.2878217399, 0.1498521715, -0.0981922522, 0.015850056, 0.4233322144, 0.2882658243, 0.0566122718, 0.1032962874, -0.1901736259, 0.2038576156, -0.2070801854, 0.0365811288, 0.1552279443, 0.0373074897, -0.4535945654, -0.4440153837, 0.8658823371, 0.200457871, 0.0523080975, 0.4413743019, -0.4890830517, 0.007625211, 0.1646190286, -0.3255105615, 0.8962661624, -0.509139061, 0.2615801394, -0.1717267334, 0.1543431282, 0.3635104597, -0.2261978388, 0.0469622985, -0.4782656431, -0.0128274169, 0.2797730267, -0.0558127239, -0.1093789041, 0.2966298461, -0.0840289965, 0.4026567638, 0.3037199378, -0.1816544086, -0.1350028217, 0.7126302719, -0.1246585995, -0.1495565176, -0.5936139822, 0.071783796, -0.2490160763, 0.4504693151, 0.029042352, 0.0551491268, -0.112436384, -0.036345046, -0.2671857476, 0.1421435177, 0.0412772149, -0.0683742315, -0.1079093218, -0.2744804919, 0.1617035419, 0.1341016293, -0.1970693916, 0.2454268634, -0.2713269591, 0.1479251087, -0.3887499273, 0.1796725541, 0.5466579795, 0.0269676447, 0.1233065501, -0.2026593685, -0.0371569991, -0.226311639, -0.0037362017, -0.2732930481, -0.1686253399, 0.1459266096, -0.0254491046, 0.0775289685, -0.3267631233, 0.2190436125, -0.0149847716, 0.0194928646, 0.0393402427, 0.427893877, 0.0573045053, 0.4107715786, 0.0781806037, -0.432820648, -0.034170799, 0.6329442859, 0.1193460077, -0.1715773493, 0.4617878795, 0.2462399304, -0.1851256788, -0.1439626813, -0.0316445082, -0.0844547749, -0.1185497716, 0.0457437299, 0.1380200535, 0.1327202618, 0.2338372916, -0.0158670209, -0.1340325326, -0.1210011169, 0.067935288, -0.4891676605, -0.3322141469, 0.0076643638, -0.0354980864, -0.0495290644, -0.0455134027, 0.0394650884, 0.253667891, 0.295050323, -0.1840224415, 0.2337619364, 0.010318853, 0.1074577868, 0.0471792109, -0.2894695699, 0.0775340945, 0.1480060667, 0.0994743109, -0.0881416351, 0.1734415293, -0.1998887062, 0.0783424824, 0.1771932542, -0.0222309958, 0.0685001165, -0.0260576028, -0.2911942601, -0.0903168917, -0.138387993, -0.1463041455, 0.0333833098, -0.0204251893, -0.018739, -0.0062019341, 0.0183193982, -0.0179553106, 0.2220658958, -0.4845603108, 0.2126891166, 0.1188968569, -0.0434450395, 0.3119729459, 0.0682920069, -0.5019717813, -0.1139494926, 0.1637867242, 0.1204589903, 0.1987317502, -0.1713286936, 0.1428080797, -0.0002147816, 0.2472886443, 0.5397863388, 0.0465885028, -0.2343891561, 0.2082850337, 0.0702084005, -0.2324062437, 0.0128430948, 0.3182405829, 0.1221635267, -0.1434262097, 0.0990469232, 0.1068350598, 0.0493921191, -0.340855211, -0.2861552238, 0.4140729606, -0.2528633475, -0.2983036637, 0.0619955137, 0.1794876605, -0.2136214972, 0.2452965379, 0.1134574264, -0.0485682636, 0.5281428695, 0.1692794412, 0.2819334269, 0.0298366398, 0.4990844429, -0.4591497779, -0.2564745545, -0.1732316017, 0.5806370378, 0.1013704538, 0.08646781, -0.1049984843, 0.3212667704, 0.0133717172, 0.0664201379, -0.1577328444, 0.1102188304, -0.0187561568, -0.0704562366, 0.2236240655, 0.0472384542, -0.2065904438, 0.2458733767, -0.2708841264, 0.111566782, -0.0127021335, 0.3698681295, -0.0388982594, -0.3657519519, 0.0976013243, -0.0232987385, 0.2659730911, -0.2168279439, 0.0947542489, -0.3053724766, 0.1046342403, 0.130486235, 0.1334237605, 0.2483451217, 0.3836367428, -0.0247404296, 0.1180630252, -0.170830667, -0.0525135323, -0.2167856395, 0.4916274548, 0.2272070944, 0.4188089073, 0.0320711024, -0.0444031954, -0.0905759484, 0.1935414076, -0.1724513322, -0.186964184, -0.0721828938, 0.2947708368, 0.2757709324, -0.3323739171, -0.5637338758, 0.060360238, -0.3046706319, -0.3551774919, 0.21886307, -0.0116579868, -0.0033616759, -0.0865993723, 0.0295071714, -0.2765631378, 0.6839315295, 0.4079569578, 0.3934645653, -0.1450066715, -0.1829031408, -0.5345116258, -0.1190326214, -0.2366611511, -0.0726828799, 0.0406127498, 0.2603269219, 0.078844443, 0.0292189866, -0.4430763125, 0.2248758972, -0.154022038, -0.0911422372, -0.3024022877, 0.1116734147, -0.3430498242, 0.1367994696, -0.1714633107, -0.1733539999, 0.1039348394, -0.2731748521, -0.0943434983, -0.1843816191, 0.0913887545, -0.0099155083, 0.4788243175, 0.302829951, -0.0568213835, 0.4388085604, -0.0038318932, -0.068495445, -0.3777602911, 0.1048205197, -0.1790892929, 0.2524608374, 0.118207112, -0.0653510168, -0.0488353781, 0.3246192336, 0.126212135, 0.2831215858, -0.342538923, 0.0193985961, 0.0338450819, -0.3557535708, 0.0484084338, 0.357324928, -0.0367290527, 0.4229917824, -0.0241789483, -0.1041417569, -0.4996804595, 0.0355126262, 0.3133940101, -0.3360894322, -0.0400696583, -0.144222036, 0.3503613472, 0.0657299981, 0.3043913245, -0.4382012486, -0.0326371044, 0.3086368144, 0.0936468542, 0.0248133764, 0.4935053885, 0.050289236, -0.0830161646, -0.0098908097, 0.0670780241, -0.0936904401, -0.0860048383, -0.3788424134, -0.1776269078 ]
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.0616527051, 0.443702817, -0.0581615083, 0.0664171427, -0.307210505, 0.115327388, -0.273250252, 0.5395026207, -0.0016360879, -0.11965812, 0.0857635289, 0.2251150161, 0.0789774507, -0.1222942024, 0.0061915442, 0.1934712231, 0.0321508422, 0.0933849514, 0.0987023264, 0.0393900275, -0.205377847, 0.2148773819, -0.0574840084, -0.2985474765, 0.0893561244, -0.0041816738, 0.0692203045, 0.0182902627, 0.129975915, -0.4194513261, 0.320605427, 0.2793268859, 0.0003895462, 0.1324239373, -0.0001272806, -0.0694951713, 0.321023345, -0.0919741839, -0.2670393884, -0.0846344978, 0.0034753308, -0.4629071653, -0.0613038167, -0.2885442376, 0.1637886763, 0.2399886847, 0.1029125899, -0.4139178991, -0.0950960889, 0.1851276755, 0.1083363593, 0.5190725327, 0.0809713379, 0.3380493224, 0.2563711405, -0.4211411476, 0.0306584463, 0.3837836087, 0.3393692374, -0.136690259, -0.4413139224, 0.3681634068, -0.3522347808, 0.0423126779, -0.0161721483, -0.3124461472, 0.019456489, -0.0667770728, 0.3025439382, 0.190763399, 0.3051868081, -0.445522815, -0.2008482218, 0.0067094117, -0.2116426229, -0.1155180335, 0.4846939147, 0.1011212245, -0.0301547684, -0.1416908801, -0.0993817896, -0.0432989448, 0.1072192192, 0.2136930972, 0.3474701345, 0.4857031405, 0.2431528717, 0.1118917763, 0.1624685079, 0.0055500399, 0.5039781332, -0.0932112783, -0.1411806047, 0.1578630507, -0.3675527573, -0.1388426423, 0.0753961429, 0.3629106283, 0.1303833872, 0.4638720155, 0.5369124413, 0.2476573288, -0.1883204728, 0.1930721551, -0.138475433, 0.2871349156, 0.405997932, -0.124617748, 0.1441262364, 0.4248975217, 0.0256022438, 0.0652255416, 0.1155523434, -0.2771502137, 0.3135472536, 0.4061037302, 0.0826802999, -0.413289696, -0.2271899581, 0.3078270555, -0.1956925094, -0.3644888997, 0.2119982988, 0.1644037068, -0.354667902, 0.2263008058, 0.1475031525, 0.0085845664, -0.1239642948, -0.5568839908, -0.067478545, 0.2780528665, -0.1873663664, 0.1560589671, 0.2345917523, -0.3751234114, 0.4669338465, -0.3525465727, 0.0226083826, -0.0944173709, 0.2752308249, -0.1536364853, 0.0063337423, 0.2864756882, -0.0740383267, -0.1444519013, 0.1842183918, 0.1451916993, -0.33005476, 0.2802165151, 0.1353553236, -0.1413919628, -0.1740645766, -0.0231367275, -0.4117467999, -0.2353128493, 0.272849977, -0.0858841836, 0.39096874, -0.6479689479, 0.0522492006, -0.0388516337, -0.2448472828, -0.198482722, -0.1250326931, 0.034012083, -0.1752648056, 0.0889365673, -0.2065020204, 0.1218562722, 0.3018306494, 0.1827165484, 0.059069179, -0.2488518506, -0.11028786, 0.1323601305, 0.2490991801, -0.3191211224, -0.6921528578, -0.0797565877, 0.1015777364, 0.3253766894, 0.2345360816, 0.4361955822, -0.1628781855, -0.2904229462, -0.0313168764, 0.1885822266, -0.0350643024, -0.0714681521, -0.3921246827, -0.1106407642, 0.5248123407, 0.0953381211, 0.0534196235, -0.026163701, 0.1034079418, -0.0051164143, 0.2173563838, 0.0385115407, 0.0118799806, 0.0543002635, 0.0686130077, 0.0348471031, 0.0741711035, -0.036987137, -0.42276752, 0.1104317158, -0.2665940523, 0.279125452, 0.0841260627, -0.1472607851, -0.079855293, -0.2010103911, 0.0089679211, 0.0517491661, 0.0013111196, 0.3164531887, 0.1445414424, -0.0932148769, 0.0056742802, 0.036909394, -0.227638185, -0.0102177858, -0.5147675276, 0.293019712, -0.0692703873, -0.2226180732, 0.2267712653, 0.2620926499, 0.1244557351, -0.0676517338, -0.3514719903, 0.3799093366, -0.0492891744, -0.1394286901, 0.0233196504, 0.4658014774, -0.1902139783, -0.192885682, 0.2801758051, 0.7407283783, -0.0178897344, -0.047074385, 0.1881552935, 0.4245475233, -0.0047317413, 0.1563246548, -0.0887769759, 0.178568095, 0.1582685411, -0.2391059697, -0.2567293346, -0.0941789299, 0.4943870902, -0.1489612907, 0.1789527237, 0.0457768366, -0.1842947304, -0.0852906555, 0.3507561982, 0.0191178918, 0.0700723082, 0.2472043931, 0.1055891514, -0.3084562123, 0.1519664824, 0.3498340845, 0.228610158, -0.0166477785, 0.0065649999, 0.2571462095, -0.0707734674, 0.0059680715, 0.0090972111, 0.020341685, 0.2311230898, 0.4381024241, 0.2708522379, 0.04216782, -0.4537832737, -0.2937009633, -0.0823327899, 0.3356820345, -0.0985862389, 0.041234076, -0.2519592345, -0.3669678867, -0.1616518945, -0.3328650594, -0.5280544758, -0.3471705317, 0.0056132935, 0.3331261873, -0.033664491, 0.3375812173, -0.2607322633, -0.0415093303, -0.2104508281, -0.0555165447, -0.0397889614, -0.3035804331, -0.3481827974, -0.1005489975, 0.6255892515, 0.1226193905, 0.3256289363, -0.2633631229, -0.0386354104, -0.4359058738, -0.4488388896, -0.2283978164, -0.055763565, 0.0680424571, 0.3516705036, 0.0911214501, -0.0205845386, -0.3282203674, 0.1320408583, -0.0937083811, -0.1445066631, 0.0734267756, -0.1742322296, 0.1782112718, 0.1171158701, -0.1628400087, -0.057215374, -0.2265319973, -0.0431702361, -0.1390310526, 0.3625037074, 0.0243453048, -0.353990078, -0.0659310222, 0.0604897775, 0.4428187907, -0.112782158, -0.5371187329, 0.1838616878, 0.1153435111, -0.1968843192, 0.0928086787, -0.1693495661, 0.6429796219, -0.0923255384, -0.5097295046, -0.0690604076, -0.1017558202, -0.0644855946, -0.0095767546, -0.0312162153, 0.4292155802, -0.0215039868, -0.0031933933, -0.2097125351, -0.4482650161, 0.1087319702, 0.0067472253, 0.43732512, 0.0736490041, 0.3563735485, 0.1706513762, 0.0788870454, 0.1601974517, -0.1629904062, 0.415808171, 0.4866501391, 0.1476307958, 0.0428031385, -0.0988663658, -0.1026585102, -0.0358231664, -0.0471014902, 0.0812134147, -0.0570634678, -0.1882273555, -0.11694213, -0.3559015095, -0.3291285038, -0.2423392832, 0.1743614376, -0.3096683919, 0.3644333184, 0.239389658, -0.1058757678, -0.3316640854, -0.4202772975, 0.1958697885, 0.3060152829, -0.132676512, -0.0060010925, -0.5504576564, -0.348762989, -0.1723357737, 0.7032874227, 0.224392727, 0.6603319645, 0.0806646645, -0.0668383837, 0.0195844173, -0.1764274091, 0.0931481719, -0.3652165532, 0.2800977826, 0.158112213, 0.0958493873, -0.0339045115, -0.2032892257, 0.1098051369, 0.2863221765, 0.4885848165, -0.178141892, -0.2392451465, -0.1216404587, 0.2182540148, 0.2945376635, -0.0311449841, -0.2273662388, -0.4379224777, -0.2903138995, -0.114300631, -0.0357311815, -0.2543927729, 0.3206255734, 0.2463240027, 0.1774912477, 0.1452328563, -0.2266960293, 0.3136148751, -0.0948361754, 0.214012742, 0.3180741966, 0.119552888, -0.3462469876, 0.1302442849, -0.0941933692, 0.2956399918, -0.1126087755, -0.1375364959, -0.0734807551, 0.2040026188, 0.0879629776, 0.1910969466, 0.2005630285, 0.2737550735, 0.4517327249, -0.1058314294, 0.1607080549, -0.1901836991, -0.073244378, 0.1468068808, -0.2490931153, -0.2411086261, 0.2625312507, 0.1931419969, -0.0387195945, 0.3418627679, -0.4028802812, -0.1004319564, 0.2029741853, 0.4714304507, 1.0572545528, 0.0201439559, 0.0580876619, -0.0509397984, -0.1898691058, 0.0285248198, -0.0933938101, 0.2850468159, -0.416738987, -0.4778105021, -0.0199749954, -0.1191666797, 0.3133386075, -0.2553497553, -0.21679914, 0.4146580398, -0.025735274, -0.453655839, 0.1333514452, 0.2383010983, -0.4250645638, -0.0571775213, -0.1014584228, 0.0327991024, -0.341219008, 0.3648760319, -0.1134907007, 0.0406588167, 0.1785667837, -0.3359897733, -0.3500400186, 0.075079903, -0.0747923851, 0.0608156286, 0.3293654919, 0.1280975193, -0.0595261194, -0.1196700931, 0.3529464602, 0.0838501602, 0.0882172436, 0.0468814112, 0.4901551008, -0.0665747821, 0.354917258, 0.2023562789, 0.3399662375, -0.1613617092, -0.1293441057, 0.0918297172, -0.1235803962, -0.5137317181, 0.3060738146, -0.2194624841, 0.094561018, 0.0228992365, -0.1769924909, 0.2054576725, -0.0713037848, -0.2482822984, 0.0278571006, 0.1989020258, -0.3135830462, 0.1156931818, -0.0807044953, -0.2498119771, -0.0033673765, 0.4579549134, 0.392812252, -0.2363059223, 0.326204896, 0.0302983075, -0.1058910936, -0.120488584, -0.2305819392, -0.1916442513, -0.2923541963, 0.1083472073, -0.0822687298, -0.0759183913, -0.1271995902, 0.5551511049, 0.2674682438, 0.6689735055, -0.1250116527, -0.4986165166, -0.1051058024, 0.1533492804, 0.0695054233, 0.1367291957, -0.2896707654, 0.0720112324, -0.0632778853, -0.0139152408, -0.1498121768, 0.0530566499, -0.2679403126, 0.1874874681, -0.0079382379, 0.1673178375, -0.0482480563, 0.1539580822, -0.0541638881, -0.0090229446, -0.2440920025, -0.0107134134, -0.0693429634, 0.1767442077, 0.0797733739, -0.0332646742, -0.1182665378, -0.3067572713, -0.096902661, -0.0597469881, -0.4343472421, -0.0200661346, -0.1304021031, 0.2618312836, -0.0712141097, 0.0125173107, 0.122265324, -0.013018053, -0.3334134817, -0.1952345818, -0.0981421918, 0.1256815791, -0.0123608895, -0.0134816393, 0.2143862844, 0.0588422157, -0.2207695395, -0.1099380329, -0.0495149195, 0.0043106019, -0.058556892, 0.4181290269, 0.1668493897, 0.3067297935, 0.0485341474, -0.3271100521, 0.358934015, 0.0716524571, -0.5490002632, 0.0469178259, 0.223891899, -0.0183320791, 0.0063809231, 0.0733918026, 0.2378413677, -0.1913520545, 0.6728572249, 0.0686540902, -0.0561063886, -0.3147748113, 0.3004776835, 0.1758286357, 0.0488543659, 0.0803688318, 0.1535321474, -0.2527368069, 0.0332420096, -0.2883599699, -0.0443777665, 0.4211077392, 0.0568576455, 0.3054699004, -0.4572609067, -0.2989240587, 0.2259771377, 0.4199060798, 0.4424135387, 0.0849666446, 0.2154006213, 0.5814500451, 0.0252290964, 0.0394732393, -0.2616809905, 0.1191082299, 0.059615463, 0.0078942366, -0.1638839841, -0.0199991614, -0.0829944909, 0.0370736495, 0.135000363, 0.3841440678, 0.2583818734, 0.0394194573, -0.0428873785, -0.3136141896, -0.4687739015, 0.0511496179, -0.1495770216, -0.0921679288, 0.3379409313, 0.3114597201, -0.0182743445, 0.0465468727, 0.3662719131, 0.2607457936, 0.149502784, -0.0323064327, -0.0989736617, -0.1910013258, 0.168915987, -0.0160103291, 0.4543609023, 0.3557753563, -0.0146975489, 0.0548875481, -0.0971446112, -0.0204035528, 0.3564493656, -0.1523542106, -0.0970254391, 0.1846250892, 0.3677535355, 0.0412649103, 0.1355879158, -0.2689228654, 0.2020163983, -0.2849613428, -0.267259717, 0.0389265977, -0.0312439296, -0.0535078086, -0.0286828652, 0.0271093287, -0.1850097477, 0.312662214, 0.4369840026, -0.1364957392, -0.3239026368, -0.6861956716, -0.6801719666, 0.355052948, -0.0194602273, -0.1567204595, -0.0008685738, -0.1191427782, -0.0471938886, 0.0927401334, 0.3334363699, -0.0994434431, -0.1262347996, -0.1114646941, -0.1337477565, 0.0834588036, 0.1662858427, -0.1219963878, -0.0319094248, -0.2020149231, -0.1274803579, 0.0751946121, -0.0144128501, -0.2027578652, -0.2078403682, -0.0922852829, 0.6267000437, 0.2511225343, 0.1438149512, 0.5188575387, 0.0033952221, -0.1690082848, -0.1581480801, -0.168882519, -0.1216175482, 0.3049313128, 0.0201932974, 0.666084826, -0.1472445279, 0.4769167006, -0.1770950705, 0.5503358245, -0.163085252, -0.1171029806, -0.3809971213, 0.275118351, -0.1488751471, 0.336207062, -0.0528543666, 0.1610534638, 0.3596599698, 0.44328022, -0.637288928, -0.0975496545, 0.6288664341, -0.3102296293, -0.222548604, -0.135564208, 0.2629568875, -0.309736222, -0.3672792315, -0.4621835351, -0.1992237866, 0.1436505616, 0.2374667227, -0.0912963599, 0.189078033, -0.4163121879, 0.1561917961, 0.01356069, -0.0843810737, 0.0612947941, -0.3806416988, -0.2585657239, -0.2395606935 ]
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.0616527051, 0.443702817, -0.0581615083, 0.0664171427, -0.307210505, 0.115327388, -0.273250252, 0.5395026207, -0.0016360879, -0.11965812, 0.0857635289, 0.2251150161, 0.0789774507, -0.1222942024, 0.0061915442, 0.1934712231, 0.0321508422, 0.0933849514, 0.0987023264, 0.0393900275, -0.205377847, 0.2148773819, -0.0574840084, -0.2985474765, 0.0893561244, -0.0041816738, 0.0692203045, 0.0182902627, 0.129975915, -0.4194513261, 0.320605427, 0.2793268859, 0.0003895462, 0.1324239373, -0.0001272806, -0.0694951713, 0.321023345, -0.0919741839, -0.2670393884, -0.0846344978, 0.0034753308, -0.4629071653, -0.0613038167, -0.2885442376, 0.1637886763, 0.2399886847, 0.1029125899, -0.4139178991, -0.0950960889, 0.1851276755, 0.1083363593, 0.5190725327, 0.0809713379, 0.3380493224, 0.2563711405, -0.4211411476, 0.0306584463, 0.3837836087, 0.3393692374, -0.136690259, -0.4413139224, 0.3681634068, -0.3522347808, 0.0423126779, -0.0161721483, -0.3124461472, 0.019456489, -0.0667770728, 0.3025439382, 0.190763399, 0.3051868081, -0.445522815, -0.2008482218, 0.0067094117, -0.2116426229, -0.1155180335, 0.4846939147, 0.1011212245, -0.0301547684, -0.1416908801, -0.0993817896, -0.0432989448, 0.1072192192, 0.2136930972, 0.3474701345, 0.4857031405, 0.2431528717, 0.1118917763, 0.1624685079, 0.0055500399, 0.5039781332, -0.0932112783, -0.1411806047, 0.1578630507, -0.3675527573, -0.1388426423, 0.0753961429, 0.3629106283, 0.1303833872, 0.4638720155, 0.5369124413, 0.2476573288, -0.1883204728, 0.1930721551, -0.138475433, 0.2871349156, 0.405997932, -0.124617748, 0.1441262364, 0.4248975217, 0.0256022438, 0.0652255416, 0.1155523434, -0.2771502137, 0.3135472536, 0.4061037302, 0.0826802999, -0.413289696, -0.2271899581, 0.3078270555, -0.1956925094, -0.3644888997, 0.2119982988, 0.1644037068, -0.354667902, 0.2263008058, 0.1475031525, 0.0085845664, -0.1239642948, -0.5568839908, -0.067478545, 0.2780528665, -0.1873663664, 0.1560589671, 0.2345917523, -0.3751234114, 0.4669338465, -0.3525465727, 0.0226083826, -0.0944173709, 0.2752308249, -0.1536364853, 0.0063337423, 0.2864756882, -0.0740383267, -0.1444519013, 0.1842183918, 0.1451916993, -0.33005476, 0.2802165151, 0.1353553236, -0.1413919628, -0.1740645766, -0.0231367275, -0.4117467999, -0.2353128493, 0.272849977, -0.0858841836, 0.39096874, -0.6479689479, 0.0522492006, -0.0388516337, -0.2448472828, -0.198482722, -0.1250326931, 0.034012083, -0.1752648056, 0.0889365673, -0.2065020204, 0.1218562722, 0.3018306494, 0.1827165484, 0.059069179, -0.2488518506, -0.11028786, 0.1323601305, 0.2490991801, -0.3191211224, -0.6921528578, -0.0797565877, 0.1015777364, 0.3253766894, 0.2345360816, 0.4361955822, -0.1628781855, -0.2904229462, -0.0313168764, 0.1885822266, -0.0350643024, -0.0714681521, -0.3921246827, -0.1106407642, 0.5248123407, 0.0953381211, 0.0534196235, -0.026163701, 0.1034079418, -0.0051164143, 0.2173563838, 0.0385115407, 0.0118799806, 0.0543002635, 0.0686130077, 0.0348471031, 0.0741711035, -0.036987137, -0.42276752, 0.1104317158, -0.2665940523, 0.279125452, 0.0841260627, -0.1472607851, -0.079855293, -0.2010103911, 0.0089679211, 0.0517491661, 0.0013111196, 0.3164531887, 0.1445414424, -0.0932148769, 0.0056742802, 0.036909394, -0.227638185, -0.0102177858, -0.5147675276, 0.293019712, -0.0692703873, -0.2226180732, 0.2267712653, 0.2620926499, 0.1244557351, -0.0676517338, -0.3514719903, 0.3799093366, -0.0492891744, -0.1394286901, 0.0233196504, 0.4658014774, -0.1902139783, -0.192885682, 0.2801758051, 0.7407283783, -0.0178897344, -0.047074385, 0.1881552935, 0.4245475233, -0.0047317413, 0.1563246548, -0.0887769759, 0.178568095, 0.1582685411, -0.2391059697, -0.2567293346, -0.0941789299, 0.4943870902, -0.1489612907, 0.1789527237, 0.0457768366, -0.1842947304, -0.0852906555, 0.3507561982, 0.0191178918, 0.0700723082, 0.2472043931, 0.1055891514, -0.3084562123, 0.1519664824, 0.3498340845, 0.228610158, -0.0166477785, 0.0065649999, 0.2571462095, -0.0707734674, 0.0059680715, 0.0090972111, 0.020341685, 0.2311230898, 0.4381024241, 0.2708522379, 0.04216782, -0.4537832737, -0.2937009633, -0.0823327899, 0.3356820345, -0.0985862389, 0.041234076, -0.2519592345, -0.3669678867, -0.1616518945, -0.3328650594, -0.5280544758, -0.3471705317, 0.0056132935, 0.3331261873, -0.033664491, 0.3375812173, -0.2607322633, -0.0415093303, -0.2104508281, -0.0555165447, -0.0397889614, -0.3035804331, -0.3481827974, -0.1005489975, 0.6255892515, 0.1226193905, 0.3256289363, -0.2633631229, -0.0386354104, -0.4359058738, -0.4488388896, -0.2283978164, -0.055763565, 0.0680424571, 0.3516705036, 0.0911214501, -0.0205845386, -0.3282203674, 0.1320408583, -0.0937083811, -0.1445066631, 0.0734267756, -0.1742322296, 0.1782112718, 0.1171158701, -0.1628400087, -0.057215374, -0.2265319973, -0.0431702361, -0.1390310526, 0.3625037074, 0.0243453048, -0.353990078, -0.0659310222, 0.0604897775, 0.4428187907, -0.112782158, -0.5371187329, 0.1838616878, 0.1153435111, -0.1968843192, 0.0928086787, -0.1693495661, 0.6429796219, -0.0923255384, -0.5097295046, -0.0690604076, -0.1017558202, -0.0644855946, -0.0095767546, -0.0312162153, 0.4292155802, -0.0215039868, -0.0031933933, -0.2097125351, -0.4482650161, 0.1087319702, 0.0067472253, 0.43732512, 0.0736490041, 0.3563735485, 0.1706513762, 0.0788870454, 0.1601974517, -0.1629904062, 0.415808171, 0.4866501391, 0.1476307958, 0.0428031385, -0.0988663658, -0.1026585102, -0.0358231664, -0.0471014902, 0.0812134147, -0.0570634678, -0.1882273555, -0.11694213, -0.3559015095, -0.3291285038, -0.2423392832, 0.1743614376, -0.3096683919, 0.3644333184, 0.239389658, -0.1058757678, -0.3316640854, -0.4202772975, 0.1958697885, 0.3060152829, -0.132676512, -0.0060010925, -0.5504576564, -0.348762989, -0.1723357737, 0.7032874227, 0.224392727, 0.6603319645, 0.0806646645, -0.0668383837, 0.0195844173, -0.1764274091, 0.0931481719, -0.3652165532, 0.2800977826, 0.158112213, 0.0958493873, -0.0339045115, -0.2032892257, 0.1098051369, 0.2863221765, 0.4885848165, -0.178141892, -0.2392451465, -0.1216404587, 0.2182540148, 0.2945376635, -0.0311449841, -0.2273662388, -0.4379224777, -0.2903138995, -0.114300631, -0.0357311815, -0.2543927729, 0.3206255734, 0.2463240027, 0.1774912477, 0.1452328563, -0.2266960293, 0.3136148751, -0.0948361754, 0.214012742, 0.3180741966, 0.119552888, -0.3462469876, 0.1302442849, -0.0941933692, 0.2956399918, -0.1126087755, -0.1375364959, -0.0734807551, 0.2040026188, 0.0879629776, 0.1910969466, 0.2005630285, 0.2737550735, 0.4517327249, -0.1058314294, 0.1607080549, -0.1901836991, -0.073244378, 0.1468068808, -0.2490931153, -0.2411086261, 0.2625312507, 0.1931419969, -0.0387195945, 0.3418627679, -0.4028802812, -0.1004319564, 0.2029741853, 0.4714304507, 1.0572545528, 0.0201439559, 0.0580876619, -0.0509397984, -0.1898691058, 0.0285248198, -0.0933938101, 0.2850468159, -0.416738987, -0.4778105021, -0.0199749954, -0.1191666797, 0.3133386075, -0.2553497553, -0.21679914, 0.4146580398, -0.025735274, -0.453655839, 0.1333514452, 0.2383010983, -0.4250645638, -0.0571775213, -0.1014584228, 0.0327991024, -0.341219008, 0.3648760319, -0.1134907007, 0.0406588167, 0.1785667837, -0.3359897733, -0.3500400186, 0.075079903, -0.0747923851, 0.0608156286, 0.3293654919, 0.1280975193, -0.0595261194, -0.1196700931, 0.3529464602, 0.0838501602, 0.0882172436, 0.0468814112, 0.4901551008, -0.0665747821, 0.354917258, 0.2023562789, 0.3399662375, -0.1613617092, -0.1293441057, 0.0918297172, -0.1235803962, -0.5137317181, 0.3060738146, -0.2194624841, 0.094561018, 0.0228992365, -0.1769924909, 0.2054576725, -0.0713037848, -0.2482822984, 0.0278571006, 0.1989020258, -0.3135830462, 0.1156931818, -0.0807044953, -0.2498119771, -0.0033673765, 0.4579549134, 0.392812252, -0.2363059223, 0.326204896, 0.0302983075, -0.1058910936, -0.120488584, -0.2305819392, -0.1916442513, -0.2923541963, 0.1083472073, -0.0822687298, -0.0759183913, -0.1271995902, 0.5551511049, 0.2674682438, 0.6689735055, -0.1250116527, -0.4986165166, -0.1051058024, 0.1533492804, 0.0695054233, 0.1367291957, -0.2896707654, 0.0720112324, -0.0632778853, -0.0139152408, -0.1498121768, 0.0530566499, -0.2679403126, 0.1874874681, -0.0079382379, 0.1673178375, -0.0482480563, 0.1539580822, -0.0541638881, -0.0090229446, -0.2440920025, -0.0107134134, -0.0693429634, 0.1767442077, 0.0797733739, -0.0332646742, -0.1182665378, -0.3067572713, -0.096902661, -0.0597469881, -0.4343472421, -0.0200661346, -0.1304021031, 0.2618312836, -0.0712141097, 0.0125173107, 0.122265324, -0.013018053, -0.3334134817, -0.1952345818, -0.0981421918, 0.1256815791, -0.0123608895, -0.0134816393, 0.2143862844, 0.0588422157, -0.2207695395, -0.1099380329, -0.0495149195, 0.0043106019, -0.058556892, 0.4181290269, 0.1668493897, 0.3067297935, 0.0485341474, -0.3271100521, 0.358934015, 0.0716524571, -0.5490002632, 0.0469178259, 0.223891899, -0.0183320791, 0.0063809231, 0.0733918026, 0.2378413677, -0.1913520545, 0.6728572249, 0.0686540902, -0.0561063886, -0.3147748113, 0.3004776835, 0.1758286357, 0.0488543659, 0.0803688318, 0.1535321474, -0.2527368069, 0.0332420096, -0.2883599699, -0.0443777665, 0.4211077392, 0.0568576455, 0.3054699004, -0.4572609067, -0.2989240587, 0.2259771377, 0.4199060798, 0.4424135387, 0.0849666446, 0.2154006213, 0.5814500451, 0.0252290964, 0.0394732393, -0.2616809905, 0.1191082299, 0.059615463, 0.0078942366, -0.1638839841, -0.0199991614, -0.0829944909, 0.0370736495, 0.135000363, 0.3841440678, 0.2583818734, 0.0394194573, -0.0428873785, -0.3136141896, -0.4687739015, 0.0511496179, -0.1495770216, -0.0921679288, 0.3379409313, 0.3114597201, -0.0182743445, 0.0465468727, 0.3662719131, 0.2607457936, 0.149502784, -0.0323064327, -0.0989736617, -0.1910013258, 0.168915987, -0.0160103291, 0.4543609023, 0.3557753563, -0.0146975489, 0.0548875481, -0.0971446112, -0.0204035528, 0.3564493656, -0.1523542106, -0.0970254391, 0.1846250892, 0.3677535355, 0.0412649103, 0.1355879158, -0.2689228654, 0.2020163983, -0.2849613428, -0.267259717, 0.0389265977, -0.0312439296, -0.0535078086, -0.0286828652, 0.0271093287, -0.1850097477, 0.312662214, 0.4369840026, -0.1364957392, -0.3239026368, -0.6861956716, -0.6801719666, 0.355052948, -0.0194602273, -0.1567204595, -0.0008685738, -0.1191427782, -0.0471938886, 0.0927401334, 0.3334363699, -0.0994434431, -0.1262347996, -0.1114646941, -0.1337477565, 0.0834588036, 0.1662858427, -0.1219963878, -0.0319094248, -0.2020149231, -0.1274803579, 0.0751946121, -0.0144128501, -0.2027578652, -0.2078403682, -0.0922852829, 0.6267000437, 0.2511225343, 0.1438149512, 0.5188575387, 0.0033952221, -0.1690082848, -0.1581480801, -0.168882519, -0.1216175482, 0.3049313128, 0.0201932974, 0.666084826, -0.1472445279, 0.4769167006, -0.1770950705, 0.5503358245, -0.163085252, -0.1171029806, -0.3809971213, 0.275118351, -0.1488751471, 0.336207062, -0.0528543666, 0.1610534638, 0.3596599698, 0.44328022, -0.637288928, -0.0975496545, 0.6288664341, -0.3102296293, -0.222548604, -0.135564208, 0.2629568875, -0.309736222, -0.3672792315, -0.4621835351, -0.1992237866, 0.1436505616, 0.2374667227, -0.0912963599, 0.189078033, -0.4163121879, 0.1561917961, 0.01356069, -0.0843810737, 0.0612947941, -0.3806416988, -0.2585657239, -0.2395606935 ]
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.3484403491, 0.3749225438, -0.0223543961, 0.24240762, 0.2333745956, 0.0591794848, 0.2440308332, 0.4674772322, 0.2553082108, -0.1403686106, -0.0667247102, -0.0904458165, -0.3057557344, 0.1228695139, 0.0535940193, -0.0088574458, -0.0977111384, 0.0319081061, -0.1895279884, 0.0566940606, -0.1161627024, -0.0643235371, -0.1031744331, 0.015848089, -0.0917348638, -0.1198821515, 0.2069768012, 0.1899710149, -0.2297098637, -0.457949996, 0.29750669, 0.1518293619, 0.2854931951, 0.4001205862, -0.0001180434, 0.1198681295, 0.4619448781, -0.0878781825, -0.4845324755, -0.3111269176, -0.2444014847, -0.0946977735, 0.027989395, -0.1625522524, -0.1754536331, 0.3403496742, 0.1200166196, -0.3093126714, 0.2425988168, 0.4159029722, 0.1814553589, 0.4850331545, -0.0983782485, 0.141930759, 0.2775053084, 0.0405623019, -0.0977335125, 0.4429732561, 0.0883835629, -0.2895776033, -0.0681833029, 0.182724908, -0.1868140996, 0.2293162644, 0.2373237461, -0.0310596414, 0.0500490814, -0.1472803056, 0.0172667634, 0.3044556379, 0.2284756601, -0.4627506733, -0.2627745271, -0.1982949674, -0.0720932558, -0.6634257436, 0.3091946542, 0.2011434585, -0.2390185893, -0.1425317973, -0.5278378129, 0.0906219631, -0.0025055036, 0.1169955209, 0.1789864302, 0.4105426669, 0.2487376332, 0.1001005471, 0.1208607554, 0.0906595737, 0.1509336829, -0.2384597808, -0.1124072075, 0.2280859947, -0.5045989752, -0.1677162051, 0.1644723564, 0.1875033975, 0.0313852429, 0.3799574673, 0.1418698579, 0.0847265273, 0.0732121915, 0.0911260843, 0.2244704068, 0.1387258768, 0.1841383725, 0.2849822342, 0.3846352696, 0.1717725098, 0.2062672973, 0.1484001577, -0.071159035, -0.1690807939, 0.0967379361, 0.099563852, -0.0724150836, -0.3175652623, -0.550168097, 0.2802392542, 0.0591631085, -0.1087897271, 0.3846684694, 0.256890893, -0.2069444954, -0.369785428, 0.0991449952, 0.230772078, -0.2812793553, -0.0285788607, -0.1864867508, 0.217576921, -0.3917307556, -0.0531366616, 0.3407811821, -0.0546817929, 0.393103987, -0.1745660305, 0.0894258469, 0.2351036668, 0.1652140915, -0.2833359241, -0.372736454, 0.4511761069, 0.0721223354, -0.0609273314, 0.2574218214, -0.1946484149, -0.3575664163, -0.0453444421, -0.0227218345, -0.1541518122, -0.2694602013, 0.1336428076, -0.5319500566, -0.1265996099, -0.1047884673, -0.0980740786, 0.4659026265, -0.2218075693, 0.0720762163, -0.2355969995, -0.4272305369, -0.2113928944, 0.2053789496, 0.2566945255, -0.213631779, -0.0465421453, -0.2215105295, -0.0849397555, 0.3301587701, 0.2536371946, -0.1534427106, 0.2487069666, -0.2372033298, 0.1597364694, 0.4282442927, -0.0966892615, -0.3775050342, 0.0635769516, 0.0420480222, 0.0293669477, -0.0294795856, 0.1122543812, -0.0142481346, -0.0672747642, 0.190549314, 0.3296666145, -0.1435999423, -0.1567834616, -0.264084816, 0.0402005911, 0.4529902935, 0.3493310809, 0.2753324211, -0.1353899688, 0.0652285591, 0.1668529212, 0.1153825223, 0.0573681779, 0.0887689516, 0.1663027704, 0.1947502643, -0.0009250306, -0.3076636195, -0.1934029758, -0.4284851849, 0.2985519171, -0.4023675323, 0.3442188799, -0.0052061193, 0.1163649037, -0.274343729, -0.0884460658, -0.077978164, -0.0349811465, 0.0552480742, -0.0362684354, 0.1186362058, -0.1575818062, -0.121660307, 0.4596950114, -0.3044735789, 0.0306053422, -0.2032378465, 0.5589395165, -0.2494063824, -0.3483186066, 0.1816462576, 0.1678283811, -0.0748556927, -0.0887406841, -0.1464428008, 0.4584698677, 0.1846819818, -0.2115028799, 0.0676155388, 0.2728221416, 0.2086812109, 0.04574503, 0.1133399978, 0.3485707641, -0.0103808083, -0.1062241942, -0.2250294983, 0.5668247342, -0.1356492937, 0.1098726019, -0.0194808245, 0.1030008197, 0.1647879779, -0.1018058136, -0.1466486454, -0.0287137032, 0.5365939736, 0.1954438686, 0.2387120426, 0.0966352373, -0.3509837687, -0.1509942859, 0.5099390745, 0.0974254459, 0.0375006497, 0.3271869123, 0.1645046175, -0.220529303, 0.1525414437, 0.0362709165, 0.5619983673, 0.0448565073, -0.0008598464, 0.314771682, -0.3628349304, -0.0569822714, 0.0665312782, -0.1580661833, 0.3175255954, 0.3234210014, 0.0579751916, 0.0612477288, -0.3958382607, -0.2288501859, 0.1042925417, 0.4989688396, -0.2964096069, 0.0661740378, -0.3261884451, -0.1147773415, -0.0888151377, -0.1403395981, -0.5619572401, -0.2250493914, 0.0893957615, 0.3187949061, 0.0905731022, 0.3506727517, -0.485486716, -0.0084517896, 0.1274921149, -0.3142075241, -0.0129658207, -0.1558169425, -0.2733363807, 0.035525851, 0.7237205505, 0.0963542014, 0.3842615485, 0.0550473109, -0.2218771726, -0.0491373315, -0.3143677711, -0.0223676302, -0.2295468301, 0.3389603794, 0.3319759369, 0.1100180596, -0.1604090333, -0.2559393644, 0.2994100451, -0.0435469262, -0.1957681626, 0.1944875419, -0.0658887625, -0.0019957013, -0.1117209494, -0.0121068545, -0.1920268387, -0.2215815485, -0.1455160379, 0.197872445, 0.3210580051, 0.3196021318, 0.0293592885, 0.1503637731, 0.0955187976, -0.0287062749, -0.1796733439, -0.3023665249, 0.3549706936, 0.0689083636, -0.4053294659, -0.2147284448, -0.1006927341, 0.2305929959, 0.1018888354, -0.5546714067, 0.1395839602, -0.0337634385, 0.0982765332, 0.1617592424, -0.0188593473, 0.4739741981, -0.0388859846, 0.0560058206, -0.1978460699, -0.2456506789, 0.1355913281, 0.161682263, 0.6563413739, -0.0545417443, 0.4591040313, -0.1254960597, 0.5254042149, 0.2798561752, -0.1763413996, 0.3539974093, 0.2002418786, 0.2736521959, -0.1534941047, -0.2914326191, 0.2855211198, -0.0495390594, -0.1825989187, 0.0115917847, -0.0829058513, -0.2005024999, -0.1869343221, 0.358607471, -0.1521625966, -0.2032233328, 0.0759048313, -0.4192082882, 0.1117392182, 0.1238379031, 0.0417897105, -0.2293190658, -0.20974195, -0.0342518315, 0.3359268308, -0.0293545723, 0.034108188, -0.5879095197, -0.2072463036, -0.276188761, 0.3000999689, -0.022802677, 0.5082477927, -0.1271039099, -0.0221784115, 0.1022949219, -0.1911926717, 0.1879762113, -0.4306778908, 0.1604576409, 0.2485892475, 0.1959745884, -0.2174736857, -0.3243356049, -0.1971811205, 0.0899367556, 0.3619163632, 0.2390436083, -0.4133503139, -0.179563269, 0.3076111674, -0.1772216856, -0.0317562371, -0.2116954178, -0.5768936872, -0.311981976, -0.245536834, 0.1072794199, -0.1011517569, 0.3095968366, -0.0959006846, 0.2520930469, 0.1111569703, 0.1200236455, 0.3118345141, -0.0258774757, 0.1249617487, 0.2003540397, 0.2429252714, -0.2824966311, -0.030498758, 0.137251094, 0.4655223489, -0.0030380934, 0.1497276425, 0.2462177277, 0.1032720953, 0.0787182748, 0.1354251504, 0.1089804545, 0.0048271678, 0.294267863, 0.108022444, -0.1681434661, 0.2124031633, 0.1513140947, -0.0376337878, -0.2570493817, -0.4218551517, 0.3839823604, 0.0938769579, 0.0786314756, 0.5386756063, -0.1991009414, -0.2274919152, 0.1776129156, 0.428957969, 0.7838948965, -0.0462474339, 0.050590083, 0.2714208961, -0.3885198534, 0.1734308302, -0.1278076619, 0.2138845325, -0.4140079021, -0.2300035954, -0.1147607416, -0.2370069474, 0.28671965, 0.070919022, 0.0210514143, 0.2501483858, 0.0637671202, 0.2134828269, 0.0473113209, 0.3004755974, -0.2035630196, -0.0009062588, -0.2438041568, 0.1599235535, -0.2949707508, 0.3841910362, -0.1827705503, -0.1416790783, -0.2252997458, -0.2297965437, -0.5931193233, 0.0420735478, -0.0345498174, 0.1219113618, 0.1612068117, -0.2970358133, 0.2536327243, -0.0125446282, 0.305242151, 0.2149484903, -0.2189767957, 0.0320768841, 0.1596263945, 0.0632778779, 0.1346660703, 0.0577453263, 0.3857585192, -0.2114267945, -0.2823188007, -0.0503005497, -0.0693830103, -0.5146650076, 0.2868446112, -0.172350049, 0.0800503567, -0.0621819049, -0.0836493075, 0.0139850341, 0.0304549932, -0.1959531009, 0.1261597127, 0.066935055, -0.0748332739, 0.2518910766, -0.1257235557, -0.1455216855, -0.1935206056, 0.3756965697, 0.1373261213, 0.0165089369, 0.4529258609, 0.2720405757, -0.1528951377, -0.2304186821, -0.1056394428, 0.1786425114, 0.024784863, -0.0148171596, -0.1295320988, -0.0842393562, -0.1829862595, 0.1187393963, 0.2865359187, 0.0998412818, 0.292729944, -0.5119156837, -0.5008378029, 0.2192029208, -0.1976205409, 0.1925923079, -0.4042054415, 0.3515563011, -0.0026993304, 0.0052043647, -0.2980505824, -0.1789055467, -0.4618514776, 0.11093615, 0.0729262531, -0.2021179497, -0.0560514852, -0.1882606, 0.1196747199, -0.1352256685, -0.3918651938, -0.1660433561, -0.1048927829, 0.1586327404, 0.0088000949, -0.3563886881, 0.1701892018, -0.14885059, -0.2751868963, -0.0155989137, -0.2245162427, 0.0084069669, -0.0516109131, 0.1526713669, 0.2826907039, -0.0229276754, 0.0159273073, -0.1590152681, -0.173877731, 0.0574290752, 0.0226222984, 0.1775000095, 0.1828508079, 0.0482547283, -0.2104069889, 0.1155915633, -0.1032030731, 0.0354530327, 0.2705408633, -0.3210695982, -0.11032518, -0.0056249239, 0.470459491, 0.5312495232, -0.1288328618, -0.1956438422, 0.2631398141, 0.1443776339, -0.4927861691, 0.0960754231, 0.1032333821, 0.0822243392, -0.055196397, 0.134591043, 0.1972728819, 0.2342777252, 0.0172123108, 0.1755636632, 0.1643554866, -0.2493072152, 0.0796923563, 0.3898659348, -0.0801885203, -0.0386280641, 0.376491636, -0.1423220932, -0.012670923, -0.0343077667, 0.1067915261, 0.2860954702, -0.1919638216, 0.0537920445, -0.4108019471, -0.4486486018, -0.1012231559, 0.3432514071, 0.0036117211, -0.0192608386, -0.0278015696, 0.2828312218, -0.1828963161, -0.0578760728, -0.2266145051, 0.1052784249, 0.0238646343, -0.0718206987, -0.4027288556, -0.1296693981, -0.2279715985, 0.1654792577, 0.0540962219, 0.1262381673, 0.3088741601, 0.1003507525, -0.2129189223, -0.3295907974, 0.1171258688, 0.3001697361, -0.3030857146, -0.2791535556, 0.3936850429, 0.2128654718, 0.0155664682, -0.2271836549, 0.36408934, 0.3236170411, 0.3887956738, -0.2514788806, -0.2520095408, 0.0765977874, 0.0299056992, -0.0827056989, 0.497821629, 0.327583313, 0.0998728126, 0.2096663117, 0.0794473961, -0.0956615582, 0.1966317743, -0.0840155855, -0.2941376567, 0.0035991631, 0.6603893042, 0.1717774272, 0.0049782768, -0.0732262433, 0.0308115669, -0.1909761429, -0.0409569182, 0.3082458675, 0.1975515187, 0.1833476424, -0.0998537987, 0.0441903919, -0.141041562, 0.6444203854, 0.2349772453, 0.1140372008, -0.4878852367, -0.3304451108, -0.6936563849, -0.0819300637, -0.2694930434, -0.1117673516, 0.1053628996, 0.2048395127, -0.0446274318, 0.0618333779, 0.1968584508, 0.0232924595, -0.183919996, -0.0317239389, -0.3047986627, 0.1097687334, -0.2589261532, 0.0314820632, -0.1542463005, -0.3109223247, 0.1440678984, 0.0020725466, 0.0330828354, -0.1179745793, -0.0353141651, 0.2205821276, 0.3118729889, 0.2911404371, 0.0490067676, 0.6657660604, 0.1145600528, -0.137476787, -0.3619859219, -0.14984034, -0.4374698102, 0.1409905106, -0.161232084, 0.6160258055, 0.0332117155, -0.1389368176, -0.3363067508, 0.5645502806, 0.0902393311, -0.3458335102, -0.0855588764, -0.0303032231, -0.1786025912, 0.230814144, -0.0440803356, 0.0040956717, 0.2179862559, 0.4543699622, -0.4882112145, -0.1645533741, 0.5545022488, -0.071817331, -0.2701317668, -0.1823329329, 0.157505542, -0.096259132, -0.1653825194, -0.7271356583, -0.0263309926, 0.2373393774, -0.1326826066, -0.2621172369, 0.2379524708, -0.1139859408, 0.1122613251, 0.0536023974, 0.2132701427, -0.336386174, -0.3369754255, -0.1634085923, -0.1936069727 ]
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.3484403491, 0.3749225438, -0.0223543961, 0.24240762, 0.2333745956, 0.0591794848, 0.2440308332, 0.4674772322, 0.2553082108, -0.1403686106, -0.0667247102, -0.0904458165, -0.3057557344, 0.1228695139, 0.0535940193, -0.0088574458, -0.0977111384, 0.0319081061, -0.1895279884, 0.0566940606, -0.1161627024, -0.0643235371, -0.1031744331, 0.015848089, -0.0917348638, -0.1198821515, 0.2069768012, 0.1899710149, -0.2297098637, -0.457949996, 0.29750669, 0.1518293619, 0.2854931951, 0.4001205862, -0.0001180434, 0.1198681295, 0.4619448781, -0.0878781825, -0.4845324755, -0.3111269176, -0.2444014847, -0.0946977735, 0.027989395, -0.1625522524, -0.1754536331, 0.3403496742, 0.1200166196, -0.3093126714, 0.2425988168, 0.4159029722, 0.1814553589, 0.4850331545, -0.0983782485, 0.141930759, 0.2775053084, 0.0405623019, -0.0977335125, 0.4429732561, 0.0883835629, -0.2895776033, -0.0681833029, 0.182724908, -0.1868140996, 0.2293162644, 0.2373237461, -0.0310596414, 0.0500490814, -0.1472803056, 0.0172667634, 0.3044556379, 0.2284756601, -0.4627506733, -0.2627745271, -0.1982949674, -0.0720932558, -0.6634257436, 0.3091946542, 0.2011434585, -0.2390185893, -0.1425317973, -0.5278378129, 0.0906219631, -0.0025055036, 0.1169955209, 0.1789864302, 0.4105426669, 0.2487376332, 0.1001005471, 0.1208607554, 0.0906595737, 0.1509336829, -0.2384597808, -0.1124072075, 0.2280859947, -0.5045989752, -0.1677162051, 0.1644723564, 0.1875033975, 0.0313852429, 0.3799574673, 0.1418698579, 0.0847265273, 0.0732121915, 0.0911260843, 0.2244704068, 0.1387258768, 0.1841383725, 0.2849822342, 0.3846352696, 0.1717725098, 0.2062672973, 0.1484001577, -0.071159035, -0.1690807939, 0.0967379361, 0.099563852, -0.0724150836, -0.3175652623, -0.550168097, 0.2802392542, 0.0591631085, -0.1087897271, 0.3846684694, 0.256890893, -0.2069444954, -0.369785428, 0.0991449952, 0.230772078, -0.2812793553, -0.0285788607, -0.1864867508, 0.217576921, -0.3917307556, -0.0531366616, 0.3407811821, -0.0546817929, 0.393103987, -0.1745660305, 0.0894258469, 0.2351036668, 0.1652140915, -0.2833359241, -0.372736454, 0.4511761069, 0.0721223354, -0.0609273314, 0.2574218214, -0.1946484149, -0.3575664163, -0.0453444421, -0.0227218345, -0.1541518122, -0.2694602013, 0.1336428076, -0.5319500566, -0.1265996099, -0.1047884673, -0.0980740786, 0.4659026265, -0.2218075693, 0.0720762163, -0.2355969995, -0.4272305369, -0.2113928944, 0.2053789496, 0.2566945255, -0.213631779, -0.0465421453, -0.2215105295, -0.0849397555, 0.3301587701, 0.2536371946, -0.1534427106, 0.2487069666, -0.2372033298, 0.1597364694, 0.4282442927, -0.0966892615, -0.3775050342, 0.0635769516, 0.0420480222, 0.0293669477, -0.0294795856, 0.1122543812, -0.0142481346, -0.0672747642, 0.190549314, 0.3296666145, -0.1435999423, -0.1567834616, -0.264084816, 0.0402005911, 0.4529902935, 0.3493310809, 0.2753324211, -0.1353899688, 0.0652285591, 0.1668529212, 0.1153825223, 0.0573681779, 0.0887689516, 0.1663027704, 0.1947502643, -0.0009250306, -0.3076636195, -0.1934029758, -0.4284851849, 0.2985519171, -0.4023675323, 0.3442188799, -0.0052061193, 0.1163649037, -0.274343729, -0.0884460658, -0.077978164, -0.0349811465, 0.0552480742, -0.0362684354, 0.1186362058, -0.1575818062, -0.121660307, 0.4596950114, -0.3044735789, 0.0306053422, -0.2032378465, 0.5589395165, -0.2494063824, -0.3483186066, 0.1816462576, 0.1678283811, -0.0748556927, -0.0887406841, -0.1464428008, 0.4584698677, 0.1846819818, -0.2115028799, 0.0676155388, 0.2728221416, 0.2086812109, 0.04574503, 0.1133399978, 0.3485707641, -0.0103808083, -0.1062241942, -0.2250294983, 0.5668247342, -0.1356492937, 0.1098726019, -0.0194808245, 0.1030008197, 0.1647879779, -0.1018058136, -0.1466486454, -0.0287137032, 0.5365939736, 0.1954438686, 0.2387120426, 0.0966352373, -0.3509837687, -0.1509942859, 0.5099390745, 0.0974254459, 0.0375006497, 0.3271869123, 0.1645046175, -0.220529303, 0.1525414437, 0.0362709165, 0.5619983673, 0.0448565073, -0.0008598464, 0.314771682, -0.3628349304, -0.0569822714, 0.0665312782, -0.1580661833, 0.3175255954, 0.3234210014, 0.0579751916, 0.0612477288, -0.3958382607, -0.2288501859, 0.1042925417, 0.4989688396, -0.2964096069, 0.0661740378, -0.3261884451, -0.1147773415, -0.0888151377, -0.1403395981, -0.5619572401, -0.2250493914, 0.0893957615, 0.3187949061, 0.0905731022, 0.3506727517, -0.485486716, -0.0084517896, 0.1274921149, -0.3142075241, -0.0129658207, -0.1558169425, -0.2733363807, 0.035525851, 0.7237205505, 0.0963542014, 0.3842615485, 0.0550473109, -0.2218771726, -0.0491373315, -0.3143677711, -0.0223676302, -0.2295468301, 0.3389603794, 0.3319759369, 0.1100180596, -0.1604090333, -0.2559393644, 0.2994100451, -0.0435469262, -0.1957681626, 0.1944875419, -0.0658887625, -0.0019957013, -0.1117209494, -0.0121068545, -0.1920268387, -0.2215815485, -0.1455160379, 0.197872445, 0.3210580051, 0.3196021318, 0.0293592885, 0.1503637731, 0.0955187976, -0.0287062749, -0.1796733439, -0.3023665249, 0.3549706936, 0.0689083636, -0.4053294659, -0.2147284448, -0.1006927341, 0.2305929959, 0.1018888354, -0.5546714067, 0.1395839602, -0.0337634385, 0.0982765332, 0.1617592424, -0.0188593473, 0.4739741981, -0.0388859846, 0.0560058206, -0.1978460699, -0.2456506789, 0.1355913281, 0.161682263, 0.6563413739, -0.0545417443, 0.4591040313, -0.1254960597, 0.5254042149, 0.2798561752, -0.1763413996, 0.3539974093, 0.2002418786, 0.2736521959, -0.1534941047, -0.2914326191, 0.2855211198, -0.0495390594, -0.1825989187, 0.0115917847, -0.0829058513, -0.2005024999, -0.1869343221, 0.358607471, -0.1521625966, -0.2032233328, 0.0759048313, -0.4192082882, 0.1117392182, 0.1238379031, 0.0417897105, -0.2293190658, -0.20974195, -0.0342518315, 0.3359268308, -0.0293545723, 0.034108188, -0.5879095197, -0.2072463036, -0.276188761, 0.3000999689, -0.022802677, 0.5082477927, -0.1271039099, -0.0221784115, 0.1022949219, -0.1911926717, 0.1879762113, -0.4306778908, 0.1604576409, 0.2485892475, 0.1959745884, -0.2174736857, -0.3243356049, -0.1971811205, 0.0899367556, 0.3619163632, 0.2390436083, -0.4133503139, -0.179563269, 0.3076111674, -0.1772216856, -0.0317562371, -0.2116954178, -0.5768936872, -0.311981976, -0.245536834, 0.1072794199, -0.1011517569, 0.3095968366, -0.0959006846, 0.2520930469, 0.1111569703, 0.1200236455, 0.3118345141, -0.0258774757, 0.1249617487, 0.2003540397, 0.2429252714, -0.2824966311, -0.030498758, 0.137251094, 0.4655223489, -0.0030380934, 0.1497276425, 0.2462177277, 0.1032720953, 0.0787182748, 0.1354251504, 0.1089804545, 0.0048271678, 0.294267863, 0.108022444, -0.1681434661, 0.2124031633, 0.1513140947, -0.0376337878, -0.2570493817, -0.4218551517, 0.3839823604, 0.0938769579, 0.0786314756, 0.5386756063, -0.1991009414, -0.2274919152, 0.1776129156, 0.428957969, 0.7838948965, -0.0462474339, 0.050590083, 0.2714208961, -0.3885198534, 0.1734308302, -0.1278076619, 0.2138845325, -0.4140079021, -0.2300035954, -0.1147607416, -0.2370069474, 0.28671965, 0.070919022, 0.0210514143, 0.2501483858, 0.0637671202, 0.2134828269, 0.0473113209, 0.3004755974, -0.2035630196, -0.0009062588, -0.2438041568, 0.1599235535, -0.2949707508, 0.3841910362, -0.1827705503, -0.1416790783, -0.2252997458, -0.2297965437, -0.5931193233, 0.0420735478, -0.0345498174, 0.1219113618, 0.1612068117, -0.2970358133, 0.2536327243, -0.0125446282, 0.305242151, 0.2149484903, -0.2189767957, 0.0320768841, 0.1596263945, 0.0632778779, 0.1346660703, 0.0577453263, 0.3857585192, -0.2114267945, -0.2823188007, -0.0503005497, -0.0693830103, -0.5146650076, 0.2868446112, -0.172350049, 0.0800503567, -0.0621819049, -0.0836493075, 0.0139850341, 0.0304549932, -0.1959531009, 0.1261597127, 0.066935055, -0.0748332739, 0.2518910766, -0.1257235557, -0.1455216855, -0.1935206056, 0.3756965697, 0.1373261213, 0.0165089369, 0.4529258609, 0.2720405757, -0.1528951377, -0.2304186821, -0.1056394428, 0.1786425114, 0.024784863, -0.0148171596, -0.1295320988, -0.0842393562, -0.1829862595, 0.1187393963, 0.2865359187, 0.0998412818, 0.292729944, -0.5119156837, -0.5008378029, 0.2192029208, -0.1976205409, 0.1925923079, -0.4042054415, 0.3515563011, -0.0026993304, 0.0052043647, -0.2980505824, -0.1789055467, -0.4618514776, 0.11093615, 0.0729262531, -0.2021179497, -0.0560514852, -0.1882606, 0.1196747199, -0.1352256685, -0.3918651938, -0.1660433561, -0.1048927829, 0.1586327404, 0.0088000949, -0.3563886881, 0.1701892018, -0.14885059, -0.2751868963, -0.0155989137, -0.2245162427, 0.0084069669, -0.0516109131, 0.1526713669, 0.2826907039, -0.0229276754, 0.0159273073, -0.1590152681, -0.173877731, 0.0574290752, 0.0226222984, 0.1775000095, 0.1828508079, 0.0482547283, -0.2104069889, 0.1155915633, -0.1032030731, 0.0354530327, 0.2705408633, -0.3210695982, -0.11032518, -0.0056249239, 0.470459491, 0.5312495232, -0.1288328618, -0.1956438422, 0.2631398141, 0.1443776339, -0.4927861691, 0.0960754231, 0.1032333821, 0.0822243392, -0.055196397, 0.134591043, 0.1972728819, 0.2342777252, 0.0172123108, 0.1755636632, 0.1643554866, -0.2493072152, 0.0796923563, 0.3898659348, -0.0801885203, -0.0386280641, 0.376491636, -0.1423220932, -0.012670923, -0.0343077667, 0.1067915261, 0.2860954702, -0.1919638216, 0.0537920445, -0.4108019471, -0.4486486018, -0.1012231559, 0.3432514071, 0.0036117211, -0.0192608386, -0.0278015696, 0.2828312218, -0.1828963161, -0.0578760728, -0.2266145051, 0.1052784249, 0.0238646343, -0.0718206987, -0.4027288556, -0.1296693981, -0.2279715985, 0.1654792577, 0.0540962219, 0.1262381673, 0.3088741601, 0.1003507525, -0.2129189223, -0.3295907974, 0.1171258688, 0.3001697361, -0.3030857146, -0.2791535556, 0.3936850429, 0.2128654718, 0.0155664682, -0.2271836549, 0.36408934, 0.3236170411, 0.3887956738, -0.2514788806, -0.2520095408, 0.0765977874, 0.0299056992, -0.0827056989, 0.497821629, 0.327583313, 0.0998728126, 0.2096663117, 0.0794473961, -0.0956615582, 0.1966317743, -0.0840155855, -0.2941376567, 0.0035991631, 0.6603893042, 0.1717774272, 0.0049782768, -0.0732262433, 0.0308115669, -0.1909761429, -0.0409569182, 0.3082458675, 0.1975515187, 0.1833476424, -0.0998537987, 0.0441903919, -0.141041562, 0.6444203854, 0.2349772453, 0.1140372008, -0.4878852367, -0.3304451108, -0.6936563849, -0.0819300637, -0.2694930434, -0.1117673516, 0.1053628996, 0.2048395127, -0.0446274318, 0.0618333779, 0.1968584508, 0.0232924595, -0.183919996, -0.0317239389, -0.3047986627, 0.1097687334, -0.2589261532, 0.0314820632, -0.1542463005, -0.3109223247, 0.1440678984, 0.0020725466, 0.0330828354, -0.1179745793, -0.0353141651, 0.2205821276, 0.3118729889, 0.2911404371, 0.0490067676, 0.6657660604, 0.1145600528, -0.137476787, -0.3619859219, -0.14984034, -0.4374698102, 0.1409905106, -0.161232084, 0.6160258055, 0.0332117155, -0.1389368176, -0.3363067508, 0.5645502806, 0.0902393311, -0.3458335102, -0.0855588764, -0.0303032231, -0.1786025912, 0.230814144, -0.0440803356, 0.0040956717, 0.2179862559, 0.4543699622, -0.4882112145, -0.1645533741, 0.5545022488, -0.071817331, -0.2701317668, -0.1823329329, 0.157505542, -0.096259132, -0.1653825194, -0.7271356583, -0.0263309926, 0.2373393774, -0.1326826066, -0.2621172369, 0.2379524708, -0.1139859408, 0.1122613251, 0.0536023974, 0.2132701427, -0.336386174, -0.3369754255, -0.1634085923, -0.1936069727 ]
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.3484403491, 0.3749225438, -0.0223543961, 0.24240762, 0.2333745956, 0.0591794848, 0.2440308332, 0.4674772322, 0.2553082108, -0.1403686106, -0.0667247102, -0.0904458165, -0.3057557344, 0.1228695139, 0.0535940193, -0.0088574458, -0.0977111384, 0.0319081061, -0.1895279884, 0.0566940606, -0.1161627024, -0.0643235371, -0.1031744331, 0.015848089, -0.0917348638, -0.1198821515, 0.2069768012, 0.1899710149, -0.2297098637, -0.457949996, 0.29750669, 0.1518293619, 0.2854931951, 0.4001205862, -0.0001180434, 0.1198681295, 0.4619448781, -0.0878781825, -0.4845324755, -0.3111269176, -0.2444014847, -0.0946977735, 0.027989395, -0.1625522524, -0.1754536331, 0.3403496742, 0.1200166196, -0.3093126714, 0.2425988168, 0.4159029722, 0.1814553589, 0.4850331545, -0.0983782485, 0.141930759, 0.2775053084, 0.0405623019, -0.0977335125, 0.4429732561, 0.0883835629, -0.2895776033, -0.0681833029, 0.182724908, -0.1868140996, 0.2293162644, 0.2373237461, -0.0310596414, 0.0500490814, -0.1472803056, 0.0172667634, 0.3044556379, 0.2284756601, -0.4627506733, -0.2627745271, -0.1982949674, -0.0720932558, -0.6634257436, 0.3091946542, 0.2011434585, -0.2390185893, -0.1425317973, -0.5278378129, 0.0906219631, -0.0025055036, 0.1169955209, 0.1789864302, 0.4105426669, 0.2487376332, 0.1001005471, 0.1208607554, 0.0906595737, 0.1509336829, -0.2384597808, -0.1124072075, 0.2280859947, -0.5045989752, -0.1677162051, 0.1644723564, 0.1875033975, 0.0313852429, 0.3799574673, 0.1418698579, 0.0847265273, 0.0732121915, 0.0911260843, 0.2244704068, 0.1387258768, 0.1841383725, 0.2849822342, 0.3846352696, 0.1717725098, 0.2062672973, 0.1484001577, -0.071159035, -0.1690807939, 0.0967379361, 0.099563852, -0.0724150836, -0.3175652623, -0.550168097, 0.2802392542, 0.0591631085, -0.1087897271, 0.3846684694, 0.256890893, -0.2069444954, -0.369785428, 0.0991449952, 0.230772078, -0.2812793553, -0.0285788607, -0.1864867508, 0.217576921, -0.3917307556, -0.0531366616, 0.3407811821, -0.0546817929, 0.393103987, -0.1745660305, 0.0894258469, 0.2351036668, 0.1652140915, -0.2833359241, -0.372736454, 0.4511761069, 0.0721223354, -0.0609273314, 0.2574218214, -0.1946484149, -0.3575664163, -0.0453444421, -0.0227218345, -0.1541518122, -0.2694602013, 0.1336428076, -0.5319500566, -0.1265996099, -0.1047884673, -0.0980740786, 0.4659026265, -0.2218075693, 0.0720762163, -0.2355969995, -0.4272305369, -0.2113928944, 0.2053789496, 0.2566945255, -0.213631779, -0.0465421453, -0.2215105295, -0.0849397555, 0.3301587701, 0.2536371946, -0.1534427106, 0.2487069666, -0.2372033298, 0.1597364694, 0.4282442927, -0.0966892615, -0.3775050342, 0.0635769516, 0.0420480222, 0.0293669477, -0.0294795856, 0.1122543812, -0.0142481346, -0.0672747642, 0.190549314, 0.3296666145, -0.1435999423, -0.1567834616, -0.264084816, 0.0402005911, 0.4529902935, 0.3493310809, 0.2753324211, -0.1353899688, 0.0652285591, 0.1668529212, 0.1153825223, 0.0573681779, 0.0887689516, 0.1663027704, 0.1947502643, -0.0009250306, -0.3076636195, -0.1934029758, -0.4284851849, 0.2985519171, -0.4023675323, 0.3442188799, -0.0052061193, 0.1163649037, -0.274343729, -0.0884460658, -0.077978164, -0.0349811465, 0.0552480742, -0.0362684354, 0.1186362058, -0.1575818062, -0.121660307, 0.4596950114, -0.3044735789, 0.0306053422, -0.2032378465, 0.5589395165, -0.2494063824, -0.3483186066, 0.1816462576, 0.1678283811, -0.0748556927, -0.0887406841, -0.1464428008, 0.4584698677, 0.1846819818, -0.2115028799, 0.0676155388, 0.2728221416, 0.2086812109, 0.04574503, 0.1133399978, 0.3485707641, -0.0103808083, -0.1062241942, -0.2250294983, 0.5668247342, -0.1356492937, 0.1098726019, -0.0194808245, 0.1030008197, 0.1647879779, -0.1018058136, -0.1466486454, -0.0287137032, 0.5365939736, 0.1954438686, 0.2387120426, 0.0966352373, -0.3509837687, -0.1509942859, 0.5099390745, 0.0974254459, 0.0375006497, 0.3271869123, 0.1645046175, -0.220529303, 0.1525414437, 0.0362709165, 0.5619983673, 0.0448565073, -0.0008598464, 0.314771682, -0.3628349304, -0.0569822714, 0.0665312782, -0.1580661833, 0.3175255954, 0.3234210014, 0.0579751916, 0.0612477288, -0.3958382607, -0.2288501859, 0.1042925417, 0.4989688396, -0.2964096069, 0.0661740378, -0.3261884451, -0.1147773415, -0.0888151377, -0.1403395981, -0.5619572401, -0.2250493914, 0.0893957615, 0.3187949061, 0.0905731022, 0.3506727517, -0.485486716, -0.0084517896, 0.1274921149, -0.3142075241, -0.0129658207, -0.1558169425, -0.2733363807, 0.035525851, 0.7237205505, 0.0963542014, 0.3842615485, 0.0550473109, -0.2218771726, -0.0491373315, -0.3143677711, -0.0223676302, -0.2295468301, 0.3389603794, 0.3319759369, 0.1100180596, -0.1604090333, -0.2559393644, 0.2994100451, -0.0435469262, -0.1957681626, 0.1944875419, -0.0658887625, -0.0019957013, -0.1117209494, -0.0121068545, -0.1920268387, -0.2215815485, -0.1455160379, 0.197872445, 0.3210580051, 0.3196021318, 0.0293592885, 0.1503637731, 0.0955187976, -0.0287062749, -0.1796733439, -0.3023665249, 0.3549706936, 0.0689083636, -0.4053294659, -0.2147284448, -0.1006927341, 0.2305929959, 0.1018888354, -0.5546714067, 0.1395839602, -0.0337634385, 0.0982765332, 0.1617592424, -0.0188593473, 0.4739741981, -0.0388859846, 0.0560058206, -0.1978460699, -0.2456506789, 0.1355913281, 0.161682263, 0.6563413739, -0.0545417443, 0.4591040313, -0.1254960597, 0.5254042149, 0.2798561752, -0.1763413996, 0.3539974093, 0.2002418786, 0.2736521959, -0.1534941047, -0.2914326191, 0.2855211198, -0.0495390594, -0.1825989187, 0.0115917847, -0.0829058513, -0.2005024999, -0.1869343221, 0.358607471, -0.1521625966, -0.2032233328, 0.0759048313, -0.4192082882, 0.1117392182, 0.1238379031, 0.0417897105, -0.2293190658, -0.20974195, -0.0342518315, 0.3359268308, -0.0293545723, 0.034108188, -0.5879095197, -0.2072463036, -0.276188761, 0.3000999689, -0.022802677, 0.5082477927, -0.1271039099, -0.0221784115, 0.1022949219, -0.1911926717, 0.1879762113, -0.4306778908, 0.1604576409, 0.2485892475, 0.1959745884, -0.2174736857, -0.3243356049, -0.1971811205, 0.0899367556, 0.3619163632, 0.2390436083, -0.4133503139, -0.179563269, 0.3076111674, -0.1772216856, -0.0317562371, -0.2116954178, -0.5768936872, -0.311981976, -0.245536834, 0.1072794199, -0.1011517569, 0.3095968366, -0.0959006846, 0.2520930469, 0.1111569703, 0.1200236455, 0.3118345141, -0.0258774757, 0.1249617487, 0.2003540397, 0.2429252714, -0.2824966311, -0.030498758, 0.137251094, 0.4655223489, -0.0030380934, 0.1497276425, 0.2462177277, 0.1032720953, 0.0787182748, 0.1354251504, 0.1089804545, 0.0048271678, 0.294267863, 0.108022444, -0.1681434661, 0.2124031633, 0.1513140947, -0.0376337878, -0.2570493817, -0.4218551517, 0.3839823604, 0.0938769579, 0.0786314756, 0.5386756063, -0.1991009414, -0.2274919152, 0.1776129156, 0.428957969, 0.7838948965, -0.0462474339, 0.050590083, 0.2714208961, -0.3885198534, 0.1734308302, -0.1278076619, 0.2138845325, -0.4140079021, -0.2300035954, -0.1147607416, -0.2370069474, 0.28671965, 0.070919022, 0.0210514143, 0.2501483858, 0.0637671202, 0.2134828269, 0.0473113209, 0.3004755974, -0.2035630196, -0.0009062588, -0.2438041568, 0.1599235535, -0.2949707508, 0.3841910362, -0.1827705503, -0.1416790783, -0.2252997458, -0.2297965437, -0.5931193233, 0.0420735478, -0.0345498174, 0.1219113618, 0.1612068117, -0.2970358133, 0.2536327243, -0.0125446282, 0.305242151, 0.2149484903, -0.2189767957, 0.0320768841, 0.1596263945, 0.0632778779, 0.1346660703, 0.0577453263, 0.3857585192, -0.2114267945, -0.2823188007, -0.0503005497, -0.0693830103, -0.5146650076, 0.2868446112, -0.172350049, 0.0800503567, -0.0621819049, -0.0836493075, 0.0139850341, 0.0304549932, -0.1959531009, 0.1261597127, 0.066935055, -0.0748332739, 0.2518910766, -0.1257235557, -0.1455216855, -0.1935206056, 0.3756965697, 0.1373261213, 0.0165089369, 0.4529258609, 0.2720405757, -0.1528951377, -0.2304186821, -0.1056394428, 0.1786425114, 0.024784863, -0.0148171596, -0.1295320988, -0.0842393562, -0.1829862595, 0.1187393963, 0.2865359187, 0.0998412818, 0.292729944, -0.5119156837, -0.5008378029, 0.2192029208, -0.1976205409, 0.1925923079, -0.4042054415, 0.3515563011, -0.0026993304, 0.0052043647, -0.2980505824, -0.1789055467, -0.4618514776, 0.11093615, 0.0729262531, -0.2021179497, -0.0560514852, -0.1882606, 0.1196747199, -0.1352256685, -0.3918651938, -0.1660433561, -0.1048927829, 0.1586327404, 0.0088000949, -0.3563886881, 0.1701892018, -0.14885059, -0.2751868963, -0.0155989137, -0.2245162427, 0.0084069669, -0.0516109131, 0.1526713669, 0.2826907039, -0.0229276754, 0.0159273073, -0.1590152681, -0.173877731, 0.0574290752, 0.0226222984, 0.1775000095, 0.1828508079, 0.0482547283, -0.2104069889, 0.1155915633, -0.1032030731, 0.0354530327, 0.2705408633, -0.3210695982, -0.11032518, -0.0056249239, 0.470459491, 0.5312495232, -0.1288328618, -0.1956438422, 0.2631398141, 0.1443776339, -0.4927861691, 0.0960754231, 0.1032333821, 0.0822243392, -0.055196397, 0.134591043, 0.1972728819, 0.2342777252, 0.0172123108, 0.1755636632, 0.1643554866, -0.2493072152, 0.0796923563, 0.3898659348, -0.0801885203, -0.0386280641, 0.376491636, -0.1423220932, -0.012670923, -0.0343077667, 0.1067915261, 0.2860954702, -0.1919638216, 0.0537920445, -0.4108019471, -0.4486486018, -0.1012231559, 0.3432514071, 0.0036117211, -0.0192608386, -0.0278015696, 0.2828312218, -0.1828963161, -0.0578760728, -0.2266145051, 0.1052784249, 0.0238646343, -0.0718206987, -0.4027288556, -0.1296693981, -0.2279715985, 0.1654792577, 0.0540962219, 0.1262381673, 0.3088741601, 0.1003507525, -0.2129189223, -0.3295907974, 0.1171258688, 0.3001697361, -0.3030857146, -0.2791535556, 0.3936850429, 0.2128654718, 0.0155664682, -0.2271836549, 0.36408934, 0.3236170411, 0.3887956738, -0.2514788806, -0.2520095408, 0.0765977874, 0.0299056992, -0.0827056989, 0.497821629, 0.327583313, 0.0998728126, 0.2096663117, 0.0794473961, -0.0956615582, 0.1966317743, -0.0840155855, -0.2941376567, 0.0035991631, 0.6603893042, 0.1717774272, 0.0049782768, -0.0732262433, 0.0308115669, -0.1909761429, -0.0409569182, 0.3082458675, 0.1975515187, 0.1833476424, -0.0998537987, 0.0441903919, -0.141041562, 0.6444203854, 0.2349772453, 0.1140372008, -0.4878852367, -0.3304451108, -0.6936563849, -0.0819300637, -0.2694930434, -0.1117673516, 0.1053628996, 0.2048395127, -0.0446274318, 0.0618333779, 0.1968584508, 0.0232924595, -0.183919996, -0.0317239389, -0.3047986627, 0.1097687334, -0.2589261532, 0.0314820632, -0.1542463005, -0.3109223247, 0.1440678984, 0.0020725466, 0.0330828354, -0.1179745793, -0.0353141651, 0.2205821276, 0.3118729889, 0.2911404371, 0.0490067676, 0.6657660604, 0.1145600528, -0.137476787, -0.3619859219, -0.14984034, -0.4374698102, 0.1409905106, -0.161232084, 0.6160258055, 0.0332117155, -0.1389368176, -0.3363067508, 0.5645502806, 0.0902393311, -0.3458335102, -0.0855588764, -0.0303032231, -0.1786025912, 0.230814144, -0.0440803356, 0.0040956717, 0.2179862559, 0.4543699622, -0.4882112145, -0.1645533741, 0.5545022488, -0.071817331, -0.2701317668, -0.1823329329, 0.157505542, -0.096259132, -0.1653825194, -0.7271356583, -0.0263309926, 0.2373393774, -0.1326826066, -0.2621172369, 0.2379524708, -0.1139859408, 0.1122613251, 0.0536023974, 0.2132701427, -0.336386174, -0.3369754255, -0.1634085923, -0.1936069727 ]
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.3484403491, 0.3749225438, -0.0223543961, 0.24240762, 0.2333745956, 0.0591794848, 0.2440308332, 0.4674772322, 0.2553082108, -0.1403686106, -0.0667247102, -0.0904458165, -0.3057557344, 0.1228695139, 0.0535940193, -0.0088574458, -0.0977111384, 0.0319081061, -0.1895279884, 0.0566940606, -0.1161627024, -0.0643235371, -0.1031744331, 0.015848089, -0.0917348638, -0.1198821515, 0.2069768012, 0.1899710149, -0.2297098637, -0.457949996, 0.29750669, 0.1518293619, 0.2854931951, 0.4001205862, -0.0001180434, 0.1198681295, 0.4619448781, -0.0878781825, -0.4845324755, -0.3111269176, -0.2444014847, -0.0946977735, 0.027989395, -0.1625522524, -0.1754536331, 0.3403496742, 0.1200166196, -0.3093126714, 0.2425988168, 0.4159029722, 0.1814553589, 0.4850331545, -0.0983782485, 0.141930759, 0.2775053084, 0.0405623019, -0.0977335125, 0.4429732561, 0.0883835629, -0.2895776033, -0.0681833029, 0.182724908, -0.1868140996, 0.2293162644, 0.2373237461, -0.0310596414, 0.0500490814, -0.1472803056, 0.0172667634, 0.3044556379, 0.2284756601, -0.4627506733, -0.2627745271, -0.1982949674, -0.0720932558, -0.6634257436, 0.3091946542, 0.2011434585, -0.2390185893, -0.1425317973, -0.5278378129, 0.0906219631, -0.0025055036, 0.1169955209, 0.1789864302, 0.4105426669, 0.2487376332, 0.1001005471, 0.1208607554, 0.0906595737, 0.1509336829, -0.2384597808, -0.1124072075, 0.2280859947, -0.5045989752, -0.1677162051, 0.1644723564, 0.1875033975, 0.0313852429, 0.3799574673, 0.1418698579, 0.0847265273, 0.0732121915, 0.0911260843, 0.2244704068, 0.1387258768, 0.1841383725, 0.2849822342, 0.3846352696, 0.1717725098, 0.2062672973, 0.1484001577, -0.071159035, -0.1690807939, 0.0967379361, 0.099563852, -0.0724150836, -0.3175652623, -0.550168097, 0.2802392542, 0.0591631085, -0.1087897271, 0.3846684694, 0.256890893, -0.2069444954, -0.369785428, 0.0991449952, 0.230772078, -0.2812793553, -0.0285788607, -0.1864867508, 0.217576921, -0.3917307556, -0.0531366616, 0.3407811821, -0.0546817929, 0.393103987, -0.1745660305, 0.0894258469, 0.2351036668, 0.1652140915, -0.2833359241, -0.372736454, 0.4511761069, 0.0721223354, -0.0609273314, 0.2574218214, -0.1946484149, -0.3575664163, -0.0453444421, -0.0227218345, -0.1541518122, -0.2694602013, 0.1336428076, -0.5319500566, -0.1265996099, -0.1047884673, -0.0980740786, 0.4659026265, -0.2218075693, 0.0720762163, -0.2355969995, -0.4272305369, -0.2113928944, 0.2053789496, 0.2566945255, -0.213631779, -0.0465421453, -0.2215105295, -0.0849397555, 0.3301587701, 0.2536371946, -0.1534427106, 0.2487069666, -0.2372033298, 0.1597364694, 0.4282442927, -0.0966892615, -0.3775050342, 0.0635769516, 0.0420480222, 0.0293669477, -0.0294795856, 0.1122543812, -0.0142481346, -0.0672747642, 0.190549314, 0.3296666145, -0.1435999423, -0.1567834616, -0.264084816, 0.0402005911, 0.4529902935, 0.3493310809, 0.2753324211, -0.1353899688, 0.0652285591, 0.1668529212, 0.1153825223, 0.0573681779, 0.0887689516, 0.1663027704, 0.1947502643, -0.0009250306, -0.3076636195, -0.1934029758, -0.4284851849, 0.2985519171, -0.4023675323, 0.3442188799, -0.0052061193, 0.1163649037, -0.274343729, -0.0884460658, -0.077978164, -0.0349811465, 0.0552480742, -0.0362684354, 0.1186362058, -0.1575818062, -0.121660307, 0.4596950114, -0.3044735789, 0.0306053422, -0.2032378465, 0.5589395165, -0.2494063824, -0.3483186066, 0.1816462576, 0.1678283811, -0.0748556927, -0.0887406841, -0.1464428008, 0.4584698677, 0.1846819818, -0.2115028799, 0.0676155388, 0.2728221416, 0.2086812109, 0.04574503, 0.1133399978, 0.3485707641, -0.0103808083, -0.1062241942, -0.2250294983, 0.5668247342, -0.1356492937, 0.1098726019, -0.0194808245, 0.1030008197, 0.1647879779, -0.1018058136, -0.1466486454, -0.0287137032, 0.5365939736, 0.1954438686, 0.2387120426, 0.0966352373, -0.3509837687, -0.1509942859, 0.5099390745, 0.0974254459, 0.0375006497, 0.3271869123, 0.1645046175, -0.220529303, 0.1525414437, 0.0362709165, 0.5619983673, 0.0448565073, -0.0008598464, 0.314771682, -0.3628349304, -0.0569822714, 0.0665312782, -0.1580661833, 0.3175255954, 0.3234210014, 0.0579751916, 0.0612477288, -0.3958382607, -0.2288501859, 0.1042925417, 0.4989688396, -0.2964096069, 0.0661740378, -0.3261884451, -0.1147773415, -0.0888151377, -0.1403395981, -0.5619572401, -0.2250493914, 0.0893957615, 0.3187949061, 0.0905731022, 0.3506727517, -0.485486716, -0.0084517896, 0.1274921149, -0.3142075241, -0.0129658207, -0.1558169425, -0.2733363807, 0.035525851, 0.7237205505, 0.0963542014, 0.3842615485, 0.0550473109, -0.2218771726, -0.0491373315, -0.3143677711, -0.0223676302, -0.2295468301, 0.3389603794, 0.3319759369, 0.1100180596, -0.1604090333, -0.2559393644, 0.2994100451, -0.0435469262, -0.1957681626, 0.1944875419, -0.0658887625, -0.0019957013, -0.1117209494, -0.0121068545, -0.1920268387, -0.2215815485, -0.1455160379, 0.197872445, 0.3210580051, 0.3196021318, 0.0293592885, 0.1503637731, 0.0955187976, -0.0287062749, -0.1796733439, -0.3023665249, 0.3549706936, 0.0689083636, -0.4053294659, -0.2147284448, -0.1006927341, 0.2305929959, 0.1018888354, -0.5546714067, 0.1395839602, -0.0337634385, 0.0982765332, 0.1617592424, -0.0188593473, 0.4739741981, -0.0388859846, 0.0560058206, -0.1978460699, -0.2456506789, 0.1355913281, 0.161682263, 0.6563413739, -0.0545417443, 0.4591040313, -0.1254960597, 0.5254042149, 0.2798561752, -0.1763413996, 0.3539974093, 0.2002418786, 0.2736521959, -0.1534941047, -0.2914326191, 0.2855211198, -0.0495390594, -0.1825989187, 0.0115917847, -0.0829058513, -0.2005024999, -0.1869343221, 0.358607471, -0.1521625966, -0.2032233328, 0.0759048313, -0.4192082882, 0.1117392182, 0.1238379031, 0.0417897105, -0.2293190658, -0.20974195, -0.0342518315, 0.3359268308, -0.0293545723, 0.034108188, -0.5879095197, -0.2072463036, -0.276188761, 0.3000999689, -0.022802677, 0.5082477927, -0.1271039099, -0.0221784115, 0.1022949219, -0.1911926717, 0.1879762113, -0.4306778908, 0.1604576409, 0.2485892475, 0.1959745884, -0.2174736857, -0.3243356049, -0.1971811205, 0.0899367556, 0.3619163632, 0.2390436083, -0.4133503139, -0.179563269, 0.3076111674, -0.1772216856, -0.0317562371, -0.2116954178, -0.5768936872, -0.311981976, -0.245536834, 0.1072794199, -0.1011517569, 0.3095968366, -0.0959006846, 0.2520930469, 0.1111569703, 0.1200236455, 0.3118345141, -0.0258774757, 0.1249617487, 0.2003540397, 0.2429252714, -0.2824966311, -0.030498758, 0.137251094, 0.4655223489, -0.0030380934, 0.1497276425, 0.2462177277, 0.1032720953, 0.0787182748, 0.1354251504, 0.1089804545, 0.0048271678, 0.294267863, 0.108022444, -0.1681434661, 0.2124031633, 0.1513140947, -0.0376337878, -0.2570493817, -0.4218551517, 0.3839823604, 0.0938769579, 0.0786314756, 0.5386756063, -0.1991009414, -0.2274919152, 0.1776129156, 0.428957969, 0.7838948965, -0.0462474339, 0.050590083, 0.2714208961, -0.3885198534, 0.1734308302, -0.1278076619, 0.2138845325, -0.4140079021, -0.2300035954, -0.1147607416, -0.2370069474, 0.28671965, 0.070919022, 0.0210514143, 0.2501483858, 0.0637671202, 0.2134828269, 0.0473113209, 0.3004755974, -0.2035630196, -0.0009062588, -0.2438041568, 0.1599235535, -0.2949707508, 0.3841910362, -0.1827705503, -0.1416790783, -0.2252997458, -0.2297965437, -0.5931193233, 0.0420735478, -0.0345498174, 0.1219113618, 0.1612068117, -0.2970358133, 0.2536327243, -0.0125446282, 0.305242151, 0.2149484903, -0.2189767957, 0.0320768841, 0.1596263945, 0.0632778779, 0.1346660703, 0.0577453263, 0.3857585192, -0.2114267945, -0.2823188007, -0.0503005497, -0.0693830103, -0.5146650076, 0.2868446112, -0.172350049, 0.0800503567, -0.0621819049, -0.0836493075, 0.0139850341, 0.0304549932, -0.1959531009, 0.1261597127, 0.066935055, -0.0748332739, 0.2518910766, -0.1257235557, -0.1455216855, -0.1935206056, 0.3756965697, 0.1373261213, 0.0165089369, 0.4529258609, 0.2720405757, -0.1528951377, -0.2304186821, -0.1056394428, 0.1786425114, 0.024784863, -0.0148171596, -0.1295320988, -0.0842393562, -0.1829862595, 0.1187393963, 0.2865359187, 0.0998412818, 0.292729944, -0.5119156837, -0.5008378029, 0.2192029208, -0.1976205409, 0.1925923079, -0.4042054415, 0.3515563011, -0.0026993304, 0.0052043647, -0.2980505824, -0.1789055467, -0.4618514776, 0.11093615, 0.0729262531, -0.2021179497, -0.0560514852, -0.1882606, 0.1196747199, -0.1352256685, -0.3918651938, -0.1660433561, -0.1048927829, 0.1586327404, 0.0088000949, -0.3563886881, 0.1701892018, -0.14885059, -0.2751868963, -0.0155989137, -0.2245162427, 0.0084069669, -0.0516109131, 0.1526713669, 0.2826907039, -0.0229276754, 0.0159273073, -0.1590152681, -0.173877731, 0.0574290752, 0.0226222984, 0.1775000095, 0.1828508079, 0.0482547283, -0.2104069889, 0.1155915633, -0.1032030731, 0.0354530327, 0.2705408633, -0.3210695982, -0.11032518, -0.0056249239, 0.470459491, 0.5312495232, -0.1288328618, -0.1956438422, 0.2631398141, 0.1443776339, -0.4927861691, 0.0960754231, 0.1032333821, 0.0822243392, -0.055196397, 0.134591043, 0.1972728819, 0.2342777252, 0.0172123108, 0.1755636632, 0.1643554866, -0.2493072152, 0.0796923563, 0.3898659348, -0.0801885203, -0.0386280641, 0.376491636, -0.1423220932, -0.012670923, -0.0343077667, 0.1067915261, 0.2860954702, -0.1919638216, 0.0537920445, -0.4108019471, -0.4486486018, -0.1012231559, 0.3432514071, 0.0036117211, -0.0192608386, -0.0278015696, 0.2828312218, -0.1828963161, -0.0578760728, -0.2266145051, 0.1052784249, 0.0238646343, -0.0718206987, -0.4027288556, -0.1296693981, -0.2279715985, 0.1654792577, 0.0540962219, 0.1262381673, 0.3088741601, 0.1003507525, -0.2129189223, -0.3295907974, 0.1171258688, 0.3001697361, -0.3030857146, -0.2791535556, 0.3936850429, 0.2128654718, 0.0155664682, -0.2271836549, 0.36408934, 0.3236170411, 0.3887956738, -0.2514788806, -0.2520095408, 0.0765977874, 0.0299056992, -0.0827056989, 0.497821629, 0.327583313, 0.0998728126, 0.2096663117, 0.0794473961, -0.0956615582, 0.1966317743, -0.0840155855, -0.2941376567, 0.0035991631, 0.6603893042, 0.1717774272, 0.0049782768, -0.0732262433, 0.0308115669, -0.1909761429, -0.0409569182, 0.3082458675, 0.1975515187, 0.1833476424, -0.0998537987, 0.0441903919, -0.141041562, 0.6444203854, 0.2349772453, 0.1140372008, -0.4878852367, -0.3304451108, -0.6936563849, -0.0819300637, -0.2694930434, -0.1117673516, 0.1053628996, 0.2048395127, -0.0446274318, 0.0618333779, 0.1968584508, 0.0232924595, -0.183919996, -0.0317239389, -0.3047986627, 0.1097687334, -0.2589261532, 0.0314820632, -0.1542463005, -0.3109223247, 0.1440678984, 0.0020725466, 0.0330828354, -0.1179745793, -0.0353141651, 0.2205821276, 0.3118729889, 0.2911404371, 0.0490067676, 0.6657660604, 0.1145600528, -0.137476787, -0.3619859219, -0.14984034, -0.4374698102, 0.1409905106, -0.161232084, 0.6160258055, 0.0332117155, -0.1389368176, -0.3363067508, 0.5645502806, 0.0902393311, -0.3458335102, -0.0855588764, -0.0303032231, -0.1786025912, 0.230814144, -0.0440803356, 0.0040956717, 0.2179862559, 0.4543699622, -0.4882112145, -0.1645533741, 0.5545022488, -0.071817331, -0.2701317668, -0.1823329329, 0.157505542, -0.096259132, -0.1653825194, -0.7271356583, -0.0263309926, 0.2373393774, -0.1326826066, -0.2621172369, 0.2379524708, -0.1139859408, 0.1122613251, 0.0536023974, 0.2132701427, -0.336386174, -0.3369754255, -0.1634085923, -0.1936069727 ]
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.3484403491, 0.3749225438, -0.0223543961, 0.24240762, 0.2333745956, 0.0591794848, 0.2440308332, 0.4674772322, 0.2553082108, -0.1403686106, -0.0667247102, -0.0904458165, -0.3057557344, 0.1228695139, 0.0535940193, -0.0088574458, -0.0977111384, 0.0319081061, -0.1895279884, 0.0566940606, -0.1161627024, -0.0643235371, -0.1031744331, 0.015848089, -0.0917348638, -0.1198821515, 0.2069768012, 0.1899710149, -0.2297098637, -0.457949996, 0.29750669, 0.1518293619, 0.2854931951, 0.4001205862, -0.0001180434, 0.1198681295, 0.4619448781, -0.0878781825, -0.4845324755, -0.3111269176, -0.2444014847, -0.0946977735, 0.027989395, -0.1625522524, -0.1754536331, 0.3403496742, 0.1200166196, -0.3093126714, 0.2425988168, 0.4159029722, 0.1814553589, 0.4850331545, -0.0983782485, 0.141930759, 0.2775053084, 0.0405623019, -0.0977335125, 0.4429732561, 0.0883835629, -0.2895776033, -0.0681833029, 0.182724908, -0.1868140996, 0.2293162644, 0.2373237461, -0.0310596414, 0.0500490814, -0.1472803056, 0.0172667634, 0.3044556379, 0.2284756601, -0.4627506733, -0.2627745271, -0.1982949674, -0.0720932558, -0.6634257436, 0.3091946542, 0.2011434585, -0.2390185893, -0.1425317973, -0.5278378129, 0.0906219631, -0.0025055036, 0.1169955209, 0.1789864302, 0.4105426669, 0.2487376332, 0.1001005471, 0.1208607554, 0.0906595737, 0.1509336829, -0.2384597808, -0.1124072075, 0.2280859947, -0.5045989752, -0.1677162051, 0.1644723564, 0.1875033975, 0.0313852429, 0.3799574673, 0.1418698579, 0.0847265273, 0.0732121915, 0.0911260843, 0.2244704068, 0.1387258768, 0.1841383725, 0.2849822342, 0.3846352696, 0.1717725098, 0.2062672973, 0.1484001577, -0.071159035, -0.1690807939, 0.0967379361, 0.099563852, -0.0724150836, -0.3175652623, -0.550168097, 0.2802392542, 0.0591631085, -0.1087897271, 0.3846684694, 0.256890893, -0.2069444954, -0.369785428, 0.0991449952, 0.230772078, -0.2812793553, -0.0285788607, -0.1864867508, 0.217576921, -0.3917307556, -0.0531366616, 0.3407811821, -0.0546817929, 0.393103987, -0.1745660305, 0.0894258469, 0.2351036668, 0.1652140915, -0.2833359241, -0.372736454, 0.4511761069, 0.0721223354, -0.0609273314, 0.2574218214, -0.1946484149, -0.3575664163, -0.0453444421, -0.0227218345, -0.1541518122, -0.2694602013, 0.1336428076, -0.5319500566, -0.1265996099, -0.1047884673, -0.0980740786, 0.4659026265, -0.2218075693, 0.0720762163, -0.2355969995, -0.4272305369, -0.2113928944, 0.2053789496, 0.2566945255, -0.213631779, -0.0465421453, -0.2215105295, -0.0849397555, 0.3301587701, 0.2536371946, -0.1534427106, 0.2487069666, -0.2372033298, 0.1597364694, 0.4282442927, -0.0966892615, -0.3775050342, 0.0635769516, 0.0420480222, 0.0293669477, -0.0294795856, 0.1122543812, -0.0142481346, -0.0672747642, 0.190549314, 0.3296666145, -0.1435999423, -0.1567834616, -0.264084816, 0.0402005911, 0.4529902935, 0.3493310809, 0.2753324211, -0.1353899688, 0.0652285591, 0.1668529212, 0.1153825223, 0.0573681779, 0.0887689516, 0.1663027704, 0.1947502643, -0.0009250306, -0.3076636195, -0.1934029758, -0.4284851849, 0.2985519171, -0.4023675323, 0.3442188799, -0.0052061193, 0.1163649037, -0.274343729, -0.0884460658, -0.077978164, -0.0349811465, 0.0552480742, -0.0362684354, 0.1186362058, -0.1575818062, -0.121660307, 0.4596950114, -0.3044735789, 0.0306053422, -0.2032378465, 0.5589395165, -0.2494063824, -0.3483186066, 0.1816462576, 0.1678283811, -0.0748556927, -0.0887406841, -0.1464428008, 0.4584698677, 0.1846819818, -0.2115028799, 0.0676155388, 0.2728221416, 0.2086812109, 0.04574503, 0.1133399978, 0.3485707641, -0.0103808083, -0.1062241942, -0.2250294983, 0.5668247342, -0.1356492937, 0.1098726019, -0.0194808245, 0.1030008197, 0.1647879779, -0.1018058136, -0.1466486454, -0.0287137032, 0.5365939736, 0.1954438686, 0.2387120426, 0.0966352373, -0.3509837687, -0.1509942859, 0.5099390745, 0.0974254459, 0.0375006497, 0.3271869123, 0.1645046175, -0.220529303, 0.1525414437, 0.0362709165, 0.5619983673, 0.0448565073, -0.0008598464, 0.314771682, -0.3628349304, -0.0569822714, 0.0665312782, -0.1580661833, 0.3175255954, 0.3234210014, 0.0579751916, 0.0612477288, -0.3958382607, -0.2288501859, 0.1042925417, 0.4989688396, -0.2964096069, 0.0661740378, -0.3261884451, -0.1147773415, -0.0888151377, -0.1403395981, -0.5619572401, -0.2250493914, 0.0893957615, 0.3187949061, 0.0905731022, 0.3506727517, -0.485486716, -0.0084517896, 0.1274921149, -0.3142075241, -0.0129658207, -0.1558169425, -0.2733363807, 0.035525851, 0.7237205505, 0.0963542014, 0.3842615485, 0.0550473109, -0.2218771726, -0.0491373315, -0.3143677711, -0.0223676302, -0.2295468301, 0.3389603794, 0.3319759369, 0.1100180596, -0.1604090333, -0.2559393644, 0.2994100451, -0.0435469262, -0.1957681626, 0.1944875419, -0.0658887625, -0.0019957013, -0.1117209494, -0.0121068545, -0.1920268387, -0.2215815485, -0.1455160379, 0.197872445, 0.3210580051, 0.3196021318, 0.0293592885, 0.1503637731, 0.0955187976, -0.0287062749, -0.1796733439, -0.3023665249, 0.3549706936, 0.0689083636, -0.4053294659, -0.2147284448, -0.1006927341, 0.2305929959, 0.1018888354, -0.5546714067, 0.1395839602, -0.0337634385, 0.0982765332, 0.1617592424, -0.0188593473, 0.4739741981, -0.0388859846, 0.0560058206, -0.1978460699, -0.2456506789, 0.1355913281, 0.161682263, 0.6563413739, -0.0545417443, 0.4591040313, -0.1254960597, 0.5254042149, 0.2798561752, -0.1763413996, 0.3539974093, 0.2002418786, 0.2736521959, -0.1534941047, -0.2914326191, 0.2855211198, -0.0495390594, -0.1825989187, 0.0115917847, -0.0829058513, -0.2005024999, -0.1869343221, 0.358607471, -0.1521625966, -0.2032233328, 0.0759048313, -0.4192082882, 0.1117392182, 0.1238379031, 0.0417897105, -0.2293190658, -0.20974195, -0.0342518315, 0.3359268308, -0.0293545723, 0.034108188, -0.5879095197, -0.2072463036, -0.276188761, 0.3000999689, -0.022802677, 0.5082477927, -0.1271039099, -0.0221784115, 0.1022949219, -0.1911926717, 0.1879762113, -0.4306778908, 0.1604576409, 0.2485892475, 0.1959745884, -0.2174736857, -0.3243356049, -0.1971811205, 0.0899367556, 0.3619163632, 0.2390436083, -0.4133503139, -0.179563269, 0.3076111674, -0.1772216856, -0.0317562371, -0.2116954178, -0.5768936872, -0.311981976, -0.245536834, 0.1072794199, -0.1011517569, 0.3095968366, -0.0959006846, 0.2520930469, 0.1111569703, 0.1200236455, 0.3118345141, -0.0258774757, 0.1249617487, 0.2003540397, 0.2429252714, -0.2824966311, -0.030498758, 0.137251094, 0.4655223489, -0.0030380934, 0.1497276425, 0.2462177277, 0.1032720953, 0.0787182748, 0.1354251504, 0.1089804545, 0.0048271678, 0.294267863, 0.108022444, -0.1681434661, 0.2124031633, 0.1513140947, -0.0376337878, -0.2570493817, -0.4218551517, 0.3839823604, 0.0938769579, 0.0786314756, 0.5386756063, -0.1991009414, -0.2274919152, 0.1776129156, 0.428957969, 0.7838948965, -0.0462474339, 0.050590083, 0.2714208961, -0.3885198534, 0.1734308302, -0.1278076619, 0.2138845325, -0.4140079021, -0.2300035954, -0.1147607416, -0.2370069474, 0.28671965, 0.070919022, 0.0210514143, 0.2501483858, 0.0637671202, 0.2134828269, 0.0473113209, 0.3004755974, -0.2035630196, -0.0009062588, -0.2438041568, 0.1599235535, -0.2949707508, 0.3841910362, -0.1827705503, -0.1416790783, -0.2252997458, -0.2297965437, -0.5931193233, 0.0420735478, -0.0345498174, 0.1219113618, 0.1612068117, -0.2970358133, 0.2536327243, -0.0125446282, 0.305242151, 0.2149484903, -0.2189767957, 0.0320768841, 0.1596263945, 0.0632778779, 0.1346660703, 0.0577453263, 0.3857585192, -0.2114267945, -0.2823188007, -0.0503005497, -0.0693830103, -0.5146650076, 0.2868446112, -0.172350049, 0.0800503567, -0.0621819049, -0.0836493075, 0.0139850341, 0.0304549932, -0.1959531009, 0.1261597127, 0.066935055, -0.0748332739, 0.2518910766, -0.1257235557, -0.1455216855, -0.1935206056, 0.3756965697, 0.1373261213, 0.0165089369, 0.4529258609, 0.2720405757, -0.1528951377, -0.2304186821, -0.1056394428, 0.1786425114, 0.024784863, -0.0148171596, -0.1295320988, -0.0842393562, -0.1829862595, 0.1187393963, 0.2865359187, 0.0998412818, 0.292729944, -0.5119156837, -0.5008378029, 0.2192029208, -0.1976205409, 0.1925923079, -0.4042054415, 0.3515563011, -0.0026993304, 0.0052043647, -0.2980505824, -0.1789055467, -0.4618514776, 0.11093615, 0.0729262531, -0.2021179497, -0.0560514852, -0.1882606, 0.1196747199, -0.1352256685, -0.3918651938, -0.1660433561, -0.1048927829, 0.1586327404, 0.0088000949, -0.3563886881, 0.1701892018, -0.14885059, -0.2751868963, -0.0155989137, -0.2245162427, 0.0084069669, -0.0516109131, 0.1526713669, 0.2826907039, -0.0229276754, 0.0159273073, -0.1590152681, -0.173877731, 0.0574290752, 0.0226222984, 0.1775000095, 0.1828508079, 0.0482547283, -0.2104069889, 0.1155915633, -0.1032030731, 0.0354530327, 0.2705408633, -0.3210695982, -0.11032518, -0.0056249239, 0.470459491, 0.5312495232, -0.1288328618, -0.1956438422, 0.2631398141, 0.1443776339, -0.4927861691, 0.0960754231, 0.1032333821, 0.0822243392, -0.055196397, 0.134591043, 0.1972728819, 0.2342777252, 0.0172123108, 0.1755636632, 0.1643554866, -0.2493072152, 0.0796923563, 0.3898659348, -0.0801885203, -0.0386280641, 0.376491636, -0.1423220932, -0.012670923, -0.0343077667, 0.1067915261, 0.2860954702, -0.1919638216, 0.0537920445, -0.4108019471, -0.4486486018, -0.1012231559, 0.3432514071, 0.0036117211, -0.0192608386, -0.0278015696, 0.2828312218, -0.1828963161, -0.0578760728, -0.2266145051, 0.1052784249, 0.0238646343, -0.0718206987, -0.4027288556, -0.1296693981, -0.2279715985, 0.1654792577, 0.0540962219, 0.1262381673, 0.3088741601, 0.1003507525, -0.2129189223, -0.3295907974, 0.1171258688, 0.3001697361, -0.3030857146, -0.2791535556, 0.3936850429, 0.2128654718, 0.0155664682, -0.2271836549, 0.36408934, 0.3236170411, 0.3887956738, -0.2514788806, -0.2520095408, 0.0765977874, 0.0299056992, -0.0827056989, 0.497821629, 0.327583313, 0.0998728126, 0.2096663117, 0.0794473961, -0.0956615582, 0.1966317743, -0.0840155855, -0.2941376567, 0.0035991631, 0.6603893042, 0.1717774272, 0.0049782768, -0.0732262433, 0.0308115669, -0.1909761429, -0.0409569182, 0.3082458675, 0.1975515187, 0.1833476424, -0.0998537987, 0.0441903919, -0.141041562, 0.6444203854, 0.2349772453, 0.1140372008, -0.4878852367, -0.3304451108, -0.6936563849, -0.0819300637, -0.2694930434, -0.1117673516, 0.1053628996, 0.2048395127, -0.0446274318, 0.0618333779, 0.1968584508, 0.0232924595, -0.183919996, -0.0317239389, -0.3047986627, 0.1097687334, -0.2589261532, 0.0314820632, -0.1542463005, -0.3109223247, 0.1440678984, 0.0020725466, 0.0330828354, -0.1179745793, -0.0353141651, 0.2205821276, 0.3118729889, 0.2911404371, 0.0490067676, 0.6657660604, 0.1145600528, -0.137476787, -0.3619859219, -0.14984034, -0.4374698102, 0.1409905106, -0.161232084, 0.6160258055, 0.0332117155, -0.1389368176, -0.3363067508, 0.5645502806, 0.0902393311, -0.3458335102, -0.0855588764, -0.0303032231, -0.1786025912, 0.230814144, -0.0440803356, 0.0040956717, 0.2179862559, 0.4543699622, -0.4882112145, -0.1645533741, 0.5545022488, -0.071817331, -0.2701317668, -0.1823329329, 0.157505542, -0.096259132, -0.1653825194, -0.7271356583, -0.0263309926, 0.2373393774, -0.1326826066, -0.2621172369, 0.2379524708, -0.1139859408, 0.1122613251, 0.0536023974, 0.2132701427, -0.336386174, -0.3369754255, -0.1634085923, -0.1936069727 ]
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.3484403491, 0.3749225438, -0.0223543961, 0.24240762, 0.2333745956, 0.0591794848, 0.2440308332, 0.4674772322, 0.2553082108, -0.1403686106, -0.0667247102, -0.0904458165, -0.3057557344, 0.1228695139, 0.0535940193, -0.0088574458, -0.0977111384, 0.0319081061, -0.1895279884, 0.0566940606, -0.1161627024, -0.0643235371, -0.1031744331, 0.015848089, -0.0917348638, -0.1198821515, 0.2069768012, 0.1899710149, -0.2297098637, -0.457949996, 0.29750669, 0.1518293619, 0.2854931951, 0.4001205862, -0.0001180434, 0.1198681295, 0.4619448781, -0.0878781825, -0.4845324755, -0.3111269176, -0.2444014847, -0.0946977735, 0.027989395, -0.1625522524, -0.1754536331, 0.3403496742, 0.1200166196, -0.3093126714, 0.2425988168, 0.4159029722, 0.1814553589, 0.4850331545, -0.0983782485, 0.141930759, 0.2775053084, 0.0405623019, -0.0977335125, 0.4429732561, 0.0883835629, -0.2895776033, -0.0681833029, 0.182724908, -0.1868140996, 0.2293162644, 0.2373237461, -0.0310596414, 0.0500490814, -0.1472803056, 0.0172667634, 0.3044556379, 0.2284756601, -0.4627506733, -0.2627745271, -0.1982949674, -0.0720932558, -0.6634257436, 0.3091946542, 0.2011434585, -0.2390185893, -0.1425317973, -0.5278378129, 0.0906219631, -0.0025055036, 0.1169955209, 0.1789864302, 0.4105426669, 0.2487376332, 0.1001005471, 0.1208607554, 0.0906595737, 0.1509336829, -0.2384597808, -0.1124072075, 0.2280859947, -0.5045989752, -0.1677162051, 0.1644723564, 0.1875033975, 0.0313852429, 0.3799574673, 0.1418698579, 0.0847265273, 0.0732121915, 0.0911260843, 0.2244704068, 0.1387258768, 0.1841383725, 0.2849822342, 0.3846352696, 0.1717725098, 0.2062672973, 0.1484001577, -0.071159035, -0.1690807939, 0.0967379361, 0.099563852, -0.0724150836, -0.3175652623, -0.550168097, 0.2802392542, 0.0591631085, -0.1087897271, 0.3846684694, 0.256890893, -0.2069444954, -0.369785428, 0.0991449952, 0.230772078, -0.2812793553, -0.0285788607, -0.1864867508, 0.217576921, -0.3917307556, -0.0531366616, 0.3407811821, -0.0546817929, 0.393103987, -0.1745660305, 0.0894258469, 0.2351036668, 0.1652140915, -0.2833359241, -0.372736454, 0.4511761069, 0.0721223354, -0.0609273314, 0.2574218214, -0.1946484149, -0.3575664163, -0.0453444421, -0.0227218345, -0.1541518122, -0.2694602013, 0.1336428076, -0.5319500566, -0.1265996099, -0.1047884673, -0.0980740786, 0.4659026265, -0.2218075693, 0.0720762163, -0.2355969995, -0.4272305369, -0.2113928944, 0.2053789496, 0.2566945255, -0.213631779, -0.0465421453, -0.2215105295, -0.0849397555, 0.3301587701, 0.2536371946, -0.1534427106, 0.2487069666, -0.2372033298, 0.1597364694, 0.4282442927, -0.0966892615, -0.3775050342, 0.0635769516, 0.0420480222, 0.0293669477, -0.0294795856, 0.1122543812, -0.0142481346, -0.0672747642, 0.190549314, 0.3296666145, -0.1435999423, -0.1567834616, -0.264084816, 0.0402005911, 0.4529902935, 0.3493310809, 0.2753324211, -0.1353899688, 0.0652285591, 0.1668529212, 0.1153825223, 0.0573681779, 0.0887689516, 0.1663027704, 0.1947502643, -0.0009250306, -0.3076636195, -0.1934029758, -0.4284851849, 0.2985519171, -0.4023675323, 0.3442188799, -0.0052061193, 0.1163649037, -0.274343729, -0.0884460658, -0.077978164, -0.0349811465, 0.0552480742, -0.0362684354, 0.1186362058, -0.1575818062, -0.121660307, 0.4596950114, -0.3044735789, 0.0306053422, -0.2032378465, 0.5589395165, -0.2494063824, -0.3483186066, 0.1816462576, 0.1678283811, -0.0748556927, -0.0887406841, -0.1464428008, 0.4584698677, 0.1846819818, -0.2115028799, 0.0676155388, 0.2728221416, 0.2086812109, 0.04574503, 0.1133399978, 0.3485707641, -0.0103808083, -0.1062241942, -0.2250294983, 0.5668247342, -0.1356492937, 0.1098726019, -0.0194808245, 0.1030008197, 0.1647879779, -0.1018058136, -0.1466486454, -0.0287137032, 0.5365939736, 0.1954438686, 0.2387120426, 0.0966352373, -0.3509837687, -0.1509942859, 0.5099390745, 0.0974254459, 0.0375006497, 0.3271869123, 0.1645046175, -0.220529303, 0.1525414437, 0.0362709165, 0.5619983673, 0.0448565073, -0.0008598464, 0.314771682, -0.3628349304, -0.0569822714, 0.0665312782, -0.1580661833, 0.3175255954, 0.3234210014, 0.0579751916, 0.0612477288, -0.3958382607, -0.2288501859, 0.1042925417, 0.4989688396, -0.2964096069, 0.0661740378, -0.3261884451, -0.1147773415, -0.0888151377, -0.1403395981, -0.5619572401, -0.2250493914, 0.0893957615, 0.3187949061, 0.0905731022, 0.3506727517, -0.485486716, -0.0084517896, 0.1274921149, -0.3142075241, -0.0129658207, -0.1558169425, -0.2733363807, 0.035525851, 0.7237205505, 0.0963542014, 0.3842615485, 0.0550473109, -0.2218771726, -0.0491373315, -0.3143677711, -0.0223676302, -0.2295468301, 0.3389603794, 0.3319759369, 0.1100180596, -0.1604090333, -0.2559393644, 0.2994100451, -0.0435469262, -0.1957681626, 0.1944875419, -0.0658887625, -0.0019957013, -0.1117209494, -0.0121068545, -0.1920268387, -0.2215815485, -0.1455160379, 0.197872445, 0.3210580051, 0.3196021318, 0.0293592885, 0.1503637731, 0.0955187976, -0.0287062749, -0.1796733439, -0.3023665249, 0.3549706936, 0.0689083636, -0.4053294659, -0.2147284448, -0.1006927341, 0.2305929959, 0.1018888354, -0.5546714067, 0.1395839602, -0.0337634385, 0.0982765332, 0.1617592424, -0.0188593473, 0.4739741981, -0.0388859846, 0.0560058206, -0.1978460699, -0.2456506789, 0.1355913281, 0.161682263, 0.6563413739, -0.0545417443, 0.4591040313, -0.1254960597, 0.5254042149, 0.2798561752, -0.1763413996, 0.3539974093, 0.2002418786, 0.2736521959, -0.1534941047, -0.2914326191, 0.2855211198, -0.0495390594, -0.1825989187, 0.0115917847, -0.0829058513, -0.2005024999, -0.1869343221, 0.358607471, -0.1521625966, -0.2032233328, 0.0759048313, -0.4192082882, 0.1117392182, 0.1238379031, 0.0417897105, -0.2293190658, -0.20974195, -0.0342518315, 0.3359268308, -0.0293545723, 0.034108188, -0.5879095197, -0.2072463036, -0.276188761, 0.3000999689, -0.022802677, 0.5082477927, -0.1271039099, -0.0221784115, 0.1022949219, -0.1911926717, 0.1879762113, -0.4306778908, 0.1604576409, 0.2485892475, 0.1959745884, -0.2174736857, -0.3243356049, -0.1971811205, 0.0899367556, 0.3619163632, 0.2390436083, -0.4133503139, -0.179563269, 0.3076111674, -0.1772216856, -0.0317562371, -0.2116954178, -0.5768936872, -0.311981976, -0.245536834, 0.1072794199, -0.1011517569, 0.3095968366, -0.0959006846, 0.2520930469, 0.1111569703, 0.1200236455, 0.3118345141, -0.0258774757, 0.1249617487, 0.2003540397, 0.2429252714, -0.2824966311, -0.030498758, 0.137251094, 0.4655223489, -0.0030380934, 0.1497276425, 0.2462177277, 0.1032720953, 0.0787182748, 0.1354251504, 0.1089804545, 0.0048271678, 0.294267863, 0.108022444, -0.1681434661, 0.2124031633, 0.1513140947, -0.0376337878, -0.2570493817, -0.4218551517, 0.3839823604, 0.0938769579, 0.0786314756, 0.5386756063, -0.1991009414, -0.2274919152, 0.1776129156, 0.428957969, 0.7838948965, -0.0462474339, 0.050590083, 0.2714208961, -0.3885198534, 0.1734308302, -0.1278076619, 0.2138845325, -0.4140079021, -0.2300035954, -0.1147607416, -0.2370069474, 0.28671965, 0.070919022, 0.0210514143, 0.2501483858, 0.0637671202, 0.2134828269, 0.0473113209, 0.3004755974, -0.2035630196, -0.0009062588, -0.2438041568, 0.1599235535, -0.2949707508, 0.3841910362, -0.1827705503, -0.1416790783, -0.2252997458, -0.2297965437, -0.5931193233, 0.0420735478, -0.0345498174, 0.1219113618, 0.1612068117, -0.2970358133, 0.2536327243, -0.0125446282, 0.305242151, 0.2149484903, -0.2189767957, 0.0320768841, 0.1596263945, 0.0632778779, 0.1346660703, 0.0577453263, 0.3857585192, -0.2114267945, -0.2823188007, -0.0503005497, -0.0693830103, -0.5146650076, 0.2868446112, -0.172350049, 0.0800503567, -0.0621819049, -0.0836493075, 0.0139850341, 0.0304549932, -0.1959531009, 0.1261597127, 0.066935055, -0.0748332739, 0.2518910766, -0.1257235557, -0.1455216855, -0.1935206056, 0.3756965697, 0.1373261213, 0.0165089369, 0.4529258609, 0.2720405757, -0.1528951377, -0.2304186821, -0.1056394428, 0.1786425114, 0.024784863, -0.0148171596, -0.1295320988, -0.0842393562, -0.1829862595, 0.1187393963, 0.2865359187, 0.0998412818, 0.292729944, -0.5119156837, -0.5008378029, 0.2192029208, -0.1976205409, 0.1925923079, -0.4042054415, 0.3515563011, -0.0026993304, 0.0052043647, -0.2980505824, -0.1789055467, -0.4618514776, 0.11093615, 0.0729262531, -0.2021179497, -0.0560514852, -0.1882606, 0.1196747199, -0.1352256685, -0.3918651938, -0.1660433561, -0.1048927829, 0.1586327404, 0.0088000949, -0.3563886881, 0.1701892018, -0.14885059, -0.2751868963, -0.0155989137, -0.2245162427, 0.0084069669, -0.0516109131, 0.1526713669, 0.2826907039, -0.0229276754, 0.0159273073, -0.1590152681, -0.173877731, 0.0574290752, 0.0226222984, 0.1775000095, 0.1828508079, 0.0482547283, -0.2104069889, 0.1155915633, -0.1032030731, 0.0354530327, 0.2705408633, -0.3210695982, -0.11032518, -0.0056249239, 0.470459491, 0.5312495232, -0.1288328618, -0.1956438422, 0.2631398141, 0.1443776339, -0.4927861691, 0.0960754231, 0.1032333821, 0.0822243392, -0.055196397, 0.134591043, 0.1972728819, 0.2342777252, 0.0172123108, 0.1755636632, 0.1643554866, -0.2493072152, 0.0796923563, 0.3898659348, -0.0801885203, -0.0386280641, 0.376491636, -0.1423220932, -0.012670923, -0.0343077667, 0.1067915261, 0.2860954702, -0.1919638216, 0.0537920445, -0.4108019471, -0.4486486018, -0.1012231559, 0.3432514071, 0.0036117211, -0.0192608386, -0.0278015696, 0.2828312218, -0.1828963161, -0.0578760728, -0.2266145051, 0.1052784249, 0.0238646343, -0.0718206987, -0.4027288556, -0.1296693981, -0.2279715985, 0.1654792577, 0.0540962219, 0.1262381673, 0.3088741601, 0.1003507525, -0.2129189223, -0.3295907974, 0.1171258688, 0.3001697361, -0.3030857146, -0.2791535556, 0.3936850429, 0.2128654718, 0.0155664682, -0.2271836549, 0.36408934, 0.3236170411, 0.3887956738, -0.2514788806, -0.2520095408, 0.0765977874, 0.0299056992, -0.0827056989, 0.497821629, 0.327583313, 0.0998728126, 0.2096663117, 0.0794473961, -0.0956615582, 0.1966317743, -0.0840155855, -0.2941376567, 0.0035991631, 0.6603893042, 0.1717774272, 0.0049782768, -0.0732262433, 0.0308115669, -0.1909761429, -0.0409569182, 0.3082458675, 0.1975515187, 0.1833476424, -0.0998537987, 0.0441903919, -0.141041562, 0.6444203854, 0.2349772453, 0.1140372008, -0.4878852367, -0.3304451108, -0.6936563849, -0.0819300637, -0.2694930434, -0.1117673516, 0.1053628996, 0.2048395127, -0.0446274318, 0.0618333779, 0.1968584508, 0.0232924595, -0.183919996, -0.0317239389, -0.3047986627, 0.1097687334, -0.2589261532, 0.0314820632, -0.1542463005, -0.3109223247, 0.1440678984, 0.0020725466, 0.0330828354, -0.1179745793, -0.0353141651, 0.2205821276, 0.3118729889, 0.2911404371, 0.0490067676, 0.6657660604, 0.1145600528, -0.137476787, -0.3619859219, -0.14984034, -0.4374698102, 0.1409905106, -0.161232084, 0.6160258055, 0.0332117155, -0.1389368176, -0.3363067508, 0.5645502806, 0.0902393311, -0.3458335102, -0.0855588764, -0.0303032231, -0.1786025912, 0.230814144, -0.0440803356, 0.0040956717, 0.2179862559, 0.4543699622, -0.4882112145, -0.1645533741, 0.5545022488, -0.071817331, -0.2701317668, -0.1823329329, 0.157505542, -0.096259132, -0.1653825194, -0.7271356583, -0.0263309926, 0.2373393774, -0.1326826066, -0.2621172369, 0.2379524708, -0.1139859408, 0.1122613251, 0.0536023974, 0.2132701427, -0.336386174, -0.3369754255, -0.1634085923, -0.1936069727 ]
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.3484403491, 0.3749225438, -0.0223543961, 0.24240762, 0.2333745956, 0.0591794848, 0.2440308332, 0.4674772322, 0.2553082108, -0.1403686106, -0.0667247102, -0.0904458165, -0.3057557344, 0.1228695139, 0.0535940193, -0.0088574458, -0.0977111384, 0.0319081061, -0.1895279884, 0.0566940606, -0.1161627024, -0.0643235371, -0.1031744331, 0.015848089, -0.0917348638, -0.1198821515, 0.2069768012, 0.1899710149, -0.2297098637, -0.457949996, 0.29750669, 0.1518293619, 0.2854931951, 0.4001205862, -0.0001180434, 0.1198681295, 0.4619448781, -0.0878781825, -0.4845324755, -0.3111269176, -0.2444014847, -0.0946977735, 0.027989395, -0.1625522524, -0.1754536331, 0.3403496742, 0.1200166196, -0.3093126714, 0.2425988168, 0.4159029722, 0.1814553589, 0.4850331545, -0.0983782485, 0.141930759, 0.2775053084, 0.0405623019, -0.0977335125, 0.4429732561, 0.0883835629, -0.2895776033, -0.0681833029, 0.182724908, -0.1868140996, 0.2293162644, 0.2373237461, -0.0310596414, 0.0500490814, -0.1472803056, 0.0172667634, 0.3044556379, 0.2284756601, -0.4627506733, -0.2627745271, -0.1982949674, -0.0720932558, -0.6634257436, 0.3091946542, 0.2011434585, -0.2390185893, -0.1425317973, -0.5278378129, 0.0906219631, -0.0025055036, 0.1169955209, 0.1789864302, 0.4105426669, 0.2487376332, 0.1001005471, 0.1208607554, 0.0906595737, 0.1509336829, -0.2384597808, -0.1124072075, 0.2280859947, -0.5045989752, -0.1677162051, 0.1644723564, 0.1875033975, 0.0313852429, 0.3799574673, 0.1418698579, 0.0847265273, 0.0732121915, 0.0911260843, 0.2244704068, 0.1387258768, 0.1841383725, 0.2849822342, 0.3846352696, 0.1717725098, 0.2062672973, 0.1484001577, -0.071159035, -0.1690807939, 0.0967379361, 0.099563852, -0.0724150836, -0.3175652623, -0.550168097, 0.2802392542, 0.0591631085, -0.1087897271, 0.3846684694, 0.256890893, -0.2069444954, -0.369785428, 0.0991449952, 0.230772078, -0.2812793553, -0.0285788607, -0.1864867508, 0.217576921, -0.3917307556, -0.0531366616, 0.3407811821, -0.0546817929, 0.393103987, -0.1745660305, 0.0894258469, 0.2351036668, 0.1652140915, -0.2833359241, -0.372736454, 0.4511761069, 0.0721223354, -0.0609273314, 0.2574218214, -0.1946484149, -0.3575664163, -0.0453444421, -0.0227218345, -0.1541518122, -0.2694602013, 0.1336428076, -0.5319500566, -0.1265996099, -0.1047884673, -0.0980740786, 0.4659026265, -0.2218075693, 0.0720762163, -0.2355969995, -0.4272305369, -0.2113928944, 0.2053789496, 0.2566945255, -0.213631779, -0.0465421453, -0.2215105295, -0.0849397555, 0.3301587701, 0.2536371946, -0.1534427106, 0.2487069666, -0.2372033298, 0.1597364694, 0.4282442927, -0.0966892615, -0.3775050342, 0.0635769516, 0.0420480222, 0.0293669477, -0.0294795856, 0.1122543812, -0.0142481346, -0.0672747642, 0.190549314, 0.3296666145, -0.1435999423, -0.1567834616, -0.264084816, 0.0402005911, 0.4529902935, 0.3493310809, 0.2753324211, -0.1353899688, 0.0652285591, 0.1668529212, 0.1153825223, 0.0573681779, 0.0887689516, 0.1663027704, 0.1947502643, -0.0009250306, -0.3076636195, -0.1934029758, -0.4284851849, 0.2985519171, -0.4023675323, 0.3442188799, -0.0052061193, 0.1163649037, -0.274343729, -0.0884460658, -0.077978164, -0.0349811465, 0.0552480742, -0.0362684354, 0.1186362058, -0.1575818062, -0.121660307, 0.4596950114, -0.3044735789, 0.0306053422, -0.2032378465, 0.5589395165, -0.2494063824, -0.3483186066, 0.1816462576, 0.1678283811, -0.0748556927, -0.0887406841, -0.1464428008, 0.4584698677, 0.1846819818, -0.2115028799, 0.0676155388, 0.2728221416, 0.2086812109, 0.04574503, 0.1133399978, 0.3485707641, -0.0103808083, -0.1062241942, -0.2250294983, 0.5668247342, -0.1356492937, 0.1098726019, -0.0194808245, 0.1030008197, 0.1647879779, -0.1018058136, -0.1466486454, -0.0287137032, 0.5365939736, 0.1954438686, 0.2387120426, 0.0966352373, -0.3509837687, -0.1509942859, 0.5099390745, 0.0974254459, 0.0375006497, 0.3271869123, 0.1645046175, -0.220529303, 0.1525414437, 0.0362709165, 0.5619983673, 0.0448565073, -0.0008598464, 0.314771682, -0.3628349304, -0.0569822714, 0.0665312782, -0.1580661833, 0.3175255954, 0.3234210014, 0.0579751916, 0.0612477288, -0.3958382607, -0.2288501859, 0.1042925417, 0.4989688396, -0.2964096069, 0.0661740378, -0.3261884451, -0.1147773415, -0.0888151377, -0.1403395981, -0.5619572401, -0.2250493914, 0.0893957615, 0.3187949061, 0.0905731022, 0.3506727517, -0.485486716, -0.0084517896, 0.1274921149, -0.3142075241, -0.0129658207, -0.1558169425, -0.2733363807, 0.035525851, 0.7237205505, 0.0963542014, 0.3842615485, 0.0550473109, -0.2218771726, -0.0491373315, -0.3143677711, -0.0223676302, -0.2295468301, 0.3389603794, 0.3319759369, 0.1100180596, -0.1604090333, -0.2559393644, 0.2994100451, -0.0435469262, -0.1957681626, 0.1944875419, -0.0658887625, -0.0019957013, -0.1117209494, -0.0121068545, -0.1920268387, -0.2215815485, -0.1455160379, 0.197872445, 0.3210580051, 0.3196021318, 0.0293592885, 0.1503637731, 0.0955187976, -0.0287062749, -0.1796733439, -0.3023665249, 0.3549706936, 0.0689083636, -0.4053294659, -0.2147284448, -0.1006927341, 0.2305929959, 0.1018888354, -0.5546714067, 0.1395839602, -0.0337634385, 0.0982765332, 0.1617592424, -0.0188593473, 0.4739741981, -0.0388859846, 0.0560058206, -0.1978460699, -0.2456506789, 0.1355913281, 0.161682263, 0.6563413739, -0.0545417443, 0.4591040313, -0.1254960597, 0.5254042149, 0.2798561752, -0.1763413996, 0.3539974093, 0.2002418786, 0.2736521959, -0.1534941047, -0.2914326191, 0.2855211198, -0.0495390594, -0.1825989187, 0.0115917847, -0.0829058513, -0.2005024999, -0.1869343221, 0.358607471, -0.1521625966, -0.2032233328, 0.0759048313, -0.4192082882, 0.1117392182, 0.1238379031, 0.0417897105, -0.2293190658, -0.20974195, -0.0342518315, 0.3359268308, -0.0293545723, 0.034108188, -0.5879095197, -0.2072463036, -0.276188761, 0.3000999689, -0.022802677, 0.5082477927, -0.1271039099, -0.0221784115, 0.1022949219, -0.1911926717, 0.1879762113, -0.4306778908, 0.1604576409, 0.2485892475, 0.1959745884, -0.2174736857, -0.3243356049, -0.1971811205, 0.0899367556, 0.3619163632, 0.2390436083, -0.4133503139, -0.179563269, 0.3076111674, -0.1772216856, -0.0317562371, -0.2116954178, -0.5768936872, -0.311981976, -0.245536834, 0.1072794199, -0.1011517569, 0.3095968366, -0.0959006846, 0.2520930469, 0.1111569703, 0.1200236455, 0.3118345141, -0.0258774757, 0.1249617487, 0.2003540397, 0.2429252714, -0.2824966311, -0.030498758, 0.137251094, 0.4655223489, -0.0030380934, 0.1497276425, 0.2462177277, 0.1032720953, 0.0787182748, 0.1354251504, 0.1089804545, 0.0048271678, 0.294267863, 0.108022444, -0.1681434661, 0.2124031633, 0.1513140947, -0.0376337878, -0.2570493817, -0.4218551517, 0.3839823604, 0.0938769579, 0.0786314756, 0.5386756063, -0.1991009414, -0.2274919152, 0.1776129156, 0.428957969, 0.7838948965, -0.0462474339, 0.050590083, 0.2714208961, -0.3885198534, 0.1734308302, -0.1278076619, 0.2138845325, -0.4140079021, -0.2300035954, -0.1147607416, -0.2370069474, 0.28671965, 0.070919022, 0.0210514143, 0.2501483858, 0.0637671202, 0.2134828269, 0.0473113209, 0.3004755974, -0.2035630196, -0.0009062588, -0.2438041568, 0.1599235535, -0.2949707508, 0.3841910362, -0.1827705503, -0.1416790783, -0.2252997458, -0.2297965437, -0.5931193233, 0.0420735478, -0.0345498174, 0.1219113618, 0.1612068117, -0.2970358133, 0.2536327243, -0.0125446282, 0.305242151, 0.2149484903, -0.2189767957, 0.0320768841, 0.1596263945, 0.0632778779, 0.1346660703, 0.0577453263, 0.3857585192, -0.2114267945, -0.2823188007, -0.0503005497, -0.0693830103, -0.5146650076, 0.2868446112, -0.172350049, 0.0800503567, -0.0621819049, -0.0836493075, 0.0139850341, 0.0304549932, -0.1959531009, 0.1261597127, 0.066935055, -0.0748332739, 0.2518910766, -0.1257235557, -0.1455216855, -0.1935206056, 0.3756965697, 0.1373261213, 0.0165089369, 0.4529258609, 0.2720405757, -0.1528951377, -0.2304186821, -0.1056394428, 0.1786425114, 0.024784863, -0.0148171596, -0.1295320988, -0.0842393562, -0.1829862595, 0.1187393963, 0.2865359187, 0.0998412818, 0.292729944, -0.5119156837, -0.5008378029, 0.2192029208, -0.1976205409, 0.1925923079, -0.4042054415, 0.3515563011, -0.0026993304, 0.0052043647, -0.2980505824, -0.1789055467, -0.4618514776, 0.11093615, 0.0729262531, -0.2021179497, -0.0560514852, -0.1882606, 0.1196747199, -0.1352256685, -0.3918651938, -0.1660433561, -0.1048927829, 0.1586327404, 0.0088000949, -0.3563886881, 0.1701892018, -0.14885059, -0.2751868963, -0.0155989137, -0.2245162427, 0.0084069669, -0.0516109131, 0.1526713669, 0.2826907039, -0.0229276754, 0.0159273073, -0.1590152681, -0.173877731, 0.0574290752, 0.0226222984, 0.1775000095, 0.1828508079, 0.0482547283, -0.2104069889, 0.1155915633, -0.1032030731, 0.0354530327, 0.2705408633, -0.3210695982, -0.11032518, -0.0056249239, 0.470459491, 0.5312495232, -0.1288328618, -0.1956438422, 0.2631398141, 0.1443776339, -0.4927861691, 0.0960754231, 0.1032333821, 0.0822243392, -0.055196397, 0.134591043, 0.1972728819, 0.2342777252, 0.0172123108, 0.1755636632, 0.1643554866, -0.2493072152, 0.0796923563, 0.3898659348, -0.0801885203, -0.0386280641, 0.376491636, -0.1423220932, -0.012670923, -0.0343077667, 0.1067915261, 0.2860954702, -0.1919638216, 0.0537920445, -0.4108019471, -0.4486486018, -0.1012231559, 0.3432514071, 0.0036117211, -0.0192608386, -0.0278015696, 0.2828312218, -0.1828963161, -0.0578760728, -0.2266145051, 0.1052784249, 0.0238646343, -0.0718206987, -0.4027288556, -0.1296693981, -0.2279715985, 0.1654792577, 0.0540962219, 0.1262381673, 0.3088741601, 0.1003507525, -0.2129189223, -0.3295907974, 0.1171258688, 0.3001697361, -0.3030857146, -0.2791535556, 0.3936850429, 0.2128654718, 0.0155664682, -0.2271836549, 0.36408934, 0.3236170411, 0.3887956738, -0.2514788806, -0.2520095408, 0.0765977874, 0.0299056992, -0.0827056989, 0.497821629, 0.327583313, 0.0998728126, 0.2096663117, 0.0794473961, -0.0956615582, 0.1966317743, -0.0840155855, -0.2941376567, 0.0035991631, 0.6603893042, 0.1717774272, 0.0049782768, -0.0732262433, 0.0308115669, -0.1909761429, -0.0409569182, 0.3082458675, 0.1975515187, 0.1833476424, -0.0998537987, 0.0441903919, -0.141041562, 0.6444203854, 0.2349772453, 0.1140372008, -0.4878852367, -0.3304451108, -0.6936563849, -0.0819300637, -0.2694930434, -0.1117673516, 0.1053628996, 0.2048395127, -0.0446274318, 0.0618333779, 0.1968584508, 0.0232924595, -0.183919996, -0.0317239389, -0.3047986627, 0.1097687334, -0.2589261532, 0.0314820632, -0.1542463005, -0.3109223247, 0.1440678984, 0.0020725466, 0.0330828354, -0.1179745793, -0.0353141651, 0.2205821276, 0.3118729889, 0.2911404371, 0.0490067676, 0.6657660604, 0.1145600528, -0.137476787, -0.3619859219, -0.14984034, -0.4374698102, 0.1409905106, -0.161232084, 0.6160258055, 0.0332117155, -0.1389368176, -0.3363067508, 0.5645502806, 0.0902393311, -0.3458335102, -0.0855588764, -0.0303032231, -0.1786025912, 0.230814144, -0.0440803356, 0.0040956717, 0.2179862559, 0.4543699622, -0.4882112145, -0.1645533741, 0.5545022488, -0.071817331, -0.2701317668, -0.1823329329, 0.157505542, -0.096259132, -0.1653825194, -0.7271356583, -0.0263309926, 0.2373393774, -0.1326826066, -0.2621172369, 0.2379524708, -0.1139859408, 0.1122613251, 0.0536023974, 0.2132701427, -0.336386174, -0.3369754255, -0.1634085923, -0.1936069727 ]
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.2925508916, 0.128772229, -0.1103174537, 0.2530120909, 0.1547409445, 0.0697497129, 0.3828648925, 0.4221462309, -0.0766396672, -0.0494418442, -0.1751877367, 0.4431258142, -0.2499774396, -0.0311815739, -0.0670694858, -0.4052228332, -0.0786969811, 0.3645732999, 0.0530650318, 0.1719868779, -0.1775274873, 0.3013063967, -0.2915244102, 0.1099652201, 0.003213089, -0.3575333059, -0.039383851, -0.0953137875, -0.2738589644, -0.6101930141, 0.2050486356, 0.0413202606, 0.1457609087, 0.1917884499, -0.0001070091, -0.1000375822, 0.3466987014, 0.1209744811, -0.459977448, -0.1070155054, -0.3484742045, -0.1636981666, 0.1541843265, -0.1577060074, 0.2177172899, -0.2989480197, 0.0492458045, -0.0324087292, 0.1428056061, 0.4736913145, 0.292095542, 0.1383362263, 0.3362930119, -0.0987472385, 0.1389921457, 0.1220622361, -0.2137823105, 0.1378369331, 0.2005364597, -0.1644205302, 0.1876340508, 0.3156542182, -0.1838982701, 0.0428846069, 0.0808462128, -0.1026859134, -0.009291634, -0.2145707458, 0.1760110855, 0.09956038, 0.4164285362, -0.2796168029, -0.30784899, 0.0164621323, 0.0589696169, -0.777423799, 0.108192347, 0.0224132054, 0.0358125269, 0.0199040584, -0.3528315127, -0.0658770949, -0.2318225801, 0.4673492312, -0.0962118357, 0.2898914814, -0.1140295714, 0.0171308741, -0.0981986895, -0.0868966877, 0.0178056434, 0.1038970277, -0.2775534391, -0.0063252598, -0.1692341417, -0.1642161906, 0.2114344984, 0.090284422, -0.0042496994, 0.4375267625, -0.0416292176, -0.1178216413, 0.0063495189, 0.1518931091, 0.1883150786, 0.1584149897, 0.2687663138, 0.3543740213, 0.1175394803, 0.2619753182, 0.1657693535, -0.0674193501, 0.1508342177, -0.2813037038, 0.1861239225, 0.0103147551, 0.3496011198, -0.1106454581, -0.2098477483, 0.2666286826, -0.1843723357, -0.075872004, 0.0960813686, 0.2046854347, -0.0793879256, 0.2663104832, 0.1156047732, -0.0302526522, -0.1726293564, -0.0930823088, 0.0089966506, 0.0878817141, -0.0294364691, -0.0644476116, 0.0349587873, -0.0605720207, 0.2429807484, -0.1208941117, 0.1779666096, 0.0197551996, 0.1838931441, -0.3999998271, 0.1542439163, 0.2231272012, -0.1593790054, 0.1788141131, 0.292376399, -0.4119532406, -0.1074469835, -0.1714627147, -0.0767475367, -0.2104947269, -0.4990203381, 0.2266945541, 0.1809668243, -0.019410111, -0.096171096, -0.1299239248, 0.34919554, -0.2621614933, 0.0378681794, -0.5697959661, -0.0991157815, -0.1339208782, 0.172104001, 0.300033778, -0.3002199531, 0.1677255929, -0.2391220182, -0.0513176955, 0.0095722005, 0.2239179313, -0.1983067393, 0.25286901, -0.1809738725, -0.0589217246, 0.2944368422, -0.137235269, -0.2301748544, 0.27957654, 0.2491773814, -0.068024978, -0.2227918506, -0.0755550042, 0.2689781785, 0.0481588915, 0.2397182584, 0.1333486736, 0.0076560322, -0.1522698104, -0.1668646038, -0.0934459418, 0.3813959956, -0.1442020535, 0.1337887049, 0.1369584799, -0.0157832354, 0.1134744585, 0.1468216628, -0.1264297366, -0.0556386411, 0.1905203462, 0.2522130311, 0.1714022607, 0.054270491, -0.3509203792, -0.4462576509, -0.0797010362, -0.2040196061, 0.0652360618, -0.2956980765, 0.1840088516, -0.2299054563, 0.1598491073, -0.1872375906, -0.2770090401, 0.1992530674, 0.2211049348, 0.069129467, -0.0560181439, -0.1147579104, -0.0540781841, -0.0689445361, 0.0815344527, -0.420245856, 0.3430920243, -0.2603980303, -0.239012897, 0.0644558892, 0.096577324, 0.1995358914, -0.1361989975, -0.2320534885, 0.44032377, 0.1650057286, -0.2004151642, -0.1622930169, 0.0771135017, 0.1574232131, -0.1858451813, 0.0220007505, 0.3202285171, 0.0983405262, 0.0578602403, -0.0076149479, 0.2805494666, -0.1693372726, 0.1688171476, 0.2262057215, 0.3731297851, 0.2607489228, 0.1023363844, -0.0886059254, -0.2534463406, 0.4879235327, 0.0339732282, 0.2914645672, -0.2156839967, -0.5336606503, 0.0760331675, 0.3073704839, 0.1480701417, 0.1422267705, -0.0100681596, -0.1057597101, 0.076960206, 0.2739712894, 0.1093880981, 0.3183999062, 0.0714439303, -0.2827414274, -0.0664320812, -0.2687221467, -0.1903399676, 0.2828249633, 0.0425261222, 0.1601822674, 0.1422436982, 0.26644665, 0.0376956537, -0.3858792186, -0.4234344661, -0.0569501519, 0.3714587688, -0.1407545805, 0.2643477619, -0.3491424322, -0.4249196649, -0.2960481048, -0.2388046533, -0.240599826, -0.3623479605, -0.0960664526, 0.1309020519, 0.0306269005, 0.2354483902, -0.1495062113, -0.0630283654, 0.1627137959, 0.102507636, -0.0452510156, -0.1686989665, -0.2626589537, 0.1136496142, 0.1955717504, -0.0830841437, 0.3767891824, -0.0422194451, -0.1625640988, -0.219997406, -0.403624475, 0.1120402887, -0.0680638179, 0.1988323331, 0.505158484, 0.0949801207, -0.0435776487, -0.1564035714, 0.4378066361, -0.0563668385, 0.1829484552, 0.1709960699, -0.0545083806, -0.3030059636, -0.164280206, -0.4381229579, -0.1721550524, -0.1750892401, 0.1431858391, 0.3657177687, 0.3671049476, 0.5672650933, 0.048672393, 0.1627243757, -0.1498387158, 0.1697801054, -0.0384770818, 0.0926329494, 0.1827805787, -0.2975686789, -0.4033007622, -0.2050919533, 0.1107112691, 0.0534855649, -0.0109259561, -0.4335920513, -0.1561717093, -0.2316403091, 0.2016343027, -0.0561201051, 0.0157573279, 0.2922450006, 0.1445402056, -0.0896596909, -0.0230039954, -0.0041050836, -0.0687816739, -0.1858179122, 0.1621864587, 0.0248007476, 0.292229712, -0.0115639567, 0.2237012088, 0.3424478173, -0.215179801, 0.1279714853, -0.1084780693, 0.4514209926, -0.1578465551, -0.4963949323, 0.2596534491, -0.083407402, -0.0708967373, 0.1117999405, -0.0996083021, -0.2902065217, -0.1338138729, 0.3741461933, -0.0089202896, -0.0709921494, 0.0830766931, -0.1850362569, 0.3181608915, 0.0026357695, 0.2742583752, -0.1590849459, -0.2411730587, -0.1272430122, 0.1199279428, -0.0098038279, -0.1198805869, -0.5893691182, -0.3102943301, -0.2474393696, 0.3407368362, 0.1813263297, 0.7312635779, -0.043570511, 0.1915236115, -0.2322873026, -0.0519200042, 0.2175544798, -0.3263435662, -0.1254752576, 0.5302121043, -0.0307004713, -0.1185707301, -0.1065545455, -0.404720217, 0.3956198692, 0.1058987826, 0.2219058126, -0.0387296081, -0.0528827496, 0.3625881076, 0.177121371, -0.1430915296, 0.090825595, -0.0623476319, -0.0892774388, -0.1557321846, -0.1180958301, -0.1927645952, 0.1466252506, -0.0049092174, 0.1919081956, -0.1392065883, -0.1257688999, -0.0748905316, 0.1233943999, 0.1236949563, 0.0033259876, -0.0421625562, -0.0984145403, 0.2123968005, 0.1988955289, 0.1118149608, -0.3817189932, -0.2204661965, -0.1041044444, -0.0807113349, 0.2407715172, 0.0738158152, -0.2533875406, 0.0336982124, -0.0934977531, 0.115083009, -0.0288717225, -0.2338208854, 0.5240259171, 0.0251871496, -0.3135381639, -0.4343081713, 0.2066930234, 0.0136047155, 0.1050093025, 0.3896683455, -0.2068136483, -0.3086203337, 0.1892786324, 0.1139307618, 0.6405622363, 0.0851490647, 0.0652172118, 0.2540674508, -0.0935597047, 0.6293441057, 0.1546674818, 0.2402300239, -0.3571701348, -0.2086230665, -0.0803107917, -0.1555122584, 0.4733543098, 0.0507899858, -0.3131176829, 0.2505070567, -0.0391840413, 0.1385241002, 0.0359818339, 0.2782000303, 0.0778178498, -0.1967808157, -0.5601499081, 0.1838224381, -0.2324074656, -0.0873934478, -0.3194411099, 0.0811044425, 0.1707179993, -0.1656277627, -0.441345185, 0.1346513331, -0.1211191937, 0.3450765014, 0.3261592686, -0.3975538015, 0.1371127218, 0.1328671873, -0.026358813, 0.2817959189, -0.1486687958, -0.0861461684, -0.04510298, -0.1509838849, 0.0990661234, 0.1168282479, 0.4106483161, -0.0275181308, 0.0686402619, 0.1827412248, 0.0321693681, -0.1284328252, -0.0911369398, -0.0259142928, 0.1404956877, -0.2732412219, -0.1399979442, -0.0654589534, -0.1451387256, -0.3277775049, 0.1606898755, 0.1787602752, -0.1430870593, 0.2235412002, -0.0640175939, 0.0266124159, -0.0206710026, 0.1997919679, 0.0545462556, -0.0542283952, 0.4666306078, 0.44355914, -0.2183809429, -0.3694682121, 0.0551780462, -0.1608370543, -0.3175579011, 0.2667818069, -0.187915504, 0.1919150352, -0.0624176785, 0.185502544, -0.1084150523, 0.2329242975, 0.0201101303, -0.6296337843, -0.1027127504, 0.0046858415, 0.1599675417, 0.1682861596, 0.0211273655, 0.163348496, 0.0623622686, 0.166531235, -0.3393384218, -0.0928667933, -0.2718741, 0.1751076728, 0.0623887219, 0.0062930589, 0.0212405846, -0.0425848216, 0.1828921437, 0.1107405648, -0.0693011954, -0.2771649063, -0.2256083339, 0.0743488148, 0.1718118042, -0.5074114799, 0.0664314926, -0.0953751281, -0.2018558085, -0.2209297866, -0.1938800067, 0.0060283318, -0.1222525313, 0.3884959221, -0.0917987227, -0.0195536688, 0.0311300233, 0.0888617337, -0.0639947206, 0.1822516322, 0.0906906277, 0.3359933496, 0.1552696228, -0.0223114789, -0.4787731171, 0.0881571919, -0.1612363756, 0.0551173799, 0.4794060588, -0.5633705854, -0.0244879946, -0.0482903793, 0.5955436826, 0.3907880187, -0.2083752602, 0.0840869099, 0.2443298995, 0.2077735215, -0.3391137719, -0.1119451225, 0.2847104371, 0.1861763, 0.0454929247, 0.0799685344, 0.0038470402, -0.0595144406, -0.1182623133, 0.0298664048, 0.1543692499, -0.5287253261, 0.233175993, 0.3293747306, 0.1726527661, -0.0026450492, 0.1662861854, 0.1339376867, 0.1855648309, 0.3369787335, 0.0011739731, 0.2679285705, 0.2355299592, 0.0644425079, 0.2363325804, -0.1297556758, 0.0706019849, 0.1460009813, 0.2153234035, 0.2068513483, 0.090303421, 0.3038615882, -0.3223175406, -0.0923500359, 0.0277673155, 0.2207096368, -0.1179727167, -0.0328400917, -0.2226666063, -0.0682456642, -0.1485172957, 0.0043876469, -0.2459127307, -0.0806656778, 0.5146119595, 0.1833414584, -0.1658655405, -0.8891289234, 0.216425091, 0.154431954, 0.064714849, -0.314719826, 0.24954018, 0.171082139, 0.0437224619, -0.2234827727, 0.7008240223, 0.5018444657, 0.3941648006, 0.1825343221, -0.0488638021, -0.2682226896, -0.104250133, 0.0419572666, 0.1700414717, 0.1123286039, 0.0595860556, 0.3015961349, 0.1333013475, -0.1490451694, 0.2988529205, 0.2556343675, 0.0375601351, -0.0993067473, 0.4731218219, -0.0470735319, -0.2465269417, -0.1355570108, -0.0301102325, -0.3524823785, 0.1153912619, 0.5406102538, 0.281417042, 0.0571112633, -0.0885858461, 0.1267948896, 0.1267553717, 0.4031401873, 0.4755533338, 0.3269430399, -0.1795827299, -0.1937526762, -0.2992212772, 0.1575978696, -0.2197696269, -0.0460957363, 0.1135372818, 0.0597481057, -0.0773710981, 0.2345735133, 0.027412843, 0.094541125, -0.0248969719, 0.0568597578, -0.37803334, -0.1162496656, 0.2867142558, 0.0270559993, -0.0278432779, -0.196413666, 0.1512075961, -0.1286523342, 0.1126165017, -0.3674299717, -0.0651419759, -0.1094164997, 0.2097261697, 0.0312760472, 0.4317313731, 0.2470490187, -0.0309637077, -0.2971610427, -0.2883204222, -0.4377291799, -0.1834001988, 0.546212852, 0.1380330771, 0.5336261988, -0.162779659, -0.2439767569, -0.4112977087, 0.4331108928, -0.3177210689, -0.055591099, -0.2225957066, 0.2077828497, -0.2010600269, -0.0666392148, 0.0329128131, 0.2839015424, -0.0416871645, 0.2112438232, -0.4552669227, -0.2773838341, 0.2597217858, -0.7163981199, -0.3755803704, -0.1382012814, 0.1000654772, -0.0333191864, -0.1368525922, -0.3827462196, -0.0606802329, 0.336499393, -0.1395792216, -0.2957065701, 0.0730351433, 0.1560717374, 0.1417676806, -0.0939193666, 0.6182777286, 0.0997410044, -0.3169440627, 0.0998762324, -0.0598642714 ]
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.2925508916, 0.128772229, -0.1103174537, 0.2530120909, 0.1547409445, 0.0697497129, 0.3828648925, 0.4221462309, -0.0766396672, -0.0494418442, -0.1751877367, 0.4431258142, -0.2499774396, -0.0311815739, -0.0670694858, -0.4052228332, -0.0786969811, 0.3645732999, 0.0530650318, 0.1719868779, -0.1775274873, 0.3013063967, -0.2915244102, 0.1099652201, 0.003213089, -0.3575333059, -0.039383851, -0.0953137875, -0.2738589644, -0.6101930141, 0.2050486356, 0.0413202606, 0.1457609087, 0.1917884499, -0.0001070091, -0.1000375822, 0.3466987014, 0.1209744811, -0.459977448, -0.1070155054, -0.3484742045, -0.1636981666, 0.1541843265, -0.1577060074, 0.2177172899, -0.2989480197, 0.0492458045, -0.0324087292, 0.1428056061, 0.4736913145, 0.292095542, 0.1383362263, 0.3362930119, -0.0987472385, 0.1389921457, 0.1220622361, -0.2137823105, 0.1378369331, 0.2005364597, -0.1644205302, 0.1876340508, 0.3156542182, -0.1838982701, 0.0428846069, 0.0808462128, -0.1026859134, -0.009291634, -0.2145707458, 0.1760110855, 0.09956038, 0.4164285362, -0.2796168029, -0.30784899, 0.0164621323, 0.0589696169, -0.777423799, 0.108192347, 0.0224132054, 0.0358125269, 0.0199040584, -0.3528315127, -0.0658770949, -0.2318225801, 0.4673492312, -0.0962118357, 0.2898914814, -0.1140295714, 0.0171308741, -0.0981986895, -0.0868966877, 0.0178056434, 0.1038970277, -0.2775534391, -0.0063252598, -0.1692341417, -0.1642161906, 0.2114344984, 0.090284422, -0.0042496994, 0.4375267625, -0.0416292176, -0.1178216413, 0.0063495189, 0.1518931091, 0.1883150786, 0.1584149897, 0.2687663138, 0.3543740213, 0.1175394803, 0.2619753182, 0.1657693535, -0.0674193501, 0.1508342177, -0.2813037038, 0.1861239225, 0.0103147551, 0.3496011198, -0.1106454581, -0.2098477483, 0.2666286826, -0.1843723357, -0.075872004, 0.0960813686, 0.2046854347, -0.0793879256, 0.2663104832, 0.1156047732, -0.0302526522, -0.1726293564, -0.0930823088, 0.0089966506, 0.0878817141, -0.0294364691, -0.0644476116, 0.0349587873, -0.0605720207, 0.2429807484, -0.1208941117, 0.1779666096, 0.0197551996, 0.1838931441, -0.3999998271, 0.1542439163, 0.2231272012, -0.1593790054, 0.1788141131, 0.292376399, -0.4119532406, -0.1074469835, -0.1714627147, -0.0767475367, -0.2104947269, -0.4990203381, 0.2266945541, 0.1809668243, -0.019410111, -0.096171096, -0.1299239248, 0.34919554, -0.2621614933, 0.0378681794, -0.5697959661, -0.0991157815, -0.1339208782, 0.172104001, 0.300033778, -0.3002199531, 0.1677255929, -0.2391220182, -0.0513176955, 0.0095722005, 0.2239179313, -0.1983067393, 0.25286901, -0.1809738725, -0.0589217246, 0.2944368422, -0.137235269, -0.2301748544, 0.27957654, 0.2491773814, -0.068024978, -0.2227918506, -0.0755550042, 0.2689781785, 0.0481588915, 0.2397182584, 0.1333486736, 0.0076560322, -0.1522698104, -0.1668646038, -0.0934459418, 0.3813959956, -0.1442020535, 0.1337887049, 0.1369584799, -0.0157832354, 0.1134744585, 0.1468216628, -0.1264297366, -0.0556386411, 0.1905203462, 0.2522130311, 0.1714022607, 0.054270491, -0.3509203792, -0.4462576509, -0.0797010362, -0.2040196061, 0.0652360618, -0.2956980765, 0.1840088516, -0.2299054563, 0.1598491073, -0.1872375906, -0.2770090401, 0.1992530674, 0.2211049348, 0.069129467, -0.0560181439, -0.1147579104, -0.0540781841, -0.0689445361, 0.0815344527, -0.420245856, 0.3430920243, -0.2603980303, -0.239012897, 0.0644558892, 0.096577324, 0.1995358914, -0.1361989975, -0.2320534885, 0.44032377, 0.1650057286, -0.2004151642, -0.1622930169, 0.0771135017, 0.1574232131, -0.1858451813, 0.0220007505, 0.3202285171, 0.0983405262, 0.0578602403, -0.0076149479, 0.2805494666, -0.1693372726, 0.1688171476, 0.2262057215, 0.3731297851, 0.2607489228, 0.1023363844, -0.0886059254, -0.2534463406, 0.4879235327, 0.0339732282, 0.2914645672, -0.2156839967, -0.5336606503, 0.0760331675, 0.3073704839, 0.1480701417, 0.1422267705, -0.0100681596, -0.1057597101, 0.076960206, 0.2739712894, 0.1093880981, 0.3183999062, 0.0714439303, -0.2827414274, -0.0664320812, -0.2687221467, -0.1903399676, 0.2828249633, 0.0425261222, 0.1601822674, 0.1422436982, 0.26644665, 0.0376956537, -0.3858792186, -0.4234344661, -0.0569501519, 0.3714587688, -0.1407545805, 0.2643477619, -0.3491424322, -0.4249196649, -0.2960481048, -0.2388046533, -0.240599826, -0.3623479605, -0.0960664526, 0.1309020519, 0.0306269005, 0.2354483902, -0.1495062113, -0.0630283654, 0.1627137959, 0.102507636, -0.0452510156, -0.1686989665, -0.2626589537, 0.1136496142, 0.1955717504, -0.0830841437, 0.3767891824, -0.0422194451, -0.1625640988, -0.219997406, -0.403624475, 0.1120402887, -0.0680638179, 0.1988323331, 0.505158484, 0.0949801207, -0.0435776487, -0.1564035714, 0.4378066361, -0.0563668385, 0.1829484552, 0.1709960699, -0.0545083806, -0.3030059636, -0.164280206, -0.4381229579, -0.1721550524, -0.1750892401, 0.1431858391, 0.3657177687, 0.3671049476, 0.5672650933, 0.048672393, 0.1627243757, -0.1498387158, 0.1697801054, -0.0384770818, 0.0926329494, 0.1827805787, -0.2975686789, -0.4033007622, -0.2050919533, 0.1107112691, 0.0534855649, -0.0109259561, -0.4335920513, -0.1561717093, -0.2316403091, 0.2016343027, -0.0561201051, 0.0157573279, 0.2922450006, 0.1445402056, -0.0896596909, -0.0230039954, -0.0041050836, -0.0687816739, -0.1858179122, 0.1621864587, 0.0248007476, 0.292229712, -0.0115639567, 0.2237012088, 0.3424478173, -0.215179801, 0.1279714853, -0.1084780693, 0.4514209926, -0.1578465551, -0.4963949323, 0.2596534491, -0.083407402, -0.0708967373, 0.1117999405, -0.0996083021, -0.2902065217, -0.1338138729, 0.3741461933, -0.0089202896, -0.0709921494, 0.0830766931, -0.1850362569, 0.3181608915, 0.0026357695, 0.2742583752, -0.1590849459, -0.2411730587, -0.1272430122, 0.1199279428, -0.0098038279, -0.1198805869, -0.5893691182, -0.3102943301, -0.2474393696, 0.3407368362, 0.1813263297, 0.7312635779, -0.043570511, 0.1915236115, -0.2322873026, -0.0519200042, 0.2175544798, -0.3263435662, -0.1254752576, 0.5302121043, -0.0307004713, -0.1185707301, -0.1065545455, -0.404720217, 0.3956198692, 0.1058987826, 0.2219058126, -0.0387296081, -0.0528827496, 0.3625881076, 0.177121371, -0.1430915296, 0.090825595, -0.0623476319, -0.0892774388, -0.1557321846, -0.1180958301, -0.1927645952, 0.1466252506, -0.0049092174, 0.1919081956, -0.1392065883, -0.1257688999, -0.0748905316, 0.1233943999, 0.1236949563, 0.0033259876, -0.0421625562, -0.0984145403, 0.2123968005, 0.1988955289, 0.1118149608, -0.3817189932, -0.2204661965, -0.1041044444, -0.0807113349, 0.2407715172, 0.0738158152, -0.2533875406, 0.0336982124, -0.0934977531, 0.115083009, -0.0288717225, -0.2338208854, 0.5240259171, 0.0251871496, -0.3135381639, -0.4343081713, 0.2066930234, 0.0136047155, 0.1050093025, 0.3896683455, -0.2068136483, -0.3086203337, 0.1892786324, 0.1139307618, 0.6405622363, 0.0851490647, 0.0652172118, 0.2540674508, -0.0935597047, 0.6293441057, 0.1546674818, 0.2402300239, -0.3571701348, -0.2086230665, -0.0803107917, -0.1555122584, 0.4733543098, 0.0507899858, -0.3131176829, 0.2505070567, -0.0391840413, 0.1385241002, 0.0359818339, 0.2782000303, 0.0778178498, -0.1967808157, -0.5601499081, 0.1838224381, -0.2324074656, -0.0873934478, -0.3194411099, 0.0811044425, 0.1707179993, -0.1656277627, -0.441345185, 0.1346513331, -0.1211191937, 0.3450765014, 0.3261592686, -0.3975538015, 0.1371127218, 0.1328671873, -0.026358813, 0.2817959189, -0.1486687958, -0.0861461684, -0.04510298, -0.1509838849, 0.0990661234, 0.1168282479, 0.4106483161, -0.0275181308, 0.0686402619, 0.1827412248, 0.0321693681, -0.1284328252, -0.0911369398, -0.0259142928, 0.1404956877, -0.2732412219, -0.1399979442, -0.0654589534, -0.1451387256, -0.3277775049, 0.1606898755, 0.1787602752, -0.1430870593, 0.2235412002, -0.0640175939, 0.0266124159, -0.0206710026, 0.1997919679, 0.0545462556, -0.0542283952, 0.4666306078, 0.44355914, -0.2183809429, -0.3694682121, 0.0551780462, -0.1608370543, -0.3175579011, 0.2667818069, -0.187915504, 0.1919150352, -0.0624176785, 0.185502544, -0.1084150523, 0.2329242975, 0.0201101303, -0.6296337843, -0.1027127504, 0.0046858415, 0.1599675417, 0.1682861596, 0.0211273655, 0.163348496, 0.0623622686, 0.166531235, -0.3393384218, -0.0928667933, -0.2718741, 0.1751076728, 0.0623887219, 0.0062930589, 0.0212405846, -0.0425848216, 0.1828921437, 0.1107405648, -0.0693011954, -0.2771649063, -0.2256083339, 0.0743488148, 0.1718118042, -0.5074114799, 0.0664314926, -0.0953751281, -0.2018558085, -0.2209297866, -0.1938800067, 0.0060283318, -0.1222525313, 0.3884959221, -0.0917987227, -0.0195536688, 0.0311300233, 0.0888617337, -0.0639947206, 0.1822516322, 0.0906906277, 0.3359933496, 0.1552696228, -0.0223114789, -0.4787731171, 0.0881571919, -0.1612363756, 0.0551173799, 0.4794060588, -0.5633705854, -0.0244879946, -0.0482903793, 0.5955436826, 0.3907880187, -0.2083752602, 0.0840869099, 0.2443298995, 0.2077735215, -0.3391137719, -0.1119451225, 0.2847104371, 0.1861763, 0.0454929247, 0.0799685344, 0.0038470402, -0.0595144406, -0.1182623133, 0.0298664048, 0.1543692499, -0.5287253261, 0.233175993, 0.3293747306, 0.1726527661, -0.0026450492, 0.1662861854, 0.1339376867, 0.1855648309, 0.3369787335, 0.0011739731, 0.2679285705, 0.2355299592, 0.0644425079, 0.2363325804, -0.1297556758, 0.0706019849, 0.1460009813, 0.2153234035, 0.2068513483, 0.090303421, 0.3038615882, -0.3223175406, -0.0923500359, 0.0277673155, 0.2207096368, -0.1179727167, -0.0328400917, -0.2226666063, -0.0682456642, -0.1485172957, 0.0043876469, -0.2459127307, -0.0806656778, 0.5146119595, 0.1833414584, -0.1658655405, -0.8891289234, 0.216425091, 0.154431954, 0.064714849, -0.314719826, 0.24954018, 0.171082139, 0.0437224619, -0.2234827727, 0.7008240223, 0.5018444657, 0.3941648006, 0.1825343221, -0.0488638021, -0.2682226896, -0.104250133, 0.0419572666, 0.1700414717, 0.1123286039, 0.0595860556, 0.3015961349, 0.1333013475, -0.1490451694, 0.2988529205, 0.2556343675, 0.0375601351, -0.0993067473, 0.4731218219, -0.0470735319, -0.2465269417, -0.1355570108, -0.0301102325, -0.3524823785, 0.1153912619, 0.5406102538, 0.281417042, 0.0571112633, -0.0885858461, 0.1267948896, 0.1267553717, 0.4031401873, 0.4755533338, 0.3269430399, -0.1795827299, -0.1937526762, -0.2992212772, 0.1575978696, -0.2197696269, -0.0460957363, 0.1135372818, 0.0597481057, -0.0773710981, 0.2345735133, 0.027412843, 0.094541125, -0.0248969719, 0.0568597578, -0.37803334, -0.1162496656, 0.2867142558, 0.0270559993, -0.0278432779, -0.196413666, 0.1512075961, -0.1286523342, 0.1126165017, -0.3674299717, -0.0651419759, -0.1094164997, 0.2097261697, 0.0312760472, 0.4317313731, 0.2470490187, -0.0309637077, -0.2971610427, -0.2883204222, -0.4377291799, -0.1834001988, 0.546212852, 0.1380330771, 0.5336261988, -0.162779659, -0.2439767569, -0.4112977087, 0.4331108928, -0.3177210689, -0.055591099, -0.2225957066, 0.2077828497, -0.2010600269, -0.0666392148, 0.0329128131, 0.2839015424, -0.0416871645, 0.2112438232, -0.4552669227, -0.2773838341, 0.2597217858, -0.7163981199, -0.3755803704, -0.1382012814, 0.1000654772, -0.0333191864, -0.1368525922, -0.3827462196, -0.0606802329, 0.336499393, -0.1395792216, -0.2957065701, 0.0730351433, 0.1560717374, 0.1417676806, -0.0939193666, 0.6182777286, 0.0997410044, -0.3169440627, 0.0998762324, -0.0598642714 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.079837583, -0.144233346, 0.1469176114, 0.104747951, 0.2392238677, -0.183026135, 0.5247993469, 0.2587526739, -0.2769029737, 0.1412050724, 0.1099315435, -0.2591763735, -0.0396563858, -0.2304338962, 0.2745445371, -0.1979210377, 0.1962258816, 0.3209774494, -0.1909580231, -0.0990929604, -0.0947270542, 0.2928031385, -0.041869387, 0.1614840031, -0.6791225672, 0.1413168162, -0.1830788255, 0.2864961624, 0.1081076786, -0.3061460853, 0.1703540683, 0.0626989603, 0.2858561575, 0.5413045883, -0.0001269419, 0.3936149478, 0.1948050559, -0.2527728081, -0.0595976561, -0.1641453207, 0.3079850376, -0.0324929878, 0.0716106743, -0.1129937693, -0.1293356866, 0.1014446765, 0.3417715728, 0.004101716, 0.471326828, 0.2538046241, -0.0111972652, 0.7012688518, 0.062825501, -0.1866247058, -0.0218895636, 0.2796741426, -0.1007430628, 0.1228489727, 0.3792981505, -0.24681817, 0.0520923622, 0.0928171724, 0.2208896279, -0.2092368007, -0.0801465213, 0.2455781251, 0.4375521243, -0.0800732672, 0.0164040737, 0.2247601151, 0.2114131898, -0.2419931293, -0.4570936263, -0.4064106345, -0.0087266043, -0.3136433959, 0.5325061679, 0.1597996801, -0.2045149356, 0.2758423388, -0.0676133335, -0.0035869479, -0.0381933302, -0.0560379587, 0.1150069982, 0.2927226126, 0.1143161207, -0.0198006108, -0.0402778536, 0.0766945034, -0.2098600268, -0.08977741, 0.1380934417, 0.3785315752, -0.2391116917, -0.2530883551, -0.1679150313, -0.5764266253, -0.13990888, 0.0170646384, -0.0117711965, -0.3582890034, -0.2725013793, 0.0793669745, 0.5551718473, 0.1752218306, -0.1873039007, 0.0450796969, 0.0471250676, 0.1027875245, -0.1314992905, -0.0840469748, -0.3446531296, -0.231739983, -0.2921251655, -0.0994025245, 0.041931428, 0.0865665525, -0.0301302187, -0.1701420546, -0.3134409785, 0.0887427479, 0.1542658061, 0.093997553, 0.1844565421, 0.3348245919, 0.4495031536, 0.0126923919, -0.5675527453, -0.3265131116, -0.1946422309, -0.1032906696, -0.3978534937, -0.0439437814, 0.2442620099, -0.1168976426, 0.2883485854, -0.2603865862, 0.2765442431, -0.0780456886, -0.1356096268, -0.0873274207, 0.0491115302, 0.3619849682, -0.0605047792, -0.1039417759, 0.049595397, -0.3493100405, -0.1817703545, 0.3404091299, -0.1699382812, -0.3592524529, 0.03147199, 0.0184521489, -0.1031050086, 0.0612259619, 0.1891772449, 0.0949120969, 0.5039547086, -0.5416418314, -0.0628857315, 0.0121024325, -0.307461977, 0.1219959781, 0.1785231233, 0.534586072, -0.008132264, -0.1637233496, -0.14485237, -0.3543258607, 0.0238799732, 0.4770060182, -0.116162166, 0.4217157364, -0.275672406, 0.1975221634, 0.2805542946, -0.3485556543, -0.0487579703, 0.291934967, -0.2538605928, -0.1722113192, 0.1669985205, -0.2795716226, -0.2911918461, -0.3079818487, 0.063721016, 0.0510635823, -0.0008889418, 0.0401970744, -0.2602465451, -0.1193794385, -0.4364035726, 0.16279006, 0.0766465217, 0.1036474705, -0.0920428485, 0.6391341686, 0.2819697559, 0.0595621392, 0.2897181213, -0.0073055318, 0.1470351219, 0.1178080291, -0.0899866819, 0.1348541379, 0.0085602263, 0.1045291722, -0.0317756683, 0.3992010057, -0.0099069737, -0.0652452856, 0.2647106946, 0.1742205918, 0.0090644527, -0.3494710922, -0.0604714677, 0.0241231397, -0.1790010333, 0.1490027905, -0.3081005216, 0.032893151, -0.1788246036, 0.0819590837, -0.2277282178, 0.288880527, -0.1237492785, -0.2570456862, -0.1084300429, 0.389634937, -0.4102819562, 0.0260166228, -0.0665691867, 0.3695501685, -0.1494662464, 0.2167465836, 0.0701971352, 0.2750687599, 0.4112745821, 0.1022069156, -0.1609386206, 0.2704151869, 0.0733851492, -0.027739577, -0.1982140839, 0.2000836134, 0.0843483508, -0.0878729224, 0.4576550722, -0.1464755833, 0.1857967079, -0.0860164315, -0.0115566924, -0.1726842374, 0.1585261524, 0.3137050271, 0.0797693878, 0.2871513069, -0.2362150848, -0.3226616383, 0.4851431251, -0.1081837565, 0.0846823603, 0.1235768646, 0.0567585751, 0.0045671239, -0.0996450409, 0.1038168669, 0.7618492246, 0.0303733461, 0.0746844411, 0.2042742968, 0.0024265386, -0.4016211629, 0.3145744503, 0.0199698918, 0.1478987038, 0.3603560627, 0.0456464365, 0.135823518, -0.2201704383, -0.2086426318, 0.0125130564, 0.1076701954, -0.3380923569, -0.0305708498, -0.129481554, -0.2260119617, -0.613511622, 0.3738872409, -0.2147587538, 0.0300704017, 0.1859937012, -0.1521373093, -0.3798165917, 0.2276350558, 0.2427494228, 0.4120455384, -0.0400348678, -0.1004719436, 0.2312814742, -0.2532880306, -0.413808912, -0.071631439, 0.1834113747, -0.1839827448, -0.1943473667, -0.1855919659, 0.0516959652, 0.1973856241, -0.2839443088, 0.2684097588, 0.1496326923, 0.012864979, 0.0611016899, -0.0220945701, -0.0020250157, -0.3388446271, 0.3798139393, -0.3485738635, -0.3173534274, -0.0116598867, 0.236385271, -0.1102095768, -0.3155270517, -0.3423830271, -0.0144647174, -0.2746012211, 0.1298454553, -0.0374873653, 0.216198191, 0.4914865792, 0.3568271101, 0.1663621664, -0.1525253952, -0.1984067857, 0.153574869, -0.2659078836, 0.0295199584, -0.2206697762, -0.2314789891, 0.0058997795, -0.2214411497, 0.3120176494, 0.0577067658, -0.2935744822, -0.2030818462, 0.1279265732, -0.1166287959, 0.1098142713, 0.3292250335, 0.530207932, 0.034647081, -0.0924845263, -0.0594454817, -0.012163721, 0.407487154, -0.0231229756, 0.3068992198, 0.0181848183, 0.2183341384, 0.1459243149, 0.7025524378, 0.2315589488, -0.0831462815, 0.1190375239, -0.0345184207, 0.3092692196, -0.253087014, 0.0555538461, 0.0235935785, 0.2866980135, -0.0594143122, 0.560692668, 0.1877891123, -0.0019273367, -0.2192114145, 0.0443912894, -0.1045405492, -0.3789370954, 0.3051453531, 0.0155059844, 0.5026895404, -0.106448479, -0.2906702161, 0.1097941697, 0.0504853949, -0.1646968424, 0.4930084348, 0.1573978513, 0.0962497443, 0.0156966224, 0.0435920134, -0.195420444, -0.0942168832, 0.1772777438, 0.5306164026, -0.2424407899, -0.2974811196, 0.1551133543, 0.1365343183, 0.1886740327, -0.0277825501, -0.1924494803, -0.0162192285, -0.3138194382, -0.191998899, 0.0206929818, -0.0190278888, -0.2417088151, 0.4024547637, 0.5562254786, -0.102386333, -0.4468141496, 0.0831839815, -0.2228113413, -0.1595279425, -0.2530990243, -0.4939974546, -0.2606781423, -0.4263843596, -0.0009282641, 0.1753770411, 0.0783521309, -0.0456295758, 0.4315594435, -0.1151519641, -0.0214901529, -0.0176857375, -0.0781206191, 0.0555079617, -0.2289350331, 0.1036133319, 0.2859185338, 0.0224682484, -0.1199822053, 0.2650684118, -0.0706765503, -0.1486150622, 0.040293619, 0.0924251676, 0.3039663732, 0.5088427067, -0.0222058296, -0.0461171009, 0.3289165497, -0.0331222005, -0.3946835697, -0.0668156222, 0.1291233897, -0.2472635806, -0.0779909641, -0.2480996847, 0.2846381366, -0.0126133673, 0.0781783909, -0.0091098221, -0.1303601563, -0.3914084733, 0.3210027218, -0.0969043523, 1.0393943787, -0.0084022284, 0.6120117903, 0.3818511367, 0.1126775444, 0.3598697484, -0.4737109244, 0.3548025489, -0.2686954737, -0.2874267399, -0.0151408389, -0.0034191012, 0.2282914221, 0.5558614135, -0.1965658814, 0.0478179678, 0.5781382918, 0.1090811938, 0.2679473162, 0.1211239845, -0.1075652689, -0.3451636136, -0.39523682, -0.1394961774, 0.228351444, 0.4478595853, -0.110558331, -0.2278495431, -0.0749549121, -0.0793947726, -0.0609493107, 0.0613098517, -0.2240712643, 0.0624809153, 0.5027501583, 0.0188722908, 0.2975090146, 0.3734672666, 0.168223992, 0.1691640764, -0.072418198, 0.4037237167, -0.1006252021, -0.0242050216, -0.1672066897, 0.0561546683, 0.3336471617, -0.1572691947, -0.103264302, -0.2670703828, -0.2405530512, -0.2115936875, -0.0652292073, -0.1552081406, -0.120975852, -0.0391944349, -0.0970683545, 0.320284307, -0.3403382301, 0.0686926544, 0.0345718414, 0.0811050311, -0.3682988584, -0.3365432024, -0.1137616187, -0.1586223245, 0.034349151, 0.463447988, 0.0143188518, -0.0709293783, 0.535779655, 0.1047844216, 0.0940946117, -0.1901984811, 0.0638118535, 0.1296215653, -0.8252718449, 0.2144872397, 0.1549886465, -0.2786584795, 0.1183841974, 0.3002381027, 0.2092140317, -0.2025866508, 0.0438223332, -0.2727166116, -0.4122871757, 0.1511335075, -0.2708775103, 0.081490159, 0.2648308277, 0.6853188276, 0.35076949, 0.0534954816, -0.1497531682, -0.0178966373, -0.2738272846, 0.1723213792, 0.1717133373, -0.1761115789, 0.257440865, -0.0473737381, -0.1264454126, 0.2257913649, -0.2392769903, 0.0320568606, -0.0798017532, 0.2339299321, 0.323318094, -0.0893466398, 0.2869093418, 0.1396991313, -0.1093266308, -0.1490413845, 0.1398925334, -0.1106197163, -0.1481668353, 0.2082505077, 0.2583065331, 0.2423365712, -0.3391037583, -0.1234730855, -0.0613593869, 0.0870400742, 0.304702729, -0.1691261381, -0.177409634, -0.0503031015, -0.03673397, 0.1991209239, -0.0548998378, 0.1663121134, 0.1998898387, -0.3054783344, -0.0036390424, -0.0824469328, 0.2388525605, -0.1146258265, -0.2289885581, -0.1010645926, 0.4654877186, 0.0056849401, -0.270863235, 0.337621212, 0.0864605606, -0.102535516, -0.1397999376, 0.25745368, 0.1826209575, 0.0094577819, -0.0797458217, 0.4228535891, 0.0686201826, -0.5925228, 0.2610256076, 0.5560623407, 0.1700552255, 0.4229313433, -0.0492202863, -0.1060890555, 0.1530780345, 0.3082480133, -0.1963421106, 0.1678285152, -0.0404757336, 0.1585051715, 0.1119917631, -0.5258696079, -0.2627845109, 0.2734747827, 0.0412893333, -0.0313572623, -0.2307530195, 0.4621377587, -0.4583755732, 0.2152922302, -0.2082636654, 0.2460863739, -0.1853480786, -0.2498941272, -0.0668497533, -0.0791250169, -0.2840772867, 0.0345467851, 0.0929379389, 0.1996175349, -0.1173853427, 0.1672764868, 0.152888909, -0.3911097944, -0.2510300875, -0.0109409774, 0.2041037381, -0.1220552176, 0.4520686865, 0.1890479326, -0.0954338834, 0.2551532686, 0.481050998, 0.2450399101, 0.2664685547, 0.1609447896, -0.0054430142, -0.2634572089, 0.175706774, 0.0320560858, 0.3873579502, 0.49767977, 0.3165104389, 0.071750477, -0.119469285, -0.0642400086, -0.0427798927, 0.1871770471, -0.1899293959, -0.3418018222, 0.8261855841, -0.1091238111, -0.1319719851, -0.0133552384, 0.1182517856, -0.4318695068, 0.3141438365, 0.3554555476, -0.0011689365, 0.1497473121, -0.1496790051, -0.0445800349, 0.2240774632, 0.4062026739, 0.2843136787, -0.3281781673, -0.2428974807, -0.20610255, -0.5585108995, 0.0270141959, 0.0461114869, 0.2493057251, -0.0349736772, 0.0079351515, -0.0681048334, 0.0497216396, -0.341969192, -0.3155049682, 0.0513182729, -0.182066679, -0.1156255528, -0.1244636029, -0.2046037465, 0.0460724235, 0.0653912425, -0.2702296376, -0.2537832856, 0.0498042405, -0.0264445506, 0.0422573462, 0.1493173838, 0.192527324, 0.1814148724, -0.0711635947, 0.0884157196, 0.0676684529, 0.2310805768, 0.0728289708, -0.3985943198, -0.1142985523, -0.361294657, 0.0032338295, 0.069554776, 0.4953397214, -0.4000498354, 0.047414314, -0.2902720869, -0.2899901569, -0.0752148479, -0.2781924307, -0.2372089624, -0.0139882639, -0.0827316642, 0.1222541407, 0.4128884375, 0.4169911146, -0.1042445004, -0.1076244116, -0.5772279501, -0.3603630364, 0.3100016415, -0.5592373013, -0.0874065235, 0.1202497333, -0.0655827746, 0.0252234377, 0.1328892559, -0.642411828, 0.070651561, 0.1075029597, 0.1937763989, -0.3184123039, 0.0537421592, 0.061168123, -0.2190910578, 0.1069522798, 0.3757641613, 0.0110930484, -0.4208606482, 0.1000856459, -0.1757012904 ]
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.0366919674, -0.2923781574, 0.0385639779, 0.2077878565, 0.0263425037, -0.1215781569, 0.1395125985, 0.1727900505, 0.1227238625, -0.0240067095, 0.1071394458, 0.4486669898, -0.0746831894, 0.0759547502, 0.2661069036, -0.0970809758, -0.0178979002, -0.0835173577, -0.5572075844, -0.2656837106, 0.0741957575, 0.3135085404, -0.1048663929, 0.0379499868, 0.010972742, 0.1809778512, -0.0905232653, 0.0128720747, -0.4572181106, -0.2325667441, 0.0901377052, 0.1737000644, -0.0498702675, 0.1833204925, -0.0001086784, -0.1280476898, 0.4216492772, -0.0375627726, -0.4472950697, -0.3175250888, -0.5728065372, -0.5532033443, -0.1477104425, -0.0608185753, 0.1857574433, -0.0601900145, 0.0039495751, 0.0888587609, 0.1687780619, 0.0085925944, 0.2087498903, 0.2460333109, -0.382252574, -0.1306510568, 0.5218645334, 0.0253503155, -0.2318373322, 0.4863923192, 0.393106252, 0.1596073806, 0.0922663137, 0.4000581205, -0.1544282138, 0.2864335477, 0.1128640696, 0.0945442915, 0.3612882197, -0.1099049076, 0.016579669, 0.5688595772, 0.3632160127, 0.1589248329, -0.3924893737, -0.2711538076, -0.0051723942, -0.2193640172, 0.1053974628, 0.3335298598, -0.3128447533, 0.0895097181, -0.658995986, -0.0388939716, 0.0859430656, 0.2939276397, 0.000685744, 0.6809975505, -0.0953051522, 0.0456329696, 0.0898195505, -0.0484640561, 0.0121704526, -0.3499276042, 0.0040095188, 0.0348175466, 0.0384133048, -0.0830789208, 0.1507284194, -0.0253075063, 0.0151570737, 0.0298288986, -0.1212168336, 0.2414699793, 0.2694709003, -0.0043599838, 0.2079114765, 0.3571495414, -0.1800069809, -0.1756753623, 0.1628444791, 0.0752707347, 0.2268758714, 0.2538919449, -0.2276639342, -0.0677333549, -0.4933923781, -0.027607467, -0.0981752798, -0.0790219754, -0.279144913, -0.2397161424, 0.0282089561, -0.196502775, -0.1278361082, 0.1890396923, -0.2532848418, 0.2782046497, -0.1491137743, 0.0452091917, -0.2284111679, -0.106746994, -0.0300923735, -0.0015243385, -0.2437843829, 0.0051837154, 0.3144955635, 0.2160784304, 0.3192482889, 0.138992697, -0.2071328759, -0.0875619352, 0.0687248334, 0.1165936366, -0.0168889537, -0.0155761391, -0.1657678187, 0.466227591, -0.1186365485, 0.1973180175, -0.351909101, 0.1186807752, -0.396148324, -0.1821979731, 0.0933930501, 0.1816112101, -0.3348969817, -0.2620615959, -0.0394125506, 0.363592118, -0.320287317, 0.2390496433, -0.0523413941, -0.0484767146, -0.254355967, -0.0335065164, 0.0671496391, 0.408264488, -0.1602658629, -0.1924747974, -0.2034650743, 0.191258207, 0.4898458123, 0.4522069395, -0.2085847706, 0.0941868499, -0.2111018002, 0.037608549, 0.164446339, -0.1547364593, -0.2068758607, 0.6244181991, -0.4453573823, 0.1312566102, 0.1468586326, 0.0212516189, 0.180160746, -0.109665677, 0.1793669462, 0.5182012916, 0.0115396194, 0.1022071242, -0.4862096012, -0.4059294462, 0.2895370424, 0.0118255094, -0.1852212846, -0.1393265724, -0.0287490562, 0.155216977, 0.3241949081, -0.0678673983, 0.0529371873, 0.0178249478, -0.1040143147, -0.3617752194, -0.0266503599, 0.2734880447, -0.2059172392, 0.3234938979, -0.0726446584, 0.3090579212, 0.2307604998, 0.2014815062, -0.2200479209, -0.1866346598, 0.0362698957, -0.0985003114, 0.1168613732, 0.0804221183, -0.0565655157, 0.0912408233, 0.1351667047, 0.0237790924, 0.0133440048, 0.0601710491, 0.370085597, -0.1242326796, 0.0169891622, -0.0740820467, 0.2616158128, -0.0662717894, 0.1205182821, -0.0700982884, -0.1816136539, 0.1176903173, -0.0839945078, 0.7728493214, 0.2703164816, 0.0602898449, 0.2631715536, -0.3408566117, 0.4670615196, 0.4881793261, 0.1534877568, -0.0567408651, -0.2976084054, 0.6317288876, -0.0665885806, 0.1452819407, 0.2575868666, 0.0677098408, 0.0057377145, -0.005652532, -0.2457091212, -0.0185156092, 0.4764826298, 0.1203885451, -0.0962069929, 0.1273312271, 0.1313001662, 0.2547523975, 0.6354759932, -0.1735524982, 0.0543272607, 0.2032870948, -0.302875191, -0.4658343792, 0.2684464455, 0.3569937944, 0.2943990231, 0.1340412796, 0.5332395434, 0.1486280859, -0.0177152157, -0.2474838495, 0.4499846697, 0.099993974, -0.3430033922, 0.0635734946, -0.0105905365, -0.0121998135, -0.2686419785, 0.2848035693, 0.0428780317, 0.0149844158, -0.1176050454, 0.0720368177, -0.493404299, -0.2570082843, -0.3033085465, -0.2698556483, -0.2456464767, -0.3047168553, 0.0502168052, -0.1831911504, -0.1301477253, 0.0301144198, 0.3293043971, 0.0620106682, -0.3602295816, 0.1799547076, -0.1737008691, -0.1028610766, -0.4780780971, 0.0354307815, 0.2430087626, 0.1615804434, 0.3787634671, -0.3717290759, -0.1113355085, -0.0512096807, -0.3588244319, 0.1746950746, -0.0494213775, 0.2054583132, 0.0113352723, -0.0139569752, -0.2444419116, 0.0717155039, -0.0249676313, -0.3179234564, 0.1241821572, 0.0388136432, -0.2473676354, -0.0790558904, -0.2507555187, -0.5002613068, -0.2906683385, -0.0813753232, 0.2634070516, -0.1414362341, 0.1935472637, 0.2922203839, -0.1513796747, 0.3148869574, -0.0831443369, 0.1852226853, -0.1199268848, -0.4302178025, 0.320438832, -0.0602748245, -0.2669695616, 0.3288851082, 0.1126203984, 0.0716881379, 0.0390773378, -0.4180582762, 0.302387327, -0.0928380489, -0.0431098342, 0.4418205619, 0.1617446244, 0.1722650081, -0.0778140873, -0.0293383673, -0.0650475249, -0.3291346133, -0.0873754323, 0.3501100242, 0.2656297386, -0.233815074, -0.0085864458, 0.3358736634, 0.5412426591, 0.1123498827, 0.3109042346, 0.0478649512, 0.1983859837, -0.1089459807, 0.2531497478, 0.0189193338, 0.3179725111, -0.2049616575, -0.0589667112, 0.3475881815, 0.2113375366, -0.3529017568, -0.131632477, 0.170373112, 0.0732095912, -0.2385870218, -0.0146644572, -0.0693898052, -0.1037624702, 0.1401765496, 0.0954216421, -0.1875468493, -0.2585600317, 0.0589296259, 0.3068725467, -0.0914941132, 0.1234382093, 0.038472712, 0.0400015377, -0.4884062707, -0.1577081084, 0.03746273, 0.3167335093, 0.0552036911, 0.0052320212, 0.188469708, -0.1565468162, 0.0461759716, -0.2120107114, 0.1149506569, -0.0534552298, -0.2566126287, -0.4716094136, -0.369556427, -0.3273010254, -0.4731156528, 0.4219287634, 0.0111080594, -0.1668890417, -0.1243624464, 0.1625126898, 0.1825751364, 0.0208014622, 0.0075459592, 0.0194829553, -0.5261369944, -0.0277471989, -0.1128444448, -0.2303445935, -0.1688617468, -0.0842981488, 0.0826325864, 0.3962226808, 0.3614584804, -0.0180387311, -0.0073244274, 0.0085880868, 0.0437607393, 0.1732921302, 0.1010833681, 0.3227291703, -0.2572559714, 0.4116535187, 0.2514834404, 0.1263492405, -0.0851504579, -0.0144903287, 0.0962610766, 0.6376786828, 0.1410151571, 0.1147582531, -0.1640264243, 0.1280245632, -0.2174062431, 0.1239238083, 0.4413773119, -0.0589337721, -0.027707804, -0.2384817749, 0.3543866575, -0.0186973326, -0.1848834902, 0.0306657162, -0.4643341005, -0.1061648801, -0.1553110927, 0.1650104374, 1.2208111286, -0.0829153657, 0.2892376184, 0.2155919522, -0.4171025753, 0.5484615564, -0.1115166098, -0.1139387637, 0.1213187724, 0.4160413742, 0.0257530212, 0.0816486329, 0.1442885101, 0.0930334479, -0.4381769598, 0.291371882, 0.2732538581, 0.2148755342, 0.2208145559, 0.3266222179, -0.1780337691, -0.2599671185, 0.0081869699, 0.146052137, -0.039631363, 0.4048944712, -0.016523663, -0.1932683885, -0.1302766651, -0.1470465064, -0.5490789413, 0.0887485147, -0.1451574564, -0.1727001071, -0.3821457624, -0.344406724, 0.1687267721, -0.2724868357, -0.1259730905, 0.1509997547, -0.2945033312, 0.2049816251, -0.3947579563, 0.2506482005, 0.3349378109, -0.1652315408, -0.1220940799, -0.3081343174, -0.1625579, -0.2768593729, 0.060770236, 0.2732264996, -0.2541186512, -0.2172362506, -0.1065584645, 0.5261737108, 0.001601629, 0.3198693693, -0.0687209666, -0.2394005358, 0.1680700332, 0.1484869868, -0.2169901431, 0.3404957652, 0.0559050068, -0.2652060986, -0.3284943998, 0.4559432864, -0.1275830865, -0.0958760008, 0.2058308721, 0.2329420894, -0.1831435561, -0.25380674, -0.071010381, -0.3330277503, -0.2490783632, 0.0377656631, -0.2313551605, -0.0287277997, -0.031270016, 0.2239942104, 0.4230273366, 0.0452820435, -0.0434643216, -0.1492175609, -0.0193064213, 0.1178322807, 0.0930560008, 0.0369655713, -0.5231835246, -0.2003667057, 0.1825507283, 0.1160082594, -0.3140279055, 0.1554563344, -0.0174043067, -0.016227819, 0.1054591835, -0.1625568271, 0.1020606309, 0.11322321, 0.0575039834, -0.2987832129, -0.1324885041, -0.1951033175, -0.0476424396, 0.1375062764, 0.0506285094, -0.608669281, 0.4174443483, -0.157894671, -0.0103833741, 0.0280098505, 0.0612629205, 0.0869585276, -0.1946710646, 0.2316185832, 0.0213865563, 0.1268001795, -0.1131834984, 0.1549938619, -0.0874431059, 0.43762514, 0.1472378373, 0.0859623104, 0.490937084, -0.0760239214, 0.0008737072, -0.0867421776, -0.085429579, 0.3044658303, 0.6014091969, -0.0512752458, 0.3350886106, -0.0219936371, 0.1548388302, 0.3572494388, -0.0120531209, -0.1645053029, 0.3825440407, 0.1769102961, -0.0047855601, -0.250956893, 0.0224978216, 0.1511775553, -0.1174377874, 0.0811752528, 0.2170944214, 0.1162603199, -0.1577131748, -0.126821667, 0.1819756925, 0.0390510596, 0.0071630664, 0.3407665491, 0.0460037589, 0.2685062289, -0.2568449676, -0.0754604787, 0.0026272386, -0.1139531583, -0.052569937, 0.2767500281, 0.1438092291, 0.6271648407, -0.0396352932, -0.1890067309, -0.0726460516, 0.4148300886, -0.1195017993, 0.2051082104, 0.1833916605, -0.1066177189, -0.0427800715, -0.1508678496, -0.3581850231, 0.3616624475, 0.0624044836, -0.346321106, -0.1909940243, -0.1027358174, -0.346298188, 0.3681488335, -0.3697709739, 0.0707770139, -0.0027191006, 0.3390326202, 0.0976689979, -0.358631134, -0.3370804191, -0.4636332989, 0.1683701277, -0.2557734847, 0.1014710069, -0.1461805552, 0.0710591376, -0.1298070997, 0.1876080781, 0.0947513431, 0.2715925276, -0.1966740191, -0.1296513379, 0.1028223783, 0.0874675587, -0.1183481812, 0.420977354, 0.1580831707, 0.1502561867, 0.1274958402, 0.0148601606, -0.2582022548, 0.1020783111, -0.2203730941, -0.8334546685, -0.2312726676, 0.3081344962, -0.0655826256, 0.0679112375, -0.3168429434, 0.0388596393, -0.2322288454, -0.0714517534, 0.4818230569, 0.0246455781, 0.1847483814, -0.0579715818, 0.0740562826, -0.1456456035, 0.591647923, 0.2572513521, 0.2669020891, -0.3744655848, -0.2374789119, -0.3805500269, 0.0291996673, -0.2586582899, 0.0700792149, 0.0953943133, 0.0681465492, -0.0346761607, 0.4211770594, -0.0340852514, 0.6065475941, -0.1240186989, 0.0428497605, -0.113750428, -0.1234532222, 0.1284445822, 0.0653610155, -0.1536687613, -0.2195088267, 0.2254096717, -0.0676789731, -0.0850572661, -0.1279168427, 0.2348799556, 0.1530581564, 0.2696568072, 0.1503946483, 0.0401461795, 0.3597557545, 0.0910031348, -0.3492452502, -0.4259172678, -0.0400482193, -0.0875406414, 0.0470682569, -0.4361442924, -0.0421793126, 0.1169771254, 0.2007245719, -0.2572183013, 0.0876619518, -0.0860952809, 0.1506075263, -0.1392785907, 0.0463112295, -0.2297099531, 0.1670978516, 0.0448345207, 0.2075981945, -0.1309168041, -0.0254997388, -0.3452734649, -0.0338520482, 0.2426208109, -0.2107733786, -0.1762981415, -0.3393881023, 0.2527181506, -0.2134812772, 0.1959013939, -0.028439343, -0.0017708838, 0.1980071962, -0.0186708551, -0.2138499171, 0.3829639256, 0.2446408123, -0.208578065, 0.0527316779, 0.3852640986, 0.0374387056, -0.2234346569, -0.1060096845, -0.2093635947 ]
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.0970184579, -0.230269745, 0.0760002583, 0.2327988446, -0.193015635, -0.1516975462, 0.4099265635, 0.0660619587, 0.2584861815, 0.0476580709, -0.0551420301, 0.2684984803, -0.1681043357, 0.0384287313, 0.2093767971, 0.0515971966, 0.0763440803, 0.0341627523, -0.607714355, -0.2628246546, 0.1051907241, 0.1649491191, -0.039584443, -0.054499343, -0.0968907773, 0.2049505711, -0.0659126267, 0.0196056254, -0.3745270073, -0.125773564, 0.1418085098, 0.2571886182, 0.0026758835, 0.3433767855, -0.0001119774, 0.0217483714, 0.3440235257, -0.0119890049, -0.3946136832, -0.1340296119, -0.504362464, -0.5133451223, -0.0980625302, -0.067851387, 0.0444888473, -0.1336169839, -0.0031025391, 0.0976154506, 0.2608043551, -0.119949013, 0.1531336457, 0.3764329851, -0.5539962053, -0.062861979, 0.5288299918, 0.0120591568, -0.192801699, 0.7287993431, 0.4486647248, 0.2702363729, 0.0053198896, 0.3857808113, -0.2627515793, 0.2417166531, 0.2182663977, 0.143761903, 0.3119069934, 0.0835658163, -0.2040940225, 0.4565157294, 0.344630897, 0.1195582747, -0.5175534487, -0.3979911804, -0.0086078383, -0.0808485523, 0.1689209938, 0.3056763411, -0.189341262, 0.301427424, -0.6494134665, -0.2435513139, 0.0007557943, 0.2693093717, -0.031149447, 0.590203464, -0.0753811225, 0.1342080534, -0.1156804115, 0.0863806605, 0.1333895624, -0.3744548857, 0.0500808954, -0.1554639339, 0.1346351504, -0.2157566547, 0.0398161188, -0.2851399183, -0.1335166693, 0.2030917257, 0.0032353029, 0.0864801854, 0.1260718405, 0.0952770114, 0.1827130169, 0.3722532988, -0.3179151416, -0.1064499393, 0.1842975616, 0.0189924315, 0.2428285778, 0.1555789709, -0.1604380608, -0.0409255475, -0.587923646, -0.0868918747, -0.1165798306, -0.1082950085, -0.1772288382, -0.111112535, 0.1398072392, -0.1824853718, -0.096427083, 0.1045274884, -0.1154745519, 0.3642383218, -0.0578072667, 0.0434138589, -0.1267210841, -0.138036117, -0.0077104997, -0.0665882602, -0.0935047567, 0.0864179805, 0.3612860739, 0.1556965411, 0.3075779974, 0.0156512074, 0.0400040373, 0.139988333, 0.1401408017, 0.1032534093, -0.0399015807, 0.1006250381, -0.1518375725, 0.39221102, -0.2451859117, 0.3385668397, -0.3105310798, 0.0323687196, -0.339302659, -0.3392118812, 0.0903840736, 0.1400926411, -0.2683833241, -0.1725407392, -0.1806352884, 0.1373316646, -0.391908139, 0.0645886138, -0.0769558176, -0.0070268069, -0.2558453679, -0.0696704611, -0.0326819606, 0.3766857982, -0.1034615859, 0.014795199, -0.0211644843, 0.259046942, 0.4362413287, 0.5246805549, -0.276994288, 0.139140889, -0.1622254252, 0.0690057576, 0.0558938682, -0.2430535704, -0.2646178305, 0.6330519915, -0.59146595, -0.0062276125, 0.3196911812, 0.0374978483, 0.2989469171, -0.2110327184, 0.244994089, 0.5267233253, 0.1126663983, 0.0809039697, -0.4941199124, -0.4558439255, 0.2412892878, 0.163213864, -0.2086905241, -0.1027115881, -0.0507310368, 0.2361129224, 0.2248372585, -0.136049211, -0.0092616938, -0.130079627, -0.0910939351, -0.3411991, -0.1972526312, 0.2972263694, -0.1848716736, 0.281654954, 0.0172873363, 0.2502074838, 0.3418704271, 0.0803093314, -0.0942329764, -0.2476299107, 0.087301746, -0.031581033, 0.0378060341, 0.1351808608, -0.0566878393, -0.0686643794, 0.0052515492, 0.1243494675, -0.026490882, 0.1590868533, 0.3992736042, -0.0466011614, 0.020052271, 0.0172211751, 0.2545692921, -0.0975964963, 0.0373170227, -0.1404785067, -0.0191655904, 0.1281846762, -0.2272662073, 0.8664546609, 0.3883670866, -0.0091440678, 0.4069119394, -0.3548849225, 0.5632675886, 0.4918875694, 0.0938523486, -0.0801301003, -0.3097839653, 0.5304615498, -0.0195397064, 0.1419152766, 0.2477449775, -0.0110150836, -0.1525165439, 0.0978006274, -0.2506640255, -0.0653885156, 0.4053527117, 0.1671306193, 0.0045255795, 0.2160785645, 0.0775755048, 0.1888604164, 0.4810030162, -0.1825458109, -0.0097448919, 0.0617797337, -0.187186107, -0.3809095621, 0.3489969075, 0.3133143783, 0.4159398675, 0.2065535933, 0.4286357164, 0.1747935861, 0.093202427, -0.2560549974, 0.4070366025, 0.0821527466, -0.3458168805, 0.1380353421, 0.0604515374, 0.0187941343, -0.23055619, 0.1780946404, 0.0391167179, -0.1586552262, -0.1597524583, 0.0542652383, -0.2796342969, -0.1378203332, -0.3862872124, -0.1363772452, -0.2332427353, -0.23188591, 0.0297003351, -0.0364913717, -0.2091932148, -0.1093643084, 0.3059451282, 0.1775642782, -0.5119210482, 0.052157037, -0.1740997732, -0.0387712754, -0.3981322646, -0.004532598, 0.2409883142, 0.0839546621, 0.4800803661, -0.2831421196, -0.0959868431, -0.1280896664, -0.2729632854, 0.1172761023, 0.065470174, 0.1425895095, 0.0450698249, 0.0209897272, -0.1486743093, 0.0222848095, -0.0585366003, -0.2918948829, 0.159278363, -0.0876684114, -0.2113157213, -0.0501288734, -0.2477103174, -0.5144856572, -0.292195797, -0.1058582217, 0.1634719521, -0.1977871656, 0.2133410871, 0.1712709516, -0.1417768747, 0.1947844774, -0.1191124916, 0.1587190926, -0.0597623959, -0.5474857092, 0.2177071273, -0.0215537921, -0.249940455, 0.1782258302, 0.2267055809, -0.0758671165, 0.1330333352, -0.4908930659, 0.2066095173, 0.0889606178, -0.0867544934, 0.5087789893, 0.250421077, 0.1344650239, -0.0427322276, -0.0128221959, -0.0286972076, -0.2431730628, -0.0593144, 0.4615967274, 0.0892494321, -0.0717798024, -0.0344241858, 0.2145276666, 0.7158353329, 0.1123098284, 0.2709051371, 0.0734360069, 0.1690093577, -0.0442203321, 0.1032902002, -0.0450689495, 0.3228217661, -0.0915734619, -0.1981368959, 0.3320976496, 0.1605143845, -0.3140477836, -0.2965777516, -0.0691008046, -0.0836939514, -0.2231552005, -0.0285991523, 0.0346232951, -0.0391561016, 0.2152926028, 0.0351675004, -0.153072834, -0.1862274706, 0.0510197133, 0.2082629502, 0.0232880507, 0.1214369982, 0.1869958192, 0.0174499601, -0.5837154388, -0.1514388323, -0.0604087599, 0.4268850088, 0.1196804345, -0.0053090453, 0.2003973126, -0.1578147709, 0.1050114408, -0.1754293144, 0.1773992628, -0.2610221505, -0.2920270562, -0.509114325, -0.2712903917, -0.2293031812, -0.4954597354, 0.3333485425, 0.1774187982, -0.2093189359, -0.0772737488, 0.100249961, 0.1798794717, -0.0299485326, -0.0471298583, 0.0903344899, -0.4981130362, -0.0542900488, -0.2347115278, -0.2449133843, -0.2359818071, 0.1032372415, 0.1892078221, 0.3253812492, 0.3559902608, 0.0577483401, 0.0654737428, -0.1120628566, 0.0077314079, 0.1831938624, 0.1641878188, 0.508805275, -0.2714177966, 0.5144894719, 0.3122369945, 0.2775201201, -0.1294932365, -0.0580588281, 0.1091765761, 0.7778978348, 0.1361854374, -0.0957431197, -0.2226419449, 0.0911439359, -0.2652899623, 0.0761790723, 0.2636010349, -0.1587104052, 0.0467040986, -0.1856400222, 0.4024963081, 0.0445791632, -0.1112494543, -0.1283766031, -0.3259795308, -0.0579227656, 0.0264299512, 0.1786334813, 1.2413949966, -0.0512664802, 0.5479648113, 0.3398542702, -0.3731059432, 0.612906754, -0.3549625874, -0.2105881274, 0.1111221164, 0.4099710286, -0.088891536, 0.0101739615, 0.1415470839, 0.1383725554, -0.1926463693, 0.3214409649, 0.3675512075, 0.214102596, 0.1016230211, 0.424397558, -0.176202178, -0.2723136544, 0.1168758273, 0.046068646, -0.0769590139, 0.3433993161, -0.0870346874, -0.2236353606, -0.1582712978, -0.1783517897, -0.3901978731, 0.0252667591, 0.0243970081, -0.0944942981, -0.4595496058, -0.3507034779, 0.1282486618, -0.445073992, -0.2020018101, 0.1782257259, -0.277497828, 0.0638346076, -0.4113681018, 0.2809456885, 0.3688462377, -0.1442648023, -0.0672982931, -0.3414594233, -0.1593785882, -0.2439580113, 0.1144457683, 0.0914489031, -0.1264485121, -0.1907726824, -0.1291676462, 0.4585459232, -0.1421941966, 0.3873198926, -0.1405364722, -0.1438747644, 0.1080985293, 0.0851508826, -0.2322063446, 0.2715295851, 0.020810606, -0.2724518776, -0.3984047771, 0.5281150341, 0.0161825269, 0.0225144476, 0.1650774181, 0.2041153759, -0.1229283288, -0.2184978127, -0.0596873611, -0.3233782053, -0.2938447595, -0.0270117521, -0.2106585801, -0.0880988166, -0.1055644751, 0.1250370592, 0.559165895, 0.0456967168, -0.0706095174, -0.0698527843, -0.0359767079, 0.1490234286, 0.1137289032, 0.1139962971, -0.24477005, -0.1570652276, 0.0539071485, -0.0921541452, -0.2827052474, 0.0909489989, 0.0752791911, -0.0176333506, 0.101266481, -0.1367360055, 0.0663046837, 0.0776911378, 0.0151348673, -0.25172472, -0.163962692, -0.1377807558, 0.0428203642, 0.1708699912, 0.1362432837, -0.5324259996, 0.3317979574, -0.2287670225, -0.1382037252, 0.1105387881, 0.1144327298, 0.1019740775, -0.1439725757, 0.1564760357, 0.0012161164, 0.0148284435, -0.2591871023, 0.414689362, -0.0019631684, 0.3680510819, -0.0486138165, 0.0644155294, 0.4446603358, -0.049510166, -0.0428196974, -0.0697859526, -0.1663295031, 0.4053021371, 0.6680966616, -0.0827414393, 0.3558431566, 0.0900748745, 0.2813591957, 0.3420068622, -0.0242597125, -0.2278636545, 0.331976831, 0.1144141108, -0.0572643429, -0.2742274404, 0.1136649996, 0.2460718751, -0.1159610972, 0.1479765624, 0.3108561635, 0.1180341244, -0.4081660807, -0.0566988066, 0.1665659547, 0.2172142565, -0.0733054876, 0.3288072646, 0.0730557591, 0.2956294119, -0.2882790565, 0.0651037246, -0.0272112079, 0.0072309943, -0.06443315, 0.3254029751, 0.1335479021, 0.5295644999, -0.0152424164, -0.2173381448, -0.006776562, 0.3404937685, 0.0472747497, 0.1829465777, 0.1153547764, -0.1629119962, -0.0913246125, -0.1681314111, -0.3184601367, 0.3788324296, 0.0995467678, -0.2279989421, -0.1665637493, 0.0182778686, -0.2023860514, 0.4663448334, -0.4102460444, -0.0335331261, -0.0610460974, 0.4058498144, 0.1479469985, -0.2261379659, -0.1839336008, -0.484329313, 0.1700113714, -0.234832108, 0.0972100571, -0.1264783442, 0.0262411591, 0.0391527265, 0.4013297558, 0.0752619281, 0.157471627, -0.1435386837, -0.0534456931, -0.0087840278, 0.0822139531, -0.2174328417, 0.2965001464, 0.0206263103, 0.099623099, 0.1984224617, 0.012281429, -0.1984616816, 0.029300835, -0.2606434822, -0.7364003658, -0.295145005, 0.2905282378, -0.1036312059, -0.0496595204, -0.2225228697, 0.0644873008, -0.3825048804, -0.0347700417, 0.6124905348, 0.1132046804, 0.2108598799, -0.0199694708, 0.0322235823, -0.2134574205, 0.646363318, 0.2980591357, 0.2459900528, -0.3212290704, -0.1414684802, -0.3462895751, 0.0655432791, -0.2151899338, 0.1030266583, 0.0468515381, 0.0800827518, 0.0053186156, 0.4956417382, -0.0943778902, 0.6934788227, -0.3345607519, 0.000403957, 0.0100862086, -0.1352152079, 0.0052142534, 0.0981653184, -0.1735396534, -0.2624405622, 0.1998806596, 0.0391980372, -0.1149829999, -0.0844620913, 0.2595463395, 0.140165478, 0.1990090758, 0.2034508288, -0.0767747387, 0.2250240743, 0.1066274121, -0.3222237229, -0.4003612697, -0.0525872894, -0.1452839077, -0.0425831676, -0.3721710742, -0.0040716529, 0.032350421, 0.3106034696, -0.1983378828, -0.0282452144, -0.0853509903, 0.1447116882, -0.1080795228, 0.0099681541, -0.4353298545, 0.0790130049, 0.1022069752, 0.2661631405, -0.1070328727, -0.2484220266, -0.380607307, -0.0880281627, 0.3034049273, -0.2912921309, -0.0510537811, -0.2912945449, 0.3219890296, -0.1367408931, 0.1849552691, -0.0974545702, 0.0435683429, 0.1183544546, -0.1040175408, -0.170769617, 0.2843352258, 0.2103101909, -0.2942458689, 0.008648403, 0.3904815018, -0.1679489166, -0.272806704, -0.2695901394, -0.1056654528 ]
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.140173763, -0.0430652946, 0.066244714, 0.050672248, 0.0602067895, -0.1812298745, 0.248905912, 0.1119349599, 0.1134404913, -0.0137727037, 0.0660710484, 0.5972368717, -0.0576730929, 0.0454575792, 0.2306548059, 0.0531797446, -0.1269129813, -0.0680231452, -0.5435425043, -0.1649612933, -0.0084485784, 0.1539152712, -0.0286862925, -0.085323751, -0.016079288, 0.1635002196, -0.0522696748, 0.1442741305, -0.3232898116, -0.4223856926, 0.1229835153, 0.2223756462, 0.0290666148, 0.238871336, -0.0001091673, -0.0348557755, 0.3812173903, -0.0277621038, -0.5606555343, -0.206246227, -0.5388451815, -0.5287116766, -0.0515058562, -0.1500374675, 0.133890301, 0.0201803148, 0.0294653643, -0.0525283962, 0.2164444178, 0.0395458452, 0.1784768254, 0.3661827445, -0.5167106986, -0.0938477367, 0.4847780466, 0.0027492214, -0.2234310508, 0.4499017, 0.4752113819, 0.1483807713, -0.0139929652, 0.3062317073, -0.2024824917, 0.3198316395, 0.2504802644, 0.0922963843, 0.2866601944, 0.0172404237, -0.0795296729, 0.5750320554, 0.4227978587, 0.0624037646, -0.5002790093, -0.3649967015, 0.118936345, -0.1521319449, 0.1861509532, 0.2799281478, -0.3316591382, 0.1248505116, -0.5772378445, -0.0171524212, -0.0086233467, 0.3052995503, 0.0751180053, 0.6365686059, -0.0298029184, 0.0889756531, 0.051958207, 0.0231270641, 0.060056217, -0.3546408713, 0.1290397793, 0.0254481323, -0.0640967116, -0.1827631593, 0.1450036764, -0.1434669942, 0.0556558073, 0.04831196, 0.0375732556, 0.2358698398, 0.2863414586, 0.0416202508, 0.280955255, 0.1880230308, -0.2490606606, -0.1966477484, 0.1953294575, -0.0647456944, 0.1743028611, 0.1942550689, -0.1582809836, -0.0995946229, -0.4025149643, -0.1299948394, 0.0049972609, 0.0445325375, -0.2315445244, -0.3442462385, 0.1634341031, -0.154337734, -0.0295568202, 0.2383634597, -0.2319646329, 0.200964883, -0.2369829565, 0.0273461863, -0.2427754998, -0.086712487, -0.077469334, -0.0758913755, -0.1686363965, 0.1335101128, 0.4017014503, 0.1725010574, 0.3206166327, -0.0123999342, -0.2200238854, 0.0505857989, 0.1651198715, 0.1433416307, -0.0575472452, -0.0479816869, -0.0609799325, 0.3564445972, -0.1713736951, 0.152939409, -0.369818449, 0.1584868282, -0.4505818486, -0.3000794947, 0.0098981578, 0.1790207475, -0.3993908763, -0.3566009104, -0.136335969, 0.3336696923, -0.4130516946, 0.1365326643, -0.1254846454, 0.0593283027, -0.3018196821, -0.03404551, 0.0507969111, 0.4687491059, -0.2249726206, -0.1960878521, -0.1931683272, 0.2358478904, 0.3037899733, 0.415517211, -0.3779422939, 0.108022809, -0.1842556447, 0.0571967512, 0.3586402535, -0.3323927224, -0.2837775946, 0.5307893157, -0.523316741, 0.0617459714, 0.2024645358, 0.1216154248, 0.2539981902, -0.1279943585, 0.0827523693, 0.6500003934, -0.0270979926, 0.1977934986, -0.4589148164, -0.4428384602, 0.2827783227, 0.1533722579, -0.2588038445, -0.0776050836, 0.0641296878, 0.2633577585, 0.2396991849, -0.0735432431, 0.0113799199, -0.0566636436, -0.0633368492, -0.3452429771, -0.1362150609, 0.3386702538, -0.4280270934, 0.3024758995, -0.0730888098, 0.311157912, 0.1986284852, 0.0526191816, -0.1303733438, -0.204859823, -0.0220028274, -0.0455684289, 0.0781750083, 0.2087102234, -0.0010312125, -0.0329717845, 0.0532723963, -0.0190535598, -0.0692307502, 0.1288837641, 0.3759296536, -0.038799677, 0.0337791815, -0.0809429064, 0.3571799695, -0.0392466709, 0.1040322781, -0.0517284386, -0.1456832588, 0.2341834903, -0.1372873485, 0.7774728537, 0.3542417586, 0.0056493655, 0.2782480717, -0.2661017478, 0.4801740348, 0.4508125782, 0.090347752, -0.0047088936, -0.4777365923, 0.5367770791, -0.1658909917, 0.2051072419, 0.2896354795, -0.0087829679, 0.0856239721, 0.0277637988, -0.3223410845, -0.0495686904, 0.2209576964, 0.1809860766, 0.0623557642, 0.1957707256, 0.110970825, 0.3044626713, 0.6227391362, -0.1718569249, 0.0422483273, 0.2157824337, -0.2499340624, -0.5171296, 0.3028020263, 0.3569073081, 0.4761768579, 0.2474787533, 0.4310212731, 0.0737210661, -0.0636576191, -0.2712916136, 0.3826602101, 0.1265353858, -0.374804318, 0.0553991944, 0.1359220594, -0.0237427913, -0.2967227697, 0.1882191151, 0.084145084, 0.0228423122, -0.1887818277, 0.0943802148, -0.4816097021, -0.244949311, -0.3461507559, -0.1799563915, -0.2855326235, -0.3380046487, 0.0620547049, -0.1093809158, -0.1883794665, 0.0807610303, 0.2616904676, 0.2746520638, -0.3171331882, -0.0398595259, -0.1123805791, -0.1213933975, -0.3910528421, 0.0253418535, 0.265301019, 0.2031010389, 0.373960048, -0.2555414438, -0.0685694516, -0.1352083683, -0.3251982331, 0.1363383681, 0.0960094929, 0.3435522318, 0.1109585464, 0.1049077064, -0.150875926, -0.0654420629, 0.044471994, -0.2533892989, 0.1706559062, -0.1076090634, -0.2372181714, -0.0109763406, -0.1955935061, -0.5634589195, -0.3295459449, -0.216927588, 0.1890610754, -0.0816292018, 0.199816674, 0.3314264417, -0.0365298241, 0.3603945374, -0.135902673, 0.0994872898, -0.1641949117, -0.5906573534, 0.3921246529, -0.1721303165, -0.2118633986, 0.2214898765, 0.0735788196, 0.1024077013, 0.0603679381, -0.4876347184, 0.1473140717, 0.0086400621, 0.0074474737, 0.3440038264, 0.2092836499, 0.1979778707, -0.1226311699, -0.019643385, -0.0573191978, -0.373526603, -0.0599366762, 0.4258570969, 0.2736263573, -0.1724298894, 0.0042302106, 0.2495695651, 0.6213098764, 0.008626081, 0.2401253879, 0.150620684, 0.0887307674, 0.0395380184, 0.2544414401, 0.0111288652, 0.4417018294, -0.0943874717, 0.0097342953, 0.3715402484, 0.2294643074, -0.3094251156, -0.1197521612, 0.0856708586, 0.0413751528, -0.3028289676, 0.0665812269, 0.0872149765, -0.1653724909, 0.2036623657, 0.1021774709, -0.3788695931, -0.2287271023, 0.0009730607, 0.3664318621, -0.0112817138, 0.1826781631, -0.1534881592, 0.1495300084, -0.5660690665, -0.1106041968, 0.0032996498, 0.2913609743, 0.1697706431, -0.0129303783, 0.0722884983, -0.0817571282, 0.1548694223, -0.2576472759, 0.0838655084, -0.1553105861, -0.1887226105, -0.5956742167, -0.2519659102, -0.1097416505, -0.3701530993, 0.3256332576, 0.1633916497, -0.1536767632, -0.2543476522, 0.2115944624, 0.0952994227, 0.0143091455, -0.0936372876, 0.0478195474, -0.5150455236, -0.1141297445, -0.1453862637, -0.2715373337, -0.1408784986, 0.0269031748, -0.0670616701, 0.295219332, 0.3303211331, -0.0917467624, 0.0781194642, 0.0124168545, 0.2065201998, 0.2116665393, 0.104958646, 0.3575664759, -0.216347307, 0.4708113074, 0.10690514, 0.0359311141, -0.0078181084, -0.0741853267, 0.1217952371, 0.6792546511, 0.1438569427, 0.0894052312, -0.1710982472, 0.0827872306, -0.271710068, 0.289383769, 0.3266991377, -0.1793212146, 0.0642348304, -0.3848211467, 0.3439782262, -0.07261163, -0.1075433269, 0.1265309602, -0.3777018487, -0.1238894314, -0.054910481, 0.2150654644, 1.1090853214, -0.1453065872, 0.3599410057, 0.328630507, -0.3125863373, 0.6720410585, -0.1128688753, -0.104118675, 0.1323557496, 0.396389991, 0.0688304529, 0.0030714422, 0.1413909048, 0.3241016567, -0.3143121898, 0.3108194172, 0.3265373111, 0.2781631351, 0.1273646802, 0.5954556465, -0.1624191403, -0.4131713808, -0.1340102702, 0.1710878313, -0.1431821138, 0.2317875922, 0.0013284907, -0.158671245, -0.0011413172, -0.130322814, -0.3256798983, -0.0010127947, -0.2405781001, -0.199285686, -0.3163983524, -0.3503411412, 0.1740937382, -0.1777691245, -0.2547174394, 0.1785104126, -0.3482362628, 0.2497151643, -0.4957490563, 0.2895105481, 0.2319343388, -0.1472205073, -0.069278568, -0.2525033355, -0.1565078944, -0.2393180132, 0.092518501, -0.097479865, -0.0912378058, -0.2452711463, -0.0557976775, 0.3949799836, -0.1176541075, 0.2038957328, -0.1565937549, -0.2492965609, 0.1574814767, 0.1143655926, -0.1629766077, 0.396042496, 0.1069390625, -0.2614463568, -0.3413655758, 0.4885404408, -0.2765490115, -0.0615247078, 0.2336363196, 0.155738607, -0.1110068858, -0.2471166253, -0.0362695456, -0.2458018661, -0.1622363627, 0.0235788301, -0.23577106, -0.0581382215, 0.0265010968, 0.2130108923, 0.3274293542, 0.1567625701, -0.0255361497, -0.1540930867, -0.0428748876, 0.115902856, 0.1328275204, 0.090132311, -0.3304201663, -0.1285469234, 0.0739915818, 0.0358345211, -0.3404178023, 0.1331429183, 0.0018464029, 0.0540982299, 0.0885093957, -0.125324443, 0.1922052801, 0.0758354962, 0.0379021727, -0.2574374378, -0.1625725925, -0.20888713, -0.1289765835, 0.1288841814, 0.0279290564, -0.5542564988, 0.2583648562, -0.2547996044, -0.0465643778, -0.0423140377, 0.1137974262, 0.0943847001, -0.2149706334, 0.1778301299, -0.019664919, 0.0237756949, -0.111722365, 0.186617285, -0.011371132, 0.3861465454, 0.134996444, 0.2166286856, 0.3578080833, -0.0335596949, 0.0262251496, -0.0344983786, -0.0337326862, 0.4142055809, 0.5385564566, -0.0902962238, 0.2103457302, 0.1377089769, 0.1006861255, 0.3548388481, -0.0678973198, -0.1434860229, 0.3465022147, 0.1763031781, 0.01504457, -0.3085132241, 0.0496496782, 0.1041297317, 0.0153581873, 0.1124412715, 0.1885601282, 0.1076681167, -0.2401632518, -0.1056161374, 0.332711339, 0.0869311988, -0.0052426346, 0.2966092229, -0.1117816493, 0.1312164366, -0.1709469855, 0.0042503551, 0.0453568175, -0.0272476673, -0.0770830214, 0.2865387201, 0.0881540999, 0.5736837387, -0.1039937586, -0.1535383165, -0.0302681439, 0.4111751616, -0.1179987788, 0.2317500263, 0.1915977001, -0.0341950431, -0.0863346606, -0.1675746739, -0.1613705754, 0.2868331373, 0.0892391056, -0.3066065907, -0.3026071191, -0.1101243794, -0.2407024801, 0.3416427076, -0.3660487533, -0.0802695453, -0.0530526452, 0.2778142095, 0.1537458748, -0.2622272372, -0.139393419, -0.3666598797, 0.0990125686, -0.2527460456, 0.0838490203, -0.1308988035, 0.1243992001, 0.0224081334, 0.1503724009, 0.1136516407, 0.2444439381, -0.1679371595, -0.0952026844, 0.0947591439, 0.0610177889, -0.2260656953, 0.2288852036, 0.0501590818, -0.019301096, 0.2327533662, 0.0663528442, -0.2215145528, 0.0119337663, -0.177361533, -0.7652969956, -0.2818595767, 0.2427917868, 0.0895276368, 0.0186087787, -0.2629154921, 0.1194325835, -0.1581222266, -0.0575798675, 0.5074003339, 0.0057013072, 0.2013277709, -0.0759598985, 0.0824252516, -0.1424694955, 0.6969805956, 0.1067080945, 0.1756346226, -0.3695183992, -0.1531874686, -0.5551542044, 0.0202674866, -0.175987184, 0.0439421833, 0.181924656, 0.2019901127, -0.0927354544, 0.5005364418, -0.0832173601, 0.5214184523, -0.0795301646, -0.0151406676, -0.1287303269, -0.2067309022, 0.0540201813, 0.119958654, -0.0565965623, -0.2893302739, 0.1644913405, 0.0172602423, -0.1056061238, -0.1385483146, 0.1957019269, 0.1395485401, 0.190578118, 0.1874487698, -0.0867074877, 0.2968437672, 0.0934022516, -0.2792479396, -0.441106081, -0.1013872698, -0.2070912421, -0.0262071528, -0.4229452312, -0.0029900521, 0.0609511212, 0.2148266286, -0.3219360113, 0.0542622134, -0.0594867393, 0.1481984407, -0.082430087, 0.117223382, -0.2113015056, 0.1959908307, -0.0120271333, 0.196480915, -0.0904243216, -0.0009059757, -0.2757561207, 0.0070147142, 0.2989311218, -0.2603602707, -0.1206922829, -0.3642934859, 0.2702488899, -0.207113415, 0.2036070228, -0.1141022965, 0.0322823822, 0.2379380465, -0.0222254358, -0.1997594833, 0.3995940089, 0.1431195438, -0.1232109666, 0.0237856656, 0.260997355, 0.0480971001, -0.1497206986, -0.1654865295, -0.193134129 ]
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.2155660838, -0.1206223369, -0.0204934031, 0.1300848424, 0.0658165365, -0.1955837011, 0.2002231032, 0.1801557243, 0.1433983445, 0.1119239032, -0.0341102146, 0.4751239121, -0.1775704324, 0.2044599354, 0.2067528665, 0.0962957144, -0.0070730932, 0.0183814056, -0.5470450521, -0.1375178099, 0.0861984417, 0.2179210782, -0.0510409549, -0.1955763698, -0.0300694015, 0.1657570899, -0.1316437125, 0.0727206543, -0.4188369811, -0.2630723715, 0.1180557087, 0.2656253278, 0.0648003966, 0.3028048277, -0.0001020328, -0.110632889, 0.2632772923, -0.0324819945, -0.4443929493, -0.1743229479, -0.5166606903, -0.5105952024, -0.2215470672, 0.0091437697, -0.0608068407, -0.0149910133, -0.0065324251, -0.0132248998, 0.2297480106, 0.0044424422, 0.2328478396, 0.3598409891, -0.4252637029, -0.0844933093, 0.4815312028, 0.0049273055, -0.2498244345, 0.4009498954, 0.356425792, 0.0796060786, 0.0113520585, 0.4700136483, -0.2561068237, 0.2787463665, 0.2031785846, 0.0228027962, 0.2285639793, -0.0028510578, -0.1551727355, 0.5608807206, 0.3373493254, 0.106541492, -0.5177890658, -0.2909383774, 0.0493710339, -0.2340979278, 0.1028874815, 0.299449563, -0.3247202039, 0.1200972497, -0.5581646562, -0.0929768533, -0.0255201608, 0.233927846, 0.0102100894, 0.7002002597, -0.1331141591, -0.0084220357, -0.0204177927, -0.0180138536, 0.0947141945, -0.1942599416, 0.0571600124, -0.0769829452, 0.0418053381, -0.2353390306, 0.1806428879, -0.12940979, -0.0580374748, 0.1132818013, -0.1338834763, 0.1659893095, 0.4308971465, 0.0214832649, 0.1853031218, 0.1846226007, -0.2198334336, -0.3102084696, 0.2138501704, 0.1062676013, 0.2071761936, 0.1935546249, -0.2216506302, -0.0671727508, -0.4991376996, -0.0334165692, -0.0477717333, -0.0327218547, -0.1735000014, -0.273383975, 0.1939501762, -0.1617198586, -0.1389792562, 0.2310473174, -0.2283910662, 0.2743050456, -0.1372370571, 0.0448945835, -0.1253162622, -0.1350656748, -0.0852319002, 0.0259633623, -0.1604276896, 0.0628024265, 0.4178494215, 0.1151152551, 0.2968904376, 0.0482052341, -0.1270541996, 0.062315613, 0.1218128726, 0.2479025722, 0.0074636936, 0.0301757026, -0.0424834006, 0.2363857925, -0.2150470167, 0.2390695512, -0.3477389812, -0.060967166, -0.2003086358, -0.2398063838, -0.0375853106, 0.2353383303, -0.3309752345, -0.2809259892, -0.016601935, 0.2984887958, -0.340136528, 0.2245848328, -0.0754440427, 0.0480986238, -0.2222739756, -0.0174946897, 0.049594745, 0.361835748, -0.0601068623, -0.0221714079, -0.167259559, 0.3471523821, 0.4115243852, 0.3610858619, -0.1718592346, -0.0356688648, -0.1001423672, 0.113896355, 0.1149021089, -0.2124208063, -0.1597549617, 0.5290459991, -0.4272655249, -0.0512520745, 0.1980795264, 0.0377270691, 0.1451043189, -0.1989156306, 0.1015513539, 0.610176146, 0.0147080142, 0.0896477401, -0.4038209915, -0.4023847282, 0.2538382411, 0.113394469, -0.2388012707, -0.2257614434, -0.0191055499, 0.2652854323, 0.2038479149, -0.0947932303, 0.0399127975, -0.0602309071, -0.0004272219, -0.3014585376, -0.2138356119, 0.1486181468, -0.1586672813, 0.252581507, 0.0318034515, 0.3712977767, 0.2999789417, 0.0660211667, -0.0779219493, -0.1569649875, 0.084352307, -0.0943668112, 0.1866601408, 0.2646547854, 0.0709155127, -0.0910295472, -0.0194464326, -0.1746231616, 0.1247935444, 0.0471181609, 0.3464384079, -0.2572755218, -0.0442042127, -0.0858550817, 0.4426566362, -0.0285977051, -0.0212586373, 0.0165664218, -0.0540229492, 0.1077197045, -0.1630093604, 0.721981585, 0.2625409067, 0.0902176946, 0.1276444793, -0.1887958795, 0.4084604383, 0.3476680219, 0.0464664437, 0.0551669598, -0.3467513025, 0.5725200772, -0.0478216521, 0.123631835, 0.1868000329, 0.1262736022, 0.0195048079, 0.0551025495, -0.2233823389, -0.077052176, 0.3090642393, 0.020818986, -0.134298116, 0.1040953249, 0.0351865441, 0.2854644656, 0.6748987436, -0.1631390154, 0.1368692517, 0.1020004451, -0.2426296175, -0.5028499365, 0.3370277882, 0.2667833567, 0.292296797, 0.2082758993, 0.5471042991, 0.1239027828, 0.1133709624, -0.2837970853, 0.4416500926, 0.0307941623, -0.2400390059, 0.0520266183, 0.0643798709, 0.0097815618, -0.279346168, 0.2093318105, -0.0416767821, -0.0475106016, -0.0696109384, 0.1332086325, -0.3933754563, -0.2082931399, -0.1213195026, -0.2465977073, -0.2604211867, -0.2351295054, 0.1347338855, -0.080139868, -0.16874668, -0.0055048447, 0.3391517997, 0.1928301156, -0.3416621089, 0.0859151632, -0.2080183029, -0.1062614918, -0.3279313445, 0.1355035901, 0.2595315278, 0.079653725, 0.4632076323, -0.2562024891, -0.0677859783, 0.0012314264, -0.3010240793, 0.1154060811, -0.0636522844, 0.2974288464, 0.1763878912, 0.0849845409, -0.2226351649, 0.0782185495, -0.0378872603, -0.2860151231, 0.0537933484, -0.0335331261, -0.1982928216, -0.1498127282, -0.2401801646, -0.4638532996, -0.2347116619, -0.1960787475, 0.2384762168, -0.1457493603, 0.1154223308, 0.1634503305, -0.1321238577, 0.2078082561, -0.088871032, 0.1999315023, -0.1722766012, -0.5507375002, 0.3365273774, -0.1226578504, -0.2967382073, 0.2950411439, 0.1803977937, 0.1631671041, 0.0276240259, -0.4810869694, 0.2160253674, 0.075547643, -0.0122780427, 0.4312318563, 0.181103617, 0.2614409626, -0.0525118113, -0.1331842244, -0.1169029921, -0.2547286451, -0.1903389543, 0.3488100171, 0.0875860304, -0.2828309536, -0.0525929518, 0.3150903881, 0.4403009713, 0.0352591351, 0.2692219317, 0.1453132927, 0.1900506467, 0.0205960833, 0.1813972443, 0.0188443288, 0.4231959581, -0.0633487254, -0.0132911578, 0.3236271739, 0.1291985214, -0.3245407343, -0.2914399505, 0.0539339185, 0.0542902052, -0.1991472244, 0.0365898609, 0.0328368731, -0.0825024098, 0.260483861, 0.1136521697, -0.1314815134, -0.2285274863, 0.1083638817, 0.2110731006, 0.0231596809, 0.1771335304, 0.0534088314, 0.0787189901, -0.6460816264, -0.111149475, -0.0496114008, 0.2459912747, 0.0804356635, -0.1045290381, 0.0938567072, -0.2556418777, 0.0522536673, -0.2582131922, 0.1134897545, -0.0836109221, -0.2604780495, -0.4620927274, -0.2324956059, -0.3129480183, -0.4964566231, 0.2788300514, 0.1503120363, -0.1244363561, -0.2181077003, 0.0399515852, 0.061507795, 0.0328093544, -0.0039067343, 0.0036901459, -0.552598834, -0.1009246409, -0.0875207633, -0.1910012364, -0.1118558496, 0.1091220602, 0.10320618, 0.2399273515, 0.4019557834, -0.005945418, 0.1635182351, -0.1407597661, 0.1461708993, 0.15380238, 0.0355159342, 0.3521108925, -0.2427484989, 0.4205366373, 0.2550270259, 0.1332937479, -0.0101001943, 0.0425595716, 0.1045060903, 0.5606142282, 0.1336907595, 0.0361016542, -0.1573226303, 0.1971203536, -0.4761060476, 0.1635747254, 0.3196146488, -0.0963665769, 0.1028664261, -0.2305850089, 0.2454123199, -0.1227340475, -0.0561033562, -0.0822788477, -0.4199790061, -0.0470855683, -0.0305169411, 0.3228859603, 1.0876448154, -0.0548611395, 0.4298873544, 0.4172220528, -0.2629697323, 0.6519909501, -0.1784098595, -0.0568829775, 0.0626898706, 0.4259784222, 0.0377702117, 0.1224652603, -0.0300476179, 0.1886985153, -0.336374253, 0.2806859016, 0.393297255, 0.1404633522, 0.07060574, 0.4829429984, -0.2904080749, -0.3686590493, -0.1312060058, 0.2164673954, -0.1190494299, 0.3661711514, -0.0052990653, -0.2352270633, -0.0096469, -0.0482902341, -0.3888447881, 0.1304738373, -0.0251825247, -0.1556477547, -0.403244257, -0.2059351355, 0.1470167935, -0.2993982732, -0.175434947, 0.296913147, -0.3061267436, 0.1365483105, -0.3737154007, 0.1065816656, 0.3472371101, -0.1877132952, -0.0940726995, -0.3946020603, -0.086047478, -0.3269333243, 0.1791286319, 0.0974241048, -0.0737684369, -0.2169007957, -0.0856585801, 0.4046721756, 0.0004227087, 0.2502939999, -0.0447825789, -0.2648875117, 0.2145470381, 0.1384791732, -0.2282403558, 0.3342366815, 0.0763718188, -0.1768036783, -0.3621094227, 0.4076473117, -0.1357074678, -0.0548258051, 0.1094945073, 0.3518760204, -0.1896473169, -0.3585045338, -0.0407100543, -0.2579800785, -0.1610672027, 0.0826613382, -0.0515570119, -0.1386893839, 0.0447673276, 0.1471682787, 0.4218550026, -0.063857168, -0.0254346356, -0.1077773497, -0.0039011687, 0.0178716276, 0.1565534025, 0.116929844, -0.2704852223, -0.2178095579, 0.0143180266, 0.1008336768, -0.4075272083, 0.006537687, -0.003057234, -0.0312981829, -0.0204134192, -0.2406107932, 0.1910777986, 0.1239067167, 0.1061534435, -0.2774295509, -0.1806873977, -0.2569988072, -0.0778445303, 0.1051140428, 0.0400194079, -0.5048245788, 0.4163048565, -0.1469413489, -0.2252713144, -0.0622460023, 0.1531933993, 0.0653288811, -0.1851455718, 0.1893164963, 0.0106257582, 0.0315571465, -0.1294827908, 0.1555295736, 0.0254081991, 0.3431403041, -0.0174623765, 0.1370589733, 0.4984192252, -0.1367764324, 0.0979610533, -0.0604100227, -0.1392356604, 0.3413680494, 0.6376526356, -0.0923819691, 0.133241117, 0.0038228296, 0.2270391583, 0.3653765023, 0.072936371, -0.1053440124, 0.3341250122, 0.2490954846, -0.0806621462, -0.2883704305, -0.1841814667, 0.1503635794, -0.047604043, 0.0749279857, 0.1278432012, 0.084527716, -0.2489451915, -0.0464621037, 0.041344054, 0.1420658082, -0.0882272273, 0.2352517247, -0.040843159, 0.0806749016, -0.2251593471, 0.0038355421, 0.0022387654, -0.0712823719, 0.0497236252, 0.2862336934, 0.0757815838, 0.5007494688, -0.125710398, -0.169275254, -0.0077234996, 0.3311445117, -0.013400089, 0.2483821064, 0.1064846143, -0.1253103167, -0.1222497374, -0.1940727234, -0.26963377, 0.4114989936, 0.0255450867, -0.2943876982, -0.1661927253, -0.0054865181, -0.2019097209, 0.4600009322, -0.265313983, -0.0194642395, -0.0762191713, 0.3743439615, 0.1899855733, -0.1610191315, -0.2972481847, -0.3647535443, 0.1751010865, -0.2916702926, 0.0634523034, -0.0151323453, 0.0053438693, -0.1055817902, 0.1762617975, 0.2219752073, 0.1720626503, -0.2952434719, -0.0167615414, 0.0213408619, 0.0078681111, -0.2192861438, 0.3557498157, 0.0686778724, 0.1814694554, 0.1829158515, 0.0935285985, -0.2586450577, 0.0309438445, -0.2813494205, -0.695227325, -0.0633428544, 0.1894440651, 0.0416123755, 0.0927126855, -0.3185549378, 0.2004054189, -0.2808115482, -0.034729071, 0.4659151137, 0.0250450857, 0.1504023373, -0.176535815, 0.1219728738, -0.1205240041, 0.7277302742, 0.2135394514, 0.2480608225, -0.2198004574, -0.2019879073, -0.3592084646, -0.0052026734, -0.130427748, 0.0303928405, -0.0436071642, 0.2344097793, 0.0169189498, 0.480186671, -0.2524456382, 0.5650545955, -0.1560815275, 0.1449369639, -0.0684496984, 0.0334084183, 0.1315194964, 0.0886437371, -0.0565044954, -0.2338402867, 0.1833179891, -0.0248792954, -0.0018762499, -0.1556953788, 0.2322490066, 0.1646089107, 0.2284881324, 0.1511096358, -0.0296817943, 0.1483922899, -0.03398012, -0.4519454241, -0.4413382411, 0.0062542111, -0.183095172, -0.0221664719, -0.2848104835, 0.0437061563, 0.1046816856, 0.2613084614, -0.294423461, 0.0885810852, -0.1664044261, 0.2771456838, 0.012628682, 0.0509112105, -0.3258065283, 0.2498878986, 0.0871123895, 0.1541561335, -0.077297695, -0.1914648712, -0.4286550283, -0.1590396762, 0.3215025961, -0.3492079377, -0.1736404449, -0.3517512381, 0.1742371023, -0.1791325212, 0.1163302809, -0.1438176334, 0.1457780153, 0.0896574557, 0.0786116272, -0.1525877565, 0.4270350933, 0.1251833439, -0.190088734, -0.0135045201, 0.4377382696, -0.038946256, -0.1823373437, -0.2686687708, -0.2382283956 ]
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.192304641, -0.2106526792, 0.0381690115, 0.1611494869, 0.0975150168, -0.1585473567, 0.1904045641, 0.1533399224, 0.120415315, 0.0007967055, 0.0680537522, 0.4522777796, -0.1424295604, 0.1149547249, 0.1379799843, -0.0190714188, -0.0316071957, -0.016465839, -0.5539653301, -0.1806609929, 0.1243806481, 0.2241037339, -0.0454685241, -0.1134560406, 0.0132556222, 0.1571445763, -0.0064904243, -0.05268218, -0.4414261878, -0.243879348, 0.17009601, 0.2271818072, -0.0814939886, 0.226627931, -0.0001094717, -0.1007321477, 0.3573342562, 0.0219915137, -0.4719122052, -0.2320845723, -0.4433200657, -0.5319785476, -0.1851852238, 0.0123840421, 0.0689447522, -0.0021639243, -0.0070840791, 0.1026330292, 0.1497529149, -0.061895851, 0.1908744127, 0.3501646519, -0.3927136362, -0.0803053677, 0.529024899, 0.0538763478, -0.3179959953, 0.4086429179, 0.4026594162, 0.0647768974, 0.028435044, 0.3826527596, -0.2017958313, 0.352032423, 0.1550588757, 0.1255156547, 0.3314125538, 0.0501096956, -0.0919988751, 0.5831673145, 0.3131953478, 0.1831505597, -0.497156024, -0.3578057587, 0.0633993223, -0.2700956464, 0.0803164318, 0.2856505513, -0.4243175685, 0.0002225596, -0.6766797304, -0.0099584125, 0.065190658, 0.2772795558, -0.0481219962, 0.6662285328, -0.1206482798, 0.021534618, 0.1117914021, -0.0764697641, 0.0303592272, -0.2781358957, 0.0698558092, -0.0057148375, -0.0622207187, -0.1293953955, 0.15947631, -0.0302637629, -0.0472638905, 0.033974953, -0.0991024077, 0.2560757697, 0.3124373853, -0.0474328063, 0.2130233496, 0.3228136301, -0.2606371045, -0.1927301586, 0.2396689355, 0.1491975039, 0.1560317427, 0.2299153209, -0.1587982625, -0.0781511813, -0.4115288556, -0.1184405461, -0.0473964438, 0.0037348717, -0.3469015658, -0.2562147379, 0.1056706682, -0.1855095476, -0.0941442102, 0.231756866, -0.2538496256, 0.3382099867, -0.1181780994, 0.0032467693, -0.254743427, -0.1260492653, -0.0535422526, -0.0828831792, -0.15124695, 0.0678526387, 0.4028182626, 0.1526073068, 0.2217159271, 0.1495410651, -0.2563753724, 0.0244266316, 0.1367166638, 0.1140657142, -0.052273564, 0.0211512726, -0.1438655853, 0.4553879797, -0.1439700723, 0.2233115286, -0.3718619049, 0.0244953707, -0.3538334966, -0.0992960036, 0.0683537275, 0.1765670031, -0.3633996546, -0.3125866055, -0.0774945915, 0.34252882, -0.3256634772, 0.2113516331, -0.1457199454, -0.0741148442, -0.3165706396, -0.0088636111, 0.0709335953, 0.3774986565, -0.0508105159, -0.1849673241, -0.2460456192, 0.289867878, 0.4833405614, 0.4508234262, -0.1895450652, 0.0414336771, -0.1766330898, 0.0714004636, 0.1194593757, -0.1618256569, -0.2467796355, 0.5846028924, -0.3631801605, 0.1026232913, 0.2272953242, 0.0897730887, 0.1548348963, -0.1884676665, 0.1260326803, 0.5456567407, -0.0167232398, 0.1433025599, -0.4377731681, -0.4620155096, 0.4027625918, 0.0353231654, -0.2536873817, -0.1711739749, -0.0318977386, 0.1660174727, 0.2982516289, -0.0939550549, 0.0602233559, -0.0077171456, -0.0792512149, -0.4218617976, -0.1064628586, 0.2571690679, -0.307123661, 0.3156718612, -0.0298685879, 0.2846223116, 0.2721893787, 0.1418251246, -0.1290595829, -0.1995244771, 0.0606609769, -0.0541772209, 0.108961165, 0.1821490228, -0.0141480044, 0.0092425123, 0.1536198109, -0.0705285743, 0.1277562678, 0.0534540415, 0.3099104762, -0.1456309855, 0.0676014349, -0.0970412642, 0.3784596324, -0.0925219059, 0.016674906, 0.0030210279, -0.1428598762, 0.0351031385, -0.1620596051, 0.8205002546, 0.1636325121, 0.0557001084, 0.2263662368, -0.2033576816, 0.4189578593, 0.461484015, 0.1375055015, -0.0583210848, -0.3883255124, 0.6559361219, -0.0334870331, 0.2081569284, 0.2344058752, 0.0253947228, -0.0108919889, 0.0331265777, -0.1978802681, -0.0266733617, 0.4525542259, 0.0287111513, -0.0495552272, 0.1335157454, 0.1221130043, 0.3372900486, 0.6990532279, -0.076446414, 0.0802493542, 0.1611663401, -0.2440990061, -0.4479450881, 0.2832089961, 0.3346199989, 0.4011623263, 0.1236730963, 0.4793913066, 0.0982858613, 0.0149974748, -0.2614250481, 0.4538689256, 0.0683596283, -0.3148658574, 0.0691410601, 0.055824358, -0.0407568067, -0.3203515112, 0.3138856888, 0.0323735178, 0.0395363197, -0.1711006761, 0.1068432927, -0.5006792545, -0.2801331878, -0.2517407537, -0.220789209, -0.2238322198, -0.3181207478, 0.0076524504, -0.0296564363, -0.1530620009, -0.0261144862, 0.3023246527, 0.0973889157, -0.3252886534, 0.1980793476, -0.2525206506, -0.0247698762, -0.3617875874, 0.0325189382, 0.2561217546, 0.1363508701, 0.3704488575, -0.2708317339, -0.1832276583, -0.0131913386, -0.3252641857, 0.0813810527, -0.0044514895, 0.3099690974, 0.0869937688, 0.0535681956, -0.2448780537, 0.0258569904, 0.0441319011, -0.3550925553, 0.0461035818, -0.0059965737, -0.2256912589, -0.0581979975, -0.2201524377, -0.4104797244, -0.2594745755, -0.1429173648, 0.2594436407, -0.143910259, 0.1373715401, 0.267698586, -0.2405001968, 0.2154842317, -0.0677713454, 0.1764876842, -0.1195023879, -0.407512635, 0.3521414995, -0.0469390228, -0.2553838193, 0.2142441869, 0.1334391087, 0.0773062557, 0.0538562499, -0.3868006468, 0.3585602045, -0.136227414, -0.0413575023, 0.4282892644, 0.2188336998, 0.1871519834, -0.1434072405, -0.0398894772, -0.0842348412, -0.3309117556, -0.1504513472, 0.3599241972, 0.1746117473, -0.2924568951, -0.0139145115, 0.3336581588, 0.4254918396, 0.1031930447, 0.2084671557, 0.1242859438, 0.1685887575, -0.0807223246, 0.274533093, -0.0265400112, 0.341458559, -0.1584326923, -0.0061024576, 0.3130588531, 0.1314869672, -0.2813425958, -0.1579693109, 0.1509363949, 0.1522671878, -0.26121822, -0.0356047563, 0.0205147434, -0.1144814119, 0.235667035, 0.1436478794, -0.1943287551, -0.3548478782, 0.0296809636, 0.1559301466, -0.0876219869, 0.1247206479, 0.0522007719, 0.1158504039, -0.6414424777, -0.1147345304, 0.0603274778, 0.3419022262, 0.1826670766, -0.0428258292, 0.1333040893, -0.1815698147, 0.0717391148, -0.1534902304, 0.2029655129, -0.0383702219, -0.2917601764, -0.518596828, -0.381261766, -0.2496387064, -0.4734685421, 0.3450014889, 0.1263523102, -0.1400874555, -0.1853709817, 0.1125072464, 0.1654151976, 0.0232464969, -0.0432439558, -0.0088310167, -0.473016113, 0.0405267328, -0.1378010064, -0.2883768082, -0.1090497971, -0.0272750985, -0.0055790469, 0.3268515468, 0.2950005829, -0.0195189342, 0.0309068561, -0.0148200728, 0.1408236176, 0.2824567556, 0.027867388, 0.3156512678, -0.2493622303, 0.4222188592, 0.2564002872, 0.1388327032, 0.0171251483, 0.0414951444, 0.0653405115, 0.6348187923, 0.1393073201, 0.1914889514, -0.1340215206, 0.2048902959, -0.328689456, 0.0856203288, 0.4198348522, -0.0922779143, 0.0315130427, -0.1679934561, 0.3272447288, -0.0432743803, -0.0682047233, -0.0195678677, -0.4723747373, -0.0389497653, -0.1813566387, 0.1990231127, 1.032530427, -0.1032290757, 0.3606828451, 0.2462723553, -0.3267296255, 0.6611084938, -0.0010685548, -0.0463626757, 0.079313159, 0.3475843966, 0.0780697092, 0.0713932365, 0.100694187, 0.0853024274, -0.3384713829, 0.3028819263, 0.2931595743, 0.2341822386, 0.1250126064, 0.364946723, -0.2309809327, -0.3035395145, -0.0039907414, 0.1476072669, -0.1462846547, 0.4384976923, 0.0112075247, -0.2127481252, -0.0808174163, -0.0827342495, -0.4961400926, 0.0781486928, -0.1791175306, -0.1322704554, -0.3198833466, -0.3072756529, 0.1382164359, -0.3125723004, -0.1823171079, 0.1593791544, -0.3063564897, 0.2015746832, -0.49975577, 0.3228512406, 0.35482651, -0.221493125, -0.1207582206, -0.3069575429, -0.0201909542, -0.3673646152, 0.112191245, 0.1790434867, -0.1402604878, -0.1554661393, -0.1174490899, 0.4760376811, 0.0256159976, 0.2536866665, 0.001498878, -0.2755518556, 0.1603970081, 0.1830126047, -0.1511205733, 0.4249061346, 0.0306920931, -0.2530903816, -0.3022616208, 0.5446175933, -0.1712574959, -0.0762039721, 0.2353499234, 0.2378669083, -0.2018399239, -0.2567597628, -0.035307467, -0.238257125, -0.2796829939, 0.1312978417, -0.2013621777, 0.016284585, 0.1016574651, 0.2791960835, 0.2899510562, -0.0184434764, -0.0281562135, -0.1501912028, 0.0254222974, 0.0378247611, 0.0631625503, 0.0463950001, -0.4493819475, -0.2314694524, 0.0730352402, 0.1662112921, -0.3018163443, 0.0727960244, 0.053425841, -0.0370062292, 0.0468179882, -0.2304473221, 0.1648780406, 0.0983267277, 0.0627446026, -0.2889101505, -0.1000973657, -0.2096283287, -0.0944980308, 0.1422278732, 0.0093972087, -0.6041982174, 0.4268814921, -0.1209509969, -0.0704817325, -0.0491630584, 0.0633512437, 0.1322061568, -0.1895680875, 0.1917337924, 0.0043710279, 0.1408359855, -0.1195363849, 0.1781887859, -0.0502232611, 0.372096926, 0.1173600033, 0.1187564582, 0.5305387974, -0.0467234328, 0.0031676963, -0.1742535532, -0.1299127936, 0.2519768476, 0.6152685285, -0.1011676192, 0.2166442871, 0.0312857553, 0.1953369528, 0.4234859049, 0.0186632872, -0.1360409111, 0.3578152061, 0.1634843051, -0.0076254085, -0.3044871092, -0.0711649507, 0.1949174106, -0.1436065435, 0.068658717, 0.2110057622, 0.1086742431, -0.2150646448, -0.1451812834, 0.2016154677, 0.0481321588, 0.0283958204, 0.3459688723, 0.0390865877, 0.1616565585, -0.2308826298, -0.0689179823, 0.0217672065, -0.0943103582, -0.0131875798, 0.2198146731, 0.0897095054, 0.6077310443, -0.1097396985, -0.2152638733, -0.0743063837, 0.4268314838, -0.1261551082, 0.2197945863, 0.2022067308, -0.1172498763, -0.0472153723, -0.2399028987, -0.2813341022, 0.3914322853, 0.0404245891, -0.3339933455, -0.1844968796, -0.0089885369, -0.3252814412, 0.4570532739, -0.3683611155, 0.0556631498, -0.012478888, 0.3678561747, 0.120880425, -0.3303733468, -0.3447900116, -0.4250266254, 0.226221934, -0.2514734566, 0.0538898185, -0.1363187432, 0.0155505612, -0.1111818254, 0.2048872411, 0.1433779448, 0.2517200708, -0.1315741986, -0.1068136841, 0.0552503765, 0.0517465398, -0.1826303005, 0.3563988507, 0.1094766408, 0.1614317745, 0.1396197975, 0.0032215528, -0.2617655694, 0.0504642874, -0.2575354576, -0.7597658634, -0.2148525417, 0.2591417134, -0.0997465029, 0.1027267948, -0.3110259771, 0.1342181861, -0.145399943, -0.0192845911, 0.4423724711, -0.0146614462, 0.2050585896, -0.1046234965, 0.077527836, -0.1276622266, 0.6228080392, 0.1438276768, 0.1733989418, -0.3027552962, -0.2098255754, -0.4360931516, -0.0435042605, -0.2079171538, 0.1201576814, 0.093316257, 0.1345237046, -0.0540952496, 0.4037416577, -0.051487051, 0.6126375198, -0.0678341985, 0.047684785, -0.1062777191, -0.1528730839, 0.133775264, -0.0528775081, -0.0957042426, -0.3004840314, 0.2328521311, -0.1057124734, -0.0985729471, -0.1785945892, 0.2746798694, 0.0828838944, 0.3282959759, 0.1484971344, 0.0690784752, 0.3220794797, 0.0548948646, -0.3768773079, -0.4569470286, -0.0288912877, -0.1553301215, 0.0526762307, -0.3676456511, -0.0331746526, 0.1107918695, 0.2575419843, -0.3100857437, 0.0315036215, -0.145647347, 0.2497521788, -0.056120228, 0.121453926, -0.26283288, 0.2197060585, 0.0760231614, 0.0962248743, -0.0901903659, -0.0787444934, -0.4243400991, -0.0582294129, 0.2731250226, -0.2771430612, -0.0997498408, -0.416615665, 0.2395464778, -0.1594292819, 0.1861552298, -0.0203019679, 0.0482706726, 0.1561700106, 0.005462952, -0.1677877903, 0.4472099245, 0.2200207263, -0.2076552808, 0.0784489065, 0.4788642824, 0.0905836076, -0.2312945426, -0.1678173542, -0.1623740792 ]
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.1062734872, -0.0072902739, 0.0222178102, 0.2218197137, 0.3199834824, -0.0804263577, 0.1759802401, 0.3901975453, 0.0343046263, 0.1756986082, -0.0845414326, 0.2548737824, -0.4288855493, 0.071998015, -0.0287584011, -0.0816465914, -0.0013920404, 0.0024747103, -0.0758354068, -0.0748342574, -0.4520988464, 0.1437271982, -0.1970937997, 0.0110386554, 0.0288926139, 0.0917717218, -0.1796931624, 0.0378205851, -0.2270138264, -0.6951411963, 0.0842947289, -0.1058668494, 0.0286654979, 0.5098220706, -0.0001164396, 0.0048180521, 0.5615227818, -0.0969977006, -0.2757413089, -0.6296266317, -0.1194717437, -0.3785986304, 0.2123196721, -0.055158928, -0.1251199841, -0.4211825728, -0.1600915045, -0.0245709345, -0.2853533626, 0.5097922087, 0.1826966852, 0.3170954287, -0.1970277131, -0.370269686, 0.1295915842, -0.443513453, -0.0542088896, 0.2791593671, 0.068803139, 0.0893619433, -0.3565911055, 0.277895689, -0.1672198176, 0.0977170467, 0.4126307368, -0.0599434376, 0.7112178802, -0.0169462375, -0.0244267918, 0.0683050752, 0.2693005204, -0.0594062172, -0.3265317082, 0.1645625085, -0.0124040432, -0.5957029462, 0.1381163299, -0.033666376, -0.1020849794, -0.2063249052, -0.3794079125, -0.1562569141, -0.007180132, 0.2209167033, -0.2712136209, 0.3870168626, -0.1360195279, -0.0998499691, 0.5003241897, -0.0388078615, 0.180091083, -0.0616369657, -0.3171213865, -0.0552310348, -0.2707424462, -0.1092249081, 0.094979994, 0.2227654457, -0.031681668, -0.0119896084, 0.0349356793, -0.0800453648, 0.0522043072, 0.1384292692, 0.3684634268, 0.4071959257, 0.2165306211, -0.1421269178, 0.2275404185, 0.2707017362, 0.0833950192, -0.0756216943, 0.2968887389, -0.2845103145, -0.0679680407, 0.3694413304, 0.0975964814, -0.2575011849, -0.354873389, 0.1660372615, -0.2789394855, -0.0550791137, 0.404533118, 0.4178310037, -0.3578875661, 0.2669000924, 0.2166232914, 0.3325397074, -0.0326589867, -0.0041469298, -0.1672388762, 0.0001239125, -0.3007434309, -0.1598049104, -0.1282816231, -0.3283574879, 0.3711369932, 0.1049493849, 0.4938422143, -0.1525182426, -0.1196288168, -0.0951240063, 0.0839676559, 0.1391267478, 0.0361173674, -0.1184329912, 0.2583684027, -0.4067993164, 0.093779549, 0.1375786364, -0.3253022134, -0.1255244911, -0.0380000025, 0.1357335746, -0.1714644134, 0.1331059635, -0.2497183532, 0.1519283056, 0.1851922423, 0.0763435364, -0.2300547063, -0.236528784, -0.211200729, -0.274397999, 0.0838535056, -0.0675427467, -0.0719909668, -0.0643367469, -0.0047455989, 0.2580304444, 0.0987975225, 0.1628796458, 0.0601909086, 0.1947443038, -0.1199280769, -0.4076299369, 0.2281284928, -0.4222311378, -0.0846989006, 0.0330411606, -0.1003819406, -0.1777201295, 0.0184924342, -0.0879657492, 0.1359379292, -0.2058129609, 0.5759730339, -0.2368005365, -0.0427049696, -0.125195846, -0.3218888044, -0.2253403366, 0.0200863872, -0.1174826249, 0.435153842, 0.3503580391, 0.0471099354, 0.4298741817, 0.0101368111, -0.3278263211, -0.0130371954, 0.2420765758, 0.3168124855, -0.2888851762, 0.2373010814, -0.0589066595, -0.014364142, -0.0380504802, -0.137141943, 0.293800354, 0.0554154851, 0.0134858936, -0.1908235252, 0.0431649238, 0.0552902445, 0.2678288519, 0.1259252578, -0.0428628549, -0.2989122868, 0.2762337923, 0.0067476854, -0.3360527456, -0.2650054693, 0.0583854392, 0.20530653, 0.0922114477, -0.1258651614, -0.2059825957, 0.1046517342, 0.3960453868, 0.3106924295, 0.056085106, -0.1756463349, 0.117861703, 0.2674859762, -0.2520058155, -0.0785714611, 0.4476385415, 0.4362252057, -0.0137379766, 0.0325252116, 0.4991460443, 0.0985599756, -0.1266162395, 0.2538797557, 0.4040437937, 0.0748698264, 0.1763364375, 0.0878889784, 0.2562080622, 0.0964245349, 0.0888751596, 0.0462801829, -0.213458851, 0.3034287095, -0.2395791113, -0.0124709904, -0.3341285586, -0.0273538977, -0.0680246428, 0.438927412, 0.1797918081, 0.1811547279, 0.0823636502, -0.0461515449, -0.0485803485, -0.1481970251, -0.06491974, 0.3559917808, 0.0830439106, 0.1323617697, 0.3042525053, 0.0315918513, -0.2434705496, 0.229939878, 0.1900540143, -0.2009668797, -0.0143523999, 0.1885911077, -0.1266467571, 0.1589464396, 0.1349477619, -0.0589857064, 0.352466464, -0.3869653642, -0.0252724253, -0.3195978403, 0.2235096246, -0.0465925634, -0.2895771265, -0.2419312447, -0.3839186728, 0.0785665959, 0.5633404255, -0.1721506119, 0.2836774886, 0.2250234038, 0.2812375128, 0.0664491355, 0.4272819459, 0.2186662257, -0.3022627234, -0.1205075383, 0.0455396362, 0.2007763088, -0.371858567, 0.1317171007, 0.0621052384, 0.0519474223, -0.312545836, -0.4706139565, 0.0956865251, 0.0487275235, 0.5173869729, 0.3060545921, -0.1674261093, -0.1922735274, 0.0310936049, 0.2899301946, -0.0361485444, -0.0908921659, 0.211029917, -0.2417313755, -0.086290665, -0.3249901831, -0.0833848566, -0.0758276507, -0.4211906493, -0.0845587701, 0.1301462352, 0.1021901518, 0.1177110672, 0.0031333826, 0.3794730306, 0.3393115997, -0.2537637949, -0.1313803196, 0.0278126895, -0.1283528656, -0.2453272045, -0.5491185188, -0.0731103867, 0.2241437286, 0.2258106321, -0.0659758225, -0.3508486152, -0.7318808436, 0.3000257611, -0.0032866597, 0.1589717567, 0.1296346933, -0.0681935996, 0.1262822002, -0.1781276017, -0.2250602096, -0.0352244452, 0.1025235802, 0.0331361964, 0.2410033941, 0.1788247526, -0.0349805951, 0.3686442673, 0.7059161067, 0.2269937992, -0.2379547805, 0.303668648, 0.135371238, 0.4072168767, -0.0264266878, -0.3088987768, -0.1735411286, 0.1025478318, -0.1601961851, 0.3309652805, -0.1620675623, -0.1369142979, -0.0541628301, -0.0518588424, 0.2931029499, -0.0336518399, -0.0468550324, -0.4473406374, 0.0542359985, -0.0050660446, 0.1837350279, -0.1927819401, -0.225831762, -0.0249956511, 0.1985559762, -0.0877371952, -0.1020567343, -0.0756953806, -0.5518881083, -0.2223023921, 0.4270268977, 0.2587657571, 0.3232918382, -0.2660306394, 0.1894871294, -0.110907644, -0.0832201838, 0.4132604301, -0.3680095673, -0.2397204489, 0.0916132331, 0.0217400268, -0.1438001692, 0.1161425114, -0.1778074503, 0.1660715938, 0.3169511557, 0.3760710955, -0.0251739472, -0.2788379192, -0.0359645858, -0.0113212764, -0.0535284057, 0.1029185206, -0.1676891148, -0.4124308228, 0.0450771078, 0.2923707962, -0.065245159, 0.2904183865, -0.1708579659, 0.0626643151, 0.0301398095, 0.1009010077, -0.0013062209, -0.1361407936, 0.1180527285, -0.1802487075, 0.0078084767, 0.0204730239, 0.0319023952, 0.4550200403, 0.0060106609, -0.2917797863, -0.1813062727, 0.1308018118, -0.1310531795, 0.244394213, 0.2665786743, -0.2280216068, 0.1538260877, 0.0599578358, 0.1282738745, -0.0326255895, -0.2780758142, 0.1886826754, 0.165704608, -0.2918077111, -0.2890517712, 0.2140418589, 0.1921145767, 0.0039766133, 0.333795011, -0.1459440887, -0.3020853698, 0.2901755869, 0.2580896318, 0.7199825644, 0.1772865653, 0.0621617213, 0.267811656, -0.0248081088, 0.3369646966, -0.0011282414, 0.2272084206, -0.3251258135, -0.1819222569, -0.0510064363, -0.0912291929, 0.0903948173, -0.2549564242, -0.4692077041, 0.3571285903, -0.3386453688, 0.0684280097, -0.0027006902, -0.0616372414, 0.0340330675, -0.1055298448, -0.1815973669, 0.1450162083, -0.0471084975, -0.0551433414, -0.1813327372, -0.1496154517, -0.1351153702, -0.2093957365, -0.2244067192, 0.0030921847, -0.0500720255, 0.0792427361, 0.0922348052, -0.1890146732, 0.0159308314, 0.0483717434, 0.6843810081, 0.138976261, -0.1221344918, -0.0896776393, -0.3120185435, 0.3602882326, 0.182404995, 0.0228051394, 0.1903820783, -0.1521885097, -0.1710989177, -0.0263636075, 0.038220901, -0.2362460792, 0.2422465086, 0.1380507946, -0.5968797207, 0.0490750857, -0.0457347967, -0.1342943013, 0.0736133754, -0.150298506, 0.1262631267, 0.0150176585, -0.3940703571, 0.1426135153, 0.0255686957, -0.1432812363, 0.1711680889, 0.4133885205, 0.3825073242, -0.0730058923, 0.2826302946, 0.0793984085, -0.0198941752, -0.1597783417, -0.1873874068, -0.1054575443, -0.1161091477, 0.5724232197, -0.0795718059, -0.1791671813, 0.056434717, 0.558701694, 0.0625021607, 0.4060672224, -0.2007859349, -0.2350217104, -0.2174000442, 0.1329995096, -0.3143024445, -0.0420991108, -0.3033981323, 0.0969730467, 0.0013459474, -0.0066053793, -0.282790184, 0.0291472077, -0.5816063881, 0.2390805483, 0.0347583778, -0.0798225403, 0.213829726, 0.1546038985, -0.0672047213, -0.0371854976, -0.5296415091, -0.1155347675, -0.2056088597, 0.1222663969, 0.2622717619, -0.018674029, -0.0507427864, 0.0401779637, -0.0510659218, 0.0489720702, 0.0812328532, 0.2357848883, -0.1211951897, 0.1747648567, 0.0279383417, 0.2638655901, 0.4427061379, 0.1367004365, 0.1742114574, 0.0412109122, -0.1324892938, 0.2207813561, -0.0025748424, -0.021730639, 0.0557333156, 0.03621215, 0.0179560576, 0.1621978581, 0.1982879043, -0.247377038, -0.0484853201, 0.149721086, 0.2405908406, -0.1302977204, -0.0374735557, -0.0905085802, 0.060029678, 0.133046791, -0.1818067729, -0.2732085586, 0.1540731788, 0.2661509514, 0.0918545872, 0.1680224687, 0.5722920895, -0.181260854, 0.4379868209, -0.0577976964, 0.2492556274, -0.5429464579, 0.2392244935, 0.223896414, 0.2023125887, 0.2100300789, 0.2175000906, -0.0853963643, 0.0664066374, 0.3406586647, 0.0033975486, 0.3295251727, 0.498506397, -0.2298928052, 0.0517687313, -0.2210609466, 0.1668428928, 0.1557107866, 0.1768080443, -0.0390927643, -0.2176529914, 0.1408510059, -0.2812755704, -0.3672318757, -0.0805912018, 0.0971923992, -0.2728292942, -0.0136383399, -0.2616153359, -0.2562117279, 0.0258018076, -0.1278202385, 0.1950095743, 0.0901676193, 0.1426081061, 0.0604188964, 0.2087850571, -0.1284010112, -0.7600820065, 0.3565039933, 0.0087327659, -0.1113046259, 0.0361030847, 0.1557186842, 0.1052643359, 0.1129841954, 0.4749214351, 0.5415933132, 0.4865355492, -0.1846359521, -0.2029486597, -0.059855625, -0.0964690894, 0.0054021999, 0.3943560123, 0.2869700789, -0.2051617801, 0.0358296856, 0.0237962194, -0.1001323014, 0.677995801, 0.0031575542, -0.1738666892, -0.0836860985, 0.6400130391, 0.1307485253, -0.1503640413, -0.2051580548, -0.256360203, -0.3835417032, 0.2625058889, 0.6904423833, -0.1350449771, 0.1891409457, -0.0441589616, 0.0795023143, 0.1670890152, 0.2144991159, 0.2570817471, 0.1379097253, -0.4199149013, 0.0936603397, -0.2452677935, 0.196399346, -0.0202855058, 0.6180788875, 0.0736083537, 0.0504818186, -0.092695497, 0.062262062, -0.1004871428, -0.0657918602, 0.1433022916, -0.0475098155, -0.6162130237, -0.0039120438, 0.145624429, -0.2014159411, -0.0295915231, -0.1896530986, -0.2828019261, -0.1986449659, 0.0802240223, -0.181114167, 0.0271706581, -0.0432732664, 0.3224051297, 0.1463050395, 0.1675935835, 0.5402654409, 0.1617100239, -0.3007180691, -0.2196448743, -0.3226029873, -0.3023869395, -0.0873758197, 0.0282486416, 0.4219988585, -0.2259737253, -0.1336125731, -0.3583191335, 0.8097116947, 0.0864824951, 0.015209876, -0.2573974729, 0.4139165282, -0.2747878134, -0.0174310096, 0.1034037992, 0.1995461285, 0.224075377, 0.3738698065, -0.3511288762, -0.1526466906, 0.6073248982, -0.6849964857, -0.2127243429, -0.0282140728, 0.4172559381, -0.0590860061, -0.403463006, -0.5686312914, -0.2560310066, 0.2383514345, 0.0717150122, -0.2924546301, 0.0656687319, 0.0870304406, 0.1815016717, -0.0582494065, -0.5435274839, 0.0497680269, -0.3589710891, 0.1848370731, -0.2681566477 ]
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.1025828868, 0.0307520181, 0.0034683943, 0.172300607, 0.2973583937, -0.0995550156, 0.1647167802, 0.3669821024, -0.0618153363, 0.1189631671, -0.0670209527, 0.3194750249, -0.3788499236, 0.0334372893, 0.005309917, -0.0455292538, 0.048876822, 0.0500890538, -0.0283140726, -0.0415436551, -0.4338150322, 0.1561399102, -0.2037520111, 0.0674394071, -0.0014884286, 0.0320697725, -0.205600366, 0.0124584828, -0.2085182667, -0.7494331002, -0.0237539671, -0.0226648543, 0.0487859547, 0.4582437277, -0.0001134855, -0.0649085864, 0.5408963561, -0.0713074729, -0.2891864777, -0.5700896978, -0.0161661208, -0.4225824177, 0.2314776778, -0.1026178896, -0.0931411535, -0.4966786206, -0.0944118351, -0.0052620918, -0.174548015, 0.4718378484, 0.2129921019, 0.3863579929, -0.1674004346, -0.3329544663, 0.0664212555, -0.44478181, -0.0540234819, 0.2632971406, 0.0874251574, 0.043079257, -0.349920243, 0.2789092064, -0.1636087894, 0.0674253255, 0.3732298911, -0.035128843, 0.6463174224, -0.0362079665, -0.0175518692, -0.0167521164, 0.2616899908, -0.0798287839, -0.3455687165, 0.0525413752, -0.0400222093, -0.6671742201, 0.1051286459, -0.0665212795, -0.1253450215, -0.2333728224, -0.3577313721, -0.1747196466, 0.0175905079, 0.1906614602, -0.27184093, 0.4762357771, -0.1664233059, -0.0759520233, 0.3964942992, -0.0569944642, 0.1194900721, -0.0522869974, -0.2902079225, -0.065773055, -0.195422858, -0.1534585357, 0.1102755219, 0.1753435582, -0.0519044623, 0.0104950629, -0.0231146514, -0.0207916647, 0.0387968272, 0.0917938277, 0.3847594857, 0.4587343037, 0.2474341542, -0.1352372766, 0.2305124253, 0.2567481697, 0.1074836031, -0.1054221168, 0.21793513, -0.1991687715, -0.1020574197, 0.3530690372, 0.0771287382, -0.1486462355, -0.3942013085, 0.1839556694, -0.2494341135, -0.0700124651, 0.3418891728, 0.4307645559, -0.3583084643, 0.2780349553, 0.1595155299, 0.2922856808, -0.0373393074, -0.0542072766, -0.1841023266, 0.0287249461, -0.3161760569, -0.1576248705, -0.1969669461, -0.2060832679, 0.4018806815, 0.0567915551, 0.4840883911, -0.1494251341, -0.0577869825, -0.0591999069, 0.1026940793, 0.1377504766, 0.0340529755, -0.040423993, 0.2528172135, -0.465285182, 0.0712755173, 0.1340927929, -0.2421033382, -0.1026693135, -0.0363439694, 0.1629739851, -0.2597145438, 0.1191629767, -0.2604864836, 0.1404051781, 0.2097463459, 0.1001922339, -0.2383138239, -0.23536852, -0.193216756, -0.2761631012, 0.0805805922, -0.099849388, -0.054994531, -0.0592914186, 0.0014289953, 0.268746227, 0.1734395921, 0.2330852151, 0.0622671582, 0.2976828218, -0.1386231333, -0.2723981142, 0.2804916799, -0.3891468048, -0.0451328717, 0.0075010806, -0.1507260203, -0.1308650821, -0.0063751005, -0.1555443704, 0.274306953, -0.2414907515, 0.6387079954, -0.2098981142, -0.0234919209, -0.0919857696, -0.3614309728, -0.1873828322, 0.0221895576, -0.1704647243, 0.3997808993, 0.2793895304, -0.0004808865, 0.4381351769, 0.0573240891, -0.3086841404, 0.0102449544, 0.1429022998, 0.3598027229, -0.2083673924, 0.2066048682, 0.0043906122, 0.0301525146, -0.0903613195, -0.143029809, 0.2886418104, 0.0005859435, -0.0534161106, -0.1537871659, 0.0622516572, 0.0656034946, 0.2067132443, 0.1687726527, -0.0656763464, -0.3247300088, 0.261458993, -0.0777015537, -0.3801074028, -0.2696734667, 0.0930505469, 0.1923232228, 0.0451431125, -0.1129510775, -0.1805782914, 0.113010183, 0.4350062609, 0.3111205995, -0.0321294591, -0.1447534263, 0.1643627286, 0.2113058865, -0.232655406, -0.0815262645, 0.4597380161, 0.4157806933, 0.0603645593, 0.0278826114, 0.4788334668, 0.0670261979, -0.1000906006, 0.2037341893, 0.4495794475, 0.1506351084, 0.1320400536, 0.1151874661, 0.2695249021, 0.1095168814, 0.1239703745, -0.0123752244, -0.2585498691, 0.2444450259, -0.2514768243, -0.059975341, -0.3223249316, -0.0368464738, -0.0281213522, 0.4343465567, 0.149500221, 0.1949959695, 0.0555025972, -0.0568949953, -0.089300029, -0.0794317648, -0.141132772, 0.3705002069, 0.1090406552, 0.175140813, 0.2766387761, 0.0335928202, -0.288418293, 0.2643553615, 0.2360637933, -0.2386016995, -0.0717690587, 0.2106546462, -0.0873401314, 0.1041121334, 0.1218272522, -0.015099369, 0.340274781, -0.3700839877, -0.0135860965, -0.3047517836, 0.1540881544, -0.0464745499, -0.2822911739, -0.2647284269, -0.4586756229, 0.1253719032, 0.5365673304, -0.2035598457, 0.3060357869, 0.2197270095, 0.3430368602, -0.0040900558, 0.4481112957, 0.2011853456, -0.2738152146, -0.1592061371, 0.0607996285, 0.2161760777, -0.4423587024, 0.192690447, 0.0231076628, 0.0449753106, -0.3382918239, -0.5410553217, 0.1346268803, 0.0187817533, 0.5171118379, 0.309127152, -0.1555640101, -0.2226473391, 0.0494297557, 0.2618092895, -0.0502666831, -0.0712888539, 0.1240149736, -0.2022915184, -0.0897509009, -0.330417335, -0.1338537186, -0.0362833031, -0.4213838875, -0.0046852659, 0.1267531812, 0.145847708, 0.1624978781, -0.0917061865, 0.3000640273, 0.2218311578, -0.2381511629, -0.1674541682, 0.0321862251, -0.1012240052, -0.2741953135, -0.5269028544, -0.0320388228, 0.1731411219, 0.2774199247, -0.1411881596, -0.266264081, -0.7050460577, 0.2729970515, 0.0149006173, 0.1656220257, 0.1455551386, -0.0736352429, 0.1229066402, -0.2186597586, -0.1856949925, -0.0137089267, 0.0625976622, 0.0388247631, 0.2608799636, 0.1186242402, -0.026542481, 0.3920223713, 0.7582390308, 0.2077151537, -0.2172788978, 0.225067094, 0.0890222862, 0.4650034904, -0.0440360978, -0.2433436215, -0.1683038771, 0.0978556648, -0.1787170023, 0.4105876684, -0.1375829577, -0.1326862872, 0.0024823695, -0.0907586738, 0.2721268535, -0.1075221151, -0.0025519747, -0.4442730248, 0.0620433874, 0.0377651826, 0.2141907513, -0.1999804974, -0.2447485924, -0.0738617331, 0.17222929, -0.0853312165, -0.1359672397, -0.1858637929, -0.5356900692, -0.2991845906, 0.4534090459, 0.1427954882, 0.4406173229, -0.1912415475, 0.1218813211, -0.0776235983, -0.075407818, 0.4426031113, -0.2954182625, -0.3221555054, 0.0678029954, 0.0504136309, -0.127724722, 0.0715709403, -0.18364577, 0.2224704474, 0.3943437338, 0.4560621083, -0.0618277714, -0.3682317436, -0.0891578346, -0.015008349, -0.0613367334, 0.1047880054, -0.1913549602, -0.4135425687, 0.0008695424, 0.3236660957, -0.023224242, 0.2896871865, -0.1676886678, 0.0767334402, 0.0855686143, -0.0248729438, 0.0633713976, -0.1107605249, 0.0915858299, -0.124224931, -0.0088210776, 0.0352122895, 0.097597152, 0.4031940401, -0.0614821613, -0.243650347, -0.1201556623, 0.1217564568, -0.0821396187, 0.3428159058, 0.3620160818, -0.2411071509, 0.1716367602, -0.0573204756, 0.2196193039, -0.0515447557, -0.1894410998, 0.1967513263, 0.1235134006, -0.3297773004, -0.2535514235, 0.1763496995, 0.1899453998, -0.0582580864, 0.3350790739, -0.1732221246, -0.3365858495, 0.3295785785, 0.2607649565, 0.7838842273, 0.158783704, 0.1453652382, 0.2241970301, 0.0076920092, 0.4496665895, -0.0850996599, 0.2854070663, -0.3297618628, -0.1069128215, -0.0175763927, -0.028336972, 0.0765312314, -0.2744086683, -0.4212643802, 0.3958387971, -0.3130149841, 0.1119675934, 0.0476608574, -0.0193147361, 0.0017609037, -0.1346184462, -0.1763067544, 0.1434061229, -0.050991796, -0.0638146177, -0.1985662133, -0.1533886194, -0.0887428671, -0.2491593063, -0.2029889822, -0.0465080366, 0.0008170344, 0.0500568785, 0.1021751836, -0.1325032562, 0.0101591423, -0.0453756377, 0.6511394382, 0.2024533153, -0.0967986807, -0.0861034691, -0.3375154734, 0.3422824144, 0.1619882584, 0.0377239138, 0.2105179727, -0.1257283837, -0.0671117753, 0.0216036681, 0.0543295741, -0.1683904827, 0.1029611826, 0.1180797592, -0.4746000767, -0.0123661719, 0.0147314407, -0.1293437034, 0.0227096826, -0.1549340636, 0.1451230645, 0.0443018451, -0.4271368086, 0.2010453492, -0.00838135, -0.1178948507, 0.1374216378, 0.3740793169, 0.3873313069, -0.1296365112, 0.3213079572, 0.0294977874, -0.0242389478, -0.1934432685, -0.1587311029, -0.1021234244, -0.0283008516, 0.526784122, -0.0159637965, -0.1582407951, 0.0393528379, 0.6108918786, 0.0679974854, 0.3737490475, -0.2151810527, -0.2402606606, -0.2137262523, 0.1524187326, -0.3421458602, 0.0357893296, -0.2687770426, 0.15984568, -0.0483095124, -0.0675326735, -0.3256034851, -0.005327899, -0.5822659731, 0.228189826, 0.0019557383, -0.0447119065, 0.1777946949, 0.1672753096, -0.0269951411, 0.0087779928, -0.5163071156, -0.1283085048, -0.1641364396, 0.1332287788, 0.256881088, 0.0015649013, -0.033798866, 0.0868804455, -0.0358156897, 0.0137618817, 0.0513419658, 0.224925667, -0.1380155683, 0.1345113516, 0.0531314462, 0.3093577623, 0.4541189671, 0.016851373, 0.211428538, 0.1103708297, -0.131070137, 0.2171842456, -0.0491006039, -0.0213714391, 0.0826737732, 0.0668936372, 0.0013301335, 0.2075707167, 0.1935934871, -0.200603053, -0.1441448629, 0.1552374661, 0.2286742032, 0.0008657649, -0.0579907931, -0.1737777144, 0.1117399335, 0.1524031013, -0.1537356526, -0.2560846806, 0.082869567, 0.2873781621, 0.0435164645, 0.237654075, 0.6414464712, -0.1512836367, 0.389393419, -0.0593386479, 0.3311496675, -0.5056809783, 0.2554983199, 0.1255845875, 0.1752374917, 0.206827879, 0.274823606, -0.1083731502, 0.0928040296, 0.3665816486, -0.0058931559, 0.4253589809, 0.5238862038, -0.1939540207, 0.0416302383, -0.2242092788, 0.1587412059, 0.108646825, 0.2729482949, -0.0232507326, -0.2108725011, 0.0915462673, -0.2629573047, -0.3100193143, -0.1211335957, 0.1296384037, -0.3028593659, -0.0189115852, -0.2903175354, -0.2848829925, 0.0099467486, -0.1718784869, 0.1598357707, 0.058996588, 0.0714223459, -0.0249304771, 0.1933350265, -0.0902363956, -0.6897415519, 0.2785592079, 0.0477245301, -0.180676803, 0.097198911, 0.0878418386, 0.1024546549, 0.0077936314, 0.4235358238, 0.5571833253, 0.5265239477, -0.1513025314, -0.2116869986, -0.1038866043, -0.0789822936, 0.0074870065, 0.4405220449, 0.2474871874, -0.2089949697, 0.0488190427, 0.0464875996, -0.1254561394, 0.6335599422, 0.0618401207, -0.2150236964, -0.0572174191, 0.6917788386, 0.1169631183, -0.1868629158, -0.1524780691, -0.26170367, -0.4149160683, 0.2753246725, 0.7080233693, -0.0909690261, 0.1992949545, -0.1455475539, 0.1045817733, 0.1784867495, 0.2287336588, 0.2525067627, 0.1226942167, -0.4430890083, 0.0635413378, -0.274946779, 0.2051918358, -0.0078025302, 0.5662415624, 0.0571239628, 0.0373442695, -0.0386764333, 0.065740332, -0.1301500201, -0.0293793287, 0.064019613, -0.1114689857, -0.5865778923, 0.0228966698, 0.1776906252, -0.1765094995, -0.0187858418, -0.1661438346, -0.2150132954, -0.2838036716, 0.090825513, -0.2027360052, 0.0361501127, 0.0451819673, 0.3070928156, 0.1492673755, 0.2019898444, 0.4724560082, 0.1372265369, -0.262591809, -0.1933425516, -0.2765472531, -0.3023958802, -0.0688930377, 0.0031626001, 0.3741803169, -0.2008825094, -0.1248794198, -0.3668100238, 0.6668749452, 0.0820671469, 0.0217171311, -0.2482246459, 0.4603608847, -0.3204938769, -0.0269620642, 0.0846243352, 0.2409328818, 0.1729374379, 0.3077315688, -0.3895663619, -0.2265737206, 0.62564677, -0.7567942739, -0.3048578501, -0.0389305428, 0.4279530942, -0.0262926295, -0.380173862, -0.535605073, -0.2704558372, 0.2905355096, 0.0874241441, -0.3660975099, 0.0387880839, 0.0568867065, 0.1276488006, -0.067171663, -0.4462120831, -0.0022063665, -0.3939635456, 0.1510464698, -0.3153621256 ]
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.3504600525, 0.0476952642, -0.1798268855, 0.1780565679, -0.0401049964, 0.0907022506, 0.2102559507, 0.0325839855, -0.207945317, -0.0521603748, -0.0914575383, 0.2889950275, -0.3860353231, 0.2393020093, 0.0081773214, -0.2751591206, 0.0485755205, -0.1197367534, -0.0523764454, -0.1522303969, -0.2527980804, 0.2394454926, -0.0691752732, -0.3075847328, -0.1811059117, -0.0353652984, -0.3153687418, 0.0952790827, -0.0668419227, -0.2999734581, -0.0394036584, 0.062655881, 0.0979470611, 0.2279054374, -0.0001061797, -0.2723766565, -0.0213431381, -0.0787592158, -0.0399520807, -0.3420126736, -0.1925268471, -0.5444471836, -0.1018267423, -0.0767770931, -0.3466023207, -0.0490744188, 0.0083700195, -0.3613846302, 0.060538087, 0.5007580519, 0.256538868, 0.0859354585, 0.1024276614, -0.0976421013, 0.2727009356, 0.1102412269, -0.224194169, 0.4792918265, 0.3978052437, -0.0129568689, -0.1251176, 0.3853278756, 0.0855678096, -0.1745482832, -0.2359006405, -0.1055126637, 0.3037681282, -0.4347402751, 0.2402413934, 0.4121544361, 0.4717879295, -0.0578594618, -0.0302898735, 0.0187113881, 0.2011543661, -0.1232531369, -0.1241775006, 0.4248023927, -0.1183528304, 0.2057820261, 0.2912895381, -0.2708721757, -0.1782758832, 0.2673752606, 0.0062590167, 0.5904615521, -0.0948562026, -0.0398363024, 0.0286298413, 0.0630983263, 0.0894318968, -0.055979643, 0.021611942, 0.0299717933, -0.0069939792, -0.1323747784, 0.1900783032, 0.0338907614, -0.0118481517, -0.5495747328, -0.2824371755, 0.1264006793, 0.0002329908, 0.2171895206, 0.1047804281, -0.1002691761, -0.0895595625, -0.1077381447, 0.0900658965, -0.6283731461, -0.0414236076, 0.1344915628, -0.0186327342, 0.2106274217, -0.2073097825, 0.2827199399, 0.0501630157, 0.0374762192, -0.1497849822, 0.0202478617, -0.0945361629, -0.1005708799, -0.062653102, -0.0025818944, 0.2395418733, 0.336565733, -0.2852637172, 0.4120232463, -0.0436525568, -0.2059770375, -0.0120766107, 0.298641026, -0.4672502279, 0.2174861282, 0.2671691477, 0.3142030239, -0.1296133101, 0.0681928173, -0.1805098951, -0.0437333956, -0.0008034632, -0.0104818568, 0.0942154825, -0.2559865713, -0.1792082638, -0.173566103, 0.1549898386, 0.0668148994, -0.3196915388, 0.1501157284, -0.2282114923, -0.1416859478, -0.4731709659, 0.1578962058, 0.2616531551, -0.2436592281, 0.0642132312, 0.8632782698, 0.0825071037, 0.0251895934, 0.1984637976, 0.1562654972, -0.3449944854, -0.0244766735, -0.3151109219, 0.3379442096, -0.2713029385, 0.0985440463, -0.3621906042, 0.1460315883, 0.4985351562, -0.1491979361, -0.2632511854, -0.064669542, -0.0307395551, 0.1373831183, 0.0982733518, -0.1820760965, -0.1346077621, -0.0635988265, -0.2748343349, -0.1773218513, 0.3722851872, 0.3560857177, -0.0993724316, 0.0530081019, -0.2976563871, 0.197338745, -0.1643757671, 0.1864759922, -0.2438932359, 0.0223284885, 0.3751323819, 0.2322486043, 0.1834984124, -0.1514345407, 0.3337680101, -0.111069113, 0.1882600337, -0.0859177411, 0.0978522003, 0.0397928841, 0.3091089129, -0.247425735, 0.0880563259, -0.187676996, -0.425146699, -0.195761025, 0.0680516139, 0.5277488232, 0.0006936863, -0.2496935129, -0.1992039382, -0.1998840272, -0.0813731551, -0.2588810921, 0.2315971255, 0.2079892009, -0.1649477035, 0.3441866338, 0.0444371998, -0.1457086951, -0.1748244613, -0.1963101327, 0.0520573966, 0.3023568392, -0.1225664988, 0.1410600394, 0.245660454, 0.3988872766, 0.0367087387, -0.0794373676, -0.0863954723, -0.0437923595, -0.1423496157, 0.1276962906, 0.4605620801, 0.353047967, 0.2352760881, -0.5769770145, 0.0520047992, 0.0045329798, -0.032256458, -0.0442244634, -0.1316454262, 0.5089739561, 0.2918946147, -0.0439191088, -0.1299796253, 0.0080994144, 0.2802171111, 0.1063907146, 0.1076647714, -0.2521215975, 0.1961374134, 0.2229686379, 0.2231803089, 0.0003106724, -0.2700791955, 0.3575139642, 0.4288187921, 0.2195139229, 0.4198084772, 0.198083356, -0.1720624566, -0.1587090492, 0.194911927, 0.3316394687, 0.3206739426, 0.2881239653, 0.2182106972, -0.1101257801, 0.1997353137, -0.2270748019, 0.0574111082, -0.2346522212, 0.0194468759, 0.1496639997, 0.297722429, -0.0787325203, -0.3853931725, -0.0284578204, 0.1682718098, 0.1194267273, 0.2478952855, 0.0757955536, 0.0107711703, -0.3028210998, -0.1325544268, -0.0371493325, -0.3319296241, -0.0881228298, 0.2266664505, -0.1962449253, 0.0135380924, 0.1910295486, 0.0738744959, 0.6659821272, -0.2408094853, 0.3134452403, 0.0946906805, -0.3747076392, -0.1084233522, 0.1872623414, 0.3665881753, 0.0572729483, 0.4213939011, -0.0802010521, 0.0244264305, -0.1391048133, -0.3946220875, 0.1376084387, -0.1326621324, 0.0045509748, -0.2764541507, -0.2783458233, -0.2011666596, -0.2879024744, 0.0679924637, 0.242207557, 0.048818104, 0.0968866497, -0.2544698119, -0.0422847569, -0.0170374364, -0.584031105, -0.5971542001, -0.3213184774, 0.1237818897, -0.4896153212, 0.0652241558, -0.1523712575, -0.1793897897, -0.076126799, -0.1064795554, 0.0808063671, -0.1429604888, -0.1013495177, 0.1082435846, -0.4424517453, -0.2948850095, -0.2282621711, -0.1236578971, 0.30145365, -0.1130215228, -0.3047883511, -0.0105101429, 0.0000252668, 0.2592220604, 0.2193440497, -0.1279329956, 0.3854501843, 0.1799131334, -0.2204763889, 0.1150019765, 0.1998904794, -0.029993549, 0.1024782211, 0.1932315826, -0.1513635963, 0.1441394985, 0.2045750022, 0.6741437316, -0.2040859163, -0.2150017917, 0.3979617059, 0.064744316, 0.275273174, -0.1986930072, -0.488043189, 0.0617456436, -0.146840781, 0.1192882732, 0.4349209964, 0.145207569, -0.6007018089, -0.1493842304, -0.0440624543, -0.2372515798, -0.1192615479, 0.4779385328, -0.1192412376, 0.4893440604, -0.0604410246, -0.4806216955, -0.1466924995, -0.463752836, -0.052448526, 0.3658187985, -0.097931914, -0.2127047777, -0.3793237805, -0.2370932549, -0.4760769308, 0.1658680588, 0.2960686088, -0.0070887692, -0.277367115, 0.1327594966, -0.053599637, 0.1378533691, -0.0471147932, -0.251793921, -0.2112855017, 0.2253708541, 0.1360319257, 0.2857649028, 0.1675662696, -0.2783945501, 0.3581990898, 0.3128784299, 0.0537660718, -0.1441446245, 0.0092228353, 0.1048770994, -0.1199763119, -0.0164663941, -0.2579379082, 0.2546908855, 0.2651934028, 0.0405315235, 0.2060284317, 0.0771801323, 0.013142176, -0.0574987903, -0.0795523375, 0.2969717979, -0.1456535459, 0.1984930485, -0.0233264156, -0.2609377503, 0.4214572608, -0.0801087469, -0.4275276363, 0.076788649, 0.476467669, 0.3444791436, -0.3277987242, -0.3228873014, 0.0871998221, -0.6639156342, 0.46968925, 0.1570405066, 0.2391201556, 0.2240026891, -0.0443973541, -0.1164851338, -0.1286984533, 0.1328662634, -0.0400877446, 0.1218543798, -0.2763405442, -0.0844314173, 0.3336796463, -0.1783898175, -0.1271011829, 0.0463325754, 0.0429405384, -0.1024375036, 0.1454385966, -0.1845742613, 0.9991680384, 0.0421381891, -0.0390668139, -0.1620027125, 0.0415903479, 0.368296504, -0.4186356664, 0.0810639858, 0.0249309242, 0.2886130214, -0.010603644, 0.2014370263, 0.0217225961, 0.4168000519, -0.2594114542, -0.1328705698, -0.0949498489, -0.3697197139, -0.1294361055, 0.3930040002, 0.14451617, -0.3100062907, -0.0702933371, 0.1513937116, 0.1585782766, -0.0640836954, -0.0977442116, -0.078407675, 0.1131890118, -0.0263167322, -0.5851589441, -0.1633251011, -0.1404447854, -0.0010685977, -0.3791240156, -0.4034355879, 0.4643148482, 0.108878918, 0.119795762, -0.0816846639, -0.0747465342, -0.0481381603, 0.0761648566, -0.0824099034, 0.1130243987, -0.2577240169, 0.1517162323, -0.1179750413, -0.1456616372, 0.3262196183, 0.0533523075, -0.2974795103, -0.1739799231, -0.0022871867, 0.3571196795, 0.1794330478, 0.2065736651, 0.4325197637, -0.1237894073, -0.1778424084, 0.25515154, 0.0903266221, -0.0567393675, -0.0667490885, 0.0631638318, -0.0904907957, -0.2605323493, 0.1119602099, 0.358951211, 0.0481436923, -0.0543600395, 0.3596835434, -0.1761042327, -0.3980857134, 0.2156865001, 0.4703176618, -0.3415983319, -0.2643130422, 0.0983723328, -0.2792687118, 0.0947733521, 0.1272607744, 0.0722857341, -0.076164104, -0.0338221192, -0.2948747873, 0.0781951621, -0.1039994955, -0.1449817419, -0.0626111031, -0.1448179483, -0.0697874725, 0.1207154021, 0.5719765425, -0.3960478306, 0.0132713243, -0.1148023605, 0.3371841908, 0.3385549188, 0.1901919842, 0.1771302223, 0.1263930202, 0.0809034482, -0.2876850665, -0.1552656889, -0.2474002391, 0.0746277571, 0.126308918, 0.0042046383, 0.1544846594, 0.2634318173, -0.1682385653, -0.1326877773, 0.0997380018, -0.0896563977, -0.0885654315, -0.2006297559, 0.2484870553, -0.0242496878, 0.1026361585, 0.1923002005, 0.070118174, -0.060551133, 0.4121597409, 0.110279724, 0.3135125637, 0.2025724649, 0.0406647325, -0.226490736, 0.0480804369, 0.1162045449, -0.0264303088, 0.0195070133, 0.3126188815, 0.0909892246, 0.2852867246, -0.0029832162, -0.306788981, -0.1718095988, 0.262252599, 0.1899766326, 0.2933298349, -0.2764182687, -0.1160560101, -0.0123241907, -0.1363573968, 0.3736110926, 0.2231893092, 0.5580359697, 0.0558355302, 0.3407670557, -0.1281920671, 0.2126195282, -0.1000775099, 0.1407821178, -0.2668403685, 0.073198542, 0.1450911611, 0.2389806658, 0.0224509835, 0.1655886173, 0.0073100403, 0.172231853, 0.4492501318, 0.5488793254, 0.0749434531, 0.1833155751, 0.2571962476, 0.4761042893, -0.0145539418, -0.1138029844, 0.1058378294, 0.1011008695, 0.5873667598, -0.0996637195, -0.2136488557, 0.0050927401, 0.2641496062, 0.0209779982, 0.1223191917, 0.1888946593, -0.1931834668, -0.2949828207, -0.1077044979, -0.0582859218, -0.0591635965, 0.3235076368, 0.1896042675, -0.017216567, -0.0435148478, -0.1825183779, 0.0981007069, 0.1939060688, -0.2571991682, 0.2715387046, -0.0609122328, -0.1142500788, 0.0420161113, 0.2911754549, 0.0636654496, 0.1521029621, -0.1244271547, 0.008001484, -0.2051228136, -0.0687013492, -0.0833028704, 0.185326755, 0.222143501, 0.1677641273, 0.0907906741, 0.1673062444, -0.0428925753, 0.1316725612, 0.4447264075, -0.1616388112, -0.1065649763, -0.2647452652, 0.0569034144, 0.0685200542, -0.3800066113, 0.0482383408, -0.1828313917, -0.0134941209, 0.3872524202, -0.2341009229, -0.011123389, -0.2185672522, 0.1019931436, 0.0592905991, 0.2190639973, 0.1313596368, 0.1556181312, -0.2932220697, -0.3325884342, -0.3342853785, 0.1244107187, 0.043367099, 0.141953662, -0.2438904643, 0.0919459835, 0.3528184593, 0.4291575849, -0.2348552346, -0.095356375, -0.0262035057, 0.0503738523, -0.6079149246, 0.1129186153, -0.161067903, 0.178186655, -0.0642763153, 0.0717877001, -0.0605341382, 0.0821431875, 0.0979240313, -0.3729562759, -0.288081646, -0.0017775372, 0.3894967139, 0.3264065683, 0.098655656, 0.5398356318, -0.1891203225, -0.2432232499, 0.0601161458, -0.2482286543, -0.0344023928, 0.0884416103, 0.2808528543, 0.0784209073, -0.4055999517, -0.3906471729, 0.2368118614, 0.1843076944, -0.1191083416, -0.1633125842, -0.3069268465, 0.1217957288, 0.2452242374, -0.0172458328, -0.0886312947, 0.2369783521, 0.180403322, -0.2136700302, -0.0545985624, -0.1283065975, -0.0078331828, -0.1371268034, -0.173551634, -0.1268009394, 0.2104524821, 0.0174018759, 0.1700176895, -0.2431246638, -0.2548583746, 0.2900341749, 0.1148304492, 0.0799131542, 0.2578095794, 0.1249188781, -0.2490222901, -0.1825179458, -0.2241450995, -0.0429614335, -0.1331420094, -0.0737080872, -0.4327381253 ]
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.1573927552, 0.1101286113, -0.0568150096, 0.1280070245, 0.1705859303, -0.0684824288, -0.1548939049, 0.286128819, 0.0338807404, 0.2117181718, 0.0658876002, 0.5071399808, -0.3157268167, -0.415928781, -0.0771167353, 0.1456121355, 0.0106630623, 0.0505590402, 0.0162342042, -0.1306302547, -0.3281735182, -0.1376921684, -0.4366669655, -0.2426390648, -0.298976928, -0.1640272588, 0.0052831471, 0.0470127761, -0.2274966091, -0.4783438742, 0.019987233, 0.3617691994, -0.4792948961, 0.4746548235, -0.0001162967, -0.2271994054, 0.2232826054, -0.0738837719, -0.2772015929, -0.0804562643, -0.3944137394, 0.1710918546, -0.0294303782, -0.1011725068, 0.2029476613, -0.1530758142, 0.0347534791, -0.4851992726, 0.2687028348, 0.2786895037, 0.15997082, 0.0159432516, 0.0001697615, 0.0008202419, 0.4894809723, 0.1501082927, -0.1416639686, 0.1507803351, 0.177303195, -0.258905232, 0.0207061972, 0.2994832098, -0.2331483662, 0.2211963385, 0.2024494261, -0.2042768151, -0.2059485465, -0.2288378924, 0.3310017586, 0.2132775784, 0.2408332825, -0.3785223067, -0.3012785614, -0.1053986028, -0.0371070802, -0.2631697655, 0.3107366264, 0.2316162288, -0.0896452516, -0.1278471351, -0.2277660072, -0.1627266109, 0.1554199308, -0.0969649553, 0.1520405859, 0.3311274648, 0.0854249075, 0.0750736296, 0.5438082814, -0.043468032, 0.1729153097, -0.1118269861, -0.2220363021, 0.3620204031, -0.4009712338, -0.0684151202, 0.1164384931, 0.1214049906, 0.2701941133, 0.0775755867, 0.2510643601, -0.0182150342, 0.0698500723, 0.2189764678, 0.11721953, 0.3911764622, -0.0454114825, 0.2291887403, 0.2023366094, -0.0665106177, -0.1798822284, 0.0643793494, 0.0984605625, -0.2280787528, 0.0362017825, -0.1349886656, 0.0791309327, -0.2575395107, -0.1493142545, 0.145516932, -0.201639533, -0.274911195, 0.113930732, 0.5352530479, 0.2145726383, -0.0850820839, 0.0486499146, 0.0245820768, -0.0372560732, 0.130348444, -0.3592344224, 0.1180869043, -0.2858394086, 0.0910926461, 0.3312161565, 0.0103801191, 0.4083407223, -0.0821994543, -0.0767395794, 0.1427708864, 0.3175209165, -0.2982523441, 0.4927134514, 0.3478180766, -0.2853666544, 0.0245107487, 0.0233666617, 0.0859985054, -0.1818950772, 0.4057042301, -0.1047064513, -0.315454334, 0.3535188138, 0.1046304107, -0.0984292477, -0.0372052342, 0.0105704591, -0.0325794742, 0.4915997684, -0.3913599849, 0.3386234939, -0.2468026578, -0.0318355411, -0.3389360607, 0.0756420717, 0.1905240268, -0.2994282246, 0.0468249619, -0.3101516366, 0.0093932338, 0.1475358754, 0.4033977985, -0.0408294238, -0.3672427535, -0.2317583263, 0.1196081936, 0.277931422, -0.1551205516, -0.5335751772, -0.2240506262, -0.0394639596, 0.1237248033, 0.148185119, -0.0203215312, -0.0424617417, -0.1730811596, 0.5085960627, 0.0379993729, -0.0126271229, 0.1150692403, -0.2760390341, -0.0769599378, 0.345375061, -0.1851587892, -0.2285199761, -0.1318751425, 0.1136799306, -0.1366754472, 0.3384542465, 0.0672304183, -0.0678053349, -0.0848844498, 0.523665905, -0.2864762247, -0.1019462496, -0.0956443846, -0.091089569, 0.1867517829, 0.1332990974, -0.1971720755, -0.0885403454, -0.2106116712, -0.0276727192, -0.056378223, -0.1452712566, -0.3837923408, 0.0689068064, 0.1018492207, 0.123227641, 0.0783527493, -0.1650175154, 0.1610040069, -0.4800157249, -0.1713840067, -0.0109557491, 0.1475230306, -0.007187346, -0.2062903345, 0.0499239564, 0.1624584794, -0.0845243484, 0.0634027421, -0.3319532871, 0.3970720172, 0.269500494, 0.0723536909, 0.093589738, 0.1672171354, -0.0943984091, -0.1139779389, 0.2701924443, -0.1726678014, 0.1205781996, -0.0815214738, -0.1144953668, 0.2229023427, -0.2499859333, 0.0974670649, 0.2538140118, -0.1576069295, 0.3299957216, 0.2417398095, -0.1405290663, -0.2411240339, 0.3591742516, 0.1679525375, 0.3795503378, 0.2267788351, -0.2383550256, -0.0708893016, 0.6992045045, 0.283700496, 0.1699571609, 0.0535836332, 0.0313553698, -0.314579308, 0.2185156792, 0.4217038751, 0.5327519178, 0.1507370174, 0.1366886497, -0.0458083376, -0.0098618921, -0.0731765851, 0.3802340627, 0.0488996282, 0.0775539875, 0.1109739542, 0.2988070548, -0.185520947, -0.5816822052, -0.1974034458, 0.3076072931, 0.1843895167, -0.1164077669, -0.1214052588, -0.3387995064, -0.1370217651, -0.0874949247, -0.1034930199, -0.2300511152, -0.1256723702, 0.1022122949, 0.4080300629, -0.1954044253, 0.3857198358, -0.3336469233, 0.5002207756, -0.0102245882, -0.194237113, -0.2881377339, -0.2212341875, 0.1334692836, 0.0746024698, 0.1877979487, 0.1455860138, 0.3903836906, 0.3359343708, -0.1787648499, -0.0312283039, -0.2958875299, 0.0691655725, -0.1598298401, 0.1165886894, 0.000016205, 0.0856651589, -0.0761803612, -0.3799357116, -0.0507459566, -0.3272206187, -0.2472829968, 0.1441961229, 0.1873340309, -0.1622855067, -0.3767652512, -0.3460099399, -0.2578061223, -0.463139236, 0.3171486259, -0.08489196, 0.1214854866, 0.4202855527, 0.0141145848, 0.0793085471, -0.4065109789, 0.1262604892, -0.4711135924, -0.3016931415, 0.1513073891, -0.1811849773, -0.084897846, -0.0582174622, -0.1400679052, 0.2091390491, 0.3899399042, -0.1939365268, -0.0617895722, -0.4313780367, -0.1898047775, 0.0714064687, 0.1114424169, 0.4826929569, 0.1092969626, -0.1300194561, -0.2072772682, -0.1935294271, 0.2210787833, 0.3850800395, 0.165759474, 0.0406264663, 0.0668140799, 0.3262483776, 0.6937778592, 0.0598500818, 0.292989701, 0.236831218, 0.1813687235, 0.3728827238, -0.3469643593, -0.1049739569, 0.36124295, 0.1402890384, -0.3288645148, 0.094868131, -0.2270583957, -0.3511342406, -0.0471122637, 0.2294053286, 0.0816842094, -0.176145494, 0.0910459012, -0.1346185803, 0.0280180592, 0.2118985951, 0.0978680104, -0.2013153136, -0.1443095058, -0.1745393872, -0.0612666681, 0.2783506513, -0.1113700867, -0.5371742249, -0.3369064033, -0.4133481383, 0.3385953605, 0.0732975528, 0.7409524918, -0.1150698438, -0.2570548952, 0.113061063, 0.031174276, 0.5424144864, -0.1315328777, 0.0703376979, 0.2860824466, 0.1088635325, -0.1734212041, 0.0428575799, -0.3285351396, 0.1347726583, -0.2887094617, -0.2275043726, -0.2670066357, -0.1154418439, -0.0717204139, 0.0076807067, 0.0275268257, 0.157545805, -0.3131511211, 0.1189609766, -0.3537302315, 0.2048880607, 0.2223886847, -0.1562043577, -0.4568425119, 0.0531486496, 0.0876472667, -0.0443661846, -0.001111418, 0.1839966178, 0.6027072668, 0.0668462664, 0.0654248595, 0.2121333629, -0.3203265667, 0.2301210165, 0.3122935593, -0.1689054072, 0.2302592248, -0.0336302593, -0.0269167051, 0.3270861506, 0.437174052, -0.0666527972, 0.2152832747, 0.0755507499, -0.070016697, -0.1579744667, -0.0572541505, 0.2989971936, -0.146477744, 0.003427878, -0.6915040016, 0.2409240603, 0.4322822094, -0.1686565131, 0.8573560119, 0.0784560367, -0.1668887436, 0.3656112552, -0.0356801897, 1.1166887283, 0.1091565192, 0.0970484018, 0.1437730491, 0.0438762158, 0.0899270177, -0.0661745891, 0.2910057902, -0.0725255162, -0.5402420163, 0.1124226898, -0.3357087672, 0.2155231386, -0.1074569821, -0.3066194654, 0.2703739405, 0.1088065207, -0.0759078115, -0.0636953115, 0.0278352275, -0.3591056168, 0.0095764063, -0.0428426042, 0.0767822191, -0.0392095894, -0.0215325691, -0.0597062558, 0.0223248526, 0.049040854, -0.2968662381, -0.154902339, 0.0383192673, -0.209895134, 0.1892452836, -0.2458477616, -0.0086614192, 0.0586981475, -0.1383514106, -0.1002736837, 0.2575942874, -0.038110368, 0.4269352555, 0.5315417051, 0.2869334221, 0.092233181, 0.2054477632, 0.3232619166, 0.0497437567, -0.1855172813, 0.0617485754, -0.1750716567, -0.5215666294, -0.0882997587, 0.0091214646, 0.2101275325, 0.2104570121, -0.3420526087, 0.2466960996, -0.3974891305, -0.2043133974, 0.1140344366, 0.0952132419, -0.1253779233, 0.4969870448, 0.0045315633, -0.267677635, -0.0105168903, 0.4765643775, 0.0281230398, 0.2652393281, 0.4883903265, -0.1547874659, -0.1877838075, -0.2324956208, -0.3721443713, -0.0979961455, -0.1788607091, 0.2387908697, -0.1320292652, -0.3678798974, 0.1020922661, 0.2141322196, 0.0809840411, 0.4203980565, -0.1530862004, -0.3298023939, -0.321072638, 0.4822472632, -0.1216565818, 0.4010068476, -0.255494833, 0.1152671725, -0.1312904656, 0.2543551624, -0.3306413889, 0.0438498408, -0.0866945758, 0.2975471914, -0.0985955149, -0.0719029233, 0.0443645753, -0.1761744767, 0.0815107524, 0.353540659, -0.3803092241, -0.1887716651, 0.1281248629, 0.1591944546, 0.0792167261, 0.031946972, -0.1188534945, -0.5915081501, -0.0735406578, -0.22921893, 0.1576600373, 0.1029231548, -0.0979313031, 0.2407465279, 0.3533520699, -0.0703483745, 0.3893805146, 0.2689369619, -0.1864770651, -0.498657167, 0.0047508143, 0.0578368641, -0.1854456067, -0.1271500289, -0.1210960448, -0.0699628368, -0.3378582597, 0.2191348374, 0.0398981906, 0.0895158648, -0.2619170845, -0.1121973395, 0.3521636426, 0.6336425543, -0.0485647954, -0.2793468237, 0.3481560647, 0.1860112399, -0.3188646436, -0.2030694336, 0.0778348744, 0.3197862506, 0.201633051, -0.0069369674, -0.0450207666, -0.2190851718, -0.0726040378, 0.3098427057, 0.2485368848, -0.5961527228, 0.2809726, 0.1141278446, 0.0162179917, -0.1505065113, 0.1792104244, 0.2326968312, 0.3400193751, 0.3597923219, 0.0004892014, 0.3931155503, 0.4816122055, 0.0684742481, 0.087768577, -0.2693360448, 0.1169809625, 0.5212516189, -0.0955213979, 0.3057995141, 0.2569498122, 0.2468518913, 0.0996059626, -0.2025586069, -0.2280270159, -0.083102867, -0.1025750786, 0.0028622523, 0.1434672922, -0.3137082458, 0.0395567119, -0.1121043265, -0.0068381419, 0.1534910798, 0.6984444261, 0.1048737913, 0.0598905012, -0.3550285697, 0.2080313265, 0.117792137, 0.2147828341, -0.270375818, 0.1793625802, 0.1657559574, -0.0415784717, 0.3765405416, 0.273627311, 0.2136912495, 0.3082120121, -0.1811726391, 0.1040922254, -0.0340612903, -0.1599437892, -0.1944902539, 0.3913163841, 0.3522196412, -0.1744024456, 0.1435549557, 0.1338282675, -0.1224545017, 0.0188089907, 0.126418218, 0.1370449811, -0.2897324562, 0.2310367972, 0.2666771412, -0.0323877409, 0.133747071, -0.0725202262, -0.4232144952, 0.0295779705, -0.0952583253, -0.2903541028, 0.0419535749, 0.0068694092, 0.0609537736, -0.0908786505, 0.23847799, 0.1523757577, -0.1010505334, -0.1375355721, -0.2638490796, -0.8945606947, 0.1401762962, 0.1064956486, 0.11232391, -0.0922296345, 0.389257133, 0.0441303775, -0.1401147246, 0.0965879038, -0.1807503551, -0.023465924, 0.1317151189, -0.4472528696, 0.0266885683, -0.0620255135, -0.0675661936, 0.1009897515, -0.2585664988, 0.0665581971, -0.1518152058, 0.0168738514, 0.0684264302, -0.1055905223, 0.1257434934, 0.438549459, 0.3916808963, 0.0588670895, 0.3196922839, -0.0921980813, 0.1568846107, -0.3073197603, -0.2492427677, 0.0389407724, -0.3124742806, 0.0258388035, 0.5218635201, -0.236761421, -0.1749370396, -0.2347986698, 0.3725394309, -0.2896839976, 0.0679832995, -0.3461990654, 0.2034958601, -0.0127015412, 0.4027406275, -0.3385981321, 0.0093160458, -0.0445307195, 0.1489066929, -0.2840519547, -0.3808194697, 0.8212562799, -0.3352942169, -0.2349309027, -0.1738760173, 0.5242081881, 0.0427510552, -0.4556314647, -0.2740301788, -0.0482046455, 0.1213058382, -0.0840214267, -0.2470398843, 0.0919978023, -0.3285834491, 0.1826313883, -0.0695374236, 0.5346600413, -0.1046644077, -0.2599051595, 0.0749412626, -0.1796701103 ]
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.0392352976, 0.0279586166, -0.0443969145, 0.2410499305, 0.119721055, -0.0215086862, -0.2454706132, 0.2770645022, -0.0534346476, 0.210224092, 0.2128322124, 0.3744446933, -0.290227741, -0.5664212704, -0.0628235415, 0.2306986153, 0.0152335726, 0.07312949, 0.1307361424, -0.1656002998, -0.4095742404, -0.1315802187, -0.5240513086, -0.1571465433, -0.428753525, -0.1573804915, -0.0444145165, 0.117157191, -0.2388198376, -0.5017876029, 0.067852214, 0.2654940784, -0.4624952674, 0.4916148186, -0.0001249819, -0.3131681979, 0.2609166503, -0.0434023514, -0.1833147705, -0.0600504428, -0.4701530337, 0.3102066219, -0.1049665958, -0.158336997, 0.3272445202, -0.1766214073, 0.0549894944, -0.4825305343, 0.1730249077, 0.299412936, 0.0882784128, -0.0590315647, -0.0274075493, 0.0266635343, 0.3734091818, 0.0743079931, -0.0033936799, 0.212180227, 0.0776689053, -0.1164057106, 0.180020839, 0.1766789407, -0.3082757592, 0.2287974507, 0.1727747768, -0.2034925669, -0.2115484774, -0.1800234914, 0.307824105, 0.2102492601, 0.1988277584, -0.3202567399, -0.1345002055, 0.009254083, -0.0782133117, -0.202175349, 0.316580236, 0.2868348956, -0.0235547088, -0.0521015637, -0.1797530353, -0.2429481745, 0.1060217768, -0.0864026994, 0.0385791659, 0.2909688056, 0.0322966464, 0.2232926339, 0.51009655, 0.1254251748, 0.0449494086, -0.1143684313, -0.226014629, 0.3378561139, -0.4495309293, -0.0888589472, 0.1479338706, 0.1570462584, 0.3375701308, 0.0762880892, 0.1617087424, -0.0072402451, 0.0201303363, 0.1431000978, 0.1532425731, 0.4152944982, 0.0578298606, 0.1727071255, 0.1973047704, -0.0983938277, -0.1155521721, 0.1021899953, 0.0477518812, -0.2676827312, 0.0527642667, -0.0756468102, 0.2449694574, -0.2947059274, -0.1255387366, 0.1726622134, -0.3767855465, -0.3416078091, 0.0408685319, 0.5163067579, 0.2582121491, -0.1329900026, -0.0419683307, 0.0868415236, 0.0162563547, 0.0719358474, -0.3517906666, 0.1759071946, -0.2351176143, 0.094405219, 0.2889089286, -0.0556468703, 0.2828931212, -0.1205165684, -0.0619885884, 0.1201135218, 0.2415632904, -0.3670422733, 0.5084925294, 0.2985740006, -0.338980943, 0.0358221829, 0.0677112639, 0.1633683741, -0.1894765645, 0.4758028984, -0.0540286712, -0.3840191364, 0.4273472726, 0.0068679443, -0.2204315662, 0.0482816175, 0.0162271, -0.0989366025, 0.3985985219, -0.4084579349, 0.4869124293, -0.1724500656, 0.057826668, -0.3036773205, 0.0690004826, 0.1707656235, -0.253192842, 0.0957379341, -0.2667098045, 0.0407606177, 0.0872286558, 0.389415741, 0.0169782229, -0.2980732024, -0.307094425, 0.1243026406, 0.1682263613, -0.2866535783, -0.4500908852, -0.2724572122, -0.0869324654, 0.0789936334, 0.2291227281, -0.0798645914, -0.1744343638, -0.1958567649, 0.4720093608, -0.0606686026, 0.0313482955, -0.0138744116, -0.2720584273, -0.0306103379, 0.3783479035, -0.2080344409, -0.2740472257, -0.1138515174, 0.0983327776, -0.1043230593, 0.3244957328, 0.0963457674, -0.1518212706, -0.1861668825, 0.4907178581, -0.3960986733, -0.117960766, -0.0278684571, -0.0874462128, 0.2058201879, 0.1571322083, -0.1732323319, -0.1034319326, -0.1785058826, -0.0762263164, -0.0115156695, -0.1123682112, -0.3707542419, -0.0385707803, 0.1194325536, 0.1440194845, 0.1694181263, -0.1760576963, 0.1061041057, -0.5986759663, -0.2244269252, 0.0427490249, 0.1040757075, 0.0717410073, -0.0567060784, -0.0475693978, 0.1452863365, -0.0732132941, -0.0363400504, -0.2680029571, 0.4468200505, 0.2502596378, 0.0327752084, 0.0547506399, 0.1621984541, -0.1792761981, -0.165330857, 0.2657493055, -0.2976211905, 0.1159590632, -0.1690283567, -0.0656774789, 0.1331110895, -0.3098521233, 0.1112018079, 0.1109438911, -0.179175213, 0.2296431363, 0.2283750623, -0.1756389141, -0.1526004821, 0.309127152, 0.2405741811, 0.4722816944, 0.2488896847, -0.1919387281, -0.1872118115, 0.6576303244, 0.204225719, 0.1307447255, 0.0229940955, 0.0130414125, -0.238583535, 0.237487942, 0.3303773105, 0.6330352426, 0.0619603135, 0.1140250266, -0.0172825307, 0.0254271366, -0.0293959621, 0.3783988655, 0.0832827538, -0.0130594857, 0.0471798293, 0.2299646139, -0.2011448145, -0.5206314921, -0.1508071274, 0.316210568, 0.2098184824, -0.1740719825, -0.1102671176, -0.3141036928, -0.0405466631, -0.1490082145, -0.1887921393, -0.25784266, -0.1310342848, -0.0023849634, 0.3185667396, -0.0844664797, 0.3169508576, -0.3148085177, 0.6230220199, -0.0225863643, -0.2276213914, -0.2458032966, -0.1571439505, 0.1797523499, 0.0086062923, 0.1364536434, 0.1759324372, 0.3079746664, 0.2266800702, -0.2091943324, 0.0181862749, -0.277120024, 0.1260358393, -0.3050533533, 0.027729487, 0.1027249545, 0.0826681182, 0.070201762, -0.3488435745, -0.0780074373, -0.2902077138, -0.2417973578, 0.1993189305, 0.2402350307, -0.2562105656, -0.3174751401, -0.3330114186, -0.1823946238, -0.3930695057, 0.4581944644, -0.062316265, 0.1128849089, 0.3934786618, -0.0587172695, 0.1582950056, -0.4475109577, 0.1244435683, -0.4678837657, -0.3296848536, 0.1020309776, -0.0584401488, 0.0074498896, 0.0205650926, -0.0924884081, 0.2599037886, 0.2751396, -0.2820497751, -0.0737172291, -0.3988439143, -0.1644538343, -0.056347236, 0.096450761, 0.4778028131, 0.0493490286, -0.0785898343, -0.1939100921, -0.2167296708, 0.2699860334, 0.514061749, 0.0867327303, 0.130152747, -0.1105619371, 0.313883841, 0.576135993, 0.0391611159, 0.2408775538, 0.1803648472, 0.1420128196, 0.4015874565, -0.2043005377, -0.1414284259, 0.4393419027, 0.2179209739, -0.4091556668, 0.0728609934, -0.3133539557, -0.12835747, -0.0502656959, 0.2174621522, 0.1644688249, -0.1821397841, 0.1009645164, -0.2382576615, -0.0050918758, 0.2078187466, 0.11164774, -0.1473657787, -0.0391801447, -0.1153483316, -0.0875030458, 0.341039747, -0.1243547052, -0.5923782587, -0.3487128913, -0.327866137, 0.428181529, 0.1119030416, 0.830755353, -0.1152661145, -0.1735563278, 0.164082557, 0.0619445629, 0.5362945795, -0.117273882, 0.0954474509, 0.2606377006, 0.0896613598, -0.1401679665, 0.0434226245, -0.334421277, 0.1724486202, -0.3914507329, -0.26972422, -0.3254365325, -0.1192422882, 0.0361479856, 0.0663405359, 0.075305447, 0.1080310866, -0.320833981, 0.1973253042, -0.2422350049, 0.2051679492, 0.2163419574, -0.1862930357, -0.4946199059, 0.1055212393, 0.0382703766, 0.0400774553, 0.0240703467, 0.0755528063, 0.5680773258, 0.0298866741, -0.0848730728, 0.208894074, -0.3640565276, 0.2437750399, 0.3006788194, -0.06646128, 0.2759120166, -0.0423177183, -0.0690603107, 0.4477423429, 0.4921622574, -0.0481485352, 0.2069583833, 0.0724312812, -0.1094595045, -0.2873228192, -0.0450787283, 0.4593102932, -0.0728088021, 0.001498919, -0.5875291824, 0.2001546472, 0.4760894477, -0.1860660613, 0.8500698805, 0.2287770808, -0.1439658999, 0.2142054737, -0.1160352379, 1.2216168642, 0.2491052151, 0.093346402, 0.1263588816, 0.1488135457, 0.15819107, -0.0590577275, 0.2269841284, -0.043981798, -0.58961308, 0.0094666928, -0.3999622464, 0.2146925032, -0.1705574095, -0.3709151745, 0.2024341822, 0.1345627159, -0.0681875721, 0.0204462297, -0.0177286491, -0.331456393, 0.1697221249, -0.0034243502, -0.0226270705, -0.0847358778, 0.0079060998, -0.0950065553, 0.038241189, 0.0030141547, -0.3511697054, -0.1641819328, -0.0277092196, -0.1303080022, 0.1225660816, -0.2093461305, 0.0389281362, 0.1519823074, -0.1092842519, 0.0015474372, 0.273367703, -0.044890102, 0.3576459587, 0.5594893694, 0.2490703166, 0.1969083846, 0.1581667513, 0.2421548367, 0.1327763796, -0.283587575, 0.154061377, -0.2534990311, -0.5219041109, -0.1789194494, 0.1445880532, 0.2153961957, 0.1876575798, -0.4879377782, 0.3411857486, -0.402575314, -0.1266575903, 0.0396500714, 0.1244202554, -0.155062288, 0.5209707618, -0.0555495732, -0.4595397115, 0.0229396671, 0.4400492907, -0.0654218793, 0.2711246014, 0.4940771759, -0.2664983571, -0.0770590603, -0.1505245268, -0.3368164301, -0.1000722945, -0.2525240481, 0.0732150003, -0.1508962512, -0.2655438781, 0.0139124952, 0.3450865448, 0.2159377038, 0.4373985529, -0.1543657631, -0.2863981724, -0.2581788898, 0.5522169471, -0.1103365868, 0.3832836747, -0.2081248462, 0.1962574124, -0.1034542471, 0.2826242149, -0.2426850498, 0.0834275112, -0.1535306722, 0.2829121351, -0.0633065104, -0.0240063071, 0.013065137, -0.2674835026, 0.0173160806, 0.3564039171, -0.3901501, -0.0926477313, 0.112936981, 0.2374342978, 0.1665588617, 0.120158352, -0.0711922497, -0.645288527, 0.0608287081, -0.130580917, 0.0980868787, 0.1315959543, -0.0744963363, 0.2508105338, 0.3897621036, 0.0260036793, 0.1697997302, 0.2967478931, -0.1825959235, -0.5086311102, -0.0112061612, 0.0410153382, -0.2855356336, -0.189486593, -0.1129680425, -0.0598162636, -0.3204413652, 0.2510894239, -0.041791182, 0.1318590939, -0.2278373539, -0.250489831, 0.3681555986, 0.6540332437, -0.1026200652, -0.3410200179, 0.3324919343, 0.0743098333, -0.2177843601, -0.1193659902, 0.0007172991, 0.3264865279, 0.1794404238, 0.0963227302, -0.0658260286, -0.2668125629, -0.0725489557, 0.2635923028, 0.2529501021, -0.5686265826, 0.2056442201, 0.0314370058, -0.1529377401, -0.1393416375, 0.2492614686, 0.2507661879, 0.3166509569, 0.162058413, 0.0046589542, 0.3221438527, 0.5274826288, -0.0197701398, 0.1290698797, -0.1776989996, 0.1891235411, 0.5614773035, 0.0008475408, 0.1952774227, 0.3151612878, 0.4734135568, -0.0253535397, -0.1588597745, -0.1766507328, -0.1852625459, -0.0416791625, 0.1477965862, 0.1525013447, -0.2881447077, 0.1304529458, -0.2304120958, 0.0018156616, 0.1126254946, 0.774017334, 0.2041043043, 0.0308055077, -0.3100685477, 0.13416408, 0.0680977628, 0.2156363875, -0.2797540426, 0.2032614201, 0.2326889634, -0.0048197545, 0.4367746711, 0.4031178653, 0.2432019114, 0.3272055387, -0.1946520656, 0.0895840079, -0.0154559407, -0.0866338462, -0.1136942506, 0.3165295124, 0.2770950198, -0.1894357204, 0.1903126538, 0.0970125571, -0.0669465214, 0.0287210718, 0.1334053278, 0.1350354999, -0.3762666583, 0.3123150468, 0.2819022834, -0.0252996609, 0.1395072341, -0.0156969093, -0.4565902054, 0.0715070814, -0.2928659022, -0.4036082923, -0.0115449652, 0.0796279162, 0.0128476806, -0.1003052592, 0.1913979948, 0.2416293323, -0.013917271, -0.2232579887, -0.243642509, -0.8886801004, 0.2838242948, 0.2331369072, 0.0113435313, -0.0413215645, 0.2859719098, 0.0587554574, -0.1878685951, 0.0955038667, -0.2109867632, -0.1159206182, 0.1660461128, -0.4591840804, 0.1372929215, 0.0080646528, -0.1652603894, 0.0057893544, -0.195720762, 0.1736646295, -0.0851027742, -0.0832152888, 0.1616665125, -0.0848580897, 0.0822804719, 0.4686516821, 0.4728083313, 0.0355506763, 0.464664638, -0.0505960062, 0.160397321, -0.2282306105, -0.1636152118, 0.1063531116, -0.2522862554, -0.0127327014, 0.4332018793, -0.2395879328, -0.1472658813, -0.190849334, 0.4235979319, -0.2601758838, 0.0941419452, -0.3972093463, 0.1711036116, -0.1830191612, 0.3910829425, -0.2500676513, -0.0073048202, 0.0230879113, 0.1512424052, -0.2764289379, -0.3034208119, 0.8547511101, -0.1976511776, -0.2707470059, -0.0604359135, 0.6034944057, 0.0362269208, -0.5679726005, -0.1976686716, -0.1313981414, 0.1464740634, -0.0189044401, -0.3351227045, 0.0778695941, -0.4213604927, 0.1482848227, -0.0130738765, 0.5897579789, -0.1565411091, -0.2910607457, 0.124146387, -0.1826508194 ]
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.0582521111, 0.1715385914, 0.0236407146, 0.1729354411, 0.1541412175, -0.1635666192, -0.3068184853, 0.3015698195, -0.1271579564, 0.2035999298, 0.1368851066, 0.5172120929, -0.3025812805, -0.4314014316, 0.0418818444, 0.1355716288, 0.0163560733, -0.0274758004, 0.0766994953, -0.1642748415, -0.4050562382, -0.0679782927, -0.5050221682, -0.2724936903, -0.3539693654, -0.0422089994, -0.0651146844, 0.0619970746, -0.2063220441, -0.5102363825, 0.0461510643, 0.3633304238, -0.3701820076, 0.3270515203, -0.0001268262, -0.2589105368, 0.3602528572, -0.0730156079, -0.3363348246, -0.0587586015, -0.3150098026, 0.2423154712, -0.0876237825, -0.1639826894, 0.2200227976, -0.1693586409, 0.0512556359, -0.4195260108, 0.1856561303, 0.3109850287, 0.0398748107, -0.0168224536, -0.0427032933, 0.0539650992, 0.4000217915, 0.0502956547, -0.07102938, 0.1810719222, 0.0258244015, -0.1065657288, 0.1176692247, 0.1653532982, -0.2495697886, 0.0350745805, 0.1981939971, -0.1733990759, -0.1578303128, -0.1440363079, 0.223100394, 0.2262679338, 0.1969538033, -0.3949068785, -0.1449003518, -0.1585543156, 0.0652295947, -0.3188786507, 0.3673402071, 0.2271048874, -0.0369679853, -0.1411620378, -0.2817862928, -0.1317580193, 0.0459681898, 0.0505828559, 0.1565729678, 0.4199056029, 0.0662545115, 0.2579326332, 0.5411183834, 0.0532419272, 0.1429488808, -0.1205493882, -0.1223397851, 0.3546849787, -0.4297559559, -0.107182309, 0.1272522807, 0.2284678221, 0.3260553181, 0.1716283113, 0.2923562229, -0.0018563522, 0.0666191727, 0.1755292714, 0.1559855342, 0.4208340645, 0.082354188, 0.0897040516, 0.2520478368, -0.0248580519, -0.0233361199, 0.1855763048, 0.008934211, -0.2514481843, -0.0599061437, 0.0283952467, 0.1699501127, -0.2244921625, -0.1456381083, 0.1323851347, -0.4279551208, -0.2963868976, 0.0615717694, 0.4393812716, 0.2439156473, -0.0363111198, -0.0334245935, 0.0826518834, 0.0316742733, -0.0285778083, -0.291115433, 0.1890471578, -0.3774473667, 0.1855504811, 0.4148964286, 0.023633752, 0.4221938848, -0.1622273624, -0.0405373983, 0.1626264602, 0.0964481905, -0.3839091361, 0.4567760229, 0.278670609, -0.2528735995, 0.0173064321, -0.0764116496, 0.1386787146, -0.2524918914, 0.4537695646, -0.0491757765, -0.2829813957, 0.3743939102, -0.0348970182, -0.2979339063, -0.0340028815, -0.1033730507, 0.0014513265, 0.3998069763, -0.3425258696, 0.5083595514, -0.2778918147, -0.0489259586, -0.3168385625, 0.1293804646, 0.2588362098, -0.1447182745, 0.0277005956, -0.2785173059, 0.0615409613, 0.1749753952, 0.3470170498, -0.0739547685, -0.0982234031, -0.3033791184, 0.0451323837, 0.2472513616, -0.2331335247, -0.5170557499, -0.4015233815, -0.0577960908, 0.1500937492, 0.1228233725, -0.0361848027, -0.0466812924, -0.2397119701, 0.5691526532, 0.1230777651, 0.0507954657, 0.0702167749, -0.2244809866, -0.1442096531, 0.3917489052, -0.1554682255, -0.2716074586, -0.1668293029, 0.1186868921, 0.0079837926, 0.3367791772, 0.0780106932, -0.0938451514, -0.0691632852, 0.3975319564, -0.268461585, -0.1448491216, -0.0017921254, -0.2628355622, 0.1890725046, 0.1500019133, -0.0776877925, -0.0046196096, -0.1408886611, 0.0069598109, -0.1317948699, -0.0786311328, -0.4655656815, -0.0289576855, 0.2572414279, 0.2690213621, 0.1674770415, -0.1987799108, 0.1474254131, -0.6084162593, -0.1418685317, -0.0942380205, 0.1213893294, 0.1407783478, -0.2250764966, -0.0015508235, 0.2883165181, 0.049445197, 0.0084298961, -0.2568845749, 0.4210998416, 0.2343771309, 0.0555305108, -0.0846195593, 0.2513116002, -0.090550743, -0.1039312258, 0.254640311, -0.2272121608, 0.1112730131, -0.1098300591, -0.1313949227, 0.1791959405, -0.3276397884, 0.0956535935, 0.1494392157, -0.2250340134, 0.1931091845, 0.2141466439, -0.3467214406, -0.0755979791, 0.3512640595, 0.2432073653, 0.3952658474, 0.272205919, -0.2244192809, -0.079543367, 0.7486106157, 0.1755336076, 0.1091259345, -0.0206407551, 0.0418238677, -0.2721836567, 0.2493069768, 0.3991541266, 0.6660163999, 0.0948138535, 0.046068877, -0.0085158357, -0.1063185781, -0.1277071536, 0.3653975129, 0.1909218878, 0.1163282841, 0.070573926, 0.3453727067, -0.1046396196, -0.5839583874, -0.2935902178, 0.2861481607, 0.1273402572, -0.1608411372, -0.17006585, -0.3559512198, -0.0956455097, -0.197193414, -0.196146667, -0.1914377511, -0.1775628626, -0.073464632, 0.4637479186, -0.1138139814, 0.3132785857, -0.3044897318, 0.5873439312, -0.1263483018, -0.3305929899, -0.2006733268, -0.1024093628, 0.0209170915, -0.0236811303, 0.0142462663, 0.0744797438, 0.2375774086, 0.2396821082, -0.1397290379, 0.0067299083, -0.4025406837, 0.1071230471, -0.285174191, 0.0803083405, -0.0229946263, -0.0686068088, 0.0633815825, -0.3273160756, -0.0840852931, -0.3485422432, -0.1023635417, 0.1290640235, 0.2106662393, -0.19783324, -0.3947794139, -0.3335367739, -0.1437160671, -0.4087196589, 0.4085216224, -0.129422456, 0.1063497663, 0.4895439744, -0.0700017363, 0.2074605972, -0.5142776966, 0.0601185113, -0.3819689751, -0.3399350941, 0.2264354825, -0.1062786877, -0.0376655832, -0.0557112284, -0.1253295541, 0.374288559, 0.3618140221, -0.1126940772, 0.0698803738, -0.3953334689, -0.1428847462, -0.0798913091, 0.0358975306, 0.5086123943, 0.0111708902, 0.0101618432, -0.1552387774, -0.3371167779, 0.2735788524, 0.5556553006, 0.1936832815, 0.1405681074, -0.127943784, 0.3053506017, 0.611602366, 0.0180624574, 0.2218024135, 0.2513355315, 0.1985744983, 0.3103546202, -0.1589479744, -0.0326577015, 0.5106629133, 0.2174622118, -0.3428009748, 0.1145194471, -0.2571842372, -0.1489799619, -0.0304283798, 0.1263509393, 0.0973013788, -0.2774021327, 0.1408425868, -0.0972371697, 0.0415063426, 0.1747031212, 0.1695739627, -0.0600338802, -0.1153501868, -0.1410132498, -0.029732395, 0.3056159616, -0.0441634655, -0.6732628345, -0.3755863607, -0.472168833, 0.3012930155, 0.0652728677, 0.8658407927, -0.0815698504, -0.1442961246, 0.2276114523, 0.0985192358, 0.6172941327, -0.0488355532, 0.075487338, 0.2543057799, 0.1052028686, -0.2266447246, 0.0009141862, -0.2905428112, 0.0431481116, -0.3057165444, -0.1708196998, -0.3268432617, -0.1532399356, -0.0169356391, -0.0528803132, 0.1032335237, 0.1100654006, -0.2144613266, 0.0156564787, -0.2628638744, 0.1524922997, 0.207051754, -0.0559039153, -0.5712482929, 0.1035744399, 0.0509468913, -0.0004639924, 0.0421869196, 0.0900687128, 0.4630868435, 0.091573745, 0.0178621635, 0.2473664135, -0.4582465589, 0.257488519, 0.138106674, -0.0138705596, 0.2481119633, -0.0344715752, 0.0659718961, 0.4264143705, 0.5325859785, -0.0090932846, 0.181339398, -0.0978792086, -0.0824098215, -0.187981829, -0.0353317335, 0.3640072346, -0.1816088557, 0.044892095, -0.6824077368, 0.3029801846, 0.5967738628, -0.1900640428, 0.7536082268, 0.2377079427, -0.2059599608, 0.1781208366, -0.0468187593, 1.3120794296, 0.2189839333, 0.1824340373, 0.2494000047, 0.1198638156, 0.3375502527, -0.1520343423, 0.3163946867, -0.0312291905, -0.3117733896, 0.0648643449, -0.3569334745, 0.2322399914, -0.2951766253, -0.2881935239, 0.3330244422, 0.1268988401, -0.1023210213, 0.0835056677, -0.0195150822, -0.4196307361, -0.0224897303, -0.0607589707, -0.0592126958, -0.2439982742, 0.0793126673, -0.0112401284, -0.0675601438, -0.0331193507, -0.2414550036, -0.0576560199, 0.123772867, -0.1919857562, 0.0547814183, -0.1553828716, 0.1071046442, 0.1933681369, -0.0190596431, 0.0026656184, 0.2434747815, -0.074490644, 0.382325381, 0.429853797, 0.2604590654, 0.1087381095, 0.0632612109, 0.2432437688, 0.1503249556, -0.3025844693, 0.1687003374, -0.174314186, -0.4241253138, -0.3541195393, 0.0664157122, 0.3193892241, 0.2247797251, -0.2856479883, 0.3518818021, -0.4087076783, -0.172690928, 0.0172254499, 0.0574397966, 0.002468992, 0.4494124353, -0.1175219268, -0.3633410335, 0.0476158261, 0.5570687056, 0.0076233856, 0.3624720573, 0.4736930728, -0.3311757743, -0.0371005088, -0.0683416724, -0.4076802135, -0.2367170006, -0.2916002274, 0.0075127818, -0.1156883091, -0.2336658835, -0.0219090357, 0.3400221467, -0.0292228349, 0.2901123762, -0.0539473556, -0.2933698297, -0.1853295565, 0.5183563232, -0.2268461734, 0.305921495, -0.0526920594, 0.307326287, -0.0820913538, 0.1352660805, -0.1991174817, 0.0094817653, -0.0242255293, 0.2965015769, 0.0616712496, -0.0675211102, -0.0440091044, -0.2257986218, -0.0656407103, 0.4734467566, -0.3245000243, -0.0415420607, 0.008199811, 0.241573751, 0.2567049861, 0.0518080816, -0.0856156424, -0.6488205791, 0.0862815157, -0.1840722412, 0.1395009458, 0.1251877844, 0.0484998897, 0.3103799522, 0.3236564994, 0.1338429749, 0.3690100014, 0.3317425549, -0.137608394, -0.5471778512, -0.0068299212, 0.0681179985, -0.3414590657, -0.1721710563, -0.2888048887, -0.0765361786, -0.2675985694, 0.3461117446, -0.0858969092, 0.1340372562, -0.3176961839, -0.3257193863, 0.1708035171, 0.622497499, -0.1092249751, -0.4840925932, 0.33117342, 0.0048599867, -0.092825003, -0.0434997007, -0.175900951, 0.3503392935, 0.1592323333, 0.1100089327, -0.0759283602, -0.3464375138, -0.1687954664, 0.1526181102, 0.2878943682, -0.5417858958, 0.2586518228, 0.1237135231, -0.1214043051, -0.1668015718, 0.2514118254, 0.1404767483, 0.3174529076, 0.2154069245, 0.0999710187, 0.3795159161, 0.5215623379, -0.0019800095, 0.1691202372, -0.175866276, -0.008928339, 0.6253478527, -0.0551834255, 0.2040565908, 0.2317162901, 0.3403342664, 0.1078284383, -0.0912875235, -0.1490222067, -0.1434206814, -0.0192738436, 0.0140525624, -0.0285811201, -0.2736729681, 0.0153432637, -0.1142720953, -0.0629805624, 0.0013235752, 0.6738674045, 0.0799119622, -0.0938671678, -0.4253214598, 0.1122414097, 0.1956031173, 0.1990815252, -0.3041789532, 0.2550559044, 0.1390110403, -0.1476668715, 0.2324560434, 0.2578595281, 0.2080407292, 0.3255348802, -0.057825271, 0.0516760461, 0.0448108837, -0.0683915541, -0.0784835666, 0.2672584653, 0.3868578672, -0.2032083124, 0.1780519485, 0.0537290201, -0.0439274237, -0.0059592966, 0.2202223539, 0.292468369, -0.3709778488, 0.3863033056, 0.3180399239, 0.1202204153, 0.2458046824, -0.0817096829, -0.4959750175, -0.1071972549, -0.2609366775, -0.2421962917, 0.0345700234, -0.0283228215, -0.0033037048, -0.1313528419, 0.2376216054, 0.1642879397, -0.2725545168, -0.208989352, -0.2560699284, -0.7737237215, 0.0829081684, 0.1880561858, 0.0842099264, -0.052020032, 0.2948659062, -0.0397691801, -0.1835631877, -0.0507865697, -0.05450904, -0.0149622448, 0.0740046799, -0.4018296897, 0.0929486603, -0.0839930177, -0.0751558617, 0.0935695842, -0.3197193146, 0.1027955413, -0.1501592994, -0.1391858459, 0.040184062, -0.0025001615, 0.1477473974, 0.4713804722, 0.4296170771, 0.0616028011, 0.3756865263, -0.0348587595, 0.0771448538, -0.3971298933, -0.0284057688, 0.0693796054, -0.3193965852, -0.090302594, 0.4964285493, -0.2031977773, -0.0359870642, -0.1933775991, 0.4085066319, -0.2978169918, 0.1286791712, -0.2891924381, 0.197986275, -0.1864549816, 0.4920982718, -0.2932483554, -0.0035865833, 0.0226556398, 0.2047993243, -0.3808241785, -0.2601339221, 0.8820676208, -0.349781096, -0.2414843142, -0.1135065481, 0.5502929688, 0.0787512138, -0.4763631821, -0.1970195174, -0.0315149128, 0.1201933697, -0.0565547459, -0.3065263331, 0.2336234748, -0.3561185598, 0.0286802649, -0.0238203146, 0.4381558299, -0.1030241027, -0.2813262343, 0.1388045251, -0.2105050683 ]
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.1078727543, 0.031477958, -0.0592159405, 0.1798336953, 0.2271606624, -0.0569603145, -0.0781591386, 0.3618609607, -0.0172985271, 0.3102035224, 0.0617668554, 0.5769490004, -0.2770046592, -0.4012131095, -0.0302101299, 0.0821127146, 0.0426668674, 0.0644073635, -0.0605758987, -0.1543071568, -0.4035511911, -0.1343419999, -0.4251637161, -0.1685623378, -0.2936736345, -0.1476834118, -0.0694248751, 0.1123734117, -0.2651755214, -0.4221327007, -0.0507330075, 0.275295347, -0.4287704825, 0.46189031, -0.0001105258, -0.2425431013, 0.2252238095, -0.073262006, -0.2165718079, -0.0847059339, -0.3749554455, 0.1029446572, -0.0625901371, -0.1702315956, 0.1931009591, -0.1649805158, 0.0508298129, -0.4214201272, 0.2389522046, 0.2129859775, 0.2309739888, 0.0795900822, -0.0047133341, -0.0425947234, 0.5332522988, 0.0685248375, -0.1711271256, 0.1763261557, 0.1607526541, -0.2377844453, 0.0212519746, 0.2817616463, -0.1588008255, 0.2197417617, 0.2054117918, -0.0789852887, -0.1350958347, -0.1896860451, 0.3096532822, 0.17935431, 0.2681085765, -0.3994345367, -0.240528211, -0.1129989251, 0.0084617287, -0.3494420946, 0.3002122045, 0.2281769663, -0.0264049843, -0.1879417896, -0.1457690746, -0.106999889, 0.1632737219, -0.0938221216, 0.2004606128, 0.2594086528, 0.0756179988, 0.0720265284, 0.4929292202, -0.0876783356, 0.2041463554, -0.0494839326, -0.2196622044, 0.311832726, -0.4002451003, -0.0920265615, 0.1614932418, 0.0744834244, 0.2304908633, 0.0756542161, 0.2575991452, 0.0067209303, 0.0132541768, 0.2516729534, 0.2001263201, 0.378467977, -0.0654059052, 0.213431254, 0.1905721128, -0.0800732374, -0.1731539518, 0.0880869925, 0.0415697023, -0.3028280437, 0.0749260634, -0.0800301358, 0.116786927, -0.2463714778, -0.101233691, 0.1318372041, -0.1357843876, -0.2121959627, 0.0453831516, 0.5516228676, 0.1866030991, -0.0767671317, 0.0147761554, 0.0687277764, -0.0587004125, 0.0963960886, -0.3627192378, 0.1153648496, -0.362609446, 0.0938812494, 0.2376078069, 0.121392414, 0.3731115162, -0.1051934883, -0.0658718646, 0.1102133021, 0.2735167742, -0.2634019554, 0.392533958, 0.2290444076, -0.2552445531, 0.0241906643, 0.0206685457, 0.1493785977, -0.220302403, 0.437092334, -0.1299476922, -0.2776745856, 0.273973465, 0.174528867, -0.0480160117, -0.037978366, -0.0036671422, -0.0730227381, 0.446079582, -0.3608435392, 0.3171111345, -0.2089280933, -0.0279093012, -0.3870055079, 0.0059968159, 0.1643785983, -0.2229552269, 0.0757544488, -0.2734283507, -0.0148447212, 0.1948701888, 0.4441375732, -0.0910409987, -0.3584690988, -0.2399040163, 0.1730921268, 0.2468245178, -0.1380795985, -0.5333729386, -0.2369208336, -0.1584788114, 0.0361689702, 0.087913394, 0.0584420413, -0.062700212, -0.116353929, 0.4518162012, 0.0210285895, 0.0183446389, 0.1343852431, -0.3099238575, -0.1400610507, 0.369738847, -0.1520806551, -0.2401822358, -0.1730973125, 0.1195148081, -0.1781294197, 0.3807415366, 0.0413310714, -0.0308135599, -0.0349832587, 0.4841261506, -0.2198282182, -0.0847404599, -0.0747506693, -0.1592670083, 0.150900811, 0.0692171454, -0.1282046139, -0.1019475684, -0.2161986977, -0.0500655212, -0.0720342547, -0.1936579049, -0.3217898607, 0.1400495768, 0.0551045537, 0.071457997, 0.0553190112, -0.1687677503, 0.092811808, -0.4236600101, -0.1620369852, -0.0887978747, 0.1601251364, -0.1244971156, -0.2009055167, 0.0920648575, 0.2002388388, -0.0514344797, 0.051380489, -0.3045920134, 0.4380543232, 0.2062822878, 0.0823622048, 0.0751082972, 0.0988029838, -0.1049179286, -0.1015250236, 0.2643217146, -0.1814332455, 0.1131377667, -0.1391750872, -0.0818578526, 0.239637211, -0.2278602123, 0.076087445, 0.1914028823, -0.2140289247, 0.2335223556, 0.1947781742, -0.0763355643, -0.1892792583, 0.3093514144, 0.2143830955, 0.3748643994, 0.253347218, -0.2395371199, -0.0730858296, 0.752476275, 0.2206956148, 0.1499159634, 0.0220455099, 0.0211720299, -0.3006108105, 0.1650638729, 0.4131225348, 0.498606205, 0.1892418414, 0.1480909586, -0.0028858995, 0.0206923783, -0.0762025118, 0.3187274933, 0.0252009351, 0.1475012451, 0.0877847001, 0.2769099474, -0.2225175202, -0.5638149977, -0.1646707952, 0.3080355227, 0.242490992, -0.0820208415, -0.2388601452, -0.3599188328, -0.136125654, -0.1408325732, -0.1060003042, -0.212833643, -0.1299733669, 0.0927541107, 0.3725082278, -0.212566942, 0.3739691377, -0.2482066453, 0.4168659449, -0.0222026408, -0.1171980128, -0.2320805192, -0.2177790701, 0.1436157972, 0.116510272, 0.1697312891, 0.0945719033, 0.3899738789, 0.2874010205, -0.1426667422, -0.0584664717, -0.2158091813, 0.0347242951, -0.1650773287, -0.0293394402, 0.0274549443, 0.0614136122, -0.1137500852, -0.3544993103, 0.0075109974, -0.3451037407, -0.2569628358, 0.1152631938, 0.2479770929, -0.1941597313, -0.37283957, -0.4107458591, -0.2554984987, -0.4678596258, 0.4274529815, -0.0421124548, 0.1697331816, 0.4122062922, 0.026855953, 0.087161392, -0.367988348, 0.0467264801, -0.4801110625, -0.3200536966, 0.1664245427, -0.2421019375, -0.127479732, -0.0509105735, -0.0797984675, 0.2987233102, 0.2556762993, -0.1701508909, -0.0143998824, -0.4049578607, -0.0595423728, 0.0206532702, 0.1705159694, 0.5260154605, 0.1508599818, -0.1882628053, -0.1759504378, -0.1672913134, 0.234525159, 0.399155885, 0.1976082325, 0.0306701958, -0.0013975939, 0.2786432505, 0.6611920595, 0.0348751768, 0.2650380135, 0.2444593757, 0.120859459, 0.3795447946, -0.3707635701, -0.0451815203, 0.3426941037, 0.1007098332, -0.3421359658, 0.0898476541, -0.1920037717, -0.3663147092, -0.0647844374, 0.2407470047, 0.0730637461, -0.181773901, 0.0891747475, -0.0761931464, -0.0610054918, 0.2142040879, 0.0979064032, -0.236351341, -0.1197240055, -0.083019942, -0.1502345353, 0.2026251554, -0.1722980291, -0.5896502137, -0.2854014039, -0.4158499241, 0.2997021079, 0.0219846256, 0.630489707, -0.0462444834, -0.275085777, 0.1421260387, -0.013684582, 0.4843629599, -0.1223755106, 0.0978708565, 0.2757169604, 0.2364539057, -0.1469787955, 0.0225873739, -0.3153300285, 0.1052418277, -0.2829589844, -0.2083066553, -0.253583461, -0.0792955011, -0.0413054973, -0.0166315138, 0.0280889869, 0.0557621904, -0.3222196698, 0.1323815584, -0.3599124551, 0.1306759417, 0.2097448707, -0.171775192, -0.4578043222, 0.018816188, 0.095985353, 0.0022868216, -0.0508482307, 0.1427773088, 0.5783634782, 0.0532344282, 0.0800341964, 0.2153642476, -0.2208366096, 0.2404067218, 0.3562562764, -0.1803625524, 0.207795307, -0.0196920261, -0.109474577, 0.323718816, 0.4031088352, -0.0087547526, 0.2421164364, 0.0413072072, -0.0269217193, -0.1610458642, -0.0898620859, 0.3695456684, -0.1644632518, 0.0096182041, -0.699932158, 0.27226758, 0.3819769621, -0.1795827299, 0.7695527077, 0.0342336111, -0.0926485509, 0.3315496147, -0.0772521347, 1.1195511818, 0.033970356, 0.1771059334, 0.1755613685, -0.0159262046, 0.1148786694, -0.0396806486, 0.2906039059, -0.2378373444, -0.5211144686, 0.1604733169, -0.2698270082, 0.1762302965, -0.071065411, -0.2536156476, 0.2452200055, 0.0929337591, -0.0444946326, -0.1727015078, 0.0078679472, -0.3439275622, -0.0405509993, -0.0429269932, 0.1322552413, -0.0335357152, 0.0299755111, -0.0586014837, 0.0137803741, -0.0630810559, -0.29730317, -0.0944353789, 0.1352884918, -0.2044693232, 0.2324857861, -0.2904862165, 0.0062021911, 0.0109410286, -0.0547462292, -0.1283718348, 0.254083395, -0.0481442064, 0.4096054733, 0.5715177059, 0.2314739376, 0.0768467486, 0.2145591974, 0.2458199114, 0.0255631804, -0.2269495726, 0.0539181978, -0.1483027488, -0.4766715765, -0.1591782123, 0.036324963, 0.2632271647, 0.1623261571, -0.3679370582, 0.2486216575, -0.3597949743, -0.2111900449, 0.1669828743, 0.1270517856, -0.1322495639, 0.4700601101, 0.0142767299, -0.2295574993, -0.0009839768, 0.5051689744, 0.0864670724, 0.2383112907, 0.5237417221, -0.0726728812, -0.1700121164, -0.2872993052, -0.2536241412, -0.0360127613, -0.2044706047, 0.1837620139, -0.0554696135, -0.2839891016, 0.0688749254, 0.2643089592, 0.1066330075, 0.407076627, -0.0948496312, -0.229208678, -0.4201835096, 0.443767041, -0.0992571115, 0.4140261412, -0.2612754405, 0.0826349109, -0.12150608, 0.1916923821, -0.3876181245, 0.0938356295, -0.0836897716, 0.2934550643, 0.0157559142, -0.1119344532, 0.0230325982, -0.1707742363, 0.1524879038, 0.3507139087, -0.3724938035, -0.2430211604, 0.1457938552, 0.1175747514, 0.0835481733, 0.0592063516, -0.0896505415, -0.592515409, -0.1081835628, -0.1836385876, 0.0946242064, 0.145848304, -0.0578487962, 0.307113409, 0.3662774563, -0.0061754007, 0.3721613586, 0.2892754674, -0.1997231096, -0.3840437531, -0.0466639772, -0.0214119125, -0.1907103658, -0.1097667962, -0.099003002, -0.0674090832, -0.2541643083, 0.2214461267, 0.0556138791, -0.0175467879, -0.2199254334, -0.0980801731, 0.4295176268, 0.6297248006, -0.0764325857, -0.3640526831, 0.4069700539, 0.264208436, -0.3455337286, -0.1629193723, 0.0464287065, 0.2752839923, 0.1474657059, 0.0083064213, -0.0759514794, -0.1910993606, -0.1815371811, 0.2896526456, 0.2205362171, -0.6552202106, 0.2770577669, 0.1268350631, 0.0210318118, -0.1786503196, 0.2017374635, 0.2562087178, 0.3099996746, 0.3726300597, -0.0460227467, 0.3559654057, 0.4608308971, 0.0659656525, 0.1170851961, -0.2425632626, 0.1153913811, 0.5658170581, -0.0812000781, 0.2766989768, 0.2415810823, 0.3678361177, 0.0612212084, -0.1463451535, -0.1686162353, -0.0449321605, -0.1831549406, 0.0117364153, 0.1710048765, -0.2913221121, -0.058317624, -0.0793405771, -0.068376936, 0.1755077541, 0.6497917175, 0.1210016683, 0.0610485226, -0.3677771688, 0.2369809002, 0.1279891282, 0.2782151699, -0.3036891222, 0.1446885318, 0.1185058951, -0.0752011687, 0.3234335482, 0.2481108159, 0.1816097051, 0.3829048574, -0.2008115351, 0.0689978972, -0.0505172536, -0.1265688539, -0.1566112936, 0.3311423063, 0.3847043216, -0.1390631497, 0.1985669136, 0.1633261591, -0.1767995507, 0.0143268071, 0.2011550516, 0.1655362695, -0.19033131, 0.2306905091, 0.1728616357, -0.1504604518, 0.0427807234, -0.1037801504, -0.4727160633, -0.0383889303, -0.141885832, -0.2031338215, 0.0378007106, -0.0849464163, 0.0919964463, -0.0921622068, 0.3033488393, 0.1568578333, -0.1262310296, -0.1780656278, -0.267655611, -0.9151123762, 0.2245617658, 0.0515012629, 0.0624058172, -0.1349490434, 0.3846207261, 0.0082030222, -0.203610152, 0.112189725, -0.0982704312, -0.0396632291, 0.223272711, -0.4372614026, 0.0702404082, -0.0814530104, -0.0988087729, 0.1465447545, -0.2478384823, 0.0311277155, -0.1147609279, 0.0479399264, 0.0072397869, -0.0380124599, 0.0359300524, 0.369740963, 0.4667232931, 0.0161220301, 0.2574400902, -0.0802936032, 0.0422935039, -0.2977569401, -0.2828940749, 0.0245157033, -0.2185554206, 0.0709488243, 0.4769242406, -0.1603503227, -0.1255032867, -0.2700120807, 0.2912330925, -0.2710498571, 0.1183954179, -0.3323078752, 0.2123013735, 0.0901175141, 0.3516820669, -0.2855339944, -0.0280279517, -0.0366686583, 0.1451433748, -0.2931611836, -0.3934071958, 0.7955747247, -0.2120283544, -0.2552543879, -0.1243004501, 0.5379704833, 0.0219985507, -0.4403077066, -0.3389930129, -0.030006431, 0.1150768697, 0.000513576, -0.2319951206, 0.1029691175, -0.389449656, 0.0518763065, -0.0874024183, 0.5879087448, -0.1065413803, -0.2709549069, 0.1191217378, -0.2413650304 ]
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.1627901196, 0.1008971632, -0.0472362302, 0.1413048208, 0.1969874203, -0.0894876495, -0.0724688098, 0.3746204972, 0.028497003, 0.3297638297, 0.0540859848, 0.5689104199, -0.2949669361, -0.4070607722, -0.0630830601, 0.1825317591, 0.0914551094, 0.046437826, -0.0640419126, -0.114981927, -0.402323395, -0.1355522722, -0.3807734251, -0.2072241902, -0.2809181511, -0.1180849299, -0.0617819689, 0.0914647728, -0.2582837045, -0.4361537397, -0.0063435808, 0.3478770852, -0.4093191028, 0.4160303473, -0.0001099763, -0.1791145951, 0.207314536, -0.0738750324, -0.2709137201, -0.0989492685, -0.3752160966, 0.1104812697, -0.0958123356, -0.0919572562, 0.1756301671, -0.1854456365, 0.0588805899, -0.5130761862, 0.1786987036, 0.2128082365, 0.2111127824, 0.0499819517, -0.0335807875, -0.0293108672, 0.5861099362, 0.0566133186, -0.1890406907, 0.1663572639, 0.149281159, -0.1905908585, -0.0007993653, 0.2823548317, -0.2549173236, 0.2575416863, 0.261125505, -0.0905022174, -0.1236084998, -0.1846336126, 0.3069356978, 0.2646512389, 0.2544337809, -0.3675504327, -0.2848786414, -0.1775664985, -0.0083230324, -0.3538303375, 0.3373942077, 0.1521794796, 0.0035769418, -0.1769809127, -0.1892118007, -0.0270584822, 0.2319644988, -0.0966164023, 0.249122113, 0.2606116533, 0.0594693683, 0.0409909934, 0.5399267673, -0.090589866, 0.2658845484, -0.1224402487, -0.2388858646, 0.2838869989, -0.3870708346, -0.1137686074, 0.1962217242, 0.0459893085, 0.2212802768, 0.0704401731, 0.272962302, 0.0708098635, 0.0240046792, 0.2028401345, 0.1022177786, 0.4053637683, -0.0894306377, 0.1724644899, 0.1995566487, -0.0315994024, -0.1409443468, 0.0801541358, 0.0051484741, -0.2488575578, 0.0470430106, -0.0482767224, 0.099942103, -0.2141380608, -0.1254859865, 0.120374918, -0.1201372817, -0.2233007699, 0.0901403725, 0.5079166889, 0.1808762848, -0.0202659015, -0.0539891794, 0.0603305586, -0.0707248747, 0.1533781588, -0.3479061425, 0.0679389387, -0.3014749289, 0.1446824819, 0.2900344729, 0.0929104537, 0.3374704421, -0.0530470796, -0.074454084, 0.1677108109, 0.2409874797, -0.2988533974, 0.4511574805, 0.2090825737, -0.3277804255, 0.011675708, 0.0305167437, 0.0661876425, -0.2713427544, 0.4143102765, -0.1308400482, -0.2582530975, 0.2951093316, 0.1685984433, -0.0781641304, -0.0627123415, -0.0282895491, 0.000449752, 0.4258084595, -0.3920402825, 0.3442206383, -0.2152247727, -0.0734055936, -0.3512364924, 0.0223537609, 0.1592848301, -0.2199883312, 0.0661382973, -0.2648988366, 0.0545589589, 0.1390301287, 0.4122769237, -0.0707727522, -0.3986482322, -0.1971274614, 0.0905977637, 0.214170903, -0.1521363109, -0.5648217201, -0.2408743352, -0.1316457838, 0.040360041, 0.1658997685, 0.047549922, -0.0199213121, -0.1683566272, 0.4874165058, 0.0159758627, 0.0379031226, 0.1605651677, -0.2867965698, -0.2108652741, 0.2988803685, -0.1238557994, -0.2522104084, -0.1908814162, 0.1199975014, -0.1736689359, 0.3175567985, 0.0462701991, -0.0111076087, -0.0337358974, 0.464887768, -0.2766034603, -0.0674634874, -0.1012834162, -0.1785650551, 0.1913276911, 0.0686779618, -0.2096096277, -0.1075912714, -0.1848171055, 0.023645483, -0.1183171943, -0.2057340741, -0.3201956153, 0.1141914204, 0.1147769466, 0.1583024412, 0.091755718, -0.1539448202, 0.0645103306, -0.37955755, -0.1858312786, -0.0621414036, 0.1152371392, -0.0434532166, -0.2422354221, 0.0461180508, 0.2248343527, -0.0923197269, 0.0642547309, -0.3035535812, 0.4044663012, 0.2118754536, 0.065441817, 0.0497318842, 0.2067210078, -0.0972363502, -0.0455041006, 0.3066760302, -0.2456499785, 0.108403787, -0.0401806831, -0.0883613527, 0.2758993804, -0.2985675335, 0.128516525, 0.1937158108, -0.3063237071, 0.2506432533, 0.1813521385, -0.0775219053, -0.2378538847, 0.276493609, 0.227132082, 0.407892406, 0.2792385817, -0.1685368717, -0.0030658841, 0.8022276163, 0.221592024, 0.1226189733, 0.028246576, -0.0099238679, -0.3311355412, 0.1510760188, 0.4368928373, 0.5458804369, 0.2066423297, 0.1391761154, -0.0523490757, 0.0427906066, -0.1248241961, 0.3032715321, -0.0051010139, 0.0998848304, 0.1477359235, 0.2927753031, -0.1784620434, -0.5660672188, -0.1174680889, 0.3162509501, 0.1801421046, -0.0468138866, -0.1696548164, -0.3915606737, -0.1134419888, -0.1453724504, -0.1362473667, -0.2019051462, -0.1397088468, 0.1181993186, 0.4280186892, -0.2240033746, 0.4030800462, -0.2191069126, 0.3761201203, -0.0820553824, -0.2009869069, -0.2323861271, -0.2473513484, 0.1135041565, 0.1071828604, 0.1801322103, 0.0349471867, 0.3226132989, 0.2647103667, -0.1561774462, -0.1072740182, -0.2211647034, 0.0503199659, -0.1555041224, -0.0216467604, -0.047900036, 0.0101210624, -0.0882754102, -0.3869801462, 0.0086915493, -0.3831771016, -0.2412014902, 0.1789948642, 0.1787716448, -0.1435181648, -0.401812613, -0.3335204124, -0.2333356738, -0.4529966712, 0.3741291761, -0.063991271, 0.0997937694, 0.4208824337, 0.0501932576, 0.1192931458, -0.3703488708, 0.0566272736, -0.5147153139, -0.3384057283, 0.1441299021, -0.1881359667, -0.0859256461, -0.1079167128, -0.1023709774, 0.2616957128, 0.3022653461, -0.1528603435, 0.0201321617, -0.4135579467, -0.0220301375, 0.0647841841, 0.0957223848, 0.5864393711, 0.1653223336, -0.2120557278, -0.1922953427, -0.1380126476, 0.1789356321, 0.3718595505, 0.1798119098, 0.0572609678, 0.0182412248, 0.2684490085, 0.7134547234, -0.0110723898, 0.2548039258, 0.2837663293, 0.1679667234, 0.433067739, -0.437228322, -0.0121132657, 0.3658876419, 0.0932752714, -0.3274992704, 0.1078031808, -0.2009233534, -0.4239671826, -0.0702932775, 0.2536441982, 0.0882732347, -0.1928748786, 0.1146660149, -0.1082743332, -0.0777747184, 0.208801955, 0.1254798472, -0.2121366262, -0.1972233206, -0.0898092315, -0.1305538565, 0.2053192258, -0.175703153, -0.571644187, -0.3005228937, -0.4015973508, 0.331680119, 0.0836055428, 0.6012488008, -0.0574417487, -0.3226552606, 0.0937577039, 0.0277694091, 0.4177295864, -0.1002548859, 0.0553203896, 0.2866083384, 0.2566701174, -0.1767852008, -0.0243485868, -0.2983764708, 0.0748022348, -0.3461558223, -0.1568789184, -0.271336019, -0.1051127911, -0.0974845588, 0.0260276757, 0.049890928, 0.1094594896, -0.4067124128, 0.1649534404, -0.3717478514, 0.1544074118, 0.1667532921, -0.157279104, -0.4636019468, -0.0095958039, 0.1169113964, -0.020466201, -0.0727095157, 0.1309043467, 0.5553305149, 0.1349179596, 0.0567919761, 0.2547772527, -0.2617733777, 0.2977276444, 0.2745452821, -0.2015116215, 0.2483656406, 0.0267157443, -0.0410488769, 0.2491196841, 0.4222627282, -0.0195999276, 0.2453924716, 0.115908891, -0.046106685, -0.2090003788, -0.0855997801, 0.3329142332, -0.1725008786, 0.006169986, -0.726631999, 0.2700081468, 0.4216606021, -0.20214957, 0.8089625239, -0.0263063237, -0.0745420456, 0.3130100369, -0.0293332785, 1.0826159716, 0.0523934886, 0.1845885515, 0.15239425, -0.0149458125, 0.1152195483, -0.0274767876, 0.333897233, -0.1610729098, -0.5241385698, 0.1641457081, -0.2412725091, 0.1434493363, -0.08537025, -0.2555903792, 0.2435744405, 0.1431549191, -0.0014059574, -0.1848623157, -0.0017583147, -0.4116514623, -0.0602563769, -0.0149679417, 0.118969433, -0.0288364813, 0.0215760507, 0.004009109, 0.0507694595, -0.0561806709, -0.2149412632, -0.0922036171, 0.087736845, -0.2132850885, 0.2512760758, -0.2927490771, 0.0120272189, -0.0775296986, -0.0794105306, -0.1324290335, 0.2365808189, -0.0912311077, 0.4156897664, 0.5673071742, 0.2921689749, 0.0902458131, 0.1129871085, 0.271199286, 0.0623781011, -0.2033888102, 0.0321936272, -0.1376541704, -0.4710267186, -0.1352294236, -0.0016210973, 0.2588436604, 0.1652994007, -0.2814913094, 0.2102952898, -0.304453373, -0.2140783072, 0.1672842652, 0.0760879815, -0.0154470913, 0.4147464931, -0.0723188519, -0.2643077374, -0.0479852892, 0.5450504422, 0.0525798723, 0.297549516, 0.4717650712, -0.1705194414, -0.1695046127, -0.2284463942, -0.2198904455, -0.0372736044, -0.1842300296, 0.1633376777, -0.0290568396, -0.3322981894, 0.1018247083, 0.2536391914, 0.0716209561, 0.4311784804, -0.1206997335, -0.1742143184, -0.3888822794, 0.4864369035, -0.1069338918, 0.3767168224, -0.2589105964, 0.0121103674, -0.1251518726, 0.1198547482, -0.3764691949, 0.051226005, -0.0563944578, 0.2495508194, -0.0418035313, -0.1335871071, 0.0659223497, -0.2019755542, 0.1232355237, 0.2920113504, -0.3878261149, -0.2230167687, 0.1272720098, 0.1292954385, 0.0517725199, 0.0483963117, -0.1183351427, -0.6028359532, -0.0754036903, -0.2451002598, 0.1326669157, 0.1149460375, -0.0639122352, 0.2569664717, 0.3623216152, 0.0208957717, 0.3932002783, 0.2849185169, -0.2523904741, -0.3889373243, -0.0620703921, 0.0018401274, -0.1961846054, -0.0952346027, -0.0886573792, -0.0619135797, -0.257805109, 0.1668856144, 0.0387529247, 0.0319142118, -0.2349717915, -0.0317921303, 0.3383496404, 0.6381783485, 0.0150669217, -0.4197872281, 0.3746504188, 0.2426557988, -0.2449927479, -0.198541373, 0.0005004443, 0.2810862362, 0.1674735844, -0.0375037491, -0.0309757665, -0.2451087236, -0.0940179154, 0.3114635944, 0.2527227104, -0.6664282084, 0.2603010833, 0.1166734248, 0.0619481504, -0.1633704752, 0.2422201186, 0.1889888942, 0.307988137, 0.3570042849, -0.0369508751, 0.3194254041, 0.4252537191, 0.1109740287, 0.0593805313, -0.2671721578, 0.1472589076, 0.5640747547, -0.1756103486, 0.2904319167, 0.2577308118, 0.3387801647, 0.0252394527, -0.0847706944, -0.146269232, -0.0492821634, -0.1576876044, -0.0292049274, 0.193345964, -0.2965600193, -0.0216363817, -0.0534906685, -0.077849254, 0.2190316767, 0.6823832989, 0.0787299424, 0.0228163451, -0.308537513, 0.2365971208, 0.1222052425, 0.3123130798, -0.2915606499, 0.1540493369, 0.1867468953, -0.0926551521, 0.3304533362, 0.2505862713, 0.1957377195, 0.3371886313, -0.2278550267, 0.0878953561, -0.0286828633, -0.1443089545, -0.2209822983, 0.3758556545, 0.3537639678, -0.1627027243, 0.1452499032, 0.1758388579, -0.1829487085, -0.0167659558, 0.1404101849, 0.2012844831, -0.1829666197, 0.1995008141, 0.2446164191, -0.0855713636, 0.1097931713, -0.0666058585, -0.4104935527, -0.0136307236, -0.1664498299, -0.2242802382, 0.0342137478, -0.0789877102, 0.0903614387, -0.03530626, 0.3293505907, 0.1339185536, -0.158081159, -0.1349672079, -0.2358573675, -0.8640736341, 0.1818525493, 0.0682400987, 0.1568340659, -0.0889476985, 0.3957226574, 0.0190336872, -0.1654417515, 0.0644152239, -0.0863242522, -0.0428873077, 0.1791070551, -0.4435936213, 0.0902754962, -0.0850220323, -0.1068328023, 0.129518792, -0.2946931124, 0.0467499755, -0.1034763679, 0.0325061977, 0.0049845781, -0.0208949521, 0.0711632892, 0.4219413102, 0.4397477508, 0.0415283814, 0.2196604162, -0.1005731523, 0.034975335, -0.2902001143, -0.2234969735, 0.0042941533, -0.2173173875, 0.0332010835, 0.4783428907, -0.1900584996, -0.1743460894, -0.2300856262, 0.3456983566, -0.2509293556, 0.122972697, -0.3572004437, 0.1816216409, 0.0742469281, 0.3774430156, -0.3227161765, 0.0056159864, 0.0328291394, 0.1458387673, -0.2736543119, -0.3756458461, 0.7129780054, -0.2250519246, -0.2088695765, -0.1358782351, 0.4948710203, 0.0398080647, -0.3910283744, -0.2560963631, 0.0281629413, 0.1448636055, 0.0447650328, -0.2136393338, 0.0972763747, -0.3613100052, 0.1303619891, -0.1091751084, 0.5722795129, -0.072356388, -0.2772230804, 0.1097423285, -0.2119769156 ]
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.1645398885, 0.0470638424, -0.0645132437, 0.1816314459, 0.2262284607, -0.0658220202, -0.0984030142, 0.3320509493, -0.0075621232, 0.3399211764, 0.0444224253, 0.5816401243, -0.2912332118, -0.4286252558, -0.0763500631, 0.1383526623, 0.0436939485, 0.0938875079, -0.0431258827, -0.1475759149, -0.3487338722, -0.1134751141, -0.4357578158, -0.1966105998, -0.3342383504, -0.1588745266, -0.024881497, 0.1103742123, -0.2372035682, -0.3972373605, -0.0687006414, 0.2789518535, -0.4423449636, 0.4937438965, -0.0001106297, -0.2429225296, 0.1797088832, -0.0578648672, -0.2435783297, -0.1217862666, -0.3575273752, 0.1902094483, -0.0383541882, -0.1658543497, 0.1627752483, -0.1657254249, 0.0624612421, -0.439131856, 0.2739274204, 0.191924721, 0.2325712293, 0.0483620688, -0.0108645707, -0.0708410144, 0.5057002902, 0.098368451, -0.1865063459, 0.2023808956, 0.0994285941, -0.1826700866, -0.0003843457, 0.262264818, -0.1502901167, 0.2361278087, 0.2072393, -0.0669976175, -0.1666729003, -0.1825502962, 0.3554885089, 0.1823658496, 0.2292560935, -0.424246043, -0.2238121629, -0.1083014086, 0.0063933991, -0.2964935899, 0.298443675, 0.1853241324, -0.0228903629, -0.1757454574, -0.1930442154, -0.0560919903, 0.150715977, -0.0823625177, 0.2069925368, 0.2619942427, 0.0504164547, 0.0567101613, 0.5261254311, -0.0970137715, 0.1877248436, -0.0374600105, -0.2361271977, 0.3029497266, -0.4230678678, -0.062421158, 0.1713789403, 0.0872758329, 0.2205875814, 0.0613539517, 0.3008514941, 0.0446183942, 0.0128952898, 0.2106889486, 0.1390131414, 0.3808430731, -0.0720355064, 0.1835350841, 0.1963307559, -0.0748431087, -0.2012490928, 0.0494452938, 0.008846011, -0.2748488486, 0.0845529288, -0.1342387348, 0.1005305201, -0.257694751, -0.1026127934, 0.1227495372, -0.1149023175, -0.1920342445, 0.042377051, 0.6033260226, 0.1603025198, -0.1170073301, 0.0255681202, 0.090349324, -0.0460832492, 0.1373941004, -0.3694564402, 0.0849424079, -0.3214626312, 0.1383461803, 0.2982783914, 0.1502869725, 0.3950698376, -0.0642240196, -0.025195282, 0.1381612718, 0.2827372849, -0.2803495824, 0.3846611977, 0.2303172499, -0.2404922992, 0.0470302626, -0.0196586959, 0.1189518273, -0.1882033348, 0.4020311236, -0.0872793123, -0.2613454163, 0.360581249, 0.1778233796, -0.1003840715, -0.0343159735, -0.0103854239, -0.0915903598, 0.4123304486, -0.3571664989, 0.2896512151, -0.1929021478, -0.0031735674, -0.3660288453, 0.0472136959, 0.1411510259, -0.1684119105, 0.0470233932, -0.2436846495, 0.0236434378, 0.1621584743, 0.4457203746, -0.0874058604, -0.3389569521, -0.218592003, 0.1965602785, 0.2297674865, -0.1487361938, -0.543340981, -0.2355117351, -0.141767174, 0.0443008915, 0.1115818843, 0.0318913013, -0.0390051864, -0.1002301276, 0.4659565985, 0.0601356626, 0.0381387472, 0.1441459358, -0.3020870388, -0.1312885731, 0.3288305104, -0.1144822165, -0.2394287437, -0.1633698642, 0.0918082669, -0.1207454726, 0.3615782559, 0.0653696358, -0.0403919183, -0.062087059, 0.4602640271, -0.2890093625, -0.092734009, -0.0882566422, -0.1043708324, 0.1592433155, 0.0940954834, -0.1410195827, -0.1503850222, -0.2046493441, -0.0333181843, -0.103289783, -0.2423357368, -0.3282051682, 0.1548519731, 0.1008484364, 0.1014075428, 0.0617167056, -0.1063412279, 0.0867823362, -0.4196277857, -0.1925981343, -0.0756415278, 0.1260685921, -0.0884510875, -0.2383365631, 0.0605840534, 0.2049890757, -0.0931284428, 0.0096161328, -0.3148373663, 0.4407112002, 0.1878856719, 0.0636857525, 0.0666087046, 0.096437186, -0.1263604164, -0.1158675998, 0.2639687955, -0.2141443193, 0.1109960228, -0.1265969872, -0.1125405729, 0.2180502117, -0.2423684895, 0.0968878493, 0.239368543, -0.2473142147, 0.263948679, 0.1885926723, -0.0416330844, -0.2077914476, 0.2843483984, 0.1691622287, 0.4292962551, 0.20451276, -0.2278524935, -0.0814930201, 0.7257267237, 0.2631526589, 0.1692702025, -0.0289142579, -0.031421639, -0.2949005961, 0.1342020929, 0.3861588538, 0.5165141821, 0.2118198127, 0.1496458948, -0.0296344124, 0.0169995427, -0.0878010169, 0.2908546925, -0.0056404136, 0.1365730166, 0.1303858906, 0.2946320176, -0.2110143304, -0.5754868388, -0.1763485521, 0.3066594005, 0.2283554077, -0.0538047925, -0.2455101907, -0.3411330879, -0.0883901566, -0.0771435201, -0.112557888, -0.1919274479, -0.1004240662, 0.1275382638, 0.3741231561, -0.1871348768, 0.3885903955, -0.2175393105, 0.3834326863, -0.0255777016, -0.1685038954, -0.2406043857, -0.1994385272, 0.124864839, 0.1316698045, 0.1653926373, 0.1222231686, 0.3936081231, 0.3040717542, -0.1854707301, -0.0635925159, -0.1819150448, 0.0548926815, -0.1391018033, -0.0073849838, -0.0143499449, 0.061733678, -0.1076500267, -0.3901996613, 0.0434612185, -0.348775655, -0.2571064532, 0.1572527587, 0.2225517184, -0.2505580783, -0.4013537765, -0.4012819529, -0.2319545448, -0.4734944701, 0.4063262045, -0.0250744298, 0.1216368377, 0.4188091457, 0.0301110968, 0.1068955958, -0.3666158617, 0.1007184759, -0.4784910083, -0.2979614735, 0.162397027, -0.2508960366, -0.1209593415, -0.0446629338, -0.0964057222, 0.2673752904, 0.3345430195, -0.1974523216, 0.0018107854, -0.4214381576, -0.0430032946, 0.0390931964, 0.1247499138, 0.5532550216, 0.1390642971, -0.1910766512, -0.1802099645, -0.1579672396, 0.2839005589, 0.410151124, 0.1807180345, -0.0001553167, -0.0088666053, 0.2447099686, 0.6376881599, -0.0267476551, 0.2307050526, 0.2228116095, 0.0709284768, 0.3748374283, -0.3868439496, -0.0213325508, 0.3736646473, 0.1293521523, -0.3258841634, 0.1407593191, -0.222475931, -0.3538877368, -0.0805678219, 0.2327487618, 0.0461793244, -0.1897003651, 0.088281855, -0.0363678671, -0.0494112633, 0.1891165078, 0.1329146773, -0.1916751713, -0.1098931208, -0.0942803621, -0.1530969888, 0.1881773174, -0.1836776137, -0.5609345436, -0.2704071999, -0.4111950099, 0.3094630837, -0.0331862271, 0.6306987405, -0.0860468075, -0.2974002957, 0.1229010895, -0.0088540316, 0.4743198156, -0.1237044781, 0.084530592, 0.2729362249, 0.1821278632, -0.1336545944, 0.013095744, -0.3547090292, 0.0956469625, -0.2860816419, -0.182721585, -0.2694423795, -0.0852587372, -0.0830341801, 0.007515274, 0.0365672559, 0.0690897703, -0.3085601926, 0.1819414496, -0.363566637, 0.1643829346, 0.1514683962, -0.1472987831, -0.4272034466, 0.0078231841, 0.0576616153, 0.0153032318, -0.0405133627, 0.2390461862, 0.6286557317, 0.0407695659, 0.103065908, 0.2285554707, -0.1970316768, 0.2719872296, 0.3310123682, -0.1418698877, 0.2264733911, 0.0044249482, -0.1267076433, 0.2463161349, 0.4111562669, -0.060057506, 0.2025131434, 0.0487428196, -0.0015603192, -0.1360402554, -0.0408391431, 0.3589109182, -0.1728658974, 0.0083103403, -0.653093636, 0.2220590711, 0.3576477766, -0.1815078557, 0.7226056457, -0.0072314441, -0.1178558096, 0.3815124929, -0.099814944, 1.083906889, 0.0566596128, 0.146986872, 0.1830812544, 0.044930771, 0.0791684091, -0.0625475049, 0.2574706376, -0.1825028658, -0.5199661255, 0.1725639403, -0.2586371303, 0.1509544402, -0.019749878, -0.2885986269, 0.2232112139, 0.088194266, -0.0452223979, -0.2266037762, 0.0252865851, -0.3053608537, -0.0573655888, -0.0778177679, 0.144690603, 0.0186367575, 0.0033213031, -0.0188234858, 0.0113277622, -0.0692392215, -0.2780137062, -0.0984091908, 0.1322059333, -0.2228198349, 0.1897661984, -0.295609951, 0.058238253, 0.0306886137, -0.0767637417, -0.1113330275, 0.2837206125, -0.0794100463, 0.4060230553, 0.5098741651, 0.2248027027, 0.0827043504, 0.182948947, 0.2328511775, 0.0048798174, -0.1908227056, 0.0659306347, -0.1313793808, -0.4533767402, -0.1187156364, 0.0302374382, 0.2131248266, 0.1467332691, -0.3811897039, 0.2422218323, -0.3799877167, -0.2048641145, 0.1745131761, 0.1023661047, -0.1270203739, 0.4684286714, 0.0316040441, -0.2463268787, -0.0167558659, 0.4644200206, 0.039744284, 0.2125465572, 0.4721182287, -0.1330164671, -0.1437508613, -0.3098314404, -0.3066726625, -0.0307117738, -0.2263919711, 0.1833345592, -0.0311109759, -0.3075295687, 0.0913111866, 0.2305912673, 0.1141950339, 0.4145866036, -0.1433434933, -0.2366752028, -0.3798679709, 0.4347461164, -0.0309177097, 0.3997689784, -0.2919095755, 0.1168439239, -0.1029945612, 0.2220921814, -0.3882454634, 0.0621819943, -0.0940003917, 0.341976136, -0.1091264635, -0.1284660846, 0.0838779807, -0.1945873499, 0.1724510491, 0.3311297297, -0.3868032396, -0.2547593713, 0.1303525269, 0.1155682728, 0.0742470324, 0.0859085694, -0.1114681214, -0.5825695992, -0.1071047187, -0.2249593288, 0.1532947719, 0.1011644751, -0.0949434191, 0.2292368412, 0.4127993584, 0.0002148654, 0.3605826497, 0.2648465633, -0.2013713419, -0.3913642466, -0.0288560838, -0.022696102, -0.2145078033, -0.1246573031, -0.0870049372, -0.0855235755, -0.2674267888, 0.2091457397, 0.008030314, 0.0110765127, -0.2223532498, -0.0892883241, 0.4202601016, 0.6356108785, -0.0435014814, -0.3844487965, 0.3709196448, 0.2683918476, -0.3369071186, -0.1750696003, 0.0392258167, 0.2460405678, 0.2021850049, 0.0122517422, -0.1007214785, -0.2154271603, -0.1817186922, 0.2678738236, 0.223695159, -0.6251200438, 0.219599098, 0.102255255, 0.0065354034, -0.1585644931, 0.1950762272, 0.2338111848, 0.2964686453, 0.3898304403, -0.096308738, 0.3289057314, 0.4681848288, 0.0587380044, 0.1087262928, -0.237567693, 0.1286787838, 0.5398042798, -0.0786894113, 0.2875321209, 0.2556867898, 0.3370883167, 0.0629018843, -0.1188623235, -0.1814392805, -0.0543749332, -0.1782620847, 0.0336606018, 0.2041495293, -0.2808974981, -0.0744930953, -0.0966936946, -0.0654542446, 0.1876655519, 0.6637600064, 0.1149745136, 0.0587374754, -0.3534993827, 0.2141944617, 0.1243330315, 0.255631268, -0.2843033671, 0.1898602098, 0.1373908073, -0.0432811528, 0.3281440437, 0.2436446846, 0.1775016338, 0.3849610686, -0.2102643847, 0.1273866147, -0.037835069, -0.1224706471, -0.2118446529, 0.3429826796, 0.4248510599, -0.1512327641, 0.1944693625, 0.177566424, -0.1910860091, -0.0204148293, 0.146063447, 0.1708222479, -0.1709230691, 0.1695915163, 0.1908317506, -0.1284253746, 0.0399028361, -0.0729860663, -0.4594970942, 0.0175564028, -0.1854102165, -0.2413069308, 0.0444917865, -0.0420022644, 0.0901078284, -0.0942577422, 0.3228232861, 0.1217256784, -0.0727365911, -0.1752487719, -0.2853656113, -0.8999337554, 0.2128527313, 0.0689448044, 0.0817756653, -0.1407218724, 0.4141229689, 0.0608885288, -0.2042655349, 0.1164667606, -0.0787594467, -0.0535231009, 0.2270157039, -0.4681148827, 0.106083557, -0.0831531584, -0.0797098875, 0.1405968815, -0.2543370128, 0.0337203369, -0.0785125867, 0.0557509214, 0.0533095822, -0.0191892087, 0.021764338, 0.3450394869, 0.4877482057, 0.0153715704, 0.2486277521, -0.110337995, 0.0711964816, -0.2749644518, -0.2630708516, 0.0476424322, -0.2343212068, 0.1461322159, 0.4901221097, -0.1151401028, -0.1558486521, -0.2355592847, 0.2968497276, -0.2419133931, 0.1062014699, -0.3029260635, 0.2135645747, 0.0751414001, 0.3843674362, -0.3215225935, -0.0135813802, -0.0700051785, 0.0796149895, -0.2733809352, -0.3939665854, 0.7890162468, -0.2005457878, -0.2381666899, -0.1327886581, 0.5532747507, -0.003360413, -0.4281307161, -0.325409025, -0.0058572739, 0.1068148017, 0.0033219066, -0.2388472259, 0.0915663466, -0.3629479408, 0.0831773728, -0.0804673731, 0.6088452935, -0.0973444283, -0.2683152854, 0.0887288302, -0.2417259812 ]
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.1382128298, -0.2247207016, 0.0239642374, 0.2476740927, 0.1281206757, -0.1362014562, 0.203212589, 0.082456857, -0.6032931805, -0.0022733435, -0.2842715085, 0.3227505982, -0.1951234937, 0.1738314629, 0.1398985684, -0.1447517872, 0.1145583093, 0.2089667618, -0.0435804613, -0.1156108603, -0.1563791037, -0.286649406, -0.2859779596, -0.0606173538, -0.4345373511, 0.0260994863, 0.0050069243, 0.1478997618, -0.0802040398, 0.0760354549, 0.0442323238, 0.2561854422, -0.1987253428, 0.5789401531, -0.0001289723, -0.1655298769, 0.0553997196, -0.2835810781, -0.2924966216, 0.0555682331, -0.059530139, 0.2450537384, 0.0335683823, -0.1791678667, 0.0966272354, -0.3774506152, -0.0920626596, -0.1147692353, 0.1890468001, 0.1550743878, 0.0798438936, 0.3368458152, -0.2491132617, 0.2438392043, 0.3745868206, 0.5576677918, -0.1313134432, 0.2056199163, 0.1018672809, 0.3548142314, 0.4095388055, 0.1268225163, -0.2900161743, -0.2419890761, 0.2838991284, 0.0142172016, -0.2483236343, -0.2783830762, 0.1692025214, 0.0764763206, 0.7366983891, -0.5577979684, -0.1140447631, -0.4305657744, 0.1685491651, -0.3902668953, 0.0719519556, 0.1549600065, 0.0929495543, -0.0118967891, -0.4119158089, -0.0944789425, 0.1351483315, 0.0751211941, 0.211879015, 0.2510280013, -0.1262821853, 0.2214879841, -0.2606829107, 0.3279379606, 0.2481327355, -0.3805221021, -0.0002252855, -0.0308667142, -0.1849081218, -0.0945178419, -0.0433804132, 0.0452787653, -0.0704916641, 0.3731214404, 0.5257030129, 0.2177651823, -0.1684402376, 0.1170972064, 0.3756847382, 0.1648924202, 0.1534628272, 0.0623677932, 0.0424036495, -0.3042168021, 0.0391023457, 0.0110787395, 0.2551578581, -0.0433038548, 0.3766876459, -0.0346268043, -0.0403551757, -0.1273489594, -0.0218831338, 0.0662861913, -0.2807993889, -0.3609567285, -0.1409436762, 0.1119956076, 0.0275996514, 0.3346140981, -0.2615429461, 0.2003475726, -0.3364671767, 0.0672368109, -0.1536251754, -0.1003377736, -0.2305386215, 0.1230602711, 0.1779458821, -0.3417637646, 0.2291338444, 0.0857957602, -0.055318255, 0.0410853475, 0.1837372482, -0.3757711053, 0.4564962387, 0.2302481234, -0.1737114638, 0.1937039793, 0.0566021279, 0.233543992, -0.2558582425, 0.4978362322, -0.2411561906, -0.2049875259, 0.2311906368, 0.0342096724, -0.1543435901, -0.0228701308, -0.2087955177, 0.1444379389, 0.4477297664, -0.357827425, 0.2071652114, -0.5868687034, -0.2272821963, -0.4626278579, 0.0286325067, 0.2016873956, -0.3084817529, -0.0998900831, 0.5335567594, -0.1290864497, 0.2292512357, 0.224217549, -0.350042522, 0.3968577981, -0.1544257402, -0.0633992255, 0.5925039053, 0.069907397, -0.2872908413, -0.3488511443, -0.0791894644, 0.357780695, -0.1115627587, 0.1525213569, -0.1749598682, -0.0800709799, 0.2018077672, 0.1149849594, -0.0569892153, 0.1131260842, -0.205219686, 0.0311101526, 0.4739536941, 0.1160251647, -0.0859150141, -0.0094829053, -0.0761848539, 0.1589433551, 0.1887992918, -0.0295026712, -0.235153228, 0.0499473698, -0.1133161634, 0.1867136508, -0.0154645592, -0.1854670048, -0.2254040241, -0.1526825577, 0.179951787, -0.3040948808, 0.3576213121, 0.0391087979, 0.0106454194, -0.3328683376, -0.4570796788, -0.3931130171, -0.0499447249, 0.4065034688, 0.0490475222, 0.1186686605, -0.319529891, 0.0614470765, -0.2063672245, -0.0083993934, -0.4115723372, 0.1248527989, 0.1170990095, -0.2123431861, -0.3896256387, 0.1242081523, -0.1243455857, -0.0857829675, -0.2129511684, 0.3616208434, 0.1442990452, -0.2647683322, -0.3784198165, 0.4010249376, 0.1274123341, 0.2065182626, 0.134584859, -0.1895992607, 0.3265335858, -0.1915590316, -0.269097209, 0.349304229, -0.6575781703, -0.1802589595, -0.1800183952, -0.6270242929, -0.0393621437, 0.2436848432, -0.3853664398, 0.0459834337, 0.0531652272, 0.3270128667, 0.1938659251, 0.3799907863, -0.5700510144, -0.0476529449, 0.7285057306, -0.221271947, 0.0553404763, 0.053363923, -0.1717448086, -0.3505659997, -0.184595108, -0.0203246996, 0.7820936441, -0.0153637566, -0.036737375, 0.0553937554, 0.0814559162, -0.3519119322, 0.0955267325, 0.249150157, 0.0069553293, 0.4411149621, 0.3575189114, 0.111763373, -0.4882298708, 0.13027969, 0.1637693942, -0.0803555027, -0.3349175453, 0.0944051892, -0.1556544453, 0.0596319139, -0.3772046864, -0.0254958924, 0.0446694419, -0.0599994883, -0.0811634809, 0.04894609, 0.1002305225, -0.0627607778, 0.2464333773, 0.2244511992, -0.0175592452, -0.3098866045, 0.3108996749, -0.0712582022, -0.1993418038, -0.1147272512, 0.0123944804, -0.0296002105, 0.3543702662, -0.0558913723, -0.205573976, -0.1391870528, -0.1954615563, 0.2927094698, -0.0928989202, -0.0006683916, 0.0193675794, -0.0350414813, 0.0142718777, -0.1980375797, 0.1020732448, 0.1147157103, 0.1975729614, 0.0408129245, 0.1796197444, 0.1345438361, -0.1993230581, -0.2912899852, -0.0313385464, 0.0881655514, 0.2162626535, -0.1674562693, -0.0139830634, 0.4659084082, -0.0845906213, -0.1470181197, -0.6666823626, 0.1076656505, -0.3695811033, -0.5208799839, 0.1293288171, -0.0555756241, -0.2137967348, -0.2652086914, 0.1450387836, -0.0572916232, 0.5463923812, -0.2382081151, -0.1953878701, -0.1374088526, -0.0648619682, -0.0691306666, 0.4167663455, 0.3020019233, 0.0571572557, 0.1945847273, 0.0385170281, -0.0434040464, 0.1414674819, 0.3747740984, 0.0798515975, 0.0951736122, 0.1910054088, -0.0178645253, 0.5995127559, -0.199127838, -0.1613333672, 0.1348064989, 0.1795825809, 0.3882861435, -0.4722309709, -0.1041784137, 0.4822195768, -0.051631093, -0.0903250724, 0.2900758386, -0.2437631488, 0.0153201185, -0.1181699485, 0.1589725912, -0.2877341211, -0.2249056399, 0.4279423058, -0.0042331824, 0.21488747, 0.0903222337, 0.350717783, -0.1093766615, 0.0532984398, -0.1550860405, 0.1416811347, 0.4043022394, 0.0007885247, -0.544418633, -0.221226722, -0.1243485957, 0.0089224726, 0.1123211086, 0.5317482352, 0.0306651369, -0.1736358106, 0.177009508, 0.2656617463, 0.5368552804, -0.0887496173, -0.0582987592, 0.1731208116, -0.3876773417, -0.1465545297, -0.3178416491, -0.2131341398, 0.0677266419, -0.2510716319, 0.2636962831, -0.2030095756, -0.0140724555, -0.0744814277, 0.4079807699, -0.1185539588, 0.0340832174, -0.0952488482, -0.0083029494, -0.1466765702, 0.0440278575, -0.1954730302, -0.1743857861, -0.3775611818, 0.3725060821, -0.0666098669, 0.230961591, -0.0352429152, -0.1375806481, 0.2652430832, 0.1389312744, -0.1037347168, 0.1086482406, 0.0686224699, 0.0677358434, 0.0991383046, -0.0500398502, -0.0214676447, 0.2940165997, -0.3436630368, 0.1544418633, 0.4693882167, 0.0623108223, 0.0337496102, -0.42049101, 0.0856413096, -0.2320630252, 0.0723928958, 0.3479065001, -0.0806324109, -0.2999905348, -1.0697369576, 0.2451429665, 0.1815060526, 0.0347041935, 0.1759746969, -0.2191982269, -0.0421899371, 0.2608637512, 0.1543845832, 1.0892908573, -0.0507259369, 0.5218434334, 0.3229364455, -0.0731946304, 0.3819907606, -0.3416104913, 0.1129660308, -0.2447148561, -0.4424586594, 0.0531472862, -0.2846351862, -0.0072030351, 0.007824068, -0.1367423534, 0.3234070241, -0.279640466, -0.0524000451, -0.0252830088, 0.03405568, -0.1102773771, -0.0948151499, -0.0633685514, -0.0598192587, -0.199770093, 0.1812172234, -0.0717722327, 0.1181940138, -0.1108604744, 0.0298048779, -0.0448217094, -0.1666143686, -0.0512368158, 0.0092821568, -0.3341159523, -0.6155844927, 0.283613652, 0.3402104378, 0.0996387526, 0.1792659163, 0.0534419194, 0.0836944729, 0.2451817542, 0.4168068767, -0.0029480532, -0.0521088876, 0.4235519767, 0.0652488992, 0.0677939206, 0.2524889708, -0.0190391988, -0.0969826207, -0.8286117315, 0.1709129065, 0.3791942596, -0.2473130822, -0.4441280961, 0.0542823672, -0.0023441911, 0.0265491009, -0.0408353619, 0.1820115447, 0.1740787327, 0.431512028, -0.225662902, -0.4154625535, -0.1995776147, 0.2852519751, 0.2003930062, -0.0452266298, 0.4193190336, -0.0519285388, -0.2008042932, -0.0527365059, 0.2371239364, -0.0974291712, -0.4542705417, -0.101287894, -0.0841007233, 0.1255539656, -0.0190060735, 0.2705138326, -0.2472783923, 0.0637080669, -0.2091899812, -0.0291788876, 0.103811942, 0.0176787935, 0.427718401, 0.3437692821, 0.3647258282, 0.3129191697, 0.0152421221, -0.0564860813, -0.1305905581, 0.0297765583, 0.3241150975, 0.3977799118, 0.0183639377, 0.0064164773, -0.3131081462, -0.0604932271, -0.110937506, 0.1440344602, -0.1140713841, -0.0874803811, -0.1520570815, 0.2300265878, 0.0748611838, -0.0025266446, -0.1695275903, -0.1676241755, -0.1742765605, -0.2396647334, 0.2976014018, 0.2611992359, 0.0210242961, 0.1257656515, 0.4362259507, 0.0285327714, 0.1622671038, 0.1904211044, -0.1589650661, -0.2615147233, 0.1234549507, 0.0164787136, -0.2788669467, -0.0519070849, -0.599005878, 0.1433502138, 0.2141152769, 0.3800847828, 0.0123019265, -0.3274236917, 0.3317846656, -0.1678720117, 0.4022541046, 0.5396657586, 0.0275574438, -0.4948883057, 0.2594491839, -0.0720313415, 0.2253416181, -0.1419827193, -0.0395640172, 0.1817878634, -0.1139530316, 0.1323442906, -0.1584560871, 0.3500946164, -0.5146563053, -0.0992889404, 0.1379050314, -0.1613043845, 0.2236178666, 0.4979378879, 0.0465982929, -0.066817686, 0.1828082502, -0.0771140829, -0.1445319802, 0.2808187604, 0.7301182747, 0.5393792987, 0.4825178087, 0.0395529643, -0.0672643334, -0.4697549343, -0.2155254632, 0.1976958811, 0.0375332572, 0.5161761045, 0.2281163931, 0.046342086, 0.1134194359, -0.0799597129, 0.127046138, 0.3366570771, -0.1223197877, -0.0420722179, 0.2104706317, -0.3991296291, 0.081212163, 0.1484828889, -0.4271039963, 0.2103962004, 0.1051128358, 0.1707055271, -0.1856767237, -0.1114179194, 0.2426235229, -0.1366684884, 0.1284894198, -0.10801965, -0.055412665, 0.1767773479, 0.0271322522, 0.189820841, 0.1285145283, -0.0513710417, 0.351834327, -0.1466557682, 0.0571047924, -0.1032778025, 0.1627277434, 0.0270889252, 0.0942610577, 0.3115410805, -0.3098680973, 0.492308706, 0.0618408583, -0.0126402937, -0.1264346689, 0.3408854604, 0.2179017365, -0.5887756348, -0.0272434168, 0.1398260444, 0.0593107045, 0.0964888483, 0.1066815779, -0.490698874, 0.0379792862, 0.0147478171, 0.429368943, 0.1835751235, -0.008561898, -0.0065230522, 0.1072586179, 0.4353660047, 0.0826553926, -0.1552223116, -0.0474480242, 0.0259120613, -0.4284969568, 0.0506526902, 0.3247934878, 0.1212253571, 0.2492530495, -0.110071376, 0.282669425, 0.1380499303, -0.1708898842, 0.2173684835, -0.0020117201, 0.4330169857, -0.3053789735, -0.0873091072, -0.4109705389, 0.1781346947, -0.1709597707, -0.1909292936, 0.1201005057, 0.1029168665, 0.0281698406, -0.2006622404, -0.135013938, -0.0147142597, 0.3194841146, 0.2151919603, 0.0709730685, 0.2752596438, 0.0149045736, 0.0139683932, -0.1395522803, 0.0865889043, -0.0084388219, 0.2101176977, -0.2170506567, 0.3956196606, -0.1571721286, 0.1808826923, -0.3153145611, 0.2677331567, -0.1786731333, 0.2012967616, -0.2949556112, -0.0618328713, 0.322712481, 0.0421420224, 0.0804626346, 0.568616271, -0.0181752667, 0.2659776509, -0.2791576684, 0.2963318229, 0.4934825897, 0.1330403239, -0.2201578021, -0.2162212729, -0.0268435031, 0.1314434111, 0.0620844439, -0.3097267747, 0.0052932948, 0.2125544846, -0.2343694866, -0.3316030502, 0.2053730786, -0.0543339327, -0.2618589103, -0.1250598133, 0.5423794985, -0.0547790043, -0.0949316248, -0.0436526872, -0.0387110785 ]
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.1382128298, -0.2247207016, 0.0239642374, 0.2476740927, 0.1281206757, -0.1362014562, 0.203212589, 0.082456857, -0.6032931805, -0.0022733435, -0.2842715085, 0.3227505982, -0.1951234937, 0.1738314629, 0.1398985684, -0.1447517872, 0.1145583093, 0.2089667618, -0.0435804613, -0.1156108603, -0.1563791037, -0.286649406, -0.2859779596, -0.0606173538, -0.4345373511, 0.0260994863, 0.0050069243, 0.1478997618, -0.0802040398, 0.0760354549, 0.0442323238, 0.2561854422, -0.1987253428, 0.5789401531, -0.0001289723, -0.1655298769, 0.0553997196, -0.2835810781, -0.2924966216, 0.0555682331, -0.059530139, 0.2450537384, 0.0335683823, -0.1791678667, 0.0966272354, -0.3774506152, -0.0920626596, -0.1147692353, 0.1890468001, 0.1550743878, 0.0798438936, 0.3368458152, -0.2491132617, 0.2438392043, 0.3745868206, 0.5576677918, -0.1313134432, 0.2056199163, 0.1018672809, 0.3548142314, 0.4095388055, 0.1268225163, -0.2900161743, -0.2419890761, 0.2838991284, 0.0142172016, -0.2483236343, -0.2783830762, 0.1692025214, 0.0764763206, 0.7366983891, -0.5577979684, -0.1140447631, -0.4305657744, 0.1685491651, -0.3902668953, 0.0719519556, 0.1549600065, 0.0929495543, -0.0118967891, -0.4119158089, -0.0944789425, 0.1351483315, 0.0751211941, 0.211879015, 0.2510280013, -0.1262821853, 0.2214879841, -0.2606829107, 0.3279379606, 0.2481327355, -0.3805221021, -0.0002252855, -0.0308667142, -0.1849081218, -0.0945178419, -0.0433804132, 0.0452787653, -0.0704916641, 0.3731214404, 0.5257030129, 0.2177651823, -0.1684402376, 0.1170972064, 0.3756847382, 0.1648924202, 0.1534628272, 0.0623677932, 0.0424036495, -0.3042168021, 0.0391023457, 0.0110787395, 0.2551578581, -0.0433038548, 0.3766876459, -0.0346268043, -0.0403551757, -0.1273489594, -0.0218831338, 0.0662861913, -0.2807993889, -0.3609567285, -0.1409436762, 0.1119956076, 0.0275996514, 0.3346140981, -0.2615429461, 0.2003475726, -0.3364671767, 0.0672368109, -0.1536251754, -0.1003377736, -0.2305386215, 0.1230602711, 0.1779458821, -0.3417637646, 0.2291338444, 0.0857957602, -0.055318255, 0.0410853475, 0.1837372482, -0.3757711053, 0.4564962387, 0.2302481234, -0.1737114638, 0.1937039793, 0.0566021279, 0.233543992, -0.2558582425, 0.4978362322, -0.2411561906, -0.2049875259, 0.2311906368, 0.0342096724, -0.1543435901, -0.0228701308, -0.2087955177, 0.1444379389, 0.4477297664, -0.357827425, 0.2071652114, -0.5868687034, -0.2272821963, -0.4626278579, 0.0286325067, 0.2016873956, -0.3084817529, -0.0998900831, 0.5335567594, -0.1290864497, 0.2292512357, 0.224217549, -0.350042522, 0.3968577981, -0.1544257402, -0.0633992255, 0.5925039053, 0.069907397, -0.2872908413, -0.3488511443, -0.0791894644, 0.357780695, -0.1115627587, 0.1525213569, -0.1749598682, -0.0800709799, 0.2018077672, 0.1149849594, -0.0569892153, 0.1131260842, -0.205219686, 0.0311101526, 0.4739536941, 0.1160251647, -0.0859150141, -0.0094829053, -0.0761848539, 0.1589433551, 0.1887992918, -0.0295026712, -0.235153228, 0.0499473698, -0.1133161634, 0.1867136508, -0.0154645592, -0.1854670048, -0.2254040241, -0.1526825577, 0.179951787, -0.3040948808, 0.3576213121, 0.0391087979, 0.0106454194, -0.3328683376, -0.4570796788, -0.3931130171, -0.0499447249, 0.4065034688, 0.0490475222, 0.1186686605, -0.319529891, 0.0614470765, -0.2063672245, -0.0083993934, -0.4115723372, 0.1248527989, 0.1170990095, -0.2123431861, -0.3896256387, 0.1242081523, -0.1243455857, -0.0857829675, -0.2129511684, 0.3616208434, 0.1442990452, -0.2647683322, -0.3784198165, 0.4010249376, 0.1274123341, 0.2065182626, 0.134584859, -0.1895992607, 0.3265335858, -0.1915590316, -0.269097209, 0.349304229, -0.6575781703, -0.1802589595, -0.1800183952, -0.6270242929, -0.0393621437, 0.2436848432, -0.3853664398, 0.0459834337, 0.0531652272, 0.3270128667, 0.1938659251, 0.3799907863, -0.5700510144, -0.0476529449, 0.7285057306, -0.221271947, 0.0553404763, 0.053363923, -0.1717448086, -0.3505659997, -0.184595108, -0.0203246996, 0.7820936441, -0.0153637566, -0.036737375, 0.0553937554, 0.0814559162, -0.3519119322, 0.0955267325, 0.249150157, 0.0069553293, 0.4411149621, 0.3575189114, 0.111763373, -0.4882298708, 0.13027969, 0.1637693942, -0.0803555027, -0.3349175453, 0.0944051892, -0.1556544453, 0.0596319139, -0.3772046864, -0.0254958924, 0.0446694419, -0.0599994883, -0.0811634809, 0.04894609, 0.1002305225, -0.0627607778, 0.2464333773, 0.2244511992, -0.0175592452, -0.3098866045, 0.3108996749, -0.0712582022, -0.1993418038, -0.1147272512, 0.0123944804, -0.0296002105, 0.3543702662, -0.0558913723, -0.205573976, -0.1391870528, -0.1954615563, 0.2927094698, -0.0928989202, -0.0006683916, 0.0193675794, -0.0350414813, 0.0142718777, -0.1980375797, 0.1020732448, 0.1147157103, 0.1975729614, 0.0408129245, 0.1796197444, 0.1345438361, -0.1993230581, -0.2912899852, -0.0313385464, 0.0881655514, 0.2162626535, -0.1674562693, -0.0139830634, 0.4659084082, -0.0845906213, -0.1470181197, -0.6666823626, 0.1076656505, -0.3695811033, -0.5208799839, 0.1293288171, -0.0555756241, -0.2137967348, -0.2652086914, 0.1450387836, -0.0572916232, 0.5463923812, -0.2382081151, -0.1953878701, -0.1374088526, -0.0648619682, -0.0691306666, 0.4167663455, 0.3020019233, 0.0571572557, 0.1945847273, 0.0385170281, -0.0434040464, 0.1414674819, 0.3747740984, 0.0798515975, 0.0951736122, 0.1910054088, -0.0178645253, 0.5995127559, -0.199127838, -0.1613333672, 0.1348064989, 0.1795825809, 0.3882861435, -0.4722309709, -0.1041784137, 0.4822195768, -0.051631093, -0.0903250724, 0.2900758386, -0.2437631488, 0.0153201185, -0.1181699485, 0.1589725912, -0.2877341211, -0.2249056399, 0.4279423058, -0.0042331824, 0.21488747, 0.0903222337, 0.350717783, -0.1093766615, 0.0532984398, -0.1550860405, 0.1416811347, 0.4043022394, 0.0007885247, -0.544418633, -0.221226722, -0.1243485957, 0.0089224726, 0.1123211086, 0.5317482352, 0.0306651369, -0.1736358106, 0.177009508, 0.2656617463, 0.5368552804, -0.0887496173, -0.0582987592, 0.1731208116, -0.3876773417, -0.1465545297, -0.3178416491, -0.2131341398, 0.0677266419, -0.2510716319, 0.2636962831, -0.2030095756, -0.0140724555, -0.0744814277, 0.4079807699, -0.1185539588, 0.0340832174, -0.0952488482, -0.0083029494, -0.1466765702, 0.0440278575, -0.1954730302, -0.1743857861, -0.3775611818, 0.3725060821, -0.0666098669, 0.230961591, -0.0352429152, -0.1375806481, 0.2652430832, 0.1389312744, -0.1037347168, 0.1086482406, 0.0686224699, 0.0677358434, 0.0991383046, -0.0500398502, -0.0214676447, 0.2940165997, -0.3436630368, 0.1544418633, 0.4693882167, 0.0623108223, 0.0337496102, -0.42049101, 0.0856413096, -0.2320630252, 0.0723928958, 0.3479065001, -0.0806324109, -0.2999905348, -1.0697369576, 0.2451429665, 0.1815060526, 0.0347041935, 0.1759746969, -0.2191982269, -0.0421899371, 0.2608637512, 0.1543845832, 1.0892908573, -0.0507259369, 0.5218434334, 0.3229364455, -0.0731946304, 0.3819907606, -0.3416104913, 0.1129660308, -0.2447148561, -0.4424586594, 0.0531472862, -0.2846351862, -0.0072030351, 0.007824068, -0.1367423534, 0.3234070241, -0.279640466, -0.0524000451, -0.0252830088, 0.03405568, -0.1102773771, -0.0948151499, -0.0633685514, -0.0598192587, -0.199770093, 0.1812172234, -0.0717722327, 0.1181940138, -0.1108604744, 0.0298048779, -0.0448217094, -0.1666143686, -0.0512368158, 0.0092821568, -0.3341159523, -0.6155844927, 0.283613652, 0.3402104378, 0.0996387526, 0.1792659163, 0.0534419194, 0.0836944729, 0.2451817542, 0.4168068767, -0.0029480532, -0.0521088876, 0.4235519767, 0.0652488992, 0.0677939206, 0.2524889708, -0.0190391988, -0.0969826207, -0.8286117315, 0.1709129065, 0.3791942596, -0.2473130822, -0.4441280961, 0.0542823672, -0.0023441911, 0.0265491009, -0.0408353619, 0.1820115447, 0.1740787327, 0.431512028, -0.225662902, -0.4154625535, -0.1995776147, 0.2852519751, 0.2003930062, -0.0452266298, 0.4193190336, -0.0519285388, -0.2008042932, -0.0527365059, 0.2371239364, -0.0974291712, -0.4542705417, -0.101287894, -0.0841007233, 0.1255539656, -0.0190060735, 0.2705138326, -0.2472783923, 0.0637080669, -0.2091899812, -0.0291788876, 0.103811942, 0.0176787935, 0.427718401, 0.3437692821, 0.3647258282, 0.3129191697, 0.0152421221, -0.0564860813, -0.1305905581, 0.0297765583, 0.3241150975, 0.3977799118, 0.0183639377, 0.0064164773, -0.3131081462, -0.0604932271, -0.110937506, 0.1440344602, -0.1140713841, -0.0874803811, -0.1520570815, 0.2300265878, 0.0748611838, -0.0025266446, -0.1695275903, -0.1676241755, -0.1742765605, -0.2396647334, 0.2976014018, 0.2611992359, 0.0210242961, 0.1257656515, 0.4362259507, 0.0285327714, 0.1622671038, 0.1904211044, -0.1589650661, -0.2615147233, 0.1234549507, 0.0164787136, -0.2788669467, -0.0519070849, -0.599005878, 0.1433502138, 0.2141152769, 0.3800847828, 0.0123019265, -0.3274236917, 0.3317846656, -0.1678720117, 0.4022541046, 0.5396657586, 0.0275574438, -0.4948883057, 0.2594491839, -0.0720313415, 0.2253416181, -0.1419827193, -0.0395640172, 0.1817878634, -0.1139530316, 0.1323442906, -0.1584560871, 0.3500946164, -0.5146563053, -0.0992889404, 0.1379050314, -0.1613043845, 0.2236178666, 0.4979378879, 0.0465982929, -0.066817686, 0.1828082502, -0.0771140829, -0.1445319802, 0.2808187604, 0.7301182747, 0.5393792987, 0.4825178087, 0.0395529643, -0.0672643334, -0.4697549343, -0.2155254632, 0.1976958811, 0.0375332572, 0.5161761045, 0.2281163931, 0.046342086, 0.1134194359, -0.0799597129, 0.127046138, 0.3366570771, -0.1223197877, -0.0420722179, 0.2104706317, -0.3991296291, 0.081212163, 0.1484828889, -0.4271039963, 0.2103962004, 0.1051128358, 0.1707055271, -0.1856767237, -0.1114179194, 0.2426235229, -0.1366684884, 0.1284894198, -0.10801965, -0.055412665, 0.1767773479, 0.0271322522, 0.189820841, 0.1285145283, -0.0513710417, 0.351834327, -0.1466557682, 0.0571047924, -0.1032778025, 0.1627277434, 0.0270889252, 0.0942610577, 0.3115410805, -0.3098680973, 0.492308706, 0.0618408583, -0.0126402937, -0.1264346689, 0.3408854604, 0.2179017365, -0.5887756348, -0.0272434168, 0.1398260444, 0.0593107045, 0.0964888483, 0.1066815779, -0.490698874, 0.0379792862, 0.0147478171, 0.429368943, 0.1835751235, -0.008561898, -0.0065230522, 0.1072586179, 0.4353660047, 0.0826553926, -0.1552223116, -0.0474480242, 0.0259120613, -0.4284969568, 0.0506526902, 0.3247934878, 0.1212253571, 0.2492530495, -0.110071376, 0.282669425, 0.1380499303, -0.1708898842, 0.2173684835, -0.0020117201, 0.4330169857, -0.3053789735, -0.0873091072, -0.4109705389, 0.1781346947, -0.1709597707, -0.1909292936, 0.1201005057, 0.1029168665, 0.0281698406, -0.2006622404, -0.135013938, -0.0147142597, 0.3194841146, 0.2151919603, 0.0709730685, 0.2752596438, 0.0149045736, 0.0139683932, -0.1395522803, 0.0865889043, -0.0084388219, 0.2101176977, -0.2170506567, 0.3956196606, -0.1571721286, 0.1808826923, -0.3153145611, 0.2677331567, -0.1786731333, 0.2012967616, -0.2949556112, -0.0618328713, 0.322712481, 0.0421420224, 0.0804626346, 0.568616271, -0.0181752667, 0.2659776509, -0.2791576684, 0.2963318229, 0.4934825897, 0.1330403239, -0.2201578021, -0.2162212729, -0.0268435031, 0.1314434111, 0.0620844439, -0.3097267747, 0.0052932948, 0.2125544846, -0.2343694866, -0.3316030502, 0.2053730786, -0.0543339327, -0.2618589103, -0.1250598133, 0.5423794985, -0.0547790043, -0.0949316248, -0.0436526872, -0.0387110785 ]
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.1382128298, -0.2247207016, 0.0239642374, 0.2476740927, 0.1281206757, -0.1362014562, 0.203212589, 0.082456857, -0.6032931805, -0.0022733435, -0.2842715085, 0.3227505982, -0.1951234937, 0.1738314629, 0.1398985684, -0.1447517872, 0.1145583093, 0.2089667618, -0.0435804613, -0.1156108603, -0.1563791037, -0.286649406, -0.2859779596, -0.0606173538, -0.4345373511, 0.0260994863, 0.0050069243, 0.1478997618, -0.0802040398, 0.0760354549, 0.0442323238, 0.2561854422, -0.1987253428, 0.5789401531, -0.0001289723, -0.1655298769, 0.0553997196, -0.2835810781, -0.2924966216, 0.0555682331, -0.059530139, 0.2450537384, 0.0335683823, -0.1791678667, 0.0966272354, -0.3774506152, -0.0920626596, -0.1147692353, 0.1890468001, 0.1550743878, 0.0798438936, 0.3368458152, -0.2491132617, 0.2438392043, 0.3745868206, 0.5576677918, -0.1313134432, 0.2056199163, 0.1018672809, 0.3548142314, 0.4095388055, 0.1268225163, -0.2900161743, -0.2419890761, 0.2838991284, 0.0142172016, -0.2483236343, -0.2783830762, 0.1692025214, 0.0764763206, 0.7366983891, -0.5577979684, -0.1140447631, -0.4305657744, 0.1685491651, -0.3902668953, 0.0719519556, 0.1549600065, 0.0929495543, -0.0118967891, -0.4119158089, -0.0944789425, 0.1351483315, 0.0751211941, 0.211879015, 0.2510280013, -0.1262821853, 0.2214879841, -0.2606829107, 0.3279379606, 0.2481327355, -0.3805221021, -0.0002252855, -0.0308667142, -0.1849081218, -0.0945178419, -0.0433804132, 0.0452787653, -0.0704916641, 0.3731214404, 0.5257030129, 0.2177651823, -0.1684402376, 0.1170972064, 0.3756847382, 0.1648924202, 0.1534628272, 0.0623677932, 0.0424036495, -0.3042168021, 0.0391023457, 0.0110787395, 0.2551578581, -0.0433038548, 0.3766876459, -0.0346268043, -0.0403551757, -0.1273489594, -0.0218831338, 0.0662861913, -0.2807993889, -0.3609567285, -0.1409436762, 0.1119956076, 0.0275996514, 0.3346140981, -0.2615429461, 0.2003475726, -0.3364671767, 0.0672368109, -0.1536251754, -0.1003377736, -0.2305386215, 0.1230602711, 0.1779458821, -0.3417637646, 0.2291338444, 0.0857957602, -0.055318255, 0.0410853475, 0.1837372482, -0.3757711053, 0.4564962387, 0.2302481234, -0.1737114638, 0.1937039793, 0.0566021279, 0.233543992, -0.2558582425, 0.4978362322, -0.2411561906, -0.2049875259, 0.2311906368, 0.0342096724, -0.1543435901, -0.0228701308, -0.2087955177, 0.1444379389, 0.4477297664, -0.357827425, 0.2071652114, -0.5868687034, -0.2272821963, -0.4626278579, 0.0286325067, 0.2016873956, -0.3084817529, -0.0998900831, 0.5335567594, -0.1290864497, 0.2292512357, 0.224217549, -0.350042522, 0.3968577981, -0.1544257402, -0.0633992255, 0.5925039053, 0.069907397, -0.2872908413, -0.3488511443, -0.0791894644, 0.357780695, -0.1115627587, 0.1525213569, -0.1749598682, -0.0800709799, 0.2018077672, 0.1149849594, -0.0569892153, 0.1131260842, -0.205219686, 0.0311101526, 0.4739536941, 0.1160251647, -0.0859150141, -0.0094829053, -0.0761848539, 0.1589433551, 0.1887992918, -0.0295026712, -0.235153228, 0.0499473698, -0.1133161634, 0.1867136508, -0.0154645592, -0.1854670048, -0.2254040241, -0.1526825577, 0.179951787, -0.3040948808, 0.3576213121, 0.0391087979, 0.0106454194, -0.3328683376, -0.4570796788, -0.3931130171, -0.0499447249, 0.4065034688, 0.0490475222, 0.1186686605, -0.319529891, 0.0614470765, -0.2063672245, -0.0083993934, -0.4115723372, 0.1248527989, 0.1170990095, -0.2123431861, -0.3896256387, 0.1242081523, -0.1243455857, -0.0857829675, -0.2129511684, 0.3616208434, 0.1442990452, -0.2647683322, -0.3784198165, 0.4010249376, 0.1274123341, 0.2065182626, 0.134584859, -0.1895992607, 0.3265335858, -0.1915590316, -0.269097209, 0.349304229, -0.6575781703, -0.1802589595, -0.1800183952, -0.6270242929, -0.0393621437, 0.2436848432, -0.3853664398, 0.0459834337, 0.0531652272, 0.3270128667, 0.1938659251, 0.3799907863, -0.5700510144, -0.0476529449, 0.7285057306, -0.221271947, 0.0553404763, 0.053363923, -0.1717448086, -0.3505659997, -0.184595108, -0.0203246996, 0.7820936441, -0.0153637566, -0.036737375, 0.0553937554, 0.0814559162, -0.3519119322, 0.0955267325, 0.249150157, 0.0069553293, 0.4411149621, 0.3575189114, 0.111763373, -0.4882298708, 0.13027969, 0.1637693942, -0.0803555027, -0.3349175453, 0.0944051892, -0.1556544453, 0.0596319139, -0.3772046864, -0.0254958924, 0.0446694419, -0.0599994883, -0.0811634809, 0.04894609, 0.1002305225, -0.0627607778, 0.2464333773, 0.2244511992, -0.0175592452, -0.3098866045, 0.3108996749, -0.0712582022, -0.1993418038, -0.1147272512, 0.0123944804, -0.0296002105, 0.3543702662, -0.0558913723, -0.205573976, -0.1391870528, -0.1954615563, 0.2927094698, -0.0928989202, -0.0006683916, 0.0193675794, -0.0350414813, 0.0142718777, -0.1980375797, 0.1020732448, 0.1147157103, 0.1975729614, 0.0408129245, 0.1796197444, 0.1345438361, -0.1993230581, -0.2912899852, -0.0313385464, 0.0881655514, 0.2162626535, -0.1674562693, -0.0139830634, 0.4659084082, -0.0845906213, -0.1470181197, -0.6666823626, 0.1076656505, -0.3695811033, -0.5208799839, 0.1293288171, -0.0555756241, -0.2137967348, -0.2652086914, 0.1450387836, -0.0572916232, 0.5463923812, -0.2382081151, -0.1953878701, -0.1374088526, -0.0648619682, -0.0691306666, 0.4167663455, 0.3020019233, 0.0571572557, 0.1945847273, 0.0385170281, -0.0434040464, 0.1414674819, 0.3747740984, 0.0798515975, 0.0951736122, 0.1910054088, -0.0178645253, 0.5995127559, -0.199127838, -0.1613333672, 0.1348064989, 0.1795825809, 0.3882861435, -0.4722309709, -0.1041784137, 0.4822195768, -0.051631093, -0.0903250724, 0.2900758386, -0.2437631488, 0.0153201185, -0.1181699485, 0.1589725912, -0.2877341211, -0.2249056399, 0.4279423058, -0.0042331824, 0.21488747, 0.0903222337, 0.350717783, -0.1093766615, 0.0532984398, -0.1550860405, 0.1416811347, 0.4043022394, 0.0007885247, -0.544418633, -0.221226722, -0.1243485957, 0.0089224726, 0.1123211086, 0.5317482352, 0.0306651369, -0.1736358106, 0.177009508, 0.2656617463, 0.5368552804, -0.0887496173, -0.0582987592, 0.1731208116, -0.3876773417, -0.1465545297, -0.3178416491, -0.2131341398, 0.0677266419, -0.2510716319, 0.2636962831, -0.2030095756, -0.0140724555, -0.0744814277, 0.4079807699, -0.1185539588, 0.0340832174, -0.0952488482, -0.0083029494, -0.1466765702, 0.0440278575, -0.1954730302, -0.1743857861, -0.3775611818, 0.3725060821, -0.0666098669, 0.230961591, -0.0352429152, -0.1375806481, 0.2652430832, 0.1389312744, -0.1037347168, 0.1086482406, 0.0686224699, 0.0677358434, 0.0991383046, -0.0500398502, -0.0214676447, 0.2940165997, -0.3436630368, 0.1544418633, 0.4693882167, 0.0623108223, 0.0337496102, -0.42049101, 0.0856413096, -0.2320630252, 0.0723928958, 0.3479065001, -0.0806324109, -0.2999905348, -1.0697369576, 0.2451429665, 0.1815060526, 0.0347041935, 0.1759746969, -0.2191982269, -0.0421899371, 0.2608637512, 0.1543845832, 1.0892908573, -0.0507259369, 0.5218434334, 0.3229364455, -0.0731946304, 0.3819907606, -0.3416104913, 0.1129660308, -0.2447148561, -0.4424586594, 0.0531472862, -0.2846351862, -0.0072030351, 0.007824068, -0.1367423534, 0.3234070241, -0.279640466, -0.0524000451, -0.0252830088, 0.03405568, -0.1102773771, -0.0948151499, -0.0633685514, -0.0598192587, -0.199770093, 0.1812172234, -0.0717722327, 0.1181940138, -0.1108604744, 0.0298048779, -0.0448217094, -0.1666143686, -0.0512368158, 0.0092821568, -0.3341159523, -0.6155844927, 0.283613652, 0.3402104378, 0.0996387526, 0.1792659163, 0.0534419194, 0.0836944729, 0.2451817542, 0.4168068767, -0.0029480532, -0.0521088876, 0.4235519767, 0.0652488992, 0.0677939206, 0.2524889708, -0.0190391988, -0.0969826207, -0.8286117315, 0.1709129065, 0.3791942596, -0.2473130822, -0.4441280961, 0.0542823672, -0.0023441911, 0.0265491009, -0.0408353619, 0.1820115447, 0.1740787327, 0.431512028, -0.225662902, -0.4154625535, -0.1995776147, 0.2852519751, 0.2003930062, -0.0452266298, 0.4193190336, -0.0519285388, -0.2008042932, -0.0527365059, 0.2371239364, -0.0974291712, -0.4542705417, -0.101287894, -0.0841007233, 0.1255539656, -0.0190060735, 0.2705138326, -0.2472783923, 0.0637080669, -0.2091899812, -0.0291788876, 0.103811942, 0.0176787935, 0.427718401, 0.3437692821, 0.3647258282, 0.3129191697, 0.0152421221, -0.0564860813, -0.1305905581, 0.0297765583, 0.3241150975, 0.3977799118, 0.0183639377, 0.0064164773, -0.3131081462, -0.0604932271, -0.110937506, 0.1440344602, -0.1140713841, -0.0874803811, -0.1520570815, 0.2300265878, 0.0748611838, -0.0025266446, -0.1695275903, -0.1676241755, -0.1742765605, -0.2396647334, 0.2976014018, 0.2611992359, 0.0210242961, 0.1257656515, 0.4362259507, 0.0285327714, 0.1622671038, 0.1904211044, -0.1589650661, -0.2615147233, 0.1234549507, 0.0164787136, -0.2788669467, -0.0519070849, -0.599005878, 0.1433502138, 0.2141152769, 0.3800847828, 0.0123019265, -0.3274236917, 0.3317846656, -0.1678720117, 0.4022541046, 0.5396657586, 0.0275574438, -0.4948883057, 0.2594491839, -0.0720313415, 0.2253416181, -0.1419827193, -0.0395640172, 0.1817878634, -0.1139530316, 0.1323442906, -0.1584560871, 0.3500946164, -0.5146563053, -0.0992889404, 0.1379050314, -0.1613043845, 0.2236178666, 0.4979378879, 0.0465982929, -0.066817686, 0.1828082502, -0.0771140829, -0.1445319802, 0.2808187604, 0.7301182747, 0.5393792987, 0.4825178087, 0.0395529643, -0.0672643334, -0.4697549343, -0.2155254632, 0.1976958811, 0.0375332572, 0.5161761045, 0.2281163931, 0.046342086, 0.1134194359, -0.0799597129, 0.127046138, 0.3366570771, -0.1223197877, -0.0420722179, 0.2104706317, -0.3991296291, 0.081212163, 0.1484828889, -0.4271039963, 0.2103962004, 0.1051128358, 0.1707055271, -0.1856767237, -0.1114179194, 0.2426235229, -0.1366684884, 0.1284894198, -0.10801965, -0.055412665, 0.1767773479, 0.0271322522, 0.189820841, 0.1285145283, -0.0513710417, 0.351834327, -0.1466557682, 0.0571047924, -0.1032778025, 0.1627277434, 0.0270889252, 0.0942610577, 0.3115410805, -0.3098680973, 0.492308706, 0.0618408583, -0.0126402937, -0.1264346689, 0.3408854604, 0.2179017365, -0.5887756348, -0.0272434168, 0.1398260444, 0.0593107045, 0.0964888483, 0.1066815779, -0.490698874, 0.0379792862, 0.0147478171, 0.429368943, 0.1835751235, -0.008561898, -0.0065230522, 0.1072586179, 0.4353660047, 0.0826553926, -0.1552223116, -0.0474480242, 0.0259120613, -0.4284969568, 0.0506526902, 0.3247934878, 0.1212253571, 0.2492530495, -0.110071376, 0.282669425, 0.1380499303, -0.1708898842, 0.2173684835, -0.0020117201, 0.4330169857, -0.3053789735, -0.0873091072, -0.4109705389, 0.1781346947, -0.1709597707, -0.1909292936, 0.1201005057, 0.1029168665, 0.0281698406, -0.2006622404, -0.135013938, -0.0147142597, 0.3194841146, 0.2151919603, 0.0709730685, 0.2752596438, 0.0149045736, 0.0139683932, -0.1395522803, 0.0865889043, -0.0084388219, 0.2101176977, -0.2170506567, 0.3956196606, -0.1571721286, 0.1808826923, -0.3153145611, 0.2677331567, -0.1786731333, 0.2012967616, -0.2949556112, -0.0618328713, 0.322712481, 0.0421420224, 0.0804626346, 0.568616271, -0.0181752667, 0.2659776509, -0.2791576684, 0.2963318229, 0.4934825897, 0.1330403239, -0.2201578021, -0.2162212729, -0.0268435031, 0.1314434111, 0.0620844439, -0.3097267747, 0.0052932948, 0.2125544846, -0.2343694866, -0.3316030502, 0.2053730786, -0.0543339327, -0.2618589103, -0.1250598133, 0.5423794985, -0.0547790043, -0.0949316248, -0.0436526872, -0.0387110785 ]
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.1354897022, -0.056553334, -0.1098582968, -0.1969325691, 0.1657161862, 0.0915982723, 0.3340389729, 0.4940674901, -0.1472647786, 0.1399841905, 0.0302079692, 0.3426103592, 0.0195340998, 0.3617253304, 0.3380128145, -0.3144350648, 0.0504773594, 0.2795866728, -0.3302761018, -0.1137342826, -0.0358066931, 0.1083734557, -0.1115269214, 0.0685935393, 0.1368519664, -0.03016866, -0.0850050598, 0.2507577538, 0.1226196885, 0.0422674343, 0.1680343002, 0.1560600847, 0.3117435277, 0.7285920382, -0.0001057781, -0.0028074831, 0.075304687, -0.0946940556, -0.0748346597, -0.3386338949, -0.1552296579, -0.2183426917, 0.0090977028, -0.3499975204, -0.2264171988, 0.0812484473, 0.1151308268, -0.1407834291, 0.5385850668, 0.5260942578, 0.2700378597, 0.1933606714, -0.0691370964, 0.1015990078, 0.0665851012, 0.1731280982, -0.2012016326, 0.0446694121, 0.3796446919, -0.1914271265, 0.2758761048, 0.2336083502, -0.0874220058, -0.1543225944, 0.3159396052, 0.0481563509, 0.1311053634, -0.4717635214, 0.0087439176, 0.5226519704, 0.5459261537, -0.4398656487, -0.09455394, -0.1390540898, 0.0545595512, -0.3348766863, -0.4834915102, 0.1121077836, -0.1392929107, 0.2684395611, -0.5411638021, -0.2216576785, -0.4027035236, 0.1094903052, -0.0812655389, 0.093047142, 0.027011402, 0.0200878624, -0.0979302377, -0.2529075444, 0.0744441822, -0.0001649782, 0.2594030499, 0.1288955659, -0.1298980117, -0.3237949908, -0.0438236631, -0.4010472, 0.0947275534, 0.0584127419, -0.0523550659, 0.2425809205, -0.3122434616, 0.1642349958, -0.186247617, 0.2841512263, 0.1887119859, 0.2639869452, 0.182659477, -0.2470728755, 0.0311288238, 0.1899616718, -0.2797749043, -0.1054206491, -0.1855310649, -0.0917765945, 0.3033266068, -0.1337186843, -0.1332103014, -0.2010022253, -0.033962436, -0.0861751884, -0.1275318563, 0.2554564476, -0.0343338735, 0.0971730053, 0.2132085115, 0.2463805079, 0.0076522231, 0.0132319964, -0.0899327248, 0.1835040152, -0.2858374119, -0.1959550381, 0.0537288263, 0.1041617692, 0.0944254771, -0.1755782515, 0.0349993594, 0.3055782914, 0.3406414688, 0.3691465259, 0.1823939532, 0.0859625489, 0.1540006548, -0.0796310529, 0.2377059907, -0.1891968846, -0.3463328183, 0.3555154502, -0.3057298064, -0.1236111373, -0.1417658776, 0.2352068275, -0.2167693526, -0.4702014327, -0.2125682086, 0.4416576922, 0.0098986886, 0.000036113, 0.1393334866, -0.2634070814, -0.2979617119, -0.2006854266, 0.0635972619, 0.2533060312, -0.6270145774, 0.0087207034, 0.0280464962, -0.3241324723, 0.235395208, 0.047290992, -0.0420392863, 0.1241589189, 0.1520128846, -0.0321761668, 0.8314974904, -0.4936859608, 0.0705594271, 0.375086695, -0.1823387295, -0.1454540789, -0.1348915994, 0.0472492687, 0.1545658261, -0.1671396643, -0.2246345878, 0.4862652123, -0.3266910613, 0.2609780133, -0.0088492632, -0.1877930462, 0.3314789236, 0.1990185231, 0.0573096499, 0.2233081758, -0.0590548068, 0.0614016168, 0.3003415465, -0.3258719444, 0.0479198545, -0.0598336123, 0.1043673009, -0.0128769428, 0.1901644319, -0.2196418345, -0.3102653027, 0.0512252748, 0.061760135, 0.131134212, 0.2425628603, -0.1107349321, -0.2938145697, -0.1632142663, 0.1098193824, 0.0496341325, 0.1978271455, -0.2180910856, 0.0811860263, -0.1274270266, -0.4316334128, -0.038288489, -0.0973471701, 0.0361172706, -0.1963026673, 0.3646839261, 0.1487559825, -0.1214117557, -0.0107458904, 0.2152694315, -0.0853616595, -0.5249534249, -0.0451357812, 0.3602921665, -0.2417015731, 0.3648479283, 0.2504192293, 0.3131828904, 0.2691744864, -0.1689712405, 0.2763994038, 0.1496813446, -0.080179587, -0.0926616043, -0.3937800825, 0.4031626284, 0.0032228734, 0.2461512387, 0.0937030688, 0.1271241903, 0.3030198514, -0.3468945622, -0.2369308621, 0.0371235162, 0.0832644552, -0.0511138029, -0.2927992344, -0.1821140051, -0.442122817, 0.449257493, 0.465790689, -0.4190250635, -0.015199136, 0.3167185485, -0.0855057687, -0.0136620067, 0.1080684513, 0.2586344182, 0.0216838419, 0.1125841737, 0.0199203733, 0.2573532164, -0.1341615319, -0.0874178857, 0.1846424937, -0.0575619414, 0.4302837849, -0.2699301243, 0.0184532776, 0.0372075476, 0.0475733429, -0.2376665473, 0.0429765284, 0.3551799059, -0.1561987847, 0.1930074096, -0.4067865014, -0.4654603004, -0.2318646759, 0.0395090356, 0.2529281378, -0.1253550053, 0.0527369268, 0.0213938132, -0.0492598936, 0.136794433, 0.2264107019, 0.2378945947, 0.1030077338, 0.0996952504, -0.2383313179, -0.2714827657, -0.3784900308, 0.2252319157, 0.3144752383, 0.1246516109, 0.3925197721, -0.3350905776, -0.0369042009, -0.4471805692, -0.3675509691, 0.1797022521, -0.3059436083, -0.1407952905, 0.1060347706, 0.1329557896, -0.0322536081, 0.0568584874, -0.1369748414, -0.0169072337, 0.0253214985, 0.2052119076, -0.2348160446, -0.2529451251, -0.3389119804, -0.2970336676, -0.2056211978, -0.1967360824, 0.150704965, 0.3304750323, 0.3571401536, 0.1313922852, 0.2177333236, 0.464852035, 0.2672098279, -0.1147540882, 0.1104003489, -0.1542230546, 0.2004641593, -0.3984223604, -0.4548291862, 0.2888484001, 0.0177482218, 0.1205379367, 0.1832212955, -0.2387783229, -0.2569136024, -0.1529289186, 0.0101193935, 0.0296911336, 0.1653310508, 0.2616767883, -0.0988903195, -0.1023722738, -0.1688302755, -0.0462649688, 0.1744607538, -0.0326425359, 0.1593564153, 0.0931045115, 0.5094339848, 0.0120587945, 0.5736190677, 0.080474928, -0.4635077417, -0.1816734672, -0.3495342135, 0.1099511683, 0.2126194537, 0.0766794682, 0.2035273314, 0.1046321765, 0.1543191373, 0.2083734423, -0.0070089363, -0.2179464251, -0.032074362, -0.0371236876, -0.1571475565, -0.1940519363, 0.0228556115, -0.3748557568, 0.0867135823, 0.0973366946, -0.2412241697, -0.2570766807, -0.079996258, -0.0409280621, 0.2149730474, 0.2032998353, 0.0429553054, -0.5349573493, -0.16421251, -0.4318332374, 0.2228111029, -0.2035095394, -0.0520602092, -0.05918286, 0.1091002673, 0.015242029, -0.1294465363, 0.5048217177, -0.2355553955, 0.0115837427, 0.2057327926, -0.1228232458, -0.3891152442, -0.08651153, -0.5830415487, 0.4415950775, 0.1200188398, 0.2497494221, -0.0956400782, -0.2873218656, 0.3748548925, -0.0280567519, -0.1595228612, 0.0119604543, 0.1875297725, -0.4287966192, -0.3779330552, -0.1595682651, 0.0658511221, -0.2024732232, -0.415974617, -0.2461672872, 0.1638124734, 0.2247576416, 0.3919683099, 0.2527738214, -0.0790426582, 0.3548324704, -0.1536439806, -0.127459988, 0.0106797125, 0.0386052057, -0.0318942145, 0.0507645085, -0.2421768606, 0.0336726196, 0.0372344106, 0.33527565, 0.2374719977, 0.0662427545, -0.1106173098, -0.0915659964, 0.1527938247, 0.0967047811, 0.1496432871, 0.24755916, 0.1688020229, -0.4757457376, -0.530138433, 0.3401374221, -0.0073999688, -0.1359573752, 0.0993592143, 0.0928992778, -0.232726872, 0.1926202029, 0.2273745239, 0.9439203739, -0.2948635221, 0.1038287729, 0.594964385, -0.0607053004, 0.7162033319, -0.4931620359, -0.1701776087, -0.2644365728, -0.021754574, -0.0256888568, -0.168412149, -0.0368601941, 0.2574605644, -0.6424679756, 0.247012645, 0.0667688996, -0.133448869, 0.2724010944, 0.2310861051, 0.1183704659, -0.1616883576, -0.1287457943, 0.2684846818, 0.0740969181, -0.0578408651, -0.1091945022, -0.2582225502, -0.1783965826, 0.2283307463, -0.2402149141, 0.2407478392, -0.0256204829, -0.2215586454, 0.1087244153, -0.1106747165, 0.4480557442, 0.3364578784, 0.666010201, 0.1680410802, -0.3463960886, 0.0017298507, -0.0454418398, 0.1112884432, 0.0587020107, -0.0112942718, 0.4692014158, -0.2207794487, -0.2251426578, 0.2291724384, 0.1137776971, 0.0434798896, -0.1949651688, -0.1645005494, -0.0549056195, 0.0029230826, -0.176439926, 0.4043122232, -0.4062636495, 0.2102761865, 0.1911528558, 0.1750524938, -0.2124241143, 0.1991522163, 0.0095470129, -0.155726105, 0.1329838187, -0.2656419277, 0.2591841817, -0.2787064612, 0.3880555034, 0.3272638321, 0.0369453803, -0.2179431021, -0.1133802831, 0.1392154545, -0.0868154988, 0.1708612144, -0.0673051402, -0.0607714355, 0.1836999059, -0.0260011703, -0.1884331703, 0.174570322, -0.3014698327, -0.232205838, -0.1320877224, -0.1107657924, 0.1990892887, 0.0888256431, -0.1003729701, 0.2689450085, 0.0134300441, -0.24444291, -0.4105583429, 0.2353584021, -0.0595582165, 0.2885017097, 0.4336806834, 0.1194700077, -0.1040642411, -0.1778856367, 0.0551256016, -0.0050951345, -0.183855921, -0.3351590931, -0.1824341416, 0.1167358756, -0.016074324, -0.4926317632, 0.3430460989, 0.0909256786, -0.1951270252, -0.0338493101, 0.1562359482, 0.017452158, -0.0989516526, 0.4800693095, 0.2818797827, -0.0314355269, 0.2551215291, -0.2463381886, 0.1036119834, 0.2019969821, -0.1880030483, 0.4242718816, 0.1399916112, -0.1804623455, -0.2638302147, 0.1186978966, 0.2879514694, 0.2130421996, 0.4271520972, -0.0986884534, 0.2778204083, -0.0777333528, 0.2292594612, 0.0675175563, -0.3842887282, 0.185220778, 0.2729554474, 0.2478895634, -0.1421965212, 0.1829955727, 0.2702975273, -0.1790206581, 0.069347918, 0.1512636393, -0.1563564092, 0.3313253522, 0.2594581246, -0.184772566, 0.2648237348, -0.3637619615, 0.1419523358, 0.2273326516, -0.3223604262, -0.0151456278, -0.3122260571, 0.1277261525, 0.0570513643, -0.1197214276, 0.1553031355, 0.3168903291, 0.1523031741, -0.0843118727, 0.3610113561, -0.089813076, -0.041283235, 0.1228873804, -0.1211332232, 0.3119428754, 0.2081073225, 0.1741913706, 0.118505612, 0.0702542365, -0.0391794667, 0.3936652839, 0.1287217587, -0.0405918583, -0.2223962545, 0.0770249218, -0.1651807725, -0.2093957365, -0.3505537212, -0.105374828, -0.1378687918, 0.1823371798, 0.0087053888, 0.1171004996, 0.3869172633, -0.1468646526, 0.0901409239, 0.0904911235, -0.0567424744, -0.0716627985, -0.0677579045, -0.1516688615, 0.2467568368, 0.2833397686, 0.2651728988, 0.074294135, 0.421043396, 0.0679797232, -0.1373468637, 0.2447865456, 0.1359489262, 0.0686761215, -0.0924706236, -0.15918836, 0.1929428577, -0.1376970708, 0.1138624102, -0.0290909186, -0.2743698359, -0.2508378327, 0.2464630157, 0.1080307215, -0.2730606198, -0.2436655164, -0.0376399457, -0.2719660997, -0.1385139525, 0.5426123142, 0.1232784167, 0.1378569305, -0.1872280687, 0.1152628586, 0.00635463, 0.5613740087, 0.049006708, 0.3272161484, 0.0605118871, -0.0555821285, -0.311855644, 0.1494041681, 0.0035062097, -0.1453915536, 0.0505331382, -0.0098453797, 0.2392957211, 0.1602764875, 0.0475228652, -0.4620169401, -0.2005769312, 0.1359281242, -0.1267751604, -0.3016204536, -0.2518890202, 0.3050572574, 0.0338144824, -0.2266814858, 0.2748782337, -0.0354946218, 0.0481882393, -0.2989720404, 0.3004084826, 0.2310104072, 0.0054126615, -0.0243231058, 0.0861262307, 0.2654091716, -0.1187251732, 0.0633612201, 0.0004630545, -0.0467342399, -0.4390632808, 0.1593444943, -0.1768254936, -0.1780128628, -0.0915693119, -0.2608184218, -0.0369738229, -0.2370560318, 0.0015800595, -0.2869718969, -0.2905571461, 0.1905446947, -0.0497277826, -0.0407308303, 0.2042833865, 0.2939433157, -0.0183235258, 0.1006953344, -0.3634258509, 0.0011138394, 0.4306080341, -0.0717416555, -0.3922427297, 0.0657982081, -0.0065416843, -0.1159205735, -0.0193992592, -0.3849149048, -0.0626806319, 0.1641979367, -0.0941302478, -0.1247692257, 0.293592751, 0.1921741366, -0.053342063, -0.2185537964, 0.1653591543, 0.0157196522, -0.2285492122, -0.2731183171, -0.363255918 ]
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.094654642, 0.3181287348, 0.0874954239, 0.3629243076, 0.2740802765, -0.098954007, 0.2871833146, 0.2369657904, -0.0286743082, 0.0688425973, 0.2388482839, 0.3297021985, -0.0908720642, -0.3363241851, 0.1751252413, -0.5368741751, -0.2141876817, 0.1947949529, -0.2329529524, -0.1850880086, -0.1442272067, 0.3994991183, -0.3325726986, -0.0724648088, -0.1412278563, 0.1027452275, -0.0761773661, 0.1753540188, -0.1184645966, -0.3360359371, 0.1966994852, -0.0673624948, 0.0733794719, 0.2750072181, -0.0001245085, 0.330424726, 0.6380139589, -0.1410855949, -0.541077733, -0.0631842911, -0.0811771899, -0.23492603, 0.1993421018, -0.2498531044, -0.2083238661, -0.2352616787, 0.1023961753, -0.0581365153, 0.3563390672, 0.281555444, 0.0985949486, 0.1995158046, 0.1826249659, -0.1368425936, 0.5043625236, 0.0432152264, 0.056195356, 0.036174573, -0.2274199426, 0.2372247577, -0.20685637, 0.0459310859, -0.2663237751, -0.0578701682, 0.3306713104, -0.2204921991, 0.0874131992, 0.1752307564, -0.0942773074, -0.0104461908, 0.8057676554, 0.0052631879, 0.0640941858, -0.2012138367, 0.0806409195, -0.1908855587, 0.2383197993, 0.071561113, -0.4543534219, -0.1370184869, 0.1143342555, -0.1281685978, -0.3413941264, 0.3352711499, -0.0335041508, 0.4075173438, -0.023008436, 0.3289755285, 0.1422495097, 0.1264765114, 0.2072718292, -0.2324919105, -0.1268548518, 0.1452391446, -0.380857259, 0.174837932, 0.176376462, 0.2966892421, -0.0637694821, 0.1829952598, 0.0932282954, -0.1865080446, 0.0735040158, 0.1276495606, 0.3398444057, 0.1209283322, 0.1319722831, 0.0127152279, 0.0047447276, -0.0747596323, 0.0249652416, 0.032071799, -0.0236139931, -0.3605451882, -0.2406126261, 0.2245738804, 0.2357541323, -0.0485623963, 0.0452680066, -0.2116844356, -0.3131861985, -0.208233431, 0.1694274843, 0.4560172558, 0.0537248775, 0.4907973707, 0.313880533, 0.1613336504, -0.1267469376, -0.5722317696, -0.1803703755, 0.3171550035, -0.1612585485, -0.1637432575, 0.3268586397, 0.0613694154, 0.286522001, -0.2762348354, 0.1872422099, 0.1734667271, -0.016800344, -0.1587234288, -0.2288749218, 0.1743652225, 0.1935789436, 0.2789788842, 0.2141344696, -0.2745321691, 0.0189147592, 0.2086557895, -0.2223850042, -0.1689472646, 0.2648111284, 0.0425681472, 0.1071547866, -0.1384299994, -0.5075429678, 0.1115979776, -0.1357538104, -0.2659596801, -0.2610870302, -0.201934427, -0.0996058732, -0.2297557294, 0.3767794967, 0.529470861, -0.098968327, -0.0291800797, -0.0063149966, 0.1354220361, 0.0829520971, 0.0357793793, -0.3114126325, 0.4921750724, -0.1760827601, -0.1047419533, 0.8686540723, -0.5204972029, -0.0506761596, 0.3639993668, 0.1172986627, -0.0718868524, 0.3070545495, 0.0618703477, 0.1170745939, -0.0958946794, 0.0317524448, 0.4021976888, -0.046544306, 0.0234556496, -0.1533480734, 0.0390012413, 0.2969610691, 0.3607649207, 0.0934300125, 0.2212416679, -0.2734819651, 0.4947687685, 0.2071567923, 0.0037384867, 0.0605676472, 0.5123980641, -0.390142858, -0.0827333555, 0.0390273444, 0.1130773425, 0.0266656913, -0.0488631651, -0.1335099041, 0.1562320739, 0.1626266688, 0.1614465415, -0.4275048673, 0.0230149254, -0.0830780715, 0.0427632816, 0.0567393824, 0.2840377688, -0.1937215477, 0.2580313981, 0.0285487026, 0.3317640126, 0.017510511, -0.0234071594, -0.3775368333, 0.2045924366, -0.1200194955, -0.2554772496, 0.2829675674, -0.0228371918, 0.4561698735, 0.042088069, -0.1734324098, 0.1393239796, 0.1799443811, -0.0209081769, 0.0413393937, -0.2081558555, 0.0283869375, -0.134917289, -0.0474721715, 0.574793756, 0.2473167777, -0.1931291968, 0.0073984708, -0.0563833863, -0.0950335562, 0.2234851569, -0.0520737171, 0.1890360564, 0.0732779354, 0.2233696133, -0.0849318728, 0.2273711562, 0.2046999633, 0.1990076751, 0.2141202241, -0.0926080868, -0.0686817393, -0.2286663949, 0.2874104977, 0.2148695737, 0.0324275829, -0.0144207673, -0.2963916659, 0.002504237, 0.2251097411, -0.0638520122, 0.2678776383, 0.1726975441, -0.1246884763, -0.0075489143, 0.00181593, -0.1072779521, 0.4460032582, 0.0564809367, 0.261120379, -0.0166313387, -0.108431384, -0.0197837651, -0.24262546, -0.2545629442, 0.0278430432, 0.2242685556, -0.424731195, 0.0356796831, -0.2087246776, -0.6600084901, -0.2359618247, -0.0494453087, -0.1605995297, -0.5055605769, -0.1612768173, 0.3273542523, 0.0146421865, 0.1275830567, -0.1205851361, 0.230570212, 0.3319920897, -0.233930856, -0.4185199738, -0.1734264493, -0.2996532321, -0.0336429365, 0.1122228652, 0.1323725134, 0.1385988444, 0.1139134169, -0.0306634754, -0.066098012, -0.0057061538, 0.2152481377, -0.1090574265, 0.1235097572, 0.2650186718, 0.3777042627, -0.2389565706, -0.0974709392, 0.3813405931, 0.0026629642, 0.1714812219, 0.3198915422, 0.0355915427, -0.0754798055, -0.1061445326, -0.2500556111, 0.0514180809, -0.6115214825, -0.1775636971, 0.2373055965, 0.0000521066, 0.1542860419, 0.2415066361, 0.1805425137, 0.1287686825, 0.3176607788, 0.0169244148, -0.2387425154, 0.3329904377, -0.1693132967, -0.3372406065, -0.1376383603, 0.1169654578, 0.2338877916, 0.2198899835, -0.4601657689, -0.3833649158, 0.296104461, -0.0347962677, 0.0065299151, 0.1694482416, 0.3062465191, 0.0171285495, 0.0924846232, -0.2547695637, -0.1989658475, 0.0468885377, -0.222273916, 0.2826963663, 0.2882092893, 0.3215004504, -0.0384760611, 0.9122629762, 0.2374220043, 0.1430851072, 0.530951798, 0.1021702737, 0.2991390228, -0.0367713459, -0.2422949821, 0.2306569368, 0.1812364757, 0.1366697997, 0.2091353536, -0.2492396384, -0.2554642856, -0.4086244404, -0.2131765038, -0.2362274975, -0.3552213907, 0.1634071618, -0.3094643652, 0.2537307143, -0.1385109425, 0.2027334422, -0.3603169918, -0.0995285511, 0.1494172364, 0.144006446, 0.1602015644, 0.1130500138, -0.0752254799, -0.0607115105, -0.3460039198, 0.3344674706, -0.1206774265, 0.3733887672, -0.0566634089, 0.0655356199, 0.0389599763, -0.0580293201, 0.7135969996, -0.3010059893, -0.003640207, 0.2482841909, 0.220738098, -0.6750037074, 0.1139070019, -0.1122867912, 0.2548103929, 0.0049680248, -0.3782781065, -0.4797843397, -0.1921130568, 0.1742550284, -0.072328344, -0.1652674377, -0.0882528499, -0.2201903164, -0.3247163296, -0.3097018003, -0.1059834957, -0.044404991, 0.4491242468, 0.230139181, 0.2729759812, -0.1422614455, 0.0037104636, -0.0231205449, -0.127225548, 0.144897908, -0.0203225054, -0.2366640419, -0.1947487295, 0.5161569715, -0.5861029625, 0.3650783896, 0.2983980179, -0.6307682991, -0.0487273782, -0.0185209103, 0.284116298, 0.2116641849, -0.3109893203, 0.0528069921, -0.0490273871, -0.1705607176, -0.0002039783, 0.2304157019, 0.4107174277, -0.3813049197, -0.0521863364, -0.562924087, 0.4374682605, -0.1350970417, -0.0104104429, 0.2742980719, -0.1294574142, -0.1884309649, 0.6053571105, -0.0318606235, 0.9742015004, 0.2021539956, 0.1885176301, 0.4231553674, -0.127776891, 0.6227620244, -0.1243734881, 0.3219043612, -0.3893948793, 0.0414472185, -0.0638145283, -0.1746104658, -0.0930561423, 0.1332765222, -0.2606723905, 0.277487725, 0.0704493821, -0.0549802966, 0.0889615566, 0.1255859882, 0.1116454154, -0.1067718118, -0.5512532592, 0.0577971078, -0.4502735436, 0.0162891205, -0.0729944333, -0.1618129909, 0.0773974955, -0.5212675333, -0.1029227525, 0.1655479223, -0.2402706742, 0.1557008326, -0.056535773, -0.2547736764, 0.1854230613, 0.3622986078, -0.0209174044, 0.0569430888, -0.1994662881, 0.3114801347, -0.5459028482, -0.0695610195, -0.1593799889, 0.3023843765, 0.2848667204, -0.0251291394, -0.1467426121, 0.3340931535, -0.1659710109, -0.6099499464, -0.0495171398, -0.0853257775, 0.4431836605, -0.0368483178, -0.2056545317, 0.0775685906, -0.152420342, 0.0355423093, 0.0395075381, 0.0244935919, -0.2060181499, 0.0688499659, -0.0528989509, 0.002528429, 0.1737151593, 0.477181375, 0.0580930933, 0.0253525078, 0.5821676254, 0.2740311325, -0.0257173106, -0.1586009562, -0.2322815359, -0.3409323394, -0.6085490584, 0.1990738809, 0.3044447005, 0.0621340871, 0.0874246433, 0.2038395703, -0.0779726356, 0.1705035418, 0.0560898781, -0.3049573898, 0.1134141833, 0.206019789, -0.2436185777, -0.0629764572, 0.4305719435, -0.0323963687, 0.3100136817, -0.1491774172, -0.1858067065, -0.1241254136, -0.1878902614, 0.1358191222, 0.1600105613, -0.2263962626, -0.11575827, 0.2592060566, 0.0706710964, -0.2440281212, -0.2439686805, -0.0603576973, -0.1667725742, 0.2002599686, 0.2243478596, 0.1214102432, -0.1290193498, -0.4042983651, -0.12375018, -0.1816294789, 0.0225899667, -0.1426827013, -0.2429106236, 0.0557441525, 0.1504143625, 0.3674410284, -0.5081474781, 0.1975684166, 0.076038748, -0.0926697999, 0.2132935524, 0.1916122735, 0.2624573112, -0.049692601, -0.4662697017, 0.1615185738, 0.2004983425, -0.0344548114, 0.5295457244, -0.1840266585, -0.1134773791, -0.1094245762, -0.080676496, 0.080778569, -0.1513765603, 0.0117967948, 0.0692101419, 0.0332742222, -0.1537943035, 0.0494466536, 0.3225930929, 0.2039948553, -0.0651856065, 0.0736155137, -0.0870872214, -0.3661147356, 0.2096334547, 0.1163531318, 0.3633619547, -0.1511386037, -0.1119755208, 0.1339499354, -0.0349586383, -0.0854377076, -0.0527978018, 0.2270282805, 0.0537387952, 0.2903498113, -0.1444785446, 0.0543751121, -0.0564409941, -0.3188201189, -0.0471044257, -0.1534539461, 0.2008991688, 0.4862774611, 0.1516948342, 0.1443454027, -0.1632329077, 0.1997063756, 0.0482337587, 0.1141902208, -0.2721174359, 0.1604952663, 0.0182799697, 0.0310195461, -0.6282173395, -0.0157810077, -0.4327566028, -0.1448916495, -0.0049460158, -0.1630238444, -0.0300582275, 0.2119426429, -0.1169983223, -0.3793837726, 0.2154734731, 0.1218476668, -0.0333379768, -0.1512891948, 0.2037802339, 0.0854866356, 0.1178437024, 0.1998905241, 0.270609349, 0.3540652692, 0.4170275033, -0.2698947489, -0.1693299115, 0.2886005938, 0.0005998537, -0.2072156221, -0.0614672974, 0.0971706957, 0.3210935593, 0.3959821463, 0.0738286451, 0.014399346, -0.0085142422, 0.1275811046, -0.0613212883, -0.2382629663, 0.4723810554, -0.0463524535, -0.0918836147, -0.3303663135, 0.0329026021, -0.5663154125, 0.3297740519, 0.0595323108, 0.3573004603, -0.0106477253, -0.2045570612, -0.0199388098, -0.065626964, 0.3586009443, 0.3856934309, 0.3740835786, -0.3091626763, -0.4248058796, -0.4309856594, 0.1581876874, 0.1639747918, -0.2411169708, 0.1070591435, 0.1998968422, 0.2831847668, 0.2404052913, -0.1074830145, -0.2510271668, -0.0557260141, 0.1786379069, -0.2189364731, -0.2895008326, 0.2064391971, 0.0696627125, -0.1936566532, -0.2178903073, -0.1419938952, 0.0083855279, 0.0918040276, -0.1656746119, -0.3625211418, 0.1477171183, 0.0822411776, -0.0218157619, -0.0256655794, 0.4474616647, 0.0580899045, -0.0019748732, -0.1832552254, -0.0743171275, -0.1690217704, -0.2816383243, -0.1547075212, 0.5438705683, -0.2213324904, 0.2525568604, -0.3257878423, 0.2445081472, -0.1334823966, 0.3438495696, -0.1466024816, 0.0648295656, -0.4684083462, 0.3983725607, -0.1344812214, -0.0675856322, -0.0255528577, 0.1462190449, -0.4820400476, -0.2730075121, 0.5664800406, -0.5063452125, -0.2313737124, 0.006317921, 0.2157870829, -0.4116667509, 0.335426122, -0.3584128022, -0.0386062562, 0.2855786681, -0.0673244745, -0.1444849074, 0.1655160785, -0.0476101153, 0.1122499853, -0.0831057876, -0.5315563679, 0.0437985137, -0.1335092932, -0.1396398991, -0.2604458332 ]
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.094654642, 0.3181287348, 0.0874954239, 0.3629243076, 0.2740802765, -0.098954007, 0.2871833146, 0.2369657904, -0.0286743082, 0.0688425973, 0.2388482839, 0.3297021985, -0.0908720642, -0.3363241851, 0.1751252413, -0.5368741751, -0.2141876817, 0.1947949529, -0.2329529524, -0.1850880086, -0.1442272067, 0.3994991183, -0.3325726986, -0.0724648088, -0.1412278563, 0.1027452275, -0.0761773661, 0.1753540188, -0.1184645966, -0.3360359371, 0.1966994852, -0.0673624948, 0.0733794719, 0.2750072181, -0.0001245085, 0.330424726, 0.6380139589, -0.1410855949, -0.541077733, -0.0631842911, -0.0811771899, -0.23492603, 0.1993421018, -0.2498531044, -0.2083238661, -0.2352616787, 0.1023961753, -0.0581365153, 0.3563390672, 0.281555444, 0.0985949486, 0.1995158046, 0.1826249659, -0.1368425936, 0.5043625236, 0.0432152264, 0.056195356, 0.036174573, -0.2274199426, 0.2372247577, -0.20685637, 0.0459310859, -0.2663237751, -0.0578701682, 0.3306713104, -0.2204921991, 0.0874131992, 0.1752307564, -0.0942773074, -0.0104461908, 0.8057676554, 0.0052631879, 0.0640941858, -0.2012138367, 0.0806409195, -0.1908855587, 0.2383197993, 0.071561113, -0.4543534219, -0.1370184869, 0.1143342555, -0.1281685978, -0.3413941264, 0.3352711499, -0.0335041508, 0.4075173438, -0.023008436, 0.3289755285, 0.1422495097, 0.1264765114, 0.2072718292, -0.2324919105, -0.1268548518, 0.1452391446, -0.380857259, 0.174837932, 0.176376462, 0.2966892421, -0.0637694821, 0.1829952598, 0.0932282954, -0.1865080446, 0.0735040158, 0.1276495606, 0.3398444057, 0.1209283322, 0.1319722831, 0.0127152279, 0.0047447276, -0.0747596323, 0.0249652416, 0.032071799, -0.0236139931, -0.3605451882, -0.2406126261, 0.2245738804, 0.2357541323, -0.0485623963, 0.0452680066, -0.2116844356, -0.3131861985, -0.208233431, 0.1694274843, 0.4560172558, 0.0537248775, 0.4907973707, 0.313880533, 0.1613336504, -0.1267469376, -0.5722317696, -0.1803703755, 0.3171550035, -0.1612585485, -0.1637432575, 0.3268586397, 0.0613694154, 0.286522001, -0.2762348354, 0.1872422099, 0.1734667271, -0.016800344, -0.1587234288, -0.2288749218, 0.1743652225, 0.1935789436, 0.2789788842, 0.2141344696, -0.2745321691, 0.0189147592, 0.2086557895, -0.2223850042, -0.1689472646, 0.2648111284, 0.0425681472, 0.1071547866, -0.1384299994, -0.5075429678, 0.1115979776, -0.1357538104, -0.2659596801, -0.2610870302, -0.201934427, -0.0996058732, -0.2297557294, 0.3767794967, 0.529470861, -0.098968327, -0.0291800797, -0.0063149966, 0.1354220361, 0.0829520971, 0.0357793793, -0.3114126325, 0.4921750724, -0.1760827601, -0.1047419533, 0.8686540723, -0.5204972029, -0.0506761596, 0.3639993668, 0.1172986627, -0.0718868524, 0.3070545495, 0.0618703477, 0.1170745939, -0.0958946794, 0.0317524448, 0.4021976888, -0.046544306, 0.0234556496, -0.1533480734, 0.0390012413, 0.2969610691, 0.3607649207, 0.0934300125, 0.2212416679, -0.2734819651, 0.4947687685, 0.2071567923, 0.0037384867, 0.0605676472, 0.5123980641, -0.390142858, -0.0827333555, 0.0390273444, 0.1130773425, 0.0266656913, -0.0488631651, -0.1335099041, 0.1562320739, 0.1626266688, 0.1614465415, -0.4275048673, 0.0230149254, -0.0830780715, 0.0427632816, 0.0567393824, 0.2840377688, -0.1937215477, 0.2580313981, 0.0285487026, 0.3317640126, 0.017510511, -0.0234071594, -0.3775368333, 0.2045924366, -0.1200194955, -0.2554772496, 0.2829675674, -0.0228371918, 0.4561698735, 0.042088069, -0.1734324098, 0.1393239796, 0.1799443811, -0.0209081769, 0.0413393937, -0.2081558555, 0.0283869375, -0.134917289, -0.0474721715, 0.574793756, 0.2473167777, -0.1931291968, 0.0073984708, -0.0563833863, -0.0950335562, 0.2234851569, -0.0520737171, 0.1890360564, 0.0732779354, 0.2233696133, -0.0849318728, 0.2273711562, 0.2046999633, 0.1990076751, 0.2141202241, -0.0926080868, -0.0686817393, -0.2286663949, 0.2874104977, 0.2148695737, 0.0324275829, -0.0144207673, -0.2963916659, 0.002504237, 0.2251097411, -0.0638520122, 0.2678776383, 0.1726975441, -0.1246884763, -0.0075489143, 0.00181593, -0.1072779521, 0.4460032582, 0.0564809367, 0.261120379, -0.0166313387, -0.108431384, -0.0197837651, -0.24262546, -0.2545629442, 0.0278430432, 0.2242685556, -0.424731195, 0.0356796831, -0.2087246776, -0.6600084901, -0.2359618247, -0.0494453087, -0.1605995297, -0.5055605769, -0.1612768173, 0.3273542523, 0.0146421865, 0.1275830567, -0.1205851361, 0.230570212, 0.3319920897, -0.233930856, -0.4185199738, -0.1734264493, -0.2996532321, -0.0336429365, 0.1122228652, 0.1323725134, 0.1385988444, 0.1139134169, -0.0306634754, -0.066098012, -0.0057061538, 0.2152481377, -0.1090574265, 0.1235097572, 0.2650186718, 0.3777042627, -0.2389565706, -0.0974709392, 0.3813405931, 0.0026629642, 0.1714812219, 0.3198915422, 0.0355915427, -0.0754798055, -0.1061445326, -0.2500556111, 0.0514180809, -0.6115214825, -0.1775636971, 0.2373055965, 0.0000521066, 0.1542860419, 0.2415066361, 0.1805425137, 0.1287686825, 0.3176607788, 0.0169244148, -0.2387425154, 0.3329904377, -0.1693132967, -0.3372406065, -0.1376383603, 0.1169654578, 0.2338877916, 0.2198899835, -0.4601657689, -0.3833649158, 0.296104461, -0.0347962677, 0.0065299151, 0.1694482416, 0.3062465191, 0.0171285495, 0.0924846232, -0.2547695637, -0.1989658475, 0.0468885377, -0.222273916, 0.2826963663, 0.2882092893, 0.3215004504, -0.0384760611, 0.9122629762, 0.2374220043, 0.1430851072, 0.530951798, 0.1021702737, 0.2991390228, -0.0367713459, -0.2422949821, 0.2306569368, 0.1812364757, 0.1366697997, 0.2091353536, -0.2492396384, -0.2554642856, -0.4086244404, -0.2131765038, -0.2362274975, -0.3552213907, 0.1634071618, -0.3094643652, 0.2537307143, -0.1385109425, 0.2027334422, -0.3603169918, -0.0995285511, 0.1494172364, 0.144006446, 0.1602015644, 0.1130500138, -0.0752254799, -0.0607115105, -0.3460039198, 0.3344674706, -0.1206774265, 0.3733887672, -0.0566634089, 0.0655356199, 0.0389599763, -0.0580293201, 0.7135969996, -0.3010059893, -0.003640207, 0.2482841909, 0.220738098, -0.6750037074, 0.1139070019, -0.1122867912, 0.2548103929, 0.0049680248, -0.3782781065, -0.4797843397, -0.1921130568, 0.1742550284, -0.072328344, -0.1652674377, -0.0882528499, -0.2201903164, -0.3247163296, -0.3097018003, -0.1059834957, -0.044404991, 0.4491242468, 0.230139181, 0.2729759812, -0.1422614455, 0.0037104636, -0.0231205449, -0.127225548, 0.144897908, -0.0203225054, -0.2366640419, -0.1947487295, 0.5161569715, -0.5861029625, 0.3650783896, 0.2983980179, -0.6307682991, -0.0487273782, -0.0185209103, 0.284116298, 0.2116641849, -0.3109893203, 0.0528069921, -0.0490273871, -0.1705607176, -0.0002039783, 0.2304157019, 0.4107174277, -0.3813049197, -0.0521863364, -0.562924087, 0.4374682605, -0.1350970417, -0.0104104429, 0.2742980719, -0.1294574142, -0.1884309649, 0.6053571105, -0.0318606235, 0.9742015004, 0.2021539956, 0.1885176301, 0.4231553674, -0.127776891, 0.6227620244, -0.1243734881, 0.3219043612, -0.3893948793, 0.0414472185, -0.0638145283, -0.1746104658, -0.0930561423, 0.1332765222, -0.2606723905, 0.277487725, 0.0704493821, -0.0549802966, 0.0889615566, 0.1255859882, 0.1116454154, -0.1067718118, -0.5512532592, 0.0577971078, -0.4502735436, 0.0162891205, -0.0729944333, -0.1618129909, 0.0773974955, -0.5212675333, -0.1029227525, 0.1655479223, -0.2402706742, 0.1557008326, -0.056535773, -0.2547736764, 0.1854230613, 0.3622986078, -0.0209174044, 0.0569430888, -0.1994662881, 0.3114801347, -0.5459028482, -0.0695610195, -0.1593799889, 0.3023843765, 0.2848667204, -0.0251291394, -0.1467426121, 0.3340931535, -0.1659710109, -0.6099499464, -0.0495171398, -0.0853257775, 0.4431836605, -0.0368483178, -0.2056545317, 0.0775685906, -0.152420342, 0.0355423093, 0.0395075381, 0.0244935919, -0.2060181499, 0.0688499659, -0.0528989509, 0.002528429, 0.1737151593, 0.477181375, 0.0580930933, 0.0253525078, 0.5821676254, 0.2740311325, -0.0257173106, -0.1586009562, -0.2322815359, -0.3409323394, -0.6085490584, 0.1990738809, 0.3044447005, 0.0621340871, 0.0874246433, 0.2038395703, -0.0779726356, 0.1705035418, 0.0560898781, -0.3049573898, 0.1134141833, 0.206019789, -0.2436185777, -0.0629764572, 0.4305719435, -0.0323963687, 0.3100136817, -0.1491774172, -0.1858067065, -0.1241254136, -0.1878902614, 0.1358191222, 0.1600105613, -0.2263962626, -0.11575827, 0.2592060566, 0.0706710964, -0.2440281212, -0.2439686805, -0.0603576973, -0.1667725742, 0.2002599686, 0.2243478596, 0.1214102432, -0.1290193498, -0.4042983651, -0.12375018, -0.1816294789, 0.0225899667, -0.1426827013, -0.2429106236, 0.0557441525, 0.1504143625, 0.3674410284, -0.5081474781, 0.1975684166, 0.076038748, -0.0926697999, 0.2132935524, 0.1916122735, 0.2624573112, -0.049692601, -0.4662697017, 0.1615185738, 0.2004983425, -0.0344548114, 0.5295457244, -0.1840266585, -0.1134773791, -0.1094245762, -0.080676496, 0.080778569, -0.1513765603, 0.0117967948, 0.0692101419, 0.0332742222, -0.1537943035, 0.0494466536, 0.3225930929, 0.2039948553, -0.0651856065, 0.0736155137, -0.0870872214, -0.3661147356, 0.2096334547, 0.1163531318, 0.3633619547, -0.1511386037, -0.1119755208, 0.1339499354, -0.0349586383, -0.0854377076, -0.0527978018, 0.2270282805, 0.0537387952, 0.2903498113, -0.1444785446, 0.0543751121, -0.0564409941, -0.3188201189, -0.0471044257, -0.1534539461, 0.2008991688, 0.4862774611, 0.1516948342, 0.1443454027, -0.1632329077, 0.1997063756, 0.0482337587, 0.1141902208, -0.2721174359, 0.1604952663, 0.0182799697, 0.0310195461, -0.6282173395, -0.0157810077, -0.4327566028, -0.1448916495, -0.0049460158, -0.1630238444, -0.0300582275, 0.2119426429, -0.1169983223, -0.3793837726, 0.2154734731, 0.1218476668, -0.0333379768, -0.1512891948, 0.2037802339, 0.0854866356, 0.1178437024, 0.1998905241, 0.270609349, 0.3540652692, 0.4170275033, -0.2698947489, -0.1693299115, 0.2886005938, 0.0005998537, -0.2072156221, -0.0614672974, 0.0971706957, 0.3210935593, 0.3959821463, 0.0738286451, 0.014399346, -0.0085142422, 0.1275811046, -0.0613212883, -0.2382629663, 0.4723810554, -0.0463524535, -0.0918836147, -0.3303663135, 0.0329026021, -0.5663154125, 0.3297740519, 0.0595323108, 0.3573004603, -0.0106477253, -0.2045570612, -0.0199388098, -0.065626964, 0.3586009443, 0.3856934309, 0.3740835786, -0.3091626763, -0.4248058796, -0.4309856594, 0.1581876874, 0.1639747918, -0.2411169708, 0.1070591435, 0.1998968422, 0.2831847668, 0.2404052913, -0.1074830145, -0.2510271668, -0.0557260141, 0.1786379069, -0.2189364731, -0.2895008326, 0.2064391971, 0.0696627125, -0.1936566532, -0.2178903073, -0.1419938952, 0.0083855279, 0.0918040276, -0.1656746119, -0.3625211418, 0.1477171183, 0.0822411776, -0.0218157619, -0.0256655794, 0.4474616647, 0.0580899045, -0.0019748732, -0.1832552254, -0.0743171275, -0.1690217704, -0.2816383243, -0.1547075212, 0.5438705683, -0.2213324904, 0.2525568604, -0.3257878423, 0.2445081472, -0.1334823966, 0.3438495696, -0.1466024816, 0.0648295656, -0.4684083462, 0.3983725607, -0.1344812214, -0.0675856322, -0.0255528577, 0.1462190449, -0.4820400476, -0.2730075121, 0.5664800406, -0.5063452125, -0.2313737124, 0.006317921, 0.2157870829, -0.4116667509, 0.335426122, -0.3584128022, -0.0386062562, 0.2855786681, -0.0673244745, -0.1444849074, 0.1655160785, -0.0476101153, 0.1122499853, -0.0831057876, -0.5315563679, 0.0437985137, -0.1335092932, -0.1396398991, -0.2604458332 ]
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.094654642, 0.3181287348, 0.0874954239, 0.3629243076, 0.2740802765, -0.098954007, 0.2871833146, 0.2369657904, -0.0286743082, 0.0688425973, 0.2388482839, 0.3297021985, -0.0908720642, -0.3363241851, 0.1751252413, -0.5368741751, -0.2141876817, 0.1947949529, -0.2329529524, -0.1850880086, -0.1442272067, 0.3994991183, -0.3325726986, -0.0724648088, -0.1412278563, 0.1027452275, -0.0761773661, 0.1753540188, -0.1184645966, -0.3360359371, 0.1966994852, -0.0673624948, 0.0733794719, 0.2750072181, -0.0001245085, 0.330424726, 0.6380139589, -0.1410855949, -0.541077733, -0.0631842911, -0.0811771899, -0.23492603, 0.1993421018, -0.2498531044, -0.2083238661, -0.2352616787, 0.1023961753, -0.0581365153, 0.3563390672, 0.281555444, 0.0985949486, 0.1995158046, 0.1826249659, -0.1368425936, 0.5043625236, 0.0432152264, 0.056195356, 0.036174573, -0.2274199426, 0.2372247577, -0.20685637, 0.0459310859, -0.2663237751, -0.0578701682, 0.3306713104, -0.2204921991, 0.0874131992, 0.1752307564, -0.0942773074, -0.0104461908, 0.8057676554, 0.0052631879, 0.0640941858, -0.2012138367, 0.0806409195, -0.1908855587, 0.2383197993, 0.071561113, -0.4543534219, -0.1370184869, 0.1143342555, -0.1281685978, -0.3413941264, 0.3352711499, -0.0335041508, 0.4075173438, -0.023008436, 0.3289755285, 0.1422495097, 0.1264765114, 0.2072718292, -0.2324919105, -0.1268548518, 0.1452391446, -0.380857259, 0.174837932, 0.176376462, 0.2966892421, -0.0637694821, 0.1829952598, 0.0932282954, -0.1865080446, 0.0735040158, 0.1276495606, 0.3398444057, 0.1209283322, 0.1319722831, 0.0127152279, 0.0047447276, -0.0747596323, 0.0249652416, 0.032071799, -0.0236139931, -0.3605451882, -0.2406126261, 0.2245738804, 0.2357541323, -0.0485623963, 0.0452680066, -0.2116844356, -0.3131861985, -0.208233431, 0.1694274843, 0.4560172558, 0.0537248775, 0.4907973707, 0.313880533, 0.1613336504, -0.1267469376, -0.5722317696, -0.1803703755, 0.3171550035, -0.1612585485, -0.1637432575, 0.3268586397, 0.0613694154, 0.286522001, -0.2762348354, 0.1872422099, 0.1734667271, -0.016800344, -0.1587234288, -0.2288749218, 0.1743652225, 0.1935789436, 0.2789788842, 0.2141344696, -0.2745321691, 0.0189147592, 0.2086557895, -0.2223850042, -0.1689472646, 0.2648111284, 0.0425681472, 0.1071547866, -0.1384299994, -0.5075429678, 0.1115979776, -0.1357538104, -0.2659596801, -0.2610870302, -0.201934427, -0.0996058732, -0.2297557294, 0.3767794967, 0.529470861, -0.098968327, -0.0291800797, -0.0063149966, 0.1354220361, 0.0829520971, 0.0357793793, -0.3114126325, 0.4921750724, -0.1760827601, -0.1047419533, 0.8686540723, -0.5204972029, -0.0506761596, 0.3639993668, 0.1172986627, -0.0718868524, 0.3070545495, 0.0618703477, 0.1170745939, -0.0958946794, 0.0317524448, 0.4021976888, -0.046544306, 0.0234556496, -0.1533480734, 0.0390012413, 0.2969610691, 0.3607649207, 0.0934300125, 0.2212416679, -0.2734819651, 0.4947687685, 0.2071567923, 0.0037384867, 0.0605676472, 0.5123980641, -0.390142858, -0.0827333555, 0.0390273444, 0.1130773425, 0.0266656913, -0.0488631651, -0.1335099041, 0.1562320739, 0.1626266688, 0.1614465415, -0.4275048673, 0.0230149254, -0.0830780715, 0.0427632816, 0.0567393824, 0.2840377688, -0.1937215477, 0.2580313981, 0.0285487026, 0.3317640126, 0.017510511, -0.0234071594, -0.3775368333, 0.2045924366, -0.1200194955, -0.2554772496, 0.2829675674, -0.0228371918, 0.4561698735, 0.042088069, -0.1734324098, 0.1393239796, 0.1799443811, -0.0209081769, 0.0413393937, -0.2081558555, 0.0283869375, -0.134917289, -0.0474721715, 0.574793756, 0.2473167777, -0.1931291968, 0.0073984708, -0.0563833863, -0.0950335562, 0.2234851569, -0.0520737171, 0.1890360564, 0.0732779354, 0.2233696133, -0.0849318728, 0.2273711562, 0.2046999633, 0.1990076751, 0.2141202241, -0.0926080868, -0.0686817393, -0.2286663949, 0.2874104977, 0.2148695737, 0.0324275829, -0.0144207673, -0.2963916659, 0.002504237, 0.2251097411, -0.0638520122, 0.2678776383, 0.1726975441, -0.1246884763, -0.0075489143, 0.00181593, -0.1072779521, 0.4460032582, 0.0564809367, 0.261120379, -0.0166313387, -0.108431384, -0.0197837651, -0.24262546, -0.2545629442, 0.0278430432, 0.2242685556, -0.424731195, 0.0356796831, -0.2087246776, -0.6600084901, -0.2359618247, -0.0494453087, -0.1605995297, -0.5055605769, -0.1612768173, 0.3273542523, 0.0146421865, 0.1275830567, -0.1205851361, 0.230570212, 0.3319920897, -0.233930856, -0.4185199738, -0.1734264493, -0.2996532321, -0.0336429365, 0.1122228652, 0.1323725134, 0.1385988444, 0.1139134169, -0.0306634754, -0.066098012, -0.0057061538, 0.2152481377, -0.1090574265, 0.1235097572, 0.2650186718, 0.3777042627, -0.2389565706, -0.0974709392, 0.3813405931, 0.0026629642, 0.1714812219, 0.3198915422, 0.0355915427, -0.0754798055, -0.1061445326, -0.2500556111, 0.0514180809, -0.6115214825, -0.1775636971, 0.2373055965, 0.0000521066, 0.1542860419, 0.2415066361, 0.1805425137, 0.1287686825, 0.3176607788, 0.0169244148, -0.2387425154, 0.3329904377, -0.1693132967, -0.3372406065, -0.1376383603, 0.1169654578, 0.2338877916, 0.2198899835, -0.4601657689, -0.3833649158, 0.296104461, -0.0347962677, 0.0065299151, 0.1694482416, 0.3062465191, 0.0171285495, 0.0924846232, -0.2547695637, -0.1989658475, 0.0468885377, -0.222273916, 0.2826963663, 0.2882092893, 0.3215004504, -0.0384760611, 0.9122629762, 0.2374220043, 0.1430851072, 0.530951798, 0.1021702737, 0.2991390228, -0.0367713459, -0.2422949821, 0.2306569368, 0.1812364757, 0.1366697997, 0.2091353536, -0.2492396384, -0.2554642856, -0.4086244404, -0.2131765038, -0.2362274975, -0.3552213907, 0.1634071618, -0.3094643652, 0.2537307143, -0.1385109425, 0.2027334422, -0.3603169918, -0.0995285511, 0.1494172364, 0.144006446, 0.1602015644, 0.1130500138, -0.0752254799, -0.0607115105, -0.3460039198, 0.3344674706, -0.1206774265, 0.3733887672, -0.0566634089, 0.0655356199, 0.0389599763, -0.0580293201, 0.7135969996, -0.3010059893, -0.003640207, 0.2482841909, 0.220738098, -0.6750037074, 0.1139070019, -0.1122867912, 0.2548103929, 0.0049680248, -0.3782781065, -0.4797843397, -0.1921130568, 0.1742550284, -0.072328344, -0.1652674377, -0.0882528499, -0.2201903164, -0.3247163296, -0.3097018003, -0.1059834957, -0.044404991, 0.4491242468, 0.230139181, 0.2729759812, -0.1422614455, 0.0037104636, -0.0231205449, -0.127225548, 0.144897908, -0.0203225054, -0.2366640419, -0.1947487295, 0.5161569715, -0.5861029625, 0.3650783896, 0.2983980179, -0.6307682991, -0.0487273782, -0.0185209103, 0.284116298, 0.2116641849, -0.3109893203, 0.0528069921, -0.0490273871, -0.1705607176, -0.0002039783, 0.2304157019, 0.4107174277, -0.3813049197, -0.0521863364, -0.562924087, 0.4374682605, -0.1350970417, -0.0104104429, 0.2742980719, -0.1294574142, -0.1884309649, 0.6053571105, -0.0318606235, 0.9742015004, 0.2021539956, 0.1885176301, 0.4231553674, -0.127776891, 0.6227620244, -0.1243734881, 0.3219043612, -0.3893948793, 0.0414472185, -0.0638145283, -0.1746104658, -0.0930561423, 0.1332765222, -0.2606723905, 0.277487725, 0.0704493821, -0.0549802966, 0.0889615566, 0.1255859882, 0.1116454154, -0.1067718118, -0.5512532592, 0.0577971078, -0.4502735436, 0.0162891205, -0.0729944333, -0.1618129909, 0.0773974955, -0.5212675333, -0.1029227525, 0.1655479223, -0.2402706742, 0.1557008326, -0.056535773, -0.2547736764, 0.1854230613, 0.3622986078, -0.0209174044, 0.0569430888, -0.1994662881, 0.3114801347, -0.5459028482, -0.0695610195, -0.1593799889, 0.3023843765, 0.2848667204, -0.0251291394, -0.1467426121, 0.3340931535, -0.1659710109, -0.6099499464, -0.0495171398, -0.0853257775, 0.4431836605, -0.0368483178, -0.2056545317, 0.0775685906, -0.152420342, 0.0355423093, 0.0395075381, 0.0244935919, -0.2060181499, 0.0688499659, -0.0528989509, 0.002528429, 0.1737151593, 0.477181375, 0.0580930933, 0.0253525078, 0.5821676254, 0.2740311325, -0.0257173106, -0.1586009562, -0.2322815359, -0.3409323394, -0.6085490584, 0.1990738809, 0.3044447005, 0.0621340871, 0.0874246433, 0.2038395703, -0.0779726356, 0.1705035418, 0.0560898781, -0.3049573898, 0.1134141833, 0.206019789, -0.2436185777, -0.0629764572, 0.4305719435, -0.0323963687, 0.3100136817, -0.1491774172, -0.1858067065, -0.1241254136, -0.1878902614, 0.1358191222, 0.1600105613, -0.2263962626, -0.11575827, 0.2592060566, 0.0706710964, -0.2440281212, -0.2439686805, -0.0603576973, -0.1667725742, 0.2002599686, 0.2243478596, 0.1214102432, -0.1290193498, -0.4042983651, -0.12375018, -0.1816294789, 0.0225899667, -0.1426827013, -0.2429106236, 0.0557441525, 0.1504143625, 0.3674410284, -0.5081474781, 0.1975684166, 0.076038748, -0.0926697999, 0.2132935524, 0.1916122735, 0.2624573112, -0.049692601, -0.4662697017, 0.1615185738, 0.2004983425, -0.0344548114, 0.5295457244, -0.1840266585, -0.1134773791, -0.1094245762, -0.080676496, 0.080778569, -0.1513765603, 0.0117967948, 0.0692101419, 0.0332742222, -0.1537943035, 0.0494466536, 0.3225930929, 0.2039948553, -0.0651856065, 0.0736155137, -0.0870872214, -0.3661147356, 0.2096334547, 0.1163531318, 0.3633619547, -0.1511386037, -0.1119755208, 0.1339499354, -0.0349586383, -0.0854377076, -0.0527978018, 0.2270282805, 0.0537387952, 0.2903498113, -0.1444785446, 0.0543751121, -0.0564409941, -0.3188201189, -0.0471044257, -0.1534539461, 0.2008991688, 0.4862774611, 0.1516948342, 0.1443454027, -0.1632329077, 0.1997063756, 0.0482337587, 0.1141902208, -0.2721174359, 0.1604952663, 0.0182799697, 0.0310195461, -0.6282173395, -0.0157810077, -0.4327566028, -0.1448916495, -0.0049460158, -0.1630238444, -0.0300582275, 0.2119426429, -0.1169983223, -0.3793837726, 0.2154734731, 0.1218476668, -0.0333379768, -0.1512891948, 0.2037802339, 0.0854866356, 0.1178437024, 0.1998905241, 0.270609349, 0.3540652692, 0.4170275033, -0.2698947489, -0.1693299115, 0.2886005938, 0.0005998537, -0.2072156221, -0.0614672974, 0.0971706957, 0.3210935593, 0.3959821463, 0.0738286451, 0.014399346, -0.0085142422, 0.1275811046, -0.0613212883, -0.2382629663, 0.4723810554, -0.0463524535, -0.0918836147, -0.3303663135, 0.0329026021, -0.5663154125, 0.3297740519, 0.0595323108, 0.3573004603, -0.0106477253, -0.2045570612, -0.0199388098, -0.065626964, 0.3586009443, 0.3856934309, 0.3740835786, -0.3091626763, -0.4248058796, -0.4309856594, 0.1581876874, 0.1639747918, -0.2411169708, 0.1070591435, 0.1998968422, 0.2831847668, 0.2404052913, -0.1074830145, -0.2510271668, -0.0557260141, 0.1786379069, -0.2189364731, -0.2895008326, 0.2064391971, 0.0696627125, -0.1936566532, -0.2178903073, -0.1419938952, 0.0083855279, 0.0918040276, -0.1656746119, -0.3625211418, 0.1477171183, 0.0822411776, -0.0218157619, -0.0256655794, 0.4474616647, 0.0580899045, -0.0019748732, -0.1832552254, -0.0743171275, -0.1690217704, -0.2816383243, -0.1547075212, 0.5438705683, -0.2213324904, 0.2525568604, -0.3257878423, 0.2445081472, -0.1334823966, 0.3438495696, -0.1466024816, 0.0648295656, -0.4684083462, 0.3983725607, -0.1344812214, -0.0675856322, -0.0255528577, 0.1462190449, -0.4820400476, -0.2730075121, 0.5664800406, -0.5063452125, -0.2313737124, 0.006317921, 0.2157870829, -0.4116667509, 0.335426122, -0.3584128022, -0.0386062562, 0.2855786681, -0.0673244745, -0.1444849074, 0.1655160785, -0.0476101153, 0.1122499853, -0.0831057876, -0.5315563679, 0.0437985137, -0.1335092932, -0.1396398991, -0.2604458332 ]
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.094654642, 0.3181287348, 0.0874954239, 0.3629243076, 0.2740802765, -0.098954007, 0.2871833146, 0.2369657904, -0.0286743082, 0.0688425973, 0.2388482839, 0.3297021985, -0.0908720642, -0.3363241851, 0.1751252413, -0.5368741751, -0.2141876817, 0.1947949529, -0.2329529524, -0.1850880086, -0.1442272067, 0.3994991183, -0.3325726986, -0.0724648088, -0.1412278563, 0.1027452275, -0.0761773661, 0.1753540188, -0.1184645966, -0.3360359371, 0.1966994852, -0.0673624948, 0.0733794719, 0.2750072181, -0.0001245085, 0.330424726, 0.6380139589, -0.1410855949, -0.541077733, -0.0631842911, -0.0811771899, -0.23492603, 0.1993421018, -0.2498531044, -0.2083238661, -0.2352616787, 0.1023961753, -0.0581365153, 0.3563390672, 0.281555444, 0.0985949486, 0.1995158046, 0.1826249659, -0.1368425936, 0.5043625236, 0.0432152264, 0.056195356, 0.036174573, -0.2274199426, 0.2372247577, -0.20685637, 0.0459310859, -0.2663237751, -0.0578701682, 0.3306713104, -0.2204921991, 0.0874131992, 0.1752307564, -0.0942773074, -0.0104461908, 0.8057676554, 0.0052631879, 0.0640941858, -0.2012138367, 0.0806409195, -0.1908855587, 0.2383197993, 0.071561113, -0.4543534219, -0.1370184869, 0.1143342555, -0.1281685978, -0.3413941264, 0.3352711499, -0.0335041508, 0.4075173438, -0.023008436, 0.3289755285, 0.1422495097, 0.1264765114, 0.2072718292, -0.2324919105, -0.1268548518, 0.1452391446, -0.380857259, 0.174837932, 0.176376462, 0.2966892421, -0.0637694821, 0.1829952598, 0.0932282954, -0.1865080446, 0.0735040158, 0.1276495606, 0.3398444057, 0.1209283322, 0.1319722831, 0.0127152279, 0.0047447276, -0.0747596323, 0.0249652416, 0.032071799, -0.0236139931, -0.3605451882, -0.2406126261, 0.2245738804, 0.2357541323, -0.0485623963, 0.0452680066, -0.2116844356, -0.3131861985, -0.208233431, 0.1694274843, 0.4560172558, 0.0537248775, 0.4907973707, 0.313880533, 0.1613336504, -0.1267469376, -0.5722317696, -0.1803703755, 0.3171550035, -0.1612585485, -0.1637432575, 0.3268586397, 0.0613694154, 0.286522001, -0.2762348354, 0.1872422099, 0.1734667271, -0.016800344, -0.1587234288, -0.2288749218, 0.1743652225, 0.1935789436, 0.2789788842, 0.2141344696, -0.2745321691, 0.0189147592, 0.2086557895, -0.2223850042, -0.1689472646, 0.2648111284, 0.0425681472, 0.1071547866, -0.1384299994, -0.5075429678, 0.1115979776, -0.1357538104, -0.2659596801, -0.2610870302, -0.201934427, -0.0996058732, -0.2297557294, 0.3767794967, 0.529470861, -0.098968327, -0.0291800797, -0.0063149966, 0.1354220361, 0.0829520971, 0.0357793793, -0.3114126325, 0.4921750724, -0.1760827601, -0.1047419533, 0.8686540723, -0.5204972029, -0.0506761596, 0.3639993668, 0.1172986627, -0.0718868524, 0.3070545495, 0.0618703477, 0.1170745939, -0.0958946794, 0.0317524448, 0.4021976888, -0.046544306, 0.0234556496, -0.1533480734, 0.0390012413, 0.2969610691, 0.3607649207, 0.0934300125, 0.2212416679, -0.2734819651, 0.4947687685, 0.2071567923, 0.0037384867, 0.0605676472, 0.5123980641, -0.390142858, -0.0827333555, 0.0390273444, 0.1130773425, 0.0266656913, -0.0488631651, -0.1335099041, 0.1562320739, 0.1626266688, 0.1614465415, -0.4275048673, 0.0230149254, -0.0830780715, 0.0427632816, 0.0567393824, 0.2840377688, -0.1937215477, 0.2580313981, 0.0285487026, 0.3317640126, 0.017510511, -0.0234071594, -0.3775368333, 0.2045924366, -0.1200194955, -0.2554772496, 0.2829675674, -0.0228371918, 0.4561698735, 0.042088069, -0.1734324098, 0.1393239796, 0.1799443811, -0.0209081769, 0.0413393937, -0.2081558555, 0.0283869375, -0.134917289, -0.0474721715, 0.574793756, 0.2473167777, -0.1931291968, 0.0073984708, -0.0563833863, -0.0950335562, 0.2234851569, -0.0520737171, 0.1890360564, 0.0732779354, 0.2233696133, -0.0849318728, 0.2273711562, 0.2046999633, 0.1990076751, 0.2141202241, -0.0926080868, -0.0686817393, -0.2286663949, 0.2874104977, 0.2148695737, 0.0324275829, -0.0144207673, -0.2963916659, 0.002504237, 0.2251097411, -0.0638520122, 0.2678776383, 0.1726975441, -0.1246884763, -0.0075489143, 0.00181593, -0.1072779521, 0.4460032582, 0.0564809367, 0.261120379, -0.0166313387, -0.108431384, -0.0197837651, -0.24262546, -0.2545629442, 0.0278430432, 0.2242685556, -0.424731195, 0.0356796831, -0.2087246776, -0.6600084901, -0.2359618247, -0.0494453087, -0.1605995297, -0.5055605769, -0.1612768173, 0.3273542523, 0.0146421865, 0.1275830567, -0.1205851361, 0.230570212, 0.3319920897, -0.233930856, -0.4185199738, -0.1734264493, -0.2996532321, -0.0336429365, 0.1122228652, 0.1323725134, 0.1385988444, 0.1139134169, -0.0306634754, -0.066098012, -0.0057061538, 0.2152481377, -0.1090574265, 0.1235097572, 0.2650186718, 0.3777042627, -0.2389565706, -0.0974709392, 0.3813405931, 0.0026629642, 0.1714812219, 0.3198915422, 0.0355915427, -0.0754798055, -0.1061445326, -0.2500556111, 0.0514180809, -0.6115214825, -0.1775636971, 0.2373055965, 0.0000521066, 0.1542860419, 0.2415066361, 0.1805425137, 0.1287686825, 0.3176607788, 0.0169244148, -0.2387425154, 0.3329904377, -0.1693132967, -0.3372406065, -0.1376383603, 0.1169654578, 0.2338877916, 0.2198899835, -0.4601657689, -0.3833649158, 0.296104461, -0.0347962677, 0.0065299151, 0.1694482416, 0.3062465191, 0.0171285495, 0.0924846232, -0.2547695637, -0.1989658475, 0.0468885377, -0.222273916, 0.2826963663, 0.2882092893, 0.3215004504, -0.0384760611, 0.9122629762, 0.2374220043, 0.1430851072, 0.530951798, 0.1021702737, 0.2991390228, -0.0367713459, -0.2422949821, 0.2306569368, 0.1812364757, 0.1366697997, 0.2091353536, -0.2492396384, -0.2554642856, -0.4086244404, -0.2131765038, -0.2362274975, -0.3552213907, 0.1634071618, -0.3094643652, 0.2537307143, -0.1385109425, 0.2027334422, -0.3603169918, -0.0995285511, 0.1494172364, 0.144006446, 0.1602015644, 0.1130500138, -0.0752254799, -0.0607115105, -0.3460039198, 0.3344674706, -0.1206774265, 0.3733887672, -0.0566634089, 0.0655356199, 0.0389599763, -0.0580293201, 0.7135969996, -0.3010059893, -0.003640207, 0.2482841909, 0.220738098, -0.6750037074, 0.1139070019, -0.1122867912, 0.2548103929, 0.0049680248, -0.3782781065, -0.4797843397, -0.1921130568, 0.1742550284, -0.072328344, -0.1652674377, -0.0882528499, -0.2201903164, -0.3247163296, -0.3097018003, -0.1059834957, -0.044404991, 0.4491242468, 0.230139181, 0.2729759812, -0.1422614455, 0.0037104636, -0.0231205449, -0.127225548, 0.144897908, -0.0203225054, -0.2366640419, -0.1947487295, 0.5161569715, -0.5861029625, 0.3650783896, 0.2983980179, -0.6307682991, -0.0487273782, -0.0185209103, 0.284116298, 0.2116641849, -0.3109893203, 0.0528069921, -0.0490273871, -0.1705607176, -0.0002039783, 0.2304157019, 0.4107174277, -0.3813049197, -0.0521863364, -0.562924087, 0.4374682605, -0.1350970417, -0.0104104429, 0.2742980719, -0.1294574142, -0.1884309649, 0.6053571105, -0.0318606235, 0.9742015004, 0.2021539956, 0.1885176301, 0.4231553674, -0.127776891, 0.6227620244, -0.1243734881, 0.3219043612, -0.3893948793, 0.0414472185, -0.0638145283, -0.1746104658, -0.0930561423, 0.1332765222, -0.2606723905, 0.277487725, 0.0704493821, -0.0549802966, 0.0889615566, 0.1255859882, 0.1116454154, -0.1067718118, -0.5512532592, 0.0577971078, -0.4502735436, 0.0162891205, -0.0729944333, -0.1618129909, 0.0773974955, -0.5212675333, -0.1029227525, 0.1655479223, -0.2402706742, 0.1557008326, -0.056535773, -0.2547736764, 0.1854230613, 0.3622986078, -0.0209174044, 0.0569430888, -0.1994662881, 0.3114801347, -0.5459028482, -0.0695610195, -0.1593799889, 0.3023843765, 0.2848667204, -0.0251291394, -0.1467426121, 0.3340931535, -0.1659710109, -0.6099499464, -0.0495171398, -0.0853257775, 0.4431836605, -0.0368483178, -0.2056545317, 0.0775685906, -0.152420342, 0.0355423093, 0.0395075381, 0.0244935919, -0.2060181499, 0.0688499659, -0.0528989509, 0.002528429, 0.1737151593, 0.477181375, 0.0580930933, 0.0253525078, 0.5821676254, 0.2740311325, -0.0257173106, -0.1586009562, -0.2322815359, -0.3409323394, -0.6085490584, 0.1990738809, 0.3044447005, 0.0621340871, 0.0874246433, 0.2038395703, -0.0779726356, 0.1705035418, 0.0560898781, -0.3049573898, 0.1134141833, 0.206019789, -0.2436185777, -0.0629764572, 0.4305719435, -0.0323963687, 0.3100136817, -0.1491774172, -0.1858067065, -0.1241254136, -0.1878902614, 0.1358191222, 0.1600105613, -0.2263962626, -0.11575827, 0.2592060566, 0.0706710964, -0.2440281212, -0.2439686805, -0.0603576973, -0.1667725742, 0.2002599686, 0.2243478596, 0.1214102432, -0.1290193498, -0.4042983651, -0.12375018, -0.1816294789, 0.0225899667, -0.1426827013, -0.2429106236, 0.0557441525, 0.1504143625, 0.3674410284, -0.5081474781, 0.1975684166, 0.076038748, -0.0926697999, 0.2132935524, 0.1916122735, 0.2624573112, -0.049692601, -0.4662697017, 0.1615185738, 0.2004983425, -0.0344548114, 0.5295457244, -0.1840266585, -0.1134773791, -0.1094245762, -0.080676496, 0.080778569, -0.1513765603, 0.0117967948, 0.0692101419, 0.0332742222, -0.1537943035, 0.0494466536, 0.3225930929, 0.2039948553, -0.0651856065, 0.0736155137, -0.0870872214, -0.3661147356, 0.2096334547, 0.1163531318, 0.3633619547, -0.1511386037, -0.1119755208, 0.1339499354, -0.0349586383, -0.0854377076, -0.0527978018, 0.2270282805, 0.0537387952, 0.2903498113, -0.1444785446, 0.0543751121, -0.0564409941, -0.3188201189, -0.0471044257, -0.1534539461, 0.2008991688, 0.4862774611, 0.1516948342, 0.1443454027, -0.1632329077, 0.1997063756, 0.0482337587, 0.1141902208, -0.2721174359, 0.1604952663, 0.0182799697, 0.0310195461, -0.6282173395, -0.0157810077, -0.4327566028, -0.1448916495, -0.0049460158, -0.1630238444, -0.0300582275, 0.2119426429, -0.1169983223, -0.3793837726, 0.2154734731, 0.1218476668, -0.0333379768, -0.1512891948, 0.2037802339, 0.0854866356, 0.1178437024, 0.1998905241, 0.270609349, 0.3540652692, 0.4170275033, -0.2698947489, -0.1693299115, 0.2886005938, 0.0005998537, -0.2072156221, -0.0614672974, 0.0971706957, 0.3210935593, 0.3959821463, 0.0738286451, 0.014399346, -0.0085142422, 0.1275811046, -0.0613212883, -0.2382629663, 0.4723810554, -0.0463524535, -0.0918836147, -0.3303663135, 0.0329026021, -0.5663154125, 0.3297740519, 0.0595323108, 0.3573004603, -0.0106477253, -0.2045570612, -0.0199388098, -0.065626964, 0.3586009443, 0.3856934309, 0.3740835786, -0.3091626763, -0.4248058796, -0.4309856594, 0.1581876874, 0.1639747918, -0.2411169708, 0.1070591435, 0.1998968422, 0.2831847668, 0.2404052913, -0.1074830145, -0.2510271668, -0.0557260141, 0.1786379069, -0.2189364731, -0.2895008326, 0.2064391971, 0.0696627125, -0.1936566532, -0.2178903073, -0.1419938952, 0.0083855279, 0.0918040276, -0.1656746119, -0.3625211418, 0.1477171183, 0.0822411776, -0.0218157619, -0.0256655794, 0.4474616647, 0.0580899045, -0.0019748732, -0.1832552254, -0.0743171275, -0.1690217704, -0.2816383243, -0.1547075212, 0.5438705683, -0.2213324904, 0.2525568604, -0.3257878423, 0.2445081472, -0.1334823966, 0.3438495696, -0.1466024816, 0.0648295656, -0.4684083462, 0.3983725607, -0.1344812214, -0.0675856322, -0.0255528577, 0.1462190449, -0.4820400476, -0.2730075121, 0.5664800406, -0.5063452125, -0.2313737124, 0.006317921, 0.2157870829, -0.4116667509, 0.335426122, -0.3584128022, -0.0386062562, 0.2855786681, -0.0673244745, -0.1444849074, 0.1655160785, -0.0476101153, 0.1122499853, -0.0831057876, -0.5315563679, 0.0437985137, -0.1335092932, -0.1396398991, -0.2604458332 ]
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.094654642, 0.3181287348, 0.0874954239, 0.3629243076, 0.2740802765, -0.098954007, 0.2871833146, 0.2369657904, -0.0286743082, 0.0688425973, 0.2388482839, 0.3297021985, -0.0908720642, -0.3363241851, 0.1751252413, -0.5368741751, -0.2141876817, 0.1947949529, -0.2329529524, -0.1850880086, -0.1442272067, 0.3994991183, -0.3325726986, -0.0724648088, -0.1412278563, 0.1027452275, -0.0761773661, 0.1753540188, -0.1184645966, -0.3360359371, 0.1966994852, -0.0673624948, 0.0733794719, 0.2750072181, -0.0001245085, 0.330424726, 0.6380139589, -0.1410855949, -0.541077733, -0.0631842911, -0.0811771899, -0.23492603, 0.1993421018, -0.2498531044, -0.2083238661, -0.2352616787, 0.1023961753, -0.0581365153, 0.3563390672, 0.281555444, 0.0985949486, 0.1995158046, 0.1826249659, -0.1368425936, 0.5043625236, 0.0432152264, 0.056195356, 0.036174573, -0.2274199426, 0.2372247577, -0.20685637, 0.0459310859, -0.2663237751, -0.0578701682, 0.3306713104, -0.2204921991, 0.0874131992, 0.1752307564, -0.0942773074, -0.0104461908, 0.8057676554, 0.0052631879, 0.0640941858, -0.2012138367, 0.0806409195, -0.1908855587, 0.2383197993, 0.071561113, -0.4543534219, -0.1370184869, 0.1143342555, -0.1281685978, -0.3413941264, 0.3352711499, -0.0335041508, 0.4075173438, -0.023008436, 0.3289755285, 0.1422495097, 0.1264765114, 0.2072718292, -0.2324919105, -0.1268548518, 0.1452391446, -0.380857259, 0.174837932, 0.176376462, 0.2966892421, -0.0637694821, 0.1829952598, 0.0932282954, -0.1865080446, 0.0735040158, 0.1276495606, 0.3398444057, 0.1209283322, 0.1319722831, 0.0127152279, 0.0047447276, -0.0747596323, 0.0249652416, 0.032071799, -0.0236139931, -0.3605451882, -0.2406126261, 0.2245738804, 0.2357541323, -0.0485623963, 0.0452680066, -0.2116844356, -0.3131861985, -0.208233431, 0.1694274843, 0.4560172558, 0.0537248775, 0.4907973707, 0.313880533, 0.1613336504, -0.1267469376, -0.5722317696, -0.1803703755, 0.3171550035, -0.1612585485, -0.1637432575, 0.3268586397, 0.0613694154, 0.286522001, -0.2762348354, 0.1872422099, 0.1734667271, -0.016800344, -0.1587234288, -0.2288749218, 0.1743652225, 0.1935789436, 0.2789788842, 0.2141344696, -0.2745321691, 0.0189147592, 0.2086557895, -0.2223850042, -0.1689472646, 0.2648111284, 0.0425681472, 0.1071547866, -0.1384299994, -0.5075429678, 0.1115979776, -0.1357538104, -0.2659596801, -0.2610870302, -0.201934427, -0.0996058732, -0.2297557294, 0.3767794967, 0.529470861, -0.098968327, -0.0291800797, -0.0063149966, 0.1354220361, 0.0829520971, 0.0357793793, -0.3114126325, 0.4921750724, -0.1760827601, -0.1047419533, 0.8686540723, -0.5204972029, -0.0506761596, 0.3639993668, 0.1172986627, -0.0718868524, 0.3070545495, 0.0618703477, 0.1170745939, -0.0958946794, 0.0317524448, 0.4021976888, -0.046544306, 0.0234556496, -0.1533480734, 0.0390012413, 0.2969610691, 0.3607649207, 0.0934300125, 0.2212416679, -0.2734819651, 0.4947687685, 0.2071567923, 0.0037384867, 0.0605676472, 0.5123980641, -0.390142858, -0.0827333555, 0.0390273444, 0.1130773425, 0.0266656913, -0.0488631651, -0.1335099041, 0.1562320739, 0.1626266688, 0.1614465415, -0.4275048673, 0.0230149254, -0.0830780715, 0.0427632816, 0.0567393824, 0.2840377688, -0.1937215477, 0.2580313981, 0.0285487026, 0.3317640126, 0.017510511, -0.0234071594, -0.3775368333, 0.2045924366, -0.1200194955, -0.2554772496, 0.2829675674, -0.0228371918, 0.4561698735, 0.042088069, -0.1734324098, 0.1393239796, 0.1799443811, -0.0209081769, 0.0413393937, -0.2081558555, 0.0283869375, -0.134917289, -0.0474721715, 0.574793756, 0.2473167777, -0.1931291968, 0.0073984708, -0.0563833863, -0.0950335562, 0.2234851569, -0.0520737171, 0.1890360564, 0.0732779354, 0.2233696133, -0.0849318728, 0.2273711562, 0.2046999633, 0.1990076751, 0.2141202241, -0.0926080868, -0.0686817393, -0.2286663949, 0.2874104977, 0.2148695737, 0.0324275829, -0.0144207673, -0.2963916659, 0.002504237, 0.2251097411, -0.0638520122, 0.2678776383, 0.1726975441, -0.1246884763, -0.0075489143, 0.00181593, -0.1072779521, 0.4460032582, 0.0564809367, 0.261120379, -0.0166313387, -0.108431384, -0.0197837651, -0.24262546, -0.2545629442, 0.0278430432, 0.2242685556, -0.424731195, 0.0356796831, -0.2087246776, -0.6600084901, -0.2359618247, -0.0494453087, -0.1605995297, -0.5055605769, -0.1612768173, 0.3273542523, 0.0146421865, 0.1275830567, -0.1205851361, 0.230570212, 0.3319920897, -0.233930856, -0.4185199738, -0.1734264493, -0.2996532321, -0.0336429365, 0.1122228652, 0.1323725134, 0.1385988444, 0.1139134169, -0.0306634754, -0.066098012, -0.0057061538, 0.2152481377, -0.1090574265, 0.1235097572, 0.2650186718, 0.3777042627, -0.2389565706, -0.0974709392, 0.3813405931, 0.0026629642, 0.1714812219, 0.3198915422, 0.0355915427, -0.0754798055, -0.1061445326, -0.2500556111, 0.0514180809, -0.6115214825, -0.1775636971, 0.2373055965, 0.0000521066, 0.1542860419, 0.2415066361, 0.1805425137, 0.1287686825, 0.3176607788, 0.0169244148, -0.2387425154, 0.3329904377, -0.1693132967, -0.3372406065, -0.1376383603, 0.1169654578, 0.2338877916, 0.2198899835, -0.4601657689, -0.3833649158, 0.296104461, -0.0347962677, 0.0065299151, 0.1694482416, 0.3062465191, 0.0171285495, 0.0924846232, -0.2547695637, -0.1989658475, 0.0468885377, -0.222273916, 0.2826963663, 0.2882092893, 0.3215004504, -0.0384760611, 0.9122629762, 0.2374220043, 0.1430851072, 0.530951798, 0.1021702737, 0.2991390228, -0.0367713459, -0.2422949821, 0.2306569368, 0.1812364757, 0.1366697997, 0.2091353536, -0.2492396384, -0.2554642856, -0.4086244404, -0.2131765038, -0.2362274975, -0.3552213907, 0.1634071618, -0.3094643652, 0.2537307143, -0.1385109425, 0.2027334422, -0.3603169918, -0.0995285511, 0.1494172364, 0.144006446, 0.1602015644, 0.1130500138, -0.0752254799, -0.0607115105, -0.3460039198, 0.3344674706, -0.1206774265, 0.3733887672, -0.0566634089, 0.0655356199, 0.0389599763, -0.0580293201, 0.7135969996, -0.3010059893, -0.003640207, 0.2482841909, 0.220738098, -0.6750037074, 0.1139070019, -0.1122867912, 0.2548103929, 0.0049680248, -0.3782781065, -0.4797843397, -0.1921130568, 0.1742550284, -0.072328344, -0.1652674377, -0.0882528499, -0.2201903164, -0.3247163296, -0.3097018003, -0.1059834957, -0.044404991, 0.4491242468, 0.230139181, 0.2729759812, -0.1422614455, 0.0037104636, -0.0231205449, -0.127225548, 0.144897908, -0.0203225054, -0.2366640419, -0.1947487295, 0.5161569715, -0.5861029625, 0.3650783896, 0.2983980179, -0.6307682991, -0.0487273782, -0.0185209103, 0.284116298, 0.2116641849, -0.3109893203, 0.0528069921, -0.0490273871, -0.1705607176, -0.0002039783, 0.2304157019, 0.4107174277, -0.3813049197, -0.0521863364, -0.562924087, 0.4374682605, -0.1350970417, -0.0104104429, 0.2742980719, -0.1294574142, -0.1884309649, 0.6053571105, -0.0318606235, 0.9742015004, 0.2021539956, 0.1885176301, 0.4231553674, -0.127776891, 0.6227620244, -0.1243734881, 0.3219043612, -0.3893948793, 0.0414472185, -0.0638145283, -0.1746104658, -0.0930561423, 0.1332765222, -0.2606723905, 0.277487725, 0.0704493821, -0.0549802966, 0.0889615566, 0.1255859882, 0.1116454154, -0.1067718118, -0.5512532592, 0.0577971078, -0.4502735436, 0.0162891205, -0.0729944333, -0.1618129909, 0.0773974955, -0.5212675333, -0.1029227525, 0.1655479223, -0.2402706742, 0.1557008326, -0.056535773, -0.2547736764, 0.1854230613, 0.3622986078, -0.0209174044, 0.0569430888, -0.1994662881, 0.3114801347, -0.5459028482, -0.0695610195, -0.1593799889, 0.3023843765, 0.2848667204, -0.0251291394, -0.1467426121, 0.3340931535, -0.1659710109, -0.6099499464, -0.0495171398, -0.0853257775, 0.4431836605, -0.0368483178, -0.2056545317, 0.0775685906, -0.152420342, 0.0355423093, 0.0395075381, 0.0244935919, -0.2060181499, 0.0688499659, -0.0528989509, 0.002528429, 0.1737151593, 0.477181375, 0.0580930933, 0.0253525078, 0.5821676254, 0.2740311325, -0.0257173106, -0.1586009562, -0.2322815359, -0.3409323394, -0.6085490584, 0.1990738809, 0.3044447005, 0.0621340871, 0.0874246433, 0.2038395703, -0.0779726356, 0.1705035418, 0.0560898781, -0.3049573898, 0.1134141833, 0.206019789, -0.2436185777, -0.0629764572, 0.4305719435, -0.0323963687, 0.3100136817, -0.1491774172, -0.1858067065, -0.1241254136, -0.1878902614, 0.1358191222, 0.1600105613, -0.2263962626, -0.11575827, 0.2592060566, 0.0706710964, -0.2440281212, -0.2439686805, -0.0603576973, -0.1667725742, 0.2002599686, 0.2243478596, 0.1214102432, -0.1290193498, -0.4042983651, -0.12375018, -0.1816294789, 0.0225899667, -0.1426827013, -0.2429106236, 0.0557441525, 0.1504143625, 0.3674410284, -0.5081474781, 0.1975684166, 0.076038748, -0.0926697999, 0.2132935524, 0.1916122735, 0.2624573112, -0.049692601, -0.4662697017, 0.1615185738, 0.2004983425, -0.0344548114, 0.5295457244, -0.1840266585, -0.1134773791, -0.1094245762, -0.080676496, 0.080778569, -0.1513765603, 0.0117967948, 0.0692101419, 0.0332742222, -0.1537943035, 0.0494466536, 0.3225930929, 0.2039948553, -0.0651856065, 0.0736155137, -0.0870872214, -0.3661147356, 0.2096334547, 0.1163531318, 0.3633619547, -0.1511386037, -0.1119755208, 0.1339499354, -0.0349586383, -0.0854377076, -0.0527978018, 0.2270282805, 0.0537387952, 0.2903498113, -0.1444785446, 0.0543751121, -0.0564409941, -0.3188201189, -0.0471044257, -0.1534539461, 0.2008991688, 0.4862774611, 0.1516948342, 0.1443454027, -0.1632329077, 0.1997063756, 0.0482337587, 0.1141902208, -0.2721174359, 0.1604952663, 0.0182799697, 0.0310195461, -0.6282173395, -0.0157810077, -0.4327566028, -0.1448916495, -0.0049460158, -0.1630238444, -0.0300582275, 0.2119426429, -0.1169983223, -0.3793837726, 0.2154734731, 0.1218476668, -0.0333379768, -0.1512891948, 0.2037802339, 0.0854866356, 0.1178437024, 0.1998905241, 0.270609349, 0.3540652692, 0.4170275033, -0.2698947489, -0.1693299115, 0.2886005938, 0.0005998537, -0.2072156221, -0.0614672974, 0.0971706957, 0.3210935593, 0.3959821463, 0.0738286451, 0.014399346, -0.0085142422, 0.1275811046, -0.0613212883, -0.2382629663, 0.4723810554, -0.0463524535, -0.0918836147, -0.3303663135, 0.0329026021, -0.5663154125, 0.3297740519, 0.0595323108, 0.3573004603, -0.0106477253, -0.2045570612, -0.0199388098, -0.065626964, 0.3586009443, 0.3856934309, 0.3740835786, -0.3091626763, -0.4248058796, -0.4309856594, 0.1581876874, 0.1639747918, -0.2411169708, 0.1070591435, 0.1998968422, 0.2831847668, 0.2404052913, -0.1074830145, -0.2510271668, -0.0557260141, 0.1786379069, -0.2189364731, -0.2895008326, 0.2064391971, 0.0696627125, -0.1936566532, -0.2178903073, -0.1419938952, 0.0083855279, 0.0918040276, -0.1656746119, -0.3625211418, 0.1477171183, 0.0822411776, -0.0218157619, -0.0256655794, 0.4474616647, 0.0580899045, -0.0019748732, -0.1832552254, -0.0743171275, -0.1690217704, -0.2816383243, -0.1547075212, 0.5438705683, -0.2213324904, 0.2525568604, -0.3257878423, 0.2445081472, -0.1334823966, 0.3438495696, -0.1466024816, 0.0648295656, -0.4684083462, 0.3983725607, -0.1344812214, -0.0675856322, -0.0255528577, 0.1462190449, -0.4820400476, -0.2730075121, 0.5664800406, -0.5063452125, -0.2313737124, 0.006317921, 0.2157870829, -0.4116667509, 0.335426122, -0.3584128022, -0.0386062562, 0.2855786681, -0.0673244745, -0.1444849074, 0.1655160785, -0.0476101153, 0.1122499853, -0.0831057876, -0.5315563679, 0.0437985137, -0.1335092932, -0.1396398991, -0.2604458332 ]
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.1425897181, -0.3862655759, 0.1019000635, 0.2882793248, -0.0408771858, -0.0037299097, 0.3607889712, 0.2866320908, -0.2326707393, -0.0361643657, 0.1111188829, 0.1749106795, -0.3020105064, -0.1347763538, -0.1869156957, -0.2722382545, 0.2231001258, 0.1648704112, -0.2249958962, -0.0755630285, -0.0981415883, 0.4294787645, -0.5823253989, 0.3994286656, -0.6540244222, 0.0634839833, -0.0976938009, -0.0882225037, 0.2179894149, -0.4048301578, 0.1664739847, -0.1379935443, 0.4408763945, 0.4950663447, -0.0001128557, 0.0662930161, 0.5166267157, 0.0034333989, -0.1831671149, -0.4616503716, -0.0958659351, -0.0216793381, 0.2401290685, -0.1488669515, 0.1099355221, -0.0095909685, 0.1123633236, 0.1161492467, 0.6158463359, 0.2604492903, 0.203668803, 0.5679876208, 0.1606733203, -0.1586023867, 0.0386507772, 0.0651199147, -0.1622349024, -0.2532222867, -0.0711853504, -0.1541247368, 0.0513456427, 0.3433676958, -0.154582873, -0.319506675, 0.1965100169, -0.0248658806, 0.377171874, -0.6403256059, 0.1768133193, 0.3447149992, -0.0220765471, 0.0297094211, -0.4338786006, -0.3709904552, -0.0477737971, 0.0846330002, 0.0715650469, -0.0575927645, -0.1082192063, -0.0320370309, -0.3570268154, 0.1110916063, -0.2577053308, -0.0387136042, -0.0056884065, 0.7290465832, -0.0043146964, 0.115419358, 0.0263559893, -0.3988367319, 0.1119358838, -0.0886760503, -0.1108076423, 0.2810793221, -0.4623847604, -0.4678981602, -0.1054499373, -0.014150802, -0.1258592755, 0.132976681, -0.047635071, -0.0400706083, 0.1146948934, 0.0505957976, 0.2708026171, 0.3776747584, 0.3136992455, 0.3700648546, 0.3415609598, -0.0040864944, 0.15954642, -0.0196935367, -0.4887848198, -0.0226209275, 0.094743371, 0.1682707518, 0.2845747769, -0.0403797626, 0.0695832074, -0.0889552534, -0.2725494802, 0.0308970138, 0.2877449393, 0.3125796914, 0.1607080698, 0.4081322849, -0.044281859, 0.3618611991, -0.1540919244, -0.4788369536, -0.0482453555, -0.0248206742, -0.130538404, 0.0259035192, 0.1832683831, 0.3635354936, 0.2959647775, -0.3133235574, 0.1574118435, 0.1929111481, 0.069685027, -0.2652229071, -0.1392060369, 0.2221942544, 0.0477908775, 0.1235280633, 0.273222357, -0.1546165496, -0.0269146785, 0.2888835073, -0.1526695639, -0.0730929449, 0.0382680297, 0.1280957162, -0.1564269662, -0.2049590051, -0.1068509221, 0.1424414963, 0.26015082, -0.0196883678, -0.1511563659, -0.268045783, -0.0712298304, -0.0273504592, 0.0152344704, 0.4272623956, 0.1217839867, -0.2629700899, -0.0074932426, 0.1439887881, -0.1053135693, 0.1660330594, -0.0594259463, 0.2397536635, -0.0067093149, 0.3142330647, 0.338730067, -0.2347957194, 0.0610828102, 0.1511662155, -0.0109123066, -0.2349627912, 0.0558947809, -0.1820523441, 0.1183113009, -0.2271659672, -0.07244654, -0.1401992738, 0.0083090328, 0.1611098349, -0.0977458134, -0.2160190046, -0.0398637466, 0.2065845877, 0.1662980169, 0.101994276, -0.3797035217, 0.531324029, -0.1683852524, -0.1907806396, 0.1780088842, -0.0916161835, 0.4059316814, -0.2418593615, 0.0768685266, -0.1072881669, -0.273147136, 0.2203316092, -0.4980220795, 0.1964559853, -0.0521726049, 0.2371753156, -0.1382564753, 0.080337584, -0.1817132235, -0.0770962536, 0.1701813042, -0.0776248723, 0.1599178761, 0.11368756, -0.2996760905, -0.086693354, 0.4864611924, 0.0755582824, -0.3800065815, 0.2390680015, -0.2562909126, -0.3221541345, -0.1728242785, 0.1800197959, 0.4133439362, 0.1605979055, -0.060363926, 0.2198886573, -0.2134711146, -0.0920356959, -0.1008519828, 0.3315399587, 0.2418494076, -0.3857055902, 0.1534546912, 0.4965137243, 0.1735299081, 0.1489475369, 0.1390585899, 0.4117438793, 0.0490885042, 0.1475322843, 0.0893392861, 0.1436105371, 0.0273175836, -0.1975846589, -0.1786639094, -0.0489499718, 0.0124957971, 0.0653680265, -0.0209298506, -0.3088858426, 0.0854300112, -0.1901088655, 0.4991104603, -0.022007335, 0.1619540155, 0.1475794315, -0.4284462333, 0.0409905538, -0.160048157, 0.227235049, 0.3109728396, 0.1093932241, -0.159306407, 0.1008152068, -0.0423444994, -0.0339869, 0.3302761316, 0.072115697, 0.2826168239, 0.1288803816, 0.1914831102, 0.1401964724, 0.1415281296, -0.2043960094, -0.0989473611, 0.2039453387, -0.3245393038, 0.1887786984, 0.0387541056, 0.0697257295, -0.1371349096, -0.2431547046, -0.2385836989, -0.3978782892, 0.0922369882, 0.0347955637, 0.0489942282, 0.2307595909, 0.0914830342, 0.2400472164, 0.220338136, 0.4928337038, -0.0906580091, -0.0119177438, -0.4879195988, -0.0100957677, 0.0699660033, -0.540047586, -0.060457021, 0.0447765887, -0.0678851306, 0.2947701216, -0.3794871569, 0.3721459508, -0.1519845724, 0.0831869245, 0.1768326163, -0.1078038439, -0.0183152556, -0.3880952895, 0.4292585552, -0.3619118333, -0.017132137, 0.3871998787, 0.0423269942, -0.1268572211, -0.2220815867, -0.0811971277, 0.0566208288, -0.1438731104, -0.0924248695, -0.1342322677, 0.1725473106, 0.4180761874, 0.02203371, 0.4735862315, -0.255769819, -0.1696811318, 0.1678781211, 0.1819526702, 0.5343099833, -0.0216975436, -0.3780199587, 0.1458334029, -0.2738336325, -0.025869308, -0.5093513727, -0.0553690866, -0.2531599402, -0.1245508417, -0.1565579474, 0.1502875984, 0.0557685569, 0.2515536249, 0.0170896836, 0.0073820949, 0.0466911346, -0.1840881109, 0.1286098212, 0.2061229497, 0.3723754585, -0.0267043188, 0.4878308177, 0.1048066318, 0.6293374896, 0.3555672467, -0.0857290775, 0.134152323, 0.0791089609, -0.2296399921, 0.0292940252, -0.2251006961, -0.3233567476, 0.0312589109, -0.0029998571, 0.1798378229, 0.0321980789, -0.2912759185, -0.1782678366, -0.111420624, -0.1802406758, -0.2081423253, -0.1353159696, -0.1797329187, 0.1601634324, -0.2067037821, 0.2087404579, -0.2168799192, 0.0219859555, -0.0253863856, -0.0939734131, 0.0660039932, -0.1992718875, -0.4379248023, -0.1425548494, -0.2592297792, 0.4074147642, -0.1205331609, 0.3221698701, -0.0108913556, -0.3574224412, -0.0811127648, -0.15807271, 0.6426003575, -0.1390681863, -0.1791147441, 0.0867582262, -0.2970713973, -0.4907179475, -0.1606563926, -0.3340059519, 0.0472244285, 0.4098537564, 0.3750629127, -0.2564999759, -0.0656049922, 0.0633755922, -0.5187549591, -0.1749587953, 0.0412302949, -0.2884531617, 0.0803989321, -0.154281348, -0.153500095, -0.0503884703, 0.1225497127, -0.144891724, 0.1505256593, 0.1205116063, -0.2101489604, 0.0912970155, 0.4907371402, 0.0812813342, 0.0005748756, 0.0183104202, 0.2177862227, -0.00350409, -0.1578535438, 0.048002243, 0.2946721315, -0.3666609526, 0.2672852278, 0.1955073178, 0.290158242, 0.1951659024, -0.015765816, 0.0167652965, 0.0211580843, 0.2260185927, 0.1106336713, -0.3405202627, 0.3545120955, -0.012284942, -0.1532620192, 0.0581079498, 0.1402443647, -0.32385391, 0.1420628875, -0.4734608233, 0.1098431051, -0.1724622399, 0.6164476871, 0.0426820628, 0.9207698107, 0.1358619183, 0.0129353544, 0.0848220289, -0.0169215947, 0.5575107336, 0.1966557801, 0.1872053444, -0.4816449881, 0.2159906328, 0.022424221, 0.0545215905, 0.0828109905, 0.1604759991, -0.5252497792, 0.2450696826, -0.0070609227, 0.1365510374, -0.0562596954, 0.158865869, 0.1024962887, -0.1845774949, -0.3168308437, 0.1592112929, 0.03636989, 0.205860436, -0.0185143054, -0.2774509192, -0.1049807444, -0.3572996557, -0.1582352668, 0.3035012186, -0.1292399168, -0.0857653916, 0.7080218196, 0.202864036, 0.619736135, 0.5606235266, 0.5166891217, 0.0533598587, -0.4011371732, -0.1151210666, 0.0267617665, -0.0420548245, -0.1256861091, 0.0420053862, -0.0431939363, -0.1279366761, -0.2508966923, 0.0883571804, 0.1080321372, 0.1712242812, -0.1111461595, -0.0848676264, 0.1050735563, -0.1521770209, 0.0199648403, -0.1242933646, -0.0758294463, 0.038643688, 0.1679322273, -0.092952095, -0.301758945, -0.2810386121, 0.1419223547, -0.074209854, 0.2143646181, 0.3510378897, -0.0347988829, 0.3840599358, 0.6542614698, 0.0626148954, 0.1027648076, -0.1921770275, 0.239625439, 0.0520183556, -0.6680751443, 0.16154401, 0.0713285357, -0.4031162262, 0.2372421175, 0.3277626336, 0.2234092206, 0.1068712473, -0.1623992622, 0.0089591891, -0.3093214631, 0.2055792361, 0.0101806019, -0.1933355331, -0.1214147061, 0.0279887095, 0.1757922769, 0.1185591444, -0.3084102273, -0.1066319123, -0.4146066904, 0.0186443143, -0.4001931846, -0.651469171, 0.0922470465, 0.0401496552, 0.097869955, -0.0025703814, -0.279764533, -0.1697243154, -0.1700243801, 0.1263951659, 0.3313115537, -0.2610855699, -0.2167737484, 0.0373909622, -0.085464105, -0.14781183, 0.0160994306, 0.0890381634, 0.1297554374, 0.4998905063, 0.3431231976, 0.1461976171, -0.3304531574, 0.0130647048, -0.0009320788, -0.1115225106, 0.3274608254, 0.175456956, 0.0722924992, -0.0946316347, -0.3950278461, 0.2633704245, 0.2868725955, -0.050698854, 0.381504029, -0.4005305469, -0.0263228118, 0.0040738322, -0.1270409673, -0.0061294902, -0.12775518, 0.024819389, 0.061915148, 0.1099878252, -0.2524790168, 0.1654848158, -0.1811102033, -0.1280918121, -0.1367940903, 0.2108076811, 0.0977658033, -0.0270172805, 0.2516926527, 0.1957520545, 0.5039553642, 0.1116126403, 0.2541820109, 0.2503436208, -0.1214848161, 0.1640227586, 0.3342102766, -0.4417221248, -0.0433261245, -0.262971729, -0.1226979792, 0.2609671056, -0.2051964104, 0.2217995077, 0.3339415491, 0.0073820129, 0.0020571726, 0.1150236577, 0.3605117202, -0.0688446462, -0.3044218123, -0.0567800105, 0.0258826874, 0.1380682141, -0.5615833402, 0.150288105, -0.115725413, -0.4203844666, -0.2101981193, -0.1604303867, -0.3518048823, -0.2396869659, -0.1430502236, -0.1945390403, -0.242272079, 0.0659592003, -0.2627655268, 0.0042385999, -0.0832628012, 0.4153214991, 0.1173382476, -0.1198247895, 0.3166149855, 0.2233852148, 0.1095569357, -0.0748652369, 0.339109838, 0.4798999131, 0.5285979509, -0.5117018819, 0.1337426007, 0.0446161255, -0.1574284583, 0.3019145727, 0.1640595794, 0.1410886049, 0.3766636252, -0.0836734176, 0.0264851488, -0.1202348843, -0.0275302064, -0.3470249176, 0.3050814271, -0.0769748464, 0.6026283503, -0.1700718403, 0.070530057, -0.0380329862, 0.0176381581, -0.6420900822, 0.2209082991, 0.2818740308, -0.0080034845, -0.021658387, -0.0877612382, 0.0681824386, -0.1623540372, 0.3674944639, 0.334461689, -0.2495416701, -0.3301180899, 0.0222449452, -0.235827446, 0.1758073121, 0.0205822159, 0.2468530238, 0.1701907814, 0.1396847665, 0.0877761915, 0.0432499982, -0.2119872719, -0.2127488703, -0.3202988803, 0.2325868011, -0.2264476866, 0.1626768112, 0.0917379409, 0.1630987227, 0.0970385075, -0.1210405305, -0.0209504701, 0.1817316711, -0.0412234403, 0.1883672923, 0.0586960316, 0.0324422941, 0.1596479714, -0.0109969415, 0.1578501761, 0.4102098048, 0.1294573843, -0.1036415994, -0.1486012936, -0.2190628499, -0.3594355583, -0.2469453514, -0.0665296614, 0.4473225474, -0.0367662758, -0.0715219751, -0.2113653719, -0.224280566, 0.0165897906, -0.1691882759, -0.3869923353, 0.1617823541, -0.1489505768, 0.0543510355, -0.0128804706, -0.0906094685, -0.0042411014, -0.0085158087, -0.3282029331, 0.0023106709, 0.5907204151, -0.5755987167, -0.2532939017, -0.2007433176, 0.0924838185, -0.1720799804, -0.059842132, -0.4238317311, -0.2063874304, 0.3250181973, -0.136399582, -0.2507222891, 0.1785617769, 0.1819870621, -0.1021632031, -0.0824743807, 0.1303396523, 0.1093226969, -0.0676950887, -0.0570610948, -0.0815465674 ]
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.0136869624, 0.0475985855, 0.0673071966, -0.0456751399, 0.0919944048, -0.18352063, 0.261324048, 0.1327961683, 0.0008187145, -0.3439308703, 0.0885019302, 0.2487121373, -0.141046524, -0.2732977271, 0.1312420666, 0.1709654182, 0.309713304, 0.044130791, 0.305578053, -0.0806421489, -0.0654460043, -0.0272672437, -0.3542217016, -0.0297059789, -0.5633123517, 0.0520043671, -0.1355008781, -0.4004320502, 0.2827104628, -0.3911949396, 0.0991082191, 0.1787100881, -0.0134690031, 0.2490125597, -0.0001165723, -0.1295524091, 0.3142708838, -0.0642245561, 0.2027622312, -0.1374645233, -0.1056156382, -0.3216921389, -0.1589987278, -0.0220344886, -0.0848208144, -0.2071921825, 0.2631583214, -0.1060145497, 0.5493524671, 0.0068809912, 0.1311335713, 0.1738000512, -0.1037614271, 0.3160277605, 0.0371429697, 0.0110692112, -0.1272771209, -0.2586755455, -0.1081212163, -0.3813348114, -0.4259673655, 0.1791105419, -0.1774551868, -0.1869015247, 0.2517661154, 0.2371276319, -0.0592682846, -0.1703380048, 0.2343095392, -0.165430665, 0.4319826066, -0.2239153981, -0.2962220907, -0.0784382448, -0.2797980905, -0.1567181647, 0.4439509213, -0.0860386044, -0.0714856982, 0.0591571033, -0.4800793827, 0.1590326726, 0.1002614349, 0.0925733745, 0.0439988822, 0.5301564336, 0.0888788551, 0.1097636372, -0.1824955344, -0.2295017987, -0.0440582968, -0.228547439, -0.1261462867, 0.474299401, -0.1523883194, -0.2847384214, 0.0262273457, -0.080077365, 0.0544602871, 0.2948215604, 0.0504116789, 0.281519115, -0.0299815554, 0.2159368247, 0.0078934543, 0.5478118658, 0.1964381933, 0.4425426424, 0.190851599, -0.5588883758, -0.4889089763, -0.0812602788, -0.0298009105, 0.034314625, 0.6790271997, 0.0561272167, -0.3889098465, 0.0341376737, 0.1852828264, 0.058452528, -0.354709357, -0.1792827994, 0.0523778126, 0.2285993844, -0.111292094, 0.0362104401, -0.5301238298, 0.0330120176, 0.0699477419, -0.1227098554, -0.2177215815, -0.1649405807, -0.4442878067, 0.2580902576, 0.1851161569, 0.4816350043, 0.2829695344, -0.1187250614, -0.1610896736, -0.1224140972, 0.1046067923, -0.2712715566, 0.4402395785, -0.0034615295, -0.3136520982, 0.1900184155, -0.0267267432, -0.0141045898, -0.3247200251, -0.0082999729, -0.0187004842, -0.0847288668, 0.4318657815, 0.0427011698, -0.2380247563, -0.1347659081, -0.0299305432, 0.2931547165, 0.5849564672, -0.2344622612, -0.0222431123, -0.0523846373, -0.3115317822, -0.3348663449, 0.1609579176, 0.2611803114, 0.2704749703, -0.2919743657, 0.4862923622, 0.3912269473, 0.3023073077, 0.5853936672, -0.1874109507, 0.1277573407, -0.0788883865, 0.6074694991, 0.2261340618, -0.1387711167, -0.5778238177, 0.0163230374, 0.0931185037, 0.092237547, -0.0854175389, -0.0514959879, 0.3476945758, -0.2769732773, 0.0319776982, 0.3163945079, 0.0487546846, 0.0056758225, -0.3302255273, -0.0635457039, 0.4362439215, -0.2102124691, 0.1992401183, -0.0479146205, -0.0353890248, 0.1872393787, -0.2263921052, 0.090761207, 0.2284287661, -0.0491262339, 0.1635674089, -0.1805585176, 0.1260124296, -0.0757403001, -0.1877245754, 0.1920467615, -0.1871373951, -0.1807710677, 0.0339366607, -0.1134051979, 0.1624483317, -0.1431272626, -0.06627772, -0.2908811867, 0.1051156893, 0.1116528362, 0.3874665499, 0.151506424, -0.1465882659, 0.124340035, 0.464555949, 0.0119357109, 0.112524569, -0.097979404, 0.0455769077, -0.235374704, -0.3090815544, 0.1631504893, 0.2418068349, 0.0572641715, -0.1184215248, 0.1625990272, -0.0288491286, 0.2141640037, -0.0700810999, 0.404435873, 0.0787221789, -0.0859915465, 0.0643275678, 0.30193156, -0.1264507473, -0.2796176374, 0.0359569155, 0.4145948589, 0.5003687143, -0.023509264, -0.1423831582, 0.0557339638, 0.309083879, -0.1524004936, -0.1168998107, -0.1637311578, -0.087241739, -0.0906471685, 0.1349387616, 0.0935458839, 0.0902766138, 0.142640546, 0.3982755542, -0.0260451809, 0.0850622207, 0.0565831102, -0.3832196593, -0.5182849765, 0.1002301872, -0.0206212923, 0.0375777744, 0.005719956, 0.2660205364, -0.0137695083, -0.1720894575, -0.1545709372, 0.1181880757, -0.0653091967, -0.2103820443, 0.1019192785, 0.160408169, 0.3006860018, -0.1281341612, -0.1357725859, 0.2475644946, 0.007779615, -0.0536925532, 0.0689049065, -0.2456958294, 0.0005731881, 0.2347133607, -0.0898352712, -0.2250193655, -0.217269361, -0.1392381638, 0.295609355, 0.03592816, 0.4442129731, -0.1402324587, 0.0842036009, -0.0456855148, -0.1548349708, -0.1630382687, -0.3049254119, -0.2561382353, -0.0947616547, 0.2327447832, -0.295922637, 0.2157175243, -0.0149196349, 0.0495578498, -0.127316013, -0.3565970063, 0.1648929715, 0.0026205992, -0.0809676722, -0.1507015526, -0.3412354589, -0.5605164766, -0.0347065665, 0.2581995428, -0.4532194436, -0.1404507607, 0.2224094272, 0.1876202524, -0.1044219285, 0.0156458467, 0.1428368837, -0.0484265313, 0.0104424879, 0.1698825359, -0.0645508021, 0.0911719874, 0.4004299045, -0.2932044864, 0.0047204569, -0.4901483357, -0.1463362128, -0.3706043959, -0.2366395891, 0.7362601757, -0.110546127, -0.0800711885, -0.0261622369, -0.1154211089, 0.2398853451, 0.5107488632, -0.1860036999, 0.1623384804, -0.0766509846, 0.1053575873, 0.096262753, -0.308124274, 0.3067164421, -0.0934617817, -0.0706833005, 0.0511958301, -0.1466671824, 0.1430202872, 0.2608573139, 0.3049931824, 0.239211753, 0.0911074877, 0.3536166549, 0.8350929022, 0.083809942, -0.1541404724, 0.1790553331, 0.2011921853, 0.0561244525, -0.167630434, 0.0182383806, -0.06496609, -0.1081260592, -0.0374111608, 0.1951100677, 0.1247866526, -0.429641366, -0.0752568841, -0.2870827317, -0.0773976371, -0.3653160334, 0.231430769, -0.5263302326, 0.3536960483, 0.2522391677, 0.421290338, -0.508278966, -0.3702868223, 0.0515364446, -0.1205794141, 0.3768257201, 0.0275494456, -0.6036427617, 0.1598294526, -0.6390219927, 0.2254871577, -0.03145523, 0.6086580157, -0.049296774, -0.1263484508, -0.1125270128, -0.0273522642, 0.3081952929, -0.3621613085, 0.1180664152, 0.1659585536, -0.2614373863, 0.0024889857, -0.1347977966, 0.0365085974, 0.1394206583, 0.3713923097, 0.6505627632, -0.1984954327, -0.1003761441, -0.6000761986, -0.0540400036, 0.0648796111, -0.2873959839, 0.073463738, 0.3018550873, -0.1909434199, 0.0821539834, 0.1917179674, -0.0974148661, 0.2428382784, -0.0313900821, -0.1940701604, -0.1073342711, 0.2325012684, 0.0415738896, 0.3474746644, -0.0098959953, 0.2071545124, 0.2720629871, 0.1065756828, -0.2526547313, -0.3211752772, 0.2206669599, -0.2290353328, -0.0693348348, -0.0051420256, 0.2123202682, 0.1209627539, -0.0375124849, 0.0440715775, -0.1488955617, -0.0146019608, -0.2373544425, 0.1671669483, 0.0833695009, 0.1954215169, -0.3794454634, -0.3263630867, 0.1258123815, 0.1384031475, -0.1807432771, 0.2266239226, -0.3775850236, -0.4460231364, 0.6914544106, 0.2273260206, 0.9793087244, 0.1366843283, 0.4066053629, -0.261069715, 0.2454630286, 0.3961775899, -0.203437537, 0.2705402076, -0.2106606066, 0.0620775707, -0.050862059, -0.1326844543, 0.0091231465, 0.3172043562, -0.2797608674, 0.379665941, 0.1443430632, 0.823980689, 0.1463343352, 0.0589600801, 0.0857705399, -0.2330422103, 0.286539793, 0.1325600147, -0.0268877186, 0.235076651, 0.0284588598, -0.0910465121, 0.0394463539, 0.0768706053, -0.188970387, 0.0690728128, -0.2721969485, 0.1723408848, 0.1990003884, 0.0919734836, -0.0357408933, 0.1271829158, 0.3098222613, 0.1635273099, -0.2802836299, 0.0749831349, 0.3586245179, 0.2018189132, -0.0096237771, -0.3221388161, 0.2645987868, 0.0702609643, 0.0540560782, -0.0745436996, -0.0545704737, -0.4214326739, -0.5006967783, -0.0484705679, 0.1182112694, -0.0697839409, 0.1867561489, 0.0447829999, -0.2054713517, -0.1329454035, 0.1166348606, 0.1708297133, -0.0546877608, 0.4148547649, -0.134878695, -0.0356563926, 0.0283781216, 0.4033697248, -0.0007588193, -0.1859472543, 0.4934465885, -0.4574661255, -0.3638174832, -0.1566361189, -0.1653164923, -0.2013352513, -0.2225386202, -0.0625701249, -0.3878858089, -0.1972301304, 0.037534669, 0.0448246188, 0.1629531085, 0.1089464277, -0.0389690325, -0.2716580331, -0.4200649559, -0.0641964227, -0.0288736746, 0.0158562213, -0.0422419906, 0.2786876857, -0.0310841314, 0.2577910423, -0.2614100277, -0.2017783523, 0.0711544901, 0.1786180288, -0.3131330609, -0.2629748285, 0.1178489402, -0.0698959753, -0.0040266775, 0.341235131, -0.3315978348, -0.1127352342, -0.077568531, 0.1665165424, 0.3449389338, -0.1828276813, -0.213766098, 0.1694699675, 0.0159772038, -0.517547369, -0.1979539692, 0.3084914684, 0.0102925263, 0.0097131468, 0.1756765991, 0.2858938575, 0.1375931501, -0.0975061506, -0.0166268721, 0.0885638669, -0.0466826633, 0.2704510689, 0.0063901134, 0.0285554975, -0.2647023499, 0.1746234447, 0.1920981258, -0.0426925942, 0.446392417, -0.0728393942, -0.1335801184, 0.1615471691, -0.1888234317, 0.1849881262, 0.0214436129, -0.4864816666, 0.7638766766, 0.1510972232, -0.0162991136, -0.0525915027, 0.340526849, 0.1530584991, -0.0649228022, 0.0520952493, 0.4691827297, -0.0986261815, 0.0058951229, 0.0498066768, 0.578346312, -0.404741317, 0.143686384, -0.143725574, 0.0994397402, 0.1940861344, 0.3811711967, 0.0763947591, 0.0855784714, 0.0542609431, 0.3561933637, 0.2328815162, 0.1432288438, 0.2286992371, -0.3098296225, -0.2425926328, -0.2123383731, 0.4649176002, 0.0333409533, 0.5086621642, -0.1132321656, 0.2447831482, 0.1591768563, -0.1347517222, -0.2319494784, 0.303999424, -0.2283731401, -0.2894881368, 0.1007913575, -0.043623969, -0.1505000442, 0.1539198756, -0.1167204306, 0.125316456, 0.1442429423, -0.0083630458, -0.0354178138, 0.0300401449, 0.1455740929, -0.0579558462, 0.3666915596, -0.3213554621, 0.2709105909, -0.4509082437, -0.1322087049, -0.1833265126, 0.1297281981, 0.2746247947, 0.3292089701, -0.3230869174, 0.1327789426, -0.0697846934, 0.0578024462, -0.1904815733, 0.6730787158, 0.065659523, -0.4936017096, 0.0241809078, -0.0414922051, -0.0289019346, -0.0774159133, 0.0728834942, 0.0147570893, 0.1996297836, 0.4930047989, 0.0454484597, -0.1382014155, 0.2667307854, 0.0464600176, -0.254011631, -0.0944354385, 0.156490609, -0.0249840841, 0.2481473088, -0.2527531385, 0.0736774951, -0.0742080063, 0.3581214845, 0.3809098601, -0.1709427983, -0.2639419436, -0.0646263584, -0.4245131612, 0.4025982022, -0.0921911597, 0.2847799957, -0.2324804515, 0.2075216174, -0.1105876714, -0.0049814675, -0.138238132, 0.0578965992, -0.3202581406, 0.0850495845, -0.1461159438, 0.420227319, -0.1469529718, 0.2991518676, 0.1546771377, -0.3179661036, 0.2920418978, -0.0085773766, 0.1318594068, -0.0959044546, -0.0870143622, 0.0377329811, 0.2726810575, 0.5620136857, 0.2327575982, 0.0872586146, 0.0696962923, 0.189472422, -0.374702096, 0.0216687769, -0.0565684512, -0.0297161341, -0.13549155, 0.1955701858, -0.3513375819, 0.1786042601, -0.1632317007, 0.0025964454, 0.0449983031, -0.4295822978, -0.0499904379, -0.0506926998, -0.1909506768, -0.0292214807, 0.0003644601, 0.34487468, -0.174666509, 0.2510060966, -0.3981536627, -0.2146265209, 0.2298821062, -0.6583090425, -0.4971133769, -0.0440977924, 0.0841894075, 0.4080103636, 0.0069481898, -0.2966826856, -0.2157779634, 0.276168704, 0.0777903944, -0.2484917343, -0.1016386747, 0.0264705606, -0.1246339306, -0.2842130959, 0.296004802, -0.0015486861, -0.2540473938, 0.040507853, -0.0360092595 ]
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.0643966943, 0.1173252165, 0.0268087089, 0.125268966, 0.1567066163, -0.0773082078, 0.3404870927, 0.1692478657, -0.3219620287, -0.3533985317, 0.0765751526, 0.3673613369, -0.0683541894, 0.3275823593, 0.092647858, -0.0278009493, 0.2022662461, 0.2302501947, 0.0969586074, -0.0026239231, -0.0930332094, 0.1811445206, -0.3965626359, 0.0402222499, -0.5902645588, 0.2065488398, -0.0332999416, -0.019506244, -0.1387540698, -0.5088024735, 0.3443300426, 0.2019741535, -0.1002952829, 0.3447960019, -0.0001246, -0.1214665025, 0.58143574, -0.1061941385, -0.1357243061, -0.1315973103, -0.1061727554, -0.3342746198, 0.1451294571, -0.1840591431, 0.0441181809, -0.1426275074, -0.007572962, 0.3041886091, -0.5539480448, 0.269493103, 0.0474011004, 0.5145812035, 0.443045795, 0.2505993545, 0.3381246626, 0.0039452072, -0.1633377075, 0.0774530843, -0.221718058, -0.2308958173, 0.2946069241, -0.0040896088, -0.3032646775, -0.2862061262, 0.1892203689, 0.005323451, 0.0360977799, -0.1486217678, -0.1327950656, 0.4225978255, 0.4490500391, -0.2722756565, -0.3485794663, -0.2052144408, 0.0249234326, -0.2226936221, 0.3266037107, 0.4107820094, 0.0495448858, 0.0445897281, -0.440484345, 0.11014916, -0.1068290994, 0.2732964754, -0.3308846653, 0.3821592033, 0.423402071, 0.1096609533, 0.0128081292, -0.1292209327, 0.2586250901, -0.3746067286, -0.0194229148, 0.1626721323, -0.2908121347, -0.1841997057, -0.2253862619, 0.0221127123, 0.4305443168, -0.0290177129, -0.145556137, 0.0746989846, -0.1401956677, 0.1076271087, 0.1945326477, 0.2544100285, 0.2239790857, -0.1042133793, 0.0038690572, 0.0767960548, -0.2166540921, 0.2659813166, 0.2274276465, -0.2757503986, 0.089379333, -0.040519204, 0.5651298761, -0.0694721639, -0.3042343259, 0.056548126, -0.7364639044, -0.1235800385, 0.1029149294, -0.0402496345, -0.0763518065, 0.4491232336, 0.0586432889, 0.3635565042, -0.1976959705, -0.3798345327, -0.072262615, 0.0145610794, 0.0162053555, 0.0611521304, 0.1437863261, 0.0790430456, 0.1670466214, -0.0208612829, -0.4102074206, 0.2052232474, -0.2113887817, -0.167644769, -0.1489063203, 0.0289780721, -0.2191665322, -0.3602612913, 0.0156740602, -0.3502399921, -0.2368436754, 0.1533395499, -0.0034028403, -0.3047693372, -0.2618933618, 0.0320935398, -0.3846157193, -0.1074053198, -0.0526560321, 0.322786361, 0.2190193832, -0.0189930126, 0.0711327568, -0.1152547747, -0.0018657744, -0.244502902, 0.1468640268, 0.1550915986, -0.0509333201, -0.0164899454, 0.112134479, -0.1654552817, -0.049918104, 0.263022989, -0.0839521885, 0.0946984291, -0.1670566052, 0.4398612976, 0.3568459749, -0.0073685497, -0.003148444, 0.0458448231, 0.2689750791, 0.0852902979, 0.1107116491, 0.0083125345, -0.373936832, 0.0349343829, -0.0445479527, 0.340624541, -0.0643280447, -0.1324492544, -0.2004011869, -0.3290830553, 0.672113955, -0.1642895937, -0.0742963552, 0.1388432384, -0.0933731198, 0.2371650487, 0.3771464825, -0.2393361628, -0.1351752132, -0.0320395045, 0.2976107001, 0.2248853445, -0.3573704362, -0.3245316148, -0.6215190887, 0.1153128967, -0.2744533718, 0.5649372935, -0.0713171512, -0.3467870355, -0.0226435326, 0.1168042719, 0.1842115968, 0.049124416, 0.0502412133, 0.1320673227, 0.0034754723, 0.2040455341, -0.01722458, -0.0341615267, -0.0021854565, 0.0743369833, -0.1543971598, 0.5079221129, -0.0508011654, -0.2447685003, 0.0116010532, 0.5782469511, 0.2310593575, 0.0018770695, 0.0209863968, 0.286175549, -0.0210090093, 0.0169911608, -0.184173435, 0.3597711027, 0.0103440266, -0.1082136557, -0.1197342426, 0.2958287001, 0.0824739188, -0.0362321585, 0.106977649, 0.5403355956, 0.0890614539, -0.1274826676, 0.238686651, -0.0310113169, 0.0641212389, -0.1456840336, -0.0917195603, -0.0687633455, 0.1033113226, -0.029711552, -0.3782557845, 0.4686179161, -0.5818827152, -0.1038341224, 0.488042593, -0.1803921461, 0.2012022287, -0.1890498251, -0.198080495, 0.02163589, 0.369153142, -0.3686345518, 0.1642695963, 0.1738226712, 0.0248237047, 0.0485816076, -0.3041323423, 0.0645633042, 0.3759589791, -0.0363255031, 0.1276256591, -0.0101233739, 0.2944428325, -0.2063151449, -0.3622225225, 0.1404733211, 0.1248606518, -0.0001581702, -0.3340363801, -0.0088388324, -0.3641414046, -0.0675907731, -0.4399199188, -0.2286159098, -0.503398478, -0.4318353832, -0.1480876356, 0.7034396529, 0.0043243989, 0.2784730792, -0.6784133315, -0.224682495, 0.0438680798, -0.2637728751, -0.0135059133, 0.0479045138, -0.1932649165, -0.0891905278, 0.2925305963, 0.1887556016, -0.206715852, 0.0206948072, -0.1609640121, -0.2025877237, -0.7249017358, 0.0783894137, -0.3375946581, 0.0019907858, 0.2957775891, -0.0846201926, 0.1590903848, -0.3467279077, 0.1459009796, 0.1718693823, -0.4136032462, 0.4664398432, 0.0333244018, -0.2877027988, -0.0089314207, -0.2185087204, -0.0588834435, -0.2434382737, 0.2334794849, -0.0135715604, 0.0751470923, 0.4313392639, 0.0159303397, 0.0507933535, -0.1473103762, -0.0440622754, 0.0670358539, 0.4366900921, 0.429997772, 0.2493715882, -0.1570454389, 0.1447858065, -0.2302631736, -0.1630172282, 0.2447799146, 0.0009894744, -0.1102874726, -0.1580325067, 0.5572420359, 0.205471769, -0.508290112, 0.3505127728, 0.4187276363, 0.0752613619, 0.0139182508, -0.2324428707, -0.0090982951, 0.4431094825, 0.2931431532, 0.0866398811, -0.167450428, 0.1715908945, 0.0524891652, -0.0354902372, -0.2688115835, 0.5545905828, -0.1980316043, -0.0067355148, 0.1651456058, -0.0011852905, -0.146927014, 0.0155082121, 0.2795688808, 0.1951108277, -0.2452466786, -0.2343911529, 0.1371361017, 0.1229924485, -0.1862455159, -0.1444647163, 0.133558929, -0.3576020896, 0.3650501668, -0.0697129667, -0.1677848995, -0.1720570177, -0.424606055, -0.0249864757, 0.1461023688, -0.0582427494, 0.1105496734, -0.6636126041, -0.0515176542, -0.0062467009, 0.3996485174, 0.1919801235, 0.564432621, 0.2260038257, -0.4211958051, -0.1715789288, -0.1437280178, 0.5449911952, 0.0099102166, -0.1428051442, 0.2944709063, 0.2399403453, -0.2892709374, -0.2785449028, 0.0273511112, 0.1203588396, 0.3569135964, 0.2400013208, -0.5941352248, -0.2463475019, 0.3794515729, 0.2820282578, 0.0303243399, -0.0314474404, -0.1235697195, 0.0520261601, 0.0594213754, -0.1702724695, -0.0757286027, 0.3546286821, -0.3836918175, 0.0351628512, -0.3101994395, -0.0964167491, 0.1639787257, 0.3305375576, 0.3377696574, -0.3164930344, 0.0744248778, -0.3892457187, 0.1455589235, 0.1262889802, 0.3810683489, 0.3967333436, -0.447845608, -0.4655650556, 0.1159036458, 0.3578381538, -0.0276732445, 0.1747050583, 0.2886180878, -0.2007167339, -0.2645501494, -0.1983753294, -0.0289642736, 0.4133415818, -0.0997605547, -0.1146217659, -0.0649417341, 0.5096236467, 0.0212690011, 0.1219206154, -0.5886439085, 0.2646947205, -0.4755284488, 0.2535638809, -0.1144696176, 0.9977655411, 0.115684092, 0.1002282649, 0.2691835463, 0.1657366902, 0.5099569559, 0.0075568035, 0.15776591, -0.3320661783, 0.2349306345, -0.1403215826, -0.203341797, 0.1893981844, 0.2155360729, -0.2847731113, 0.2099850029, -0.0445331559, 0.089967981, -0.0312904269, 0.2504957318, 0.0605236664, 0.2865280807, -0.3072862029, -0.0948877558, -0.0923761129, 0.0832217932, 0.0634091869, -0.2093324661, -0.3941882253, -0.1552631557, 0.0115263015, 0.1810258031, 0.0728998035, 0.0601835139, 0.4171123207, -0.2120634615, -0.0318057723, 0.2774348557, -0.0092719793, -0.2507450581, -0.0398265645, -0.058183521, 0.2255807817, -0.1509782523, 0.1982779503, -0.1155575067, 0.2459990084, 0.1325126588, -0.3227516413, -0.1154313982, -0.1396714002, -0.1983372271, -0.1088741124, -0.1120208278, 0.0315254703, -0.1432554573, -0.1874487549, 0.0321699828, -0.0815732107, -0.0831202343, -0.0252199993, -0.2151883096, -0.0778529122, 0.0383993573, 0.0380343013, -0.1525837034, 0.0448345281, 0.2418370545, 0.2376709878, 0.5448004007, 0.4637737572, 0.0376260579, -0.0040661171, 0.0038767979, -0.2874627709, -0.2303062379, -0.3807948232, -0.1140153483, -0.0650253594, -0.1488629133, -0.1858000755, 0.6646893024, 0.0446061119, 0.2915352583, 0.0867564604, -0.1546982527, -0.084244661, 0.3814485967, 0.208534196, 0.221302703, 0.0042425245, 0.5544478893, 0.1517050266, 0.0485917255, -0.1127221212, -0.0973060578, -0.3818846345, 0.2463035434, 0.1525018215, -0.0737933964, -0.1864911914, -0.330920577, 0.0815939009, -0.2978517413, 0.1310171485, 0.0108478032, -0.0611115098, 0.2071421742, 0.3853252828, 0.0462937281, 0.0434729755, 0.0189265385, 0.3019470572, -0.122842297, -0.1633668691, 0.1167983264, -0.1509326696, 0.334025532, 0.3067089617, 0.2679738998, -0.3899147213, 0.0454358682, -0.1173838452, -0.0730446875, -0.0132281147, 0.340855062, 0.0195686147, 0.1627985537, -0.0384198725, 0.1229009703, -0.0323856808, 0.0929693729, -0.0094260164, -0.1149348915, -0.3325374722, -0.0618078113, -0.019270137, 0.419944644, -0.0150183775, -0.2145327181, 0.3441823721, 0.021738451, -0.4045169353, -0.0563259944, 0.1963018775, -0.327665776, 0.0297587886, 0.1409678906, 0.4163487554, 0.2480724305, -0.3645539582, 0.1151566207, 0.095026046, 0.0422367081, 0.2047932744, 0.2129470855, -0.0155649781, 0.1771939546, 0.480533123, -0.0208509751, 0.0870035961, -0.1591028124, 0.4040465057, 0.179799363, 0.0218497366, -0.1859680414, 0.4318917096, 0.1254311204, -0.3001893759, 0.10341461, 0.4830499291, 0.0874409974, 0.170600757, 0.3680460751, 0.0489859208, -0.2632355392, -0.1646346897, 0.0922514349, -0.1182088703, -0.1279555857, -0.2326813042, -0.268702507, -0.1262549162, -0.1826534867, 0.0351067185, -0.1847105622, 0.5446304083, 0.0857567415, -0.0871321112, -0.3670356572, 0.3395569324, 0.2477971613, 0.1671562046, -0.2275748998, 0.0550815836, 0.0380384251, -0.2480457276, 0.2264215797, 0.3592940271, 0.2917847335, 0.3263561726, -0.315844655, -0.3911434412, 0.0193014294, 0.0295351297, 0.0963332802, 0.0056227855, -0.0832960829, 0.123826392, 0.197017014, -0.0187275223, 0.0856878012, -0.0020506859, -0.0753250122, -0.2528963387, -0.3066673577, 0.5929840207, -0.0182352494, -0.3518255353, 0.0388036445, 0.0725445673, -0.0117430538, -0.195538491, 0.1793351471, 0.2753734589, 0.2146021724, 0.0860149488, 0.0115739442, 0.193645373, 0.159019053, 0.0958807766, 0.1392925382, -0.0169130005, 0.1692795008, -0.4543949962, 0.0249609984, -0.0521974936, -0.2102271914, 0.0804067999, 0.3008455634, 0.0454501696, 0.0251691379, -0.3979479373, -0.0292957257, 0.2426873446, -0.0250513256, -0.2467197478, -0.1098272055, 0.2442292869, -0.3090699017, -0.2742751241, -0.3003702164, 0.3783373535, -0.2326951325, -0.0584373996, -0.0080521787, 0.1860941052, 0.4821603894, 0.3097610772, -0.01554396, -0.0004676543, 0.7240967751, 0.0777880102, -0.0391620509, -0.2763913274, -0.14315027, -0.4282414615, 0.2060938329, -0.2975787222, 0.2209627032, -0.0779444501, 0.527222991, 0.0625874996, 0.5148115158, -0.1245441586, -0.2223349363, 0.0077808425, 0.201761812, -0.3749046922, 0.0519049391, 0.107422471, 0.0230158456, -0.0262649544, 0.059519574, -0.0937536508, -0.469376266, 0.1555234045, -0.1344608665, -0.2337856442, 0.0266510211, -0.0185011029, 0.140067786, 0.0730233192, -0.4839622974, -0.2024586946, 0.3920607567, 0.0701859221, 0.0771596432, 0.1648251116, 0.1535688043, -0.1244247854, -0.1648196578, -0.0260823034, -0.2262389958, -0.0990437716, -0.0559798442, -0.0403767787 ]
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.0000326112, 0.0538681597, 0.0309728011, 0.1527772397, 0.131541431, -0.0097019151, 0.2905564606, 0.1126789823, -0.4240897894, -0.3221021891, 0.1324173808, 0.3009293377, 0.0746791512, 0.218407914, 0.0105957054, 0.0620801002, 0.1866665632, 0.198508054, 0.1221265346, 0.0144805685, -0.0328485854, 0.1648802906, -0.3214719296, 0.0625456646, -0.6196386814, 0.2229528129, 0.0357407182, -0.0196781233, -0.1147863641, -0.4618893862, 0.3706982732, 0.1314749122, -0.1188883707, 0.3580963612, -0.0001218364, -0.0039292648, 0.4484201074, -0.1272722334, -0.0842168033, -0.0493636355, -0.1476015896, -0.3369849324, 0.070886977, -0.150624752, 0.067856811, -0.0325273536, -0.0610249862, 0.3406124711, -0.4604621828, 0.1814389229, 0.0470486879, 0.5140042305, 0.4450063407, 0.211494416, 0.3964325786, -0.0114494786, -0.1496785581, 0.1629150361, -0.2344386727, -0.1761416495, 0.3071681857, -0.0447369963, -0.335534364, -0.2468848825, 0.0919777974, -0.0022424683, 0.0193524659, -0.0927104279, -0.215449363, 0.4014583826, 0.3250854015, -0.3767762482, -0.3620739281, -0.2539634109, -0.072192125, -0.0025715679, 0.3222016692, 0.4332792759, -0.0434093028, 0.0893691182, -0.3906941712, 0.1698398739, -0.0055578575, 0.0199998692, -0.3756795824, 0.2791657448, 0.4180591106, 0.125666678, -0.0578125231, -0.0325818695, 0.2527772784, -0.3134332895, 0.023915723, 0.0500916019, -0.4031194448, -0.1911041737, -0.1240606159, -0.1303992122, 0.447984457, -0.0571686625, 0.0196361877, 0.048736874, -0.0874166638, 0.1509537548, 0.1608291268, 0.2469574511, 0.069092527, -0.0032202639, -0.0491847619, 0.0776775777, -0.2310607284, 0.2671501637, 0.2664993107, -0.2722826898, 0.1462367028, 0.015613094, 0.5298161507, -0.1942782402, -0.3017012775, 0.1567926854, -0.7380694151, -0.1070708483, 0.0951359123, -0.0827221423, -0.0859729722, 0.4375620484, 0.0231686011, 0.3751182854, -0.1258004904, -0.3113954067, -0.0775918067, -0.0183432642, 0.0185440257, 0.0074303225, 0.1500351727, 0.1472894251, 0.1175248325, -0.0058653317, -0.3892931342, 0.200388968, -0.2125388086, -0.1689075679, -0.0529312864, 0.1127568185, -0.1986382306, -0.3424561024, 0.0748591647, -0.2692531347, -0.2956696153, 0.1489869356, -0.0504910909, -0.2925230861, -0.0487849787, 0.0491826236, -0.45489645, -0.0138572436, -0.0014937557, 0.1368766129, 0.1710846424, -0.0737832263, 0.1213528067, -0.1454529315, 0.0488348156, -0.330368042, 0.2274913043, 0.0074432716, -0.1383931637, 0.014926061, 0.2834964395, -0.2184306532, -0.0481670611, 0.285407722, 0.0083052441, 0.1808186173, -0.1705978364, 0.5086685419, 0.2644162774, 0.0803471953, -0.030160021, -0.0841615647, 0.24822025, 0.1521855891, 0.1921501011, 0.0378295705, -0.4064251184, -0.0462311022, -0.0138713717, 0.3398268223, -0.1373068839, -0.1272161603, -0.2157675624, -0.255967617, 0.5326583982, -0.0319034457, -0.1721980572, 0.0755648687, -0.0281260572, 0.217997551, 0.2779777944, -0.2256314456, -0.2787723541, 0.0033526085, 0.1888369918, 0.1972595751, -0.3089707196, -0.2877028584, -0.4605283141, 0.1879188418, -0.3435059786, 0.5599389672, -0.2155988216, -0.3793882728, -0.0215966925, 0.2495394945, 0.2796548605, 0.1542743593, 0.0767219812, 0.1839294434, 0.1065372005, 0.15070723, 0.04333774, -0.063532725, -0.0650915429, 0.0893570036, -0.2372570932, 0.4350221455, -0.0643316507, -0.2545839846, -0.0205407366, 0.5571244359, 0.1251188517, 0.0465452336, 0.0292415544, 0.2860116661, -0.0419970527, -0.0050188676, -0.2008779943, 0.2961166203, -0.1280412525, -0.16561912, -0.2111011744, 0.2149004936, 0.0744982436, -0.0052275881, 0.1057888716, 0.4875393808, 0.0662073344, -0.0467141345, 0.2157475352, -0.1068631858, -0.0017404854, -0.0956157744, -0.0844758973, 0.0191745311, 0.2111939639, 0.2053703219, -0.5470690131, 0.5216994286, -0.4695622325, -0.0886455327, 0.5151798129, -0.2779282629, 0.2281652391, -0.2124318331, -0.1346041113, 0.1312163472, 0.3989616632, -0.369564712, 0.1940738559, 0.1023912132, 0.0288278032, 0.0448637381, -0.3958707452, 0.0651666224, 0.2654565573, 0.042332869, 0.038110733, 0.0511465408, 0.2779504061, -0.1112806424, -0.2664990425, 0.1818797141, 0.0312790871, -0.1044896096, -0.3702567816, 0.0883171782, -0.364700377, -0.0115047842, -0.3589561284, -0.2359385192, -0.5129186511, -0.394470185, -0.0359413177, 0.599091351, -0.0506063327, 0.2528380752, -0.6956562996, -0.2696460485, 0.0114534348, -0.4257436693, 0.0511180311, -0.0740270391, -0.1123214364, -0.0595152043, 0.2943380177, 0.186101526, -0.2042570263, -0.1255381852, -0.1582056284, -0.1919830739, -0.6355776787, 0.1859967113, -0.4187495708, 0.0109841432, 0.3473020494, -0.1060542017, 0.1912701428, -0.3261114955, 0.1868238598, 0.1711120456, -0.4117402434, 0.5654466152, 0.0669071898, -0.3507685661, 0.0160050392, -0.167805478, -0.0840316787, -0.2349205911, 0.2703928351, -0.0993291885, 0.0352934897, 0.2802299261, 0.0138519742, 0.0089082345, -0.2474104464, 0.1114725918, 0.0248688459, 0.3900650144, 0.3563612998, 0.3765404224, -0.1372018307, 0.1883706599, -0.3040183187, -0.1588794589, 0.2909480333, -0.0703082979, -0.1315320432, -0.1706428379, 0.6069601774, 0.1364936233, -0.4531552196, 0.3239972889, 0.4185802937, 0.0673283786, 0.0007435232, -0.186094448, -0.0540756397, 0.4165590405, 0.2537944913, 0.0350465626, -0.1258539408, 0.1467140615, 0.0590123758, -0.0642356351, -0.225723803, 0.5036705136, -0.2651817799, 0.0297762193, 0.175627932, 0.0661862716, -0.1662018001, -0.0177923292, 0.0821507275, 0.1531196982, -0.2464071363, -0.1709885895, 0.0917295963, 0.1066620648, -0.1533645689, -0.2786041796, 0.2364922464, -0.2413659245, 0.3538046777, -0.0401276797, -0.1589075923, -0.1880383641, -0.3680250645, -0.0109518468, 0.0784581006, -0.0820761919, 0.0958491564, -0.6450896263, -0.3294069767, 0.0752367601, 0.3648805022, 0.2579319477, 0.5744527578, 0.1310130805, -0.4348480403, -0.2196395695, -0.0917118117, 0.5359678268, -0.0084520373, -0.0384454392, 0.2916205823, 0.2740376592, -0.2739704251, -0.2968040705, -0.0802817643, 0.0834852159, 0.2472425699, 0.1379486322, -0.6362395287, -0.1290536374, 0.2843503356, 0.3965993226, 0.1000205204, 0.0278413706, -0.2355179936, 0.0123150572, -0.0486452915, -0.1425989717, 0.0284249559, 0.2278541028, -0.3272437453, 0.063221857, -0.3245684505, 0.0213554725, 0.1703504026, 0.480537653, 0.2850091457, -0.3363884985, 0.0398546234, -0.4539276361, 0.2034311891, 0.107244201, 0.5703111291, 0.5020774603, -0.5287025571, -0.3886255026, 0.1841167212, 0.3425623775, -0.0465754569, 0.0925027728, 0.1649517566, -0.1543335319, -0.2554900944, -0.2398647815, -0.0500076786, 0.3597529531, -0.0308979116, -0.1070576906, 0.0278352648, 0.4318612218, 0.1585470438, 0.0956577957, -0.6823590994, 0.2394417226, -0.4008052647, 0.2723210454, -0.04769006, 0.9379635453, 0.1299601048, 0.0923517942, 0.3337067664, 0.2017401457, 0.4809493423, -0.0183211938, 0.1827781796, -0.2460650057, -0.0113400947, -0.1870480776, -0.2756963372, 0.073389262, 0.1745605767, -0.2565914392, 0.3026056886, 0.0013168454, 0.1466766745, 0.0686985776, 0.1166917533, -0.0081483796, 0.3080259264, -0.3076499999, -0.0825601891, -0.0876130611, 0.0282528065, 0.1045908332, -0.109051913, -0.5096395016, -0.1694670767, 0.0002239496, 0.184658885, -0.0328265578, 0.013788633, 0.3616639078, -0.1149208993, -0.1352648437, 0.1706977785, -0.002249917, -0.2959180772, 0.0176627357, -0.0759263188, 0.2719802558, -0.0784949437, 0.3047953546, -0.0825138465, 0.3430137634, 0.1229275987, -0.3146328032, -0.0677118748, -0.2235834897, -0.1790155321, -0.0821913704, -0.1533219516, 0.076086849, -0.2540958226, -0.1125234962, -0.1276057214, -0.120134905, -0.0320300683, -0.0108245667, -0.1855923086, -0.064123556, 0.1463434994, -0.0642079115, -0.1906720251, 0.0457102172, 0.1047871262, 0.1875717342, 0.6064352989, 0.3791363239, -0.0399996415, 0.0133005157, 0.057232067, -0.3177099228, -0.3002562821, -0.4511319995, -0.1510190666, -0.1692903042, -0.2728016078, -0.2661794722, 0.6759355068, 0.2157922238, 0.2065013051, 0.0587780103, -0.1873876303, -0.0219808556, 0.4642729461, 0.337949574, 0.1834040731, 0.0576507524, 0.6058554649, 0.1056454107, -0.0143964896, -0.1383229792, -0.1891863644, -0.5123186707, 0.2607532442, -0.0032223724, -0.0168848448, -0.1995467842, -0.3552438617, 0.0996782407, -0.190248251, 0.1187712699, -0.0018304028, 0.0799266845, 0.202624321, 0.3011370301, 0.1307024956, 0.0292956568, 0.059095785, 0.3133088946, -0.0863568634, -0.1691774577, 0.0408390686, -0.0871463269, 0.2083614469, 0.2513519526, 0.2837482095, -0.4437424242, 0.1296731979, -0.167319566, -0.0936043859, -0.0200448968, 0.3436532021, -0.1722468138, 0.1508532017, 0.0111373998, 0.1842430532, -0.0037247613, 0.0908713415, 0.0047093602, -0.0272976197, -0.3770060539, -0.0851903036, 0.0857567638, 0.3486766517, -0.0090901665, -0.166028589, 0.3011489809, 0.0432871878, -0.3755926192, -0.0223313868, 0.2652484775, -0.3256574273, 0.1198401824, 0.2465084046, 0.4056598842, 0.2672126293, -0.24613069, 0.1336132288, 0.1941644102, 0.1927344203, 0.0810909718, 0.3828416169, -0.0625905842, 0.2826988697, 0.4963555038, -0.0428273939, 0.1783228964, -0.2052474916, 0.3776830733, 0.2292224169, -0.0082832025, -0.2543430626, 0.4671545625, 0.1503640115, -0.2536216676, -0.0102299601, 0.5429745317, 0.0719743744, 0.0915778875, 0.3733736873, -0.0238434561, -0.2738280296, -0.2085316926, 0.0868315101, -0.0629945472, -0.016190432, -0.2711747587, -0.1961761266, -0.0899879411, -0.2310900986, 0.011707332, -0.1769198328, 0.5453143716, 0.0538270697, -0.0699241608, -0.2815675735, 0.2920910418, 0.2002321929, 0.1837661713, -0.2117908895, 0.0637999475, 0.104672119, -0.3237309158, 0.3169935346, 0.3942155242, 0.360856235, 0.2614825666, -0.2633311152, -0.3394250274, -0.0505211093, 0.0534344539, 0.0293795094, 0.0123521946, -0.2310140729, -0.0348658338, 0.1708759665, 0.0397928581, 0.0614804216, -0.1119550169, -0.1979032159, -0.263584435, -0.2899727225, 0.5647649765, -0.0532340519, -0.3765740693, 0.0905216038, 0.0299440976, -0.0413338542, -0.1076731831, 0.1239439398, 0.2545181811, 0.199342072, 0.1536210179, 0.0158996582, 0.1261709183, 0.1948058009, 0.1311799884, 0.1723542809, 0.0539712235, 0.2657203376, -0.5592803359, 0.0607558079, -0.0314209387, -0.3658489585, 0.2509438694, 0.2590925395, 0.1226245016, 0.1718992144, -0.315603286, 0.022911381, 0.0584223345, 0.0001742537, -0.1930541694, -0.2240374982, 0.1051742584, -0.3982795477, -0.2957428694, -0.2477908134, 0.4206872284, -0.1910123825, -0.0056663901, 0.0953532383, 0.0705781579, 0.4648588002, 0.2801657021, 0.073753953, 0.0240755659, 0.6520789266, 0.0565083548, -0.0289484411, -0.1964110434, -0.1625686288, -0.4249636531, 0.2250286788, -0.3275975287, 0.1831674278, -0.056853801, 0.5732346177, 0.0306405798, 0.3586796522, 0.0138114244, -0.2656751275, 0.0224260688, 0.2475532591, -0.3517123163, 0.1354185939, 0.1260947734, 0.0590382256, 0.0177513156, 0.1408074945, -0.0773071349, -0.5094181299, 0.1611296237, -0.0186848976, -0.1912281215, 0.085257791, -0.0545712113, -0.0550152883, 0.0704416111, -0.4616410434, -0.1345541775, 0.3279928565, 0.095977746, 0.085006319, 0.0883453786, 0.1363298595, -0.0962661579, -0.0946110785, 0.0125525277, -0.3227336109, -0.0914964452, -0.0260313749, 0.0670211911 ]
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.0161188692, 0.0418328345, 0.0497545674, 0.1791476607, 0.2209596932, -0.1551370174, 0.348546654, 0.1771945953, -0.2337821871, -0.2496901006, 0.0528566167, 0.2427443862, 0.0418506376, 0.3009527028, -0.0142642949, -0.0392463058, 0.1369885355, 0.1927274168, 0.0573506504, -0.0133016631, 0.0279206038, 0.2128111869, -0.4326975942, 0.0798529536, -0.6052956581, 0.2832009196, 0.1217152327, -0.0815340057, -0.1724738628, -0.3538149297, 0.3396439552, 0.0633924976, -0.127394706, 0.2941181362, -0.0001230619, -0.0787973031, 0.4711287022, -0.1221957356, 0.0056543313, -0.1541829556, 0.0033245981, -0.2184462547, 0.1188606024, -0.1594700813, -0.0122466758, 0.0787846595, 0.0574798808, 0.2655117512, -0.4857584238, 0.2143758237, 0.0313540734, 0.5556200743, 0.361111939, 0.2949572504, 0.4820652902, 0.1081081182, -0.1640467942, -0.0403704271, -0.1488456726, -0.2206765711, 0.3500575423, 0.023377113, -0.3031670451, -0.2488749325, 0.2104116976, 0.1371802241, 0.0132310539, -0.1658138782, -0.2161863446, 0.3846073747, 0.3784904182, -0.272175163, -0.2982420921, -0.2871518731, -0.063659206, -0.1074375212, 0.3144471049, 0.2532113791, -0.0958043933, 0.0034741312, -0.2865938842, 0.1025463045, -0.0919406861, 0.135229528, -0.3512830138, 0.3031041324, 0.423658222, 0.0838387832, -0.1090581641, -0.0581074394, 0.2037523538, -0.3682914078, 0.1821449101, 0.197430253, -0.3036395013, -0.2578524947, -0.1963276416, -0.1283043474, 0.3435290158, -0.0971284062, -0.1011335254, 0.0921990573, -0.1799585968, 0.2135978192, 0.2164669335, 0.1940203607, 0.092186749, -0.0466760881, 0.0324376449, 0.0155874304, -0.2754161954, 0.1777698398, 0.2533293962, -0.3579939902, 0.2222447693, -0.0222090296, 0.5951606631, -0.2146411836, -0.3581427634, 0.1046302021, -0.6537966728, -0.0292838942, 0.1376779079, -0.1245898604, -0.1058192179, 0.4346595109, -0.0013265759, 0.3968076706, -0.2712624967, -0.3631326556, -0.0425494313, -0.0084460378, 0.0379898101, -0.0114989523, 0.1196711883, 0.2067753673, 0.1114211604, 0.0167972334, -0.3512592614, 0.2169021964, -0.1675958931, -0.2053923905, -0.0912244841, 0.0087318365, -0.2506653965, -0.3312961757, 0.1384345889, -0.3670900464, -0.2213856578, 0.1448271871, 0.0643097162, -0.1541720629, -0.1422810704, 0.052408684, -0.4513301849, -0.1260324121, -0.1629424542, 0.3355959952, 0.2153678834, 0.0086007416, 0.0566009991, -0.1638466865, -0.010453552, -0.215882346, 0.2360280901, 0.1352062821, -0.0815289468, -0.0126467869, 0.1752240658, -0.2601313293, -0.0406291597, 0.2410742044, -0.0236211587, 0.0674881935, -0.1356776357, 0.5942890644, 0.3529725671, 0.0254982039, 0.1012032777, 0.03856479, 0.2206335366, 0.066807121, 0.0872133896, 0.0233999416, -0.3188512921, 0.0589520298, -0.0854754895, 0.3682379723, -0.1921680868, -0.0841461197, -0.2003952712, -0.2794534266, 0.5485411882, -0.1183059737, -0.0097652813, 0.0945073515, -0.1517411023, 0.2460001111, 0.2656450272, -0.2121184766, -0.1468267143, -0.0330822468, 0.3460653126, 0.3285520673, -0.4251266122, -0.4670062363, -0.546266973, 0.1526120007, -0.3511542082, 0.5649887919, -0.0926039368, -0.3628211319, -0.0444888547, 0.0957759172, 0.2239726335, 0.1940456927, 0.0716375485, 0.0665751174, -0.0451181643, 0.1773070544, -0.0164551586, -0.1460976601, 0.0293276533, 0.1820033491, -0.1878121793, 0.5039504766, -0.0505503193, -0.2504657805, -0.0486590341, 0.5068321824, 0.2212621123, 0.0639990568, 0.0746512562, 0.1706356406, 0.0844889656, 0.0274591781, -0.2565706074, 0.2689787149, -0.0357394293, -0.0927111804, -0.1811239421, 0.2658525705, 0.1443215162, -0.0504331626, 0.0820587948, 0.478108108, 0.1191561967, -0.1683797389, 0.2042896748, -0.1395610869, -0.0092688203, -0.1187086701, -0.0515523031, -0.062513873, 0.0655580163, 0.0588731952, -0.591735065, 0.5582194328, -0.6158360839, -0.1362633407, 0.4373219907, -0.170574218, 0.1929083765, -0.2389007956, -0.1187841892, 0.077620551, 0.2546369731, -0.4221940935, 0.1173962057, 0.11945346, 0.0485796556, -0.0174209736, -0.3542958796, 0.1041502804, 0.2996139526, 0.0059599057, 0.1607750952, -0.0010494404, 0.2029422373, -0.0292645991, -0.3321914673, 0.1610555053, 0.112751551, -0.0855799094, -0.3652038574, -0.0516854823, -0.2765154839, -0.0831769034, -0.4930624664, -0.1210078299, -0.3591439128, -0.4036295712, -0.0751151741, 0.724329114, -0.0182255954, 0.1753560603, -0.6069011688, -0.2430243492, -0.0019761398, -0.3426104784, -0.0480911359, 0.0056587979, -0.1899304092, -0.0440212637, 0.3493369222, 0.240725562, -0.2683977187, -0.0032677054, -0.2104717493, -0.2128612101, -0.8254589438, 0.0923085958, -0.3423715234, 0.0749221742, 0.2931860983, -0.0475145392, 0.2073672116, -0.299277395, 0.1691266298, 0.1805765629, -0.4905547202, 0.4479927421, 0.0758826584, -0.2894555032, -0.0016760528, -0.1718770415, 0.0003850795, -0.1767752767, 0.0933614671, -0.0921221823, -0.0221566558, 0.3520942032, -0.0063570403, -0.0300375819, -0.1265923828, 0.0043455064, 0.1129127145, 0.4491635561, 0.4396441579, 0.3248727322, -0.092238389, 0.1975494176, -0.2271228582, -0.2233733535, 0.1804771721, 0.007067807, -0.1562500894, -0.2261994183, 0.5512504578, 0.2355548292, -0.4834789932, 0.305818975, 0.4202593267, 0.0774815381, 0.0824682862, -0.22981745, -0.0179770216, 0.3961814344, 0.3203349411, -0.0228165127, -0.1455745101, 0.1353580058, 0.062721476, -0.1255176663, -0.22356309, 0.5573558807, -0.193265602, -0.1299391836, 0.1700897515, 0.0713231489, -0.1176921427, -0.0582733899, 0.1083227843, 0.1492448449, -0.2013483942, -0.2157618999, 0.0845842063, 0.0908728614, -0.2214394361, -0.272987783, 0.1639739424, -0.3020722568, 0.2303423434, -0.0404954329, -0.1805936396, -0.2284918278, -0.375921905, -0.0044904575, 0.1142401993, 0.0032658465, 0.1018868387, -0.6307585239, -0.0709883049, 0.0868612826, 0.3399067223, 0.1385790855, 0.3695650995, 0.1523776352, -0.5020944476, -0.1680770963, -0.0866928399, 0.4714755416, 0.0638901964, -0.097416997, 0.1335679591, 0.1817168146, -0.1957002133, -0.2683579326, -0.0107411072, 0.0082234442, 0.3010807931, 0.2705416977, -0.639672637, -0.1791683733, 0.3811222911, 0.3375135958, 0.0145520419, -0.0312186293, -0.1594941616, 0.0915167704, 0.0923595056, -0.1257299036, 0.0637993142, 0.2886250913, -0.3415793777, 0.0139582679, -0.336856246, -0.0377888419, 0.2842560112, 0.4143278301, 0.2234794199, -0.3767011762, 0.0828053802, -0.423799634, 0.1871512532, -0.0236256868, 0.4478930235, 0.4763249159, -0.5722709894, -0.4386939406, 0.1377780139, 0.3645660877, -0.1018654108, 0.2148092091, 0.2886378765, -0.1515351236, -0.2807992399, -0.1809927225, 0.0132283643, 0.3981313109, -0.0156292394, -0.0768467486, -0.0258174576, 0.5186470747, -0.0225814469, 0.0883842409, -0.6236914396, 0.3999246657, -0.2987963259, 0.3228162527, -0.047006987, 0.8657001853, 0.0237570293, 0.0476169139, 0.2893195748, 0.1270741671, 0.5067014694, 0.0078468695, 0.1557165086, -0.28175807, 0.1701718122, -0.148922503, -0.2062647194, 0.1013191044, 0.2628421187, -0.1684441268, 0.1422246546, 0.0898130685, 0.218654722, 0.004172828, 0.1318735182, -0.0253725555, 0.3312387466, -0.2488348037, -0.0895866305, -0.0604134053, 0.1597784013, 0.1583167017, -0.1786237955, -0.4871670008, -0.0729665309, 0.0176850706, 0.2338150442, 0.0173142739, 0.0315408744, 0.4748318791, -0.1961059421, 0.0424907058, 0.3946961164, 0.0842881426, -0.3070057034, -0.0172495507, -0.0754972547, 0.2429915965, -0.1359570026, 0.2157041728, -0.2212689966, 0.2682466507, 0.1090967655, -0.334117949, -0.1193563715, -0.0863954127, -0.1597203314, -0.0778871179, -0.1271841973, 0.1667785943, -0.1795395017, -0.2407255322, -0.0648114756, -0.0542014167, -0.0677198917, -0.0305902641, -0.2076226622, -0.0698593408, 0.0501649193, 0.0153964702, -0.1575430632, 0.0998773053, 0.1503842026, 0.2214138806, 0.6293485761, 0.4565291703, 0.0286152139, -0.0017690584, 0.0247226879, -0.2843744159, -0.2169722915, -0.3930868208, -0.1469140053, -0.0448108539, -0.2518892288, -0.1806902289, 0.7333982587, 0.1308618188, 0.1295645684, 0.0895381421, -0.1842823923, -0.0429356545, 0.3645334542, 0.1538840532, 0.2513917983, 0.0819066912, 0.5773448944, 0.1186795607, -0.0448273346, -0.1121122241, -0.0954187512, -0.3992854059, 0.2623730898, 0.0613639913, -0.0556963347, -0.1916273832, -0.4026488066, 0.1119805127, -0.2577458024, 0.2308488637, -0.0068080537, -0.0338362567, 0.2028183043, 0.3138068914, 0.0888001248, 0.0690882057, 0.1050523221, 0.3505169153, -0.0829091817, -0.086167261, 0.1872444749, -0.0784433186, 0.3959696293, 0.1823230237, 0.2939941883, -0.4679494202, 0.0343058743, -0.18817994, -0.0878022909, 0.0834834427, 0.2765666544, -0.0083834045, 0.1889642477, -0.0700786933, 0.122808665, -0.0136320554, -0.0546035767, -0.065093264, -0.0648843497, -0.3568446636, -0.0024990626, -0.0747430623, 0.4072774947, 0.0618507154, -0.1671939492, 0.2969166636, 0.0530838668, -0.3996774554, 0.0795949027, 0.1522875279, -0.4152292907, 0.092296958, 0.1816765368, 0.3825948238, 0.4038795531, -0.309664309, 0.0723770484, 0.1195053607, 0.1604404896, 0.1794631034, 0.2838929892, 0.0302705467, 0.1587480605, 0.4817337394, 0.0031789448, 0.0648494139, -0.1722464114, 0.4451208711, 0.1695607752, -0.2484999299, -0.1077874675, 0.4351513386, 0.0730047822, -0.2572181821, 0.1032343134, 0.4207423031, 0.0211803839, 0.1734534651, 0.2988911569, 0.1028892398, -0.1919421256, -0.2126993239, 0.0856517479, -0.1438967288, -0.1289996207, -0.248128891, -0.3373122215, -0.0672619492, -0.1897701025, 0.0088832378, -0.1929850876, 0.4818561971, 0.0361584648, -0.1371833235, -0.2450811565, 0.3785535991, 0.1929198205, 0.2649735808, -0.1939348578, 0.0645453706, -0.0002823211, -0.3305134773, 0.3294860125, 0.341755271, 0.2270210981, 0.3470465541, -0.3818874061, -0.3901886344, 0.0075489022, -0.0243572034, 0.0469742715, -0.1039169133, -0.2061826587, 0.1557298899, 0.2123419344, 0.0250739157, 0.1044117659, -0.0466437824, -0.1971739978, -0.244226262, -0.2792164683, 0.5544179082, -0.0030107666, -0.1924304217, -0.0728180557, -0.0142637119, -0.0339003131, -0.3230066597, 0.1046113968, 0.2030602992, 0.1489592195, 0.0625697076, 0.0109979585, 0.1575789899, 0.0550224781, 0.1844744086, 0.0528037287, -0.0444114581, 0.3143447042, -0.4968889356, 0.0585791618, -0.020046629, -0.288911581, 0.1667107642, 0.3873147964, 0.0609078109, 0.0682778656, -0.3706536591, -0.0068580918, 0.1168919057, 0.0606203079, -0.0962380916, -0.1325854212, 0.016222205, -0.3778547049, -0.2371812165, -0.2419470549, 0.3659835458, -0.1840186417, -0.0142632127, -0.064313665, 0.2227293253, 0.4342675805, 0.351632148, -0.061796762, 0.0468503833, 0.7053896189, 0.1270473301, -0.0117468461, -0.0867323726, -0.0395372957, -0.5143464208, 0.2094185054, -0.2973787189, 0.2212361544, -0.0026688538, 0.601721108, 0.1248425543, 0.39210096, -0.0645232946, -0.3328495622, -0.0212386176, 0.173238188, -0.3336333632, 0.1193784848, 0.185616225, 0.0193986706, 0.0606359579, 0.0533927307, -0.0882339031, -0.4543744326, 0.0979273096, -0.0631977618, -0.1480971575, -0.0222424418, -0.1345857978, 0.1181332394, 0.1067832708, -0.5811042786, -0.1921421587, 0.3485529423, 0.0206630714, 0.1605138332, 0.1254468709, 0.2556875646, -0.1377924532, -0.1797769666, 0.0106499791, -0.2607835829, 0.0892703757, -0.1012818292, -0.0876176655 ]
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.0195754766, 0.10143736, 0.0100492276, 0.15250808, 0.2617857456, -0.0262450352, 0.3992976844, 0.1835871935, -0.2757071853, -0.3310969472, 0.0578918979, 0.2993275523, -0.0961161405, 0.3490909338, -0.024857346, -0.0886693299, 0.2123331726, 0.2151873559, 0.0904195309, -0.0006231293, -0.0216912851, 0.14710024, -0.4190044403, 0.0407252871, -0.5618261099, 0.1993516833, 0.0091329366, -0.0635872036, -0.1321012229, -0.3558356464, 0.3598955274, 0.1632288843, -0.0964084119, 0.3494223356, -0.0001237269, -0.0465316251, 0.4617718458, -0.0944592357, -0.1142688543, -0.122941196, -0.0468561947, -0.2261636853, 0.1428209245, -0.2239896357, 0.066010654, 0.0396809988, -0.0237115994, 0.2180906832, -0.4827172458, 0.3005026579, 0.0497986488, 0.6041244268, 0.3216879368, 0.288770318, 0.4325879514, 0.0260209776, -0.2378442734, 0.0571172349, -0.2866390347, -0.2400395572, 0.3645997345, -0.0030350946, -0.4224072695, -0.2776354551, 0.170485571, 0.0321026929, 0.0139939375, -0.1811417341, -0.1326827109, 0.3763580024, 0.3835639358, -0.3270161748, -0.2761547863, -0.2740527987, -0.0383331999, -0.147180438, 0.2313627452, 0.3422134221, 0.0426283479, 0.0377748236, -0.3583473563, 0.1332845986, -0.061101228, 0.1729692966, -0.3576497138, 0.2891926169, 0.4066443443, 0.126505807, -0.0574195869, -0.0956977308, 0.2397030741, -0.386339128, 0.1325590163, 0.1334773898, -0.3427966535, -0.1534191966, -0.2158365548, -0.1752314717, 0.4142796993, -0.1013131589, -0.0684360862, 0.0484883934, -0.1178584248, 0.1581597626, 0.1803005785, 0.3018606603, 0.1722832471, -0.042505078, -0.0473929755, 0.0539675504, -0.2548181117, 0.2683300078, 0.2783729732, -0.2501654923, 0.1644535661, -0.0081231389, 0.5877900124, -0.1211649925, -0.3953979909, 0.1054594815, -0.6579977274, -0.0653713495, 0.115804106, -0.0750872195, -0.0164889917, 0.4329296052, -0.0250339359, 0.4224491119, -0.2510069013, -0.2912807763, -0.1103083491, 0.04833607, -0.0065331236, -0.0288016107, 0.1892847121, 0.0969447792, 0.1741943359, -0.0417581797, -0.3898356557, 0.2016263306, -0.1408275813, -0.2009075582, -0.0840663463, 0.0512064137, -0.1916183233, -0.2432672977, 0.1291825473, -0.4263621569, -0.259758234, 0.1686256677, 0.0584445484, -0.2287465632, -0.1498566419, 0.0685943067, -0.42826581, -0.104814887, -0.0640077144, 0.2332175821, 0.230550319, -0.0454131216, 0.073565945, -0.1591984332, 0.0216621235, -0.2626653612, 0.119982712, 0.2031266987, -0.0939800441, 0.0117670968, 0.1568472534, -0.210403353, 0.005221881, 0.2258635163, -0.0269048139, 0.1159322485, -0.1868225932, 0.5118380189, 0.3278872967, -0.0432589315, 0.0168932602, 0.0380690098, 0.2024355531, 0.0965591967, 0.1285849214, 0.0444147736, -0.2982771397, -0.0274748597, -0.0779009163, 0.308724165, -0.0985609889, -0.0781475008, -0.1820750833, -0.2565665543, 0.6591673493, -0.0943207145, -0.0564062744, 0.1404178441, -0.1382982433, 0.3328257799, 0.3180727363, -0.1969290823, -0.1213604212, 0.0179034844, 0.1878584474, 0.2208665162, -0.4277667701, -0.3764053285, -0.6329753995, 0.1295933276, -0.2952991724, 0.5714241266, -0.0909823477, -0.3621649742, -0.1214409322, 0.1148453653, 0.1560099423, 0.06610585, 0.0689285398, 0.1525990665, 0.0195546299, 0.1733791679, -0.0632711574, -0.0691421181, -0.0001668185, 0.1299987584, -0.3026860654, 0.4794204831, -0.0680714399, -0.2394233048, 0.0380317718, 0.5497894883, 0.2630761266, 0.0291556679, 0.0447438285, 0.2267813832, -0.0474290289, -0.0320526101, -0.184886992, 0.3059110641, -0.0065515488, -0.0952608958, -0.1367531121, 0.2938749492, 0.1112041175, -0.1022118479, 0.0039690994, 0.5206983685, -0.0201630685, -0.0484420732, 0.1878580451, -0.0610089302, 0.0482264459, -0.15849787, -0.0894814655, -0.1095931008, 0.1126950309, 0.082330659, -0.4957496226, 0.5330723524, -0.5667437911, -0.1811649501, 0.493871212, -0.197694838, 0.1824940443, -0.2020719349, -0.1289617717, 0.0910812989, 0.3797800541, -0.4210349321, 0.2070303261, 0.1284209788, 0.1107254475, 0.0249740425, -0.3196207881, 0.081259802, 0.3331664503, -0.0291227773, 0.111473009, -0.0383763537, 0.2469993383, -0.1389683783, -0.3223756552, 0.0981642157, 0.1357907653, -0.0476684198, -0.3277387023, 0.0029743612, -0.3342837691, -0.1165996045, -0.3874279857, -0.2271282971, -0.4085306823, -0.4292828739, -0.1264103353, 0.6499423385, -0.0563762523, 0.2817406356, -0.6548401713, -0.2946584225, 0.0785269067, -0.4065556824, -0.0109408796, 0.0041677579, -0.1255192012, -0.0674329773, 0.3089804649, 0.291670084, -0.1843711883, -0.0413815901, -0.2161370069, -0.1620108485, -0.7112454176, 0.1253076494, -0.4536364079, 0.0261324067, 0.297493577, -0.0095081218, 0.1389730871, -0.3155112863, 0.186070621, 0.1755688488, -0.3917917311, 0.4901826084, 0.1041634381, -0.2944884896, -0.0321601257, -0.1916291714, -0.0293726381, -0.2649882734, 0.1147541851, -0.0891409144, 0.0408563316, 0.3860730529, 0.0211113952, 0.0487828963, -0.074510932, 0.034882322, 0.1042640358, 0.4250562787, 0.4264544845, 0.2812416553, -0.1241299659, 0.1868460774, -0.2605316639, -0.2054003775, 0.2208201438, -0.0510110781, -0.1454128027, -0.2333432883, 0.536660552, 0.2374634147, -0.3884626329, 0.2863419652, 0.4431605637, 0.0826118365, 0.0101797655, -0.3189227581, -0.040562395, 0.3840857148, 0.2121478319, 0.0399052501, -0.1200203001, 0.1387338638, 0.0387935042, -0.0864963457, -0.2054843605, 0.5309771299, -0.239392966, -0.0613699034, 0.1415789276, -0.0320219807, -0.1077439338, -0.0494657308, 0.1545824111, 0.1558999419, -0.2657795548, -0.2518398762, 0.1059895754, 0.1672795415, -0.2113859355, -0.1778411269, 0.2012264431, -0.3051598668, 0.3195038736, -0.0406074151, -0.1985890716, -0.1919310689, -0.3699119687, 0.033811409, 0.1395125687, -0.0981303304, 0.1026447713, -0.6497281194, 0.0017364658, 0.020879304, 0.3767078817, 0.1342529655, 0.4731309414, 0.1460256726, -0.4508697689, -0.1902364194, -0.0615379401, 0.5640015006, 0.061231561, -0.0645726025, 0.3183954954, 0.2116880417, -0.2911326289, -0.267436862, -0.078703329, 0.0937381685, 0.3564352989, 0.2167786211, -0.6534018517, -0.230908975, 0.367749244, 0.3814473152, 0.0330672711, 0.0042820722, -0.1924689561, -0.0612932518, 0.0153524578, -0.1625399292, 0.0129424706, 0.3118940592, -0.4172185063, 0.0344122648, -0.353469938, -0.1319496036, 0.2542102337, 0.3573926687, 0.3443435729, -0.3219577968, 0.0954725146, -0.4758374691, 0.1821272969, -0.0383875296, 0.5125544071, 0.4208611846, -0.4859169424, -0.3728666306, 0.1200300902, 0.3413622975, -0.0079409853, 0.1713608205, 0.2588386834, -0.2045014799, -0.2189019173, -0.1618320048, 0.0314353369, 0.3969659209, -0.1037936956, -0.1424655318, -0.0794329569, 0.4981075525, 0.0853006616, 0.1210734248, -0.6400692463, 0.2907294333, -0.3826371431, 0.3815767169, -0.1184932142, 0.9706957936, 0.0344262235, 0.1159853339, 0.3479291797, 0.1673336029, 0.5139728189, 0.072190173, 0.1802604347, -0.300727129, 0.1964896619, -0.1293436736, -0.2213264704, 0.1310355216, 0.1971330643, -0.2321764231, 0.2325964123, -0.0664605573, 0.1716498733, -0.0171468798, 0.2490390092, 0.0054720473, 0.2760458291, -0.3180599809, -0.1031706706, -0.1124360189, 0.0892090946, 0.1288127005, -0.1908584386, -0.4532465041, -0.1403730512, 0.0831985623, 0.1300482899, 0.0804379284, 0.0620405003, 0.3610146046, -0.2321573496, -0.0285359398, 0.3560191393, 0.0499162748, -0.3062996268, 0.0172608811, -0.0950056016, 0.2784452438, -0.1184567064, 0.2219922394, -0.1196757853, 0.319614023, 0.1337707341, -0.2596150041, -0.0831988826, -0.1216641888, -0.1449960172, -0.1609418541, -0.1105657369, 0.0658314303, -0.2531042099, -0.1635763049, -0.0241690204, -0.1154225916, -0.0930648297, -0.0350699201, -0.2148528546, -0.0962179229, 0.0768125504, 0.0298718736, -0.1528107077, 0.0419529043, 0.1257480085, 0.2709086835, 0.6052501202, 0.5042899251, 0.0361743122, -0.0084300861, 0.0055011585, -0.2731565833, -0.2976397574, -0.3696178198, -0.0714036971, -0.1066273525, -0.2701565921, -0.2218776494, 0.6855996251, 0.0500298552, 0.2579537332, 0.1075879857, -0.1760199666, -0.0886617079, 0.3262964487, 0.2517032027, 0.272649765, 0.0120918751, 0.558899045, 0.1151678413, -0.0451642498, -0.1183433309, -0.0941507071, -0.4501890242, 0.299320668, 0.1259325296, -0.0273820665, -0.1964676529, -0.3474901915, 0.1052609235, -0.2562192082, 0.16770266, -0.0052709021, -0.0697114617, 0.2226895243, 0.2814823687, 0.0629887953, 0.008344017, 0.0771828741, 0.3129276633, -0.1115406007, -0.1160237193, 0.1301072985, -0.1095885783, 0.3613773584, 0.1909683794, 0.2876527607, -0.3854853511, 0.0116553511, -0.1146790087, -0.0839901194, 0.0384315364, 0.3189916313, 0.0250515826, 0.1879184246, -0.0126739033, 0.0783971101, -0.0395023413, 0.0791224539, -0.0052773636, -0.1448147893, -0.3106229007, -0.0418730043, 0.017504476, 0.4356746674, -0.0573868491, -0.2004942596, 0.3062958121, 0.0385018028, -0.3957902789, 0.0481884703, 0.2331671566, -0.3720858097, 0.0785649642, 0.1954510212, 0.3485137522, 0.2989057899, -0.3653683662, 0.0893370062, 0.1632989645, 0.1465242505, 0.1509816051, 0.2636651993, -0.0648988485, 0.1604721546, 0.4644599259, -0.0115036536, 0.0504282787, -0.1111411601, 0.4408942163, 0.2518626153, -0.1169424504, -0.1243630499, 0.4053168893, 0.1224790365, -0.2539815903, 0.1131930053, 0.4421786964, 0.1059337556, 0.1297669709, 0.3113714159, 0.0384408608, -0.2267453671, -0.1211203486, 0.1179406941, -0.0931440815, -0.0873482227, -0.2757023573, -0.2565480471, -0.0810903311, -0.1800366789, 0.0243242346, -0.1540013701, 0.5543490052, 0.0592053272, -0.1635774523, -0.285202086, 0.4014177322, 0.1921865642, 0.1359363198, -0.1995631456, 0.0366872922, 0.0967630297, -0.2490330487, 0.2249767631, 0.3008889556, 0.2749758065, 0.2934954762, -0.4081047773, -0.3811700046, 0.0252953097, 0.0026775002, 0.0431607664, 0.0289613456, -0.1680410057, 0.1478980929, 0.2348807454, 0.0013728552, 0.063858524, -0.0405189916, -0.1047829166, -0.2817614973, -0.2665733397, 0.5761907697, -0.0518485494, -0.2904801071, -0.0145228142, -0.022991024, -0.0898446441, -0.1888556182, 0.2122809589, 0.2419334948, 0.2618585527, 0.1101136059, 0.0030345656, 0.1769430339, 0.144916296, 0.1025809497, 0.134108305, -0.0417921655, 0.2796096802, -0.5538762808, 0.0183843113, -0.041544687, -0.3055500984, 0.1791529655, 0.2813612223, 0.0639948994, 0.0571323708, -0.4404072464, -0.0674701333, 0.154875949, 0.0214464944, -0.189856559, -0.1347702593, 0.1254250258, -0.3303123415, -0.2333500683, -0.3570847511, 0.3794098794, -0.1839245111, -0.0159744881, -0.0201081336, 0.2072881609, 0.4881540537, 0.2732688189, -0.0220354795, 0.0696335584, 0.7188739181, 0.125900194, -0.0476648957, -0.2302093506, -0.0618916154, -0.4107394218, 0.1571616977, -0.2478826046, 0.2414241284, -0.0675196052, 0.5831837654, 0.0085766539, 0.4599254429, -0.0380412117, -0.2560944557, 0.0078375936, 0.1765659451, -0.3624718189, 0.1571975648, 0.132883057, 0.1275197119, -0.0200873427, 0.1368733048, -0.1184492037, -0.4956019521, 0.2262370884, -0.1183773801, -0.2952267528, 0.1455474645, -0.1058935821, 0.1077496335, 0.0919096097, -0.5134960413, -0.1520470083, 0.3226175904, -0.0144655062, 0.0524428636, 0.0765091181, 0.232627362, -0.1332786083, -0.0963049531, -0.0525509492, -0.2394360602, -0.0427297018, -0.0583460145, -0.0507114381 ]
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.2756031156, -0.0938132703, -0.0165135041, 0.5474310517, 0.0739604756, -0.0815911293, 0.0184084103, 0.1925772578, 0.1801730096, -0.0740145147, -0.0608428642, 0.0229616202, -0.1682558209, 0.0706975237, 0.181284517, -0.0102870008, -0.0982713848, 0.054642655, -0.5839899778, -0.1066126302, -0.2519787848, 0.159753859, -0.1889991909, 0.0316229127, 0.0291604362, -0.1472723484, -0.0056708306, 0.0338853598, -0.4226700366, -0.3919167221, 0.4446611106, 0.1778906584, 0.048665911, 0.278891474, -0.0001182758, -0.2390263677, 0.2288017273, 0.0146836266, -0.3021411896, -0.1883608997, -0.2656501532, -0.5416651964, 0.1796255112, 0.0793970674, 0.1905765831, -0.2577365935, -0.096332252, -0.1201571003, 0.3336129189, 0.154108867, 0.1808846593, 0.4754363894, 0.1862674654, 0.0183084793, 0.1463198662, 0.1829879582, -0.0161831081, 0.0414139926, 0.3683442473, -0.1451099515, 0.3042300344, 0.2626515329, -0.1972893924, 0.3405380845, 0.225459516, 0.0342919342, 0.2514485717, -0.3291010559, -0.0104289157, 0.3739080429, 0.091939196, -0.0189399365, -0.2833078504, -0.3328356445, -0.0607213564, -0.5919565558, 0.0915090367, 0.355445087, -0.3222125471, -0.0712229609, -0.518006742, 0.0008279122, 0.0945127457, 0.3394878507, -0.1083701104, 0.3477390409, 0.0328622051, 0.1435943395, 0.1835632771, -0.3430735469, -0.1032525599, -0.3144376278, 0.2530843318, 0.2212260514, -0.2552488148, 0.0872772411, 0.0101172524, 0.0087076295, 0.0032325834, -0.0976788849, -0.0223418586, 0.1039454266, -0.1386570036, 0.0357801467, 0.1094089448, 0.2143309414, -0.0763303041, -0.0989684612, 0.2642331123, -0.034821637, 0.2747761011, 0.2433939874, 0.1871811002, -0.1478894204, -0.3470748663, 0.0696836188, 0.1543290317, -0.2491891384, -0.3024494052, -0.0835249126, 0.0652421191, -0.2730256319, 0.0408260189, 0.0257638972, -0.2994419038, 0.2130640447, 0.0610917285, 0.1647906005, -0.2455622405, -0.1874852926, -0.1245097741, -0.2107744217, -0.0994957164, 0.115564324, 0.6232808828, 0.0698021874, 0.2070062906, 0.1056844816, -0.14883551, 0.1095467806, -0.0190161802, -0.1189080477, 0.1222633645, 0.2221133262, 0.0451029986, 0.4238989353, -0.1189092398, 0.0161674321, -0.1315836608, -0.1299054623, -0.0583825856, 0.0434741676, 0.2906779051, 0.2067490071, -0.3159322143, -0.0533834063, -0.2992139161, 0.0907552242, -0.115207985, -0.0338811129, -0.1886040419, -0.2438194156, -0.3752390444, -0.2526578307, 0.3767175376, 0.2799049616, -0.1666073501, -0.1649060249, -0.0837727934, 0.0289436392, 0.3123578429, 0.4445020854, -0.2286303043, 0.0464229286, -0.1588803381, -0.0510553494, 0.3584414124, -0.3500111103, -0.1459337622, 0.0142124929, -0.0908053741, 0.2117910385, -0.0302684531, 0.0880925357, 0.2926701605, -0.1595736742, 0.2096137106, 0.4093491435, -0.0834695324, -0.1281996369, -0.2435815632, -0.4912778139, 0.6207734942, 0.0323619023, 0.1447010785, -0.3409757018, -0.0999752879, -0.1594640315, 0.4071718752, 0.1020297706, 0.1387518495, -0.0597010367, -0.0496115908, -0.082574673, -0.0716122985, -0.0022222325, -0.4874590933, 0.3761881888, -0.2441595942, 0.1380985975, 0.0267382152, 0.2019908279, -0.0252640024, -0.1451208889, -0.1093343347, -0.1639741212, 0.0372415408, 0.019969441, 0.0985343158, -0.0397356898, 0.0781113058, 0.0820713639, -0.0402480774, 0.1321011335, -0.2335659415, 0.2222174257, 0.0546633825, -0.0288111959, 0.3562951684, 0.283198297, 0.1775617301, -0.0596047789, -0.0277687535, -0.0303029194, -0.0066433698, 0.4922426641, -0.1041980833, -0.0141535401, 0.3394631445, -0.4042291045, 0.1655754745, 0.2719749212, 0.2212738693, -0.3597030938, 0.0170896668, 0.2387669832, -0.0915700793, 0.3743442893, 0.1100304052, 0.0123182088, 0.0113619268, 0.0139468536, -0.0891541615, -0.0341481119, 0.4079686701, -0.0964391083, 0.022088483, 0.0996986777, -0.030334577, 0.2387859821, 0.2519138753, 0.117897585, 0.0268237535, -0.037024036, -0.1333162785, -0.1370723993, -0.1800833344, 0.2379727364, 0.523208797, 0.1820151508, 0.1907970905, 0.0909060687, 0.0877682418, -0.4019683599, 0.3726391792, 0.2383789122, -0.0019472316, 0.1320956945, 0.0430691317, -0.0163699556, -0.1104834378, 0.4184351861, 0.0917632133, 0.1791217774, -0.2323913276, -0.2492551506, -0.5810909867, -0.4634237587, -0.4940527976, -0.3730904162, -0.3810459077, -0.3317369819, -0.1937679201, -0.0642360449, -0.0816405788, 0.1759490669, 0.1689741611, 0.0007635653, -0.355763346, 0.4598480761, -0.0278813392, -0.0493743531, -0.3101085424, 0.0172247775, 0.4009832442, 0.1410497725, 0.4067271948, 0.0004271343, -0.0131986514, 0.008104274, -0.3204092681, -0.0419830419, -0.0738799423, 0.2629976571, 0.1375837028, 0.2869310081, 0.2675925195, -0.094029054, 0.1489823759, -0.2181366384, -0.0514864437, -0.1704598367, -0.021549765, 0.0187395774, -0.2237061113, -0.4680873454, -0.7113643885, -0.3568280041, 0.166241318, 0.0643551201, 0.0964024141, 0.376337111, -0.2668998539, -0.0048243813, -0.0431200303, 0.1872793138, -0.140570581, 0.1058703959, 0.3484724164, -0.0433362722, -0.446367234, 0.0350137651, 0.1576629877, 0.2508545816, 0.1007581949, -0.4295145273, 0.3669919968, -0.1442826688, -0.1073542684, 0.2240205556, 0.1611539572, 0.14359501, -0.0059770495, -0.0148711801, -0.0385594964, -0.2719136477, -0.0486939624, -0.055932384, 0.2735079825, 0.0550432801, 0.1221247986, 0.0208202973, 0.5913621187, 0.2570457757, -0.0870678723, 0.1685411185, 0.2239547372, 0.0688812509, 0.3214881122, -0.5713627934, 0.0624387525, 0.0149212778, 0.2643274665, 0.2561020255, -0.0245564729, -0.0789706632, -0.3335883617, 0.0456079617, -0.232238397, -0.328550756, -0.0424311981, 0.2228123844, 0.2037611306, 0.3823132217, 0.1332707256, -0.0036637932, -0.3344187438, -0.1921595782, -0.0713423789, -0.0795905441, 0.1410654783, -0.305629313, -0.3055720031, -0.3390578032, 0.1853807867, 0.0123061165, 0.630685389, -0.1004617587, 0.0602534264, 0.0003581569, 0.0535959974, 0.2863095403, -0.0149866361, 0.223822251, -0.0550035015, 0.0418632925, -0.707555294, -0.0788406059, -0.1490831375, -0.1024419963, 0.3979472816, 0.2676809728, -0.3344467282, -0.3497644067, 0.1286880076, 0.469904393, -0.3002049923, -0.0902624279, -0.0001843125, -0.1544870883, -0.125639081, -0.1509198397, -0.278945446, 0.1925428361, -0.3451686502, 0.0452711284, 0.1801139712, 0.0680589229, 0.3399452269, -0.0267140456, 0.0946662277, 0.1880125105, 0.4270002842, 0.3394293487, 0.1034897566, 0.0907356963, 0.3604839742, -0.0748461708, 0.3105948567, -0.107998386, -0.0581996702, 0.2565918863, 0.5723104477, -0.0812102854, 0.2673695982, 0.0279872566, 0.078447178, -0.4492248893, 0.0794501156, 0.3588106036, -0.1368253827, -0.2159991264, -0.2861738205, 0.3259077668, 0.2019691765, -0.1109418124, 0.2802769542, -0.1149721444, -0.3127883077, -0.1978133172, 0.0408777632, 0.9505413175, 0.2387177944, 0.2275003493, -0.0095485812, -0.4000633359, 0.4883538485, 0.4271091223, -0.1436376274, -0.0481957607, 0.3191525638, -0.0039904341, -0.1169137731, 0.0799545795, -0.0163567737, -0.1558755636, 0.5566449761, 0.3277595043, 0.1902882904, 0.0671363175, 0.3798564672, 0.0089373793, -0.3773043454, -0.2538487613, 0.0673444495, -0.3593875468, 0.2783208489, -0.139368251, -0.3252621591, 0.0053057447, -0.2072424442, -0.3205970526, 0.0383541062, -0.4705601633, 0.1999381185, -0.108429864, -0.0484948382, 0.1913114488, -0.0939292312, 0.0233555101, 0.1939816773, -0.3421661556, 0.0471423976, -0.4583493173, 0.235185653, 0.0417988114, 0.0699067712, -0.0019238777, -0.1840399504, -0.1144266129, -0.2535885274, 0.0115254261, 0.3370919824, -0.057581827, 0.0259475559, 0.1794762611, 0.1735762507, -0.0933971182, 0.1255257577, 0.1240272522, -0.1376563311, 0.1038089991, 0.2577848434, -0.0941022858, 0.5929927826, 0.1446928382, -0.0829002857, -0.1528960168, 0.5256068707, 0.0521146841, -0.1466192901, 0.4898708463, 0.5510689616, -0.1143532544, -0.2417032123, -0.0041616261, -0.3494572937, -0.4845702648, -0.0105192699, 0.0329330824, 0.3049017489, 0.0559951439, 0.5251328945, 0.2182420492, -0.2787428498, 0.1570303142, -0.4990167916, -0.1411265135, 0.3006081879, 0.0930178761, 0.0704478696, -0.11381872, 0.0523062795, 0.0783456862, 0.3154845536, -0.2897269428, 0.1905988902, -0.0451220796, 0.1344131678, 0.2483334839, -0.2423755378, 0.1088935137, -0.0465251617, -0.0645427778, -0.1267764866, -0.4485757947, -0.1471535861, -0.2247587591, 0.1452782154, -0.0036857948, -0.4742392898, 0.0590285026, -0.307082653, 0.0487824976, 0.0607669391, -0.1974305212, 0.0964794382, 0.0146518145, 0.1217677742, 0.1369759291, 0.1712831557, 0.0307993665, 0.4250533879, -0.0532615781, 0.2902283967, 0.1436614394, 0.1730930507, 0.2801124752, -0.1230010241, -0.1648171246, -0.1834213436, -0.0149284527, -0.2281157523, 0.2769263387, -0.238316074, -0.0286652818, 0.1843674183, 0.3846009374, 0.5537831783, 0.1585488915, 0.0089076385, -0.0664098859, 0.1120340377, -0.1739786267, 0.0375588909, 0.2010293305, 0.4397955835, -0.1216783002, 0.1304984987, 0.3467437029, -0.2371854037, -0.1927652955, 0.1611760855, 0.4595683813, -0.1366927028, 0.035905771, 0.1399312466, 0.0546211451, -0.0069570243, -0.1403509527, 0.1283728778, 0.0266118497, 0.0465462804, -0.2296461761, 0.4097220302, 0.1429583132, -0.0815552697, 0.1501868367, -0.3475331664, 0.0019551595, 0.3410551548, -0.1524553001, -0.0454497002, 0.1050025225, 0.6036856771, -0.0399989933, -0.3411642611, -0.0343072936, 0.5274826884, 0.1017361805, -0.1091585904, -0.3369093537, -0.2871398628, -0.26513201, 0.0117884874, -0.1132317483, -0.2011545449, 0.1153097302, 0.2378166765, -0.2011552006, -0.6774237752, -0.2983499169, 0.0227557458, -0.1241075993, -0.1449489892, 0.2098421603, 0.4280454814, -0.0640472472, 0.0502663963, 0.5844967365, 0.3379956782, 0.3474575877, -0.2088449299, -0.002725672, 0.1122177392, 0.0115934908, -0.2457559258, 0.3455425501, 0.0748102963, -0.0603162386, 0.3822262585, 0.0945061445, -0.1459355056, -0.2766556442, 0.1253265738, -0.2008283734, -0.1304685026, 0.4320132136, -0.2141466588, 0.0450593755, -0.2039667368, 0.0448369496, -0.3329179883, 0.163792491, 0.5231640935, 0.0549016036, 0.1952825785, -0.3426961601, 0.0593013912, -0.07010144, 0.7746468186, 0.3278968334, 0.1063384414, -0.381043762, -0.243089512, -0.9569470882, -0.2136805952, -0.1736370623, 0.2115758359, -0.0691614076, 0.2186158001, 0.1369339377, 0.2308200151, 0.0730828866, 0.4956242144, 0.0183100253, -0.0512789637, -0.4442254603, 0.0265100636, 0.1034280956, -0.1029869244, -0.0211806409, -0.1284393221, 0.3681436777, -0.5790623426, -0.029316403, -0.3203982413, 0.0675375164, -0.1546668559, 0.5107824802, 0.1049056426, 0.2914255857, 0.4872874022, 0.1722446978, -0.1365396678, -0.2456261069, -0.1868420839, 0.0769092888, 0.2122347653, -0.1695900261, 0.2420995384, -0.1548053622, 0.0563735738, -0.2551071942, -0.0378180817, -0.2682904601, -0.0143332258, -0.0254048742, 0.0842682198, -0.0810288563, 0.0937443599, 0.1031431258, 0.1714035869, -0.1260122359, 0.167750746, -0.3540554047, -0.4014782608, 0.4523611367, -0.2661022544, -0.1909337044, -0.2678642571, 0.2520736754, 0.1884666681, 0.0888340473, -0.5078631043, -0.0687035918, 0.3283725679, -0.2275225669, -0.147304073, 0.2823517621, -0.1936619282, -0.3195128441, -0.0002881587, 0.1741587669, 0.248636812, -0.3690258265, 0.0640237033, -0.0880568549 ]
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.2756031156, -0.0938132703, -0.0165135041, 0.5474310517, 0.0739604756, -0.0815911293, 0.0184084103, 0.1925772578, 0.1801730096, -0.0740145147, -0.0608428642, 0.0229616202, -0.1682558209, 0.0706975237, 0.181284517, -0.0102870008, -0.0982713848, 0.054642655, -0.5839899778, -0.1066126302, -0.2519787848, 0.159753859, -0.1889991909, 0.0316229127, 0.0291604362, -0.1472723484, -0.0056708306, 0.0338853598, -0.4226700366, -0.3919167221, 0.4446611106, 0.1778906584, 0.048665911, 0.278891474, -0.0001182758, -0.2390263677, 0.2288017273, 0.0146836266, -0.3021411896, -0.1883608997, -0.2656501532, -0.5416651964, 0.1796255112, 0.0793970674, 0.1905765831, -0.2577365935, -0.096332252, -0.1201571003, 0.3336129189, 0.154108867, 0.1808846593, 0.4754363894, 0.1862674654, 0.0183084793, 0.1463198662, 0.1829879582, -0.0161831081, 0.0414139926, 0.3683442473, -0.1451099515, 0.3042300344, 0.2626515329, -0.1972893924, 0.3405380845, 0.225459516, 0.0342919342, 0.2514485717, -0.3291010559, -0.0104289157, 0.3739080429, 0.091939196, -0.0189399365, -0.2833078504, -0.3328356445, -0.0607213564, -0.5919565558, 0.0915090367, 0.355445087, -0.3222125471, -0.0712229609, -0.518006742, 0.0008279122, 0.0945127457, 0.3394878507, -0.1083701104, 0.3477390409, 0.0328622051, 0.1435943395, 0.1835632771, -0.3430735469, -0.1032525599, -0.3144376278, 0.2530843318, 0.2212260514, -0.2552488148, 0.0872772411, 0.0101172524, 0.0087076295, 0.0032325834, -0.0976788849, -0.0223418586, 0.1039454266, -0.1386570036, 0.0357801467, 0.1094089448, 0.2143309414, -0.0763303041, -0.0989684612, 0.2642331123, -0.034821637, 0.2747761011, 0.2433939874, 0.1871811002, -0.1478894204, -0.3470748663, 0.0696836188, 0.1543290317, -0.2491891384, -0.3024494052, -0.0835249126, 0.0652421191, -0.2730256319, 0.0408260189, 0.0257638972, -0.2994419038, 0.2130640447, 0.0610917285, 0.1647906005, -0.2455622405, -0.1874852926, -0.1245097741, -0.2107744217, -0.0994957164, 0.115564324, 0.6232808828, 0.0698021874, 0.2070062906, 0.1056844816, -0.14883551, 0.1095467806, -0.0190161802, -0.1189080477, 0.1222633645, 0.2221133262, 0.0451029986, 0.4238989353, -0.1189092398, 0.0161674321, -0.1315836608, -0.1299054623, -0.0583825856, 0.0434741676, 0.2906779051, 0.2067490071, -0.3159322143, -0.0533834063, -0.2992139161, 0.0907552242, -0.115207985, -0.0338811129, -0.1886040419, -0.2438194156, -0.3752390444, -0.2526578307, 0.3767175376, 0.2799049616, -0.1666073501, -0.1649060249, -0.0837727934, 0.0289436392, 0.3123578429, 0.4445020854, -0.2286303043, 0.0464229286, -0.1588803381, -0.0510553494, 0.3584414124, -0.3500111103, -0.1459337622, 0.0142124929, -0.0908053741, 0.2117910385, -0.0302684531, 0.0880925357, 0.2926701605, -0.1595736742, 0.2096137106, 0.4093491435, -0.0834695324, -0.1281996369, -0.2435815632, -0.4912778139, 0.6207734942, 0.0323619023, 0.1447010785, -0.3409757018, -0.0999752879, -0.1594640315, 0.4071718752, 0.1020297706, 0.1387518495, -0.0597010367, -0.0496115908, -0.082574673, -0.0716122985, -0.0022222325, -0.4874590933, 0.3761881888, -0.2441595942, 0.1380985975, 0.0267382152, 0.2019908279, -0.0252640024, -0.1451208889, -0.1093343347, -0.1639741212, 0.0372415408, 0.019969441, 0.0985343158, -0.0397356898, 0.0781113058, 0.0820713639, -0.0402480774, 0.1321011335, -0.2335659415, 0.2222174257, 0.0546633825, -0.0288111959, 0.3562951684, 0.283198297, 0.1775617301, -0.0596047789, -0.0277687535, -0.0303029194, -0.0066433698, 0.4922426641, -0.1041980833, -0.0141535401, 0.3394631445, -0.4042291045, 0.1655754745, 0.2719749212, 0.2212738693, -0.3597030938, 0.0170896668, 0.2387669832, -0.0915700793, 0.3743442893, 0.1100304052, 0.0123182088, 0.0113619268, 0.0139468536, -0.0891541615, -0.0341481119, 0.4079686701, -0.0964391083, 0.022088483, 0.0996986777, -0.030334577, 0.2387859821, 0.2519138753, 0.117897585, 0.0268237535, -0.037024036, -0.1333162785, -0.1370723993, -0.1800833344, 0.2379727364, 0.523208797, 0.1820151508, 0.1907970905, 0.0909060687, 0.0877682418, -0.4019683599, 0.3726391792, 0.2383789122, -0.0019472316, 0.1320956945, 0.0430691317, -0.0163699556, -0.1104834378, 0.4184351861, 0.0917632133, 0.1791217774, -0.2323913276, -0.2492551506, -0.5810909867, -0.4634237587, -0.4940527976, -0.3730904162, -0.3810459077, -0.3317369819, -0.1937679201, -0.0642360449, -0.0816405788, 0.1759490669, 0.1689741611, 0.0007635653, -0.355763346, 0.4598480761, -0.0278813392, -0.0493743531, -0.3101085424, 0.0172247775, 0.4009832442, 0.1410497725, 0.4067271948, 0.0004271343, -0.0131986514, 0.008104274, -0.3204092681, -0.0419830419, -0.0738799423, 0.2629976571, 0.1375837028, 0.2869310081, 0.2675925195, -0.094029054, 0.1489823759, -0.2181366384, -0.0514864437, -0.1704598367, -0.021549765, 0.0187395774, -0.2237061113, -0.4680873454, -0.7113643885, -0.3568280041, 0.166241318, 0.0643551201, 0.0964024141, 0.376337111, -0.2668998539, -0.0048243813, -0.0431200303, 0.1872793138, -0.140570581, 0.1058703959, 0.3484724164, -0.0433362722, -0.446367234, 0.0350137651, 0.1576629877, 0.2508545816, 0.1007581949, -0.4295145273, 0.3669919968, -0.1442826688, -0.1073542684, 0.2240205556, 0.1611539572, 0.14359501, -0.0059770495, -0.0148711801, -0.0385594964, -0.2719136477, -0.0486939624, -0.055932384, 0.2735079825, 0.0550432801, 0.1221247986, 0.0208202973, 0.5913621187, 0.2570457757, -0.0870678723, 0.1685411185, 0.2239547372, 0.0688812509, 0.3214881122, -0.5713627934, 0.0624387525, 0.0149212778, 0.2643274665, 0.2561020255, -0.0245564729, -0.0789706632, -0.3335883617, 0.0456079617, -0.232238397, -0.328550756, -0.0424311981, 0.2228123844, 0.2037611306, 0.3823132217, 0.1332707256, -0.0036637932, -0.3344187438, -0.1921595782, -0.0713423789, -0.0795905441, 0.1410654783, -0.305629313, -0.3055720031, -0.3390578032, 0.1853807867, 0.0123061165, 0.630685389, -0.1004617587, 0.0602534264, 0.0003581569, 0.0535959974, 0.2863095403, -0.0149866361, 0.223822251, -0.0550035015, 0.0418632925, -0.707555294, -0.0788406059, -0.1490831375, -0.1024419963, 0.3979472816, 0.2676809728, -0.3344467282, -0.3497644067, 0.1286880076, 0.469904393, -0.3002049923, -0.0902624279, -0.0001843125, -0.1544870883, -0.125639081, -0.1509198397, -0.278945446, 0.1925428361, -0.3451686502, 0.0452711284, 0.1801139712, 0.0680589229, 0.3399452269, -0.0267140456, 0.0946662277, 0.1880125105, 0.4270002842, 0.3394293487, 0.1034897566, 0.0907356963, 0.3604839742, -0.0748461708, 0.3105948567, -0.107998386, -0.0581996702, 0.2565918863, 0.5723104477, -0.0812102854, 0.2673695982, 0.0279872566, 0.078447178, -0.4492248893, 0.0794501156, 0.3588106036, -0.1368253827, -0.2159991264, -0.2861738205, 0.3259077668, 0.2019691765, -0.1109418124, 0.2802769542, -0.1149721444, -0.3127883077, -0.1978133172, 0.0408777632, 0.9505413175, 0.2387177944, 0.2275003493, -0.0095485812, -0.4000633359, 0.4883538485, 0.4271091223, -0.1436376274, -0.0481957607, 0.3191525638, -0.0039904341, -0.1169137731, 0.0799545795, -0.0163567737, -0.1558755636, 0.5566449761, 0.3277595043, 0.1902882904, 0.0671363175, 0.3798564672, 0.0089373793, -0.3773043454, -0.2538487613, 0.0673444495, -0.3593875468, 0.2783208489, -0.139368251, -0.3252621591, 0.0053057447, -0.2072424442, -0.3205970526, 0.0383541062, -0.4705601633, 0.1999381185, -0.108429864, -0.0484948382, 0.1913114488, -0.0939292312, 0.0233555101, 0.1939816773, -0.3421661556, 0.0471423976, -0.4583493173, 0.235185653, 0.0417988114, 0.0699067712, -0.0019238777, -0.1840399504, -0.1144266129, -0.2535885274, 0.0115254261, 0.3370919824, -0.057581827, 0.0259475559, 0.1794762611, 0.1735762507, -0.0933971182, 0.1255257577, 0.1240272522, -0.1376563311, 0.1038089991, 0.2577848434, -0.0941022858, 0.5929927826, 0.1446928382, -0.0829002857, -0.1528960168, 0.5256068707, 0.0521146841, -0.1466192901, 0.4898708463, 0.5510689616, -0.1143532544, -0.2417032123, -0.0041616261, -0.3494572937, -0.4845702648, -0.0105192699, 0.0329330824, 0.3049017489, 0.0559951439, 0.5251328945, 0.2182420492, -0.2787428498, 0.1570303142, -0.4990167916, -0.1411265135, 0.3006081879, 0.0930178761, 0.0704478696, -0.11381872, 0.0523062795, 0.0783456862, 0.3154845536, -0.2897269428, 0.1905988902, -0.0451220796, 0.1344131678, 0.2483334839, -0.2423755378, 0.1088935137, -0.0465251617, -0.0645427778, -0.1267764866, -0.4485757947, -0.1471535861, -0.2247587591, 0.1452782154, -0.0036857948, -0.4742392898, 0.0590285026, -0.307082653, 0.0487824976, 0.0607669391, -0.1974305212, 0.0964794382, 0.0146518145, 0.1217677742, 0.1369759291, 0.1712831557, 0.0307993665, 0.4250533879, -0.0532615781, 0.2902283967, 0.1436614394, 0.1730930507, 0.2801124752, -0.1230010241, -0.1648171246, -0.1834213436, -0.0149284527, -0.2281157523, 0.2769263387, -0.238316074, -0.0286652818, 0.1843674183, 0.3846009374, 0.5537831783, 0.1585488915, 0.0089076385, -0.0664098859, 0.1120340377, -0.1739786267, 0.0375588909, 0.2010293305, 0.4397955835, -0.1216783002, 0.1304984987, 0.3467437029, -0.2371854037, -0.1927652955, 0.1611760855, 0.4595683813, -0.1366927028, 0.035905771, 0.1399312466, 0.0546211451, -0.0069570243, -0.1403509527, 0.1283728778, 0.0266118497, 0.0465462804, -0.2296461761, 0.4097220302, 0.1429583132, -0.0815552697, 0.1501868367, -0.3475331664, 0.0019551595, 0.3410551548, -0.1524553001, -0.0454497002, 0.1050025225, 0.6036856771, -0.0399989933, -0.3411642611, -0.0343072936, 0.5274826884, 0.1017361805, -0.1091585904, -0.3369093537, -0.2871398628, -0.26513201, 0.0117884874, -0.1132317483, -0.2011545449, 0.1153097302, 0.2378166765, -0.2011552006, -0.6774237752, -0.2983499169, 0.0227557458, -0.1241075993, -0.1449489892, 0.2098421603, 0.4280454814, -0.0640472472, 0.0502663963, 0.5844967365, 0.3379956782, 0.3474575877, -0.2088449299, -0.002725672, 0.1122177392, 0.0115934908, -0.2457559258, 0.3455425501, 0.0748102963, -0.0603162386, 0.3822262585, 0.0945061445, -0.1459355056, -0.2766556442, 0.1253265738, -0.2008283734, -0.1304685026, 0.4320132136, -0.2141466588, 0.0450593755, -0.2039667368, 0.0448369496, -0.3329179883, 0.163792491, 0.5231640935, 0.0549016036, 0.1952825785, -0.3426961601, 0.0593013912, -0.07010144, 0.7746468186, 0.3278968334, 0.1063384414, -0.381043762, -0.243089512, -0.9569470882, -0.2136805952, -0.1736370623, 0.2115758359, -0.0691614076, 0.2186158001, 0.1369339377, 0.2308200151, 0.0730828866, 0.4956242144, 0.0183100253, -0.0512789637, -0.4442254603, 0.0265100636, 0.1034280956, -0.1029869244, -0.0211806409, -0.1284393221, 0.3681436777, -0.5790623426, -0.029316403, -0.3203982413, 0.0675375164, -0.1546668559, 0.5107824802, 0.1049056426, 0.2914255857, 0.4872874022, 0.1722446978, -0.1365396678, -0.2456261069, -0.1868420839, 0.0769092888, 0.2122347653, -0.1695900261, 0.2420995384, -0.1548053622, 0.0563735738, -0.2551071942, -0.0378180817, -0.2682904601, -0.0143332258, -0.0254048742, 0.0842682198, -0.0810288563, 0.0937443599, 0.1031431258, 0.1714035869, -0.1260122359, 0.167750746, -0.3540554047, -0.4014782608, 0.4523611367, -0.2661022544, -0.1909337044, -0.2678642571, 0.2520736754, 0.1884666681, 0.0888340473, -0.5078631043, -0.0687035918, 0.3283725679, -0.2275225669, -0.147304073, 0.2823517621, -0.1936619282, -0.3195128441, -0.0002881587, 0.1741587669, 0.248636812, -0.3690258265, 0.0640237033, -0.0880568549 ]
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.1711833626, 0.2254090309, -0.0682416633, 0.3483979702, -0.1143135577, -0.2559944391, -0.1209408715, 0.2354474068, -0.431749016, 0.1244582236, -0.0878595114, 0.2266251445, 0.323210001, -0.1945853233, -0.0046417844, 0.1363853812, 0.2212242186, 0.3154219985, 0.1631608158, -0.2263965011, -0.1609848738, 0.2912674546, 0.1281988472, -0.0333506726, -0.2382824868, -0.3374488056, -0.2922901213, 0.2494609356, -0.1388572305, -0.4692249894, 0.0219638795, 0.3137596846, -0.0443145335, 0.3362241387, -0.0001108157, -0.295258224, -0.056196969, -0.0524774939, -0.2681580186, -0.0142240152, 0.2646719813, -0.0555805489, 0.3515129685, -0.434683919, -0.3570379615, 0.0960462987, -0.170573622, -0.0543898232, 0.3019437492, 0.1815720201, 0.2007734179, 0.2229603678, -0.1164246798, 0.2234886885, 0.219839558, -0.0061345957, -0.1732553095, 0.1943599284, 0.5178599358, 0.2606927156, -0.0824629664, 0.3769717813, -0.1626885235, -0.1177662462, 0.0906070247, 0.034189567, 0.0038016513, -0.1884815395, 0.1414442509, 0.1694198549, 0.2140863836, -0.160731107, -0.1241178811, -0.1997766495, 0.0149026178, -0.1498397589, 0.3236133456, -0.0014168806, 0.1347048134, 0.0760395899, -0.2752534151, -0.1492269933, -0.0142615363, 0.3484377563, -0.0572864711, 0.3520627022, -0.0388947614, -0.0381911099, -0.1972889602, -0.1449822932, -0.2161724716, 0.1024224758, -0.3670474887, -0.0338463187, -0.0150921158, -0.1852909327, -0.1053257436, 0.3172916174, -0.0513031036, 0.1927743852, 0.1294380128, 0.1439673305, -0.1002325267, -0.0902262777, 0.0809147805, 0.1594156772, 0.1486369371, 0.2822784781, 0.0600124411, 0.0032298714, -0.3305776715, -0.1897462904, 0.0025670715, -0.0278814696, -0.0324557647, 0.0732342601, -0.0350146219, -0.4501479268, 0.2254942805, 0.1886160672, -0.0430539139, 0.2807790935, -0.0074398965, 0.1009574533, -0.0965369269, 0.0122183487, 0.2783245146, 0.103392899, -0.160513103, -0.1804709285, -0.1714457422, -0.0501715653, -0.303201139, 0.092824176, 0.1805253923, 0.048584599, 0.187195003, 0.0892735124, -0.0540958643, 0.0202348083, -0.1291185319, -0.1583364606, 0.2625414431, 0.0551411919, -0.0162989274, 0.2405934036, -0.0453127548, -0.0048087388, -0.134031266, 0.0975831971, -0.3343696892, 0.2123456746, -0.3812575638, 0.1735201478, -0.3609198332, -0.2368100286, -0.0987071618, -0.0088432236, 0.3678665459, -0.3480276465, 0.3336294591, 0.068506211, -0.0781438649, -0.0212080553, -0.1076178551, 0.2046422064, -0.1081341878, -0.1003819853, -0.1654623598, 0.2421965599, 0.4265680313, 0.1452922225, -0.0860860646, 0.0135073196, 0.1440581679, 0.8647389412, 0.1361807287, -0.1356697381, -0.4758002162, 0.300153017, 0.0183857381, 0.0494006872, -0.0647799, -0.1640854776, 0.3293266296, 0.0272321776, -0.1755456775, 0.1206779778, 0.4675887227, 0.1378510594, -0.6367673874, -0.1789666414, 0.3183291256, 0.080049783, -0.0470183603, -0.0316242613, 0.1690012813, 0.0419172347, 0.018509388, -0.2328215539, 0.2899689078, 0.4480450749, 0.2772974372, 0.3473075926, 0.1860030442, -0.0661411062, 0.1470700353, -0.0265918188, -0.6945602298, 0.5669015646, -0.2257548571, -0.3093990684, 0.0004436299, -0.3298883438, -0.0985441729, 0.0407629386, 0.2374935597, 0.2225190997, -0.0592685342, 0.3315541148, 0.1590388566, -0.0570659637, 0.1234897673, 0.2014554739, -0.2365745455, 0.1906154454, -0.1024697125, -0.3099567294, -0.0879074112, 0.405885756, 0.4630973041, -0.0385711528, -0.2972507179, 0.606234014, -0.3367238045, 0.2219976336, -0.2077527344, 0.1725818217, 0.3421445787, 0.0432180539, 0.1004516557, 0.6402649283, 0.2788159251, -0.0066328347, 0.1500733197, 0.5099730492, 0.322512567, -0.0841199905, 0.0058408305, -0.0700925663, 0.1578994691, -0.3809228539, 0.2004099786, -0.1249167398, 0.2203353643, -0.0428412817, 0.1233299822, 0.3034805954, -0.2406615913, 0.2080426812, 0.4111534059, -0.0495025553, 0.1402169466, 0.1452306658, -0.2254826427, -0.3757794201, 0.0967603624, 0.0503884479, 0.1027323306, 0.1209972128, -0.0806206763, -0.0165554304, 0.3039055169, -0.354249239, 0.2387604862, 0.111250028, -0.2931634188, 0.0804682374, 0.2978737652, 0.343116641, -0.3636701703, 0.0125111192, -0.0580731258, 0.1891939342, -0.1028233469, 0.2186206728, -0.3165397048, -0.7242127657, 0.0452749953, 0.0116354302, -0.1649994552, -0.2254278362, 0.3410966396, -0.0040560383, -0.1461437494, 0.0730765834, 0.223515451, 0.3386721015, -0.3230759799, -0.1607565284, -0.2665174007, -0.3520278335, -0.7646335363, 0.156343326, 0.1334808171, 0.0910890847, -0.0997746512, -0.2050938904, 0.0495028049, -0.2066181004, -0.2803928852, 0.0593725778, -0.1930374503, -0.1592743397, 0.0604399592, -0.0513254441, -0.3704753816, -0.3063611388, -0.06965819, -0.2150732577, -0.12194556, 0.2372479439, -0.2543058395, -0.4921061993, -0.4656763971, -0.4422767758, -0.0322482735, -0.1254856437, 0.2829436362, 0.1891655773, 0.0109013887, 0.3011924028, -0.3569279313, 0.0509783737, 0.1335719675, 0.3939692974, -0.2407732308, -0.4349054098, 0.3319369256, -0.04158815, -0.3880459964, -0.0198516101, 0.1343090236, 0.0125374105, -0.0809675902, -0.4142768085, 0.2543452084, -0.274635762, 0.089975968, 0.0099536255, -0.0172470529, 0.3932928145, 0.056142658, -0.2075251192, -0.0990405306, -0.0020561814, 0.2808197439, 0.305359602, 0.3586887121, -0.3069498539, -0.1700127125, 0.0090945214, -0.0627478212, -0.1406327337, -0.1806912273, 0.4801082015, -0.1187060028, 0.2573769689, -0.1555954069, -0.0260782838, 0.1532070041, -0.1746578962, -0.0243707299, 0.7594630122, 0.0098680444, -0.3053727448, -0.0623555332, -0.4967702031, -0.6557120681, -0.505451858, -0.0710997358, -0.147211656, 0.1028706282, 0.0756940022, -0.0286354125, 0.065507777, -0.5048428178, 0.0048910379, 0.1783990413, -0.0184362866, -0.0303234085, -0.4487183392, 0.2572935224, -0.3311730027, 0.3807836473, -0.0455915257, 0.0179858059, -0.1406439543, 0.1126987785, 0.2615391612, -0.1235289872, 0.1620298922, 0.0080638211, 0.0107141007, 0.1937715858, -0.1526545286, -0.0026585162, -0.0676654205, -0.1539686322, 0.1622390747, 0.3666578829, 0.2105141729, -0.3340780437, -0.0206136536, -0.3664177656, 0.1761316359, -0.1587233245, 0.3018681109, -0.025989525, -0.0875352621, -0.3132631183, 0.0464814045, 0.1347439587, 0.5419647098, 0.1058678925, -0.0064762905, 0.0495660752, 0.1654447615, 0.2462300211, 0.2353475839, 0.5685105324, -0.2812578678, -0.1022605449, -0.0955820829, 0.1699772179, 0.0980624482, 0.3154862523, 0.0730680823, -0.0071162842, -0.0959683284, -0.3180463016, -0.1072638184, 0.3794510365, 0.0490492731, 0.3208691776, 0.1861806959, -0.0182293691, 0.0914765447, 0.1371529102, -0.060261406, -0.0930709764, -0.0335599929, 0.0151791871, 0.1516722292, 0.0272315815, -0.0395202413, -0.0180926472, 0.1867926717, -0.5031012893, 0.6204190254, -0.0008975789, 1.2612764835, 0.1932477057, 0.2816489041, 0.0721576959, 0.0877822861, 0.2446507663, -0.5147624016, -0.1171676666, -0.2032098174, 0.2356709391, -0.0472664125, 0.4142565727, -0.0621233061, 0.0443157665, -0.3159233928, 0.1781922579, -0.187299639, 0.1955238134, -0.0353265665, -0.0026300177, 0.1325235814, -0.3006356955, 0.0733422637, 0.1304015666, -0.1342477649, 0.0691554323, 0.028746549, -0.3014600575, -0.3858850598, -0.1688601375, -0.3367708921, 0.1540471315, -0.0842107534, -0.0487999916, 0.2964712381, -0.025512822, -0.0934050679, 0.2621546984, 0.4480493367, 0.3557027578, -0.3563840985, 0.241006285, 0.0586013459, 0.0303221904, 0.1675302833, 0.2808727026, 0.2103385031, -0.1832423806, 0.0490227938, -0.2144333422, -0.1476320326, -0.1443907619, -0.1899319887, -0.0150395334, 0.0474708006, -0.3482375145, -0.1098542064, 0.1363227367, -0.3647047877, -0.3153708875, 0.1473480463, -0.1926613003, -0.1967437267, -0.0320670456, 0.0646406412, -0.2907952964, -0.1841214299, 0.3845704496, 0.1932660937, -0.077636756, 0.3896774948, -0.0795747116, -0.1772791743, -0.3628855348, -0.0967234299, 0.367847383, -0.5188489556, 0.2787391543, -0.0351925194, -0.2901853323, 0.2774507403, 0.7058494091, 0.0832639337, 0.3054117858, -0.1391421854, -0.3576370478, 0.065056622, 0.08162117, 0.0107036531, 0.1169683412, 0.3884271681, 0.4844399691, -0.0018328503, -0.2269230187, -0.3512561023, 0.2829187214, -0.3311581016, 0.2968038321, -0.1983089745, -0.0599053726, -0.1090957746, -0.1000983566, 0.0295820683, 0.2926210165, 0.073940374, -0.2269210219, -0.3539004326, 0.1085512042, 0.2140667737, 0.0486709252, -0.0785530731, 0.0373879001, 0.0986024663, -0.1802544594, -0.0454194769, -0.0931107327, 0.0363426544, 0.4058868289, 0.1728233695, 0.1893001497, -0.4371958971, -0.0833617896, -0.1115266085, -0.0858325213, -0.1863230467, 0.057438422, -0.1623050719, -0.1390864998, 0.0167731605, 0.0274891909, 0.0644906163, 0.3385528326, 0.2382496297, 0.1366108507, 0.0127723962, 0.2071966827, 0.1874642074, 0.2976186574, -0.0923383683, -0.3938640058, 0.2880007327, 0.2218122929, -0.1930510253, -0.3196572065, -0.0593454018, -0.3006491363, -0.0258533135, -0.0057219565, 0.5143336058, -0.284070164, 0.0530099012, 0.0542981401, 0.3861448169, -0.0326832198, 0.2601008713, 0.3640581369, -0.0215335637, 0.0841229856, 0.1158100143, -0.0529191792, -0.2634904683, 0.4093242288, 0.0434784889, 0.4805605412, 0.4735277891, 0.2181147635, 0.009259332, 0.1857920289, 0.3121904135, 0.0123445615, 0.2001438737, 0.3483907282, 0.0653689206, 0.1877524406, -0.0765118748, -0.4006657302, -0.0514734536, 0.1714372635, -0.4195895195, 0.0145128928, -0.2791685462, -0.0921412408, -0.156306386, -0.137453258, -0.2533431947, 0.131072104, 0.0345610604, -0.0306949206, -0.0264238305, -0.3715111613, -0.1213361323, -0.2162149549, 0.2671530545, -0.2426278442, 0.4080798328, 0.1121297702, -0.0916346163, 0.0142586157, 0.187501058, 0.2888582945, 0.2417788208, -0.0892018974, -0.0316662937, -0.0248270482, -0.1028052717, 0.160505265, 0.2988032103, 0.2712017596, 0.0629229546, -0.0137730464, 0.0430956483, -0.1788430363, 0.2997131348, -0.1341918856, 0.1837209463, 0.1572057158, 0.1254208386, 0.1399512291, -0.2528882027, -0.2671347558, -0.2466678917, -0.3726025522, 0.0224104822, 0.0989459753, 0.0139140151, 0.1304582953, -0.218296051, 0.1071203649, 0.1318562031, 0.6128302217, 0.3352700472, -0.1319619119, -0.1983516216, -0.2101866007, -0.3865150213, 0.248606652, 0.1450933665, -0.2164657712, -0.0558159128, -0.1605851054, 0.0225555133, -0.0882061869, -0.328633368, 0.2831571698, -0.147636503, -0.2638456821, -0.4621171355, 0.319275856, 0.1612542421, -0.1303878874, -0.0027052015, -0.0093031898, 0.1570311487, -0.0393293649, 0.081850484, -0.0957189724, -0.5678963065, -0.0521935374, 0.2463182509, 0.1098828018, 0.3386010826, 0.0294409897, -0.2972242236, 0.1576795578, 0.0301025305, -0.2671938241, -0.089721486, 0.0611119866, 0.2313504517, 0.2754618824, 0.0742691532, 0.3054201007, -0.1224621385, 0.105814822, 0.1703938097, 0.2043979764, -0.276597023, -0.0157869868, -0.0840037763, -0.0624205619, 0.1036126018, 0.5216320753, 0.0051866081, -0.0991420895, -0.3813598752, -0.501767993, 0.4677010775, -0.4028333724, -0.2314208746, -0.0074705705, 0.1788390577, 0.5742584467, -0.0790822208, -0.6015177965, -0.086102061, 0.2420420051, -0.0026651183, -0.4625403285, 0.2797017694, -0.0554509982, -0.0989714116, -0.014088735, 0.3603191972, 0.4206548035, -0.0952747092, 0.1268050671, -0.2433048487 ]
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.0502680615, 0.3206239939, -0.0320778675, 0.2856236398, -0.1109393612, -0.3141341805, 0.0659821033, 0.2292077541, -0.3773547411, 0.1320856661, -0.1504070312, 0.3783099949, 0.2091659456, -0.0847189426, -0.0539452732, 0.0576009676, 0.1612681448, 0.1827615201, 0.199527055, -0.0846719146, -0.1270086765, 0.3466220498, 0.096865423, 0.0985277891, -0.2559475601, -0.3039922416, -0.1721380502, 0.2106490284, -0.1130995899, -0.2921231389, -0.051474072, 0.2297892421, -0.0205983222, 0.3393048942, -0.0001025469, -0.2117824554, -0.0415512659, 0.0248816758, -0.245997712, -0.0421914756, 0.3318285346, -0.0583666675, 0.3199639618, -0.3479758203, -0.3073747754, 0.006019406, -0.1507443488, 0.0970788896, 0.2878762782, 0.2866073251, 0.2562167645, 0.1728059947, -0.1479439288, 0.2911146581, 0.2293521464, -0.2285568118, -0.17920506, 0.1154581383, 0.3404253721, 0.1576983929, -0.147993356, 0.3168501854, -0.1120616868, -0.0993604138, 0.0107639153, 0.0866039395, -0.0468526818, -0.1749298573, 0.1741346121, 0.1410864592, 0.2253866643, -0.2929342687, -0.1760389507, -0.2555309534, 0.0676854104, -0.062708348, 0.3575008512, 0.1597670764, 0.1797012985, 0.0991524756, -0.307647109, -0.1184087694, 0.0067067966, 0.1861814857, -0.1890387535, 0.3517370224, -0.0275464058, -0.052156955, -0.0401721559, -0.1671879739, -0.2302845418, 0.0457764789, -0.2839513421, 0.0290545113, -0.0194797665, -0.2148326933, -0.0329767987, 0.2633592784, 0.0583548099, 0.2064031959, 0.1382037401, 0.2117531449, -0.1937953234, 0.0104678972, 0.1419470012, 0.2237099558, 0.0722244233, 0.1600138992, 0.111171335, 0.0893621147, -0.2414985448, -0.0320881158, -0.0146005675, -0.023748856, 0.0396705568, 0.07287319, -0.0326367468, -0.3373935223, 0.0546513498, 0.1993585229, -0.2055113316, 0.3033294976, -0.041661974, 0.165854156, -0.054980047, -0.0120553374, 0.2828993201, 0.0206977315, -0.1756388545, -0.1595059633, -0.1973602474, 0.0380615257, -0.3233499825, 0.1083542109, 0.2031530887, 0.0035495218, 0.1434018165, 0.0539376549, -0.1815324426, -0.043326579, 0.0052209273, -0.1907518804, 0.1267913133, -0.0700533912, 0.0332466587, 0.160268575, -0.0991468728, -0.1501461864, -0.2041981816, 0.0204512849, -0.305662781, 0.1298172474, -0.3631924093, 0.2384643257, -0.3120623231, -0.2469172329, -0.0951269269, 0.1402455717, 0.2168127298, -0.2126639932, 0.2082401663, 0.0645192936, -0.1796922088, -0.0139368102, -0.0532154515, 0.2223670036, -0.1891808212, -0.1539739668, -0.0387750417, 0.0368668288, 0.219296366, 0.2044966519, -0.1398218572, 0.1316276938, 0.0368635505, 0.7144049406, 0.0238874853, -0.1102681607, -0.6006366014, 0.2778588235, -0.1638278812, 0.0712632537, -0.1691999733, -0.228003487, 0.1500808299, 0.1093696505, 0.0111976452, 0.3238182664, 0.4763902724, 0.1905882359, -0.5679764748, -0.2778164744, 0.2300936282, 0.0829986632, -0.1315532923, -0.0157732964, 0.1510695368, -0.0035499185, 0.0716413856, -0.1447984874, 0.2080220282, 0.4561254978, 0.1945450008, 0.2754326761, 0.1379223764, -0.1083595604, -0.0035323612, -0.0280955285, -0.6072432399, 0.5558737516, -0.2705798149, -0.3538451195, -0.0436139144, -0.3035728633, -0.0848916322, -0.0426058806, 0.3206098676, 0.2068598717, -0.0636000931, 0.3263260722, 0.1955289692, -0.0546720102, 0.0610972568, 0.0985156372, -0.4020549357, 0.0388386101, -0.1572951972, -0.2416641563, -0.0188540518, 0.2859683633, 0.2576764226, 0.0964295417, -0.1627966911, 0.5122169256, -0.4067945778, 0.3954561651, -0.1029735804, 0.2249746323, 0.2453070283, 0.0368539542, 0.1425613314, 0.5524885058, 0.2463423908, -0.0202526301, -0.0108898673, 0.5778495073, 0.3246230483, -0.0902367532, 0.0885415822, -0.1160364151, 0.184551999, -0.3483374417, 0.0513697416, -0.1625525355, 0.1203029156, 0.2504858077, 0.1890165061, 0.1793300807, -0.2093158066, 0.3624857664, 0.440410912, -0.0698242858, 0.145410955, 0.1719343364, -0.3168791533, -0.2977501154, 0.0184555221, 0.1694019884, 0.0166360959, 0.1354275793, 0.0464461781, 0.0763095841, 0.111847505, -0.2814233601, 0.2418964058, 0.081367597, -0.2202342302, 0.1963637173, 0.3998714089, 0.182535708, -0.4641732275, -0.0631450564, -0.0252162181, 0.1623709798, -0.17166996, 0.3289465308, -0.3300447464, -0.6390394568, -0.1327871978, 0.0547672063, -0.1161166281, -0.1989357173, 0.2469795644, 0.2347543389, -0.1379941851, 0.0465456322, 0.3245831132, 0.3713595867, -0.2469569445, -0.1417903304, -0.2285063565, -0.3313558996, -0.6871266961, 0.1878605485, 0.1113765165, 0.086114116, 0.0377116874, -0.1410930455, 0.0160117745, -0.359277457, -0.3051673174, 0.0756577924, -0.2178705484, 0.0663702115, 0.062879622, -0.0984491631, -0.3571200371, -0.2685876489, -0.0248328, -0.1988769174, -0.16792202, 0.0876093879, -0.2111873627, -0.2750481665, -0.388893187, -0.4716975391, -0.0215843283, -0.1205595583, 0.3580133915, 0.2281887531, 0.0478282347, 0.290240705, -0.2424390614, 0.1059380472, 0.3240026236, 0.3039755225, -0.3152661324, -0.3232300282, 0.3678921163, -0.0866242945, -0.4257175922, -0.0392810702, 0.0964044183, -0.0240299664, -0.0096904077, -0.3700834215, 0.1711198539, -0.2685029805, 0.0882917494, 0.0754073411, -0.0319825858, 0.3750686944, 0.1537847668, -0.2389877141, -0.0523224398, -0.1377880573, 0.2527931035, 0.2869013846, 0.3607079983, -0.2157280296, -0.0460316055, 0.0932903737, 0.1086273193, -0.2304871827, -0.1206874847, 0.3998343945, -0.1271841079, 0.1041408926, -0.1783697754, 0.0119412169, 0.0047449172, -0.2672376037, -0.0580006801, 0.7442839146, -0.0562027246, -0.381923914, -0.0194864273, -0.4110417366, -0.6470890641, -0.4519210458, -0.0588594526, -0.1319074929, 0.0151592717, 0.0825076997, 0.0060696453, 0.1075699478, -0.4360055029, 0.0010977313, 0.0672481284, -0.070057109, 0.0234593041, -0.2529757023, 0.2467832714, -0.4832000136, 0.2708824277, -0.0280912835, 0.0848309621, 0.0159988776, 0.0260650665, 0.265909791, -0.330640614, 0.1358571947, 0.0492853895, 0.0616588071, 0.2379518151, -0.2220129371, 0.0675272644, -0.0936082527, -0.2850677073, 0.0268586427, 0.3058532476, 0.2077635378, -0.4310357571, -0.0104457252, -0.2550186515, 0.1295177788, -0.2020733356, 0.3922215402, -0.055908937, -0.2724836469, -0.4281615019, 0.088596195, 0.0837262496, 0.5127235055, 0.0020352863, 0.0375510678, 0.0914575607, 0.0699013323, 0.2828254998, 0.2051467746, 0.5005568266, -0.3195249736, -0.0289347917, -0.0867305398, 0.2290775627, 0.1046169028, 0.3962086439, 0.1842534542, 0.0687595233, -0.0918967277, -0.249707669, -0.103445217, 0.4508928657, 0.0933599845, 0.2989099324, 0.1022299826, -0.050425645, 0.0568540394, 0.093695797, -0.0392990112, -0.0523020327, -0.0866834223, -0.0688021928, 0.2607879639, 0.0625126511, -0.1282546818, 0.0160364136, 0.1689432859, -0.5297275782, 0.6358751655, 0.0817723423, 1.2664067745, 0.1259849221, 0.2774367034, 0.1221762374, 0.1035665646, 0.2423628122, -0.454850316, 0.0130381323, -0.3154566884, 0.1917824745, -0.0502260812, 0.3567127585, -0.1773018092, 0.1891020238, -0.2983832955, 0.1576023549, -0.1464832723, 0.095473215, 0.1002282277, 0.2019842863, 0.0555559993, -0.2359241396, 0.0622629784, 0.2006783783, -0.1212723255, 0.0999661386, -0.0230810177, -0.2644632161, -0.2481752932, -0.1299498081, -0.3037828803, 0.2492028922, -0.1399765611, 0.0072496496, 0.1680198908, -0.1097237617, -0.1510287523, 0.2088519186, 0.3138301373, 0.2617882192, -0.3833236694, 0.3085213602, 0.0770519674, -0.1476070285, 0.2204045951, 0.1608799398, 0.3945516944, -0.1488296241, -0.0294078588, -0.2354104519, 0.0630311817, -0.234452039, -0.1290115416, -0.0519684665, -0.0692104027, -0.2831620574, -0.1294769198, 0.1722298563, -0.3984484673, -0.2890191972, 0.1957061142, -0.2353201509, -0.1418457031, -0.143052265, 0.0883563533, -0.3133045435, -0.1746404022, 0.4973694682, 0.2756562829, -0.0691619664, 0.4139431715, 0.0083500817, -0.1509476602, -0.3615686893, -0.2265958786, 0.2644397616, -0.2990570068, 0.1890539825, -0.1237005442, -0.3279194236, 0.2532062829, 0.6107338071, -0.0646061376, 0.3288614452, -0.1273344755, -0.3482036591, -0.038899228, 0.0796699002, -0.0323107988, 0.1915734708, 0.3719385266, 0.3681498766, -0.0934033766, -0.1438859403, -0.4209376574, 0.2488287389, -0.3923134208, 0.2334461063, -0.1301628798, -0.0854212716, -0.041408699, 0.0143727586, 0.100448072, 0.3575177789, 0.0731340647, -0.3187495768, -0.2988663316, 0.0751722604, 0.1684572101, -0.0097894259, -0.1823963523, 0.065627791, 0.0205030516, -0.1436794847, 0.1260128617, 0.0330821574, 0.1086090356, 0.3633996546, 0.107402496, 0.2064942718, -0.2905068398, -0.2369409353, -0.0867216587, 0.0155249462, -0.1578539014, 0.1750104427, -0.1986193806, -0.0538296029, -0.1889481843, 0.0618186817, 0.1741077751, 0.5176964998, 0.264868319, 0.1763466299, -0.0339085162, 0.0222540386, 0.1865948141, 0.2837535143, -0.2215486169, -0.4664622545, 0.3147236705, 0.2928297222, -0.1725577116, -0.2323795557, -0.0907031298, -0.5723102093, -0.0013674051, 0.0893002823, 0.4483963847, -0.0740141571, -0.016207967, 0.0517584048, 0.4621600211, -0.1148691028, 0.0219644047, 0.3347056806, -0.0468410663, 0.0239962414, 0.2213386446, 0.0655297041, -0.0683630928, 0.4197321236, 0.0771017075, 0.3663988709, 0.4050021768, 0.2621219158, -0.0193112008, 0.1859979779, 0.2309221476, 0.0941107795, 0.2074232697, 0.300111711, 0.0419666208, 0.1585607529, -0.2035880536, -0.2547902465, -0.0800385475, 0.3237066865, -0.3548712134, -0.1016117781, -0.2776466608, -0.2172572911, -0.2227423191, 0.0889215469, -0.1791999936, 0.123781532, -0.0473922975, -0.0068241917, -0.0887008607, -0.3339599371, -0.096810028, -0.2567664683, 0.3450836539, -0.3081303835, 0.3353686631, -0.0239986181, -0.0117400661, 0.0344984718, 0.2444019914, 0.2280302346, 0.1660612822, -0.2368106097, 0.0084660463, -0.2022774965, -0.069995895, 0.0739983991, 0.3090718091, 0.2560390532, -0.0349523686, 0.1519610882, 0.1186424047, -0.2021939158, 0.1569800079, -0.0205569416, 0.0906976163, 0.0912730545, -0.0068206601, 0.0685006529, -0.1779574603, -0.2704573274, -0.2943280041, -0.2106184661, -0.1027148888, 0.1102605164, 0.0450012013, 0.2079069763, -0.2224058807, 0.1511449218, 0.2386325449, 0.59894526, 0.3897715509, 0.0290976837, -0.1135459989, -0.1662545949, -0.4377085567, 0.2282619327, 0.1493014693, -0.2425402105, -0.0323456787, 0.0235694498, -0.0043583922, -0.0257837772, -0.4523442984, 0.3621738851, -0.1675102264, -0.1839089543, -0.342453897, 0.3002201021, 0.1295797825, -0.1052911729, -0.0413142033, -0.1630314291, 0.0921320617, -0.0677631423, 0.1662811339, -0.1584759653, -0.4944360256, -0.0925905257, 0.2201496065, 0.1942612976, 0.3134513497, -0.0123510472, -0.3465574384, 0.0573732927, -0.0488119759, -0.0741133019, -0.2141722143, 0.0072928052, 0.1437650323, 0.2346389741, 0.2637172639, 0.3825130463, -0.1025283486, 0.2364629954, 0.1843267679, 0.1577816159, -0.3397213221, -0.0682813674, -0.0784965679, -0.001087673, -0.0723825321, 0.6917637587, 0.0642039627, 0.077644743, -0.3717280626, -0.422644347, 0.4227738678, -0.3316354156, -0.2500545382, 0.1223131716, 0.1393048912, 0.4561156631, -0.0476740114, -0.637876153, -0.0586777851, 0.1106197387, -0.0203516576, -0.6066349745, 0.219005391, -0.000871107, -0.0870744064, -0.1062998846, 0.2862390578, 0.4174632728, 0.0130850449, -0.0244562998, -0.1725818962 ]
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.0604028702, 0.2112900913, 0.004969433, 0.4674901962, -0.1865661442, -0.364266336, 0.0308459755, 0.2487035841, -0.485806644, 0.1431299746, -0.1751268506, 0.4655148983, 0.1896488219, -0.1176308542, -0.1269880235, 0.2603911757, 0.0707708448, 0.208019346, 0.0444151163, -0.1715229452, -0.0605967976, 0.3185586631, 0.0735047162, -0.0343129002, -0.3340621293, -0.2613657415, -0.1723051667, 0.2871145606, -0.1565574706, -0.3885436356, 0.0394662172, 0.2147518694, -0.0296007134, 0.3092274666, -0.0001112136, -0.1212927774, 0.0267075859, -0.1100272313, -0.1816278398, -0.0909242928, 0.1232389137, -0.0185540579, 0.3582621515, -0.5265984535, -0.2822774053, 0.2261688262, -0.1437604874, 0.1404649764, 0.2870265543, 0.4154453278, 0.1870609224, 0.2642737925, -0.1532087922, 0.1688100398, 0.3264145851, -0.0386350453, -0.2777248323, 0.0013337992, 0.386443764, 0.3084564209, -0.166281119, 0.2464140505, -0.1460222453, 0.0169745348, 0.1081545651, -0.0495125875, 0.1588053852, -0.2349084169, 0.2553262115, 0.3478804231, 0.2573387325, -0.0386259854, 0.0085572116, -0.2316285819, -0.1399814337, 0.2030917108, 0.2722402513, 0.1278521121, 0.082115978, 0.1513771266, -0.1062145531, -0.0710782856, -0.0499278978, 0.1270302236, -0.1186061427, 0.3517424166, 0.0026368052, -0.0285527483, -0.0115613285, 0.006697705, -0.1764366031, 0.0958931372, -0.3348131776, 0.0043225512, -0.004484728, -0.232317239, 0.0973936319, 0.2527464032, -0.0452655777, 0.4082652628, 0.3445387185, 0.2949660718, -0.1966411471, 0.0793917179, 0.0403272286, 0.1573099047, 0.0555432923, 0.2430896759, 0.1665280759, 0.0107503161, -0.3805955052, -0.0743014738, 0.0317923762, 0.0189557374, 0.0036561489, 0.0611769594, 0.0374832228, -0.4832128882, 0.1632656902, 0.1853303909, -0.2136847079, 0.1784507334, 0.056447003, 0.0898108557, -0.0515365638, 0.0880345926, 0.0918421447, -0.0330606364, -0.0517973453, -0.1990093291, -0.1495577097, -0.1054222733, -0.3613605797, 0.0929124355, 0.2237262577, 0.0348401368, 0.1418287754, -0.0173507631, -0.1725221872, 0.021643497, 0.0202192739, -0.270673722, 0.4571627676, -0.0256432071, -0.1910113394, 0.0324011892, 0.0236856211, -0.1179532036, -0.3031066656, -0.024607081, -0.3003565371, 0.1305872798, -0.2167599052, 0.1804511398, -0.3390058875, -0.1201602444, 0.0040066056, 0.2269220501, 0.1144159213, -0.1300052106, 0.2640652657, -0.0077674249, -0.1130756885, -0.0804780126, -0.1571692675, 0.2868358493, -0.2910616994, -0.132433489, -0.072908625, -0.0038546566, 0.292270869, 0.1737481356, -0.0803822055, 0.0385201126, 0.0571065769, 0.8963903189, -0.0338546634, -0.047475718, -0.5306516886, 0.2030207366, -0.0835101977, 0.1309683323, 0.0783682391, -0.1008264422, 0.2333672792, -0.0387081429, -0.1269484311, 0.1347052306, 0.5446133614, -0.0159930475, -0.5618399382, -0.2940210998, 0.2203255594, 0.052337192, 0.0198001713, 0.1336616725, 0.2531478107, -0.0214610286, 0.0830841511, -0.2307127118, 0.1561269462, 0.3136551678, 0.3593851924, 0.4066241086, 0.2494666278, -0.126272127, 0.170929119, 0.0855901018, -0.7975932956, 0.4854716659, -0.1100426316, -0.2766060829, 0.0316401348, -0.2976916432, -0.1390501261, -0.030880345, 0.2581128776, 0.2348936349, 0.0465358496, 0.43428123, 0.1588794738, 0.0390873849, 0.186807543, 0.0412402526, -0.4006344974, 0.144703567, -0.1005988568, -0.2781329453, -0.0628805459, 0.3709408343, 0.2360567302, 0.0312167704, -0.0716288984, 0.2890594602, -0.3318714499, 0.112454772, -0.2324203849, 0.1594911963, 0.114144817, 0.0137152299, -0.0172760747, 0.6242738962, 0.2798284888, -0.1008122638, 0.3238973916, 0.4158966243, 0.3776710629, 0.0362376347, -0.0003744215, -0.170201242, 0.1261229217, -0.3321751654, 0.0453587919, -0.2139387429, 0.2807055116, 0.1363818049, 0.2800712883, 0.1733034998, -0.210344851, 0.2834630609, 0.3500042558, -0.0286060274, 0.1028477997, 0.2167858481, -0.2407601476, -0.2014991492, 0.0918724462, 0.1266492307, 0.1089740917, 0.0998077691, 0.0215668827, 0.0722226724, 0.0722118616, -0.3865078986, 0.1687374413, 0.2188984603, -0.2239873409, 0.1296431869, 0.3718088567, 0.1892755032, -0.4481158853, -0.2308840752, -0.1116982549, 0.0805017874, 0.027371265, 0.2684748471, -0.5430809259, -0.6649032831, 0.0325671509, 0.0656293631, -0.0501055606, -0.2324710041, 0.2761965692, 0.1472477615, -0.187577039, -0.2033768892, 0.2906609774, 0.388358891, -0.2766057849, -0.0873171166, -0.4001848102, -0.4707963765, -0.6657467484, 0.1560484171, 0.1820806861, -0.0244103502, -0.0165223368, -0.1729425639, 0.0603351146, -0.1272503138, -0.2706118226, 0.0668478161, -0.0042664828, -0.0731111243, 0.0747508854, -0.1444065273, -0.402959913, -0.2654489279, -0.0277517643, -0.1547915041, -0.230702132, 0.2833872437, -0.2646172643, -0.3121789694, -0.3437872231, -0.452224791, -0.1565516591, -0.1983983517, 0.5167420506, 0.3702402115, 0.0481464639, 0.4064435959, -0.348472327, 0.1662015766, -0.0078288503, 0.4200562835, -0.2951853275, -0.2476709932, 0.4494699836, -0.096607998, -0.4395463169, -0.0071630478, 0.094720602, 0.1041149348, -0.0838211477, -0.4395298064, 0.2352149934, -0.4147755802, 0.2214821428, 0.0919787064, -0.0054009557, 0.4141241312, 0.1176137924, -0.1854997724, -0.0184926838, 0.0200536177, 0.3892365992, 0.2683614492, 0.1220119298, -0.1243886054, -0.1852475107, 0.2529532313, -0.0080479011, -0.1544073522, -0.0834846571, 0.5354868174, -0.0166317783, 0.1233314723, -0.2894324064, 0.0808497146, 0.0365824476, -0.3634640872, -0.0181332529, 0.6952670813, -0.0387203097, -0.4206861258, -0.1525162756, -0.362670064, -0.3947038651, -0.5091344118, -0.0947224796, -0.0894459933, -0.1103577763, 0.1220050305, 0.1227146834, 0.1484936774, -0.374881953, -0.0294183008, 0.029114116, -0.057442937, 0.1015719473, -0.2822042108, 0.1459386647, -0.5896183848, 0.2196619958, -0.1175747961, -0.056812413, -0.1042478085, -0.0132989734, 0.2554576993, -0.1549901366, 0.0596975498, 0.0823834166, 0.1571887136, 0.353169024, -0.4536797106, 0.0466435552, -0.1597649753, -0.3209369481, 0.0148512982, 0.2243998647, 0.1983936876, -0.4008466303, 0.2173608243, -0.4708300531, 0.2582642436, -0.1026697755, 0.3557086289, -0.0527282991, -0.184411943, -0.4908762574, 0.0296217371, 0.1442099363, 0.4182723165, 0.0507550463, 0.0131220669, -0.0075454898, 0.0741120204, 0.2711830437, 0.3257134557, 0.4172251523, -0.3802876472, -0.050603807, 0.0162401441, 0.2785221934, -0.0386804938, 0.3240654767, 0.1429880857, -0.0012644231, -0.1450137943, -0.2655175626, -0.2225731015, 0.4299738705, 0.1031812653, 0.3510277867, 0.1296645999, -0.0288923793, 0.0275591128, 0.2613197863, -0.2476959229, -0.1647696793, -0.112203896, -0.0371273234, 0.2096109837, 0.0568739399, -0.0862636119, -0.0101324255, 0.0833757222, -0.4478078783, 0.5934392214, 0.1470459104, 1.3137549162, 0.258122921, 0.3736341, 0.1208667979, 0.0678039789, 0.1194815785, -0.4052533507, -0.0135767786, -0.2606821656, 0.1679500937, -0.082344383, 0.2353164107, -0.1076755524, 0.2000226378, -0.4066717029, 0.1032234132, -0.1559081078, 0.2173663229, 0.1010727882, -0.009281598, 0.0906760469, -0.1309902817, 0.2300191224, 0.1524744779, -0.0055048447, 0.1577049196, -0.0476446263, -0.3615916669, -0.3194211125, -0.0812910199, -0.2802692056, 0.1858309209, -0.144320935, 0.1160685271, 0.3002601862, -0.0802204907, -0.2489445657, 0.2821152508, 0.3190875947, 0.2485012263, -0.4652882218, 0.1221020147, 0.0649995804, -0.1323268563, 0.3016614914, -0.0218502395, 0.4099273086, -0.2100418955, -0.0312504023, -0.0809148774, -0.0453296453, -0.2504413426, -0.2505158186, 0.2192788422, -0.1018663645, -0.0866018832, -0.1273264736, 0.1625175178, -0.5676117539, -0.2275833189, 0.1299806684, -0.122978881, -0.2572297156, 0.0325819775, 0.0439509824, -0.2969925702, -0.2175335437, 0.4929181337, 0.1279945225, 0.1437837183, 0.2659581006, 0.0155055746, -0.2118876278, -0.3199821115, -0.0646490604, 0.3073029518, -0.4513328075, 0.3142534494, -0.0529317297, -0.3912535906, 0.2202432752, 0.64010638, -0.0648358017, 0.2356961071, -0.3432994485, -0.3344877958, -0.1428495198, 0.0723185092, -0.0759884641, 0.1215200946, 0.3601946533, 0.376755476, -0.1318210363, -0.1066305712, -0.3545944691, 0.2168206275, -0.4204817712, 0.237880826, -0.3747775257, -0.2061502039, -0.1499356478, 0.0259233899, 0.0081207603, 0.5068906546, 0.0129047707, -0.2600456178, -0.3013979793, 0.1099210978, 0.2588220835, -0.0234451294, -0.1358157843, 0.071974054, 0.0002935529, -0.1304662377, 0.1453937888, 0.155518949, 0.0607335232, 0.3466273844, 0.1490336061, 0.1122619063, -0.4103756547, -0.0152569264, -0.1684700847, -0.0485254824, -0.2342362255, 0.1298633665, -0.2454683781, -0.0972143263, -0.0906305909, 0.1664320678, 0.1093834639, 0.3238176107, 0.2405937314, 0.2146869749, 0.0495449305, 0.0479722619, 0.0919281989, 0.2279505134, 0.0072850809, -0.4190815091, 0.456371069, 0.2205511183, -0.2072083354, -0.3670640886, 0.0264972262, -0.3992231786, 0.1342365742, 0.1030330509, 0.4256850183, -0.330778867, 0.0443648398, 0.0788630545, 0.2585692704, -0.0978069752, 0.2458580434, 0.5149004459, 0.0579985306, 0.0307020638, 0.2223695219, -0.0739786923, -0.0304961577, 0.4679296613, 0.1013528109, 0.5709163547, 0.4925906956, 0.1582232416, 0.1754170656, 0.2502925098, 0.2761948705, 0.2544509768, 0.3463718593, 0.4401054978, -0.0277230404, 0.0877459943, -0.1820442677, -0.1817068011, -0.1663597077, 0.1184733659, -0.4020214379, -0.0162039623, -0.2048484236, -0.2311947048, -0.1976770014, 0.0143795609, -0.2363504767, 0.2179997861, -0.1012021601, -0.0192651972, -0.109038718, -0.1648950875, -0.0554531477, -0.3457095325, 0.3126296401, -0.2368157357, 0.2367735505, -0.0280488655, -0.0491222404, 0.1689562798, 0.1625012308, 0.1855440587, 0.2687327266, -0.167535007, -0.0098342542, -0.1640841365, -0.2072374225, -0.0074249133, 0.4367580414, 0.1841110885, -0.072975412, 0.2002140582, 0.0352903381, -0.1615733206, 0.2720961273, -0.0540759563, 0.0946178064, 0.0394381471, -0.0451988541, 0.1204202622, -0.2497220337, -0.145922482, -0.1833533049, -0.2593675256, 0.0367669612, 0.0272677913, -0.0264104363, 0.1567184776, -0.1840614527, 0.09571895, 0.0984388888, 0.5475631952, 0.3088123202, -0.0921853185, -0.0028425399, -0.0847651288, -0.3762496114, 0.2123701423, 0.0569203645, -0.329870224, -0.0072317012, -0.0174497217, 0.0328912102, 0.0972709134, -0.3886370063, 0.2236616611, -0.1885611862, -0.166817084, -0.3574566245, 0.2894045115, 0.1753385365, -0.1492222995, -0.0366452187, -0.2643887997, 0.1396124363, 0.0647707134, 0.1435918212, -0.0932579115, -0.6359951496, -0.1098384783, 0.3305194378, 0.1894251704, 0.388525188, -0.0265482068, -0.2530362904, 0.0473789796, -0.0632922053, -0.0674687326, -0.0986120179, -0.117672354, 0.1615009904, 0.2237383723, 0.0077377036, 0.4022387862, 0.0059393682, 0.381094873, 0.1957576126, 0.376424551, -0.29129529, -0.0638091788, -0.2182698697, 0.0347626209, -0.0692659542, 0.5324453712, 0.0608733669, -0.2226441205, -0.2715649009, -0.4242268801, 0.5321041346, -0.339515686, -0.2588925958, -0.0994960368, 0.012507651, 0.3902791739, 0.0195651595, -0.4431235194, -0.1875343621, 0.1218617484, -0.0762580931, -0.5258944631, 0.1829119325, 0.0751644522, -0.1372605711, -0.1607269049, 0.2755140364, 0.4468671083, 0.0316404551, 0.0359916762, -0.2550362945 ]
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.0130970031, 0.2090142071, -0.0026563182, 0.3173743784, -0.1956931651, -0.2996239662, -0.0173015818, 0.2006195486, -0.4918516576, 0.0816213042, -0.1720972359, 0.284273684, 0.1636684835, -0.2349404395, -0.107166402, 0.2111711055, 0.1792732924, 0.2823951244, 0.2202473283, -0.1536699533, -0.1823281646, 0.2915742993, 0.1904962063, -0.0035165958, -0.263325423, -0.2643785179, -0.1785982847, 0.3562453091, -0.1762149632, -0.3386284113, -0.1300115585, 0.2864890993, -0.0567628518, 0.3584989607, -0.0001062125, -0.2521670759, -0.0237555765, -0.0865367576, -0.3363087773, -0.0799460113, 0.2673522532, -0.0649408326, 0.2785299122, -0.3779519796, -0.3191951513, 0.0946914107, -0.1585107148, 0.0207608417, 0.2960729599, 0.2338732779, 0.2192091644, 0.186421603, -0.1193734109, 0.2506966591, 0.3235375583, -0.1017343998, -0.1702124476, 0.0435539633, 0.3703982532, 0.3260971606, -0.166223675, 0.3166055381, -0.1516395509, 0.0288453661, 0.0620673075, -0.1197542697, 0.0588302128, -0.1836255938, 0.1840666384, 0.2314484566, 0.2577361465, -0.1910745651, -0.1388307512, -0.206294328, -0.0055131651, -0.0866996273, 0.2901031971, 0.1626655906, 0.1006431133, 0.1169621944, -0.2036015689, -0.1254277527, 0.1330467761, 0.2178186625, -0.0939430371, 0.3291177154, -0.0937991887, -0.031552624, -0.0638477057, -0.0639030635, -0.2752231061, 0.0771326423, -0.346639663, -0.0471422933, -0.0716824085, -0.227014631, 0.0099339262, 0.3180499375, -0.0523343235, 0.2914675474, 0.1656624377, 0.2068200856, -0.1103690565, 0.0022941558, 0.1428862512, 0.1520638466, 0.0951019824, 0.2186255753, 0.1616233438, 0.0547112972, -0.2744165659, -0.0449895114, 0.0262067914, 0.0409514271, 0.0673125982, 0.1175811887, -0.094521746, -0.4092072546, 0.1104822978, 0.1627935469, -0.1755580306, 0.3513493538, 0.0304976255, 0.1711644232, -0.1282083243, 0.1095000431, 0.23338826, 0.0160877239, -0.1464366466, -0.1457026005, -0.19493258, -0.0282438975, -0.3139035404, 0.1749853492, 0.2165556848, -0.0249817837, 0.1767990887, 0.0159946829, -0.090045765, -0.0779915601, -0.0937322229, -0.1390451938, 0.2256885022, -0.0904376656, 0.0073015019, 0.2255375385, -0.0670432597, -0.0109523311, -0.2728831768, 0.0048359856, -0.3288041949, 0.1000959724, -0.2406035811, 0.2492174357, -0.335608542, -0.1833829284, -0.133633852, 0.0967792869, 0.2495666444, -0.205788523, 0.2461415529, 0.0952634811, -0.084514603, 0.0397759937, -0.1700636148, 0.1673566997, -0.1764996648, -0.1662345529, -0.0244438965, 0.2212654054, 0.2749221325, 0.1089542955, -0.1420918107, -0.0086041242, 0.0813517496, 0.7183498144, -0.0174184218, -0.0456807725, -0.5037996769, 0.2438367158, -0.0503255501, 0.073482357, -0.0498397723, -0.1478778273, 0.2721968889, -0.0256973598, -0.1284988075, 0.1694664806, 0.5301474333, 0.1767307222, -0.5494858027, -0.209741801, 0.1637220383, 0.0617382377, -0.1836181283, -0.0272413939, 0.2119205296, 0.1857924312, 0.0499813929, -0.2376086116, 0.2587558627, 0.3918688893, 0.3059105277, 0.3005809486, 0.2135977149, -0.1132962182, 0.1385646015, -0.0084676221, -0.5750664473, 0.5548723936, -0.1922528446, -0.3250688016, 0.0255880877, -0.3308912814, -0.1080774665, -0.0202901773, 0.2663987875, 0.2701418698, -0.0265751779, 0.2296951711, 0.1098187119, -0.0887288377, 0.0138868168, 0.1445505619, -0.2879339457, 0.0096703991, -0.1162085086, -0.2436328381, -0.091395013, 0.3883036971, 0.3055767119, 0.0095235296, -0.1216299981, 0.5886528492, -0.2743599415, 0.2116332948, -0.3422015309, 0.1967360079, 0.2266283631, 0.0910282135, 0.1045900509, 0.6204183698, 0.3134613335, -0.0619518384, 0.1241838336, 0.4847057462, 0.5381137729, -0.0348017476, 0.1357636452, -0.2097645402, 0.1407643706, -0.2778546214, 0.0349248424, -0.160751313, 0.1870880574, 0.2222886682, 0.2258031666, 0.2511374354, -0.1797740161, 0.3216661513, 0.3824760318, -0.1144576967, 0.1248015761, 0.1802487075, -0.3248032331, -0.3172591329, 0.0615758225, 0.0733917952, 0.0257054716, 0.1317722201, 0.0768516213, 0.0449811295, 0.1044772416, -0.3250132203, 0.2166340351, 0.0959459692, -0.3224864304, 0.1516514719, 0.3414750099, 0.1739851087, -0.4222617745, -0.0884151831, -0.036660973, 0.093063198, -0.1447468549, 0.2682284117, -0.4251954556, -0.6615480185, -0.0893077776, -0.0604746938, -0.1013161689, -0.2474467605, 0.3624102473, 0.2117524445, -0.1529857963, -0.0137811285, 0.2746282816, 0.3462330103, -0.3052077889, -0.1405727714, -0.1333604157, -0.3698674738, -0.6063697934, 0.1722468734, 0.0836454183, 0.0029901862, -0.1088609025, -0.2052446604, 0.0304431543, -0.3144635856, -0.2817365527, 0.1259752959, -0.133297503, -0.0618760511, 0.0989271104, -0.2075005323, -0.2802497745, -0.3656505942, -0.0915762931, -0.1999159157, -0.2207590044, 0.2158224583, -0.2644092143, -0.3948633969, -0.3731861115, -0.4336092174, 0.0073937681, -0.1918857247, 0.3253255486, 0.3003254533, 0.0158029199, 0.3178787529, -0.365429461, 0.0570116937, 0.2947157919, 0.4680437148, -0.2738640904, -0.3697009087, 0.3797509968, -0.0870074183, -0.373755753, 0.0451311097, 0.1064179018, 0.1011917144, 0.0062334649, -0.3513375223, 0.2975462079, -0.2787440121, 0.1182228774, 0.1003808826, 0.0857111961, 0.3026744723, 0.1589626819, -0.24221766, -0.0651043057, 0.0182351619, 0.2500402927, 0.3025484383, 0.3333815038, -0.2154238075, -0.1298263967, 0.0965184942, 0.0774971396, -0.1745659411, -0.2244544476, 0.4646263719, -0.0560803264, 0.1519819647, -0.1868851781, 0.0825461596, 0.1256968081, -0.2974068522, -0.0397855304, 0.7535392046, 0.0184614845, -0.4435168505, -0.0814060867, -0.307174176, -0.5265581608, -0.4649651647, -0.1181863844, -0.0913818628, -0.036273323, 0.0899661779, 0.0348158479, 0.1896205097, -0.4391714334, -0.0119334981, 0.1453508735, -0.0218623728, 0.0675535277, -0.2452220321, 0.2796764076, -0.3746810257, 0.2867272794, -0.0188877676, -0.0390883498, 0.0734117627, -0.0693436638, 0.1641741842, -0.2702216804, -0.0470542014, 0.1129209474, 0.1211187989, 0.1840787828, -0.2732986808, 0.0120055974, -0.0459971577, -0.2533962131, 0.0440191701, 0.2973747253, 0.2621646523, -0.4981847703, 0.0783737078, -0.3845175207, 0.1832411289, -0.0779348165, 0.2510423362, -0.0613874942, -0.1280377805, -0.4437137842, 0.0530303493, 0.1399632096, 0.4243904054, 0.0537538305, -0.0306476057, 0.0338708013, 0.0521035045, 0.320689559, 0.2767495513, 0.4186458588, -0.3349752128, -0.0093225539, -0.1058884412, 0.3103249073, 0.1369471103, 0.3233545423, 0.0445087515, 0.056616962, -0.1323211044, -0.238184154, -0.170396626, 0.4261044562, 0.0424847938, 0.31487903, 0.0364563689, -0.0454363897, 0.0617158897, 0.1312963068, -0.2217708826, -0.0027024075, -0.0312761217, -0.1476114243, 0.1463031173, 0.1031940803, -0.0746625066, -0.0035030092, 0.2231929004, -0.4792090952, 0.5465052128, 0.0245952308, 1.2696266174, 0.3159295917, 0.326777041, 0.0482163541, 0.1233342886, 0.2043083012, -0.5028333664, 0.0450369269, -0.2049016207, 0.2078600228, -0.0692746863, 0.3685306311, -0.1507877707, 0.2397282422, -0.3311701715, 0.2369762808, -0.2088414431, 0.0760664046, -0.0275171269, 0.0753912628, 0.0834394023, -0.308403492, 0.0370023102, 0.2059898674, -0.1129740998, 0.0470508523, 0.0031085759, -0.1953647137, -0.2502888441, -0.1169702858, -0.2816469073, 0.217115134, -0.19921875, -0.0228738971, 0.2414247543, -0.0237627253, -0.1717051566, 0.1255426705, 0.2219237387, 0.3128907681, -0.2807669044, 0.1846370995, 0.1854192466, -0.0429591686, 0.236381501, 0.0808084607, 0.4306317866, -0.1359004527, 0.0029212534, -0.1516212374, -0.0207547061, -0.2704406977, -0.022874102, -0.0337701514, -0.0581847616, -0.2406967878, -0.0833917782, 0.2814622819, -0.4552400708, -0.2789029479, 0.1790004373, -0.2404046506, -0.22462219, -0.1254333109, 0.0349247381, -0.3544527292, -0.2354164869, 0.4743594825, 0.0659199357, -0.0302720517, 0.2621462643, -0.0482767671, -0.2409836948, -0.3099689186, -0.1786747128, 0.3008834124, -0.3326343298, 0.1876680255, -0.0916173086, -0.3863521218, 0.3450786173, 0.7153213024, 0.0183653142, 0.3967465758, -0.1848095357, -0.3267111778, -0.0301631801, 0.0570699386, -0.03810592, 0.1439880729, 0.29014498, 0.3565283418, -0.1229697466, -0.1283663809, -0.4049932957, 0.2145230174, -0.336237222, 0.2910220027, -0.2069049329, -0.1521969438, -0.0805536211, -0.0220081694, 0.0823573098, 0.4147500992, -0.0205567088, -0.2648277879, -0.3594224453, 0.0865643993, 0.2694785297, -0.0352669321, -0.2333407104, 0.0358316675, 0.0373579264, -0.213228181, 0.0954040214, 0.0174134299, 0.0847225785, 0.3056301773, 0.1444255114, 0.1671497524, -0.3926971555, -0.0462918803, -0.0383898877, 0.0012806654, -0.30281955, 0.1512007862, -0.2068939805, -0.0710865408, -0.0749295279, 0.1925043762, 0.2182453424, 0.4009813666, 0.2719070911, 0.2186347991, 0.0163994953, 0.0890209675, 0.2961803079, 0.2918319702, -0.026205644, -0.4860495627, 0.3494084775, 0.2846327424, -0.1590370536, -0.2643699348, -0.0835703462, -0.4274364114, 0.1194314957, 0.1845215261, 0.4698519111, -0.255789727, 0.0934514701, 0.0261176378, 0.407874465, -0.1422622651, 0.1201974452, 0.3639900982, -0.0351201743, 0.0599594563, 0.2685970664, 0.0387330912, -0.0535025261, 0.4079723954, 0.0812919587, 0.4704852402, 0.5988804102, 0.2576113939, 0.0574811473, 0.2749407291, 0.3712731302, 0.092103526, 0.299826026, 0.3460761309, -0.0133698024, 0.1780268103, -0.2248469144, -0.2335678786, -0.0808879435, 0.248365283, -0.3571586013, -0.1191972643, -0.2130065113, -0.2445843518, -0.2593749166, -0.0840540379, -0.2889245749, 0.0619462617, -0.0790873468, -0.0274675488, -0.0294483081, -0.2832813561, -0.1334620863, -0.2766896784, 0.36929968, -0.2943419218, 0.308344841, 0.0762207508, -0.0538068935, 0.1717825234, 0.0994598866, 0.1822339594, 0.2157621682, -0.2081107646, 0.0303522795, -0.1222163439, -0.1316477358, 0.0349159092, 0.3396188915, 0.1013622209, -0.0937323347, 0.1128104106, 0.1167639717, -0.232649982, 0.2023673654, -0.0629939586, 0.1703379452, 0.0302390121, -0.0107638203, 0.0460677631, -0.194950968, -0.2688479424, -0.1722624451, -0.2579215765, -0.0288863145, 0.1489242017, -0.1003094539, 0.1757889688, -0.2235441506, 0.1416842937, 0.2162237763, 0.5997521281, 0.2645317614, -0.1004312336, -0.0401846692, -0.1288246363, -0.4038024247, 0.2358365357, 0.2191652358, -0.3714694381, -0.0989226252, -0.0245528519, 0.0847211182, 0.1278227866, -0.4963511825, 0.319430232, -0.2276888639, -0.1976346672, -0.3477382362, 0.3086857498, 0.1343072355, -0.1725866199, 0.0300983265, -0.189438045, 0.017439574, 0.0781251118, 0.155001238, -0.0839315653, -0.6021878719, -0.0343671143, 0.199320063, 0.1280793846, 0.2976605594, 0.055780977, -0.3549656868, 0.0256131291, 0.00230774, -0.1479884386, -0.2636100352, -0.0502678975, 0.0962546468, 0.2191592455, 0.1750769466, 0.4257458448, -0.1178935617, 0.2641667426, 0.279537499, 0.0778626725, -0.3049061, -0.0054791793, -0.2572002709, -0.0134132951, -0.008337032, 0.6562623978, 0.028846819, -0.0379880667, -0.2665491402, -0.4903169274, 0.4548587799, -0.2702220678, -0.1678289622, -0.0110592507, 0.1426567733, 0.4260190725, -0.0236695707, -0.5835840702, -0.1032109857, 0.1385840923, -0.0550481193, -0.5959929228, 0.1988398731, -0.0829145536, -0.1592065394, -0.1237689406, 0.3169110417, 0.4044704437, -0.0247503929, 0.022682637, -0.2333716303 ]
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.0296658725, 0.198441267, -0.01938162, 0.3028748035, -0.0800800025, -0.2216098905, 0.1067402065, 0.1523844451, -0.3669323325, -0.0078904629, -0.2142249346, 0.3167907298, 0.2326786518, -0.1111377031, 0.0192024969, 0.0697402954, 0.2531400323, 0.2138077617, 0.0349263661, -0.2171894908, -0.1444737911, 0.2366248369, 0.0563933104, 0.1152130067, -0.0726907849, -0.3140862882, -0.2279932201, 0.360932529, -0.2332172245, -0.3183435798, 0.1385845542, 0.3533368707, 0.0491576307, 0.4791384041, -0.0001063632, -0.073319152, -0.1108101755, -0.0216150731, -0.1269203722, 0.1278882623, 0.270246774, 0.0159019828, 0.3585572243, -0.4776166677, -0.3692616224, 0.178127259, -0.2240700126, 0.1918192953, 0.2211262733, 0.3104526699, 0.2462922484, 0.0918430984, 0.0222305059, 0.267480731, 0.1596526653, -0.1338944435, -0.2298510373, 0.0877113044, 0.544692874, 0.2163472474, -0.1553096175, 0.3055978715, -0.1081151217, -0.0444402993, 0.0253590867, -0.0049127601, 0.1899776459, -0.32259202, 0.14900738, 0.2697643936, 0.2777186334, -0.1194731817, -0.1294753253, -0.0601969212, -0.0922963321, 0.1277789772, 0.2424377203, 0.0890644193, 0.0441511832, 0.208000198, -0.1743234694, -0.1435810626, -0.0047821254, 0.0986919999, -0.1490664333, 0.3915124536, -0.0701678097, -0.0638667047, -0.050907068, -0.0633307397, -0.318063736, -0.0380535536, -0.2157051265, -0.0351228416, -0.0073079709, -0.2191758156, -0.0236469246, 0.4003380239, -0.1009500623, 0.2117398381, 0.1576359719, 0.1187424809, -0.0770306289, -0.1793920249, 0.1342783868, 0.2484537512, 0.1051764935, 0.2507032156, 0.0362858623, 0.3239165246, -0.2562929094, 0.0412145443, -0.1305708587, -0.0480503067, -0.1039602757, -0.0861102939, -0.0972715542, -0.4910895228, 0.0703447461, 0.2772712409, 0.0333308876, 0.317037493, 0.0583804995, 0.0865697116, -0.2092942297, 0.037213821, 0.2322644591, 0.0183620006, -0.1913562715, -0.2068759501, -0.2237014771, 0.0077761002, -0.3948840201, 0.0062468611, 0.1177479625, -0.0474421196, 0.2660803795, -0.0383915007, -0.2094124854, -0.1035209894, -0.0289998837, -0.1996836364, 0.2668502629, 0.0191408973, -0.1366975307, 0.2283188403, 0.049318105, -0.1478090882, -0.1507510096, 0.0246908329, -0.3962163329, 0.0323202237, -0.1493202746, 0.2326127738, -0.2601954639, -0.2491977513, -0.0344616361, 0.2813069522, 0.4073370099, -0.150970608, 0.3375006616, -0.0243919585, -0.1385212541, 0.0281357542, 0.0209935308, 0.4135785997, -0.2282399982, -0.1458941251, -0.0486666337, 0.0728444755, 0.375290215, 0.0883203521, -0.2509763837, 0.0617540926, 0.2696673274, 0.6624367833, 0.1866115779, -0.0779507235, -0.4325429201, 0.2136226594, -0.0138361454, 0.2117448747, -0.1904439181, -0.1700180471, 0.180130437, -0.0564441383, -0.0000730734, 0.0359712727, 0.4290823042, 0.1707170606, -0.6041295528, -0.3096041679, 0.3253690898, 0.2513688803, -0.1255485415, -0.0189413615, 0.0184532572, 0.062567845, 0.1516379416, -0.1676374674, 0.1570031345, 0.4770157933, 0.1804642975, 0.3032196164, 0.2585037351, -0.0054155961, 0.2384946942, -0.0026990548, -0.4634096324, 0.6628251076, 0.0335821025, -0.2584095299, -0.064342618, -0.2789320052, -0.1723703444, -0.2421182692, 0.2739937603, 0.0556416139, 0.0018356442, 0.283508122, 0.0382650644, -0.1210395619, -0.2297667563, 0.1404663175, -0.5065472722, -0.0698978752, -0.228645891, -0.0394803397, -0.2563894391, 0.3594434559, 0.1786550283, 0.062610276, -0.1487023234, 0.4577596784, -0.3280339539, 0.0037436187, -0.0326190777, 0.2570517063, 0.1916280538, -0.0837771073, 0.0840339363, 0.4635957479, 0.269711256, -0.0392534584, 0.207629323, 0.3762255311, 0.4181044698, 0.0358305722, 0.0566478819, -0.1161640882, 0.0447986498, -0.2119202614, 0.0115559399, -0.137719661, 0.2113893628, 0.1241784394, 0.1486058384, 0.2420843095, -0.2317482829, 0.3815655708, 0.2590774894, -0.1092301086, 0.0798089057, 0.1837252676, -0.3506715298, -0.3496270478, -0.0154662635, 0.1806980371, 0.1021824628, 0.0754513443, 0.0075752758, 0.0766026527, -0.0453088768, -0.3259963393, 0.2854870558, 0.1510801017, -0.2582575381, 0.0437837206, 0.2345242947, 0.2017495483, -0.4386014342, -0.1384999603, -0.0466302633, 0.1867871433, -0.1489842534, 0.3591696024, -0.2862594724, -0.4356795251, -0.151241526, 0.0486522801, -0.0093041724, -0.1176722646, 0.2985787988, 0.1213740706, -0.099309735, 0.0566703826, 0.1491344422, 0.5113176107, -0.2363129854, -0.0650568679, -0.1264051199, -0.272980392, -0.7907334566, 0.1810278147, 0.1005466729, -0.0117974728, -0.1401482373, -0.3721142411, -0.1473334432, -0.1202431321, -0.4255813956, 0.028754957, -0.1445323676, 0.0502935946, 0.1586815119, -0.1826366633, -0.2583864033, -0.1930640042, -0.0241111331, -0.1113954335, -0.1810626984, 0.1034457386, -0.2522014081, -0.4218702316, -0.3365121186, -0.5817194581, -0.089388296, 0.0237450004, 0.2863696814, 0.2327515036, 0.0077165859, 0.4235410392, -0.1916825175, -0.0140363686, 0.149473995, 0.4524556994, -0.2753590941, -0.2926749289, 0.3957183361, -0.038281139, -0.4434626997, -0.1504343152, 0.0747852772, 0.0841897726, -0.0416627266, -0.331726402, 0.111349903, -0.3541257679, -0.0893001929, 0.0395528413, 0.0816082656, 0.2867456377, 0.0311785191, -0.2125949115, -0.1179544404, -0.0140809976, 0.5295314193, 0.2311034203, 0.2775564194, -0.3133277297, -0.0607117116, -0.0815423727, 0.0009641964, -0.0211239271, -0.2409225404, 0.3181604743, 0.0015798118, 0.0636588484, -0.1606694162, -0.0324060582, 0.0874614716, -0.2342919558, -0.1427823305, 0.67140764, -0.006317066, -0.3302324414, -0.1265487075, -0.2998776138, -0.4062517881, -0.3436613381, -0.1450317502, -0.0818752646, 0.0542497635, 0.1594572812, 0.0565785319, 0.1285170168, -0.3857203126, 0.0279504135, 0.2911817133, -0.2177028954, 0.0844199806, -0.0557048619, 0.2240013033, -0.5900644064, 0.1102207899, -0.1178843603, -0.0061595254, -0.0074457303, -0.0192111582, 0.2219082117, -0.2553710043, 0.1108383164, -0.091390945, 0.0196142662, 0.1842550486, -0.4195019007, 0.0429302305, -0.1706502736, -0.3483814597, -0.0167407654, 0.2624336183, 0.2193242013, -0.3960916996, 0.0259024091, -0.2092827559, -0.0174240321, -0.1271577775, 0.341657728, -0.0376446731, -0.3000448644, -0.2775604725, 0.1199880019, 0.0643889457, 0.367675215, -0.102414988, -0.0005582944, 0.0976181105, 0.4271935821, 0.2771633863, 0.3257225752, 0.3162812889, -0.3522461057, 0.0334270895, -0.1422739774, 0.2826832831, 0.2115713954, 0.3943054676, -0.0231348723, 0.0652970895, -0.0599549003, -0.2926259041, -0.361195147, 0.3583038151, -0.0039002225, 0.3576032519, 0.241964072, -0.0357152522, 0.0211487189, 0.150930509, 0.097767435, 0.0407653488, -0.1922477335, -0.2394362688, 0.231287688, 0.0902265608, -0.1045802981, -0.0171598159, 0.2092265189, -0.5008426309, 0.5596808195, 0.180247426, 1.1709778309, 0.1551646888, 0.4108211398, 0.2056062371, 0.1132094413, 0.1977675557, -0.5068727136, -0.0735533684, -0.3077664673, 0.1728135347, -0.0555335805, 0.4235354662, -0.0200596228, 0.2493426204, -0.2679889202, 0.199261412, -0.296390295, 0.2366591692, 0.0645621493, -0.1335397214, 0.2405454963, -0.0945098847, 0.0363565162, 0.2081568837, 0.0397816561, 0.1289009303, 0.0057343766, -0.2461299002, -0.2890443206, -0.0531961322, -0.2310488224, 0.2454657108, -0.0331805684, 0.0494032651, 0.207969889, -0.1106893942, 0.1575107425, 0.1382413656, 0.4718068838, 0.1743506044, -0.395540446, 0.2477911711, 0.1785716116, -0.1037530601, 0.2984575033, 0.0512134321, 0.513137579, -0.0922016352, -0.0203277171, -0.2224055678, -0.1007065624, -0.146646142, -0.0992621705, -0.0249885507, 0.1355513334, -0.4075535536, -0.0080805346, 0.3327299356, -0.3182331324, -0.3199118078, 0.1742996275, -0.2192233354, -0.1999280751, 0.0848746151, 0.1321091503, -0.2795991302, -0.1058834642, 0.35803774, 0.2552378178, -0.0036922321, 0.4213996232, -0.0478949547, -0.238319695, -0.3894930482, -0.3604239225, 0.5178195238, -0.449971199, 0.2662648261, -0.0771512538, -0.3334923387, 0.3360661864, 0.7329290509, -0.0140915141, 0.1992584616, -0.3125979304, -0.2560109794, -0.0607899092, -0.0324200615, -0.0447012223, 0.1747516394, 0.2742785215, 0.311722815, -0.1441122293, -0.1182432324, -0.3982655704, 0.248327896, -0.3359959722, 0.1890868396, -0.1631186754, -0.0982187688, -0.1337662786, 0.0796323642, 0.0410763323, 0.2587133944, -0.0245961808, -0.293625772, -0.3275230825, 0.0688281506, 0.223612532, -0.2142416984, -0.0723756701, -0.0335412063, -0.1770564765, -0.1123384684, -0.0055622086, -0.0022377744, 0.2331561893, 0.2266029418, 0.0625116527, 0.1165822223, -0.4161807001, -0.0662277937, -0.1230777204, -0.0774651095, -0.1583361924, 0.0727250129, -0.2133883089, -0.1209277436, -0.1550259739, 0.3376782537, 0.1640607119, 0.4420240223, 0.3606305122, 0.0693641752, 0.1109358519, 0.1151179224, 0.2891586721, 0.3181862831, -0.1142821014, -0.4719839692, 0.3100063205, 0.280436933, -0.1817851663, -0.3593284488, 0.0826418325, -0.5128977895, 0.0000177994, 0.1591276228, 0.4305148125, -0.1177245677, 0.1454433948, 0.0505666956, 0.3363845646, 0.0239161812, 0.2004482001, 0.4209344983, 0.0640427172, 0.1014031842, 0.2356195003, -0.0335273743, -0.0871533826, 0.4698124528, 0.1750523895, 0.5409207344, 0.4480158389, 0.2250316888, -0.0101085939, 0.1249662787, 0.4259966314, 0.0221625343, 0.1973184943, 0.2906275988, -0.0926227421, 0.2536981702, -0.346131891, -0.3160282671, -0.341496408, 0.2313446403, -0.4401256144, -0.2124314159, -0.2084480077, -0.2706872225, -0.0848739445, -0.0113781542, -0.2570590675, 0.2090293914, 0.0766109005, -0.2347415537, -0.1947251856, -0.4968027472, -0.1306172758, -0.1331722587, 0.43012622, -0.1012999937, 0.4015229344, 0.1030497998, -0.1810587347, 0.0290291645, 0.3175078034, 0.0872925892, 0.1963390112, 0.0133623779, -0.188902691, 0.0431266874, -0.1191530451, 0.0723828822, 0.3179277778, 0.2134421617, -0.0753751248, 0.1678415239, 0.0687645078, -0.1467100084, 0.2038978636, -0.0412296467, 0.2431821674, 0.0998825282, 0.027864268, 0.1857537329, -0.0540197305, -0.3054513335, -0.1482003927, -0.2258321196, 0.0509595945, 0.2498968244, -0.0081117265, 0.1863155216, -0.2863775194, 0.1335958391, 0.1357711256, 0.617618084, 0.2860672772, -0.1427043825, -0.1430065632, -0.1510522962, -0.30491364, 0.3031996489, 0.1856847703, -0.3401730657, -0.0325695463, -0.0787370279, 0.0555836335, -0.067191422, -0.3388930261, 0.1711835414, -0.0554587655, -0.1162086874, -0.2399933636, 0.3016031981, -0.1026964039, -0.0256434083, -0.0212990381, -0.0838336796, 0.0958450586, 0.0370117128, 0.1094706506, -0.0381377786, -0.4150059521, 0.006134443, -0.0140304659, 0.1681960672, 0.2728510797, -0.0538942963, -0.2741574943, 0.0648501813, -0.0640596896, -0.1224150658, -0.248218298, -0.1093809232, 0.0175886489, 0.1900927722, 0.1669215262, 0.2837263346, -0.064718768, 0.045171015, 0.3557334244, 0.0490442663, -0.3398377299, -0.0906764641, -0.005301863, -0.1250110269, 0.2342025191, 0.6557596326, 0.03752736, -0.0007673502, -0.2772577703, -0.5082751513, 0.5603705049, -0.3009026349, -0.1876613796, -0.0994000211, 0.1073845476, 0.4117281735, -0.070246391, -0.7056638598, -0.1818270981, 0.1257763058, -0.1075638831, -0.5928039551, 0.3088390827, -0.0592664629, -0.0610286817, -0.1592836976, 0.2810199559, 0.1327215284, 0.0317783728, -0.0160774589, -0.2202400416 ]
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.0448163003, 0.1466448158, -0.0626625642, 0.3189458847, -0.0481279418, -0.2803267837, -0.0028585223, 0.2543207407, -0.426405549, 0.0911976993, -0.1354174018, 0.3492497504, 0.2933692634, -0.115134418, -0.0640322864, 0.2069193125, 0.2553401589, 0.2440312654, 0.0813039392, -0.1928589493, -0.1757332385, 0.3218995929, 0.1353744119, 0.1295605004, -0.1914878935, -0.2316987067, -0.1364849508, 0.2966260314, -0.1697287709, -0.3685372174, 0.0418674201, 0.2373156697, -0.0457461998, 0.4200375676, -0.0001042967, -0.1999748349, -0.0085521601, -0.0008108541, -0.2220440507, 0.0396469161, 0.2418955714, -0.1047129184, 0.331656158, -0.4221563339, -0.2050881237, 0.0990939885, -0.1921877712, 0.1155714169, 0.1336494088, 0.2984401286, 0.2685510218, 0.2499956638, -0.1447290331, 0.2405896187, 0.2765301466, -0.1052287668, -0.2680331171, 0.1541531682, 0.4808159471, 0.2871722877, -0.1176709086, 0.3252732754, -0.1483822167, -0.0550990924, 0.0139528951, -0.0682798326, 0.1332597733, -0.2030376196, 0.2449137419, 0.1743474007, 0.1978158504, -0.1787820458, -0.0374164693, -0.0773185939, -0.0317804664, -0.0305364653, 0.3331254721, 0.1972816288, 0.1977317333, 0.0857232884, -0.228913039, -0.1092083305, 0.0344106555, 0.1787558198, -0.069673501, 0.3172309697, -0.1269734502, -0.0139595233, -0.072693564, -0.1028294414, -0.2077134252, 0.0291780159, -0.3983159959, 0.0002942644, -0.0310085453, -0.1343759596, -0.0526114143, 0.3532706797, -0.0294966884, 0.1897888482, 0.1584521532, 0.2260872573, -0.1797974855, -0.0180141758, 0.1203736737, 0.1379707456, 0.112782523, 0.2411134988, 0.0682668686, 0.0640387312, -0.2253690362, -0.0351157784, 0.0394890606, 0.0142928213, 0.0254289657, 0.0347914174, -0.0737023205, -0.4883921742, 0.1922170818, 0.2083524168, -0.0955336615, 0.2945857048, 0.0166281573, 0.0861302167, -0.1078066304, 0.029052496, 0.2102759778, 0.0138790794, -0.1805820316, -0.1609925628, -0.1973942369, -0.0833952874, -0.3167271912, 0.0978533328, 0.1498286426, -0.0653667152, 0.2154063284, 0.0616456792, -0.1452440023, -0.0833910778, 0.013253592, -0.2287241966, 0.2126797736, -0.0081227105, -0.0353083871, 0.2613688707, 0.0131318215, 0.0074575692, -0.1886084378, 0.0436921045, -0.3702695966, 0.0749156624, -0.2921417356, 0.2618963718, -0.2681963146, -0.2209360301, -0.0918350816, 0.0528983064, 0.2958089411, -0.2276178896, 0.3187196851, 0.003758112, -0.0961416736, 0.0139310211, -0.210683763, 0.2404083163, -0.1392853558, -0.1497938186, -0.0291266739, 0.012516655, 0.276165843, 0.1072724313, -0.2123287171, -0.0086452179, 0.1043876633, 0.732560277, 0.0433354452, -0.0778362751, -0.4785209894, 0.2862700522, -0.0392540917, 0.074983336, -0.180236578, -0.121359691, 0.131268546, 0.0449118242, -0.1406111866, 0.1511675417, 0.6003319025, 0.234628588, -0.604428947, -0.2423950732, 0.2666247785, 0.1318975687, -0.1301934123, -0.0382734053, 0.1433162093, -0.0083303899, 0.0949671939, -0.2224235535, 0.2434528172, 0.4617543519, 0.1976676732, 0.3330713809, 0.2323130965, -0.0787153319, 0.197096616, -0.0055599958, -0.6133109331, 0.6089822054, -0.058999911, -0.2922890782, -0.0787852705, -0.3615651727, -0.1525606662, -0.0115267038, 0.2970633805, 0.1812447011, -0.1170864403, 0.3826627135, 0.1691549867, -0.0269448739, -0.0533161126, 0.023641102, -0.3362287283, 0.0431030989, -0.1681783199, -0.1970749944, -0.1390396059, 0.2937300205, 0.2984579206, 0.0936224386, -0.2625221312, 0.5021241903, -0.4160385728, 0.2466996908, -0.1689234674, 0.1719900519, 0.2322183251, -0.0092721805, 0.1116818413, 0.5388676524, 0.3786894083, -0.0529739149, 0.2159279138, 0.3990840316, 0.4482702613, -0.01559579, 0.0430600941, -0.1934475899, 0.1470884681, -0.2783166468, 0.1191447228, -0.1288463771, 0.2308623791, 0.0909620374, 0.0945115238, 0.2028742582, -0.1953775585, 0.3303447366, 0.328751564, -0.0927828401, 0.0969551355, 0.2161506116, -0.2830908895, -0.2576099038, 0.0114531014, 0.1333328784, 0.0847555101, 0.0552717783, -0.0330926701, 0.0875940546, 0.0944515616, -0.328237921, 0.2330364585, 0.1454982162, -0.2436207235, 0.0642765015, 0.2809624672, 0.2006413043, -0.4732759595, -0.0961564928, -0.0593897104, 0.1325763762, -0.159036994, 0.3321846128, -0.3209880292, -0.6278650761, -0.0989339352, 0.0389648192, -0.1498231292, -0.210894078, 0.2689702511, 0.1829665899, -0.1170473546, -0.0242072791, 0.1855785102, 0.3524078131, -0.2660960853, -0.0416391864, -0.1509881467, -0.3491879702, -0.7120477557, 0.1918044984, 0.0732701123, 0.0796465278, -0.0410740823, -0.2622715831, 0.0435616001, -0.3028928041, -0.3058649302, 0.0577226505, -0.1697435379, -0.0810706839, 0.0272010528, -0.1541398764, -0.3781110048, -0.2736578882, -0.0023806803, -0.1636531949, -0.1409662366, 0.1180326939, -0.2873583436, -0.4336166382, -0.4267376065, -0.453630656, -0.0530872159, -0.1416701525, 0.3145367205, 0.2562345266, 0.0632836819, 0.3353789747, -0.3295735121, 0.0930115879, 0.278052032, 0.4002051055, -0.3519272804, -0.4099276066, 0.3584456742, -0.1365947127, -0.4528923631, -0.023564674, 0.1484945565, 0.0834875479, -0.0692304969, -0.4910207391, 0.2069645971, -0.2885849774, 0.011330381, 0.1198526621, 0.0267632883, 0.2422291636, 0.1011981741, -0.2581208348, -0.0639287457, -0.0957720056, 0.2960177958, 0.2582881451, 0.2977919281, -0.2564224005, -0.2517827749, -0.0318348557, -0.026069507, -0.102102533, -0.1441985369, 0.4561550319, -0.0442373678, 0.1877227873, -0.1615407318, -0.0391880609, 0.0314304009, -0.3032163978, -0.0150897652, 0.7271084785, 0.0212647505, -0.4289530814, -0.0332353115, -0.3933039308, -0.5735106468, -0.4311953783, -0.1001489088, -0.0432980917, 0.0939051434, 0.1236361265, -0.0178422481, 0.1207753643, -0.4445358515, 0.0327542573, 0.1532091945, -0.18364501, 0.0478671417, -0.3420098424, 0.1687646806, -0.3717233837, 0.2553083897, 0.005262237, -0.0013449974, -0.0451654978, 0.0586255789, 0.2602806985, -0.2168100178, 0.1064089164, 0.0102945324, 0.0653237626, 0.2743197083, -0.3003889918, -0.0027094483, -0.1228684187, -0.2420936376, 0.1531211287, 0.391367346, 0.1850695759, -0.312266171, 0.0835668594, -0.3329971433, 0.1282999367, -0.1680285931, 0.3180054426, -0.0592935905, -0.2124680281, -0.3637363315, 0.0656474903, 0.0530692562, 0.4273858666, -0.1115670353, -0.0455706827, 0.0330481082, 0.232443437, 0.2790348232, 0.2280365527, 0.4632435143, -0.2713530362, 0.032424286, -0.1344940364, 0.182701692, 0.1138172671, 0.4114053249, 0.0695168376, 0.0734402686, -0.0852295905, -0.401981771, -0.2859325409, 0.3970329463, 0.1608571112, 0.2917511463, 0.2020864785, -0.0327836908, 0.0800196528, 0.1323828846, -0.0058360808, -0.014479652, -0.0985425338, -0.0809304416, 0.1879970133, 0.0858462006, -0.0652609915, -0.0130618587, 0.1561301351, -0.3943968415, 0.4994817376, 0.0091066118, 1.2245503664, 0.1914114803, 0.2473147064, 0.1475096047, 0.0828836486, 0.1094572097, -0.5010141134, -0.0462772325, -0.3080053627, 0.1485580057, -0.0597314723, 0.3675073385, -0.09616597, 0.1176999062, -0.3358368874, 0.1413774043, -0.2380874157, 0.094017081, 0.0226750746, -0.021082364, 0.1031462029, -0.1923018247, 0.1085880399, 0.2364026308, -0.0654325038, 0.1071671546, 0.0198925361, -0.2630670071, -0.2315976918, -0.1430667639, -0.2902029157, 0.2394073009, 0.0503565893, 0.0529957712, 0.2848296762, -0.0000994802, -0.1121586114, 0.1071237326, 0.3068516254, 0.2490316033, -0.3617753088, 0.2733415961, 0.2050228119, -0.106580466, 0.2486874312, 0.1970614791, 0.3249381483, -0.1391121149, -0.1275559217, -0.1675459594, -0.0458948761, -0.1557643116, -0.05186373, 0.0214327294, 0.0463713631, -0.3336117268, -0.0767353326, 0.2401323915, -0.3926161826, -0.2628389001, 0.1982801855, -0.1990272254, -0.1592065245, -0.0691772252, 0.1285279244, -0.3441812396, -0.1976014376, 0.4220589399, 0.2594236732, -0.1140973642, 0.2870839536, -0.0380650014, -0.2450443804, -0.347948879, -0.1590728164, 0.2692506909, -0.4661868811, 0.1822969615, -0.0721393675, -0.3561224639, 0.2949460149, 0.672555685, -0.0804816186, 0.3593219221, -0.2375115007, -0.3537043631, 0.0164919943, -0.0583340116, -0.0230594408, 0.1235374361, 0.3605512977, 0.2287783325, -0.0449988693, -0.1231186315, -0.4092462361, 0.3093141317, -0.4030050933, 0.2577029765, -0.198512435, -0.0855367854, -0.1081540361, -0.020687528, 0.0510035083, 0.3924662471, -0.0547480322, -0.317229569, -0.3506038487, 0.0725567192, 0.2348155826, -0.1416845024, -0.1793183088, 0.0117169619, 0.0772333816, -0.1079199165, 0.0482684523, 0.0659532249, 0.042001605, 0.3306062222, 0.0579710193, 0.159073621, -0.3384087086, -0.0257625803, -0.0776408315, 0.0079834014, -0.1462878883, 0.0645456761, -0.2116555274, -0.0769069567, -0.111612007, 0.1302299052, 0.1451041996, 0.4586123228, 0.2783309817, 0.1129994914, 0.1690618247, 0.1006913334, 0.1460396945, 0.2584142089, -0.2015936226, -0.4826544523, 0.29021281, 0.2997666001, -0.0947843641, -0.374822706, -0.0598174073, -0.4852977693, -0.022109881, 0.0629767478, 0.4774011075, -0.2948590517, 0.2269400805, 0.0935662687, 0.3392336965, -0.0036565168, 0.2050058544, 0.3165461123, -0.0829435214, 0.0184576102, 0.1893009245, -0.0224329047, -0.1535358131, 0.4744416177, 0.12426503, 0.4253402352, 0.5266216993, 0.2677660584, -0.0496028587, 0.2188428342, 0.3550837636, 0.0118996128, 0.1806087345, 0.3160148263, 0.0988195986, 0.2178561985, -0.2701139748, -0.3222949207, -0.1784774661, 0.1791805476, -0.3917807043, -0.0441020951, -0.1466633677, -0.1504087299, -0.1310459822, -0.0305566601, -0.2464739233, 0.1594862342, 0.0352637768, -0.0778798312, -0.1439424306, -0.3957461119, -0.1519308686, -0.1954064369, 0.3066394031, -0.1740103364, 0.2878362238, 0.0850268751, -0.0048500802, 0.082703419, 0.2119256854, 0.197703585, 0.2964371741, -0.1173014939, -0.0388399214, -0.0374281779, -0.0987750441, 0.1580717862, 0.2782500386, 0.1883053184, -0.0295789577, 0.1161465421, 0.1148044243, -0.2072361857, 0.2041778415, -0.1279338151, 0.2416418046, 0.1335806847, 0.1190789193, 0.0195861049, -0.1260527819, -0.3083536029, -0.2294474691, -0.2746403515, 0.0670798868, 0.2077349424, -0.0519190095, 0.1856833994, -0.2875627279, 0.1513199806, 0.1411019713, 0.6888766885, 0.2781016827, -0.0805134922, -0.0842654854, -0.1521544307, -0.30641523, 0.3324434757, 0.1166924834, -0.2755003273, -0.0252468213, -0.0877107754, -0.0442934521, 0.0128352959, -0.3822119534, 0.2271619737, -0.1277778, -0.2840722501, -0.3597860932, 0.3236967027, 0.1303898245, -0.1133334637, 0.0209486634, -0.1534524858, 0.1544733047, -0.0766035691, 0.1796652675, -0.1036651433, -0.5949350595, -0.1030551866, 0.1579019725, 0.1936390847, 0.2918349504, 0.0025177449, -0.261523813, 0.0434961841, 0.0204941221, -0.2243360132, -0.0426711254, 0.0278209876, 0.1692961901, 0.1975400746, 0.1363654733, 0.3651081324, -0.0719055608, 0.2666302919, 0.2732156813, 0.1929307431, -0.1848858148, -0.0891333371, -0.1658141166, -0.052544184, -0.0295557454, 0.5959390402, 0.0899257213, -0.0072154962, -0.2557159662, -0.4805973172, 0.5174425244, -0.2570450902, -0.1837044507, -0.029739188, 0.1526865959, 0.4775865078, -0.0879560933, -0.6576772928, -0.1006934643, 0.1419466883, -0.0659029037, -0.5773203373, 0.2950588167, -0.1587462723, -0.0939940661, -0.0757436603, 0.2928364575, 0.3342237473, -0.0027446523, 0.1261532456, -0.1822179854 ]
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.0938438028, -0.1207259521, 0.005747363, 0.3477260768, -0.0450500362, -0.2574843764, 0.0231195427, 0.1923968345, -0.3466641903, 0.1204392761, -0.2318461537, 0.0498437807, 0.2508269548, 0.2811337709, 0.0633645579, 0.1325375736, 0.28798455, 0.1430955529, -0.0784860998, -0.1598725915, -0.2173702419, 0.4336137474, 0.1166467071, 0.167740494, -0.0388902389, -0.12684232, -0.200334549, 0.4001173377, -0.2078026384, -0.2791162133, 0.1527042985, 0.2251887619, -0.1080718562, 0.4011823535, -0.0001066821, -0.1593562365, -0.1229970902, -0.0155404806, -0.3229631484, 0.0267893076, 0.3888086677, -0.1011460647, 0.1833067685, -0.3243452013, -0.3408610523, 0.1802244186, -0.1350854635, 0.0620261729, 0.1249145269, 0.1039681807, 0.2136241198, 0.3086166978, 0.0371994376, 0.2225579619, 0.0696242005, -0.0375633314, -0.3527915478, 0.2101964802, 0.4912914336, 0.2205246091, -0.0633484572, 0.2900328338, -0.1276964843, -0.1118726432, 0.0393993631, -0.0221191831, 0.2333825827, -0.1150671169, 0.203937903, 0.3186214864, -0.0194092654, -0.259966284, -0.1064574197, -0.1943801939, -0.0760998428, -0.0726007521, 0.3364340365, 0.284611851, 0.2253691852, 0.0968830585, -0.3741989434, -0.2277467549, 0.0811931491, 0.1313807815, -0.0405471548, 0.0361633226, -0.1846028566, -0.023798611, 0.0744448304, 0.0134656224, -0.4897996485, 0.0269408263, -0.3042085469, 0.0350654982, -0.0974976867, -0.1498348713, -0.053887099, 0.7010751367, 0.0746985227, 0.0693678707, 0.0530727021, 0.1078740284, -0.3359387219, -0.0265541933, 0.082074672, 0.1007656902, 0.1369506717, 0.0156084411, 0.067885384, 0.1843394041, -0.0453088544, 0.0362812132, 0.043841444, 0.1020605415, -0.1639277935, -0.020933982, -0.0724794492, -0.399630487, 0.1268752515, 0.1415817589, -0.133497268, 0.3642198443, 0.0879588276, 0.0076309796, -0.2582371831, -0.0210710783, 0.2964795232, -0.0102809854, -0.2136096656, -0.221778363, -0.1615480781, -0.0958713517, -0.3191137314, 0.2264871001, 0.1464724094, -0.395227313, 0.185862869, 0.0444758423, -0.308151722, -0.0185631961, -0.0056984574, -0.0902870297, 0.1193649322, -0.1410990655, -0.0466799773, 0.1980331689, 0.0333115533, 0.0604281574, -0.2304291576, -0.0702002868, -0.2735205293, 0.0120782927, -0.3084299266, 0.20194152, -0.3340657353, -0.1973949224, -0.2077863961, 0.0061916523, 0.1389761269, -0.2477938682, 0.3023018837, 0.1350104958, -0.1767831147, 0.0876915902, -0.1400108635, 0.2940986156, -0.0604803972, -0.2447985113, 0.2254448682, 0.0317280442, 0.1518548727, 0.10320995, -0.1967704892, -0.048070211, 0.0697815567, 0.6613708138, -0.1448674649, -0.1817837954, -0.4148921967, 0.1682780385, -0.1120373383, 0.1598674208, -0.1114611104, -0.1683021635, -0.0464652516, 0.0063900501, -0.2677543461, 0.1824931651, 0.5105289221, 0.2303017229, -0.5244212747, -0.3914474547, 0.2984268367, 0.127182126, -0.2067016363, -0.0531215332, -0.0020294376, 0.0140401423, 0.1554814875, -0.2145637274, 0.1634925902, 0.3532809317, 0.2083571851, 0.3966573477, 0.2448126674, -0.006197907, 0.1457246244, -0.0089484751, -0.6330726147, 0.5566458702, 0.1423982382, -0.3734456599, -0.1040413678, -0.3479046822, -0.0915618837, -0.1056643799, 0.2224727571, 0.1875253022, 0.0559779927, 0.2985982895, 0.1524913013, 0.2028594464, 0.0043208972, 0.1445838809, -0.6349846721, -0.0340980776, -0.1526807845, -0.0318960324, -0.1222350597, 0.3136813343, 0.1959505379, 0.0005566142, -0.0889043957, 0.5558326244, -0.5106659532, 0.2036440372, -0.1912870109, 0.2681003213, 0.2760777473, 0.1986156851, 0.0812511742, 0.4749920368, 0.3740748465, 0.0067569911, 0.1219970435, 0.3797279596, 0.4839080572, -0.0598699413, 0.1076587439, -0.1555412114, 0.0351831689, -0.2817846537, 0.0004009008, 0.0369277447, 0.2631746829, -0.1114641652, 0.2040321678, 0.1861055493, -0.3016119003, 0.257679224, 0.408638835, -0.1320690364, 0.0894852281, 0.1542827785, -0.3398967981, -0.1776928306, 0.0346420482, -0.1265435964, 0.0189013481, 0.0660444945, -0.0793129504, 0.1490279734, 0.1661372483, -0.2313831449, 0.3121629655, 0.1072961539, -0.2484958768, -0.0338415168, 0.2163281739, 0.1573521793, -0.4162902534, -0.0698957592, -0.1470279396, -0.0663298219, -0.1102837101, 0.288048625, -0.2646134496, -0.5740513802, -0.1406422853, -0.0019307323, -0.1594646573, -0.1174939722, 0.3127171993, 0.3862805367, -0.0017170012, -0.1491291225, 0.1377098411, 0.4958686233, -0.3587919772, -0.0933327228, -0.1212114617, -0.2203117758, -0.6400430202, 0.1287747622, 0.0795239955, -0.1360810995, 0.017153902, -0.2981892824, 0.0103079379, -0.3268692791, -0.3456943035, 0.1376443356, -0.2445942461, -0.1988650858, 0.0822717994, -0.1902067959, -0.4083920717, -0.1923134178, 0.0181794874, -0.1432585418, -0.2758737803, 0.162386626, -0.1834999621, -0.3752994537, -0.3884894848, -0.3572838008, -0.0505760163, -0.1736678779, 0.5705422163, 0.1918961108, -0.0065140482, 0.5147129893, -0.36838907, 0.1496384144, 0.2725295126, 0.394756943, -0.3479954898, -0.4685353339, 0.3225314319, -0.0649404228, -0.4029201865, -0.0109297708, 0.0989055634, 0.0454924814, -0.0920308083, -0.4073905945, 0.0923256502, -0.2119836211, -0.0158268809, 0.1361186951, 0.1005616859, 0.4459448457, 0.1266244352, -0.2117584497, -0.0010535792, -0.207560882, 0.3247993588, 0.3419709206, 0.3122250438, -0.1932132542, -0.3087393939, 0.0377811342, -0.1208563894, -0.0683812946, -0.0469393209, 0.425540328, -0.0183445364, 0.2324014902, -0.211012587, -0.0943400636, -0.0144859664, -0.3801887929, 0.0313818604, 0.6702110767, 0.1985559464, -0.1369228363, -0.0599778667, -0.36896649, -0.6417502761, -0.4424600601, -0.2246521711, 0.171025753, 0.0653164387, 0.0593962073, 0.0653528571, 0.1679584086, -0.4523165226, 0.2160945684, 0.1880340129, -0.1169767678, 0.1536765099, -0.1043580845, 0.1665079892, -0.3501746058, 0.3285306394, -0.1217256859, -0.1349211335, -0.0923758894, -0.0829185396, 0.2527400851, -0.251593411, 0.325556457, 0.104982689, 0.0539809763, 0.178337425, -0.4626272917, -0.0315130278, -0.1001410037, -0.138566941, 0.135901913, 0.465775609, 0.2852054238, -0.4652679861, 0.0572001003, -0.2035699636, 0.23590976, -0.1319590509, 0.2894385457, -0.0765411258, -0.2617915869, -0.3590092659, 0.071407795, -0.0027963445, 0.4658589959, -0.0614632517, 0.0881539956, 0.0423535928, 0.0759938583, 0.3209173977, 0.1585341245, 0.3812203407, -0.1816033423, 0.1032798216, -0.0077861939, 0.2582410276, -0.0194938183, 0.4296958148, 0.2879305184, 0.0334298536, -0.0815929919, -0.2895696461, -0.3119294047, 0.4915587306, 0.178716138, 0.1890116483, 0.3776548505, -0.0836763978, -0.0504908711, 0.1121817529, -0.0673041418, 0.0549027771, -0.1972080767, 0.0284636691, 0.0690329, 0.1082100943, -0.0777714849, 0.0953311622, 0.3547431231, -0.3693216145, 0.3874282241, -0.13260445, 1.246669054, 0.0610321499, 0.3273181021, 0.2324029654, 0.2237142324, 0.0517903753, -0.4737739563, 0.0959863514, -0.3381623328, 0.218377769, -0.0965205282, 0.4169150591, -0.106244415, 0.0406306572, -0.243255496, 0.1963573694, -0.0930291414, 0.1904979944, -0.0916997865, -0.0072290599, -0.120243907, -0.3448232114, 0.0097192638, 0.1911436319, 0.0145948818, 0.3203695118, 0.1459577829, -0.3317461312, -0.2183901966, -0.0407763869, -0.1546420306, 0.3159373105, -0.0854475722, -0.0817430168, 0.4184536338, 0.043134138, -0.107443437, 0.1573024392, 0.4088447988, 0.2863365412, -0.4062110186, 0.0659093708, 0.023976244, -0.1914273649, 0.230128929, 0.0792365447, 0.3603211045, -0.0542959869, -0.034052223, -0.1631661654, 0.0012091622, -0.1712643802, 0.0285216272, 0.0273658652, 0.1606481671, -0.3978771865, -0.0255056787, 0.2487514317, -0.3316330612, -0.233668685, 0.1452807486, -0.2110293359, -0.1632931381, -0.1514057517, 0.1720246673, -0.2713443041, -0.1732177287, 0.4485717118, 0.1804521382, -0.1976036429, 0.2521139383, -0.0242788345, -0.2300775796, -0.2597089708, -0.1339484751, 0.3980846405, -0.3519411087, 0.086305216, 0.0551347509, -0.3697426319, 0.1973040104, 0.7515904903, -0.0260745194, 0.1744613647, -0.2122735381, -0.238789171, 0.0217943266, 0.0409235954, 0.0566867776, 0.1364223361, 0.6430282593, 0.2666282058, -0.039521575, -0.2141706645, -0.3800365925, 0.2778607905, -0.3200717568, 0.1124015525, 0.0029337313, -0.06673114, 0.0916443542, -0.0896682441, 0.0401449949, 0.347963661, -0.0852563456, -0.2581970394, -0.4077640176, 0.0772905573, 0.2306941599, -0.2337165922, -0.0889583528, 0.0437885895, 0.0584505424, -0.1084642112, 0.0704262927, 0.1037858948, 0.1214170754, 0.1209269539, -0.102418229, 0.2657805681, -0.4172897041, -0.1044717431, 0.0169201568, 0.05427026, -0.0603362359, -0.0149170151, -0.2595125139, -0.0674868226, -0.0660632625, 0.2184065282, 0.3321197331, 0.4366088808, 0.3683240116, 0.1369671822, 0.0183151066, 0.1096077934, 0.2874644995, 0.1851906627, -0.1328526884, -0.354714334, 0.3443644047, 0.2502985001, 0.0044985712, -0.2905493081, 0.1117965505, -0.506470263, 0.0177647769, 0.1481601, 0.4995014668, -0.0700213984, 0.3091270328, 0.0297121406, 0.2923955917, 0.1236858293, 0.1615946293, 0.2556520402, -0.1314314455, 0.0687178522, 0.2706288993, -0.0009667631, -0.0322648883, 0.2306301892, 0.0727448538, 0.3118821979, 0.3543471098, 0.3712402284, -0.0912475288, 0.1493473947, 0.3343861401, -0.1993270516, 0.2292356491, 0.2483122647, -0.0521305762, 0.4463848472, -0.4679369032, -0.323053658, -0.2296722531, 0.2725282907, -0.3189401627, -0.0621683486, -0.1676694602, -0.0924038813, -0.1426833272, 0.0767871439, -0.2698045075, -0.0065297522, 0.1894799322, -0.1842357516, -0.0856520087, -0.4537179768, -0.3113761246, -0.1692999452, 0.3823493719, -0.1074149609, 0.2846626937, 0.0380349718, 0.0034094453, -0.0238399301, 0.3346518278, 0.0962043181, 0.1980904788, -0.0604443774, 0.0217164829, -0.1130576283, -0.0072518401, 0.0356867015, 0.2513351738, 0.1394227743, 0.0043512583, 0.0718949437, 0.0843119621, -0.1742600054, 0.2088596076, -0.2105253339, 0.2519863546, 0.0795352086, -0.0590311065, 0.0023221131, -0.0617112257, -0.4243811667, -0.2515656352, -0.2580962479, 0.1377366781, 0.2446860075, 0.0673518851, 0.1199315637, -0.3152996004, 0.136676982, 0.2973249853, 0.4903906584, 0.2618111968, -0.0695901662, -0.0861522928, 0.0290584117, -0.1447817236, 0.2138183266, 0.1083107516, -0.349537462, -0.1055352837, -0.0777621567, 0.0742028877, 0.1447280347, -0.4900467992, 0.088246733, 0.015952386, -0.2991985977, -0.1523763239, 0.275762558, 0.2243058681, -0.1155274436, 0.1021835953, -0.1675846577, 0.20226717, -0.0899584144, 0.0990947261, -0.0947202593, -0.507353425, -0.2690563798, 0.0019003467, 0.1711946726, 0.2324008793, -0.2298646867, -0.2758559585, -0.0460463278, 0.0296140499, -0.0929939151, -0.1754733473, -0.0921413302, 0.0415048562, 0.1299179345, 0.1022346765, 0.0525230952, -0.0641560555, 0.3429869711, 0.3477365077, 0.1908771545, -0.106646277, 0.0014482662, -0.2416457236, -0.1074559838, 0.0510744303, 0.7210323811, -0.017764844, -0.0027944855, -0.2597802877, -0.3887060881, 0.5166323781, -0.2793806195, -0.0613863915, 0.002797395, 0.1745123565, 0.6265727878, -0.1433506012, -0.6584722996, 0.0154641718, -0.0379903801, 0.0367275476, -0.3834745288, 0.3062697351, -0.2717519403, -0.068911925, -0.0705545843, 0.2927140594, 0.333376646, -0.102582179, 0.1612815857, -0.1487856209 ]
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.0050864518, -0.2545412183, -0.0975880772, 0.1058630049, 0.1502092779, -0.1698086858, 0.4342983961, 0.1180539504, -0.285681963, 0.2499661744, -0.1675370634, 0.4118993878, 0.1468530446, 0.1485166848, -0.0885315016, 0.1992191821, -0.1245993897, -0.0692446828, -0.1046521142, -0.0854031742, 0.09940622, 0.1942093968, -0.2547446787, 0.0946518928, -0.1753014177, 0.1913972497, -0.0475019366, 0.0138269486, -0.139434725, -0.3484275341, 0.1026877463, -0.0013408773, -0.0601915382, 0.0998520255, -0.0001287397, 0.0666963086, 0.0852749795, 0.0151903257, -0.0321882851, 0.1148896217, 0.3419383168, -0.0924858972, 0.29417786, -0.2267786562, 0.2994030118, 0.2010619491, 0.3933572769, 0.2928216457, 0.5463503003, -0.113190949, 0.0042869039, 0.228558898, 0.0229933858, 0.5134866238, 0.3447039723, -0.1565416157, -0.2626555562, 0.0360518098, 0.4549467862, -0.2447688282, 0.0202709585, -0.1735134125, -0.1445726752, -0.1309610307, 0.1657723039, 0.3925587237, 0.0644609332, -0.6248464584, 0.0050568115, 0.1813288629, 0.3918074071, -0.2195324302, -0.0531341881, -0.2484405339, 0.0206694119, -0.3290591538, 0.4384995103, -0.0801223814, -0.1662215292, 0.0215375815, -0.2199911624, -0.0387933999, -0.076366052, 0.3075370789, -0.0092370138, 0.089616999, 0.1044290736, 0.1390649676, 0.0363292433, 0.0282408036, -0.1358951628, -0.1827152669, 0.0109648947, 0.3332878947, -0.5986669064, -0.1634165049, -0.0271215215, -0.0691173673, 0.206969887, -0.0307873432, 0.146756649, 0.1431543529, 0.1338286102, 0.0912331194, 0.4436792135, 0.0077232234, 0.1604890823, 0.0440577306, 0.2785818279, -0.137203604, -0.3210591078, 0.1931508332, -0.0700882822, -0.2468801439, 0.0818452016, -0.2111309767, 0.0528816432, -0.2320252955, 0.202260673, 0.1252007037, -0.62037462, 0.0176218189, 0.0182803497, 0.2910582125, -0.0792117342, -0.0218283832, -0.0857143626, 0.0450758822, -0.4482832551, -0.1256740838, 0.0942522362, -0.3879895508, -0.1894799769, -0.0087156557, 0.2495262325, -0.2611216605, 0.1432358325, -0.1522931159, 0.3228127658, 0.1161512733, 0.1629843265, -0.0682687089, 0.2398327142, 0.0830463991, 0.1794324517, 0.1534903049, -0.2191047668, -0.0566175133, -0.0779643506, 0.4114332199, 0.0235466734, -0.0727851167, 0.0412021875, -0.0273828208, -0.2359689474, -0.0660009459, -0.0888215601, 0.1308396459, 0.4844260216, -0.3778199255, 0.0910026133, -0.2624392509, -0.0215130597, -0.0950281918, 0.3381755352, 0.1944521964, -0.1940381378, -0.0274673477, -0.0265709385, -0.0410609953, -0.119507134, 0.4236696661, 0.0039512962, 0.1033085883, -0.0318870619, 0.2316197306, 0.3955102563, -0.2058114856, -0.7310906053, 0.0396427475, -0.2763491869, -0.136283949, -0.2522524893, 0.0629159361, 0.2470756471, -0.0630354062, 0.1072485596, 0.446832478, -0.2058180124, 0.0618840083, -0.431360513, -0.2683359683, -0.063339822, 0.0862641037, -0.1417798996, -0.3473047316, -0.1305565238, 0.1829259843, -0.0755518451, 0.0349514559, 0.2099798471, 0.2865864038, 0.2029319406, 0.0456462428, -0.0300459713, -0.1439757943, -0.4601616263, 0.0268319249, -0.0586414635, 0.2615787387, -0.1202884912, 0.0648178756, 0.234944582, 0.0113875568, -0.2129575759, 0.0243550576, -0.073047936, -0.228470996, 0.0837191492, 0.2112510502, -0.0019164309, -0.2065972388, -0.0059791729, 0.1431184858, -0.4388465285, 0.2543537617, -0.1280644834, -0.4770112634, -0.2971016765, -0.0658224374, -0.3881659806, -0.186555326, -0.1196708158, 0.1069658175, -0.3498892784, -0.166790098, -0.1609002799, 0.4271223545, 0.2303899974, -0.3507653475, 0.1343255043, -0.2931652665, -0.0293532461, -0.0842273757, -0.0780700296, 0.2284289449, -0.159427613, 0.1833509207, 0.0703864768, -0.0162782073, -0.0938536972, 0.0467917174, -0.1287911534, 0.127501592, 0.1001784131, 0.3159773648, 0.3469283283, -0.0476954021, -0.0876376629, 0.3985712528, 0.8972324133, 0.1478901207, 0.0494408086, 0.1409238279, -0.0217286237, -0.1202462167, -0.3746709526, -0.2797940075, 0.2434236407, 0.0051106513, 0.025267411, -0.0428302549, -0.0932139903, -0.0164669827, 0.1810834855, 0.2945487797, 0.0239812173, 0.1551366597, 0.4825345576, 0.0677756816, -0.113149628, -0.0568579659, 0.1012776792, 0.1829891652, -0.1776941717, 0.1054919288, 0.0243345648, -0.1170360371, 0.1892224699, -0.0143278819, -0.3084709644, -0.3321073651, 0.230624944, 0.1722474992, -0.0961345658, 0.2171563804, 0.3602742255, -0.0538763702, 0.1465310305, -0.2379712462, -0.0116183162, -0.3989605308, -0.4639271796, -0.0646316335, 0.5152740479, -0.0921800286, -0.1529767662, 0.1284045279, -0.422504425, 0.0034485497, -0.5699738264, 0.2885663807, -0.2367334068, 0.3893533945, -0.0867004767, 0.2780523896, -0.4414616227, -0.1928230375, 0.2745800018, -0.3448045552, -0.3394560218, 0.1445185244, 0.0448552109, 0.0084371567, -0.206628412, -0.5001223087, -0.0840339214, -0.184168607, 0.3770565093, -0.0746722817, 0.0755597204, 0.0847935379, 0.0967239514, 0.3439751565, -0.0327095836, -0.310695827, 0.0395302251, -0.1168305576, 0.3748588562, -0.208447516, -0.3211795092, -0.1357550174, 0.1308456957, -0.1553775519, 0.0252426527, -0.4053169191, -0.2954773307, -0.3072521389, 0.5448830724, -0.1725354493, 0.0388638824, 0.3364678323, 0.2721450329, 0.1090767384, 0.0870999843, -0.2881273925, 0.3796556592, 0.6361579895, 0.0603713803, -0.1144979447, 0.5326629281, 0.1268234253, 0.8650527596, 0.0501331463, -0.09628997, 0.1846009195, 0.0508204773, -0.0524220243, -0.4184014499, 0.1097521484, 0.1593182534, -0.0444965884, -0.0510265976, 0.2817857265, -0.0252392702, -0.2723649144, -0.0099888593, 0.1290401816, -0.2740389407, -0.3053348064, 0.283379823, -0.1501796693, -0.184742704, 0.2023890764, -0.1284490228, -0.267551899, -0.3865619302, -0.2657364309, -0.2626974881, 0.3266679347, -0.0310012121, -0.526841104, -0.1693629026, -0.4538226128, 0.3003253341, 0.2017199695, 0.1829953194, -0.3149498701, -0.0796469674, 0.2595863938, -0.3560304344, 0.5623479486, -0.2501103282, -0.0077964012, 0.0664592013, 0.1660589576, -0.3364863396, -0.1052749604, -0.1529742479, 0.1791737825, 0.5655252934, -0.20649001, -0.384806633, -0.1788003445, 0.384332478, 0.0949746072, -0.1083512977, 0.0949031264, -0.3024913073, -0.1956836283, -0.3143538535, -0.0694735348, 0.3912863135, -0.0088342987, -0.1087370813, 0.0084654316, 0.2198883444, 0.1827403605, -0.0794844851, 0.2370209247, -0.1183428764, -0.175309062, 0.3294096589, 0.2528045475, -0.1059923768, -0.1877210885, 0.2943140864, -0.0627310723, -0.2948411107, 0.4838994741, -0.1536405981, 0.3558019102, 0.3829168081, 0.2371375412, -0.0817961693, -0.0177957769, 0.1487633884, 0.3896477818, -0.0745607615, 0.4932508469, 0.3155473471, -0.0177193768, -0.1626803875, 0.1486384869, -0.1034396291, 0.0189360529, 0.4798074365, -0.1455780864, -0.064319402, 0.6060298681, -0.0395093784, 0.9872856736, -0.4438491166, 0.3768613935, 0.2483167499, 0.1166120023, 0.3669241071, -0.2621615827, 0.2863933444, -0.3973954916, -0.299611181, 0.23974666, -0.2731795907, -0.2487074584, 0.3163550496, -0.1144674644, 0.0510349013, -0.0501101166, 0.2295384854, 0.0140190609, 0.2362154424, 0.1502757519, -0.1015114263, -0.4429036379, -0.0289848968, 0.038889125, 0.0606170036, -0.0724191964, -0.1615417302, -0.2318305522, -0.131878987, -0.2155956924, 0.2171113789, -0.132420972, 0.0900542736, 0.3183257282, 0.0041820705, 0.2054662108, 0.6948338151, 0.0254574306, -0.0103640389, 0.0692703202, 0.1160050035, 0.0554090738, 0.0455112606, 0.379332602, 0.0686990917, 0.2638888359, -0.1732295901, -0.2370495498, 0.1212744713, 0.1692427099, -0.2451238185, -0.1821861118, 0.0905484855, 0.2008382976, -0.1988249421, 0.0886797383, -0.0004923642, -0.5018953085, 0.0365957692, -0.0460097454, -0.0520538762, -0.0365063995, 0.3843833506, -0.0595827885, -0.1122865975, 0.0794159919, 0.6717549562, -0.1674191058, -0.1439265013, 0.7501502037, 0.2646190822, -0.0452821665, -0.0137439966, 0.1758432537, -0.2018990517, -0.5593950748, 0.0608634092, -0.3067264557, -0.1109320223, 0.1487200856, 0.2183099091, -0.215574801, -0.2242215872, -0.2134022862, -0.3311451674, -0.3069345355, 0.2494445443, 0.0512155332, -0.0429656319, 0.019340381, 0.3812388182, 0.1493998468, -0.093748413, -0.1094001383, -0.0954767913, -0.2970129251, 0.2460080832, 0.0471741408, -0.4202586412, 0.3659622073, -0.1423823386, -0.045359619, 0.2743966877, -0.2231200039, -0.0985881537, 0.1066616178, 0.2159392089, -0.0818300322, -0.0772703588, -0.2459409088, 0.0146407709, -0.0089587839, -0.2189131379, 0.2781190574, -0.2800691426, -0.0316737667, -0.0328372978, -0.0027317619, 0.2612271607, 0.0019772798, 0.0846834332, -0.031855043, 0.0304129403, 0.3323299289, 0.304415524, 0.0692907572, -0.015113622, -0.2690471113, -0.0072409622, 0.1001594663, 0.087748751, 0.275363028, -0.4385764599, -0.1707719415, -0.2107211351, -0.1101354808, 0.5926235914, -0.1895664632, -0.3875773549, 0.2923749089, 0.0179402903, 0.0572982728, 0.1216676682, 0.5638594627, 0.0478486046, -0.0091146231, -0.0947177559, -0.0207890272, -0.0896747336, 0.029075997, 0.2730593383, 0.3346318603, -0.5037520528, -0.008634273, 0.3587886691, -0.0602078848, 0.0653518662, 0.0825373679, -0.0608055033, 0.1784905642, 0.3039408922, 0.1708103567, -0.219697699, -0.5023556352, 0.450532794, 0.242802605, -0.2482264042, -0.3020808995, 0.5325149298, 0.3196107447, 0.5286597013, 0.2846613228, 0.3522033989, 0.1508638561, -0.2730671167, -0.2414684892, 0.3165406585, -0.0552547276, -0.0754421726, -0.0673513114, -0.0525945649, 0.040039748, 0.3657520115, -0.2580027282, 0.0849261209, 0.4335431755, 0.4367711246, 0.0632367581, -0.2560558617, -0.152141422, -0.0732762143, 0.3150064349, -0.0367241204, 0.3979533315, -0.0304547474, -0.1338929385, -0.3677637279, 0.2811623514, 0.2063678503, 0.3232462406, -0.560747087, 0.428863138, 0.0544944331, 0.027819097, -0.0197823197, 0.1850554943, 0.2880261242, 0.075682804, 0.0303503387, -0.0751663148, 0.0033642612, -0.2747897506, 0.1871064007, 0.3222299218, 0.1376531273, -0.2230949253, 0.2568220198, -0.3423520923, 0.1055422425, -0.1402104497, -0.4819661975, 0.2016892135, -0.0350151509, 0.0202046521, 0.0368417762, -0.0110752583, -0.0054087322, 0.0955958813, 0.6279262304, 0.3679856062, 0.2386386395, -0.0641037524, 0.0885593444, -0.4655945301, 0.264867574, -0.0297682136, 0.1389422715, 0.3166323602, 0.3369348645, 0.1583119482, 0.325551033, 0.2213922292, -0.2028584778, -0.4033807814, 0.5688689947, -0.5948470235, -0.1591483206, 0.0863337517, 0.1069519892, -0.1165289581, -0.2735642791, 0.0781194568, -0.2249496132, -0.1005938947, -0.2130747736, -0.0974000022, -0.0582080632, 0.161388427, 0.2476559579, 0.2895667553, 0.1646668315, 0.0070551559, -0.161726892, -0.1248115823, -0.1267133057, -0.0711518824, 0.0957816988, 0.0410699435, 0.0500346124, -0.2549121976, 0.2613505721, -0.273588717, 0.016829446, -0.0059975013, 0.2123405188, 0.0228472427, -0.3081660271, 0.4737375677, 0.213934198, -0.0859781206, 0.5660754442, -0.0658093542, -0.0802732781, -0.6256958246, 0.1396762431, 0.2787376046, -0.4091792107, -0.1944172084, 0.1413304359, 0.1041905135, 0.2522995174, -0.0474651195, -0.4054488838, -0.0626425892, 0.1113281474, -0.1385064125, -0.6580844522, 0.1909582615, 0.3545120358, 0.139169991, -0.2182251662, 0.0990575254, -0.0152475163, -0.1090778261, -0.1203648373, -0.2823944688 ]
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.1289256513, -0.3091130257, -0.0682563111, 0.1572481096, 0.2135084867, -0.1734552681, 0.3533765674, 0.1509892493, -0.1582412124, 0.1141945124, -0.2389450222, 0.4564893842, 0.1083218083, 0.1284246147, -0.0192697253, 0.1580437869, -0.1359723061, 0.0216664001, -0.1383989155, -0.1211571693, 0.1282724589, 0.3092677295, -0.2475367337, 0.0375252925, -0.1744518578, 0.208010003, -0.1016789973, 0.0072083282, -0.1468411535, -0.3405947983, 0.1364495456, 0.0454997644, -0.1865523756, 0.1471101642, -0.0001257587, 0.0547158122, 0.0463493504, -0.0335171148, -0.0842948332, -0.0720029175, 0.3044875264, -0.1794090569, 0.3073302507, -0.1446630806, 0.1273199618, 0.3064395487, 0.3526680768, 0.2476815581, 0.6475166678, -0.1010442376, 0.0140079688, 0.341314137, 0.020277001, 0.5116379261, 0.2437880486, -0.0982790813, -0.3499836326, 0.0335913748, 0.3750882149, -0.183228597, 0.1367814243, -0.060827177, -0.0739212781, -0.0898049623, 0.1925570071, 0.4039259255, -0.0741323084, -0.6528963447, -0.0021788701, 0.2572256029, 0.2794763148, -0.1696969718, -0.120020099, -0.3368323147, 0.0148051716, -0.4079924822, 0.4944002926, -0.0794704333, -0.1530282944, 0.0317081884, -0.182489723, -0.0652211607, -0.0135256276, 0.279302299, 0.0590096712, 0.1251696795, -0.0725417957, 0.0867162943, 0.0587758422, 0.0040246267, -0.3797964752, -0.1810683906, -0.0119343251, 0.3528048992, -0.5798327327, -0.2715927064, -0.0327339508, 0.0594734624, 0.1253582537, 0.0762942731, 0.1430135965, 0.1827673316, 0.0188216716, 0.0414594151, 0.4148795903, 0.0017271601, 0.2859445512, 0.0397364311, 0.2681472898, -0.033296302, -0.2699631155, 0.1644414514, -0.0023879558, -0.1432307363, -0.1291365921, -0.2096811831, 0.1443168819, -0.3338889778, 0.223859936, 0.1400536746, -0.5295664668, -0.0235965941, 0.0451125279, 0.3480334878, -0.1645062417, -0.0118466998, -0.0154617578, 0.0286531746, -0.4626114964, -0.092097044, 0.0960531533, -0.4005877972, -0.1462286264, 0.0067685731, 0.2733541727, -0.3486693203, 0.27134794, -0.1475231647, 0.2598332465, 0.1013621986, 0.1670903563, -0.0870445967, 0.2051351368, 0.0524540991, 0.1002827287, 0.1181939319, -0.1334882677, -0.1894539893, -0.0926412717, 0.2097845972, 0.1490688622, 0.0154650807, 0.0886515155, -0.0408376418, -0.2455913723, -0.053560853, -0.0409293845, 0.2703983188, 0.3567351401, -0.3351743221, 0.06058079, -0.1100201234, -0.1654800922, 0.033664234, 0.3799241185, 0.2518183589, 0.0483140498, -0.241093576, 0.0075254403, -0.0359108597, -0.228218779, 0.4138221741, 0.0667631701, -0.0232568085, 0.0048592165, 0.1988448799, 0.4201338589, -0.213872537, -0.5843526125, 0.1227919906, -0.2901559472, -0.0611701086, -0.3185212314, 0.0572844259, 0.1865841746, -0.113251701, 0.1086200997, 0.3744205236, -0.1522416621, 0.052058585, -0.4770558476, -0.2232017815, -0.0265083183, 0.032768622, -0.1929165721, -0.2336607277, -0.1907961816, 0.2977529466, -0.0531564094, 0.048893325, 0.1820815355, 0.3569728136, 0.1773023754, 0.1362027824, -0.1015440077, -0.1310833693, -0.5059304237, 0.030113712, -0.0826802999, 0.4368837774, -0.0742787272, 0.0415670723, 0.2162152827, -0.0862875357, -0.2092489451, -0.0907135904, -0.0478547476, -0.1511383951, 0.0789049715, 0.2883448303, -0.0765572712, -0.1462706625, -0.0684961304, 0.2294391543, -0.5454388857, 0.2303233743, -0.1101197898, -0.3616025746, -0.2829393744, 0.0522339121, -0.3480921388, -0.1953463256, -0.1199696213, 0.0457644761, -0.4057115614, -0.1182205006, -0.0787371397, 0.3996132612, 0.3000270724, -0.2792616487, 0.0288000982, -0.1769138426, 0.0589298643, -0.0994167179, -0.1693899632, 0.300050348, -0.1911523193, 0.1421569437, 0.093740277, 0.0221832097, -0.0751483515, 0.0131151453, -0.1991496682, 0.0291858166, 0.2271128297, 0.3052904904, 0.3777759671, 0.0039162803, -0.2030638009, 0.2866192162, 0.8647708297, 0.2128258944, 0.0915231705, 0.1407785118, 0.0420253016, -0.1311242133, -0.3347012699, -0.2349751294, 0.2353042364, -0.0368022881, 0.0103975227, 0.0471232608, -0.0723184645, 0.0022590905, 0.2268695384, 0.2180669606, -0.0744217485, 0.1118380055, 0.4056484699, 0.1075129211, -0.1748204231, 0.0449035689, 0.07361231, 0.191654563, -0.2182612866, 0.0064423978, -0.0735022202, -0.1446315944, 0.1790856421, 0.0557615422, -0.4943912029, -0.3087975979, 0.1794398874, 0.0868465304, -0.0174651295, 0.2599859238, 0.3050740957, -0.0461210907, 0.0266664028, -0.1626855731, -0.0823713243, -0.3713196516, -0.3768123388, -0.0614232831, 0.489564538, 0.0645243153, -0.1084215418, 0.0187372342, -0.5041588545, -0.0094817653, -0.6358892918, 0.3481923342, -0.3971452415, 0.4128518999, -0.0781825036, 0.2758356631, -0.4864445031, -0.0928508192, 0.3476952314, -0.3571272492, -0.3248539567, 0.0642939955, 0.0845776722, 0.027451843, -0.2390640229, -0.5075420737, -0.0715254992, -0.2004793435, 0.605266273, 0.0293332264, 0.0404657274, 0.2019645721, -0.0366265327, 0.4214387238, -0.1367387772, -0.1317185611, -0.0288178325, -0.1558273286, 0.3360875547, -0.1849849522, -0.3257568479, -0.126558885, 0.166583091, -0.1240953505, -0.1564630121, -0.3962713182, -0.4087887406, -0.3515099883, 0.4195168018, -0.08567743, 0.0416092947, 0.3636347055, 0.2145563513, 0.0893891379, 0.0769143477, -0.3594814539, 0.4156850874, 0.5649590492, 0.0811526254, -0.0618205629, 0.5869224668, 0.125898093, 0.763253808, 0.1647185981, -0.0777329206, 0.2583013475, 0.0622728914, 0.0986935049, -0.3876314163, -0.020706445, 0.1824164689, 0.028672643, 0.1055804417, 0.2620315254, 0.0494952984, -0.120200783, -0.1215321124, 0.1444304287, -0.258960247, -0.3341293335, 0.1795340925, -0.1171998307, -0.1604580283, 0.2035467178, -0.0725464374, -0.2122999132, -0.4061674476, -0.2326292694, -0.0760393888, 0.3426358104, -0.1049859971, -0.6462796926, -0.0349219143, -0.5429955125, 0.2988604307, 0.1454877257, 0.1586168408, -0.3372980356, -0.0721187964, 0.2224740684, -0.2879295349, 0.4114735126, -0.1915261447, -0.0516271256, 0.0511148274, -0.0398452803, -0.2840805054, 0.1139926165, -0.1935247779, 0.1324242502, 0.6303723454, -0.0946357846, -0.5235410333, -0.3121539354, 0.3164809048, 0.0571210384, -0.0688862726, 0.1559966952, -0.3152291179, -0.1021755859, -0.4176951945, -0.0969290137, 0.3561068773, -0.0781290308, -0.0542629138, 0.1125812829, 0.1985898912, 0.1470996439, 0.0097376034, 0.2579271197, -0.1269592494, -0.0956372619, 0.3598084748, 0.2257263064, -0.0573015735, -0.3894455731, 0.4335390031, -0.1299568713, -0.3766609132, 0.398106426, -0.1200796366, 0.2812707424, 0.4696208835, 0.2516360581, 0.040198274, -0.0422493219, 0.2157251984, 0.3636835515, -0.0476307198, 0.5195013285, 0.3840841651, 0.0357617624, -0.1599827707, 0.1930097044, -0.157941103, 0.0557069331, 0.4740771949, -0.0046685748, 0.0101703368, 0.4886055887, -0.0979203582, 1.0059645176, -0.3302904665, 0.4059489965, 0.2713977695, 0.0539784655, 0.5820281506, -0.1612092257, 0.2256226391, -0.4188754559, -0.3026839793, 0.2059725672, -0.1448080838, -0.1869810075, 0.2278210968, -0.1691359282, 0.152898863, 0.0752877742, 0.1367149949, -0.0368948765, 0.2807764709, 0.0383460075, -0.197774902, -0.6501988769, 0.00400839, -0.0306057669, 0.2507350147, -0.0437817425, -0.2037797868, -0.2344389707, -0.1280354857, -0.1990260333, 0.2368149161, -0.1423742771, 0.0358919203, 0.39334777, -0.0302770585, 0.2490170449, 0.702318728, 0.1513837874, 0.0587399453, -0.0325751603, 0.1326154321, -0.1110467613, 0.0730693787, 0.3623230755, 0.0922648609, 0.2442236841, -0.1902028471, -0.1516872644, 0.0013156934, 0.1061451733, -0.2138438225, -0.1322258711, 0.035818696, 0.0391897447, -0.1144882888, -0.0518016294, 0.1280813515, -0.4593140483, 0.0096015111, -0.0241173543, -0.0343451947, -0.0522565357, 0.1823451519, 0.1109327525, -0.1212470457, 0.0807991326, 0.6947200894, -0.3671648502, -0.1893382072, 0.7166755795, 0.2581757903, -0.0477396846, -0.059270177, 0.1794995219, -0.243833065, -0.6025196314, 0.078658998, -0.1984287053, -0.2134572566, 0.1613489985, 0.3437255025, -0.1560999155, -0.1773865074, -0.0807451308, -0.2184285074, -0.3117402196, 0.254221648, -0.0011974671, -0.030578278, -0.0276498087, 0.3899834156, 0.220492661, -0.0599077493, -0.1270697415, -0.0305319037, -0.4184254408, 0.218429938, 0.2104666978, -0.5042173266, 0.4190065563, -0.1174021512, -0.0263553578, 0.293533653, -0.2947072387, -0.097205624, 0.0434845239, 0.1996436417, -0.0416939557, -0.0970212892, -0.2538356185, 0.0925871357, -0.0653589368, -0.2937572002, 0.2045024335, -0.2466242462, 0.0194893479, 0.0361423865, -0.0797324777, 0.3411544561, 0.024763748, 0.0372036658, -0.0388085507, -0.0269219242, 0.3201968074, 0.1649173796, -0.0070519857, 0.0222637802, -0.2711977363, 0.0372971296, 0.0745583028, 0.0469816364, 0.2867673039, -0.3284997344, -0.1481303126, -0.1287608892, -0.0638732314, 0.5036649108, -0.0933880806, -0.250955373, 0.2977610528, 0.0191160142, -0.0197153613, 0.1968263686, 0.58250916, 0.1026281863, 0.0625445843, -0.0672756135, -0.0154114291, -0.0110471621, 0.0916269124, 0.2495031357, 0.278855592, -0.6175314784, 0.0525371544, 0.2572176754, -0.0248941481, 0.0649420321, 0.0557322204, -0.0471887514, 0.1620463878, 0.1522073597, 0.1121233329, -0.1864191741, -0.5657686591, 0.5901626945, 0.3083996773, -0.2395472825, -0.2778963149, 0.473243773, 0.3027629852, 0.5327270031, 0.2283584476, 0.4041006565, -0.0285827443, -0.3256966472, -0.2354799509, 0.4408732057, -0.0501162186, -0.1448830217, -0.0015081838, -0.0594527647, -0.0572993383, 0.2851229906, -0.2409452945, 0.0650761873, 0.3318475783, 0.4306077957, 0.0960692912, -0.3528822958, -0.2499439269, -0.0605904683, 0.4490506947, 0.0333406776, 0.4102717638, -0.0495204888, -0.0978209078, -0.3445427716, 0.3547850847, 0.153797105, 0.2586193681, -0.4484899342, 0.4428225756, 0.047702264, 0.0321001559, 0.0469627306, 0.2841463983, 0.2792509496, 0.0861324444, 0.0426208749, -0.0812559426, -0.0264660809, -0.2729156613, 0.033747457, 0.2761285603, 0.0765258074, -0.0008551925, 0.1916520149, -0.2293902487, -0.0552538857, -0.1104441136, -0.5082322359, 0.2749861479, -0.1005489007, 0.0665359274, 0.0339575298, -0.0932469666, 0.002977632, 0.1635859907, 0.4926815629, 0.2839578092, 0.1227542534, 0.0100102872, 0.0288747251, -0.6039533019, 0.1588703543, 0.1284504533, 0.1115104854, 0.2243483961, 0.292047441, 0.2114551663, 0.3512556553, 0.0846399814, -0.2181589901, -0.2167146653, 0.3210614324, -0.5578283072, -0.0757726729, 0.0069504296, 0.0788914263, -0.0357013233, -0.1501207054, -0.0647810102, -0.0872543454, -0.1353290677, -0.2084427774, -0.0388616994, -0.2230319232, 0.1890409738, 0.095354721, 0.3319293261, 0.0939934403, -0.0453674458, -0.3141001761, -0.0758100897, -0.1758025587, -0.0934363604, 0.1746332645, 0.009501446, 0.1047802567, -0.2335820198, 0.2436618805, -0.3363448679, 0.0289928392, -0.0339804851, 0.2507983446, -0.0553377569, -0.2667058706, 0.4273792505, 0.2657974958, -0.0795617178, 0.6648862362, -0.0860895514, -0.0889239162, -0.5790916681, 0.1271741092, 0.3910953999, -0.4176438749, -0.0960393921, 0.1227005422, 0.1189789996, 0.311298728, -0.1813849807, -0.5510277748, -0.1144213453, 0.0826355889, -0.2009816319, -0.5723954439, 0.1652614772, 0.2652081847, 0.0955538452, -0.2220437676, 0.0918627381, 0.0356681757, -0.0469324961, 0.0217827782, -0.2249053121 ]
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.0539377034, -0.1870069355, -0.0742784739, 0.0692925751, 0.1881322563, -0.0918407217, 0.4278537035, 0.2430594862, -0.3870011568, 0.1208236367, -0.2542550564, 0.472435087, 0.1759659946, 0.2033963501, -0.1053898335, 0.1071930975, -0.1148366928, 0.0579198115, -0.0958417952, -0.0491204001, 0.1031024382, 0.3184983432, -0.2580774128, 0.165063709, -0.3105029762, 0.1500938684, -0.0909852535, -0.0632391199, -0.2213093191, -0.3299462199, 0.0668835118, -0.0400810316, -0.0191353895, 0.1387691349, -0.0001242538, 0.0448898375, 0.0489350073, -0.0396052748, -0.1172186434, 0.0515079796, 0.2815465629, -0.0927221403, 0.3024719656, -0.1993807107, 0.1215284765, 0.1908759326, 0.3395656049, 0.1250124276, 0.6102435589, 0.0073203705, 0.0559757203, 0.2696264386, -0.0333203077, 0.4009648263, 0.2310596108, -0.105735749, -0.4094343483, -0.0279107019, 0.3057386875, -0.073764801, 0.0937428549, -0.0345545039, -0.0047439784, -0.0890351534, 0.2041343302, 0.4473014772, 0.0543919466, -0.733202517, 0.0954591706, 0.1459837407, 0.4292937815, -0.1636780351, -0.0888444558, -0.1996162534, 0.0285849683, -0.4379119873, 0.4338603616, -0.0437152945, -0.1576813906, 0.0147964787, -0.0896566659, -0.0634036958, -0.0821778625, 0.1596628726, 0.0451031029, 0.082153216, -0.0101995561, 0.0811631531, -0.0007753777, -0.0306911301, -0.2821882963, -0.1224424914, -0.0369159766, 0.312915355, -0.6525635123, -0.2602998614, -0.2111932635, -0.0127824396, 0.0090756044, 0.0486085005, 0.1738573611, 0.1454141289, 0.0982823074, 0.0378657654, 0.3953725994, -0.023472771, 0.2744033635, 0.1286569834, 0.2145038396, -0.1013749093, -0.3396112025, 0.1972132027, -0.0063052364, -0.2773444355, -0.0041834712, -0.1296573579, 0.2134010345, -0.3412666023, 0.2097338736, 0.0644890517, -0.604883492, 0.0543596409, -0.0302814171, 0.2907120883, -0.0818568692, -0.0012988457, 0.00036598, 0.1126073301, -0.4264135361, -0.1001877189, 0.093871817, -0.318990469, -0.165936172, 0.0253953822, 0.2953772247, -0.3251472414, 0.1266683042, -0.1675281972, 0.2411948889, 0.0676402748, 0.2005024105, -0.0495285206, 0.1837720275, 0.0253389366, 0.0428991169, 0.1298455298, -0.2254209518, -0.142317459, -0.0521085188, 0.3205444217, 0.1021718234, 0.0004594475, 0.0579672232, -0.0064166668, -0.1158364862, -0.1142976433, -0.0920281336, 0.2776232064, 0.3569950461, -0.3189861774, 0.0056367368, -0.3019961417, -0.0978622735, 0.0077758878, 0.4229873717, 0.2221722901, -0.0393857881, -0.1806022525, 0.0099334605, -0.0670609847, -0.1639230102, 0.3881367743, 0.0671418607, -0.0684333295, 0.0487902239, 0.2698663473, 0.5018535256, -0.236026749, -0.5605531335, 0.0842082351, -0.3151652217, -0.2124066353, -0.3700897396, 0.0882237405, 0.2761766315, -0.1064587086, 0.0501354598, 0.3990449607, -0.1892983168, 0.1165635809, -0.4404366612, -0.2546901107, 0.0071924739, 0.0387987494, -0.0335725881, -0.2508608401, -0.1457508653, 0.3366513252, -0.1375256926, 0.0508827716, 0.2727855742, 0.2217579037, 0.1935019344, -0.070233807, -0.012520656, -0.0654191822, -0.5470225215, 0.0346956477, -0.0949997902, 0.429087162, -0.0072945356, 0.0913427621, 0.1463081539, -0.057468228, -0.2194215208, -0.1102264449, 0.0015852861, -0.2296862155, -0.0181348287, 0.1705192924, -0.0965173021, -0.1747610569, 0.0136871785, 0.2303231508, -0.4198416471, 0.2105486989, -0.2102124393, -0.431629926, -0.2027973235, -0.120708324, -0.2658187449, -0.1366965771, -0.24712722, 0.0317467451, -0.2937165797, -0.0242924429, -0.0219216198, 0.4465960562, 0.3535357714, -0.4185460806, 0.0960638598, -0.2039043754, 0.0543001145, -0.0944243371, -0.1779817343, 0.1937720627, -0.2655297518, 0.2218673378, 0.0622496307, 0.0845489055, -0.0982310995, 0.0846858174, -0.20079422, 0.0403163955, 0.0268418007, 0.2826342881, 0.2617366612, -0.0307283178, -0.1640803814, 0.3843755126, 0.7712836266, 0.2200624496, 0.0041625099, 0.1855038106, 0.068493031, -0.1383883506, -0.2919833362, -0.2560808659, 0.1829891652, -0.0792284608, 0.027755877, 0.0691760406, -0.1116229296, 0.036719013, 0.2313182652, 0.2731530666, -0.0039716586, 0.0878643319, 0.392400682, 0.1269478053, -0.0596855208, -0.0752699971, 0.1465486884, 0.1641419083, -0.219327271, 0.012542583, -0.1379266679, -0.0650571957, 0.0902583301, 0.0596545152, -0.3185711503, -0.3496060371, 0.222376734, 0.1179310903, -0.0026535019, 0.326967448, 0.1722248942, -0.0225331783, 0.052918613, -0.1150831506, -0.0832123905, -0.3923434615, -0.407689631, -0.0095230266, 0.4277978539, 0.1665220559, -0.096634984, -0.0519466586, -0.2906078398, -0.1139915213, -0.6097022891, 0.3551805913, -0.373860836, 0.4278283417, -0.1368179917, 0.2860460877, -0.4543645382, -0.0607181378, 0.3598075211, -0.319421649, -0.2685781717, 0.086333856, -0.0198579729, -0.0580553375, -0.1565553695, -0.6044726968, -0.1301189065, -0.1716372371, 0.3883115053, 0.0377664492, 0.0577207208, 0.1623962373, 0.100099057, 0.4368858337, 0.0836393386, -0.1327848434, 0.0724737644, -0.0684209764, 0.3780962527, -0.2309395224, -0.3176392913, -0.0995135307, 0.2158454061, -0.1500914991, -0.1090745032, -0.3428517878, -0.3040425479, -0.3614274859, 0.3931963444, -0.080154486, -0.0459433049, 0.3395406306, 0.2874935567, 0.0575972833, 0.1020127833, -0.4317061305, 0.4576954544, 0.7315326929, 0.0766993091, -0.018351214, 0.5675569773, 0.0997233838, 0.8816779256, 0.1115861237, -0.1668650359, 0.2578694224, 0.0367081985, 0.0419229791, -0.483292371, 0.0303244367, 0.2113535702, -0.0642781109, 0.0273591951, 0.1935279369, -0.0152920457, -0.1945041269, -0.1208989024, 0.1814962476, -0.2288672924, -0.3178032041, 0.1604895145, -0.2234324813, -0.1628770381, 0.1666611135, -0.0731886625, -0.1899701059, -0.3545715511, -0.187799111, -0.0863397568, 0.3585195541, -0.0291263517, -0.6207340956, -0.1096366793, -0.4323068261, 0.3310406208, 0.1397510916, 0.2593170106, -0.368408531, -0.0728357881, 0.225154236, -0.291162461, 0.2268967479, -0.2127641737, -0.0970880091, 0.1606954932, 0.0468070954, -0.251103282, -0.0750724673, -0.1435160041, 0.191296041, 0.494971633, -0.1217661127, -0.3668162823, -0.2991459072, 0.3354326189, 0.1143845618, -0.0547582135, 0.2381699681, -0.2625120282, -0.0675503016, -0.4722184241, -0.0732917786, 0.4041703939, -0.1168124005, -0.0586256944, 0.068898797, 0.1878000051, 0.1327372193, 0.0061506107, 0.3224439025, -0.0995453522, -0.0768679231, 0.4044605494, 0.2092101872, -0.0673902035, -0.3526377082, 0.3883754909, -0.0610332899, -0.4078303277, 0.4994018674, -0.1445934027, 0.3027718663, 0.4482415915, 0.1930815279, -0.1404142529, -0.0068497881, 0.1819931865, 0.3776972592, 0.0128544681, 0.526281774, 0.2901243865, -0.0197924823, -0.1219245791, 0.1650861502, -0.1874385178, 0.0183326453, 0.4783317149, -0.0286262631, 0.0383422375, 0.567727983, 0.0381432734, 0.9758566022, -0.2699213624, 0.274384588, 0.1987364739, 0.009300217, 0.4218442738, -0.1443622559, 0.2698318958, -0.526617527, -0.2899627388, 0.243376404, -0.2169336379, -0.2555156648, 0.1828204691, -0.2217989117, 0.0740425289, 0.0077104419, 0.1622264981, -0.0115710218, 0.2984126806, 0.1152761057, -0.2819033563, -0.4721385539, 0.0487286747, -0.104938671, 0.2490480691, -0.0030686595, -0.1782487482, -0.3353845477, -0.0918076411, -0.2292082012, 0.2933659852, -0.1197619289, 0.104752779, 0.2387641072, -0.0602762997, 0.1600344628, 0.6947132945, 0.1500717849, -0.0886845812, 0.0165482108, 0.1643886119, -0.044490505, 0.0688966513, 0.4028811157, 0.0373277515, 0.2904090583, -0.2089940012, -0.2103514522, 0.0769347847, 0.151714772, -0.1790323853, -0.1565608829, -0.1059654802, 0.0931831151, -0.0638352111, 0.0012963936, 0.0256595984, -0.5122879744, 0.0354581922, 0.0154430866, -0.1162632257, 0.0667458549, 0.2826850712, 0.1746971756, -0.1020617932, 0.12296547, 0.6355891824, -0.3503260016, -0.1124670953, 0.7513549924, 0.2271388322, -0.0329827853, -0.1053859368, 0.2558532655, -0.3011708856, -0.5768544078, 0.0415049531, -0.3038918078, -0.2306895703, 0.1752120554, 0.340495795, -0.139219299, -0.239908725, -0.0772818103, -0.200079143, -0.3080738485, 0.212982893, -0.0899989754, 0.0486357436, -0.1046150625, 0.3674403429, 0.1863700151, -0.041243501, -0.1533665359, 0.0126691088, -0.3003509343, 0.2798072398, 0.1758855283, -0.4567353725, 0.2779488862, -0.0599138439, -0.0336160474, 0.3118649721, -0.2465889901, -0.1095212698, 0.0179147944, 0.1941849291, -0.0406495556, -0.0990186632, -0.3305046856, 0.0980900824, -0.1401504874, -0.2644594908, 0.2234963328, -0.2495934963, -0.0252180211, 0.1089903265, -0.1077736318, 0.2229652554, 0.0980561525, 0.024152454, 0.0800205916, 0.0913210064, 0.3303564191, 0.2263108939, 0.0073868595, -0.0227948353, -0.3700705171, 0.0525563061, 0.0209175125, 0.0719655603, 0.2483476996, -0.3310930431, -0.0387911052, -0.1785291731, -0.1730984449, 0.5225907564, -0.1272379756, -0.2101667821, 0.2399605513, 0.0557607636, 0.0225933194, 0.1883441061, 0.5434414744, -0.0400637425, -0.0050352216, -0.0892436355, 0.0082852244, 0.0305795074, 0.1435266286, 0.2447313517, 0.3117628396, -0.6137401462, 0.0980033726, 0.2173489928, -0.0661799684, 0.1176310033, 0.0674416721, -0.0732720271, 0.1785866618, 0.1344175488, -0.0379487425, -0.2305819839, -0.4712122083, 0.5559193492, 0.4206784368, -0.1522448361, -0.3123296797, 0.4449592829, 0.2855593264, 0.4789653718, 0.3186173737, 0.3901517689, -0.0537829399, -0.3576959968, -0.3769515157, 0.325718224, -0.0997565687, -0.0764378831, -0.0174456388, -0.1103937626, -0.11507608, 0.2794767618, -0.3362812102, 0.1715203077, 0.3045943081, 0.507587254, 0.0787337571, -0.2455800325, -0.2372633815, -0.0703527331, 0.420848608, 0.0386339575, 0.4022469223, -0.1057445928, -0.1016262546, -0.3066690862, 0.3072881103, 0.1976906359, 0.2935114503, -0.6400920749, 0.3875581622, 0.1321142018, -0.0059111565, 0.2638388276, 0.2280212194, 0.2538407147, -0.0595622025, 0.1545854807, -0.0592813194, -0.0248898417, -0.3027152717, -0.0009210231, 0.2783114612, 0.0832828209, -0.0609325282, 0.2151126266, -0.2164380252, 0.0376055762, -0.1263163388, -0.3947072625, 0.1769412756, -0.1372811049, -0.0508241616, -0.0380622745, -0.079835102, 0.0224107541, 0.1355582327, 0.5751467943, 0.1674958318, 0.1027366146, -0.0704299062, 0.1621202528, -0.6096413136, 0.2065857947, 0.2451089025, 0.1028088108, 0.2863226831, 0.3193441629, 0.2587864995, 0.4257703424, 0.2457887828, -0.2119679451, -0.155828476, 0.4385855496, -0.5146778226, -0.0335091986, 0.0834742635, 0.1615608037, -0.0992895961, -0.2035088241, -0.0254346468, -0.1245812401, -0.0927736014, -0.2628904283, -0.2807004452, -0.0632414296, 0.1414942145, 0.2277923226, 0.297929883, 0.1224619299, -0.0314633548, -0.2810342312, -0.1568276733, -0.2138563991, -0.0536394827, 0.0513225496, -0.0312871709, 0.1245362014, -0.0799801871, 0.3601014912, -0.4278177321, -0.0402000621, -0.0839043781, 0.2810066938, -0.0773709565, -0.2369511724, 0.3989083767, 0.2445237786, -0.0396409929, 0.5937418342, -0.0521085411, -0.0306178369, -0.6759064198, 0.0881919265, 0.3299511373, -0.3246208429, -0.1571732461, 0.1668065637, 0.0793769136, 0.3383035958, 0.0851810947, -0.4567797184, -0.0500467569, 0.0678002536, -0.2592573166, -0.5594132543, 0.1471490562, 0.4032057226, 0.1689865142, -0.2204863876, 0.1316608489, -0.0463545322, 0.052267544, -0.2600904405, -0.2189251333 ]
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.0882880986, -0.082216613, -0.0899110585, 0.1087927818, 0.1185984984, -0.0889240056, 0.4757876992, 0.208189562, -0.2753666639, 0.1408069134, -0.2147417068, 0.4715826511, 0.1646790355, 0.061681509, -0.1162424833, 0.1537865102, -0.1585141718, 0.0361108929, -0.0435177013, -0.0942483991, 0.0881525427, 0.3064972758, -0.3244804144, 0.1371068209, -0.2413130403, 0.2019750774, -0.0675991103, -0.0492334403, -0.1338678002, -0.3987389803, 0.0902896002, 0.0110533945, -0.0539939962, 0.1521508545, -0.0001268104, 0.0641144514, 0.1259067953, -0.0447380804, -0.0788738802, 0.0518748909, 0.2480293214, -0.0301096141, 0.3839223385, -0.2232054174, 0.1997665465, 0.2042779028, 0.3820059299, 0.0985118002, 0.5644933581, -0.0939925611, 0.0145406537, 0.268162787, -0.0877723023, 0.4349064231, 0.2906714082, -0.1680426896, -0.3519191742, -0.0400069989, 0.3742505908, -0.0923340693, 0.0832194984, -0.047950387, -0.0200904384, -0.0459481031, 0.1264987588, 0.477640152, 0.0331444182, -0.7292940617, 0.1101480573, 0.2397385538, 0.4590663016, -0.1601785719, -0.0912277997, -0.1838962734, 0.0088330843, -0.3579072952, 0.4505924881, -0.0299416408, -0.0901348889, 0.0185387246, -0.0743217543, -0.0404007807, -0.0883394629, 0.2276090682, 0.1097402722, 0.1179818213, 0.0200541839, 0.1539659947, -0.0590440631, 0.0156814475, -0.1864432991, -0.2057795376, -0.1096620858, 0.3239535093, -0.6241595745, -0.2234713435, -0.151556626, -0.0737283826, 0.0315625668, 0.0660685301, 0.2326869369, 0.213003993, 0.1060305908, 0.0576226078, 0.4097148478, -0.0594155937, 0.3594406247, 0.15252617, 0.2901145518, -0.0899540931, -0.3181610405, 0.1908805519, -0.0522585399, -0.2366309017, 0.001914233, -0.1777712107, 0.10454081, -0.2911323011, 0.2693876326, 0.0756652057, -0.6122699976, -0.0127222463, -0.0352847502, 0.3106815219, -0.1387451291, -0.0190660283, -0.0420422368, 0.044193361, -0.3719221354, -0.0598584525, 0.0867926851, -0.4458230138, -0.12685211, 0.0292037725, 0.2845353484, -0.2773235142, 0.2217054665, -0.2348588407, 0.2051869184, 0.0649388954, 0.2884627283, -0.0199455172, 0.1899875849, 0.0648313314, 0.1371376663, 0.2041117102, -0.2799103558, -0.1149778962, -0.091258429, 0.3285956681, 0.0530045144, -0.0008447692, 0.088171266, -0.0615694486, -0.1474290639, -0.0972122997, -0.0326791406, 0.1581484377, 0.3567197919, -0.2990534306, 0.0931835622, -0.160666883, -0.0742569938, -0.0157865714, 0.3695380688, 0.2457431853, -0.0112884492, -0.1803424656, -0.0644406527, -0.007745875, -0.2145558447, 0.3933412731, 0.0173163526, -0.0514569841, 0.0583467111, 0.2661232352, 0.4861610532, -0.220908612, -0.5594335198, 0.1241094023, -0.2801666856, -0.2539251745, -0.327547133, 0.0745495632, 0.2965095937, -0.1045870185, 0.0722664446, 0.3634412289, -0.0934678242, 0.0332765728, -0.4079682827, -0.3176831007, -0.0736906976, 0.0167575628, -0.1066099256, -0.334757328, -0.1468244493, 0.2155674398, -0.0763266981, 0.04715259, 0.2931106389, 0.3203014731, 0.1911580265, -0.0128344893, 0.0090579316, -0.0042148009, -0.5717049241, 0.0901394188, -0.0780276209, 0.3007613719, -0.062499471, 0.0468623713, 0.2347542942, -0.0451568291, -0.2232613266, -0.1361991316, -0.0694331601, -0.2399131358, -0.0109199211, 0.2301581502, -0.0736902207, -0.3139735758, -0.0080873668, 0.1840164214, -0.3748851418, 0.1614420414, -0.1260192841, -0.3616600931, -0.2581925988, -0.0989923775, -0.3698385358, -0.1656940877, -0.1613461375, 0.0632631332, -0.325874418, -0.0153214484, 0.0269877464, 0.4164503217, 0.293758601, -0.4194703698, 0.1238846406, -0.1380818188, 0.0972237289, -0.0955069363, -0.1869755387, 0.1891407222, -0.2533553243, 0.2792419195, 0.0949693993, 0.038838625, -0.0884370655, 0.0600588098, -0.159414947, -0.0119242892, 0.0588181317, 0.303499788, 0.3837773502, 0.0009230953, -0.0879837945, 0.353854686, 0.8066475391, 0.2237538099, 0.0310286805, 0.153902933, -0.0020599868, -0.1163446754, -0.3227664232, -0.2487760186, 0.1705660969, -0.0870792046, 0.0229926035, -0.0028442983, -0.0616031103, -0.0714263842, 0.2523101866, 0.3050378561, 0.0414585695, 0.0712845027, 0.3709097207, 0.1204284355, -0.0578711666, -0.1169271022, 0.1672041118, 0.1258954853, -0.1920572221, 0.0119045749, -0.0655371994, 0.0032775253, 0.1812366992, 0.0310358219, -0.3219738603, -0.2996350527, 0.2012771815, 0.041937869, -0.0665792376, 0.2993479073, 0.1596489251, -0.0770490468, 0.0552628636, -0.1453844011, -0.057479009, -0.4903115034, -0.3879297078, -0.0461065769, 0.434936583, 0.069507882, -0.1548336297, -0.0031804666, -0.3482353687, -0.055776909, -0.6003727317, 0.3452955484, -0.3194229603, 0.3828046322, -0.164549008, 0.279025346, -0.4631022513, -0.0367035046, 0.3109875917, -0.328728199, -0.2486946583, 0.0650765002, 0.0176025257, -0.07215707, -0.1847457588, -0.5815080404, -0.0476908647, -0.1539790332, 0.4527022839, -0.0041604266, 0.0596409366, 0.1243084818, 0.0747015923, 0.4305663109, 0.0298446976, -0.1916431189, 0.1210587844, -0.1054962426, 0.4008398056, -0.2193355411, -0.302816689, -0.0781510025, 0.16285339, -0.1272927672, -0.0984951109, -0.3735529184, -0.1985851973, -0.3790389895, 0.3669738472, -0.0718739331, -0.0167552605, 0.379385978, 0.3064507246, 0.0722276419, 0.0580983311, -0.3891449571, 0.5050681829, 0.6757683158, 0.0092983507, -0.0089657176, 0.5026324987, 0.0709110498, 0.9094952345, 0.1167575419, -0.0880285949, 0.2245067358, 0.0675017461, 0.0284250695, -0.3903768063, 0.1601772308, 0.1316402406, -0.0401241332, 0.0388069227, 0.236428827, 0.0380494259, -0.2484050989, -0.1227405369, 0.1951147169, -0.287527591, -0.3168262839, 0.1847684979, -0.2551835477, -0.1688254476, 0.1740376502, -0.0765981153, -0.1780085564, -0.3751817346, -0.1998486221, -0.1906105876, 0.3779653609, -0.1055294722, -0.6005112529, -0.0463042706, -0.4620148838, 0.3174310327, 0.1200261861, 0.2238004357, -0.2955450714, -0.0564068556, 0.2446454912, -0.3228536248, 0.2590306401, -0.2851579785, -0.0492563657, 0.1612732708, 0.0685205758, -0.3726626337, -0.0046681091, -0.1773081422, 0.1747200042, 0.4599046409, -0.2281538546, -0.3975750804, -0.3105403781, 0.2359522879, 0.0375088751, -0.0658997223, 0.1733650565, -0.2594773769, -0.0183646455, -0.4175832868, -0.1261870861, 0.3429454267, -0.1650980264, -0.0610801987, 0.0112268552, 0.1740143001, 0.1327439398, -0.0599052459, 0.2988523245, -0.1146557257, -0.1276050657, 0.4424629807, 0.3040947318, -0.0618840083, -0.3205315173, 0.355251044, -0.0954777375, -0.3660573363, 0.4882132411, -0.218904078, 0.3159545064, 0.4747320414, 0.2133303583, -0.0357877202, -0.0234067589, 0.1447725892, 0.4186308384, -0.0603996255, 0.5418788195, 0.2795415521, -0.0161213242, -0.1286268979, 0.1725664735, -0.1708380282, -0.0355185494, 0.6318178773, -0.1137907356, 0.0038762726, 0.5671444535, 0.063670367, 0.9373651147, -0.2821111083, 0.3562495112, 0.1291282475, -0.0394516885, 0.4074739814, -0.1294272691, 0.2650201917, -0.4918097556, -0.2174852192, 0.2199113965, -0.2149683833, -0.264709264, 0.2747202814, -0.1567382812, 0.0506978035, -0.0032421649, 0.1992222518, -0.02611636, 0.2922621071, 0.1135442406, -0.2582212985, -0.3926377296, -0.0101966858, -0.0051291166, 0.1710565835, -0.0618742332, -0.1705610007, -0.3496140838, -0.0965966731, -0.179338336, 0.2796676755, -0.1814923286, 0.1445913762, 0.2455632687, -0.0341220796, 0.1703040749, 0.717861712, 0.0609154813, -0.0505998507, -0.0307888649, 0.254899919, -0.0124061033, 0.0887361169, 0.3964910507, 0.0344578847, 0.221181348, -0.1801508963, -0.2398807704, 0.0477490798, 0.1024101526, -0.2337885946, -0.1609704643, 0.0478167385, 0.1398227364, 0.0227075219, -0.0623243637, 0.0740203336, -0.5765274763, 0.0539221764, -0.0186327621, -0.0547055602, 0.0997101963, 0.2908623815, 0.1346255094, -0.1707372665, 0.1136574596, 0.6775932908, -0.3244546056, -0.1086263731, 0.7458806038, 0.1795629859, 0.0014097393, -0.0949166194, 0.2476831675, -0.2478707135, -0.6283717155, 0.0337574184, -0.2483892441, -0.2120060474, 0.2343792468, 0.3080370426, -0.1999985576, -0.1975628734, -0.1469415724, -0.2412343025, -0.2423956692, 0.249852553, -0.0583463311, 0.0068158424, -0.1725542247, 0.2741122544, 0.201607883, -0.0881676003, -0.1053355858, 0.0764525831, -0.2692142725, 0.2743499279, 0.1036968082, -0.3691770434, 0.4151688218, -0.1232334077, -0.075755246, 0.2767160237, -0.274101913, -0.08304701, -0.0163443908, 0.2227385938, -0.0710495114, -0.1054353938, -0.328032732, 0.0408847928, -0.1428189874, -0.2872322798, 0.2128672898, -0.2900471985, -0.0448153391, 0.0042101927, -0.088088043, 0.288896203, -0.0618683621, 0.1017443985, -0.0217918232, 0.0768534765, 0.3140351176, 0.1966612041, 0.0544645712, -0.0076148659, -0.2682598531, 0.0105350167, -0.0505144931, 0.0935515612, 0.298655659, -0.3337076306, -0.0411002561, -0.1884242594, -0.1477082223, 0.5953745842, -0.0976816267, -0.3353037238, 0.2371449023, 0.0260589514, 0.0823239908, 0.2001850456, 0.520804286, 0.0638965666, 0.0121354386, -0.1359042972, -0.0063774958, -0.0324635878, 0.1020553485, 0.3046663404, 0.2812547982, -0.62549752, 0.0814249292, 0.255841136, -0.0214998052, 0.1413772106, 0.0449638963, -0.0664562955, 0.2502110004, 0.1468691975, 0.0969785973, -0.2232918739, -0.3549112082, 0.5749951005, 0.327298075, -0.2109614611, -0.295594275, 0.3983946443, 0.2951466441, 0.5204437971, 0.3410268426, 0.4236570597, 0.0308460258, -0.2934633493, -0.325293988, 0.2823750079, -0.0197914205, -0.1260680258, -0.0459986404, -0.1114297435, -0.053071782, 0.2995018661, -0.303031534, 0.1652937084, 0.3224515617, 0.4959093928, 0.0424023531, -0.3634295762, -0.1948477328, -0.0675649196, 0.4407275617, 0.0173915401, 0.3731257021, -0.1021294817, -0.1070428044, -0.3444982171, 0.2899490297, 0.115235433, 0.2705463171, -0.5767055154, 0.4279711545, 0.1324663162, 0.0330877826, 0.1897376627, 0.2066238075, 0.3099295795, -0.1102644205, 0.0974734128, -0.0849166811, -0.0020613298, -0.2866071761, 0.07054957, 0.3329070508, 0.1678399146, -0.1049032882, 0.2067900747, -0.2799986601, 0.0762471706, -0.0978536159, -0.413472116, 0.2258625329, -0.1182280034, -0.1113104373, -0.0520899706, -0.1324936599, -0.0013126172, 0.1276619881, 0.6129339933, 0.1930650175, 0.1246223301, -0.0267079175, 0.0825603753, -0.5853534937, 0.1925194561, 0.1387236863, 0.2084905207, 0.2797996998, 0.3135426044, 0.2333824486, 0.374155283, 0.244637996, -0.1770493984, -0.2462216467, 0.4191217422, -0.6102461815, 0.0101736523, 0.0743526816, 0.1879317462, -0.1064255983, -0.2250778079, -0.0230039619, -0.1562495977, -0.1390533745, -0.2743948102, -0.2682371736, -0.0231824368, 0.1495166272, 0.3450477123, 0.2363651693, 0.0682360828, -0.0300126895, -0.2721798718, -0.1444952786, -0.2129715681, 0.0134779513, 0.0994293615, 0.0685310513, 0.0575660616, -0.1969742179, 0.2913998365, -0.3510696292, -0.0179674849, -0.1465967298, 0.3190270066, -0.0336719193, -0.3093471527, 0.4059657753, 0.2705381513, -0.0823316649, 0.5921953917, -0.1156927049, -0.0927959234, -0.607229054, 0.1054434106, 0.313218832, -0.3774879277, -0.1397369206, 0.1671624184, 0.1499505639, 0.3385231495, 0.0498352796, -0.4270495176, -0.0275151804, 0.1106721163, -0.2297035754, -0.613356173, 0.0610752925, 0.4153720737, 0.1881696135, -0.2335267067, 0.1861010939, -0.045926664, -0.0301695503, -0.2157278061, -0.2437675148 ]
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.1043084264, -0.0196551979, 0.0418730304, 0.1138937026, 0.0320827067, -0.1475580782, 0.1983276159, 0.1378269941, -0.4294383526, 0.1086210757, -0.2599077821, 0.2367109954, -0.2770298719, 0.1902207285, 0.4431501925, 0.0458827652, -0.16244708, -0.0884750113, -0.0613613948, -0.2464275956, -0.2078003138, 0.3399336934, -0.1633237302, 0.1298566908, -0.163637951, -0.3291427791, -0.1392056048, 0.0100801103, 0.2158969045, -0.0817755163, 0.1531290412, -0.1572726369, 0.2936230898, 0.3548463881, -0.0001241776, 0.055723682, 0.0362491459, -0.2642900944, -0.1004718542, -0.1585780978, -0.3611400127, 0.0675943941, 0.0743403658, -0.2352459729, 0.0370029435, 0.1353316158, 0.5893598199, 0.2575763762, -0.1871165484, 0.4628818333, 0.1116086096, 0.4620780945, 0.1533126831, 0.1713334024, -0.114662841, -0.2406713814, -0.3874956667, 0.0566434748, -0.1590551734, 0.158032611, 0.1433653831, -0.1098372489, 0.0033531189, -0.2057419717, 0.316311568, 0.1110545546, -0.1072744951, -0.3120266497, -0.003149535, 0.1946424097, 0.6180030704, -0.5000041723, -0.5036103725, 0.0647537634, -0.0492013246, -0.2039892972, 0.3115360141, 0.4222564101, 0.3510524035, 0.1510545909, -0.2972368598, -0.1687383652, -0.3058374524, 0.1791092008, -0.0949268118, 0.6592950821, -0.0630758554, 0.0978821665, -0.2444776595, 0.0606238879, 0.1662685275, -0.0485495999, -0.1336773038, 0.3695762157, -0.1432872862, -0.3499164283, 0.2528574169, 0.4646790624, -0.5515579581, 0.3166108131, 0.3559388816, -0.1943401098, -0.0089945085, 0.0084282635, -0.0087086875, 0.0439143702, 0.3559093773, 0.4459597766, 0.0651984662, -0.3567677736, 0.0706169307, -0.1742614061, -0.0649129748, -0.2846613228, -0.1426879764, 0.0446221083, 0.0379389301, -0.137483567, 0.0949025527, -0.149045065, -0.0987586901, 0.1095615998, -0.3324376345, 0.088156946, 0.0784248635, -0.2568152249, 0.2771995068, -0.0266952384, -0.6436518431, 0.0527903847, -0.0495503806, 0.1958491802, 0.1571633816, -0.0411072448, -0.0443775356, 0.0338042527, 0.0224753618, -0.2291055471, 0.0509849414, 0.2616702318, 0.3601631224, -0.0454377793, -0.1735638529, 0.2035632432, 0.0390081331, 0.2462248951, 0.0227713957, -0.1490442604, -0.2866274118, 0.115270108, -0.2529258132, -0.3067849874, -0.0610651597, 0.0415605418, -0.1484235823, -0.3995213211, -0.2166470438, 0.00194069, 0.1232055277, -0.3684221506, 0.2590968907, -0.3070386052, -0.0856942236, -0.3298638165, -0.0941886529, 0.133268714, -0.4248124361, -0.079120107, -0.0175603218, 0.038308166, 0.2924701571, 0.2817422152, 0.1365847737, 0.1832987368, 0.0643900558, 0.3293121755, 0.3842251003, -0.5604010224, 0.0358691439, 0.3170732856, -0.3729989231, -0.1465911269, -0.2245297432, -0.0009614117, 0.3030166924, -0.2277837992, -0.0363672264, 0.3661176264, 0.0217804927, 0.1736366153, -0.2771192491, -0.1050426066, 0.0246059708, -0.277939111, -0.0159462374, -0.1310436428, 0.4008929431, 0.1757669449, 0.1823631823, -0.0711173415, 0.2193004191, 0.4072644413, 0.3658871651, 0.0230925716, -0.0836251974, 0.0767631829, -0.5317687392, 0.0073545203, -0.2281790376, 0.1830498278, 0.3466964066, 0.0587604344, 0.1974605471, -0.2921522558, 0.1712453067, -0.1641823649, -0.095104143, 0.1215176582, 0.140253365, 0.3574544489, -0.0441087782, 0.2640913725, -0.1312345266, -0.122935228, -0.2632279992, 0.3617297113, 0.1286931485, -0.3282952309, 0.0945415869, -0.1186135411, 0.0846155733, -0.2326747179, -0.2019331008, 0.3773415685, -0.2473886311, 0.5208191872, 0.0495078862, 0.6487168074, 0.1313404143, -0.2497119159, -0.1034746245, 0.3585965037, -0.0531645156, 0.2756615281, -0.1737519056, 0.5877632499, 0.1556875557, -0.1525968313, 0.3869111538, 0.0487795472, -0.2978124619, -0.1340875924, -0.0127204061, 0.1818128526, 0.1251281202, -0.1221781969, 0.0884693414, -0.1293493211, -0.3697163463, 0.38991642, 0.6853575706, -0.1292417943, 0.0035884343, -0.1097486839, 0.0905124843, -0.0675533935, 0.5124894977, 0.0625754818, 0.2000592351, 0.0357435979, 0.1346185505, -0.1173053235, -0.2365722954, -0.1088180542, 0.3869107664, -0.192274034, -0.2225833982, -0.0102995317, -0.0086942054, 0.2564800978, -0.1329469085, -0.0602573752, 0.0856533796, 0.3868996501, -0.497980237, 0.0702473745, -0.4411145747, -0.1988403201, -0.1071167141, 0.3426582217, -0.3205322921, -0.3273090124, 0.036576312, 0.0401103795, -0.1647713035, -0.0049516056, -0.1151255369, 0.0103288293, 0.0407162905, -0.1432954967, -0.1063832119, 0.0423578806, -0.2163064629, -0.0144213699, 0.0300442204, 0.1656524837, 0.28826195, -0.0380334221, -0.1832356751, -0.0969581977, -0.3768309653, 0.0041227336, -0.1586949825, 0.1078697219, 0.0106575005, 0.0450569615, -0.5808390379, -0.1346589327, -0.1810051948, -0.438596338, -0.2040457428, 0.0246810317, -0.0895998478, -0.0534390397, -0.2532157898, -0.133513242, -0.2370140254, -0.3757142127, 0.2796502709, 0.2792013288, 0.3979222775, 0.4036665559, -0.4649417698, 0.2192780077, 0.1281310469, -0.262794435, 0.271951437, -0.1234668717, 0.4003707767, -0.5539554358, -0.3774173558, 0.1360994428, 0.1978218257, -0.0095769465, 0.0663510263, -0.2033833563, 0.0864782035, -0.3496913314, -0.065362297, 0.132546559, 0.2524749637, 0.44913885, -0.2184732258, 0.1617976129, -0.1543952227, -0.1096281111, 0.096379146, 0.9362365007, 0.0234156325, -0.0219118241, 0.1153818667, 0.0580701828, 0.3341709971, 0.0435014367, 0.0677084029, 0.035796307, -0.3759587705, 0.1903022826, -0.2492441088, -0.1469092071, 0.6196636558, 0.4616968632, -0.1018360034, 0.3610277474, 0.0375998877, 0.2365511656, 0.1718461365, 0.0989677906, -0.0671918094, -0.2950973511, -0.0060200859, 0.2981247008, 0.3115378618, -0.0430110879, -0.0540910065, -0.4550197721, -0.3560124934, -0.315788269, 0.3434746265, 0.5764546394, 0.4297189116, 0.1184362248, 0.2611115277, -0.5747965574, 0.2416062355, 0.099127993, -0.0526558459, -0.1630297154, -0.1640918106, 0.1973081529, -0.0980384797, 0.0605772175, -0.3111293018, -0.0378793404, 0.2995842695, -0.1518817842, -0.5790773034, 0.0650470555, -0.118583858, 0.0833324715, 0.374845922, 0.1614406258, -0.0566270649, -0.1530479789, -0.0001291689, -0.1339459419, -0.294128269, 0.0789090693, -0.1295740604, -0.3237826228, -0.0456327721, -0.2065199018, -0.0002374873, 0.1084331721, 0.0292207599, 0.3305555582, 0.3428139985, 0.019164145, 0.2844888568, -0.0925664008, 0.0921059549, 0.2597307861, -0.0445696712, 0.1416484416, -0.1034706458, 0.0686079189, 0.0790598243, 0.1394547224, 0.2667696178, 0.33389467, -0.0150518529, 0.141246289, 0.3176978827, 0.1359123588, 0.1435520798, -0.3187100589, 0.2108197212, 0.0707106143, -0.0898430496, -0.1369030774, -0.21985358, -0.5876247883, -0.1534553915, 0.2062443048, -0.1491353512, 0.0905932188, 0.4807758033, 0.244858861, -0.4734284878, 0.0507449843, 0.0618903637, 0.9134724736, -0.397192359, 0.3144842386, 0.4593326449, -0.0659247786, 0.6889103651, -0.249376893, 0.2878423631, -0.2602440119, 0.0969933122, -0.0046334341, 0.0240999237, 0.1859912276, 0.2977377176, -0.3869920969, 0.2436874658, 0.0800649077, 0.0783287138, -0.1010476872, 0.1207979098, 0.074060902, -0.0537049882, -0.0044612624, 0.0387088209, 0.1480156034, 0.1679359674, -0.1008346379, -0.2626407146, -0.1506688595, 0.0975852907, -0.0364322439, 0.1077663153, -0.0858729482, 0.0125953332, 0.1153872758, -0.2285211682, 0.1785607189, 0.0447077379, 0.2295649797, 0.1742633134, -0.1165142581, -0.1177856028, 0.1121456549, 0.0951120257, 0.0477784276, 0.2640108764, 0.058814086, -0.1901767999, 0.0238818377, -0.0143229291, -0.0229321271, -0.6582655311, -0.2425998896, -0.0195064731, -0.3383094668, 0.0406944863, -0.1690113842, 0.131493777, -0.3500053585, 0.0776488185, 0.042284593, -0.0317064971, -0.0073302574, 0.1334019005, -0.3764162362, -0.1055550948, -0.0696597695, 0.3178857863, -0.1067605242, 0.0260588229, 0.2930842638, 0.1390783936, -0.115467675, -0.1924816072, 0.116899237, 0.2639496624, -0.3442685604, 0.3508822024, -0.0911655128, 0.389769733, 0.2459409386, 0.4746275246, -0.1922619343, 0.1166066602, -0.2697853148, 0.1351474822, -0.2463659793, 0.1444520503, 0.1061556488, -0.0853373706, -0.2414736748, 0.808724165, 0.288892597, -0.1660508215, -0.2104359716, 0.1199412718, -0.2968469262, 0.2891428471, 0.4651019275, 0.0027301293, 0.1073269844, 0.1166566759, -0.0226148013, -0.0354600549, -0.1430861652, -0.0093739815, -0.4408378899, 0.2326543927, 0.3971709609, -0.2790674567, 0.0164313875, -0.2374549657, -0.3072776794, -0.0352571644, 0.1781387329, 0.316015631, -0.1167778522, 0.280613631, 0.3236218989, 0.042404294, -0.1924266815, -0.0534702353, 0.2104376107, 0.3997378647, -0.0866993293, 0.2149667442, -0.0377443023, 0.0833410695, -0.1107135862, 0.2121832073, -0.1812835783, 0.2066607177, 0.1498605907, -0.2446232736, 0.0587375835, -0.2719557285, 0.0709205195, -0.0187377259, -0.1596562266, -0.1105745882, 0.2401586771, -0.01461659, 0.264624685, 0.1981234252, 0.1586772352, 0.1647421867, -0.1007739082, 0.2378638685, -0.1556213051, -0.1299575716, 0.0340239927, 0.1847241521, 0.1766387522, -0.3030107617, 0.0437079072, 0.2135514021, -0.0956345871, 0.0900670066, -0.0498674065, -0.3752329648, 0.0936060399, -0.1414040327, 0.069295764, -0.0426438376, -0.0184853077, -0.0263286084, 0.2260888815, -0.7964645624, -0.4338699579, -0.1880562305, 0.2785822153, 0.4275817275, 0.4440074563, -0.1418631226, -0.2345515192, -0.1608278155, -0.1247887984, 0.5020841956, -0.1063783467, 0.0345154442, -0.307882309, -0.0675124079, 0.1722888947, 0.2360777855, -0.1693921387, 0.0225639157, -0.0608971827, 0.4165676236, 0.2164750993, -0.0459021032, -0.2489144802, -0.1122573912, 0.2209970653, -0.0683111846, 0.4019662738, -0.4644499123, -0.1036418974, -0.3935953379, 0.1805749834, 0.1125630736, 0.0332118273, 0.2970166504, 0.5219265223, 0.1952509284, 0.1929666102, 0.2672560513, 0.2638757527, 0.0262863692, 0.321905762, 0.1198596656, -0.0960357636, -0.0178403128, 0.0783530176, 0.1745675802, -0.0004820004, -0.1113831997, 0.5997074246, 0.0313793756, -0.004140377, -0.1581811309, 0.1655308902, -0.3940225244, 0.1993966103, 0.1589347422, 0.0326425433, 0.0328830853, -0.0332192406, 0.0036345571, 0.075484477, 0.2761546969, 0.4486452937, 0.2513765693, -0.2495193034, -0.2027415931, -0.2581021488, 0.3710936904, -0.0538539998, 0.1372666359, -0.0615195334, 0.3472933769, -0.0496518202, -0.2888675928, 0.105576396, -0.0285976585, -0.0261400267, 0.0440635681, -0.0828726962, -0.0690064281, -0.3028965294, 0.0072688442, -0.165841341, -0.4282776713, 0.0905360803, -0.0716685951, -0.0630939677, -0.2350924909, 0.0287549049, 0.2469121069, 0.1086400896, 0.269618988, 0.1132544801, 0.051067166, -0.0816524848, -0.0887765512, -0.3101072013, -0.180502072, -0.3347492516, -0.1682425141, -0.2967461348, 0.5181001425, -0.083915174, -0.2681005299, -0.3095506728, 0.3083868027, -0.364130199, 0.5591865778, 0.3405433893, 0.1070058718, -0.4990776181, -0.1324356198, 0.0893775374, 0.345685184, 0.0699129924, 0.0313375145, -0.4642446339, -0.1810528785, 0.4082535207, -0.8163275123, -0.3400097191, 0.2773923278, 0.2063267827, -0.0303843133, -0.2536891103, -0.2889244556, -0.1075323671, 0.339209497, -0.0721906722, -0.0814976767, 0.0767047554, -0.0421542861, 0.1234849989, 0.2067709416, 0.1660782248, 0.3275051415, -0.2120837569, -0.0851781964, -0.1489026546 ]
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.0391480736, 0.0825123638, -0.0073066913, -0.0530799702, 0.0318034925, -0.0482142866, 0.8157613277, 0.2792398036, -0.0684224144, 0.1789910793, 0.0316699743, 0.2038191259, -0.2970305085, -0.0530736856, 0.0210222378, -0.4359811544, -0.107910499, 0.2862543464, 0.0336868577, -0.05605397, -0.1683891267, 0.269577831, -0.4814035296, 0.0699897707, -0.3009618521, -0.2224034816, -0.0034628138, -0.1184035838, 0.1805593669, -0.3218071163, 0.2983435094, -0.0853025466, -0.0729665533, 0.2157044262, -0.0001094074, 0.1312538981, 0.224750787, 0.0399746895, -0.1744724363, -0.3294420838, -0.1835713387, -0.0175782256, -0.0488841422, -0.3077403903, 0.1411334574, 0.0695707947, 0.2543087304, 0.2293204963, 0.1875865757, 0.4259970188, 0.2343904972, 0.3789533973, 0.0684161484, 0.033680182, 0.0507043153, -0.0231374763, -0.091274716, 0.1140883341, -0.0621386655, -0.199799031, -0.2145839036, 0.280905664, -0.008752808, 0.0915338248, -0.1583669782, 0.0241950676, 0.0742399693, -0.2711645961, -0.0711958781, 0.4140104055, -0.0402943678, -0.0426514484, -0.392829746, -0.3703235388, 0.0652714297, -0.5704239011, -0.0600384176, 0.1048351079, -0.1118559688, -0.0165610965, -0.1545905173, 0.0957533494, -0.5827880502, 0.3474161327, -0.190877825, 0.1448992789, 0.008272402, 0.0810573548, -0.0094357934, -0.0986801833, -0.0254503675, -0.0089679901, 0.177260071, 0.0017483607, -0.264901042, -0.2203814387, 0.1818950176, -0.2065803409, -0.1672122777, -0.0775772333, 0.0233214572, 0.0268009566, 0.0007512867, 0.3499963284, -0.1220965907, 0.2610675693, 0.1183248907, 0.1576665193, 0.332326889, -0.0056894384, -0.1858866364, 0.0312408321, 0.0496803224, -0.143718183, -0.1408725977, 0.017316509, 0.3466320932, 0.1334185898, -0.5548805594, 0.038705755, -0.3659699261, 0.1409141868, 0.1920105219, 0.2450776845, -0.0872801393, 0.2586589754, 0.2062357664, 0.1746400893, -0.4506017566, -0.0207851715, -0.2161476016, 0.3215356171, -0.0543454252, -0.2500000596, 0.2410530448, 0.3272882104, 0.3226423264, -0.0850194991, 0.0863245279, 0.0834726393, 0.320379734, -0.2739874721, 0.111380361, 0.2461781055, -0.0800186545, -0.1207129508, 0.0464207456, -0.1517860293, -0.0383197144, -0.0575326346, -0.2080948651, -0.3066108525, -0.035625644, 0.2675880492, 0.120159477, -0.0608261228, -0.2594277859, 0.1365095973, 0.0316397697, -0.1947880387, -0.0350830629, -0.3620332479, -0.1259934902, -0.0612784401, 0.0401062667, 0.1906771213, 0.1341361105, -0.1566854417, 0.1043588966, 0.180200845, 0.2523799539, 0.2696483135, -0.2044543028, 0.2307106555, -0.03619482, 0.3748854399, 0.3027419448, -0.2861012816, -0.187955007, 0.1153770462, -0.0510694608, 0.0571820885, -0.0915261954, 0.0197358392, 0.4229823351, -0.0380666442, 0.3864849806, 0.2939307392, -0.2305167466, 0.0985406488, -0.0844677389, 0.1140948758, 0.2922217548, -0.0645063519, 0.1169262528, 0.0630716756, -0.1999794841, 0.5250787139, 0.0386195034, -0.1206300408, -0.02735685, 0.0281605721, 0.0251633544, -0.3499795198, -0.1735028327, -0.1349678785, -0.3476234376, 0.0723293126, 0.0827102065, 0.2156669647, 0.3347972631, -0.0584712885, 0.0152782127, 0.1186524481, -0.0774298683, -0.2848463058, 0.2511829734, 0.1563902497, -0.1726756692, 0.0747465491, -0.1370524317, 0.0778896958, -0.3810476661, 0.1017819196, -0.1399619877, 0.0689366832, -0.0984525308, -0.1941970587, -0.2610077858, 0.3692517579, -0.0739927441, -0.1785954982, -0.0611251816, 0.2158329934, 0.1814828217, 0.2297652513, -0.230614081, 0.1413955092, 0.3241620362, -0.0578081198, -0.1601214111, 0.2085712701, 0.0083814152, -0.1782839, 0.1594437361, 0.4819953442, 0.2851333916, 0.1752200723, 0.4278372228, 0.1367622316, 0.2068371177, 0.0023745, -0.1972274482, 0.0887983218, 0.3635754883, -0.0712224245, 0.1973558962, -0.2939553261, -0.7215963602, 0.1118016839, 0.5496827364, 0.134367317, 0.0659741312, 0.1962780356, -0.0909677744, 0.1029398143, 0.3837306201, -0.2072699666, 0.1110233366, 0.0864473283, 0.2527721822, 0.0789589733, -0.371741116, -0.2521878183, 0.08088357, 0.1414930671, -0.1022186577, -0.0228344575, 0.2730286717, 0.2171435356, -0.2615650594, -0.3487101793, -0.17015782, 0.2663600445, -0.3354308307, 0.326864779, -0.1205521226, -0.274183929, -0.0820812657, -0.5632297993, -0.1426302642, -0.3243641853, -0.0196135752, 0.6269505024, -0.3355833292, 0.2322808653, 0.1679950058, 0.0385324359, 0.0734656528, 0.2469548881, 0.1575053334, 0.0089546666, -0.3124400377, 0.1394796669, 0.1999260336, -0.1503338516, 0.2847867608, -0.0808443278, -0.3065350056, 0.2594658434, -0.54403615, 0.11752747, -0.1258309782, -0.0007882025, 0.2060857266, 0.2676902711, -0.2906226516, -0.5785191059, 0.0555490293, -0.1116682291, -0.1575767845, 0.3648540676, -0.0376022756, -0.0444794334, -0.3675985336, -0.5435931087, -0.171612829, -0.4446733892, 0.3616952002, -0.080676958, 0.3070819974, 0.785379231, -0.073038958, 0.5275720358, 0.2695951462, 0.1862934828, 0.2173420191, -0.0682446659, -0.0081610233, -0.2857408822, -0.3695432544, -0.1063030958, -0.2888972759, 0.1831954122, 0.1218608171, -0.3298076391, -0.0585052334, -0.0348195396, 0.1349251866, 0.1361689717, -0.1742236018, 0.3653979599, -0.0563014559, -0.03022171, -0.034240935, 0.0573621541, 0.3721612692, 0.2451587021, -0.0622616112, -0.0394693054, 0.2059446126, 0.1754859984, 0.3692194819, 0.0424721837, -0.2425435483, 0.2184520662, 0.0004715081, 0.0349337906, -0.1755886525, -0.2768706679, 0.238911137, -0.0171984956, -0.0787891671, 0.0796444267, -0.1992208064, -0.2940825224, -0.1044809073, 0.0583733916, -0.2043751925, -0.3995546699, 0.1599551886, -0.3206955791, 0.1283508241, -0.059703555, 0.0156894401, -0.215094015, 0.0657820106, -0.1475068629, 0.1715199351, 0.0861310437, -0.2596296072, -0.0938584134, -0.5862800479, -0.6067797542, 0.2046329379, 0.2464428991, 0.5263924003, -0.0870107189, -0.0188239403, -0.1141607463, -0.0416838713, 0.4461072683, 0.1069853157, -0.1425530165, 0.2608310282, -0.1329193115, -0.3578276634, -0.1220480576, -0.3692784607, 0.2719855607, 0.5299983025, 0.3015770912, -0.2063941509, 0.0024216734, 0.3558469415, -0.0466872603, 0.1243460029, 0.1750923991, 0.041471079, -0.0300872922, -0.1414520442, 0.0908921659, 0.1586926579, -0.0416012071, -0.3086981773, -0.0585057363, 0.023824038, -0.0746736601, 0.1684129536, 0.212326169, -0.1910575479, -0.0090060793, 0.0770116448, -0.2531861067, -0.122906968, 0.4033559859, -0.0854443461, -0.1612048596, -0.2986449897, -0.0300268009, 0.177232638, 0.086401403, 0.1985329986, -0.0263533182, 0.0448870696, -0.2302389145, -0.0440560244, -0.086025618, 0.4295449853, 0.5223548412, 0.0664973632, -0.1000382975, -0.1619125307, 0.2714986205, -0.3283503056, 0.0714575946, 0.399015516, -0.0608637705, -0.3527772129, 0.2800027132, -0.2473482043, 0.4753119349, 0.4118621945, 0.2183437496, 0.6721663475, 0.3472308218, 0.6203199625, 0.1277313232, 0.4753558338, -0.1620081067, -0.0173952505, -0.1005234197, -0.0788865611, 0.0276138559, 0.1096014977, -0.1319757849, 0.0889555812, 0.1767241657, 0.0960327089, 0.0463649109, 0.098513037, 0.061185576, -0.2404058278, -0.2900926769, 0.1539501399, -0.158150658, 0.1574361622, -0.0482131839, -0.1438088715, -0.0824366882, -0.3264626861, -0.2867513299, 0.2754974067, -0.1414872259, 0.1955630183, 0.2045818418, -0.1971868575, -0.0391065329, -0.0287573747, 0.2409319878, -0.0701696426, -0.1455819905, -0.2068728805, -0.0692642704, 0.0280246399, 0.1032118946, -0.1363177299, 0.5273318291, -0.1486341059, -0.137599051, -0.0097951535, -0.0955040455, -0.2173524499, 0.2621588707, 0.1152564138, 0.0907623768, 0.1473241746, 0.0249882825, 0.1188032106, -0.452347815, -0.232152164, 0.1703427881, -0.1349195838, -0.3381386399, 0.2134268582, -0.1455637515, -0.0226631388, 0.05624092, 0.2497800589, -0.0592683814, 0.2341695428, 0.6033890247, -0.021193251, -0.0915533006, -0.1435733438, -0.216542393, 0.0541518591, -0.1071857139, 0.1656973362, -0.1493014842, 0.0013677776, 0.0525454432, 0.157504648, 0.0081931353, 0.2858625948, -0.1662968695, -0.3224808872, -0.3871926665, 0.2180493176, -0.1401995718, 0.2134715766, 0.1630476862, 0.6170108318, 0.0856667906, -0.1259978861, -0.3218879104, 0.032127507, -0.2677124143, 0.3241806924, 0.0389144383, -0.2092732489, 0.150325194, -0.004805468, 0.1132221222, 0.1361240447, -0.1097705364, -0.258374095, -0.1917406619, 0.0714030862, 0.1857145876, -0.346509546, 0.166162774, 0.0046596974, -0.1557184309, -0.1230324581, 0.1172003746, -0.0563097075, -0.2534217238, 0.5090385079, 0.1321462542, 0.6595726013, 0.2523016334, 0.0457538962, -0.1782054454, 0.1686657369, -0.088948369, 0.1971289515, -0.0100232661, -0.0413217843, -0.3386872411, -0.0331775434, -0.4179777801, -0.1148275137, 0.2204306722, -0.3328478038, -0.0377381779, -0.2488699406, 0.0429367423, 0.1350104064, -0.1134635359, 0.0266082734, -0.0060439929, 0.2527717948, -0.0741034895, 0.162306875, 0.2498594522, -0.0320505872, 0.2161785066, 0.1043516472, 0.1092672348, -0.0902840719, 0.1097072437, 0.1391164809, -0.1979452819, -0.311791718, 0.241280362, 0.3260468841, -0.3616290092, 0.1162671223, -0.1829431951, 0.0854909867, 0.4222062528, -0.0515633188, 0.0166012105, 0.2457000166, 0.0994247496, -0.1708700955, 0.2237036377, -0.3996597528, -0.2821900845, -0.0317095369, 0.1926877499, 0.2779774964, 0.100870721, 0.0297558568, -0.2888757288, -0.1592282653, -0.0015653372, 0.2095530778, -0.3970550299, 0.0147346742, -0.3463860154, 0.1573566794, 0.0574847013, -0.3433608711, -0.0377024002, 0.0445324741, 0.1723370105, 0.1850245148, -0.2280977368, -0.0942424089, -0.1356527507, 0.0157813467, 0.217911303, -0.061141789, 0.3229673505, 0.3675955236, -0.0189267546, -0.2765446305, 0.5054779053, 0.4357511699, 0.2400352061, -0.3785280585, 0.0104650259, 0.1237665862, -0.1097799391, -0.0272483937, 0.09683837, 0.107646808, 0.2009626478, 0.2250174135, 0.1305900812, -0.1786043346, 0.3606992662, 0.1361265481, -0.0453327075, -0.2492052764, 0.3173818588, 0.1219384745, -0.1387658715, -0.1831060201, -0.0519300476, -0.3085250258, 0.1512974203, 0.3084790707, -0.1038088799, 0.1319822967, 0.156807512, 0.0841483623, -0.093700245, 0.3824256361, 0.2785472274, 0.3412987292, -0.2391834855, -0.0532664135, -0.1395320892, 0.1518156826, -0.1091637164, 0.3494440317, 0.1335537583, 0.15286538, -0.2013281882, -0.0554909557, -0.1758030355, -0.4866572618, 0.0382896811, 0.0140967406, -0.5309220552, -0.067765139, 0.216723457, -0.2995290756, 0.0809301585, -0.2919172645, 0.1038763747, -0.0216724798, 0.0582709461, -0.0243855678, 0.254758358, 0.0580755547, 0.4695754051, -0.1598594934, 0.2173871249, 0.3523495495, -0.0399276093, -0.2264610231, 0.0155346114, -0.1288682222, -0.3512553275, 0.0623170957, 0.0021564402, 0.6310626268, 0.0308013782, -0.3426463008, -0.0471832864, 0.2966683805, 0.0744637251, -0.2258536071, -0.2897467315, 0.5159019232, -0.3268100917, 0.1209044307, -0.0355342925, 0.2257706225, 0.0469701476, 0.127117306, -0.4208703637, -0.5104088783, 0.4589867592, -0.6723732352, -0.2989535928, -0.1500109732, 0.3177682459, -0.1784153581, 0.1541514248, -0.7014428973, -0.1308532506, 0.3214224577, -0.3068630099, -0.3737614453, 0.1170789301, 0.2110434622, 0.0169104487, 0.0359381065, 0.5025029778, 0.0519081466, -0.3045864105, 0.0904338807, -0.3307102919 ]
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.0391480736, 0.0825123638, -0.0073066913, -0.0530799702, 0.0318034925, -0.0482142866, 0.8157613277, 0.2792398036, -0.0684224144, 0.1789910793, 0.0316699743, 0.2038191259, -0.2970305085, -0.0530736856, 0.0210222378, -0.4359811544, -0.107910499, 0.2862543464, 0.0336868577, -0.05605397, -0.1683891267, 0.269577831, -0.4814035296, 0.0699897707, -0.3009618521, -0.2224034816, -0.0034628138, -0.1184035838, 0.1805593669, -0.3218071163, 0.2983435094, -0.0853025466, -0.0729665533, 0.2157044262, -0.0001094074, 0.1312538981, 0.224750787, 0.0399746895, -0.1744724363, -0.3294420838, -0.1835713387, -0.0175782256, -0.0488841422, -0.3077403903, 0.1411334574, 0.0695707947, 0.2543087304, 0.2293204963, 0.1875865757, 0.4259970188, 0.2343904972, 0.3789533973, 0.0684161484, 0.033680182, 0.0507043153, -0.0231374763, -0.091274716, 0.1140883341, -0.0621386655, -0.199799031, -0.2145839036, 0.280905664, -0.008752808, 0.0915338248, -0.1583669782, 0.0241950676, 0.0742399693, -0.2711645961, -0.0711958781, 0.4140104055, -0.0402943678, -0.0426514484, -0.392829746, -0.3703235388, 0.0652714297, -0.5704239011, -0.0600384176, 0.1048351079, -0.1118559688, -0.0165610965, -0.1545905173, 0.0957533494, -0.5827880502, 0.3474161327, -0.190877825, 0.1448992789, 0.008272402, 0.0810573548, -0.0094357934, -0.0986801833, -0.0254503675, -0.0089679901, 0.177260071, 0.0017483607, -0.264901042, -0.2203814387, 0.1818950176, -0.2065803409, -0.1672122777, -0.0775772333, 0.0233214572, 0.0268009566, 0.0007512867, 0.3499963284, -0.1220965907, 0.2610675693, 0.1183248907, 0.1576665193, 0.332326889, -0.0056894384, -0.1858866364, 0.0312408321, 0.0496803224, -0.143718183, -0.1408725977, 0.017316509, 0.3466320932, 0.1334185898, -0.5548805594, 0.038705755, -0.3659699261, 0.1409141868, 0.1920105219, 0.2450776845, -0.0872801393, 0.2586589754, 0.2062357664, 0.1746400893, -0.4506017566, -0.0207851715, -0.2161476016, 0.3215356171, -0.0543454252, -0.2500000596, 0.2410530448, 0.3272882104, 0.3226423264, -0.0850194991, 0.0863245279, 0.0834726393, 0.320379734, -0.2739874721, 0.111380361, 0.2461781055, -0.0800186545, -0.1207129508, 0.0464207456, -0.1517860293, -0.0383197144, -0.0575326346, -0.2080948651, -0.3066108525, -0.035625644, 0.2675880492, 0.120159477, -0.0608261228, -0.2594277859, 0.1365095973, 0.0316397697, -0.1947880387, -0.0350830629, -0.3620332479, -0.1259934902, -0.0612784401, 0.0401062667, 0.1906771213, 0.1341361105, -0.1566854417, 0.1043588966, 0.180200845, 0.2523799539, 0.2696483135, -0.2044543028, 0.2307106555, -0.03619482, 0.3748854399, 0.3027419448, -0.2861012816, -0.187955007, 0.1153770462, -0.0510694608, 0.0571820885, -0.0915261954, 0.0197358392, 0.4229823351, -0.0380666442, 0.3864849806, 0.2939307392, -0.2305167466, 0.0985406488, -0.0844677389, 0.1140948758, 0.2922217548, -0.0645063519, 0.1169262528, 0.0630716756, -0.1999794841, 0.5250787139, 0.0386195034, -0.1206300408, -0.02735685, 0.0281605721, 0.0251633544, -0.3499795198, -0.1735028327, -0.1349678785, -0.3476234376, 0.0723293126, 0.0827102065, 0.2156669647, 0.3347972631, -0.0584712885, 0.0152782127, 0.1186524481, -0.0774298683, -0.2848463058, 0.2511829734, 0.1563902497, -0.1726756692, 0.0747465491, -0.1370524317, 0.0778896958, -0.3810476661, 0.1017819196, -0.1399619877, 0.0689366832, -0.0984525308, -0.1941970587, -0.2610077858, 0.3692517579, -0.0739927441, -0.1785954982, -0.0611251816, 0.2158329934, 0.1814828217, 0.2297652513, -0.230614081, 0.1413955092, 0.3241620362, -0.0578081198, -0.1601214111, 0.2085712701, 0.0083814152, -0.1782839, 0.1594437361, 0.4819953442, 0.2851333916, 0.1752200723, 0.4278372228, 0.1367622316, 0.2068371177, 0.0023745, -0.1972274482, 0.0887983218, 0.3635754883, -0.0712224245, 0.1973558962, -0.2939553261, -0.7215963602, 0.1118016839, 0.5496827364, 0.134367317, 0.0659741312, 0.1962780356, -0.0909677744, 0.1029398143, 0.3837306201, -0.2072699666, 0.1110233366, 0.0864473283, 0.2527721822, 0.0789589733, -0.371741116, -0.2521878183, 0.08088357, 0.1414930671, -0.1022186577, -0.0228344575, 0.2730286717, 0.2171435356, -0.2615650594, -0.3487101793, -0.17015782, 0.2663600445, -0.3354308307, 0.326864779, -0.1205521226, -0.274183929, -0.0820812657, -0.5632297993, -0.1426302642, -0.3243641853, -0.0196135752, 0.6269505024, -0.3355833292, 0.2322808653, 0.1679950058, 0.0385324359, 0.0734656528, 0.2469548881, 0.1575053334, 0.0089546666, -0.3124400377, 0.1394796669, 0.1999260336, -0.1503338516, 0.2847867608, -0.0808443278, -0.3065350056, 0.2594658434, -0.54403615, 0.11752747, -0.1258309782, -0.0007882025, 0.2060857266, 0.2676902711, -0.2906226516, -0.5785191059, 0.0555490293, -0.1116682291, -0.1575767845, 0.3648540676, -0.0376022756, -0.0444794334, -0.3675985336, -0.5435931087, -0.171612829, -0.4446733892, 0.3616952002, -0.080676958, 0.3070819974, 0.785379231, -0.073038958, 0.5275720358, 0.2695951462, 0.1862934828, 0.2173420191, -0.0682446659, -0.0081610233, -0.2857408822, -0.3695432544, -0.1063030958, -0.2888972759, 0.1831954122, 0.1218608171, -0.3298076391, -0.0585052334, -0.0348195396, 0.1349251866, 0.1361689717, -0.1742236018, 0.3653979599, -0.0563014559, -0.03022171, -0.034240935, 0.0573621541, 0.3721612692, 0.2451587021, -0.0622616112, -0.0394693054, 0.2059446126, 0.1754859984, 0.3692194819, 0.0424721837, -0.2425435483, 0.2184520662, 0.0004715081, 0.0349337906, -0.1755886525, -0.2768706679, 0.238911137, -0.0171984956, -0.0787891671, 0.0796444267, -0.1992208064, -0.2940825224, -0.1044809073, 0.0583733916, -0.2043751925, -0.3995546699, 0.1599551886, -0.3206955791, 0.1283508241, -0.059703555, 0.0156894401, -0.215094015, 0.0657820106, -0.1475068629, 0.1715199351, 0.0861310437, -0.2596296072, -0.0938584134, -0.5862800479, -0.6067797542, 0.2046329379, 0.2464428991, 0.5263924003, -0.0870107189, -0.0188239403, -0.1141607463, -0.0416838713, 0.4461072683, 0.1069853157, -0.1425530165, 0.2608310282, -0.1329193115, -0.3578276634, -0.1220480576, -0.3692784607, 0.2719855607, 0.5299983025, 0.3015770912, -0.2063941509, 0.0024216734, 0.3558469415, -0.0466872603, 0.1243460029, 0.1750923991, 0.041471079, -0.0300872922, -0.1414520442, 0.0908921659, 0.1586926579, -0.0416012071, -0.3086981773, -0.0585057363, 0.023824038, -0.0746736601, 0.1684129536, 0.212326169, -0.1910575479, -0.0090060793, 0.0770116448, -0.2531861067, -0.122906968, 0.4033559859, -0.0854443461, -0.1612048596, -0.2986449897, -0.0300268009, 0.177232638, 0.086401403, 0.1985329986, -0.0263533182, 0.0448870696, -0.2302389145, -0.0440560244, -0.086025618, 0.4295449853, 0.5223548412, 0.0664973632, -0.1000382975, -0.1619125307, 0.2714986205, -0.3283503056, 0.0714575946, 0.399015516, -0.0608637705, -0.3527772129, 0.2800027132, -0.2473482043, 0.4753119349, 0.4118621945, 0.2183437496, 0.6721663475, 0.3472308218, 0.6203199625, 0.1277313232, 0.4753558338, -0.1620081067, -0.0173952505, -0.1005234197, -0.0788865611, 0.0276138559, 0.1096014977, -0.1319757849, 0.0889555812, 0.1767241657, 0.0960327089, 0.0463649109, 0.098513037, 0.061185576, -0.2404058278, -0.2900926769, 0.1539501399, -0.158150658, 0.1574361622, -0.0482131839, -0.1438088715, -0.0824366882, -0.3264626861, -0.2867513299, 0.2754974067, -0.1414872259, 0.1955630183, 0.2045818418, -0.1971868575, -0.0391065329, -0.0287573747, 0.2409319878, -0.0701696426, -0.1455819905, -0.2068728805, -0.0692642704, 0.0280246399, 0.1032118946, -0.1363177299, 0.5273318291, -0.1486341059, -0.137599051, -0.0097951535, -0.0955040455, -0.2173524499, 0.2621588707, 0.1152564138, 0.0907623768, 0.1473241746, 0.0249882825, 0.1188032106, -0.452347815, -0.232152164, 0.1703427881, -0.1349195838, -0.3381386399, 0.2134268582, -0.1455637515, -0.0226631388, 0.05624092, 0.2497800589, -0.0592683814, 0.2341695428, 0.6033890247, -0.021193251, -0.0915533006, -0.1435733438, -0.216542393, 0.0541518591, -0.1071857139, 0.1656973362, -0.1493014842, 0.0013677776, 0.0525454432, 0.157504648, 0.0081931353, 0.2858625948, -0.1662968695, -0.3224808872, -0.3871926665, 0.2180493176, -0.1401995718, 0.2134715766, 0.1630476862, 0.6170108318, 0.0856667906, -0.1259978861, -0.3218879104, 0.032127507, -0.2677124143, 0.3241806924, 0.0389144383, -0.2092732489, 0.150325194, -0.004805468, 0.1132221222, 0.1361240447, -0.1097705364, -0.258374095, -0.1917406619, 0.0714030862, 0.1857145876, -0.346509546, 0.166162774, 0.0046596974, -0.1557184309, -0.1230324581, 0.1172003746, -0.0563097075, -0.2534217238, 0.5090385079, 0.1321462542, 0.6595726013, 0.2523016334, 0.0457538962, -0.1782054454, 0.1686657369, -0.088948369, 0.1971289515, -0.0100232661, -0.0413217843, -0.3386872411, -0.0331775434, -0.4179777801, -0.1148275137, 0.2204306722, -0.3328478038, -0.0377381779, -0.2488699406, 0.0429367423, 0.1350104064, -0.1134635359, 0.0266082734, -0.0060439929, 0.2527717948, -0.0741034895, 0.162306875, 0.2498594522, -0.0320505872, 0.2161785066, 0.1043516472, 0.1092672348, -0.0902840719, 0.1097072437, 0.1391164809, -0.1979452819, -0.311791718, 0.241280362, 0.3260468841, -0.3616290092, 0.1162671223, -0.1829431951, 0.0854909867, 0.4222062528, -0.0515633188, 0.0166012105, 0.2457000166, 0.0994247496, -0.1708700955, 0.2237036377, -0.3996597528, -0.2821900845, -0.0317095369, 0.1926877499, 0.2779774964, 0.100870721, 0.0297558568, -0.2888757288, -0.1592282653, -0.0015653372, 0.2095530778, -0.3970550299, 0.0147346742, -0.3463860154, 0.1573566794, 0.0574847013, -0.3433608711, -0.0377024002, 0.0445324741, 0.1723370105, 0.1850245148, -0.2280977368, -0.0942424089, -0.1356527507, 0.0157813467, 0.217911303, -0.061141789, 0.3229673505, 0.3675955236, -0.0189267546, -0.2765446305, 0.5054779053, 0.4357511699, 0.2400352061, -0.3785280585, 0.0104650259, 0.1237665862, -0.1097799391, -0.0272483937, 0.09683837, 0.107646808, 0.2009626478, 0.2250174135, 0.1305900812, -0.1786043346, 0.3606992662, 0.1361265481, -0.0453327075, -0.2492052764, 0.3173818588, 0.1219384745, -0.1387658715, -0.1831060201, -0.0519300476, -0.3085250258, 0.1512974203, 0.3084790707, -0.1038088799, 0.1319822967, 0.156807512, 0.0841483623, -0.093700245, 0.3824256361, 0.2785472274, 0.3412987292, -0.2391834855, -0.0532664135, -0.1395320892, 0.1518156826, -0.1091637164, 0.3494440317, 0.1335537583, 0.15286538, -0.2013281882, -0.0554909557, -0.1758030355, -0.4866572618, 0.0382896811, 0.0140967406, -0.5309220552, -0.067765139, 0.216723457, -0.2995290756, 0.0809301585, -0.2919172645, 0.1038763747, -0.0216724798, 0.0582709461, -0.0243855678, 0.254758358, 0.0580755547, 0.4695754051, -0.1598594934, 0.2173871249, 0.3523495495, -0.0399276093, -0.2264610231, 0.0155346114, -0.1288682222, -0.3512553275, 0.0623170957, 0.0021564402, 0.6310626268, 0.0308013782, -0.3426463008, -0.0471832864, 0.2966683805, 0.0744637251, -0.2258536071, -0.2897467315, 0.5159019232, -0.3268100917, 0.1209044307, -0.0355342925, 0.2257706225, 0.0469701476, 0.127117306, -0.4208703637, -0.5104088783, 0.4589867592, -0.6723732352, -0.2989535928, -0.1500109732, 0.3177682459, -0.1784153581, 0.1541514248, -0.7014428973, -0.1308532506, 0.3214224577, -0.3068630099, -0.3737614453, 0.1170789301, 0.2110434622, 0.0169104487, 0.0359381065, 0.5025029778, 0.0519081466, -0.3045864105, 0.0904338807, -0.3307102919 ]
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.2808126807, 0.0386492014, 0.0163442045, 0.1777213812, 0.0583324097, 0.201658994, 0.0901038572, 0.3195053935, -0.1677363813, 0.0523617156, 0.0420732498, 0.3578426838, -0.1656034291, -0.0654392168, 0.1720553935, 0.0222493559, -0.3066465855, 0.3548321426, 0.1001126617, 0.1028401852, -0.1480748355, 0.1693322659, 0.0237268507, 0.0275579244, -0.1753007174, -0.0250491388, -0.2061965466, 0.3140673637, 0.2690214515, -0.5922113061, 0.4257380664, 0.1297423095, -0.1612460911, 0.1231278554, -0.0001130642, 0.1107812375, 0.247226581, -0.1157405972, -0.5981779099, -0.1378035247, 0.0640315562, -0.2330076694, 0.2686038315, -0.3578183055, -0.2629138231, -0.2691299319, -0.0671391636, 0.0914065093, 0.1089665592, 0.3557496965, 0.2239870131, 0.2617226839, -0.4300845861, -0.1137191206, -0.1765923649, -0.051128149, 0.0575867295, 0.3311010599, 0.0536820143, 0.0526562035, 0.1169042587, -0.1423466802, -0.0944501534, 0.1072167903, 0.0086368322, -0.0255859364, 0.0688415691, -0.053670194, -0.084887974, 0.2826161981, 0.1915072203, -0.451246351, -0.0090721846, -0.3596469164, 0.2316243351, -0.0907499716, 0.3416333199, -0.1556085348, -0.4267594218, 0.0131679932, -0.4288156629, -0.2629850209, 0.1304962337, 0.0926605538, 0.1009302884, 0.0209593009, 0.0291007906, 0.241898641, -0.0891791731, 0.1615595967, -0.1071041971, -0.3283273578, -0.1013361439, 0.016951967, -0.0456778072, -0.292390883, 0.2084434181, 0.0993100703, 0.2808901668, -0.0533517636, -0.0385392755, -0.123390317, 0.2437750697, 0.1774766445, -0.1193950921, 0.3732145727, 0.434204638, 0.0592531599, 0.1818021536, -0.0008896962, -0.1197536588, 0.0659155697, 0.1539165378, -0.3203547597, -0.1054673046, -0.0126285814, 0.3360987008, -0.3401196003, -0.3468775153, -0.0612614602, -0.0622998998, 0.1099941581, 0.3181946278, 0.3967019022, -0.0057035238, -0.1252385825, -0.0159598589, 0.2539605498, -0.0674444437, -0.0837187916, -0.3294445276, -0.0484220237, -0.0665614456, 0.1366148293, 0.4345744848, -0.3286030591, 0.6601088047, 0.2206454724, 0.0609023683, 0.0424175262, 0.0439316407, -0.0425023213, -0.0450805724, 0.3762795925, -0.1378866434, 0.0346908793, 0.0766117424, -0.1368467957, -0.4026350379, 0.229272306, -0.1443719417, -0.5251876116, 0.3482979834, 0.1790263206, -0.3709742129, 0.027520325, 0.0139294304, 0.0734274164, 0.0692848116, -0.2042810619, -0.1741868705, -0.3507989049, 0.0237936676, -0.2072622776, 0.2525055408, 0.3057611585, -0.1314183921, -0.2009167671, 0.1866981536, -0.0990065634, 0.1171107292, -0.1723434031, -0.3042076528, 0.2274876535, -0.278994143, 0.0282070488, 0.6426599026, -0.3164255023, -0.0749777406, 0.3298940957, -0.0031591281, 0.1643636227, 0.0045767538, -0.0373654291, -0.2150311023, -0.1312564313, 0.0781560466, 0.2976286113, -0.0622225404, -0.0454832539, -0.3610289693, -0.1531259418, 0.1661149561, 0.0698524415, -0.249271512, -0.034018442, -0.2962560356, -0.0673039556, 0.2288820446, -0.0425869711, -0.2239328921, 0.0862085223, -0.0886951238, -0.120497942, -0.0062596574, 0.1013944745, -0.6111180186, 0.4612473845, 0.0510444194, 0.1673368216, 0.1060815603, -0.0808746442, -0.2216367275, -0.0650241002, -0.2754854858, -0.3786340058, 0.1259013414, 0.4341849387, 0.1042221263, -0.2089666575, -0.160991773, -0.0981571376, -0.3174372911, -0.0375043452, -0.0407109484, 0.0693353638, -0.0057055471, -0.0255559254, -0.1366920769, 0.1385819912, 0.1388397366, -0.2931469083, -0.0865141749, 0.5086605549, -0.1005269885, -0.1135225147, 0.0670475811, -0.0492178202, 0.0144283157, -0.0268898904, -0.040112596, 0.1391651481, -0.022806786, -0.1525019705, 0.0116875703, 0.4082338214, 0.1521520466, 0.2619358301, -0.0039573759, -0.0580009706, 0.252171129, -0.2402489483, -0.0883737281, -0.1512284279, 0.4394220114, 0.1059496999, 0.4570342302, 0.032309778, -0.340921402, -0.0486268699, 0.2273120284, -0.0086173937, -0.1118608415, 0.1671788394, -0.1314897835, 0.0118458346, 0.0743679255, -0.0071037486, 0.6731566191, 0.1936108321, 0.0327812433, 0.1103147343, -0.583409965, -0.2602224648, 0.3016803861, -0.0357585959, 0.2742646933, 0.1225181073, 0.2030340433, -0.0732068494, -0.4160085917, -0.3327858448, 0.2195359766, 0.2261593789, -0.3869548738, 0.1408002973, -0.0801019371, -0.0013912246, -0.279727906, -0.3139401972, -0.0723813921, -0.3478244245, 0.2141195238, -0.0890015364, -0.2131898999, 0.2064431012, -0.0489373952, 0.2271480709, -0.2309504449, -0.5881280899, -0.3020557761, -0.1458091736, -0.4142384231, 0.0414331928, 0.1540945768, -0.020457672, 0.2949225307, -0.122846514, -0.5448803306, 0.1032909229, -0.3132391572, 0.2091279924, -0.0427243039, 0.7572253346, 0.3080534339, 0.1065724939, 0.4649313688, -0.2761748433, 0.451926142, 0.1219887286, -0.1166918278, 0.2048781216, 0.1077319086, -0.0862266347, -0.3488541543, -0.481372565, -0.0115973167, -0.2266954631, -0.1176695824, 0.1248533875, 0.1642354727, 0.4464902282, 0.167384401, 0.2023620009, -0.1938331723, 0.4660234451, -0.0798347145, -0.1949102283, -0.128449887, -0.074519679, -0.1809365302, -0.3876855969, -0.1372407377, 0.3511224687, -0.1121400297, -0.4986843467, -0.2527989745, -0.1208138615, 0.4919121265, -0.2137346268, -0.2025672793, 0.2597000897, 0.3100270033, -0.0842043087, -0.1884578764, 0.0413898155, 0.288918674, 0.1117124856, 0.2339572906, 0.0027119406, 0.2264721096, -0.1682232767, 0.3377181888, 0.3033351302, -0.2950260043, 0.145498544, -0.2538926303, 0.2515288293, -0.1826418489, -0.3044291735, 0.1686680317, 0.1307935864, -0.1615763903, 0.3201493919, -0.1414804012, -0.0442938991, -0.1323331892, 0.0162518099, 0.039427951, -0.1494452804, 0.2298579365, -0.1908066273, 0.008601374, 0.0478129238, 0.0411833078, -0.0809967145, 0.0466444232, 0.0425658114, 0.268278718, -0.0543798693, -0.0927185789, -0.2088310421, -0.3003645539, -0.421227634, 0.1644625962, -0.099143967, 0.3014189601, -0.0467437468, -0.026560273, 0.1795353293, 0.0005331263, 0.4785409868, -0.0032719392, 0.1700184345, 0.4871151149, 0.0659949854, -0.3755954206, -0.1330592483, -0.2954861224, 0.163518548, 0.3788217902, 0.660425961, -0.3550488353, -0.4132326543, 0.0995787233, 0.421010226, -0.1064963266, -0.3035874963, -0.266513586, -0.3496366143, -0.1467333436, 0.0701795965, -0.3176822066, 0.3553072214, -0.3038995266, 0.0568312258, -0.065392673, -0.0897994265, 0.0434090197, 0.3618537784, 0.254963398, -0.1290692091, 0.2132921815, 0.0077914335, 0.1998325884, 0.0466915369, 0.4059338868, -0.0683813691, 0.2832717597, -0.0779442042, 0.1865796298, 0.5016237497, 0.277615577, -0.1241766661, -0.0561815649, -0.399089396, 0.1736403108, -0.2655556798, 0.2824918032, 0.3087879419, 0.0439315848, 0.0081731305, -0.2562390268, 0.5897765756, -0.026384294, -0.2229000181, 0.4522736669, -0.0937399194, -0.4636975825, 0.3889218271, -0.0300233625, 0.7602945566, 0.3173416257, 0.2274960428, 0.6086380482, 0.2118724883, 0.170752883, 0.1247128844, 0.1548671573, -0.2730985582, -0.0845784545, 0.2797227502, -0.1793148667, 0.1964720935, 0.2276955247, -0.2754837871, 0.2837619185, -0.0638537109, -0.0449196137, 0.1381043792, 0.220424667, -0.0480707064, -0.0373604223, -0.4018087983, 0.158118397, 0.0321191289, 0.2868533134, 0.0300636888, 0.053052105, 0.0524239987, -0.2552851439, 0.0507869571, 0.1388697773, -0.3315857947, -0.0008888654, 0.1234660149, -0.1947834194, 0.0131059289, 0.1538497806, 0.1285513192, 0.2766211927, -0.1290293932, 0.1358102113, 0.0137005877, 0.103377223, 0.1839087754, -0.0896476954, 0.2951234877, -0.1704014242, -0.2964978218, 0.0602015294, -0.3801343441, -0.0585323423, 0.2786421478, -0.1615182459, -0.0661645234, -0.32923311, -0.3309010863, 0.0869206637, 0.1180756092, -0.2144933939, 0.1361999065, -0.0282534286, -0.3646182418, 0.1135279536, -0.0767541677, -0.3893277645, -0.0756364539, -0.1069438607, 0.0940751284, 0.2095005512, 0.6270081401, -0.33517313, 0.2477501482, -0.1618226171, 0.0379430354, 0.1512002796, -0.1700679213, 0.1599757373, 0.2201095521, -0.2147942036, 0.0113861784, 0.4493314326, 0.1310530156, 0.1979991794, -0.1519992948, -0.2812596858, -0.1871854961, 0.0357024856, 0.2232614756, 0.3144434094, -0.0407343432, 0.5240077376, -0.097795099, 0.289699614, -0.3693550825, -0.0361140929, -0.4362347126, 0.3607873619, -0.0845115334, 0.2169928849, 0.2612896264, 0.1414243579, 0.1556660235, -0.2430791557, -0.0575819276, -0.29001984, -0.1918910742, 0.1262520254, 0.0445536524, 0.1527551711, 0.0073167756, -0.1333147585, 0.1083943844, -0.1033808812, 0.1381948441, -0.3329188526, -0.0064256154, 0.2893798947, 0.2476063669, 0.1590155959, -0.0521150269, 0.2165992707, -0.2068294287, -0.0528036505, -0.0547470152, 0.2293614, -0.4055798948, -0.1391331106, -0.0639211833, 0.0480661243, -0.2943245769, 0.1606634557, -0.157233268, 0.0150286695, 0.0451960564, 0.0703844652, 0.2515390217, 0.5024477839, -0.0748997778, 0.0564222559, 0.1374619007, 0.2301280349, -0.360368073, -0.0501320884, 0.0565456636, -0.12268278, 0.3516514301, 0.191991955, 0.1136416048, -0.0524164736, 0.2114171833, -0.1112446338, 0.1173503399, -0.1513701528, -0.0625124648, 0.3782606721, -0.107727237, 0.137743324, 0.2817500532, -0.0336466208, 0.1510795802, 0.0711001158, -0.2178889215, 0.3636241257, 0.0021123663, -0.1638918817, 0.1992931664, -0.1242936254, 0.447860539, 0.0578688532, 0.0850248784, -0.1152185947, -0.1663117707, 0.577875495, -0.5218055844, -0.2537311912, -0.0446053445, 0.1963034123, -0.1504122913, -0.2721489966, -0.4087145329, -0.1099317223, 0.0089783072, -0.1395119727, -0.0893711597, -0.2711936533, 0.0749698654, -0.0390520468, -0.1797076464, -0.4126122296, -0.0326085724, 0.3341914415, -0.0930392742, -0.1596975625, 0.4812886417, 0.2137867063, -0.0185974054, 0.0896016136, 0.4621693492, 0.5086618662, 0.1307403892, -0.0780733526, -0.1886778772, -0.0380980894, 0.0525455326, -0.205090344, 0.1065385938, 0.0240305811, -0.2988904715, 0.4634021819, 0.2007215619, -0.1836307347, -0.1176308692, 0.1081551239, -0.1675925851, -0.1707926095, 0.5300662518, 0.19583112, -0.0978410244, -0.0381047204, 0.1672278643, -0.2096354961, 0.0716116875, 0.4497458637, 0.1866222769, 0.1008022726, 0.126188308, 0.1134094745, -0.1322553456, 0.5245946646, 0.0897299796, -0.0436543822, -0.5897714496, -0.1635482758, -0.6522300243, 0.1591016054, -0.0294818059, -0.2246661782, 0.2934617102, 0.0248234272, 0.2001621127, -0.0379634351, -0.1583323181, 0.2733849883, 0.3098796904, -0.1415100545, -0.3142858148, -0.2356008291, -0.264275074, -0.0255266372, 0.064060092, -0.2706092, 0.021101499, -0.1963490248, 0.0494559854, 0.1104648113, 0.11455933, 0.5461163521, 0.1187746525, 0.2451623231, -0.0055924673, 0.5098609924, 0.0337563157, -0.1479350328, -0.0083981194, -0.1826661229, -0.160097301, -0.1034492403, -0.0930944979, 0.0018281788, -0.1612287164, 0.1169154942, -0.2332953215, 0.0622343086, 0.1686073393, -0.2084344327, 0.1038311049, 0.1084464937, -0.1600909531, 0.2272063345, 0.2255656123, 0.4649652243, -0.1066593453, 0.1099356711, -0.315723896, -0.3565710187, 0.7502675653, -0.1635053307, -0.2016151398, -0.0326658413, 0.167045638, -0.1902440637, 0.0705954283, -0.3250293136, -0.2004296482, 0.4116539061, -0.116896309, -0.2372823656, 0.3358036578, 0.1896927804, 0.0820225179, 0.0655163303, 0.37761271, 0.0757653341, -0.2050296515, -0.1730701625, -0.3017948866 ]
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.3385567069, -0.0536468029, 0.0424276218, 0.1108629704, 0.163440749, 0.0783362985, 0.1228832975, 0.3306729794, -0.0973310545, -0.0040301979, 0.0537735075, 0.4402479827, -0.1571186334, 0.0414614305, 0.1643654257, 0.0443921313, -0.268258512, 0.2769704461, 0.0980257019, -0.0319094211, -0.1879015267, 0.1579578668, -0.0973074436, 0.0949116498, -0.2986760437, 0.0340306237, -0.1379247606, 0.2986699641, 0.1990149021, -0.5106948614, 0.446177125, 0.0938681513, -0.085957855, 0.1431889534, -0.0001083159, 0.0801488757, 0.3250587583, -0.08392106, -0.6371139288, -0.0625694245, 0.1405446827, -0.2929130793, 0.2855113149, -0.3282711506, -0.3212665915, -0.2411287278, -0.1270382702, 0.0736481249, 0.0725032911, 0.380722791, 0.2747090757, 0.3636158705, -0.2297534943, -0.1485881954, -0.162092343, -0.0258872472, -0.0437100157, 0.3394280374, 0.1688622236, 0.0183409601, 0.0527105667, -0.1217423752, -0.0641048625, 0.0916208103, 0.0495269261, -0.1177208275, -0.077367872, -0.0686178356, -0.0201731175, 0.2787656784, 0.2818545401, -0.4329421222, -0.0211795382, -0.2513441145, 0.1684999317, -0.14982526, 0.3519795239, -0.0812685788, -0.4076194167, 0.0426624641, -0.4676845074, -0.1900425702, 0.0658132136, 0.1104305312, 0.0950845331, -0.0414987579, -0.0108463578, 0.2007044256, 0.0036652451, 0.1042257622, -0.1386705339, -0.1761010289, -0.1310178936, 0.127907902, -0.1391436905, -0.3100566864, 0.2468242645, 0.2167615443, 0.2853587866, 0.0043460187, -0.0273894966, 0.0024012486, 0.231073454, 0.2241033316, -0.1374669373, 0.3698551357, 0.3622439504, -0.0116296783, 0.1981759667, 0.0102608874, -0.1906319261, 0.0484405719, 0.1153857335, -0.3490092754, -0.0083675459, -0.0628788471, 0.2651872635, -0.4105985463, -0.3491709232, 0.0293947123, -0.0557915419, 0.1655777693, 0.3375842273, 0.419934094, -0.0324666798, -0.1970601976, 0.0237553567, 0.3201876581, -0.191279918, -0.1085970253, -0.3206710815, -0.0218136068, -0.1324211657, 0.0523714721, 0.4688152075, -0.2727926075, 0.6226426363, 0.1460936069, 0.0216841735, 0.0165438205, 0.0746408552, -0.0024730787, -0.056861151, 0.3785867989, -0.1605926901, -0.0764333084, 0.23291637, -0.1536602378, -0.351706624, 0.204493314, -0.0884959027, -0.5394567251, 0.2401415259, 0.2285761535, -0.3029274642, -0.0736227781, 0.009451557, 0.0187689159, 0.0577058829, -0.1259180456, -0.1104716137, -0.3919746876, 0.0619843006, -0.1528330594, 0.2685032189, 0.2812785208, -0.1850990206, -0.1322149187, 0.1188688576, -0.1435095072, 0.1952685863, -0.0970530286, -0.2381484658, 0.1500054896, -0.1737830043, 0.1072407812, 0.5219545364, -0.2305838615, -0.1180212125, 0.2901422977, -0.0084153861, 0.0573635101, -0.1372816116, 0.0773707256, -0.1516711265, -0.037383128, 0.0596370697, 0.3409300148, 0.0408537388, 0.0341271758, -0.4409683645, -0.1354338825, 0.1570860147, 0.1454817653, -0.3463740051, -0.0475004166, -0.1469413936, -0.0601769015, 0.1990851015, -0.082697548, -0.2510531843, 0.0619647279, 0.0419990234, -0.0967454463, 0.0421943851, 0.0955782235, -0.5564895868, 0.4191558659, 0.0833569169, 0.2934086323, 0.1581555009, -0.0835636854, -0.2718795836, 0.0456509963, -0.2793192565, -0.3855572045, 0.1636401564, 0.2197537422, 0.155546084, -0.1151788831, -0.1425245702, -0.0953572169, -0.3342648745, 0.0108678266, -0.0560787693, 0.0678905696, -0.016809063, -0.0625690818, -0.0748566613, 0.2662244439, 0.1372030526, -0.2954994142, -0.2036426514, 0.4747344255, 0.0138569213, -0.0961077958, 0.1071807146, -0.0413773507, -0.0719471052, -0.0976851583, 0.0078977589, 0.1678726524, -0.0173535887, -0.1123135835, -0.0462837256, 0.3852533698, 0.1947692633, 0.1741728336, -0.0817499161, 0.0258380771, 0.3416346014, -0.1674986184, -0.0014198758, -0.1094363853, 0.495426476, 0.1282528043, 0.4595439732, 0.057371743, -0.3472212553, 0.0108896382, 0.279954195, 0.0147187486, -0.0306049213, 0.3178575039, -0.1561894715, -0.0745471865, 0.1391989887, -0.0617590956, 0.5611634851, 0.1805538237, -0.0291943252, 0.1363344789, -0.6024134159, -0.2829420269, 0.3375745118, -0.1507918835, 0.2357171476, 0.0174274035, 0.1795164645, -0.10595797, -0.5612171292, -0.2691088319, 0.0600529164, 0.3444685936, -0.3191833496, 0.104244113, -0.1219014972, 0.0684501082, -0.1120395586, -0.2230794877, -0.1525086015, -0.37973997, 0.2066003233, 0.0192586612, -0.0720107853, 0.2248984277, -0.0645212531, 0.2702754736, -0.1633853018, -0.5609419346, -0.3093767762, -0.2441607714, -0.5122615099, 0.082407251, 0.1711143851, -0.0119703151, 0.3132205606, -0.0825490057, -0.3603596091, 0.1028652638, -0.3295372427, 0.1290488094, -0.0900544152, 0.7290683985, 0.2706768513, 0.1940113455, 0.3838454187, -0.1142290384, 0.5275810361, 0.0100328922, -0.1275106072, 0.2818478644, 0.1550062448, -0.1615920514, -0.3950867057, -0.4603397846, -0.044955723, -0.2517787516, 0.0392459631, 0.1456490755, 0.0847619474, 0.4176310897, 0.2565796971, 0.2545306683, -0.1059370786, 0.3779492974, -0.1628268063, -0.220324412, -0.0969337672, -0.055734694, -0.3735412955, -0.3066042364, -0.0991492718, 0.3467927277, -0.1125309616, -0.4803194702, -0.2475797534, -0.2052385658, 0.4086899161, -0.0434772335, -0.2014961541, 0.2554349899, 0.2472822964, -0.1151552126, -0.1670493335, 0.040526025, 0.2664712071, 0.0364575684, 0.1248785108, -0.0117563568, 0.3133134246, -0.1855170727, 0.294936806, 0.2942861319, -0.3394873142, 0.2867258489, -0.2529634535, 0.3277394474, -0.2344418764, -0.3229251504, 0.2463133335, 0.0871210545, -0.1973431706, 0.2904694676, -0.0703138039, -0.1744455695, -0.1309031546, 0.0823340863, 0.0625957549, -0.145800367, 0.1759448797, -0.0543451197, 0.0276571549, 0.0180718824, 0.1418784261, -0.0979136825, -0.0989709422, 0.0257285312, 0.2842671573, -0.0789645314, -0.1229358017, -0.256139338, -0.3128240705, -0.4667947888, 0.2327460796, -0.1251158565, 0.38888973, -0.1696741879, -0.0531123206, 0.1999862939, -0.0648228079, 0.4661892653, -0.0625412315, 0.1752846688, 0.4553384185, 0.064805083, -0.414945364, -0.098044768, -0.3053011596, 0.1492466331, 0.3097377419, 0.6342871785, -0.2931162119, -0.3505548239, 0.0878177658, 0.3865187168, -0.0853345096, -0.2622834146, -0.2818943858, -0.3366251588, -0.1886927038, 0.1518342495, -0.3122463822, 0.3926032186, -0.3093534112, 0.0417596996, -0.0965657234, -0.0768506601, 0.0746121481, 0.4339576364, 0.2132889628, -0.1293458343, 0.1532240361, -0.0502417646, 0.1660062224, 0.0519774929, 0.3848621845, -0.0900921226, 0.2654477358, -0.1243426502, 0.0878727436, 0.4876843691, 0.2203260213, -0.1677978337, -0.1108477563, -0.38512519, 0.2015218139, -0.3323495388, 0.2147592604, 0.339014709, 0.1325268596, 0.0496404059, -0.2370406091, 0.5995283723, -0.0255444162, -0.1007101312, 0.3754692972, -0.0649462044, -0.339494288, 0.3482227623, 0.0802408382, 0.7891094685, 0.2262750864, 0.2127139717, 0.6046993732, 0.2290663123, 0.1493355334, 0.0640858263, 0.1478567123, -0.3400285244, -0.0823624209, 0.2297733575, -0.195412159, 0.2035366297, 0.1853275001, -0.2958568335, 0.1574373543, -0.1154387593, -0.1364899278, 0.1325168312, 0.2557720244, -0.0615238026, -0.0725660324, -0.3598592877, 0.2513633966, 0.0307875518, 0.3629924059, 0.0453267768, 0.0642537773, 0.0008849353, -0.2537643313, -0.0929714814, 0.1888665259, -0.2171534896, -0.0174512081, 0.1472251117, -0.1967603862, 0.0516492948, 0.0782266408, 0.1751746833, 0.2904869914, -0.1754975915, 0.0524093285, 0.0459549502, 0.0707390904, 0.2827408314, 0.0073889978, 0.3172933757, -0.1767941713, -0.2712946832, 0.0527040809, -0.321082741, -0.0509175621, 0.2848851085, -0.2373485565, -0.0367349721, -0.3911941946, -0.3904460967, -0.0422729105, -0.0068270117, -0.1889244765, 0.1713585854, 0.0257088691, -0.2460058033, 0.125257656, 0.033685483, -0.3654956222, -0.0639909878, -0.0301252231, 0.025730744, 0.2625962198, 0.614623487, -0.2057130188, 0.1340373307, -0.2302793413, 0.0249843225, 0.1805562973, -0.2168996185, 0.1104896143, 0.2585728168, -0.220131591, 0.0646211952, 0.4208981991, 0.0896682069, 0.1069259793, -0.1108949929, -0.389122963, -0.2301579118, 0.0464072376, 0.1363068372, 0.3031690717, -0.054847002, 0.5074742436, 0.0490084067, 0.1555223912, -0.4011347294, -0.0861841068, -0.4393156469, 0.2175884247, -0.0180108808, 0.1239902079, 0.2580361068, 0.0669382364, 0.1721224189, -0.1851352006, -0.1733319908, -0.3309586048, -0.2168244272, 0.0949629247, 0.1097595245, 0.091748476, -0.0415181927, -0.1717209071, -0.0249397196, -0.1845978647, -0.0612857789, -0.3775548041, -0.0767606795, 0.2772758901, 0.2682213783, 0.1808111668, -0.0327041596, 0.1179181859, -0.1616005898, -0.0552700385, -0.1441788077, 0.0326440595, -0.3144245446, -0.132937327, -0.1057776213, 0.0905714855, -0.2027168721, 0.1687096357, -0.064882651, 0.0053160833, 0.0613967925, 0.0235371217, 0.2797964215, 0.4092744291, -0.0631124526, -0.0312697664, 0.2344020605, 0.2600902319, -0.4162310958, -0.0071467124, 0.106361106, -0.0779237524, 0.3318062425, 0.1322983503, 0.0769864768, -0.0115643889, 0.1614897996, -0.0746060461, 0.1683525741, -0.2032974064, -0.1042966545, 0.3018099964, -0.1390678287, 0.1760897487, 0.3138338625, -0.017744448, 0.135662362, 0.1255777031, -0.1194801331, 0.3516346812, 0.0769033283, -0.0118932687, 0.0888276845, -0.1562253386, 0.4014152586, 0.009034045, 0.1210857108, -0.0861208513, -0.1869271696, 0.6330310702, -0.5700557232, -0.2774114609, -0.1221755072, 0.187772736, -0.2250171602, -0.1661673337, -0.3115478158, -0.0710881799, -0.0374417379, -0.1971277297, -0.0877315104, -0.188359037, 0.0391740277, -0.0581153221, -0.088200435, -0.4211507738, -0.1079904288, 0.3032976985, -0.0499658845, -0.0625259131, 0.466686368, 0.0907628387, 0.0665531233, 0.0129106175, 0.4504224956, 0.5012668967, 0.2217957377, -0.101541996, -0.1400886774, -0.1586228311, 0.0515248403, -0.1498555839, 0.2292054296, 0.0469562672, -0.2733750641, 0.410394311, 0.2153734863, -0.2012120783, -0.1290585548, 0.0607400909, -0.088523075, -0.1209945902, 0.4698433578, 0.208605051, -0.1601246744, -0.1643499136, 0.0871341527, -0.2041849047, 0.1490508616, 0.4095194936, 0.1968950331, 0.1260686666, -0.0518324077, 0.1399004459, -0.0844632909, 0.6105015278, 0.1193030849, -0.0350403301, -0.5040113926, -0.1553123742, -0.7108895779, 0.1991674006, -0.143713221, -0.3385177851, 0.2648856342, -0.0615065545, 0.2010036558, -0.0105593335, -0.184745729, 0.296328336, 0.2760751247, -0.1557747126, -0.2949590683, -0.1401157081, -0.262583971, -0.0780636445, 0.0311904103, -0.331784904, 0.0586188547, -0.2389078289, 0.0939719528, 0.0648318753, 0.0764857233, 0.4212228358, 0.2143618166, 0.1641711891, -0.042904254, 0.4837388992, 0.0438734666, -0.0726620927, -0.0829004273, -0.2332597077, -0.133716166, -0.0350030251, -0.1012426168, -0.0198265538, -0.0553849228, 0.0709223226, -0.3084035814, 0.1950900108, 0.1493377388, -0.2064778358, 0.0872706324, 0.1054443866, -0.1367050707, 0.1768000722, 0.212874651, 0.4557380378, -0.1234282702, 0.1840358675, -0.2646231055, -0.4019243717, 0.7486211061, -0.2990203798, -0.1954525411, 0.0654031038, 0.139028877, -0.1361294985, -0.023207007, -0.2310411334, -0.1156559959, 0.3482372463, -0.1259845793, -0.1509612948, 0.3325612247, 0.1050183699, 0.0815673918, 0.0588987693, 0.4525279701, 0.0271411017, -0.080658339, -0.1114686579, -0.2522571087 ]
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.2228239626, 0.0242496431, 0.1073713005, 0.230306983, 0.5109529495, -0.107259661, 0.532330215, 0.0775898248, -0.3410620391, -0.1247760206, 0.036657989, 0.3864074647, -0.369695425, 0.0422177389, 0.0443616398, -0.202463448, -0.088034451, 0.0099896938, -0.0232527442, -0.0536390096, 0.0482435897, 0.1829806268, -0.1568259299, 0.4144772589, -0.6451316476, -0.1835790426, 0.1746638715, -0.0963925421, -0.0992208272, -0.4487786889, 0.2202741057, -0.1020438969, 0.497636795, 0.3472320735, -0.0001241712, 0.1380357593, 0.1092859283, 0.1016945019, -0.2908720374, -0.3016375899, 0.1341147572, -0.0593847856, 0.4149942994, -0.2015386671, -0.0571896657, -0.2600914836, -0.0606258586, 0.2617686987, 0.3837760091, 0.5016981363, 0.1173221692, 0.168516472, 0.2464854717, 0.0738130212, 0.2595639825, 0.3155061901, 0.0754770115, 0.2071240395, 0.0168341696, 0.0266050398, -0.0856946409, 0.0748082697, -0.0701285228, -0.1997738779, 0.216658324, 0.2272828966, 0.1745793521, -0.147622183, -0.2287848294, 0.1198837757, 0.4332152009, -0.3214258254, -0.1559450328, 0.0079213679, -0.0111620426, -0.272799015, -0.0061668046, 0.2483308017, -0.4277774394, 0.1667013913, -0.1622606069, -0.025467094, -0.3792497814, 0.1995563805, -0.0925176293, 0.50326401, 0.1183700264, 0.1568168402, 0.1842404008, -0.0144359032, 0.3717098534, 0.0876381546, 0.1397549212, 0.0621484369, -0.3116945028, -0.0304638594, -0.4463339448, -0.6483633518, -0.2685145736, -0.212524116, 0.1655777693, -0.07115262, 0.2047268152, 0.2029505372, 0.2333223224, 0.1388008446, -0.2101234496, 0.5648382902, 0.1000925899, -0.1552507877, -0.1335454583, -0.0250886623, -0.3282391429, -0.0922893286, 0.5121237636, 0.1628404111, 0.1257428229, -0.0050321892, -0.0550227873, -0.1488326937, -0.2688643336, -0.0882173702, 0.2847146988, 0.1850692928, 0.09583579, 0.3832218349, 0.2154193372, 0.1111362129, 0.0493783355, -0.1352439821, 0.0353222974, 0.0855563208, -0.2179707885, -0.1198174432, 0.1821131706, 0.3281979561, -0.2699045837, 0.121501714, -0.1425366253, -0.2085365057, 0.001571998, -0.293589443, -0.005307354, 0.0134970956, -0.2574834824, 0.3097875118, 0.0935746282, -0.3035940528, 0.0196342915, 0.4677719772, -0.4638133347, -0.4341675043, -0.4358195066, 0.0899603143, 0.370848, -0.1129876971, -0.0923097879, 0.0597352125, 0.4520861506, -0.1888259053, 0.1029471755, -0.5797599554, 0.3521025181, -0.015292516, -0.0832997188, 0.0905465409, -0.4035288095, -0.1816474497, 0.16967085, -0.1533037275, 0.3111129999, 0.44239977, -0.3827602267, 0.2947915792, 0.0795273259, 0.0166929066, 0.8023685217, -0.3571897149, -0.2179585397, 0.1322550476, -0.1704493761, -0.3259195089, -0.0770722628, 0.2736981511, 0.0906304419, 0.0717988387, -0.0094028153, 0.391425997, -0.0933152735, 0.2531610131, -0.3342475295, -0.0749926046, 0.3700168729, 0.3320879042, 0.2507386804, -0.0335380025, 0.0665315986, 0.3422166109, 0.2596171796, -0.1454966366, 0.2384005189, 0.1618344337, 0.0183557235, -0.1759248972, -0.1052252054, -0.1606463194, -0.3050886393, -0.2020210326, -0.3353256583, 0.4843744934, -0.2394975275, 0.080949463, -0.1629107147, -0.0729377493, -0.1123222262, 0.239053458, 0.1080783829, 0.0814390779, -0.1436551362, -0.0689880177, -0.1000490189, -0.0618882179, -0.0523720793, 0.1881001592, 0.0251372978, 0.2732269168, -0.169100523, -0.1986373514, -0.2601748109, 0.056433253, 0.255815953, 0.0960626304, -0.2582114935, 0.2561086416, -0.1447918564, -0.2581232488, -0.3088113964, 0.3103086948, 0.1554100215, -0.5250990391, 0.0369420797, 0.1614516377, 0.1663214713, -0.0896116719, 0.1419671774, 0.1363628954, 0.0686423928, 0.1380073577, -0.0040350854, 0.369337976, 0.215533644, -0.0409564823, 0.2696604133, 0.0495530292, -0.1201174259, -0.1636266708, 0.1193024367, 0.0317240134, -0.2905444205, -0.0196274631, 0.4356472492, -0.1525559127, 0.2414227128, 0.4414305687, -0.1187740266, -0.0253543034, -0.1871620268, 0.2185591459, 0.1407992244, -0.0268117823, -0.0851381272, -0.0053834245, -0.2538852394, -0.0652514696, 0.3296320438, -0.1268232763, 0.4315134585, 0.1532038599, 0.2892071903, -0.018470468, -0.0514069535, -0.2919025421, 0.290548116, 0.2543336153, -0.2341016829, 0.4157403708, -0.1025250554, -0.213527739, -0.6377746463, -0.3706791699, -0.0837399065, -0.1330630183, -0.0448593237, -0.0630304143, 0.1643534154, 0.0614363551, 0.0771599188, -0.0667613298, 0.2787641883, -0.1845622063, 0.1062299088, -0.3318832815, -0.3990280032, -0.0193081219, 0.2381193936, 0.0182727687, -0.1148809716, 0.0174305141, -0.0464679003, -0.0756030157, -0.1490142643, 0.112837486, -0.0141116083, -0.1526150703, 0.1377331764, -0.0253321081, -0.2624067962, -0.2278358638, 0.3238839507, -0.3288734853, 0.0045540482, 0.4567362964, -0.1896836758, -0.0553345159, -0.051293578, -0.3140723705, -0.5814593434, -0.0539099127, 0.0172905847, 0.0343011469, 0.3296330273, 0.3480426371, 0.0307736918, 0.1842594743, 0.034005478, -0.0597996674, 0.0854178369, 0.1192036718, 0.3146252036, -0.0384519845, -0.2886624038, -0.3471453786, -0.110791117, 0.0709794909, 0.0762153491, -0.3193143308, 0.1262017936, -0.1260372996, 0.0512028337, -0.2906250656, 0.0220353212, 0.448099345, 0.1102450341, -0.0087919235, 0.2124652117, 0.0139713064, 0.3060882092, 0.0416652709, 0.2144848108, -0.0346942022, 0.178726241, -0.0456407964, 0.6495577693, -0.1418002844, -0.3859339952, 0.1767015755, -0.1262178272, -0.17933622, -0.009405911, -0.3002761304, -0.0031255819, -0.2587312758, -0.0353840739, 0.0021560267, -0.2854909599, -0.3254142404, -0.1811381429, 0.1342674047, -0.1632559448, -0.3281492293, 0.367277801, -0.250742048, 0.255068779, -0.156513676, -0.144771874, -0.1669235826, -0.4364989102, -0.030233549, 0.1978233457, -0.2999418378, 0.0271618031, -0.515203774, -0.2360692322, -0.1595630199, 0.0845981911, 0.3666801751, 0.5396203399, 0.0303004831, 0.0349534005, 0.080585897, 0.1010700464, 0.4106415212, 0.1839824319, -0.0750321448, 0.1855865568, 0.1655874103, -0.3579369187, -0.283521086, -0.5400995016, -0.082204245, 0.2528799474, 0.0967262685, -0.2896074653, -0.2426508963, 0.2225341201, 0.0414287522, -0.2890587449, -0.043575801, 0.0172088221, -0.2311729193, -0.2042601407, 0.1062256694, 0.2091031224, 0.3887907267, -0.2306030095, -0.1089196578, 0.0180642363, 0.2060564011, 0.1758811921, -0.0173784345, 0.1210726723, -0.1272635609, -0.2719094455, -0.2843087316, 0.2212006599, 0.1246749163, 0.4509963095, 0.1175309047, -0.3715089262, 0.1879759878, -0.0572566725, 0.3409129679, 0.0074074306, -0.1104088053, 0.3472834229, 0.1715260893, 0.3176766038, 0.0993584245, -0.0289534274, 0.2658730149, -0.0771321207, -0.4949767888, -0.0418625101, 0.274533242, -0.0730242953, -0.0733687952, -0.024151532, -0.2094789445, -0.2615411282, 0.418596983, 0.3421200514, 1.0206483603, -0.2603805065, 0.3446722329, 0.1092102453, -0.0606012419, 0.495056808, -0.1539974809, 0.1934904754, -0.5524522066, 0.0472403765, -0.1116917729, -0.1971728504, -0.1783652008, 0.3437052667, -0.3830963373, 0.1329994202, -0.0964828059, 0.1960600615, 0.1422275007, 0.3196294308, 0.2093945146, -0.2090150118, -0.2368240207, -0.0035605021, -0.4814991355, -0.099089466, -0.0379734188, -0.2874809802, -0.0001371577, -0.3918531537, -0.2000367343, 0.1904892474, -0.2922780514, 0.3384350836, 0.5059807301, -0.1064434946, 0.2228136808, 0.1987269521, 0.3068524301, -0.0456336848, 0.0611889064, -0.2703241706, -0.0626036748, 0.1166034341, -0.0572852306, -0.0534287989, 0.4100272655, -0.0476830341, -0.3138556778, 0.3178364933, 0.0144373439, -0.1757709533, 0.157268852, -0.0672015399, 0.0875043422, -0.4117053151, 0.2714482546, -0.2188573927, -0.3185107112, -0.2686831355, 0.003916278, 0.0189208444, -0.1227036417, 0.1043701246, 0.3181701899, 0.0148007721, 0.1429255456, 0.1666362137, 0.2979538441, 0.2228277326, 0.5636558533, 0.3159724474, 0.0117534399, -0.2083152235, 0.1311720163, 0.0069092736, -0.8838163018, 0.1976177096, -0.031380415, -0.2637526989, 0.212391004, 0.3753277361, 0.1270440817, 0.4987851679, -0.174079746, -0.4247024953, -0.3973776698, 0.0065997206, 0.1742636561, 0.0011970438, 0.0514226705, 0.5306833982, 0.1982193589, 0.1547174603, -0.2049758136, 0.1831798404, -0.3399904072, 0.2554392517, -0.1108252108, -0.4195621014, -0.0381519757, 0.1254323423, 0.0438734666, 0.0017528329, 0.0914918631, -0.0549670085, -0.1826649606, 0.1793143302, 0.2735620141, -0.2096081674, -0.2047401965, -0.0046509728, -0.0219300576, 0.1029739678, -0.0729959086, 0.0078971684, -0.1585484594, 0.5496968031, -0.0968373045, -0.0782952085, -0.3212502003, 0.0320715755, -0.2329458594, -0.0552968159, 0.1789359748, 0.23104994, 0.141433984, -0.1671889722, -0.7330245376, 0.1469233781, 0.280703932, -0.0789486691, 0.2824498713, -0.6361714005, -0.2515560985, -0.124068588, 0.058936432, 0.017822979, -0.2906439006, -0.1190240979, 0.150084883, 0.0792079791, -0.2228345275, -0.2199819535, -0.0071267691, -0.1568068862, -0.1895319223, 0.438834101, 0.0504113734, -0.178173393, -0.0951464325, 0.0208669007, 0.1502605677, -0.1083434746, 0.0020459443, 0.5980394483, -0.1331814378, -0.0291012526, 0.4560698569, -0.0017089406, -0.080827117, 0.0111114457, -0.2403191328, 0.1064089313, -0.1864718795, 0.0284156092, 0.2730588615, 0.0053152889, -0.1614433676, 0.1116661802, 0.0180338174, -0.1406102926, -0.2085791081, 0.5285695791, -0.1294040084, -0.1111315638, -0.2098498195, 0.2522191405, -0.2701115906, 0.0049776658, -0.1391524971, -0.0752414465, -0.1743355095, -0.2161694169, -0.1959978789, 0.1043631658, 0.2675894499, 0.2678266168, 0.1731941998, -0.292314291, 0.0107251201, 0.474584043, 0.0857411176, -0.2254722416, 0.4008434713, 0.3285625279, -0.0989189446, 0.0243503377, 0.3410253823, 0.5116847157, 0.5268764496, -0.2755406201, 0.0296223499, 0.0998526365, -0.1723223627, 0.3009315729, 0.1220270172, 0.5902811885, 0.1590000987, 0.1322443783, -0.0237081647, -0.0250820909, 0.2330639362, -0.036525026, 0.1909649223, 0.0803817809, 0.6249299049, 0.2398194671, -0.3591578007, -0.1490706354, 0.08431831, -0.4341339171, 0.00553995, 0.4604841471, -0.0493657589, 0.288000226, -0.0646261945, -0.0263439827, 0.1581725329, 0.6270228028, 0.2333031297, 0.2689679861, -0.3417341113, 0.11560601, -0.325651437, 0.3007263243, -0.0014744367, -0.0898732692, 0.0791963786, 0.0009106696, 0.0593977571, 0.176604867, 0.1285302341, 0.0768041909, -0.1470921636, 0.2389512956, -0.1691423357, 0.0240432136, 0.0808033943, 0.2279128432, -0.0594037175, -0.3299915493, 0.217532441, 0.1071316749, -0.0194473155, -0.0732563734, 0.0540493578, 0.1230193898, 0.173081696, 0.1039052606, 0.0345203131, 0.582687676, 0.1241592765, -0.0638273656, 0.3305569291, -0.1148172766, -0.1746622771, 0.164562434, 0.2476194799, 0.6241389513, -0.0343469009, 0.2556884885, -0.4483465552, -0.2127868533, -0.0261639953, 0.0727964789, -0.2580462098, 0.2388152629, -0.2617351115, -0.0323138349, 0.3202944994, -0.0063781664, 0.2982016504, 0.0939638168, -0.4200731516, -0.464122057, 0.3670325279, -0.2881051898, -0.2306285352, -0.1451696157, 0.1122814268, 0.0307797231, 0.0831524059, -0.6610738635, -0.009856239, 0.3323137164, -0.0263020247, -0.2213638723, -0.1205208749, 0.012263637, 0.1851016432, -0.0976044163, 0.2706556618, -0.0960785523, -0.0646673292, -0.4541103244, -0.175928697 ]
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.2228239626, 0.0242496431, 0.1073713005, 0.230306983, 0.5109529495, -0.107259661, 0.532330215, 0.0775898248, -0.3410620391, -0.1247760206, 0.036657989, 0.3864074647, -0.369695425, 0.0422177389, 0.0443616398, -0.202463448, -0.088034451, 0.0099896938, -0.0232527442, -0.0536390096, 0.0482435897, 0.1829806268, -0.1568259299, 0.4144772589, -0.6451316476, -0.1835790426, 0.1746638715, -0.0963925421, -0.0992208272, -0.4487786889, 0.2202741057, -0.1020438969, 0.497636795, 0.3472320735, -0.0001241712, 0.1380357593, 0.1092859283, 0.1016945019, -0.2908720374, -0.3016375899, 0.1341147572, -0.0593847856, 0.4149942994, -0.2015386671, -0.0571896657, -0.2600914836, -0.0606258586, 0.2617686987, 0.3837760091, 0.5016981363, 0.1173221692, 0.168516472, 0.2464854717, 0.0738130212, 0.2595639825, 0.3155061901, 0.0754770115, 0.2071240395, 0.0168341696, 0.0266050398, -0.0856946409, 0.0748082697, -0.0701285228, -0.1997738779, 0.216658324, 0.2272828966, 0.1745793521, -0.147622183, -0.2287848294, 0.1198837757, 0.4332152009, -0.3214258254, -0.1559450328, 0.0079213679, -0.0111620426, -0.272799015, -0.0061668046, 0.2483308017, -0.4277774394, 0.1667013913, -0.1622606069, -0.025467094, -0.3792497814, 0.1995563805, -0.0925176293, 0.50326401, 0.1183700264, 0.1568168402, 0.1842404008, -0.0144359032, 0.3717098534, 0.0876381546, 0.1397549212, 0.0621484369, -0.3116945028, -0.0304638594, -0.4463339448, -0.6483633518, -0.2685145736, -0.212524116, 0.1655777693, -0.07115262, 0.2047268152, 0.2029505372, 0.2333223224, 0.1388008446, -0.2101234496, 0.5648382902, 0.1000925899, -0.1552507877, -0.1335454583, -0.0250886623, -0.3282391429, -0.0922893286, 0.5121237636, 0.1628404111, 0.1257428229, -0.0050321892, -0.0550227873, -0.1488326937, -0.2688643336, -0.0882173702, 0.2847146988, 0.1850692928, 0.09583579, 0.3832218349, 0.2154193372, 0.1111362129, 0.0493783355, -0.1352439821, 0.0353222974, 0.0855563208, -0.2179707885, -0.1198174432, 0.1821131706, 0.3281979561, -0.2699045837, 0.121501714, -0.1425366253, -0.2085365057, 0.001571998, -0.293589443, -0.005307354, 0.0134970956, -0.2574834824, 0.3097875118, 0.0935746282, -0.3035940528, 0.0196342915, 0.4677719772, -0.4638133347, -0.4341675043, -0.4358195066, 0.0899603143, 0.370848, -0.1129876971, -0.0923097879, 0.0597352125, 0.4520861506, -0.1888259053, 0.1029471755, -0.5797599554, 0.3521025181, -0.015292516, -0.0832997188, 0.0905465409, -0.4035288095, -0.1816474497, 0.16967085, -0.1533037275, 0.3111129999, 0.44239977, -0.3827602267, 0.2947915792, 0.0795273259, 0.0166929066, 0.8023685217, -0.3571897149, -0.2179585397, 0.1322550476, -0.1704493761, -0.3259195089, -0.0770722628, 0.2736981511, 0.0906304419, 0.0717988387, -0.0094028153, 0.391425997, -0.0933152735, 0.2531610131, -0.3342475295, -0.0749926046, 0.3700168729, 0.3320879042, 0.2507386804, -0.0335380025, 0.0665315986, 0.3422166109, 0.2596171796, -0.1454966366, 0.2384005189, 0.1618344337, 0.0183557235, -0.1759248972, -0.1052252054, -0.1606463194, -0.3050886393, -0.2020210326, -0.3353256583, 0.4843744934, -0.2394975275, 0.080949463, -0.1629107147, -0.0729377493, -0.1123222262, 0.239053458, 0.1080783829, 0.0814390779, -0.1436551362, -0.0689880177, -0.1000490189, -0.0618882179, -0.0523720793, 0.1881001592, 0.0251372978, 0.2732269168, -0.169100523, -0.1986373514, -0.2601748109, 0.056433253, 0.255815953, 0.0960626304, -0.2582114935, 0.2561086416, -0.1447918564, -0.2581232488, -0.3088113964, 0.3103086948, 0.1554100215, -0.5250990391, 0.0369420797, 0.1614516377, 0.1663214713, -0.0896116719, 0.1419671774, 0.1363628954, 0.0686423928, 0.1380073577, -0.0040350854, 0.369337976, 0.215533644, -0.0409564823, 0.2696604133, 0.0495530292, -0.1201174259, -0.1636266708, 0.1193024367, 0.0317240134, -0.2905444205, -0.0196274631, 0.4356472492, -0.1525559127, 0.2414227128, 0.4414305687, -0.1187740266, -0.0253543034, -0.1871620268, 0.2185591459, 0.1407992244, -0.0268117823, -0.0851381272, -0.0053834245, -0.2538852394, -0.0652514696, 0.3296320438, -0.1268232763, 0.4315134585, 0.1532038599, 0.2892071903, -0.018470468, -0.0514069535, -0.2919025421, 0.290548116, 0.2543336153, -0.2341016829, 0.4157403708, -0.1025250554, -0.213527739, -0.6377746463, -0.3706791699, -0.0837399065, -0.1330630183, -0.0448593237, -0.0630304143, 0.1643534154, 0.0614363551, 0.0771599188, -0.0667613298, 0.2787641883, -0.1845622063, 0.1062299088, -0.3318832815, -0.3990280032, -0.0193081219, 0.2381193936, 0.0182727687, -0.1148809716, 0.0174305141, -0.0464679003, -0.0756030157, -0.1490142643, 0.112837486, -0.0141116083, -0.1526150703, 0.1377331764, -0.0253321081, -0.2624067962, -0.2278358638, 0.3238839507, -0.3288734853, 0.0045540482, 0.4567362964, -0.1896836758, -0.0553345159, -0.051293578, -0.3140723705, -0.5814593434, -0.0539099127, 0.0172905847, 0.0343011469, 0.3296330273, 0.3480426371, 0.0307736918, 0.1842594743, 0.034005478, -0.0597996674, 0.0854178369, 0.1192036718, 0.3146252036, -0.0384519845, -0.2886624038, -0.3471453786, -0.110791117, 0.0709794909, 0.0762153491, -0.3193143308, 0.1262017936, -0.1260372996, 0.0512028337, -0.2906250656, 0.0220353212, 0.448099345, 0.1102450341, -0.0087919235, 0.2124652117, 0.0139713064, 0.3060882092, 0.0416652709, 0.2144848108, -0.0346942022, 0.178726241, -0.0456407964, 0.6495577693, -0.1418002844, -0.3859339952, 0.1767015755, -0.1262178272, -0.17933622, -0.009405911, -0.3002761304, -0.0031255819, -0.2587312758, -0.0353840739, 0.0021560267, -0.2854909599, -0.3254142404, -0.1811381429, 0.1342674047, -0.1632559448, -0.3281492293, 0.367277801, -0.250742048, 0.255068779, -0.156513676, -0.144771874, -0.1669235826, -0.4364989102, -0.030233549, 0.1978233457, -0.2999418378, 0.0271618031, -0.515203774, -0.2360692322, -0.1595630199, 0.0845981911, 0.3666801751, 0.5396203399, 0.0303004831, 0.0349534005, 0.080585897, 0.1010700464, 0.4106415212, 0.1839824319, -0.0750321448, 0.1855865568, 0.1655874103, -0.3579369187, -0.283521086, -0.5400995016, -0.082204245, 0.2528799474, 0.0967262685, -0.2896074653, -0.2426508963, 0.2225341201, 0.0414287522, -0.2890587449, -0.043575801, 0.0172088221, -0.2311729193, -0.2042601407, 0.1062256694, 0.2091031224, 0.3887907267, -0.2306030095, -0.1089196578, 0.0180642363, 0.2060564011, 0.1758811921, -0.0173784345, 0.1210726723, -0.1272635609, -0.2719094455, -0.2843087316, 0.2212006599, 0.1246749163, 0.4509963095, 0.1175309047, -0.3715089262, 0.1879759878, -0.0572566725, 0.3409129679, 0.0074074306, -0.1104088053, 0.3472834229, 0.1715260893, 0.3176766038, 0.0993584245, -0.0289534274, 0.2658730149, -0.0771321207, -0.4949767888, -0.0418625101, 0.274533242, -0.0730242953, -0.0733687952, -0.024151532, -0.2094789445, -0.2615411282, 0.418596983, 0.3421200514, 1.0206483603, -0.2603805065, 0.3446722329, 0.1092102453, -0.0606012419, 0.495056808, -0.1539974809, 0.1934904754, -0.5524522066, 0.0472403765, -0.1116917729, -0.1971728504, -0.1783652008, 0.3437052667, -0.3830963373, 0.1329994202, -0.0964828059, 0.1960600615, 0.1422275007, 0.3196294308, 0.2093945146, -0.2090150118, -0.2368240207, -0.0035605021, -0.4814991355, -0.099089466, -0.0379734188, -0.2874809802, -0.0001371577, -0.3918531537, -0.2000367343, 0.1904892474, -0.2922780514, 0.3384350836, 0.5059807301, -0.1064434946, 0.2228136808, 0.1987269521, 0.3068524301, -0.0456336848, 0.0611889064, -0.2703241706, -0.0626036748, 0.1166034341, -0.0572852306, -0.0534287989, 0.4100272655, -0.0476830341, -0.3138556778, 0.3178364933, 0.0144373439, -0.1757709533, 0.157268852, -0.0672015399, 0.0875043422, -0.4117053151, 0.2714482546, -0.2188573927, -0.3185107112, -0.2686831355, 0.003916278, 0.0189208444, -0.1227036417, 0.1043701246, 0.3181701899, 0.0148007721, 0.1429255456, 0.1666362137, 0.2979538441, 0.2228277326, 0.5636558533, 0.3159724474, 0.0117534399, -0.2083152235, 0.1311720163, 0.0069092736, -0.8838163018, 0.1976177096, -0.031380415, -0.2637526989, 0.212391004, 0.3753277361, 0.1270440817, 0.4987851679, -0.174079746, -0.4247024953, -0.3973776698, 0.0065997206, 0.1742636561, 0.0011970438, 0.0514226705, 0.5306833982, 0.1982193589, 0.1547174603, -0.2049758136, 0.1831798404, -0.3399904072, 0.2554392517, -0.1108252108, -0.4195621014, -0.0381519757, 0.1254323423, 0.0438734666, 0.0017528329, 0.0914918631, -0.0549670085, -0.1826649606, 0.1793143302, 0.2735620141, -0.2096081674, -0.2047401965, -0.0046509728, -0.0219300576, 0.1029739678, -0.0729959086, 0.0078971684, -0.1585484594, 0.5496968031, -0.0968373045, -0.0782952085, -0.3212502003, 0.0320715755, -0.2329458594, -0.0552968159, 0.1789359748, 0.23104994, 0.141433984, -0.1671889722, -0.7330245376, 0.1469233781, 0.280703932, -0.0789486691, 0.2824498713, -0.6361714005, -0.2515560985, -0.124068588, 0.058936432, 0.017822979, -0.2906439006, -0.1190240979, 0.150084883, 0.0792079791, -0.2228345275, -0.2199819535, -0.0071267691, -0.1568068862, -0.1895319223, 0.438834101, 0.0504113734, -0.178173393, -0.0951464325, 0.0208669007, 0.1502605677, -0.1083434746, 0.0020459443, 0.5980394483, -0.1331814378, -0.0291012526, 0.4560698569, -0.0017089406, -0.080827117, 0.0111114457, -0.2403191328, 0.1064089313, -0.1864718795, 0.0284156092, 0.2730588615, 0.0053152889, -0.1614433676, 0.1116661802, 0.0180338174, -0.1406102926, -0.2085791081, 0.5285695791, -0.1294040084, -0.1111315638, -0.2098498195, 0.2522191405, -0.2701115906, 0.0049776658, -0.1391524971, -0.0752414465, -0.1743355095, -0.2161694169, -0.1959978789, 0.1043631658, 0.2675894499, 0.2678266168, 0.1731941998, -0.292314291, 0.0107251201, 0.474584043, 0.0857411176, -0.2254722416, 0.4008434713, 0.3285625279, -0.0989189446, 0.0243503377, 0.3410253823, 0.5116847157, 0.5268764496, -0.2755406201, 0.0296223499, 0.0998526365, -0.1723223627, 0.3009315729, 0.1220270172, 0.5902811885, 0.1590000987, 0.1322443783, -0.0237081647, -0.0250820909, 0.2330639362, -0.036525026, 0.1909649223, 0.0803817809, 0.6249299049, 0.2398194671, -0.3591578007, -0.1490706354, 0.08431831, -0.4341339171, 0.00553995, 0.4604841471, -0.0493657589, 0.288000226, -0.0646261945, -0.0263439827, 0.1581725329, 0.6270228028, 0.2333031297, 0.2689679861, -0.3417341113, 0.11560601, -0.325651437, 0.3007263243, -0.0014744367, -0.0898732692, 0.0791963786, 0.0009106696, 0.0593977571, 0.176604867, 0.1285302341, 0.0768041909, -0.1470921636, 0.2389512956, -0.1691423357, 0.0240432136, 0.0808033943, 0.2279128432, -0.0594037175, -0.3299915493, 0.217532441, 0.1071316749, -0.0194473155, -0.0732563734, 0.0540493578, 0.1230193898, 0.173081696, 0.1039052606, 0.0345203131, 0.582687676, 0.1241592765, -0.0638273656, 0.3305569291, -0.1148172766, -0.1746622771, 0.164562434, 0.2476194799, 0.6241389513, -0.0343469009, 0.2556884885, -0.4483465552, -0.2127868533, -0.0261639953, 0.0727964789, -0.2580462098, 0.2388152629, -0.2617351115, -0.0323138349, 0.3202944994, -0.0063781664, 0.2982016504, 0.0939638168, -0.4200731516, -0.464122057, 0.3670325279, -0.2881051898, -0.2306285352, -0.1451696157, 0.1122814268, 0.0307797231, 0.0831524059, -0.6610738635, -0.009856239, 0.3323137164, -0.0263020247, -0.2213638723, -0.1205208749, 0.012263637, 0.1851016432, -0.0976044163, 0.2706556618, -0.0960785523, -0.0646673292, -0.4541103244, -0.175928697 ]
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.2228239626, 0.0242496431, 0.1073713005, 0.230306983, 0.5109529495, -0.107259661, 0.532330215, 0.0775898248, -0.3410620391, -0.1247760206, 0.036657989, 0.3864074647, -0.369695425, 0.0422177389, 0.0443616398, -0.202463448, -0.088034451, 0.0099896938, -0.0232527442, -0.0536390096, 0.0482435897, 0.1829806268, -0.1568259299, 0.4144772589, -0.6451316476, -0.1835790426, 0.1746638715, -0.0963925421, -0.0992208272, -0.4487786889, 0.2202741057, -0.1020438969, 0.497636795, 0.3472320735, -0.0001241712, 0.1380357593, 0.1092859283, 0.1016945019, -0.2908720374, -0.3016375899, 0.1341147572, -0.0593847856, 0.4149942994, -0.2015386671, -0.0571896657, -0.2600914836, -0.0606258586, 0.2617686987, 0.3837760091, 0.5016981363, 0.1173221692, 0.168516472, 0.2464854717, 0.0738130212, 0.2595639825, 0.3155061901, 0.0754770115, 0.2071240395, 0.0168341696, 0.0266050398, -0.0856946409, 0.0748082697, -0.0701285228, -0.1997738779, 0.216658324, 0.2272828966, 0.1745793521, -0.147622183, -0.2287848294, 0.1198837757, 0.4332152009, -0.3214258254, -0.1559450328, 0.0079213679, -0.0111620426, -0.272799015, -0.0061668046, 0.2483308017, -0.4277774394, 0.1667013913, -0.1622606069, -0.025467094, -0.3792497814, 0.1995563805, -0.0925176293, 0.50326401, 0.1183700264, 0.1568168402, 0.1842404008, -0.0144359032, 0.3717098534, 0.0876381546, 0.1397549212, 0.0621484369, -0.3116945028, -0.0304638594, -0.4463339448, -0.6483633518, -0.2685145736, -0.212524116, 0.1655777693, -0.07115262, 0.2047268152, 0.2029505372, 0.2333223224, 0.1388008446, -0.2101234496, 0.5648382902, 0.1000925899, -0.1552507877, -0.1335454583, -0.0250886623, -0.3282391429, -0.0922893286, 0.5121237636, 0.1628404111, 0.1257428229, -0.0050321892, -0.0550227873, -0.1488326937, -0.2688643336, -0.0882173702, 0.2847146988, 0.1850692928, 0.09583579, 0.3832218349, 0.2154193372, 0.1111362129, 0.0493783355, -0.1352439821, 0.0353222974, 0.0855563208, -0.2179707885, -0.1198174432, 0.1821131706, 0.3281979561, -0.2699045837, 0.121501714, -0.1425366253, -0.2085365057, 0.001571998, -0.293589443, -0.005307354, 0.0134970956, -0.2574834824, 0.3097875118, 0.0935746282, -0.3035940528, 0.0196342915, 0.4677719772, -0.4638133347, -0.4341675043, -0.4358195066, 0.0899603143, 0.370848, -0.1129876971, -0.0923097879, 0.0597352125, 0.4520861506, -0.1888259053, 0.1029471755, -0.5797599554, 0.3521025181, -0.015292516, -0.0832997188, 0.0905465409, -0.4035288095, -0.1816474497, 0.16967085, -0.1533037275, 0.3111129999, 0.44239977, -0.3827602267, 0.2947915792, 0.0795273259, 0.0166929066, 0.8023685217, -0.3571897149, -0.2179585397, 0.1322550476, -0.1704493761, -0.3259195089, -0.0770722628, 0.2736981511, 0.0906304419, 0.0717988387, -0.0094028153, 0.391425997, -0.0933152735, 0.2531610131, -0.3342475295, -0.0749926046, 0.3700168729, 0.3320879042, 0.2507386804, -0.0335380025, 0.0665315986, 0.3422166109, 0.2596171796, -0.1454966366, 0.2384005189, 0.1618344337, 0.0183557235, -0.1759248972, -0.1052252054, -0.1606463194, -0.3050886393, -0.2020210326, -0.3353256583, 0.4843744934, -0.2394975275, 0.080949463, -0.1629107147, -0.0729377493, -0.1123222262, 0.239053458, 0.1080783829, 0.0814390779, -0.1436551362, -0.0689880177, -0.1000490189, -0.0618882179, -0.0523720793, 0.1881001592, 0.0251372978, 0.2732269168, -0.169100523, -0.1986373514, -0.2601748109, 0.056433253, 0.255815953, 0.0960626304, -0.2582114935, 0.2561086416, -0.1447918564, -0.2581232488, -0.3088113964, 0.3103086948, 0.1554100215, -0.5250990391, 0.0369420797, 0.1614516377, 0.1663214713, -0.0896116719, 0.1419671774, 0.1363628954, 0.0686423928, 0.1380073577, -0.0040350854, 0.369337976, 0.215533644, -0.0409564823, 0.2696604133, 0.0495530292, -0.1201174259, -0.1636266708, 0.1193024367, 0.0317240134, -0.2905444205, -0.0196274631, 0.4356472492, -0.1525559127, 0.2414227128, 0.4414305687, -0.1187740266, -0.0253543034, -0.1871620268, 0.2185591459, 0.1407992244, -0.0268117823, -0.0851381272, -0.0053834245, -0.2538852394, -0.0652514696, 0.3296320438, -0.1268232763, 0.4315134585, 0.1532038599, 0.2892071903, -0.018470468, -0.0514069535, -0.2919025421, 0.290548116, 0.2543336153, -0.2341016829, 0.4157403708, -0.1025250554, -0.213527739, -0.6377746463, -0.3706791699, -0.0837399065, -0.1330630183, -0.0448593237, -0.0630304143, 0.1643534154, 0.0614363551, 0.0771599188, -0.0667613298, 0.2787641883, -0.1845622063, 0.1062299088, -0.3318832815, -0.3990280032, -0.0193081219, 0.2381193936, 0.0182727687, -0.1148809716, 0.0174305141, -0.0464679003, -0.0756030157, -0.1490142643, 0.112837486, -0.0141116083, -0.1526150703, 0.1377331764, -0.0253321081, -0.2624067962, -0.2278358638, 0.3238839507, -0.3288734853, 0.0045540482, 0.4567362964, -0.1896836758, -0.0553345159, -0.051293578, -0.3140723705, -0.5814593434, -0.0539099127, 0.0172905847, 0.0343011469, 0.3296330273, 0.3480426371, 0.0307736918, 0.1842594743, 0.034005478, -0.0597996674, 0.0854178369, 0.1192036718, 0.3146252036, -0.0384519845, -0.2886624038, -0.3471453786, -0.110791117, 0.0709794909, 0.0762153491, -0.3193143308, 0.1262017936, -0.1260372996, 0.0512028337, -0.2906250656, 0.0220353212, 0.448099345, 0.1102450341, -0.0087919235, 0.2124652117, 0.0139713064, 0.3060882092, 0.0416652709, 0.2144848108, -0.0346942022, 0.178726241, -0.0456407964, 0.6495577693, -0.1418002844, -0.3859339952, 0.1767015755, -0.1262178272, -0.17933622, -0.009405911, -0.3002761304, -0.0031255819, -0.2587312758, -0.0353840739, 0.0021560267, -0.2854909599, -0.3254142404, -0.1811381429, 0.1342674047, -0.1632559448, -0.3281492293, 0.367277801, -0.250742048, 0.255068779, -0.156513676, -0.144771874, -0.1669235826, -0.4364989102, -0.030233549, 0.1978233457, -0.2999418378, 0.0271618031, -0.515203774, -0.2360692322, -0.1595630199, 0.0845981911, 0.3666801751, 0.5396203399, 0.0303004831, 0.0349534005, 0.080585897, 0.1010700464, 0.4106415212, 0.1839824319, -0.0750321448, 0.1855865568, 0.1655874103, -0.3579369187, -0.283521086, -0.5400995016, -0.082204245, 0.2528799474, 0.0967262685, -0.2896074653, -0.2426508963, 0.2225341201, 0.0414287522, -0.2890587449, -0.043575801, 0.0172088221, -0.2311729193, -0.2042601407, 0.1062256694, 0.2091031224, 0.3887907267, -0.2306030095, -0.1089196578, 0.0180642363, 0.2060564011, 0.1758811921, -0.0173784345, 0.1210726723, -0.1272635609, -0.2719094455, -0.2843087316, 0.2212006599, 0.1246749163, 0.4509963095, 0.1175309047, -0.3715089262, 0.1879759878, -0.0572566725, 0.3409129679, 0.0074074306, -0.1104088053, 0.3472834229, 0.1715260893, 0.3176766038, 0.0993584245, -0.0289534274, 0.2658730149, -0.0771321207, -0.4949767888, -0.0418625101, 0.274533242, -0.0730242953, -0.0733687952, -0.024151532, -0.2094789445, -0.2615411282, 0.418596983, 0.3421200514, 1.0206483603, -0.2603805065, 0.3446722329, 0.1092102453, -0.0606012419, 0.495056808, -0.1539974809, 0.1934904754, -0.5524522066, 0.0472403765, -0.1116917729, -0.1971728504, -0.1783652008, 0.3437052667, -0.3830963373, 0.1329994202, -0.0964828059, 0.1960600615, 0.1422275007, 0.3196294308, 0.2093945146, -0.2090150118, -0.2368240207, -0.0035605021, -0.4814991355, -0.099089466, -0.0379734188, -0.2874809802, -0.0001371577, -0.3918531537, -0.2000367343, 0.1904892474, -0.2922780514, 0.3384350836, 0.5059807301, -0.1064434946, 0.2228136808, 0.1987269521, 0.3068524301, -0.0456336848, 0.0611889064, -0.2703241706, -0.0626036748, 0.1166034341, -0.0572852306, -0.0534287989, 0.4100272655, -0.0476830341, -0.3138556778, 0.3178364933, 0.0144373439, -0.1757709533, 0.157268852, -0.0672015399, 0.0875043422, -0.4117053151, 0.2714482546, -0.2188573927, -0.3185107112, -0.2686831355, 0.003916278, 0.0189208444, -0.1227036417, 0.1043701246, 0.3181701899, 0.0148007721, 0.1429255456, 0.1666362137, 0.2979538441, 0.2228277326, 0.5636558533, 0.3159724474, 0.0117534399, -0.2083152235, 0.1311720163, 0.0069092736, -0.8838163018, 0.1976177096, -0.031380415, -0.2637526989, 0.212391004, 0.3753277361, 0.1270440817, 0.4987851679, -0.174079746, -0.4247024953, -0.3973776698, 0.0065997206, 0.1742636561, 0.0011970438, 0.0514226705, 0.5306833982, 0.1982193589, 0.1547174603, -0.2049758136, 0.1831798404, -0.3399904072, 0.2554392517, -0.1108252108, -0.4195621014, -0.0381519757, 0.1254323423, 0.0438734666, 0.0017528329, 0.0914918631, -0.0549670085, -0.1826649606, 0.1793143302, 0.2735620141, -0.2096081674, -0.2047401965, -0.0046509728, -0.0219300576, 0.1029739678, -0.0729959086, 0.0078971684, -0.1585484594, 0.5496968031, -0.0968373045, -0.0782952085, -0.3212502003, 0.0320715755, -0.2329458594, -0.0552968159, 0.1789359748, 0.23104994, 0.141433984, -0.1671889722, -0.7330245376, 0.1469233781, 0.280703932, -0.0789486691, 0.2824498713, -0.6361714005, -0.2515560985, -0.124068588, 0.058936432, 0.017822979, -0.2906439006, -0.1190240979, 0.150084883, 0.0792079791, -0.2228345275, -0.2199819535, -0.0071267691, -0.1568068862, -0.1895319223, 0.438834101, 0.0504113734, -0.178173393, -0.0951464325, 0.0208669007, 0.1502605677, -0.1083434746, 0.0020459443, 0.5980394483, -0.1331814378, -0.0291012526, 0.4560698569, -0.0017089406, -0.080827117, 0.0111114457, -0.2403191328, 0.1064089313, -0.1864718795, 0.0284156092, 0.2730588615, 0.0053152889, -0.1614433676, 0.1116661802, 0.0180338174, -0.1406102926, -0.2085791081, 0.5285695791, -0.1294040084, -0.1111315638, -0.2098498195, 0.2522191405, -0.2701115906, 0.0049776658, -0.1391524971, -0.0752414465, -0.1743355095, -0.2161694169, -0.1959978789, 0.1043631658, 0.2675894499, 0.2678266168, 0.1731941998, -0.292314291, 0.0107251201, 0.474584043, 0.0857411176, -0.2254722416, 0.4008434713, 0.3285625279, -0.0989189446, 0.0243503377, 0.3410253823, 0.5116847157, 0.5268764496, -0.2755406201, 0.0296223499, 0.0998526365, -0.1723223627, 0.3009315729, 0.1220270172, 0.5902811885, 0.1590000987, 0.1322443783, -0.0237081647, -0.0250820909, 0.2330639362, -0.036525026, 0.1909649223, 0.0803817809, 0.6249299049, 0.2398194671, -0.3591578007, -0.1490706354, 0.08431831, -0.4341339171, 0.00553995, 0.4604841471, -0.0493657589, 0.288000226, -0.0646261945, -0.0263439827, 0.1581725329, 0.6270228028, 0.2333031297, 0.2689679861, -0.3417341113, 0.11560601, -0.325651437, 0.3007263243, -0.0014744367, -0.0898732692, 0.0791963786, 0.0009106696, 0.0593977571, 0.176604867, 0.1285302341, 0.0768041909, -0.1470921636, 0.2389512956, -0.1691423357, 0.0240432136, 0.0808033943, 0.2279128432, -0.0594037175, -0.3299915493, 0.217532441, 0.1071316749, -0.0194473155, -0.0732563734, 0.0540493578, 0.1230193898, 0.173081696, 0.1039052606, 0.0345203131, 0.582687676, 0.1241592765, -0.0638273656, 0.3305569291, -0.1148172766, -0.1746622771, 0.164562434, 0.2476194799, 0.6241389513, -0.0343469009, 0.2556884885, -0.4483465552, -0.2127868533, -0.0261639953, 0.0727964789, -0.2580462098, 0.2388152629, -0.2617351115, -0.0323138349, 0.3202944994, -0.0063781664, 0.2982016504, 0.0939638168, -0.4200731516, -0.464122057, 0.3670325279, -0.2881051898, -0.2306285352, -0.1451696157, 0.1122814268, 0.0307797231, 0.0831524059, -0.6610738635, -0.009856239, 0.3323137164, -0.0263020247, -0.2213638723, -0.1205208749, 0.012263637, 0.1851016432, -0.0976044163, 0.2706556618, -0.0960785523, -0.0646673292, -0.4541103244, -0.175928697 ]
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.2228239626, 0.0242496431, 0.1073713005, 0.230306983, 0.5109529495, -0.107259661, 0.532330215, 0.0775898248, -0.3410620391, -0.1247760206, 0.036657989, 0.3864074647, -0.369695425, 0.0422177389, 0.0443616398, -0.202463448, -0.088034451, 0.0099896938, -0.0232527442, -0.0536390096, 0.0482435897, 0.1829806268, -0.1568259299, 0.4144772589, -0.6451316476, -0.1835790426, 0.1746638715, -0.0963925421, -0.0992208272, -0.4487786889, 0.2202741057, -0.1020438969, 0.497636795, 0.3472320735, -0.0001241712, 0.1380357593, 0.1092859283, 0.1016945019, -0.2908720374, -0.3016375899, 0.1341147572, -0.0593847856, 0.4149942994, -0.2015386671, -0.0571896657, -0.2600914836, -0.0606258586, 0.2617686987, 0.3837760091, 0.5016981363, 0.1173221692, 0.168516472, 0.2464854717, 0.0738130212, 0.2595639825, 0.3155061901, 0.0754770115, 0.2071240395, 0.0168341696, 0.0266050398, -0.0856946409, 0.0748082697, -0.0701285228, -0.1997738779, 0.216658324, 0.2272828966, 0.1745793521, -0.147622183, -0.2287848294, 0.1198837757, 0.4332152009, -0.3214258254, -0.1559450328, 0.0079213679, -0.0111620426, -0.272799015, -0.0061668046, 0.2483308017, -0.4277774394, 0.1667013913, -0.1622606069, -0.025467094, -0.3792497814, 0.1995563805, -0.0925176293, 0.50326401, 0.1183700264, 0.1568168402, 0.1842404008, -0.0144359032, 0.3717098534, 0.0876381546, 0.1397549212, 0.0621484369, -0.3116945028, -0.0304638594, -0.4463339448, -0.6483633518, -0.2685145736, -0.212524116, 0.1655777693, -0.07115262, 0.2047268152, 0.2029505372, 0.2333223224, 0.1388008446, -0.2101234496, 0.5648382902, 0.1000925899, -0.1552507877, -0.1335454583, -0.0250886623, -0.3282391429, -0.0922893286, 0.5121237636, 0.1628404111, 0.1257428229, -0.0050321892, -0.0550227873, -0.1488326937, -0.2688643336, -0.0882173702, 0.2847146988, 0.1850692928, 0.09583579, 0.3832218349, 0.2154193372, 0.1111362129, 0.0493783355, -0.1352439821, 0.0353222974, 0.0855563208, -0.2179707885, -0.1198174432, 0.1821131706, 0.3281979561, -0.2699045837, 0.121501714, -0.1425366253, -0.2085365057, 0.001571998, -0.293589443, -0.005307354, 0.0134970956, -0.2574834824, 0.3097875118, 0.0935746282, -0.3035940528, 0.0196342915, 0.4677719772, -0.4638133347, -0.4341675043, -0.4358195066, 0.0899603143, 0.370848, -0.1129876971, -0.0923097879, 0.0597352125, 0.4520861506, -0.1888259053, 0.1029471755, -0.5797599554, 0.3521025181, -0.015292516, -0.0832997188, 0.0905465409, -0.4035288095, -0.1816474497, 0.16967085, -0.1533037275, 0.3111129999, 0.44239977, -0.3827602267, 0.2947915792, 0.0795273259, 0.0166929066, 0.8023685217, -0.3571897149, -0.2179585397, 0.1322550476, -0.1704493761, -0.3259195089, -0.0770722628, 0.2736981511, 0.0906304419, 0.0717988387, -0.0094028153, 0.391425997, -0.0933152735, 0.2531610131, -0.3342475295, -0.0749926046, 0.3700168729, 0.3320879042, 0.2507386804, -0.0335380025, 0.0665315986, 0.3422166109, 0.2596171796, -0.1454966366, 0.2384005189, 0.1618344337, 0.0183557235, -0.1759248972, -0.1052252054, -0.1606463194, -0.3050886393, -0.2020210326, -0.3353256583, 0.4843744934, -0.2394975275, 0.080949463, -0.1629107147, -0.0729377493, -0.1123222262, 0.239053458, 0.1080783829, 0.0814390779, -0.1436551362, -0.0689880177, -0.1000490189, -0.0618882179, -0.0523720793, 0.1881001592, 0.0251372978, 0.2732269168, -0.169100523, -0.1986373514, -0.2601748109, 0.056433253, 0.255815953, 0.0960626304, -0.2582114935, 0.2561086416, -0.1447918564, -0.2581232488, -0.3088113964, 0.3103086948, 0.1554100215, -0.5250990391, 0.0369420797, 0.1614516377, 0.1663214713, -0.0896116719, 0.1419671774, 0.1363628954, 0.0686423928, 0.1380073577, -0.0040350854, 0.369337976, 0.215533644, -0.0409564823, 0.2696604133, 0.0495530292, -0.1201174259, -0.1636266708, 0.1193024367, 0.0317240134, -0.2905444205, -0.0196274631, 0.4356472492, -0.1525559127, 0.2414227128, 0.4414305687, -0.1187740266, -0.0253543034, -0.1871620268, 0.2185591459, 0.1407992244, -0.0268117823, -0.0851381272, -0.0053834245, -0.2538852394, -0.0652514696, 0.3296320438, -0.1268232763, 0.4315134585, 0.1532038599, 0.2892071903, -0.018470468, -0.0514069535, -0.2919025421, 0.290548116, 0.2543336153, -0.2341016829, 0.4157403708, -0.1025250554, -0.213527739, -0.6377746463, -0.3706791699, -0.0837399065, -0.1330630183, -0.0448593237, -0.0630304143, 0.1643534154, 0.0614363551, 0.0771599188, -0.0667613298, 0.2787641883, -0.1845622063, 0.1062299088, -0.3318832815, -0.3990280032, -0.0193081219, 0.2381193936, 0.0182727687, -0.1148809716, 0.0174305141, -0.0464679003, -0.0756030157, -0.1490142643, 0.112837486, -0.0141116083, -0.1526150703, 0.1377331764, -0.0253321081, -0.2624067962, -0.2278358638, 0.3238839507, -0.3288734853, 0.0045540482, 0.4567362964, -0.1896836758, -0.0553345159, -0.051293578, -0.3140723705, -0.5814593434, -0.0539099127, 0.0172905847, 0.0343011469, 0.3296330273, 0.3480426371, 0.0307736918, 0.1842594743, 0.034005478, -0.0597996674, 0.0854178369, 0.1192036718, 0.3146252036, -0.0384519845, -0.2886624038, -0.3471453786, -0.110791117, 0.0709794909, 0.0762153491, -0.3193143308, 0.1262017936, -0.1260372996, 0.0512028337, -0.2906250656, 0.0220353212, 0.448099345, 0.1102450341, -0.0087919235, 0.2124652117, 0.0139713064, 0.3060882092, 0.0416652709, 0.2144848108, -0.0346942022, 0.178726241, -0.0456407964, 0.6495577693, -0.1418002844, -0.3859339952, 0.1767015755, -0.1262178272, -0.17933622, -0.009405911, -0.3002761304, -0.0031255819, -0.2587312758, -0.0353840739, 0.0021560267, -0.2854909599, -0.3254142404, -0.1811381429, 0.1342674047, -0.1632559448, -0.3281492293, 0.367277801, -0.250742048, 0.255068779, -0.156513676, -0.144771874, -0.1669235826, -0.4364989102, -0.030233549, 0.1978233457, -0.2999418378, 0.0271618031, -0.515203774, -0.2360692322, -0.1595630199, 0.0845981911, 0.3666801751, 0.5396203399, 0.0303004831, 0.0349534005, 0.080585897, 0.1010700464, 0.4106415212, 0.1839824319, -0.0750321448, 0.1855865568, 0.1655874103, -0.3579369187, -0.283521086, -0.5400995016, -0.082204245, 0.2528799474, 0.0967262685, -0.2896074653, -0.2426508963, 0.2225341201, 0.0414287522, -0.2890587449, -0.043575801, 0.0172088221, -0.2311729193, -0.2042601407, 0.1062256694, 0.2091031224, 0.3887907267, -0.2306030095, -0.1089196578, 0.0180642363, 0.2060564011, 0.1758811921, -0.0173784345, 0.1210726723, -0.1272635609, -0.2719094455, -0.2843087316, 0.2212006599, 0.1246749163, 0.4509963095, 0.1175309047, -0.3715089262, 0.1879759878, -0.0572566725, 0.3409129679, 0.0074074306, -0.1104088053, 0.3472834229, 0.1715260893, 0.3176766038, 0.0993584245, -0.0289534274, 0.2658730149, -0.0771321207, -0.4949767888, -0.0418625101, 0.274533242, -0.0730242953, -0.0733687952, -0.024151532, -0.2094789445, -0.2615411282, 0.418596983, 0.3421200514, 1.0206483603, -0.2603805065, 0.3446722329, 0.1092102453, -0.0606012419, 0.495056808, -0.1539974809, 0.1934904754, -0.5524522066, 0.0472403765, -0.1116917729, -0.1971728504, -0.1783652008, 0.3437052667, -0.3830963373, 0.1329994202, -0.0964828059, 0.1960600615, 0.1422275007, 0.3196294308, 0.2093945146, -0.2090150118, -0.2368240207, -0.0035605021, -0.4814991355, -0.099089466, -0.0379734188, -0.2874809802, -0.0001371577, -0.3918531537, -0.2000367343, 0.1904892474, -0.2922780514, 0.3384350836, 0.5059807301, -0.1064434946, 0.2228136808, 0.1987269521, 0.3068524301, -0.0456336848, 0.0611889064, -0.2703241706, -0.0626036748, 0.1166034341, -0.0572852306, -0.0534287989, 0.4100272655, -0.0476830341, -0.3138556778, 0.3178364933, 0.0144373439, -0.1757709533, 0.157268852, -0.0672015399, 0.0875043422, -0.4117053151, 0.2714482546, -0.2188573927, -0.3185107112, -0.2686831355, 0.003916278, 0.0189208444, -0.1227036417, 0.1043701246, 0.3181701899, 0.0148007721, 0.1429255456, 0.1666362137, 0.2979538441, 0.2228277326, 0.5636558533, 0.3159724474, 0.0117534399, -0.2083152235, 0.1311720163, 0.0069092736, -0.8838163018, 0.1976177096, -0.031380415, -0.2637526989, 0.212391004, 0.3753277361, 0.1270440817, 0.4987851679, -0.174079746, -0.4247024953, -0.3973776698, 0.0065997206, 0.1742636561, 0.0011970438, 0.0514226705, 0.5306833982, 0.1982193589, 0.1547174603, -0.2049758136, 0.1831798404, -0.3399904072, 0.2554392517, -0.1108252108, -0.4195621014, -0.0381519757, 0.1254323423, 0.0438734666, 0.0017528329, 0.0914918631, -0.0549670085, -0.1826649606, 0.1793143302, 0.2735620141, -0.2096081674, -0.2047401965, -0.0046509728, -0.0219300576, 0.1029739678, -0.0729959086, 0.0078971684, -0.1585484594, 0.5496968031, -0.0968373045, -0.0782952085, -0.3212502003, 0.0320715755, -0.2329458594, -0.0552968159, 0.1789359748, 0.23104994, 0.141433984, -0.1671889722, -0.7330245376, 0.1469233781, 0.280703932, -0.0789486691, 0.2824498713, -0.6361714005, -0.2515560985, -0.124068588, 0.058936432, 0.017822979, -0.2906439006, -0.1190240979, 0.150084883, 0.0792079791, -0.2228345275, -0.2199819535, -0.0071267691, -0.1568068862, -0.1895319223, 0.438834101, 0.0504113734, -0.178173393, -0.0951464325, 0.0208669007, 0.1502605677, -0.1083434746, 0.0020459443, 0.5980394483, -0.1331814378, -0.0291012526, 0.4560698569, -0.0017089406, -0.080827117, 0.0111114457, -0.2403191328, 0.1064089313, -0.1864718795, 0.0284156092, 0.2730588615, 0.0053152889, -0.1614433676, 0.1116661802, 0.0180338174, -0.1406102926, -0.2085791081, 0.5285695791, -0.1294040084, -0.1111315638, -0.2098498195, 0.2522191405, -0.2701115906, 0.0049776658, -0.1391524971, -0.0752414465, -0.1743355095, -0.2161694169, -0.1959978789, 0.1043631658, 0.2675894499, 0.2678266168, 0.1731941998, -0.292314291, 0.0107251201, 0.474584043, 0.0857411176, -0.2254722416, 0.4008434713, 0.3285625279, -0.0989189446, 0.0243503377, 0.3410253823, 0.5116847157, 0.5268764496, -0.2755406201, 0.0296223499, 0.0998526365, -0.1723223627, 0.3009315729, 0.1220270172, 0.5902811885, 0.1590000987, 0.1322443783, -0.0237081647, -0.0250820909, 0.2330639362, -0.036525026, 0.1909649223, 0.0803817809, 0.6249299049, 0.2398194671, -0.3591578007, -0.1490706354, 0.08431831, -0.4341339171, 0.00553995, 0.4604841471, -0.0493657589, 0.288000226, -0.0646261945, -0.0263439827, 0.1581725329, 0.6270228028, 0.2333031297, 0.2689679861, -0.3417341113, 0.11560601, -0.325651437, 0.3007263243, -0.0014744367, -0.0898732692, 0.0791963786, 0.0009106696, 0.0593977571, 0.176604867, 0.1285302341, 0.0768041909, -0.1470921636, 0.2389512956, -0.1691423357, 0.0240432136, 0.0808033943, 0.2279128432, -0.0594037175, -0.3299915493, 0.217532441, 0.1071316749, -0.0194473155, -0.0732563734, 0.0540493578, 0.1230193898, 0.173081696, 0.1039052606, 0.0345203131, 0.582687676, 0.1241592765, -0.0638273656, 0.3305569291, -0.1148172766, -0.1746622771, 0.164562434, 0.2476194799, 0.6241389513, -0.0343469009, 0.2556884885, -0.4483465552, -0.2127868533, -0.0261639953, 0.0727964789, -0.2580462098, 0.2388152629, -0.2617351115, -0.0323138349, 0.3202944994, -0.0063781664, 0.2982016504, 0.0939638168, -0.4200731516, -0.464122057, 0.3670325279, -0.2881051898, -0.2306285352, -0.1451696157, 0.1122814268, 0.0307797231, 0.0831524059, -0.6610738635, -0.009856239, 0.3323137164, -0.0263020247, -0.2213638723, -0.1205208749, 0.012263637, 0.1851016432, -0.0976044163, 0.2706556618, -0.0960785523, -0.0646673292, -0.4541103244, -0.175928697 ]
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.2228239626, 0.0242496431, 0.1073713005, 0.230306983, 0.5109529495, -0.107259661, 0.532330215, 0.0775898248, -0.3410620391, -0.1247760206, 0.036657989, 0.3864074647, -0.369695425, 0.0422177389, 0.0443616398, -0.202463448, -0.088034451, 0.0099896938, -0.0232527442, -0.0536390096, 0.0482435897, 0.1829806268, -0.1568259299, 0.4144772589, -0.6451316476, -0.1835790426, 0.1746638715, -0.0963925421, -0.0992208272, -0.4487786889, 0.2202741057, -0.1020438969, 0.497636795, 0.3472320735, -0.0001241712, 0.1380357593, 0.1092859283, 0.1016945019, -0.2908720374, -0.3016375899, 0.1341147572, -0.0593847856, 0.4149942994, -0.2015386671, -0.0571896657, -0.2600914836, -0.0606258586, 0.2617686987, 0.3837760091, 0.5016981363, 0.1173221692, 0.168516472, 0.2464854717, 0.0738130212, 0.2595639825, 0.3155061901, 0.0754770115, 0.2071240395, 0.0168341696, 0.0266050398, -0.0856946409, 0.0748082697, -0.0701285228, -0.1997738779, 0.216658324, 0.2272828966, 0.1745793521, -0.147622183, -0.2287848294, 0.1198837757, 0.4332152009, -0.3214258254, -0.1559450328, 0.0079213679, -0.0111620426, -0.272799015, -0.0061668046, 0.2483308017, -0.4277774394, 0.1667013913, -0.1622606069, -0.025467094, -0.3792497814, 0.1995563805, -0.0925176293, 0.50326401, 0.1183700264, 0.1568168402, 0.1842404008, -0.0144359032, 0.3717098534, 0.0876381546, 0.1397549212, 0.0621484369, -0.3116945028, -0.0304638594, -0.4463339448, -0.6483633518, -0.2685145736, -0.212524116, 0.1655777693, -0.07115262, 0.2047268152, 0.2029505372, 0.2333223224, 0.1388008446, -0.2101234496, 0.5648382902, 0.1000925899, -0.1552507877, -0.1335454583, -0.0250886623, -0.3282391429, -0.0922893286, 0.5121237636, 0.1628404111, 0.1257428229, -0.0050321892, -0.0550227873, -0.1488326937, -0.2688643336, -0.0882173702, 0.2847146988, 0.1850692928, 0.09583579, 0.3832218349, 0.2154193372, 0.1111362129, 0.0493783355, -0.1352439821, 0.0353222974, 0.0855563208, -0.2179707885, -0.1198174432, 0.1821131706, 0.3281979561, -0.2699045837, 0.121501714, -0.1425366253, -0.2085365057, 0.001571998, -0.293589443, -0.005307354, 0.0134970956, -0.2574834824, 0.3097875118, 0.0935746282, -0.3035940528, 0.0196342915, 0.4677719772, -0.4638133347, -0.4341675043, -0.4358195066, 0.0899603143, 0.370848, -0.1129876971, -0.0923097879, 0.0597352125, 0.4520861506, -0.1888259053, 0.1029471755, -0.5797599554, 0.3521025181, -0.015292516, -0.0832997188, 0.0905465409, -0.4035288095, -0.1816474497, 0.16967085, -0.1533037275, 0.3111129999, 0.44239977, -0.3827602267, 0.2947915792, 0.0795273259, 0.0166929066, 0.8023685217, -0.3571897149, -0.2179585397, 0.1322550476, -0.1704493761, -0.3259195089, -0.0770722628, 0.2736981511, 0.0906304419, 0.0717988387, -0.0094028153, 0.391425997, -0.0933152735, 0.2531610131, -0.3342475295, -0.0749926046, 0.3700168729, 0.3320879042, 0.2507386804, -0.0335380025, 0.0665315986, 0.3422166109, 0.2596171796, -0.1454966366, 0.2384005189, 0.1618344337, 0.0183557235, -0.1759248972, -0.1052252054, -0.1606463194, -0.3050886393, -0.2020210326, -0.3353256583, 0.4843744934, -0.2394975275, 0.080949463, -0.1629107147, -0.0729377493, -0.1123222262, 0.239053458, 0.1080783829, 0.0814390779, -0.1436551362, -0.0689880177, -0.1000490189, -0.0618882179, -0.0523720793, 0.1881001592, 0.0251372978, 0.2732269168, -0.169100523, -0.1986373514, -0.2601748109, 0.056433253, 0.255815953, 0.0960626304, -0.2582114935, 0.2561086416, -0.1447918564, -0.2581232488, -0.3088113964, 0.3103086948, 0.1554100215, -0.5250990391, 0.0369420797, 0.1614516377, 0.1663214713, -0.0896116719, 0.1419671774, 0.1363628954, 0.0686423928, 0.1380073577, -0.0040350854, 0.369337976, 0.215533644, -0.0409564823, 0.2696604133, 0.0495530292, -0.1201174259, -0.1636266708, 0.1193024367, 0.0317240134, -0.2905444205, -0.0196274631, 0.4356472492, -0.1525559127, 0.2414227128, 0.4414305687, -0.1187740266, -0.0253543034, -0.1871620268, 0.2185591459, 0.1407992244, -0.0268117823, -0.0851381272, -0.0053834245, -0.2538852394, -0.0652514696, 0.3296320438, -0.1268232763, 0.4315134585, 0.1532038599, 0.2892071903, -0.018470468, -0.0514069535, -0.2919025421, 0.290548116, 0.2543336153, -0.2341016829, 0.4157403708, -0.1025250554, -0.213527739, -0.6377746463, -0.3706791699, -0.0837399065, -0.1330630183, -0.0448593237, -0.0630304143, 0.1643534154, 0.0614363551, 0.0771599188, -0.0667613298, 0.2787641883, -0.1845622063, 0.1062299088, -0.3318832815, -0.3990280032, -0.0193081219, 0.2381193936, 0.0182727687, -0.1148809716, 0.0174305141, -0.0464679003, -0.0756030157, -0.1490142643, 0.112837486, -0.0141116083, -0.1526150703, 0.1377331764, -0.0253321081, -0.2624067962, -0.2278358638, 0.3238839507, -0.3288734853, 0.0045540482, 0.4567362964, -0.1896836758, -0.0553345159, -0.051293578, -0.3140723705, -0.5814593434, -0.0539099127, 0.0172905847, 0.0343011469, 0.3296330273, 0.3480426371, 0.0307736918, 0.1842594743, 0.034005478, -0.0597996674, 0.0854178369, 0.1192036718, 0.3146252036, -0.0384519845, -0.2886624038, -0.3471453786, -0.110791117, 0.0709794909, 0.0762153491, -0.3193143308, 0.1262017936, -0.1260372996, 0.0512028337, -0.2906250656, 0.0220353212, 0.448099345, 0.1102450341, -0.0087919235, 0.2124652117, 0.0139713064, 0.3060882092, 0.0416652709, 0.2144848108, -0.0346942022, 0.178726241, -0.0456407964, 0.6495577693, -0.1418002844, -0.3859339952, 0.1767015755, -0.1262178272, -0.17933622, -0.009405911, -0.3002761304, -0.0031255819, -0.2587312758, -0.0353840739, 0.0021560267, -0.2854909599, -0.3254142404, -0.1811381429, 0.1342674047, -0.1632559448, -0.3281492293, 0.367277801, -0.250742048, 0.255068779, -0.156513676, -0.144771874, -0.1669235826, -0.4364989102, -0.030233549, 0.1978233457, -0.2999418378, 0.0271618031, -0.515203774, -0.2360692322, -0.1595630199, 0.0845981911, 0.3666801751, 0.5396203399, 0.0303004831, 0.0349534005, 0.080585897, 0.1010700464, 0.4106415212, 0.1839824319, -0.0750321448, 0.1855865568, 0.1655874103, -0.3579369187, -0.283521086, -0.5400995016, -0.082204245, 0.2528799474, 0.0967262685, -0.2896074653, -0.2426508963, 0.2225341201, 0.0414287522, -0.2890587449, -0.043575801, 0.0172088221, -0.2311729193, -0.2042601407, 0.1062256694, 0.2091031224, 0.3887907267, -0.2306030095, -0.1089196578, 0.0180642363, 0.2060564011, 0.1758811921, -0.0173784345, 0.1210726723, -0.1272635609, -0.2719094455, -0.2843087316, 0.2212006599, 0.1246749163, 0.4509963095, 0.1175309047, -0.3715089262, 0.1879759878, -0.0572566725, 0.3409129679, 0.0074074306, -0.1104088053, 0.3472834229, 0.1715260893, 0.3176766038, 0.0993584245, -0.0289534274, 0.2658730149, -0.0771321207, -0.4949767888, -0.0418625101, 0.274533242, -0.0730242953, -0.0733687952, -0.024151532, -0.2094789445, -0.2615411282, 0.418596983, 0.3421200514, 1.0206483603, -0.2603805065, 0.3446722329, 0.1092102453, -0.0606012419, 0.495056808, -0.1539974809, 0.1934904754, -0.5524522066, 0.0472403765, -0.1116917729, -0.1971728504, -0.1783652008, 0.3437052667, -0.3830963373, 0.1329994202, -0.0964828059, 0.1960600615, 0.1422275007, 0.3196294308, 0.2093945146, -0.2090150118, -0.2368240207, -0.0035605021, -0.4814991355, -0.099089466, -0.0379734188, -0.2874809802, -0.0001371577, -0.3918531537, -0.2000367343, 0.1904892474, -0.2922780514, 0.3384350836, 0.5059807301, -0.1064434946, 0.2228136808, 0.1987269521, 0.3068524301, -0.0456336848, 0.0611889064, -0.2703241706, -0.0626036748, 0.1166034341, -0.0572852306, -0.0534287989, 0.4100272655, -0.0476830341, -0.3138556778, 0.3178364933, 0.0144373439, -0.1757709533, 0.157268852, -0.0672015399, 0.0875043422, -0.4117053151, 0.2714482546, -0.2188573927, -0.3185107112, -0.2686831355, 0.003916278, 0.0189208444, -0.1227036417, 0.1043701246, 0.3181701899, 0.0148007721, 0.1429255456, 0.1666362137, 0.2979538441, 0.2228277326, 0.5636558533, 0.3159724474, 0.0117534399, -0.2083152235, 0.1311720163, 0.0069092736, -0.8838163018, 0.1976177096, -0.031380415, -0.2637526989, 0.212391004, 0.3753277361, 0.1270440817, 0.4987851679, -0.174079746, -0.4247024953, -0.3973776698, 0.0065997206, 0.1742636561, 0.0011970438, 0.0514226705, 0.5306833982, 0.1982193589, 0.1547174603, -0.2049758136, 0.1831798404, -0.3399904072, 0.2554392517, -0.1108252108, -0.4195621014, -0.0381519757, 0.1254323423, 0.0438734666, 0.0017528329, 0.0914918631, -0.0549670085, -0.1826649606, 0.1793143302, 0.2735620141, -0.2096081674, -0.2047401965, -0.0046509728, -0.0219300576, 0.1029739678, -0.0729959086, 0.0078971684, -0.1585484594, 0.5496968031, -0.0968373045, -0.0782952085, -0.3212502003, 0.0320715755, -0.2329458594, -0.0552968159, 0.1789359748, 0.23104994, 0.141433984, -0.1671889722, -0.7330245376, 0.1469233781, 0.280703932, -0.0789486691, 0.2824498713, -0.6361714005, -0.2515560985, -0.124068588, 0.058936432, 0.017822979, -0.2906439006, -0.1190240979, 0.150084883, 0.0792079791, -0.2228345275, -0.2199819535, -0.0071267691, -0.1568068862, -0.1895319223, 0.438834101, 0.0504113734, -0.178173393, -0.0951464325, 0.0208669007, 0.1502605677, -0.1083434746, 0.0020459443, 0.5980394483, -0.1331814378, -0.0291012526, 0.4560698569, -0.0017089406, -0.080827117, 0.0111114457, -0.2403191328, 0.1064089313, -0.1864718795, 0.0284156092, 0.2730588615, 0.0053152889, -0.1614433676, 0.1116661802, 0.0180338174, -0.1406102926, -0.2085791081, 0.5285695791, -0.1294040084, -0.1111315638, -0.2098498195, 0.2522191405, -0.2701115906, 0.0049776658, -0.1391524971, -0.0752414465, -0.1743355095, -0.2161694169, -0.1959978789, 0.1043631658, 0.2675894499, 0.2678266168, 0.1731941998, -0.292314291, 0.0107251201, 0.474584043, 0.0857411176, -0.2254722416, 0.4008434713, 0.3285625279, -0.0989189446, 0.0243503377, 0.3410253823, 0.5116847157, 0.5268764496, -0.2755406201, 0.0296223499, 0.0998526365, -0.1723223627, 0.3009315729, 0.1220270172, 0.5902811885, 0.1590000987, 0.1322443783, -0.0237081647, -0.0250820909, 0.2330639362, -0.036525026, 0.1909649223, 0.0803817809, 0.6249299049, 0.2398194671, -0.3591578007, -0.1490706354, 0.08431831, -0.4341339171, 0.00553995, 0.4604841471, -0.0493657589, 0.288000226, -0.0646261945, -0.0263439827, 0.1581725329, 0.6270228028, 0.2333031297, 0.2689679861, -0.3417341113, 0.11560601, -0.325651437, 0.3007263243, -0.0014744367, -0.0898732692, 0.0791963786, 0.0009106696, 0.0593977571, 0.176604867, 0.1285302341, 0.0768041909, -0.1470921636, 0.2389512956, -0.1691423357, 0.0240432136, 0.0808033943, 0.2279128432, -0.0594037175, -0.3299915493, 0.217532441, 0.1071316749, -0.0194473155, -0.0732563734, 0.0540493578, 0.1230193898, 0.173081696, 0.1039052606, 0.0345203131, 0.582687676, 0.1241592765, -0.0638273656, 0.3305569291, -0.1148172766, -0.1746622771, 0.164562434, 0.2476194799, 0.6241389513, -0.0343469009, 0.2556884885, -0.4483465552, -0.2127868533, -0.0261639953, 0.0727964789, -0.2580462098, 0.2388152629, -0.2617351115, -0.0323138349, 0.3202944994, -0.0063781664, 0.2982016504, 0.0939638168, -0.4200731516, -0.464122057, 0.3670325279, -0.2881051898, -0.2306285352, -0.1451696157, 0.1122814268, 0.0307797231, 0.0831524059, -0.6610738635, -0.009856239, 0.3323137164, -0.0263020247, -0.2213638723, -0.1205208749, 0.012263637, 0.1851016432, -0.0976044163, 0.2706556618, -0.0960785523, -0.0646673292, -0.4541103244, -0.175928697 ]
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.2228239626, 0.0242496431, 0.1073713005, 0.230306983, 0.5109529495, -0.107259661, 0.532330215, 0.0775898248, -0.3410620391, -0.1247760206, 0.036657989, 0.3864074647, -0.369695425, 0.0422177389, 0.0443616398, -0.202463448, -0.088034451, 0.0099896938, -0.0232527442, -0.0536390096, 0.0482435897, 0.1829806268, -0.1568259299, 0.4144772589, -0.6451316476, -0.1835790426, 0.1746638715, -0.0963925421, -0.0992208272, -0.4487786889, 0.2202741057, -0.1020438969, 0.497636795, 0.3472320735, -0.0001241712, 0.1380357593, 0.1092859283, 0.1016945019, -0.2908720374, -0.3016375899, 0.1341147572, -0.0593847856, 0.4149942994, -0.2015386671, -0.0571896657, -0.2600914836, -0.0606258586, 0.2617686987, 0.3837760091, 0.5016981363, 0.1173221692, 0.168516472, 0.2464854717, 0.0738130212, 0.2595639825, 0.3155061901, 0.0754770115, 0.2071240395, 0.0168341696, 0.0266050398, -0.0856946409, 0.0748082697, -0.0701285228, -0.1997738779, 0.216658324, 0.2272828966, 0.1745793521, -0.147622183, -0.2287848294, 0.1198837757, 0.4332152009, -0.3214258254, -0.1559450328, 0.0079213679, -0.0111620426, -0.272799015, -0.0061668046, 0.2483308017, -0.4277774394, 0.1667013913, -0.1622606069, -0.025467094, -0.3792497814, 0.1995563805, -0.0925176293, 0.50326401, 0.1183700264, 0.1568168402, 0.1842404008, -0.0144359032, 0.3717098534, 0.0876381546, 0.1397549212, 0.0621484369, -0.3116945028, -0.0304638594, -0.4463339448, -0.6483633518, -0.2685145736, -0.212524116, 0.1655777693, -0.07115262, 0.2047268152, 0.2029505372, 0.2333223224, 0.1388008446, -0.2101234496, 0.5648382902, 0.1000925899, -0.1552507877, -0.1335454583, -0.0250886623, -0.3282391429, -0.0922893286, 0.5121237636, 0.1628404111, 0.1257428229, -0.0050321892, -0.0550227873, -0.1488326937, -0.2688643336, -0.0882173702, 0.2847146988, 0.1850692928, 0.09583579, 0.3832218349, 0.2154193372, 0.1111362129, 0.0493783355, -0.1352439821, 0.0353222974, 0.0855563208, -0.2179707885, -0.1198174432, 0.1821131706, 0.3281979561, -0.2699045837, 0.121501714, -0.1425366253, -0.2085365057, 0.001571998, -0.293589443, -0.005307354, 0.0134970956, -0.2574834824, 0.3097875118, 0.0935746282, -0.3035940528, 0.0196342915, 0.4677719772, -0.4638133347, -0.4341675043, -0.4358195066, 0.0899603143, 0.370848, -0.1129876971, -0.0923097879, 0.0597352125, 0.4520861506, -0.1888259053, 0.1029471755, -0.5797599554, 0.3521025181, -0.015292516, -0.0832997188, 0.0905465409, -0.4035288095, -0.1816474497, 0.16967085, -0.1533037275, 0.3111129999, 0.44239977, -0.3827602267, 0.2947915792, 0.0795273259, 0.0166929066, 0.8023685217, -0.3571897149, -0.2179585397, 0.1322550476, -0.1704493761, -0.3259195089, -0.0770722628, 0.2736981511, 0.0906304419, 0.0717988387, -0.0094028153, 0.391425997, -0.0933152735, 0.2531610131, -0.3342475295, -0.0749926046, 0.3700168729, 0.3320879042, 0.2507386804, -0.0335380025, 0.0665315986, 0.3422166109, 0.2596171796, -0.1454966366, 0.2384005189, 0.1618344337, 0.0183557235, -0.1759248972, -0.1052252054, -0.1606463194, -0.3050886393, -0.2020210326, -0.3353256583, 0.4843744934, -0.2394975275, 0.080949463, -0.1629107147, -0.0729377493, -0.1123222262, 0.239053458, 0.1080783829, 0.0814390779, -0.1436551362, -0.0689880177, -0.1000490189, -0.0618882179, -0.0523720793, 0.1881001592, 0.0251372978, 0.2732269168, -0.169100523, -0.1986373514, -0.2601748109, 0.056433253, 0.255815953, 0.0960626304, -0.2582114935, 0.2561086416, -0.1447918564, -0.2581232488, -0.3088113964, 0.3103086948, 0.1554100215, -0.5250990391, 0.0369420797, 0.1614516377, 0.1663214713, -0.0896116719, 0.1419671774, 0.1363628954, 0.0686423928, 0.1380073577, -0.0040350854, 0.369337976, 0.215533644, -0.0409564823, 0.2696604133, 0.0495530292, -0.1201174259, -0.1636266708, 0.1193024367, 0.0317240134, -0.2905444205, -0.0196274631, 0.4356472492, -0.1525559127, 0.2414227128, 0.4414305687, -0.1187740266, -0.0253543034, -0.1871620268, 0.2185591459, 0.1407992244, -0.0268117823, -0.0851381272, -0.0053834245, -0.2538852394, -0.0652514696, 0.3296320438, -0.1268232763, 0.4315134585, 0.1532038599, 0.2892071903, -0.018470468, -0.0514069535, -0.2919025421, 0.290548116, 0.2543336153, -0.2341016829, 0.4157403708, -0.1025250554, -0.213527739, -0.6377746463, -0.3706791699, -0.0837399065, -0.1330630183, -0.0448593237, -0.0630304143, 0.1643534154, 0.0614363551, 0.0771599188, -0.0667613298, 0.2787641883, -0.1845622063, 0.1062299088, -0.3318832815, -0.3990280032, -0.0193081219, 0.2381193936, 0.0182727687, -0.1148809716, 0.0174305141, -0.0464679003, -0.0756030157, -0.1490142643, 0.112837486, -0.0141116083, -0.1526150703, 0.1377331764, -0.0253321081, -0.2624067962, -0.2278358638, 0.3238839507, -0.3288734853, 0.0045540482, 0.4567362964, -0.1896836758, -0.0553345159, -0.051293578, -0.3140723705, -0.5814593434, -0.0539099127, 0.0172905847, 0.0343011469, 0.3296330273, 0.3480426371, 0.0307736918, 0.1842594743, 0.034005478, -0.0597996674, 0.0854178369, 0.1192036718, 0.3146252036, -0.0384519845, -0.2886624038, -0.3471453786, -0.110791117, 0.0709794909, 0.0762153491, -0.3193143308, 0.1262017936, -0.1260372996, 0.0512028337, -0.2906250656, 0.0220353212, 0.448099345, 0.1102450341, -0.0087919235, 0.2124652117, 0.0139713064, 0.3060882092, 0.0416652709, 0.2144848108, -0.0346942022, 0.178726241, -0.0456407964, 0.6495577693, -0.1418002844, -0.3859339952, 0.1767015755, -0.1262178272, -0.17933622, -0.009405911, -0.3002761304, -0.0031255819, -0.2587312758, -0.0353840739, 0.0021560267, -0.2854909599, -0.3254142404, -0.1811381429, 0.1342674047, -0.1632559448, -0.3281492293, 0.367277801, -0.250742048, 0.255068779, -0.156513676, -0.144771874, -0.1669235826, -0.4364989102, -0.030233549, 0.1978233457, -0.2999418378, 0.0271618031, -0.515203774, -0.2360692322, -0.1595630199, 0.0845981911, 0.3666801751, 0.5396203399, 0.0303004831, 0.0349534005, 0.080585897, 0.1010700464, 0.4106415212, 0.1839824319, -0.0750321448, 0.1855865568, 0.1655874103, -0.3579369187, -0.283521086, -0.5400995016, -0.082204245, 0.2528799474, 0.0967262685, -0.2896074653, -0.2426508963, 0.2225341201, 0.0414287522, -0.2890587449, -0.043575801, 0.0172088221, -0.2311729193, -0.2042601407, 0.1062256694, 0.2091031224, 0.3887907267, -0.2306030095, -0.1089196578, 0.0180642363, 0.2060564011, 0.1758811921, -0.0173784345, 0.1210726723, -0.1272635609, -0.2719094455, -0.2843087316, 0.2212006599, 0.1246749163, 0.4509963095, 0.1175309047, -0.3715089262, 0.1879759878, -0.0572566725, 0.3409129679, 0.0074074306, -0.1104088053, 0.3472834229, 0.1715260893, 0.3176766038, 0.0993584245, -0.0289534274, 0.2658730149, -0.0771321207, -0.4949767888, -0.0418625101, 0.274533242, -0.0730242953, -0.0733687952, -0.024151532, -0.2094789445, -0.2615411282, 0.418596983, 0.3421200514, 1.0206483603, -0.2603805065, 0.3446722329, 0.1092102453, -0.0606012419, 0.495056808, -0.1539974809, 0.1934904754, -0.5524522066, 0.0472403765, -0.1116917729, -0.1971728504, -0.1783652008, 0.3437052667, -0.3830963373, 0.1329994202, -0.0964828059, 0.1960600615, 0.1422275007, 0.3196294308, 0.2093945146, -0.2090150118, -0.2368240207, -0.0035605021, -0.4814991355, -0.099089466, -0.0379734188, -0.2874809802, -0.0001371577, -0.3918531537, -0.2000367343, 0.1904892474, -0.2922780514, 0.3384350836, 0.5059807301, -0.1064434946, 0.2228136808, 0.1987269521, 0.3068524301, -0.0456336848, 0.0611889064, -0.2703241706, -0.0626036748, 0.1166034341, -0.0572852306, -0.0534287989, 0.4100272655, -0.0476830341, -0.3138556778, 0.3178364933, 0.0144373439, -0.1757709533, 0.157268852, -0.0672015399, 0.0875043422, -0.4117053151, 0.2714482546, -0.2188573927, -0.3185107112, -0.2686831355, 0.003916278, 0.0189208444, -0.1227036417, 0.1043701246, 0.3181701899, 0.0148007721, 0.1429255456, 0.1666362137, 0.2979538441, 0.2228277326, 0.5636558533, 0.3159724474, 0.0117534399, -0.2083152235, 0.1311720163, 0.0069092736, -0.8838163018, 0.1976177096, -0.031380415, -0.2637526989, 0.212391004, 0.3753277361, 0.1270440817, 0.4987851679, -0.174079746, -0.4247024953, -0.3973776698, 0.0065997206, 0.1742636561, 0.0011970438, 0.0514226705, 0.5306833982, 0.1982193589, 0.1547174603, -0.2049758136, 0.1831798404, -0.3399904072, 0.2554392517, -0.1108252108, -0.4195621014, -0.0381519757, 0.1254323423, 0.0438734666, 0.0017528329, 0.0914918631, -0.0549670085, -0.1826649606, 0.1793143302, 0.2735620141, -0.2096081674, -0.2047401965, -0.0046509728, -0.0219300576, 0.1029739678, -0.0729959086, 0.0078971684, -0.1585484594, 0.5496968031, -0.0968373045, -0.0782952085, -0.3212502003, 0.0320715755, -0.2329458594, -0.0552968159, 0.1789359748, 0.23104994, 0.141433984, -0.1671889722, -0.7330245376, 0.1469233781, 0.280703932, -0.0789486691, 0.2824498713, -0.6361714005, -0.2515560985, -0.124068588, 0.058936432, 0.017822979, -0.2906439006, -0.1190240979, 0.150084883, 0.0792079791, -0.2228345275, -0.2199819535, -0.0071267691, -0.1568068862, -0.1895319223, 0.438834101, 0.0504113734, -0.178173393, -0.0951464325, 0.0208669007, 0.1502605677, -0.1083434746, 0.0020459443, 0.5980394483, -0.1331814378, -0.0291012526, 0.4560698569, -0.0017089406, -0.080827117, 0.0111114457, -0.2403191328, 0.1064089313, -0.1864718795, 0.0284156092, 0.2730588615, 0.0053152889, -0.1614433676, 0.1116661802, 0.0180338174, -0.1406102926, -0.2085791081, 0.5285695791, -0.1294040084, -0.1111315638, -0.2098498195, 0.2522191405, -0.2701115906, 0.0049776658, -0.1391524971, -0.0752414465, -0.1743355095, -0.2161694169, -0.1959978789, 0.1043631658, 0.2675894499, 0.2678266168, 0.1731941998, -0.292314291, 0.0107251201, 0.474584043, 0.0857411176, -0.2254722416, 0.4008434713, 0.3285625279, -0.0989189446, 0.0243503377, 0.3410253823, 0.5116847157, 0.5268764496, -0.2755406201, 0.0296223499, 0.0998526365, -0.1723223627, 0.3009315729, 0.1220270172, 0.5902811885, 0.1590000987, 0.1322443783, -0.0237081647, -0.0250820909, 0.2330639362, -0.036525026, 0.1909649223, 0.0803817809, 0.6249299049, 0.2398194671, -0.3591578007, -0.1490706354, 0.08431831, -0.4341339171, 0.00553995, 0.4604841471, -0.0493657589, 0.288000226, -0.0646261945, -0.0263439827, 0.1581725329, 0.6270228028, 0.2333031297, 0.2689679861, -0.3417341113, 0.11560601, -0.325651437, 0.3007263243, -0.0014744367, -0.0898732692, 0.0791963786, 0.0009106696, 0.0593977571, 0.176604867, 0.1285302341, 0.0768041909, -0.1470921636, 0.2389512956, -0.1691423357, 0.0240432136, 0.0808033943, 0.2279128432, -0.0594037175, -0.3299915493, 0.217532441, 0.1071316749, -0.0194473155, -0.0732563734, 0.0540493578, 0.1230193898, 0.173081696, 0.1039052606, 0.0345203131, 0.582687676, 0.1241592765, -0.0638273656, 0.3305569291, -0.1148172766, -0.1746622771, 0.164562434, 0.2476194799, 0.6241389513, -0.0343469009, 0.2556884885, -0.4483465552, -0.2127868533, -0.0261639953, 0.0727964789, -0.2580462098, 0.2388152629, -0.2617351115, -0.0323138349, 0.3202944994, -0.0063781664, 0.2982016504, 0.0939638168, -0.4200731516, -0.464122057, 0.3670325279, -0.2881051898, -0.2306285352, -0.1451696157, 0.1122814268, 0.0307797231, 0.0831524059, -0.6610738635, -0.009856239, 0.3323137164, -0.0263020247, -0.2213638723, -0.1205208749, 0.012263637, 0.1851016432, -0.0976044163, 0.2706556618, -0.0960785523, -0.0646673292, -0.4541103244, -0.175928697 ]
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.2228239626, 0.0242496431, 0.1073713005, 0.230306983, 0.5109529495, -0.107259661, 0.532330215, 0.0775898248, -0.3410620391, -0.1247760206, 0.036657989, 0.3864074647, -0.369695425, 0.0422177389, 0.0443616398, -0.202463448, -0.088034451, 0.0099896938, -0.0232527442, -0.0536390096, 0.0482435897, 0.1829806268, -0.1568259299, 0.4144772589, -0.6451316476, -0.1835790426, 0.1746638715, -0.0963925421, -0.0992208272, -0.4487786889, 0.2202741057, -0.1020438969, 0.497636795, 0.3472320735, -0.0001241712, 0.1380357593, 0.1092859283, 0.1016945019, -0.2908720374, -0.3016375899, 0.1341147572, -0.0593847856, 0.4149942994, -0.2015386671, -0.0571896657, -0.2600914836, -0.0606258586, 0.2617686987, 0.3837760091, 0.5016981363, 0.1173221692, 0.168516472, 0.2464854717, 0.0738130212, 0.2595639825, 0.3155061901, 0.0754770115, 0.2071240395, 0.0168341696, 0.0266050398, -0.0856946409, 0.0748082697, -0.0701285228, -0.1997738779, 0.216658324, 0.2272828966, 0.1745793521, -0.147622183, -0.2287848294, 0.1198837757, 0.4332152009, -0.3214258254, -0.1559450328, 0.0079213679, -0.0111620426, -0.272799015, -0.0061668046, 0.2483308017, -0.4277774394, 0.1667013913, -0.1622606069, -0.025467094, -0.3792497814, 0.1995563805, -0.0925176293, 0.50326401, 0.1183700264, 0.1568168402, 0.1842404008, -0.0144359032, 0.3717098534, 0.0876381546, 0.1397549212, 0.0621484369, -0.3116945028, -0.0304638594, -0.4463339448, -0.6483633518, -0.2685145736, -0.212524116, 0.1655777693, -0.07115262, 0.2047268152, 0.2029505372, 0.2333223224, 0.1388008446, -0.2101234496, 0.5648382902, 0.1000925899, -0.1552507877, -0.1335454583, -0.0250886623, -0.3282391429, -0.0922893286, 0.5121237636, 0.1628404111, 0.1257428229, -0.0050321892, -0.0550227873, -0.1488326937, -0.2688643336, -0.0882173702, 0.2847146988, 0.1850692928, 0.09583579, 0.3832218349, 0.2154193372, 0.1111362129, 0.0493783355, -0.1352439821, 0.0353222974, 0.0855563208, -0.2179707885, -0.1198174432, 0.1821131706, 0.3281979561, -0.2699045837, 0.121501714, -0.1425366253, -0.2085365057, 0.001571998, -0.293589443, -0.005307354, 0.0134970956, -0.2574834824, 0.3097875118, 0.0935746282, -0.3035940528, 0.0196342915, 0.4677719772, -0.4638133347, -0.4341675043, -0.4358195066, 0.0899603143, 0.370848, -0.1129876971, -0.0923097879, 0.0597352125, 0.4520861506, -0.1888259053, 0.1029471755, -0.5797599554, 0.3521025181, -0.015292516, -0.0832997188, 0.0905465409, -0.4035288095, -0.1816474497, 0.16967085, -0.1533037275, 0.3111129999, 0.44239977, -0.3827602267, 0.2947915792, 0.0795273259, 0.0166929066, 0.8023685217, -0.3571897149, -0.2179585397, 0.1322550476, -0.1704493761, -0.3259195089, -0.0770722628, 0.2736981511, 0.0906304419, 0.0717988387, -0.0094028153, 0.391425997, -0.0933152735, 0.2531610131, -0.3342475295, -0.0749926046, 0.3700168729, 0.3320879042, 0.2507386804, -0.0335380025, 0.0665315986, 0.3422166109, 0.2596171796, -0.1454966366, 0.2384005189, 0.1618344337, 0.0183557235, -0.1759248972, -0.1052252054, -0.1606463194, -0.3050886393, -0.2020210326, -0.3353256583, 0.4843744934, -0.2394975275, 0.080949463, -0.1629107147, -0.0729377493, -0.1123222262, 0.239053458, 0.1080783829, 0.0814390779, -0.1436551362, -0.0689880177, -0.1000490189, -0.0618882179, -0.0523720793, 0.1881001592, 0.0251372978, 0.2732269168, -0.169100523, -0.1986373514, -0.2601748109, 0.056433253, 0.255815953, 0.0960626304, -0.2582114935, 0.2561086416, -0.1447918564, -0.2581232488, -0.3088113964, 0.3103086948, 0.1554100215, -0.5250990391, 0.0369420797, 0.1614516377, 0.1663214713, -0.0896116719, 0.1419671774, 0.1363628954, 0.0686423928, 0.1380073577, -0.0040350854, 0.369337976, 0.215533644, -0.0409564823, 0.2696604133, 0.0495530292, -0.1201174259, -0.1636266708, 0.1193024367, 0.0317240134, -0.2905444205, -0.0196274631, 0.4356472492, -0.1525559127, 0.2414227128, 0.4414305687, -0.1187740266, -0.0253543034, -0.1871620268, 0.2185591459, 0.1407992244, -0.0268117823, -0.0851381272, -0.0053834245, -0.2538852394, -0.0652514696, 0.3296320438, -0.1268232763, 0.4315134585, 0.1532038599, 0.2892071903, -0.018470468, -0.0514069535, -0.2919025421, 0.290548116, 0.2543336153, -0.2341016829, 0.4157403708, -0.1025250554, -0.213527739, -0.6377746463, -0.3706791699, -0.0837399065, -0.1330630183, -0.0448593237, -0.0630304143, 0.1643534154, 0.0614363551, 0.0771599188, -0.0667613298, 0.2787641883, -0.1845622063, 0.1062299088, -0.3318832815, -0.3990280032, -0.0193081219, 0.2381193936, 0.0182727687, -0.1148809716, 0.0174305141, -0.0464679003, -0.0756030157, -0.1490142643, 0.112837486, -0.0141116083, -0.1526150703, 0.1377331764, -0.0253321081, -0.2624067962, -0.2278358638, 0.3238839507, -0.3288734853, 0.0045540482, 0.4567362964, -0.1896836758, -0.0553345159, -0.051293578, -0.3140723705, -0.5814593434, -0.0539099127, 0.0172905847, 0.0343011469, 0.3296330273, 0.3480426371, 0.0307736918, 0.1842594743, 0.034005478, -0.0597996674, 0.0854178369, 0.1192036718, 0.3146252036, -0.0384519845, -0.2886624038, -0.3471453786, -0.110791117, 0.0709794909, 0.0762153491, -0.3193143308, 0.1262017936, -0.1260372996, 0.0512028337, -0.2906250656, 0.0220353212, 0.448099345, 0.1102450341, -0.0087919235, 0.2124652117, 0.0139713064, 0.3060882092, 0.0416652709, 0.2144848108, -0.0346942022, 0.178726241, -0.0456407964, 0.6495577693, -0.1418002844, -0.3859339952, 0.1767015755, -0.1262178272, -0.17933622, -0.009405911, -0.3002761304, -0.0031255819, -0.2587312758, -0.0353840739, 0.0021560267, -0.2854909599, -0.3254142404, -0.1811381429, 0.1342674047, -0.1632559448, -0.3281492293, 0.367277801, -0.250742048, 0.255068779, -0.156513676, -0.144771874, -0.1669235826, -0.4364989102, -0.030233549, 0.1978233457, -0.2999418378, 0.0271618031, -0.515203774, -0.2360692322, -0.1595630199, 0.0845981911, 0.3666801751, 0.5396203399, 0.0303004831, 0.0349534005, 0.080585897, 0.1010700464, 0.4106415212, 0.1839824319, -0.0750321448, 0.1855865568, 0.1655874103, -0.3579369187, -0.283521086, -0.5400995016, -0.082204245, 0.2528799474, 0.0967262685, -0.2896074653, -0.2426508963, 0.2225341201, 0.0414287522, -0.2890587449, -0.043575801, 0.0172088221, -0.2311729193, -0.2042601407, 0.1062256694, 0.2091031224, 0.3887907267, -0.2306030095, -0.1089196578, 0.0180642363, 0.2060564011, 0.1758811921, -0.0173784345, 0.1210726723, -0.1272635609, -0.2719094455, -0.2843087316, 0.2212006599, 0.1246749163, 0.4509963095, 0.1175309047, -0.3715089262, 0.1879759878, -0.0572566725, 0.3409129679, 0.0074074306, -0.1104088053, 0.3472834229, 0.1715260893, 0.3176766038, 0.0993584245, -0.0289534274, 0.2658730149, -0.0771321207, -0.4949767888, -0.0418625101, 0.274533242, -0.0730242953, -0.0733687952, -0.024151532, -0.2094789445, -0.2615411282, 0.418596983, 0.3421200514, 1.0206483603, -0.2603805065, 0.3446722329, 0.1092102453, -0.0606012419, 0.495056808, -0.1539974809, 0.1934904754, -0.5524522066, 0.0472403765, -0.1116917729, -0.1971728504, -0.1783652008, 0.3437052667, -0.3830963373, 0.1329994202, -0.0964828059, 0.1960600615, 0.1422275007, 0.3196294308, 0.2093945146, -0.2090150118, -0.2368240207, -0.0035605021, -0.4814991355, -0.099089466, -0.0379734188, -0.2874809802, -0.0001371577, -0.3918531537, -0.2000367343, 0.1904892474, -0.2922780514, 0.3384350836, 0.5059807301, -0.1064434946, 0.2228136808, 0.1987269521, 0.3068524301, -0.0456336848, 0.0611889064, -0.2703241706, -0.0626036748, 0.1166034341, -0.0572852306, -0.0534287989, 0.4100272655, -0.0476830341, -0.3138556778, 0.3178364933, 0.0144373439, -0.1757709533, 0.157268852, -0.0672015399, 0.0875043422, -0.4117053151, 0.2714482546, -0.2188573927, -0.3185107112, -0.2686831355, 0.003916278, 0.0189208444, -0.1227036417, 0.1043701246, 0.3181701899, 0.0148007721, 0.1429255456, 0.1666362137, 0.2979538441, 0.2228277326, 0.5636558533, 0.3159724474, 0.0117534399, -0.2083152235, 0.1311720163, 0.0069092736, -0.8838163018, 0.1976177096, -0.031380415, -0.2637526989, 0.212391004, 0.3753277361, 0.1270440817, 0.4987851679, -0.174079746, -0.4247024953, -0.3973776698, 0.0065997206, 0.1742636561, 0.0011970438, 0.0514226705, 0.5306833982, 0.1982193589, 0.1547174603, -0.2049758136, 0.1831798404, -0.3399904072, 0.2554392517, -0.1108252108, -0.4195621014, -0.0381519757, 0.1254323423, 0.0438734666, 0.0017528329, 0.0914918631, -0.0549670085, -0.1826649606, 0.1793143302, 0.2735620141, -0.2096081674, -0.2047401965, -0.0046509728, -0.0219300576, 0.1029739678, -0.0729959086, 0.0078971684, -0.1585484594, 0.5496968031, -0.0968373045, -0.0782952085, -0.3212502003, 0.0320715755, -0.2329458594, -0.0552968159, 0.1789359748, 0.23104994, 0.141433984, -0.1671889722, -0.7330245376, 0.1469233781, 0.280703932, -0.0789486691, 0.2824498713, -0.6361714005, -0.2515560985, -0.124068588, 0.058936432, 0.017822979, -0.2906439006, -0.1190240979, 0.150084883, 0.0792079791, -0.2228345275, -0.2199819535, -0.0071267691, -0.1568068862, -0.1895319223, 0.438834101, 0.0504113734, -0.178173393, -0.0951464325, 0.0208669007, 0.1502605677, -0.1083434746, 0.0020459443, 0.5980394483, -0.1331814378, -0.0291012526, 0.4560698569, -0.0017089406, -0.080827117, 0.0111114457, -0.2403191328, 0.1064089313, -0.1864718795, 0.0284156092, 0.2730588615, 0.0053152889, -0.1614433676, 0.1116661802, 0.0180338174, -0.1406102926, -0.2085791081, 0.5285695791, -0.1294040084, -0.1111315638, -0.2098498195, 0.2522191405, -0.2701115906, 0.0049776658, -0.1391524971, -0.0752414465, -0.1743355095, -0.2161694169, -0.1959978789, 0.1043631658, 0.2675894499, 0.2678266168, 0.1731941998, -0.292314291, 0.0107251201, 0.474584043, 0.0857411176, -0.2254722416, 0.4008434713, 0.3285625279, -0.0989189446, 0.0243503377, 0.3410253823, 0.5116847157, 0.5268764496, -0.2755406201, 0.0296223499, 0.0998526365, -0.1723223627, 0.3009315729, 0.1220270172, 0.5902811885, 0.1590000987, 0.1322443783, -0.0237081647, -0.0250820909, 0.2330639362, -0.036525026, 0.1909649223, 0.0803817809, 0.6249299049, 0.2398194671, -0.3591578007, -0.1490706354, 0.08431831, -0.4341339171, 0.00553995, 0.4604841471, -0.0493657589, 0.288000226, -0.0646261945, -0.0263439827, 0.1581725329, 0.6270228028, 0.2333031297, 0.2689679861, -0.3417341113, 0.11560601, -0.325651437, 0.3007263243, -0.0014744367, -0.0898732692, 0.0791963786, 0.0009106696, 0.0593977571, 0.176604867, 0.1285302341, 0.0768041909, -0.1470921636, 0.2389512956, -0.1691423357, 0.0240432136, 0.0808033943, 0.2279128432, -0.0594037175, -0.3299915493, 0.217532441, 0.1071316749, -0.0194473155, -0.0732563734, 0.0540493578, 0.1230193898, 0.173081696, 0.1039052606, 0.0345203131, 0.582687676, 0.1241592765, -0.0638273656, 0.3305569291, -0.1148172766, -0.1746622771, 0.164562434, 0.2476194799, 0.6241389513, -0.0343469009, 0.2556884885, -0.4483465552, -0.2127868533, -0.0261639953, 0.0727964789, -0.2580462098, 0.2388152629, -0.2617351115, -0.0323138349, 0.3202944994, -0.0063781664, 0.2982016504, 0.0939638168, -0.4200731516, -0.464122057, 0.3670325279, -0.2881051898, -0.2306285352, -0.1451696157, 0.1122814268, 0.0307797231, 0.0831524059, -0.6610738635, -0.009856239, 0.3323137164, -0.0263020247, -0.2213638723, -0.1205208749, 0.012263637, 0.1851016432, -0.0976044163, 0.2706556618, -0.0960785523, -0.0646673292, -0.4541103244, -0.175928697 ]
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.2228239626, 0.0242496431, 0.1073713005, 0.230306983, 0.5109529495, -0.107259661, 0.532330215, 0.0775898248, -0.3410620391, -0.1247760206, 0.036657989, 0.3864074647, -0.369695425, 0.0422177389, 0.0443616398, -0.202463448, -0.088034451, 0.0099896938, -0.0232527442, -0.0536390096, 0.0482435897, 0.1829806268, -0.1568259299, 0.4144772589, -0.6451316476, -0.1835790426, 0.1746638715, -0.0963925421, -0.0992208272, -0.4487786889, 0.2202741057, -0.1020438969, 0.497636795, 0.3472320735, -0.0001241712, 0.1380357593, 0.1092859283, 0.1016945019, -0.2908720374, -0.3016375899, 0.1341147572, -0.0593847856, 0.4149942994, -0.2015386671, -0.0571896657, -0.2600914836, -0.0606258586, 0.2617686987, 0.3837760091, 0.5016981363, 0.1173221692, 0.168516472, 0.2464854717, 0.0738130212, 0.2595639825, 0.3155061901, 0.0754770115, 0.2071240395, 0.0168341696, 0.0266050398, -0.0856946409, 0.0748082697, -0.0701285228, -0.1997738779, 0.216658324, 0.2272828966, 0.1745793521, -0.147622183, -0.2287848294, 0.1198837757, 0.4332152009, -0.3214258254, -0.1559450328, 0.0079213679, -0.0111620426, -0.272799015, -0.0061668046, 0.2483308017, -0.4277774394, 0.1667013913, -0.1622606069, -0.025467094, -0.3792497814, 0.1995563805, -0.0925176293, 0.50326401, 0.1183700264, 0.1568168402, 0.1842404008, -0.0144359032, 0.3717098534, 0.0876381546, 0.1397549212, 0.0621484369, -0.3116945028, -0.0304638594, -0.4463339448, -0.6483633518, -0.2685145736, -0.212524116, 0.1655777693, -0.07115262, 0.2047268152, 0.2029505372, 0.2333223224, 0.1388008446, -0.2101234496, 0.5648382902, 0.1000925899, -0.1552507877, -0.1335454583, -0.0250886623, -0.3282391429, -0.0922893286, 0.5121237636, 0.1628404111, 0.1257428229, -0.0050321892, -0.0550227873, -0.1488326937, -0.2688643336, -0.0882173702, 0.2847146988, 0.1850692928, 0.09583579, 0.3832218349, 0.2154193372, 0.1111362129, 0.0493783355, -0.1352439821, 0.0353222974, 0.0855563208, -0.2179707885, -0.1198174432, 0.1821131706, 0.3281979561, -0.2699045837, 0.121501714, -0.1425366253, -0.2085365057, 0.001571998, -0.293589443, -0.005307354, 0.0134970956, -0.2574834824, 0.3097875118, 0.0935746282, -0.3035940528, 0.0196342915, 0.4677719772, -0.4638133347, -0.4341675043, -0.4358195066, 0.0899603143, 0.370848, -0.1129876971, -0.0923097879, 0.0597352125, 0.4520861506, -0.1888259053, 0.1029471755, -0.5797599554, 0.3521025181, -0.015292516, -0.0832997188, 0.0905465409, -0.4035288095, -0.1816474497, 0.16967085, -0.1533037275, 0.3111129999, 0.44239977, -0.3827602267, 0.2947915792, 0.0795273259, 0.0166929066, 0.8023685217, -0.3571897149, -0.2179585397, 0.1322550476, -0.1704493761, -0.3259195089, -0.0770722628, 0.2736981511, 0.0906304419, 0.0717988387, -0.0094028153, 0.391425997, -0.0933152735, 0.2531610131, -0.3342475295, -0.0749926046, 0.3700168729, 0.3320879042, 0.2507386804, -0.0335380025, 0.0665315986, 0.3422166109, 0.2596171796, -0.1454966366, 0.2384005189, 0.1618344337, 0.0183557235, -0.1759248972, -0.1052252054, -0.1606463194, -0.3050886393, -0.2020210326, -0.3353256583, 0.4843744934, -0.2394975275, 0.080949463, -0.1629107147, -0.0729377493, -0.1123222262, 0.239053458, 0.1080783829, 0.0814390779, -0.1436551362, -0.0689880177, -0.1000490189, -0.0618882179, -0.0523720793, 0.1881001592, 0.0251372978, 0.2732269168, -0.169100523, -0.1986373514, -0.2601748109, 0.056433253, 0.255815953, 0.0960626304, -0.2582114935, 0.2561086416, -0.1447918564, -0.2581232488, -0.3088113964, 0.3103086948, 0.1554100215, -0.5250990391, 0.0369420797, 0.1614516377, 0.1663214713, -0.0896116719, 0.1419671774, 0.1363628954, 0.0686423928, 0.1380073577, -0.0040350854, 0.369337976, 0.215533644, -0.0409564823, 0.2696604133, 0.0495530292, -0.1201174259, -0.1636266708, 0.1193024367, 0.0317240134, -0.2905444205, -0.0196274631, 0.4356472492, -0.1525559127, 0.2414227128, 0.4414305687, -0.1187740266, -0.0253543034, -0.1871620268, 0.2185591459, 0.1407992244, -0.0268117823, -0.0851381272, -0.0053834245, -0.2538852394, -0.0652514696, 0.3296320438, -0.1268232763, 0.4315134585, 0.1532038599, 0.2892071903, -0.018470468, -0.0514069535, -0.2919025421, 0.290548116, 0.2543336153, -0.2341016829, 0.4157403708, -0.1025250554, -0.213527739, -0.6377746463, -0.3706791699, -0.0837399065, -0.1330630183, -0.0448593237, -0.0630304143, 0.1643534154, 0.0614363551, 0.0771599188, -0.0667613298, 0.2787641883, -0.1845622063, 0.1062299088, -0.3318832815, -0.3990280032, -0.0193081219, 0.2381193936, 0.0182727687, -0.1148809716, 0.0174305141, -0.0464679003, -0.0756030157, -0.1490142643, 0.112837486, -0.0141116083, -0.1526150703, 0.1377331764, -0.0253321081, -0.2624067962, -0.2278358638, 0.3238839507, -0.3288734853, 0.0045540482, 0.4567362964, -0.1896836758, -0.0553345159, -0.051293578, -0.3140723705, -0.5814593434, -0.0539099127, 0.0172905847, 0.0343011469, 0.3296330273, 0.3480426371, 0.0307736918, 0.1842594743, 0.034005478, -0.0597996674, 0.0854178369, 0.1192036718, 0.3146252036, -0.0384519845, -0.2886624038, -0.3471453786, -0.110791117, 0.0709794909, 0.0762153491, -0.3193143308, 0.1262017936, -0.1260372996, 0.0512028337, -0.2906250656, 0.0220353212, 0.448099345, 0.1102450341, -0.0087919235, 0.2124652117, 0.0139713064, 0.3060882092, 0.0416652709, 0.2144848108, -0.0346942022, 0.178726241, -0.0456407964, 0.6495577693, -0.1418002844, -0.3859339952, 0.1767015755, -0.1262178272, -0.17933622, -0.009405911, -0.3002761304, -0.0031255819, -0.2587312758, -0.0353840739, 0.0021560267, -0.2854909599, -0.3254142404, -0.1811381429, 0.1342674047, -0.1632559448, -0.3281492293, 0.367277801, -0.250742048, 0.255068779, -0.156513676, -0.144771874, -0.1669235826, -0.4364989102, -0.030233549, 0.1978233457, -0.2999418378, 0.0271618031, -0.515203774, -0.2360692322, -0.1595630199, 0.0845981911, 0.3666801751, 0.5396203399, 0.0303004831, 0.0349534005, 0.080585897, 0.1010700464, 0.4106415212, 0.1839824319, -0.0750321448, 0.1855865568, 0.1655874103, -0.3579369187, -0.283521086, -0.5400995016, -0.082204245, 0.2528799474, 0.0967262685, -0.2896074653, -0.2426508963, 0.2225341201, 0.0414287522, -0.2890587449, -0.043575801, 0.0172088221, -0.2311729193, -0.2042601407, 0.1062256694, 0.2091031224, 0.3887907267, -0.2306030095, -0.1089196578, 0.0180642363, 0.2060564011, 0.1758811921, -0.0173784345, 0.1210726723, -0.1272635609, -0.2719094455, -0.2843087316, 0.2212006599, 0.1246749163, 0.4509963095, 0.1175309047, -0.3715089262, 0.1879759878, -0.0572566725, 0.3409129679, 0.0074074306, -0.1104088053, 0.3472834229, 0.1715260893, 0.3176766038, 0.0993584245, -0.0289534274, 0.2658730149, -0.0771321207, -0.4949767888, -0.0418625101, 0.274533242, -0.0730242953, -0.0733687952, -0.024151532, -0.2094789445, -0.2615411282, 0.418596983, 0.3421200514, 1.0206483603, -0.2603805065, 0.3446722329, 0.1092102453, -0.0606012419, 0.495056808, -0.1539974809, 0.1934904754, -0.5524522066, 0.0472403765, -0.1116917729, -0.1971728504, -0.1783652008, 0.3437052667, -0.3830963373, 0.1329994202, -0.0964828059, 0.1960600615, 0.1422275007, 0.3196294308, 0.2093945146, -0.2090150118, -0.2368240207, -0.0035605021, -0.4814991355, -0.099089466, -0.0379734188, -0.2874809802, -0.0001371577, -0.3918531537, -0.2000367343, 0.1904892474, -0.2922780514, 0.3384350836, 0.5059807301, -0.1064434946, 0.2228136808, 0.1987269521, 0.3068524301, -0.0456336848, 0.0611889064, -0.2703241706, -0.0626036748, 0.1166034341, -0.0572852306, -0.0534287989, 0.4100272655, -0.0476830341, -0.3138556778, 0.3178364933, 0.0144373439, -0.1757709533, 0.157268852, -0.0672015399, 0.0875043422, -0.4117053151, 0.2714482546, -0.2188573927, -0.3185107112, -0.2686831355, 0.003916278, 0.0189208444, -0.1227036417, 0.1043701246, 0.3181701899, 0.0148007721, 0.1429255456, 0.1666362137, 0.2979538441, 0.2228277326, 0.5636558533, 0.3159724474, 0.0117534399, -0.2083152235, 0.1311720163, 0.0069092736, -0.8838163018, 0.1976177096, -0.031380415, -0.2637526989, 0.212391004, 0.3753277361, 0.1270440817, 0.4987851679, -0.174079746, -0.4247024953, -0.3973776698, 0.0065997206, 0.1742636561, 0.0011970438, 0.0514226705, 0.5306833982, 0.1982193589, 0.1547174603, -0.2049758136, 0.1831798404, -0.3399904072, 0.2554392517, -0.1108252108, -0.4195621014, -0.0381519757, 0.1254323423, 0.0438734666, 0.0017528329, 0.0914918631, -0.0549670085, -0.1826649606, 0.1793143302, 0.2735620141, -0.2096081674, -0.2047401965, -0.0046509728, -0.0219300576, 0.1029739678, -0.0729959086, 0.0078971684, -0.1585484594, 0.5496968031, -0.0968373045, -0.0782952085, -0.3212502003, 0.0320715755, -0.2329458594, -0.0552968159, 0.1789359748, 0.23104994, 0.141433984, -0.1671889722, -0.7330245376, 0.1469233781, 0.280703932, -0.0789486691, 0.2824498713, -0.6361714005, -0.2515560985, -0.124068588, 0.058936432, 0.017822979, -0.2906439006, -0.1190240979, 0.150084883, 0.0792079791, -0.2228345275, -0.2199819535, -0.0071267691, -0.1568068862, -0.1895319223, 0.438834101, 0.0504113734, -0.178173393, -0.0951464325, 0.0208669007, 0.1502605677, -0.1083434746, 0.0020459443, 0.5980394483, -0.1331814378, -0.0291012526, 0.4560698569, -0.0017089406, -0.080827117, 0.0111114457, -0.2403191328, 0.1064089313, -0.1864718795, 0.0284156092, 0.2730588615, 0.0053152889, -0.1614433676, 0.1116661802, 0.0180338174, -0.1406102926, -0.2085791081, 0.5285695791, -0.1294040084, -0.1111315638, -0.2098498195, 0.2522191405, -0.2701115906, 0.0049776658, -0.1391524971, -0.0752414465, -0.1743355095, -0.2161694169, -0.1959978789, 0.1043631658, 0.2675894499, 0.2678266168, 0.1731941998, -0.292314291, 0.0107251201, 0.474584043, 0.0857411176, -0.2254722416, 0.4008434713, 0.3285625279, -0.0989189446, 0.0243503377, 0.3410253823, 0.5116847157, 0.5268764496, -0.2755406201, 0.0296223499, 0.0998526365, -0.1723223627, 0.3009315729, 0.1220270172, 0.5902811885, 0.1590000987, 0.1322443783, -0.0237081647, -0.0250820909, 0.2330639362, -0.036525026, 0.1909649223, 0.0803817809, 0.6249299049, 0.2398194671, -0.3591578007, -0.1490706354, 0.08431831, -0.4341339171, 0.00553995, 0.4604841471, -0.0493657589, 0.288000226, -0.0646261945, -0.0263439827, 0.1581725329, 0.6270228028, 0.2333031297, 0.2689679861, -0.3417341113, 0.11560601, -0.325651437, 0.3007263243, -0.0014744367, -0.0898732692, 0.0791963786, 0.0009106696, 0.0593977571, 0.176604867, 0.1285302341, 0.0768041909, -0.1470921636, 0.2389512956, -0.1691423357, 0.0240432136, 0.0808033943, 0.2279128432, -0.0594037175, -0.3299915493, 0.217532441, 0.1071316749, -0.0194473155, -0.0732563734, 0.0540493578, 0.1230193898, 0.173081696, 0.1039052606, 0.0345203131, 0.582687676, 0.1241592765, -0.0638273656, 0.3305569291, -0.1148172766, -0.1746622771, 0.164562434, 0.2476194799, 0.6241389513, -0.0343469009, 0.2556884885, -0.4483465552, -0.2127868533, -0.0261639953, 0.0727964789, -0.2580462098, 0.2388152629, -0.2617351115, -0.0323138349, 0.3202944994, -0.0063781664, 0.2982016504, 0.0939638168, -0.4200731516, -0.464122057, 0.3670325279, -0.2881051898, -0.2306285352, -0.1451696157, 0.1122814268, 0.0307797231, 0.0831524059, -0.6610738635, -0.009856239, 0.3323137164, -0.0263020247, -0.2213638723, -0.1205208749, 0.012263637, 0.1851016432, -0.0976044163, 0.2706556618, -0.0960785523, -0.0646673292, -0.4541103244, -0.175928697 ]
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.3326013684, -0.0930109471, -0.1336478889, 0.2554298043, 0.3521752954, -0.0277496055, 0.2249828577, 0.3496460915, -0.0286988318, 0.0382285863, -0.0904108435, 0.1502788216, -0.0761746913, -0.1970369518, 0.1891060621, -0.2467030734, -0.0738266259, 0.1824576557, 0.107806772, 0.0069918856, -0.3558882773, 0.1144125462, -0.1869956851, 0.2637093365, -0.377148211, 0.081082359, 0.29786551, 0.3204650879, -0.1932807714, -0.6116118431, 0.4130367339, -0.0536641702, 0.4325028658, 0.3163448572, -0.0001086042, 0.0825852603, 0.3929111362, -0.1319694072, -0.3346784115, -0.1939976066, -0.5915250182, -0.1812517345, -0.0098232478, -0.2595875263, 0.1902403086, 0.0562080927, -0.0642361939, -0.3830469251, 0.1811341643, 0.207189545, 0.2416385114, 0.3705637455, 0.0213384703, 0.0912283212, -0.0455749407, 0.1074258089, -0.154256016, 0.2494189292, 0.4346240163, 0.0627749041, -0.0191489272, 0.2926938832, -0.0486162677, 0.2481203675, -0.1023557484, 0.1306458861, 0.1399903744, -0.4660047889, 0.1134835109, 0.0036375751, 0.271874696, -0.3664451838, -0.2865586579, -0.2252657413, -0.1094699949, -0.5443437696, 0.2644949853, 0.0905639753, -0.1596594453, -0.0211322699, 0.1131592393, -0.0423873141, -0.1735193133, 0.0391210876, 0.0543595105, 0.3878185451, -0.0600739494, -0.0513226353, -0.094175905, -0.1786021441, 0.4082850218, -0.1458788216, -0.1436939538, 0.3246292174, -0.2863638997, 0.0724222213, -0.0550466552, -0.3371772468, 0.0668165535, -0.0463101231, -0.0788231716, 0.274479419, -0.0495553464, 0.0531956963, 0.309307009, 0.1556755304, 0.2095073611, 0.2245568782, 0.1834985912, 0.1982242316, 0.0829442292, -0.001205144, -0.1758537889, -0.1771316677, 0.3654840589, 0.1934715807, 0.5531743169, -0.3191606104, -0.1221154183, 0.0084837824, 0.172885254, -0.1787238121, 0.0444036722, 0.0144085083, 0.222330898, 0.5070413351, -0.2224070132, 0.2185738981, -0.4622747004, -0.1283477694, -0.1358896047, 0.1796100736, -0.1460786313, -0.0783125758, 0.0963897556, 0.1252892017, 0.163143605, -0.142241165, 0.3579080701, -0.0693806708, 0.0396496058, -0.2039280981, -0.2201955914, 0.0137814544, 0.1307830811, 0.1039624959, 0.0551503003, -0.1753353775, -0.0369681343, 0.2171098441, -0.1871832609, -0.2070105225, -0.0715536773, 0.2629821897, 0.0267737657, 0.02515365, -0.4134674966, -0.0887360722, 0.3430745006, 0.0620885417, 0.113991186, -0.2957779765, 0.0404425338, -0.085876435, 0.2037118077, 0.3430533409, -0.1321642846, 0.046463415, 0.1779044271, -0.1550113261, 0.2246280611, 0.2967450023, -0.1922279745, 0.0937532187, -0.0989212096, 0.5539205074, 0.5879890919, -0.4102401733, -0.4520796537, 0.1696789861, -0.258897543, 0.195201695, -0.1164149493, 0.1070557162, 0.3267487288, -0.1174321324, 0.3066209853, 0.6193355322, -0.1105518788, 0.1110308394, -0.2158634216, 0.024582006, 0.0014836453, 0.2785249352, 0.2359110415, -0.193820551, 0.1145047396, 0.2641795278, 0.243651554, -0.3050078452, 0.1434530616, 0.2776195109, 0.0995115042, 0.0506758019, -0.1596456617, -0.3252390027, -0.2702022791, 0.2318236679, -0.1383469105, 0.1085470021, -0.3714390397, 0.0401462018, -0.2963202596, 0.0447944179, -0.5638592243, -0.1213938668, 0.1630700529, 0.2012811452, 0.0795096159, 0.0613079667, -0.3085088134, 0.27930668, -0.1050261259, -0.0565539971, -0.599465847, 0.2591192722, -0.067492947, -0.3134036064, -0.0747861788, 0.3225339353, 0.0828683451, -0.1350196302, -0.3367394805, 0.2787976861, -0.0855250806, 0.0143845417, 0.0664438978, -0.1704663783, 0.2425209582, -0.4210941792, 0.1616298556, 0.0719257593, 0.1278538555, 0.0151309669, 0.1468041837, 0.3288505077, 0.0096399682, 0.000221137, -0.0022294521, -0.0426438078, 0.4274255633, -0.0020318553, 0.0864699557, -0.2572606206, 0.233975172, -0.0238234326, 0.1626574695, -0.0563809276, -0.1947320104, -0.0884142295, 0.5688616037, -0.136572212, 0.196163848, 0.127199471, -0.0223116502, 0.0912191421, -0.0803106427, 0.0161399096, 0.2614566982, 0.0181957036, 0.0555704683, 0.0068810172, 0.1075891703, 0.0290952772, 0.1412385106, -0.0843671709, -0.086413525, -0.0710773617, -0.0867036581, -0.0300664604, -0.3335584998, -0.1923587173, -0.1055370569, 0.3316011429, -0.1660035849, -0.0535196885, -0.1744426489, -0.1915305853, 0.0373737514, -0.1773099601, -0.1640248597, -0.2362442464, -0.2318592966, 0.0255351868, 0.1254676282, 0.3220964968, -0.4353752732, -0.356975615, 0.1276555955, -0.3397226632, 0.0316214189, -0.2119197249, -0.2546370029, 0.1059964076, 0.3112898469, 0.1780467331, 0.0755408928, -0.3896884918, 0.1155693233, -0.2473888248, -0.0755904019, 0.0593282916, -0.3163180649, 0.1726504415, -0.0393576808, 0.0839216411, -0.0562966838, -0.1811868101, 0.2916716039, -0.2333994806, -0.171684891, 0.2062585205, 0.0019391105, -0.1965593994, 0.0024224594, -0.1196480691, -0.3280853331, -0.3669330776, 0.0012901202, -0.0777986199, 0.1852788031, 0.1442969441, -0.2602289617, -0.1182348877, 0.1143380702, -0.1334738284, -0.1536589563, -0.4095714986, 0.4874744117, -0.3722842634, -0.2143344283, -0.0219014809, -0.1756927967, 0.4781980813, 0.1308040023, -0.2284109592, -0.0028287992, -0.326936394, 0.2939240336, 0.0070024608, 0.0189225581, 0.1398833394, 0.0004283339, 0.005859118, 0.0415182635, -0.0540440194, -0.1960996687, 0.2766459882, 0.1708437353, 0.1009546965, 0.383544445, -0.1219677925, 0.1801290214, -0.0492355265, 0.3242920637, 0.5478321314, 0.0955018848, 0.0651279092, -0.0233804435, -0.4221803248, -0.0489594825, -0.05510737, 0.0486405715, 0.0079956912, -0.0325139388, -0.105156675, -0.0710557029, -0.1858095378, -0.1542176902, -0.2681567669, 0.1497887671, -0.2403447628, 0.2449389696, -0.1164386719, 0.0076544657, -0.3299107552, 0.02378539, -0.0713195875, 0.1350253969, 0.2146928608, 0.079346396, -0.1952007413, 0.3681936562, -0.4347120523, 0.0998161733, 0.3249464333, 0.7038313746, 0.0326969177, 0.0539384782, 0.0414399244, -0.047292538, -0.0577154458, -0.1116312891, 0.1558761597, 0.166696012, -0.2209490836, -0.2402214408, -0.0395986587, -0.1052685454, 0.3003041148, 0.2227609754, -0.0354339555, -0.3422703743, -0.109572649, 0.3165015876, 0.1825245172, -0.1780322194, -0.0400578901, -0.4110560715, -0.5928243399, -0.413484931, 0.0432144925, 0.2406071872, 0.4273459613, 0.3378162384, 0.1650989205, -0.2048254162, -0.2078794241, 0.2217246145, 0.3031237721, 0.0947902277, 0.0685112923, 0.0718198493, -0.2338239104, -0.394233644, 0.1363062561, 0.5306171775, 0.1089844406, -0.7092870474, -0.0784533247, -0.2032937557, 0.2511306405, 0.0598775856, -0.0541696027, 0.1121877506, -0.1826999336, 0.0938629657, 0.0437188745, 0.1091840193, 0.1448743045, 0.2128840387, -0.6021435261, -0.4522863328, 0.197188139, 0.0163847283, 0.2952747941, 0.3392182589, -0.1642778963, -0.3164371848, -0.0895482153, 0.1628365815, 0.5518426895, 0.0499162003, 0.114693366, 0.3466678858, 0.0413427204, 0.0582400821, 0.0459598377, 0.183566466, -0.2096625268, -0.2382664233, -0.0543799549, -0.0252756104, 0.1658081114, -0.0543142073, 0.0872021914, 0.2775231004, 0.0734328181, 0.0351330563, 0.245909825, 0.1984631121, -0.2746990919, -0.4539571702, -0.5819116831, 0.1532523632, -0.3220198452, -0.030998949, -0.1967274249, -0.252243489, 0.026722908, -0.2227253318, 0.0441951007, 0.2248590291, -0.1557142437, 0.273973465, -0.1650167853, -0.5444105268, 0.2062318027, 0.088070713, 0.3015839756, -0.0706012994, 0.1350810081, 0.1731300354, 0.1769681126, -0.0216342639, -0.0828448981, -0.0253755357, 0.017396884, -0.031031277, -0.2499277294, 0.0698868334, -0.0188622773, -0.3566619754, -0.2213177234, 0.2003674507, -0.0024185181, -0.0873172134, -0.205394879, -0.1993927956, 0.0175071955, -0.1896485388, 0.159420222, 0.062168099, -0.2342938185, 0.0830628723, 0.0320612416, -0.3447245359, 0.0183398277, 0.094989866, 0.1793591678, -0.4032030106, 0.5781173706, 0.1079857796, -0.0876557603, -0.1230055988, 0.0509767011, 0.1880123019, -0.5171362758, 0.0444076993, -0.0069694407, 0.0980355591, -0.1275515854, 0.0985040963, 0.0108748656, -0.0961298496, 0.1677368581, -0.4163184762, -0.5901712179, 0.1163460761, -0.1201159656, 0.2132865489, 0.0890789181, 0.1483065188, -0.1083181202, -0.0477419049, -0.304250598, 0.1132209226, -0.3167770207, 0.21988222, 0.2084022313, -0.0789640248, 0.0466105193, 0.0550281443, 0.2011432946, 0.3281203806, -0.0766396597, -0.1902382374, 0.0340616032, 0.0873119906, -0.0867041573, -0.4576305151, -0.0182356425, 0.222220391, -0.0597428717, -0.1353599429, 0.1167746484, 0.1854211986, -0.0626487285, 0.0720705241, 0.1372989267, 0.1072307304, -0.1261379123, 0.298119992, -0.2095626146, 0.4348089993, 0.038672518, 0.2651924789, 0.0883069113, 0.0721181333, -0.2311841398, -0.1048307344, 0.1180977374, 0.1814719141, 0.1432625651, -0.5272974372, 0.1788812429, 0.2601994276, -0.0461182594, 0.3760094643, -0.1835526228, -0.0165387169, 0.1208895445, 0.2417025417, -0.1411454678, -0.0686583668, 0.34402439, -0.2144441307, 0.0001064613, 0.4460253716, 0.1517321169, 0.1151360273, 0.2358345985, 0.1073318571, 0.2825605869, -0.0068991845, 0.2959390879, 0.4751642942, -0.1015861854, -0.0476526171, 0.2322842181, 0.1343571544, 0.0184181593, 0.6424043775, -0.4427740276, 0.5353501439, -0.0505042039, 0.2583875954, -0.3224719465, -0.379540801, -0.2869465351, -0.1631640494, -0.0148014948, 0.2366976142, 0.1603481323, -0.3238864839, -0.1891296506, 0.004872337, -0.0439245068, 0.1654586196, -0.2276588529, 0.1310618371, -0.0501661673, -0.0186567307, -0.1377204657, -0.0187567845, 0.0113085993, 0.1884765774, -0.0382183976, 0.2333974093, -0.1012564301, -0.0860915035, 0.1590763927, 0.2796642482, -0.0650407523, -0.264344573, 0.4634740055, 0.5010715723, -0.0114837475, -0.0209637843, 0.1890853792, 0.3574213386, 0.4347186089, -0.2235046327, 0.1034591123, 0.0009250119, 0.018582426, 0.0500134863, 0.143607676, 0.0140553694, 0.6835592389, 0.1786811054, 0.2524063587, -0.1252028048, -0.0167534426, 0.0970186666, -0.248675853, 0.0330272689, 0.2661151588, 0.1370355934, -0.0323732197, -0.2701374888, -0.0949237794, -0.2792063355, 0.0065421313, 0.3846931159, 0.021352686, 0.1060540676, -0.1315312982, 0.076378338, 0.0020455569, 0.474555403, 0.3403455019, -0.0144478064, -0.3034824133, -0.2072481811, -0.7285962105, 0.1943608373, -0.1984154433, -0.328502804, 0.249708578, -0.0827103853, -0.0733961612, 0.3360486031, 0.2181286216, 0.3987617493, 0.0736598819, 0.1313438118, -0.3173839152, -0.0350322723, 0.4439382851, 0.0782285333, -0.0843570083, -0.3402360082, 0.1098289192, 0.0742682293, 0.1089788973, -0.1935680807, -0.0207891166, -0.0690446496, -0.1324369609, 0.3674142063, 0.2805422843, 0.393017143, -0.192832768, -0.1226180643, -0.1714555025, -0.3176398575, -0.0810487643, 0.3091648519, 0.0883628279, 0.5725005269, 0.0104073659, -0.087408632, -0.6893696189, 0.3223955929, -0.1301126778, 0.0926098526, 0.0033725649, 0.1471585631, -0.0745510384, 0.0625717938, 0.0069266893, 0.1489864588, 0.0457480401, 0.4057684541, -0.1709185541, -0.5643860698, 0.396676302, -0.085588485, -0.6857156754, -0.1103915125, 0.010793563, -0.028826151, -0.0517252162, -0.3539992571, 0.3004592955, 0.2369800508, -0.0079770256, -0.1723498702, 0.2072671801, 0.0321724676, 0.0402624905, -0.0043206438, 0.446467191, -0.1106187329, -0.0629549474, 0.1378685534, -0.2023233175 ]
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.3326013684, -0.0930109471, -0.1336478889, 0.2554298043, 0.3521752954, -0.0277496055, 0.2249828577, 0.3496460915, -0.0286988318, 0.0382285863, -0.0904108435, 0.1502788216, -0.0761746913, -0.1970369518, 0.1891060621, -0.2467030734, -0.0738266259, 0.1824576557, 0.107806772, 0.0069918856, -0.3558882773, 0.1144125462, -0.1869956851, 0.2637093365, -0.377148211, 0.081082359, 0.29786551, 0.3204650879, -0.1932807714, -0.6116118431, 0.4130367339, -0.0536641702, 0.4325028658, 0.3163448572, -0.0001086042, 0.0825852603, 0.3929111362, -0.1319694072, -0.3346784115, -0.1939976066, -0.5915250182, -0.1812517345, -0.0098232478, -0.2595875263, 0.1902403086, 0.0562080927, -0.0642361939, -0.3830469251, 0.1811341643, 0.207189545, 0.2416385114, 0.3705637455, 0.0213384703, 0.0912283212, -0.0455749407, 0.1074258089, -0.154256016, 0.2494189292, 0.4346240163, 0.0627749041, -0.0191489272, 0.2926938832, -0.0486162677, 0.2481203675, -0.1023557484, 0.1306458861, 0.1399903744, -0.4660047889, 0.1134835109, 0.0036375751, 0.271874696, -0.3664451838, -0.2865586579, -0.2252657413, -0.1094699949, -0.5443437696, 0.2644949853, 0.0905639753, -0.1596594453, -0.0211322699, 0.1131592393, -0.0423873141, -0.1735193133, 0.0391210876, 0.0543595105, 0.3878185451, -0.0600739494, -0.0513226353, -0.094175905, -0.1786021441, 0.4082850218, -0.1458788216, -0.1436939538, 0.3246292174, -0.2863638997, 0.0724222213, -0.0550466552, -0.3371772468, 0.0668165535, -0.0463101231, -0.0788231716, 0.274479419, -0.0495553464, 0.0531956963, 0.309307009, 0.1556755304, 0.2095073611, 0.2245568782, 0.1834985912, 0.1982242316, 0.0829442292, -0.001205144, -0.1758537889, -0.1771316677, 0.3654840589, 0.1934715807, 0.5531743169, -0.3191606104, -0.1221154183, 0.0084837824, 0.172885254, -0.1787238121, 0.0444036722, 0.0144085083, 0.222330898, 0.5070413351, -0.2224070132, 0.2185738981, -0.4622747004, -0.1283477694, -0.1358896047, 0.1796100736, -0.1460786313, -0.0783125758, 0.0963897556, 0.1252892017, 0.163143605, -0.142241165, 0.3579080701, -0.0693806708, 0.0396496058, -0.2039280981, -0.2201955914, 0.0137814544, 0.1307830811, 0.1039624959, 0.0551503003, -0.1753353775, -0.0369681343, 0.2171098441, -0.1871832609, -0.2070105225, -0.0715536773, 0.2629821897, 0.0267737657, 0.02515365, -0.4134674966, -0.0887360722, 0.3430745006, 0.0620885417, 0.113991186, -0.2957779765, 0.0404425338, -0.085876435, 0.2037118077, 0.3430533409, -0.1321642846, 0.046463415, 0.1779044271, -0.1550113261, 0.2246280611, 0.2967450023, -0.1922279745, 0.0937532187, -0.0989212096, 0.5539205074, 0.5879890919, -0.4102401733, -0.4520796537, 0.1696789861, -0.258897543, 0.195201695, -0.1164149493, 0.1070557162, 0.3267487288, -0.1174321324, 0.3066209853, 0.6193355322, -0.1105518788, 0.1110308394, -0.2158634216, 0.024582006, 0.0014836453, 0.2785249352, 0.2359110415, -0.193820551, 0.1145047396, 0.2641795278, 0.243651554, -0.3050078452, 0.1434530616, 0.2776195109, 0.0995115042, 0.0506758019, -0.1596456617, -0.3252390027, -0.2702022791, 0.2318236679, -0.1383469105, 0.1085470021, -0.3714390397, 0.0401462018, -0.2963202596, 0.0447944179, -0.5638592243, -0.1213938668, 0.1630700529, 0.2012811452, 0.0795096159, 0.0613079667, -0.3085088134, 0.27930668, -0.1050261259, -0.0565539971, -0.599465847, 0.2591192722, -0.067492947, -0.3134036064, -0.0747861788, 0.3225339353, 0.0828683451, -0.1350196302, -0.3367394805, 0.2787976861, -0.0855250806, 0.0143845417, 0.0664438978, -0.1704663783, 0.2425209582, -0.4210941792, 0.1616298556, 0.0719257593, 0.1278538555, 0.0151309669, 0.1468041837, 0.3288505077, 0.0096399682, 0.000221137, -0.0022294521, -0.0426438078, 0.4274255633, -0.0020318553, 0.0864699557, -0.2572606206, 0.233975172, -0.0238234326, 0.1626574695, -0.0563809276, -0.1947320104, -0.0884142295, 0.5688616037, -0.136572212, 0.196163848, 0.127199471, -0.0223116502, 0.0912191421, -0.0803106427, 0.0161399096, 0.2614566982, 0.0181957036, 0.0555704683, 0.0068810172, 0.1075891703, 0.0290952772, 0.1412385106, -0.0843671709, -0.086413525, -0.0710773617, -0.0867036581, -0.0300664604, -0.3335584998, -0.1923587173, -0.1055370569, 0.3316011429, -0.1660035849, -0.0535196885, -0.1744426489, -0.1915305853, 0.0373737514, -0.1773099601, -0.1640248597, -0.2362442464, -0.2318592966, 0.0255351868, 0.1254676282, 0.3220964968, -0.4353752732, -0.356975615, 0.1276555955, -0.3397226632, 0.0316214189, -0.2119197249, -0.2546370029, 0.1059964076, 0.3112898469, 0.1780467331, 0.0755408928, -0.3896884918, 0.1155693233, -0.2473888248, -0.0755904019, 0.0593282916, -0.3163180649, 0.1726504415, -0.0393576808, 0.0839216411, -0.0562966838, -0.1811868101, 0.2916716039, -0.2333994806, -0.171684891, 0.2062585205, 0.0019391105, -0.1965593994, 0.0024224594, -0.1196480691, -0.3280853331, -0.3669330776, 0.0012901202, -0.0777986199, 0.1852788031, 0.1442969441, -0.2602289617, -0.1182348877, 0.1143380702, -0.1334738284, -0.1536589563, -0.4095714986, 0.4874744117, -0.3722842634, -0.2143344283, -0.0219014809, -0.1756927967, 0.4781980813, 0.1308040023, -0.2284109592, -0.0028287992, -0.326936394, 0.2939240336, 0.0070024608, 0.0189225581, 0.1398833394, 0.0004283339, 0.005859118, 0.0415182635, -0.0540440194, -0.1960996687, 0.2766459882, 0.1708437353, 0.1009546965, 0.383544445, -0.1219677925, 0.1801290214, -0.0492355265, 0.3242920637, 0.5478321314, 0.0955018848, 0.0651279092, -0.0233804435, -0.4221803248, -0.0489594825, -0.05510737, 0.0486405715, 0.0079956912, -0.0325139388, -0.105156675, -0.0710557029, -0.1858095378, -0.1542176902, -0.2681567669, 0.1497887671, -0.2403447628, 0.2449389696, -0.1164386719, 0.0076544657, -0.3299107552, 0.02378539, -0.0713195875, 0.1350253969, 0.2146928608, 0.079346396, -0.1952007413, 0.3681936562, -0.4347120523, 0.0998161733, 0.3249464333, 0.7038313746, 0.0326969177, 0.0539384782, 0.0414399244, -0.047292538, -0.0577154458, -0.1116312891, 0.1558761597, 0.166696012, -0.2209490836, -0.2402214408, -0.0395986587, -0.1052685454, 0.3003041148, 0.2227609754, -0.0354339555, -0.3422703743, -0.109572649, 0.3165015876, 0.1825245172, -0.1780322194, -0.0400578901, -0.4110560715, -0.5928243399, -0.413484931, 0.0432144925, 0.2406071872, 0.4273459613, 0.3378162384, 0.1650989205, -0.2048254162, -0.2078794241, 0.2217246145, 0.3031237721, 0.0947902277, 0.0685112923, 0.0718198493, -0.2338239104, -0.394233644, 0.1363062561, 0.5306171775, 0.1089844406, -0.7092870474, -0.0784533247, -0.2032937557, 0.2511306405, 0.0598775856, -0.0541696027, 0.1121877506, -0.1826999336, 0.0938629657, 0.0437188745, 0.1091840193, 0.1448743045, 0.2128840387, -0.6021435261, -0.4522863328, 0.197188139, 0.0163847283, 0.2952747941, 0.3392182589, -0.1642778963, -0.3164371848, -0.0895482153, 0.1628365815, 0.5518426895, 0.0499162003, 0.114693366, 0.3466678858, 0.0413427204, 0.0582400821, 0.0459598377, 0.183566466, -0.2096625268, -0.2382664233, -0.0543799549, -0.0252756104, 0.1658081114, -0.0543142073, 0.0872021914, 0.2775231004, 0.0734328181, 0.0351330563, 0.245909825, 0.1984631121, -0.2746990919, -0.4539571702, -0.5819116831, 0.1532523632, -0.3220198452, -0.030998949, -0.1967274249, -0.252243489, 0.026722908, -0.2227253318, 0.0441951007, 0.2248590291, -0.1557142437, 0.273973465, -0.1650167853, -0.5444105268, 0.2062318027, 0.088070713, 0.3015839756, -0.0706012994, 0.1350810081, 0.1731300354, 0.1769681126, -0.0216342639, -0.0828448981, -0.0253755357, 0.017396884, -0.031031277, -0.2499277294, 0.0698868334, -0.0188622773, -0.3566619754, -0.2213177234, 0.2003674507, -0.0024185181, -0.0873172134, -0.205394879, -0.1993927956, 0.0175071955, -0.1896485388, 0.159420222, 0.062168099, -0.2342938185, 0.0830628723, 0.0320612416, -0.3447245359, 0.0183398277, 0.094989866, 0.1793591678, -0.4032030106, 0.5781173706, 0.1079857796, -0.0876557603, -0.1230055988, 0.0509767011, 0.1880123019, -0.5171362758, 0.0444076993, -0.0069694407, 0.0980355591, -0.1275515854, 0.0985040963, 0.0108748656, -0.0961298496, 0.1677368581, -0.4163184762, -0.5901712179, 0.1163460761, -0.1201159656, 0.2132865489, 0.0890789181, 0.1483065188, -0.1083181202, -0.0477419049, -0.304250598, 0.1132209226, -0.3167770207, 0.21988222, 0.2084022313, -0.0789640248, 0.0466105193, 0.0550281443, 0.2011432946, 0.3281203806, -0.0766396597, -0.1902382374, 0.0340616032, 0.0873119906, -0.0867041573, -0.4576305151, -0.0182356425, 0.222220391, -0.0597428717, -0.1353599429, 0.1167746484, 0.1854211986, -0.0626487285, 0.0720705241, 0.1372989267, 0.1072307304, -0.1261379123, 0.298119992, -0.2095626146, 0.4348089993, 0.038672518, 0.2651924789, 0.0883069113, 0.0721181333, -0.2311841398, -0.1048307344, 0.1180977374, 0.1814719141, 0.1432625651, -0.5272974372, 0.1788812429, 0.2601994276, -0.0461182594, 0.3760094643, -0.1835526228, -0.0165387169, 0.1208895445, 0.2417025417, -0.1411454678, -0.0686583668, 0.34402439, -0.2144441307, 0.0001064613, 0.4460253716, 0.1517321169, 0.1151360273, 0.2358345985, 0.1073318571, 0.2825605869, -0.0068991845, 0.2959390879, 0.4751642942, -0.1015861854, -0.0476526171, 0.2322842181, 0.1343571544, 0.0184181593, 0.6424043775, -0.4427740276, 0.5353501439, -0.0505042039, 0.2583875954, -0.3224719465, -0.379540801, -0.2869465351, -0.1631640494, -0.0148014948, 0.2366976142, 0.1603481323, -0.3238864839, -0.1891296506, 0.004872337, -0.0439245068, 0.1654586196, -0.2276588529, 0.1310618371, -0.0501661673, -0.0186567307, -0.1377204657, -0.0187567845, 0.0113085993, 0.1884765774, -0.0382183976, 0.2333974093, -0.1012564301, -0.0860915035, 0.1590763927, 0.2796642482, -0.0650407523, -0.264344573, 0.4634740055, 0.5010715723, -0.0114837475, -0.0209637843, 0.1890853792, 0.3574213386, 0.4347186089, -0.2235046327, 0.1034591123, 0.0009250119, 0.018582426, 0.0500134863, 0.143607676, 0.0140553694, 0.6835592389, 0.1786811054, 0.2524063587, -0.1252028048, -0.0167534426, 0.0970186666, -0.248675853, 0.0330272689, 0.2661151588, 0.1370355934, -0.0323732197, -0.2701374888, -0.0949237794, -0.2792063355, 0.0065421313, 0.3846931159, 0.021352686, 0.1060540676, -0.1315312982, 0.076378338, 0.0020455569, 0.474555403, 0.3403455019, -0.0144478064, -0.3034824133, -0.2072481811, -0.7285962105, 0.1943608373, -0.1984154433, -0.328502804, 0.249708578, -0.0827103853, -0.0733961612, 0.3360486031, 0.2181286216, 0.3987617493, 0.0736598819, 0.1313438118, -0.3173839152, -0.0350322723, 0.4439382851, 0.0782285333, -0.0843570083, -0.3402360082, 0.1098289192, 0.0742682293, 0.1089788973, -0.1935680807, -0.0207891166, -0.0690446496, -0.1324369609, 0.3674142063, 0.2805422843, 0.393017143, -0.192832768, -0.1226180643, -0.1714555025, -0.3176398575, -0.0810487643, 0.3091648519, 0.0883628279, 0.5725005269, 0.0104073659, -0.087408632, -0.6893696189, 0.3223955929, -0.1301126778, 0.0926098526, 0.0033725649, 0.1471585631, -0.0745510384, 0.0625717938, 0.0069266893, 0.1489864588, 0.0457480401, 0.4057684541, -0.1709185541, -0.5643860698, 0.396676302, -0.085588485, -0.6857156754, -0.1103915125, 0.010793563, -0.028826151, -0.0517252162, -0.3539992571, 0.3004592955, 0.2369800508, -0.0079770256, -0.1723498702, 0.2072671801, 0.0321724676, 0.0402624905, -0.0043206438, 0.446467191, -0.1106187329, -0.0629549474, 0.1378685534, -0.2023233175 ]
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.3326013684, -0.0930109471, -0.1336478889, 0.2554298043, 0.3521752954, -0.0277496055, 0.2249828577, 0.3496460915, -0.0286988318, 0.0382285863, -0.0904108435, 0.1502788216, -0.0761746913, -0.1970369518, 0.1891060621, -0.2467030734, -0.0738266259, 0.1824576557, 0.107806772, 0.0069918856, -0.3558882773, 0.1144125462, -0.1869956851, 0.2637093365, -0.377148211, 0.081082359, 0.29786551, 0.3204650879, -0.1932807714, -0.6116118431, 0.4130367339, -0.0536641702, 0.4325028658, 0.3163448572, -0.0001086042, 0.0825852603, 0.3929111362, -0.1319694072, -0.3346784115, -0.1939976066, -0.5915250182, -0.1812517345, -0.0098232478, -0.2595875263, 0.1902403086, 0.0562080927, -0.0642361939, -0.3830469251, 0.1811341643, 0.207189545, 0.2416385114, 0.3705637455, 0.0213384703, 0.0912283212, -0.0455749407, 0.1074258089, -0.154256016, 0.2494189292, 0.4346240163, 0.0627749041, -0.0191489272, 0.2926938832, -0.0486162677, 0.2481203675, -0.1023557484, 0.1306458861, 0.1399903744, -0.4660047889, 0.1134835109, 0.0036375751, 0.271874696, -0.3664451838, -0.2865586579, -0.2252657413, -0.1094699949, -0.5443437696, 0.2644949853, 0.0905639753, -0.1596594453, -0.0211322699, 0.1131592393, -0.0423873141, -0.1735193133, 0.0391210876, 0.0543595105, 0.3878185451, -0.0600739494, -0.0513226353, -0.094175905, -0.1786021441, 0.4082850218, -0.1458788216, -0.1436939538, 0.3246292174, -0.2863638997, 0.0724222213, -0.0550466552, -0.3371772468, 0.0668165535, -0.0463101231, -0.0788231716, 0.274479419, -0.0495553464, 0.0531956963, 0.309307009, 0.1556755304, 0.2095073611, 0.2245568782, 0.1834985912, 0.1982242316, 0.0829442292, -0.001205144, -0.1758537889, -0.1771316677, 0.3654840589, 0.1934715807, 0.5531743169, -0.3191606104, -0.1221154183, 0.0084837824, 0.172885254, -0.1787238121, 0.0444036722, 0.0144085083, 0.222330898, 0.5070413351, -0.2224070132, 0.2185738981, -0.4622747004, -0.1283477694, -0.1358896047, 0.1796100736, -0.1460786313, -0.0783125758, 0.0963897556, 0.1252892017, 0.163143605, -0.142241165, 0.3579080701, -0.0693806708, 0.0396496058, -0.2039280981, -0.2201955914, 0.0137814544, 0.1307830811, 0.1039624959, 0.0551503003, -0.1753353775, -0.0369681343, 0.2171098441, -0.1871832609, -0.2070105225, -0.0715536773, 0.2629821897, 0.0267737657, 0.02515365, -0.4134674966, -0.0887360722, 0.3430745006, 0.0620885417, 0.113991186, -0.2957779765, 0.0404425338, -0.085876435, 0.2037118077, 0.3430533409, -0.1321642846, 0.046463415, 0.1779044271, -0.1550113261, 0.2246280611, 0.2967450023, -0.1922279745, 0.0937532187, -0.0989212096, 0.5539205074, 0.5879890919, -0.4102401733, -0.4520796537, 0.1696789861, -0.258897543, 0.195201695, -0.1164149493, 0.1070557162, 0.3267487288, -0.1174321324, 0.3066209853, 0.6193355322, -0.1105518788, 0.1110308394, -0.2158634216, 0.024582006, 0.0014836453, 0.2785249352, 0.2359110415, -0.193820551, 0.1145047396, 0.2641795278, 0.243651554, -0.3050078452, 0.1434530616, 0.2776195109, 0.0995115042, 0.0506758019, -0.1596456617, -0.3252390027, -0.2702022791, 0.2318236679, -0.1383469105, 0.1085470021, -0.3714390397, 0.0401462018, -0.2963202596, 0.0447944179, -0.5638592243, -0.1213938668, 0.1630700529, 0.2012811452, 0.0795096159, 0.0613079667, -0.3085088134, 0.27930668, -0.1050261259, -0.0565539971, -0.599465847, 0.2591192722, -0.067492947, -0.3134036064, -0.0747861788, 0.3225339353, 0.0828683451, -0.1350196302, -0.3367394805, 0.2787976861, -0.0855250806, 0.0143845417, 0.0664438978, -0.1704663783, 0.2425209582, -0.4210941792, 0.1616298556, 0.0719257593, 0.1278538555, 0.0151309669, 0.1468041837, 0.3288505077, 0.0096399682, 0.000221137, -0.0022294521, -0.0426438078, 0.4274255633, -0.0020318553, 0.0864699557, -0.2572606206, 0.233975172, -0.0238234326, 0.1626574695, -0.0563809276, -0.1947320104, -0.0884142295, 0.5688616037, -0.136572212, 0.196163848, 0.127199471, -0.0223116502, 0.0912191421, -0.0803106427, 0.0161399096, 0.2614566982, 0.0181957036, 0.0555704683, 0.0068810172, 0.1075891703, 0.0290952772, 0.1412385106, -0.0843671709, -0.086413525, -0.0710773617, -0.0867036581, -0.0300664604, -0.3335584998, -0.1923587173, -0.1055370569, 0.3316011429, -0.1660035849, -0.0535196885, -0.1744426489, -0.1915305853, 0.0373737514, -0.1773099601, -0.1640248597, -0.2362442464, -0.2318592966, 0.0255351868, 0.1254676282, 0.3220964968, -0.4353752732, -0.356975615, 0.1276555955, -0.3397226632, 0.0316214189, -0.2119197249, -0.2546370029, 0.1059964076, 0.3112898469, 0.1780467331, 0.0755408928, -0.3896884918, 0.1155693233, -0.2473888248, -0.0755904019, 0.0593282916, -0.3163180649, 0.1726504415, -0.0393576808, 0.0839216411, -0.0562966838, -0.1811868101, 0.2916716039, -0.2333994806, -0.171684891, 0.2062585205, 0.0019391105, -0.1965593994, 0.0024224594, -0.1196480691, -0.3280853331, -0.3669330776, 0.0012901202, -0.0777986199, 0.1852788031, 0.1442969441, -0.2602289617, -0.1182348877, 0.1143380702, -0.1334738284, -0.1536589563, -0.4095714986, 0.4874744117, -0.3722842634, -0.2143344283, -0.0219014809, -0.1756927967, 0.4781980813, 0.1308040023, -0.2284109592, -0.0028287992, -0.326936394, 0.2939240336, 0.0070024608, 0.0189225581, 0.1398833394, 0.0004283339, 0.005859118, 0.0415182635, -0.0540440194, -0.1960996687, 0.2766459882, 0.1708437353, 0.1009546965, 0.383544445, -0.1219677925, 0.1801290214, -0.0492355265, 0.3242920637, 0.5478321314, 0.0955018848, 0.0651279092, -0.0233804435, -0.4221803248, -0.0489594825, -0.05510737, 0.0486405715, 0.0079956912, -0.0325139388, -0.105156675, -0.0710557029, -0.1858095378, -0.1542176902, -0.2681567669, 0.1497887671, -0.2403447628, 0.2449389696, -0.1164386719, 0.0076544657, -0.3299107552, 0.02378539, -0.0713195875, 0.1350253969, 0.2146928608, 0.079346396, -0.1952007413, 0.3681936562, -0.4347120523, 0.0998161733, 0.3249464333, 0.7038313746, 0.0326969177, 0.0539384782, 0.0414399244, -0.047292538, -0.0577154458, -0.1116312891, 0.1558761597, 0.166696012, -0.2209490836, -0.2402214408, -0.0395986587, -0.1052685454, 0.3003041148, 0.2227609754, -0.0354339555, -0.3422703743, -0.109572649, 0.3165015876, 0.1825245172, -0.1780322194, -0.0400578901, -0.4110560715, -0.5928243399, -0.413484931, 0.0432144925, 0.2406071872, 0.4273459613, 0.3378162384, 0.1650989205, -0.2048254162, -0.2078794241, 0.2217246145, 0.3031237721, 0.0947902277, 0.0685112923, 0.0718198493, -0.2338239104, -0.394233644, 0.1363062561, 0.5306171775, 0.1089844406, -0.7092870474, -0.0784533247, -0.2032937557, 0.2511306405, 0.0598775856, -0.0541696027, 0.1121877506, -0.1826999336, 0.0938629657, 0.0437188745, 0.1091840193, 0.1448743045, 0.2128840387, -0.6021435261, -0.4522863328, 0.197188139, 0.0163847283, 0.2952747941, 0.3392182589, -0.1642778963, -0.3164371848, -0.0895482153, 0.1628365815, 0.5518426895, 0.0499162003, 0.114693366, 0.3466678858, 0.0413427204, 0.0582400821, 0.0459598377, 0.183566466, -0.2096625268, -0.2382664233, -0.0543799549, -0.0252756104, 0.1658081114, -0.0543142073, 0.0872021914, 0.2775231004, 0.0734328181, 0.0351330563, 0.245909825, 0.1984631121, -0.2746990919, -0.4539571702, -0.5819116831, 0.1532523632, -0.3220198452, -0.030998949, -0.1967274249, -0.252243489, 0.026722908, -0.2227253318, 0.0441951007, 0.2248590291, -0.1557142437, 0.273973465, -0.1650167853, -0.5444105268, 0.2062318027, 0.088070713, 0.3015839756, -0.0706012994, 0.1350810081, 0.1731300354, 0.1769681126, -0.0216342639, -0.0828448981, -0.0253755357, 0.017396884, -0.031031277, -0.2499277294, 0.0698868334, -0.0188622773, -0.3566619754, -0.2213177234, 0.2003674507, -0.0024185181, -0.0873172134, -0.205394879, -0.1993927956, 0.0175071955, -0.1896485388, 0.159420222, 0.062168099, -0.2342938185, 0.0830628723, 0.0320612416, -0.3447245359, 0.0183398277, 0.094989866, 0.1793591678, -0.4032030106, 0.5781173706, 0.1079857796, -0.0876557603, -0.1230055988, 0.0509767011, 0.1880123019, -0.5171362758, 0.0444076993, -0.0069694407, 0.0980355591, -0.1275515854, 0.0985040963, 0.0108748656, -0.0961298496, 0.1677368581, -0.4163184762, -0.5901712179, 0.1163460761, -0.1201159656, 0.2132865489, 0.0890789181, 0.1483065188, -0.1083181202, -0.0477419049, -0.304250598, 0.1132209226, -0.3167770207, 0.21988222, 0.2084022313, -0.0789640248, 0.0466105193, 0.0550281443, 0.2011432946, 0.3281203806, -0.0766396597, -0.1902382374, 0.0340616032, 0.0873119906, -0.0867041573, -0.4576305151, -0.0182356425, 0.222220391, -0.0597428717, -0.1353599429, 0.1167746484, 0.1854211986, -0.0626487285, 0.0720705241, 0.1372989267, 0.1072307304, -0.1261379123, 0.298119992, -0.2095626146, 0.4348089993, 0.038672518, 0.2651924789, 0.0883069113, 0.0721181333, -0.2311841398, -0.1048307344, 0.1180977374, 0.1814719141, 0.1432625651, -0.5272974372, 0.1788812429, 0.2601994276, -0.0461182594, 0.3760094643, -0.1835526228, -0.0165387169, 0.1208895445, 0.2417025417, -0.1411454678, -0.0686583668, 0.34402439, -0.2144441307, 0.0001064613, 0.4460253716, 0.1517321169, 0.1151360273, 0.2358345985, 0.1073318571, 0.2825605869, -0.0068991845, 0.2959390879, 0.4751642942, -0.1015861854, -0.0476526171, 0.2322842181, 0.1343571544, 0.0184181593, 0.6424043775, -0.4427740276, 0.5353501439, -0.0505042039, 0.2583875954, -0.3224719465, -0.379540801, -0.2869465351, -0.1631640494, -0.0148014948, 0.2366976142, 0.1603481323, -0.3238864839, -0.1891296506, 0.004872337, -0.0439245068, 0.1654586196, -0.2276588529, 0.1310618371, -0.0501661673, -0.0186567307, -0.1377204657, -0.0187567845, 0.0113085993, 0.1884765774, -0.0382183976, 0.2333974093, -0.1012564301, -0.0860915035, 0.1590763927, 0.2796642482, -0.0650407523, -0.264344573, 0.4634740055, 0.5010715723, -0.0114837475, -0.0209637843, 0.1890853792, 0.3574213386, 0.4347186089, -0.2235046327, 0.1034591123, 0.0009250119, 0.018582426, 0.0500134863, 0.143607676, 0.0140553694, 0.6835592389, 0.1786811054, 0.2524063587, -0.1252028048, -0.0167534426, 0.0970186666, -0.248675853, 0.0330272689, 0.2661151588, 0.1370355934, -0.0323732197, -0.2701374888, -0.0949237794, -0.2792063355, 0.0065421313, 0.3846931159, 0.021352686, 0.1060540676, -0.1315312982, 0.076378338, 0.0020455569, 0.474555403, 0.3403455019, -0.0144478064, -0.3034824133, -0.2072481811, -0.7285962105, 0.1943608373, -0.1984154433, -0.328502804, 0.249708578, -0.0827103853, -0.0733961612, 0.3360486031, 0.2181286216, 0.3987617493, 0.0736598819, 0.1313438118, -0.3173839152, -0.0350322723, 0.4439382851, 0.0782285333, -0.0843570083, -0.3402360082, 0.1098289192, 0.0742682293, 0.1089788973, -0.1935680807, -0.0207891166, -0.0690446496, -0.1324369609, 0.3674142063, 0.2805422843, 0.393017143, -0.192832768, -0.1226180643, -0.1714555025, -0.3176398575, -0.0810487643, 0.3091648519, 0.0883628279, 0.5725005269, 0.0104073659, -0.087408632, -0.6893696189, 0.3223955929, -0.1301126778, 0.0926098526, 0.0033725649, 0.1471585631, -0.0745510384, 0.0625717938, 0.0069266893, 0.1489864588, 0.0457480401, 0.4057684541, -0.1709185541, -0.5643860698, 0.396676302, -0.085588485, -0.6857156754, -0.1103915125, 0.010793563, -0.028826151, -0.0517252162, -0.3539992571, 0.3004592955, 0.2369800508, -0.0079770256, -0.1723498702, 0.2072671801, 0.0321724676, 0.0402624905, -0.0043206438, 0.446467191, -0.1106187329, -0.0629549474, 0.1378685534, -0.2023233175 ]
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.0888755023, 0.282379508, -0.0012339689, 0.1619003415, -0.1625476778, 0.0777331144, 0.143215999, 0.2737465203, 0.3626848161, -0.1133287996, 0.1163818166, 0.1898295283, 0.1802763939, -0.0821294039, 0.1950769126, 0.3331559896, -0.0630548149, 0.5072545409, 0.1366074532, -0.0146824569, -0.3488634229, 0.1107325777, -0.0943151265, -0.0725020841, -0.1926432401, 0.1469479203, -0.0438436568, 0.1396532357, -0.2056970447, -0.4888148308, 0.3809183836, 0.357381314, 0.2581090033, 0.4660639465, -0.0001152982, -0.0119411871, 0.2476481348, 0.0682447776, -0.5148963332, -0.3869970739, 0.0314667076, -0.5372774601, 0.3891557157, -0.1841781735, -0.1016149074, -0.0859779716, 0.1840108186, -0.0501314849, 0.5789197087, 0.2138358951, 0.1951671839, -0.1492291987, 0.0171360597, -0.0130087174, 0.1113949344, -0.2091112733, 0.1625350267, 0.3535634279, 0.1116894484, -0.2694229782, -0.2668689489, 0.0342895947, -0.2663345933, 0.2355279177, 0.2771703303, 0.008172974, 0.2694096565, -0.0516899154, 0.0297867991, -0.0389139727, 0.6603614688, -0.0337099172, -0.1231488436, -0.2626149058, 0.0286019184, -0.5128677487, 0.134692505, 0.1874416023, -0.0809471458, -0.0461170226, -0.2042675018, -0.4057559669, -0.0188117772, 0.2534579635, 0.1112426743, 0.1234548092, -0.0647202879, 0.2289224714, 0.2850900292, 0.1747082919, 0.2771390676, -0.1166695803, -0.2123604268, 0.2447838336, -0.4885704517, -0.0201186016, 0.1123058945, 0.1282075644, -0.1136159599, 0.1372917593, 0.2320875227, 0.0109714717, -0.1496882886, 0.1623384356, 0.3279625177, 0.304256916, 0.2717230022, -0.1469150037, 0.1787357032, 0.1581059247, -0.3821921349, -0.0942420736, -0.0421043709, -0.2711851597, 0.2378885746, -0.1810323149, 0.3370936811, -0.1668265909, -0.0508517809, 0.0400004163, 0.1158592105, -0.2263801396, 0.0172550231, 0.484502852, -0.1868885607, 0.1356289983, 0.1583125889, 0.0463616624, -0.5059086084, -0.1612840593, -0.089849636, -0.179877311, -0.3385739625, 0.0726505071, 0.4552690685, -0.2072426528, 0.3022791147, 0.3358884454, -0.2005400658, -0.3571423292, 0.0742675364, 0.1200318709, -0.0250847116, 0.0515104383, 0.0902633369, 0.3180947304, 0.0241421722, -0.5446963906, -0.1738616079, 0.1558586359, -0.5722794533, -0.3847286403, 0.0376880616, 0.1773883849, -0.1508340389, -0.1242487058, -0.0813756287, -0.0549608842, 0.1526691318, -0.4405649602, -0.2240803838, -0.1603151113, -0.2302431762, -0.2056118846, -0.0603129789, 0.5919474959, -0.1079871729, -0.006906487, -0.1732044369, 0.1078958139, -0.1307269335, 0.1100475341, -0.1966302395, -0.0026776902, -0.2292711735, -0.5279220343, 0.6706693769, -0.0909131989, -0.4825634062, 0.2108749151, -0.1627446413, 0.1470749527, 0.1583849341, 0.2092550248, -0.1660037041, -0.1586553454, 0.044256404, 0.2686128616, 0.1136606559, 0.0111962259, -0.134420529, -0.256192863, 0.2314465046, 0.0314550772, -0.1690053344, 0.2235099077, -0.0248484798, 0.1354252547, 0.2736139596, 0.0281257797, 0.0372867808, -0.0211750511, -0.0188251678, 0.0938782468, -0.0387784392, 0.2074217945, -0.6352769732, 0.2108052075, -0.1857465804, -0.3761023283, 0.1938496381, -0.0648837164, -0.2942897677, -0.225512445, -0.4506821632, -0.2055748105, 0.0188853964, 0.3500684798, 0.09249942, -0.10763558, -0.1527513266, 0.3722838461, -0.074382022, -0.0678527057, -0.5102145076, 0.1139070764, 0.0197451115, -0.0636627898, 0.1134542823, 0.2977808416, 0.3451761007, -0.0230161902, -0.1121132672, 0.2423190624, -0.0802448243, 0.3043352067, 0.0062471991, -0.347461462, 0.0004540719, 0.2994793355, 0.1332808137, 0.1017200947, -0.0083978549, -0.0168773085, -0.079997994, 0.3322359025, -0.0560342483, 0.3085152507, 0.0633939505, -0.167332381, 0.2275234461, -0.3927997351, 0.2067197859, -0.1777363718, 0.2628161013, 0.2479510158, 0.1953126937, 0.2646507323, -0.0829105377, 0.0650190637, 0.4671654105, -0.0469819978, -0.2923632562, 0.1642830372, -0.084117502, -0.1841214895, -0.1236987412, 0.3632375896, 0.4298816919, 0.1477509886, -0.1818333566, 0.0822672099, -0.0667827502, -0.2304427624, 0.1101650894, -0.2013237774, 0.2853396237, 0.2399768829, 0.2579444051, -0.0999963433, -0.3501328528, 0.3381070495, 0.224070102, 0.1103271246, -0.0796887651, 0.2068431079, -0.5125058889, -0.1935467124, -0.5543271303, 0.0061860867, -0.2469127476, -0.096922569, -0.0754555911, 0.6249864697, 0.2246184945, 0.1039894372, 0.0526420027, 0.3406594992, -0.1474727839, -0.3065601289, 0.0291034505, -0.3341254592, -0.3812090456, -0.0456452109, 0.2931636274, -0.0742160976, 0.2642598748, 0.0402301401, -0.1407390535, -0.2185640484, -0.1337852031, -0.0987232924, 0.1271897256, 0.2915700972, -0.1833295226, 0.1628341973, 0.138350293, -0.2592156231, 0.1522708684, -0.4241510928, -0.0251135789, 0.1721181273, -0.0859799534, 0.1537036002, -0.0118240938, -0.4226035774, -0.2225036621, -0.2736028433, 0.1390749663, 0.1597255766, 0.1519837528, 0.3598029613, -0.1087848544, -0.1524830014, -0.107198149, 0.2338399589, -0.3367554545, -0.2792285383, 0.2858324647, -0.1888988316, -0.2545827627, 0.2504898906, -0.0153041668, 0.2039727867, -0.1013495773, -0.61219877, -0.0707028583, -0.0093099736, -0.0277734548, 0.0958584696, 0.0553383604, 0.1928492188, -0.1464696974, -0.0504266433, -0.0392137729, -0.1802838147, -0.0088396557, 0.2555663288, 0.4061004221, 0.2051309049, 0.1547250301, -0.2963931859, 0.507671833, 0.3996003568, -0.1259079576, 0.410513401, -0.0076690735, 0.4529298842, -0.3399045169, -0.174312517, -0.1087412909, -0.1506913304, -0.077515766, 0.1882666945, 0.0459607951, -0.1770213991, -0.2123095095, -0.0854601488, -0.0428784899, -0.3324963152, 0.1021440476, -0.1324266791, 0.028549362, 0.4036846161, -0.2121607661, -0.2638761103, -0.4108496606, -0.3645507991, 0.3081259727, 0.085793063, 0.0269672163, -0.06448102, -0.0304784589, -0.312413007, 0.2100343555, -0.0334738158, 0.1108688414, 0.1170164049, 0.0738254189, 0.2352375388, 0.0246183686, 0.60765481, -0.0361425355, 0.1442115158, 0.1510514319, 0.056335479, -0.138602525, -0.0542583987, 0.2957322001, 0.4776973128, 0.2010523975, 0.0684836581, -0.0150317401, -0.4613935947, 0.1272090077, 0.3126031756, -0.3689418137, -0.4041791558, -0.4548127651, 0.1523554921, -0.3105370998, -0.2186831534, -0.4536338747, 0.189278394, -0.2344126403, -0.1143860891, -0.1408669502, 0.0339930579, -0.0269312263, 0.0028766692, 0.3091117442, 0.4205064476, -0.0521415547, 0.1925812364, 0.240977183, -0.1799021363, 0.4959927201, -0.0364602804, 0.0043453313, 0.0109083019, 0.0607557893, 0.2748132944, 0.2771270275, 0.0029778257, 0.153257966, -0.0888367295, -0.0954788774, -0.1706479788, -0.1272304505, 0.1746068597, -0.0192987584, -0.243047297, -0.6247794032, 0.5867569447, -0.2281982601, -0.095801644, 0.0771199316, -0.429784596, 0.0043202676, 0.3284889162, -0.3328563273, 0.7670230269, 0.0136227161, 0.2584234178, 0.0688754469, 0.085794583, 0.7262017727, -0.3534885645, 0.1585290134, -0.2406385392, 0.0268777572, 0.0671015829, -0.015693292, -0.0373699479, 0.0611010455, -0.2364811599, 0.5385798216, 0.1941298693, 0.2164648622, 0.1895297319, 0.5119621754, -0.0139746843, -0.1716060638, -0.3886812627, 0.0655357912, -0.1131618619, 0.2626152635, -0.1508741677, -0.1621663123, 0.3213566542, -0.0785243213, 0.1230566353, 0.2460944653, 0.0687524155, 0.2204848528, -0.1085442752, -0.3991333842, -0.0335053541, 0.1864880025, -0.0318299308, -0.0040572938, -0.2104966938, 0.2432617545, 0.0758460462, 0.1048813909, -0.2682757676, -0.098850131, 0.3014587462, 0.0377519801, -0.3364535868, 0.111760743, -0.1059240848, -0.4096360207, 0.1102477014, 0.331806004, 0.076540105, -0.1532813162, -0.235197708, 0.1930820346, 0.0814826488, -0.0987385884, 0.1244101971, 0.0387887247, -0.0530340262, -0.0413581431, 0.0260922462, -0.4763900936, 0.0609045178, 0.3872445822, 0.2643859982, -0.0910673067, 0.6199367046, -0.0544083491, 0.1009745449, -0.1384757459, -0.1553155184, 0.0039821714, -0.3479213417, 0.0735097751, 0.3034487963, 0.221940279, 0.3384997547, 0.0701484829, -0.1725631952, 0.1892215908, 0.0229780227, -0.4424040318, -0.2097515315, -0.1800861657, -0.2489677668, 0.1425334513, 0.3069706857, -0.0182874091, 0.1766195893, 0.4221709073, -0.2422644496, 0.217923969, 0.0363879204, 0.28371948, 0.1794680357, -0.1455037743, -0.2760012448, -0.2238449007, -0.0397574827, -0.1276073456, -0.3365157247, -0.21146667, -0.2694689631, 0.1738516837, 0.0560819767, 0.2405854464, -0.3486262262, -0.3961259127, 0.2473447472, -0.1670865119, 0.1138697267, -0.255615592, 0.0519934967, 0.056737382, 0.0273372736, 0.1373139024, -0.112686269, 0.1204756647, -0.281939894, 0.303224802, 0.1721112728, 0.026783796, -0.2301594019, 0.2022952437, -0.4627675116, -0.1068904325, -0.0496708825, 0.0468468964, 0.12885423, -0.3395737708, -0.0416401327, 0.0133724511, 0.1993757933, 0.5579794645, 0.0093697198, -0.0509723723, 0.2949977219, 0.135196805, -0.2785675228, 0.1379588395, 0.4374044538, 0.06193747, -0.0489478782, 0.127402544, 0.2259243131, -0.2998075783, 0.2056148052, 0.2648715973, 0.3571157753, -0.4329586923, 0.3450416625, 0.1510653794, 0.2942139804, -0.0452231281, 0.4577879906, 0.2673686147, -0.0011884347, 0.3178557456, -0.1151009053, -0.0553438887, 0.0897951722, 0.2091729045, -0.2968598902, -0.3625852466, 0.1096713245, 0.5631209612, -0.0496520028, 0.174513638, 0.1760574877, 0.5881572366, -0.0891447365, -0.1031949669, -0.4032123387, 0.4081044197, -0.1066975147, -0.2956743836, -0.110080108, -0.0177415386, -0.1267820746, 0.2605082691, -0.0965154767, 0.000764627, 0.0547179207, 0.1165262163, -0.2532089353, -0.6731387377, 0.1490392685, 0.0911909044, 0.0718464479, -0.1221193522, 0.3966829479, -0.1008651629, 0.0015582088, 0.1063883752, 0.1515474617, 0.298538655, 0.2616481185, -0.0261191353, 0.2150194794, 0.0984299332, -0.099065654, -0.2725053728, 0.1522102207, 0.1588629484, 0.0735250041, 0.0737250596, 0.1271310747, -0.1456319094, 0.1910413206, 0.280828774, 0.0177974738, -0.4239727259, 0.2723128796, 0.4910109639, -0.1004142091, -0.1347146034, 0.1501857787, -0.5083789229, 0.0870220587, 0.2666009963, -0.0274720676, 0.1571956724, -0.2614782155, 0.0647617429, -0.0993392095, 0.4398812354, -0.0613912754, 0.030148657, -0.2412988842, -0.2117663175, -1.0339400768, 0.1108423024, -0.0859863907, 0.0675169975, 0.0298558474, 0.1638641059, -0.1324920356, -0.019904688, -0.0333395749, -0.0068985485, 0.2087878883, -0.0633897632, -0.2428737581, -0.1244172901, 0.1882933825, 0.1633122414, -0.1582174152, -0.1272719353, 0.0362091362, -0.276917845, -0.0169719309, 0.0682014376, 0.0450560749, 0.2270132899, 0.3052159846, 0.4869486392, -0.0479955673, 0.1529431045, -0.0526887625, 0.14031142, -0.401855588, -0.1542677432, -0.1185609102, -0.2395335883, 0.0146927591, 0.2092725635, -0.3926818371, 0.398950845, -0.3408298492, 0.0581691861, -0.1670537144, -0.105088748, 0.0883126482, -0.1183828413, 0.0023445264, 0.3344601691, 0.0544684082, 0.5390547514, -0.0718650222, 0.2023704052, -0.3011861444, 0.0192574561, 0.3384817839, -0.4451622367, -0.2249622345, 0.193932265, 0.3209457994, -0.0809386969, -0.0111822179, -0.2096015513, 0.1600853205, 0.262390554, 0.0497744083, -0.171638459, 0.3985255063, -0.1940023601, 0.0339892358, -0.0756102204, 0.2051558048, 0.4144529998, -0.487888515, 0.0202208459, -0.2616915107 ]
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.1386734247, -0.1840370893, 0.1423231065, 0.2854889035, 0.3872586191, 0.073986873, 0.4242342114, 0.1544944644, -0.1818622649, 0.0088984929, -0.2541094422, 0.7546944022, -0.3429297805, -0.1627206504, -0.0087753329, -0.2707039714, -0.0224568322, -0.0999826193, 0.1635404825, 0.0048667938, -0.1239805669, 0.1710490435, -0.2978939414, -0.0645304471, -0.2080975473, -0.2048982531, -0.0015915856, 0.3980626762, 0.0651099309, -0.3406356573, 0.194550693, -0.1563013941, 0.0915548503, 0.4689867198, -0.0001217698, -0.038224645, 0.1266160905, -0.2294036448, -0.4221751392, -0.1044334844, 0.4167321324, -0.1648720056, 0.2794100344, -0.3884230852, -0.0467772074, 0.1305866092, 0.014289245, -0.3021169603, 0.1780148298, 0.099178344, 0.1452195942, 0.6736465096, 0.0289199352, -0.0280882288, 0.2441469133, 0.164182812, -0.2486749589, 0.2910863757, 0.1041372418, 0.0843059868, -0.1918401122, 0.0632600039, -0.3168002963, -0.1475129426, 0.1134289801, -0.0622913539, -0.6752684712, -0.2057638168, 0.2055128664, 0.1767499596, 0.2703269422, -0.3025209904, -0.3350050747, -0.1799493134, 0.1947435141, -0.3114592731, 0.1561124176, 0.3004491925, -0.1158857942, -0.0864390433, -0.145692572, -0.0299984179, 0.0258901119, 0.2111267745, 0.4304870069, -0.0353297926, -0.0998983979, 0.3880560994, 0.0998012349, -0.0481593125, 0.0078426637, -0.1047173291, 0.1041183472, 0.0092724226, -0.2710997164, 0.0964372009, -0.0364200361, -0.0696300343, -0.0793859884, 0.3811099231, 0.5383774042, 0.1145915389, 0.2311056405, 0.2259287238, 0.212776497, 0.0571258739, 0.255436182, 0.345038265, 0.0177326668, -0.3164452016, -0.0845253542, 0.0598806441, 0.1468532681, -0.2113459706, 0.1873696744, 0.0921168774, 0.0115664154, -0.0737664476, -0.2611569166, -0.0732762963, -0.116481103, -0.22302863, -0.0387121662, 0.152158469, -0.0074688345, 0.0885711908, 0.0037148297, 0.3209426999, -0.3440076113, -0.0227743909, -0.0524148047, 0.0857812166, -0.1722242236, -0.0538867675, 0.3327814937, -0.4329434335, 0.2967665792, -0.0294855107, -0.1854740083, -0.0706737563, -0.0606143884, -0.2570723295, 0.199428618, -0.1585469842, 0.2861681283, 0.1599565744, 0.1073981524, 0.0266732723, -0.0570049658, 0.1278260499, -0.2086871713, -0.2174160182, -0.2217048556, 0.0641507581, -0.1422486603, -0.1611874998, -0.1856592, -0.0741370916, 0.1521247774, -0.1553197354, 0.1956333071, -0.1929910481, -0.1605008692, -0.3936679363, 0.0562321618, 0.3869013786, -0.2387968898, -0.1330621541, 0.4711276591, -0.1688482016, 0.1827653646, 0.2557332516, -0.203845948, 0.2076241374, -0.2920519114, 0.1300198585, 0.5466674566, -0.4901282191, -0.293579042, 0.1681381613, 0.0104873851, 0.0890493989, -0.0081726313, 0.1268036366, 0.0117185079, -0.0303255394, 0.1082633287, 0.359254837, -0.0240153503, -0.192045331, -0.3910907507, -0.0672135055, 0.5623108149, 0.1039693579, -0.0450834334, 0.0051227696, 0.1489915401, 0.1643621027, 0.2806614637, -0.1335192174, 0.0790415779, 0.2275403887, 0.0479258224, -0.0479301102, -0.0614271797, -0.1117487624, -0.7583847642, 0.1425739527, -0.4217590392, -0.2041574717, 0.0460042246, 0.0194342732, -0.0096860006, -0.2699629664, -0.4672888219, -0.2535906732, -0.070194684, 0.0350564569, -0.0027191862, -0.1018663794, -0.2882671058, -0.05869966, 0.0170733929, 0.094950214, -0.4358219504, 0.03511177, -0.1008361802, -0.6016010046, 0.0788973719, 0.3346043229, 0.1992218941, -0.2135370076, -0.1547771543, 0.5112805367, -0.1878476143, 0.0458428562, -0.0911481827, -0.3962244987, -0.0257682055, -0.3873719573, -0.1387776136, 0.305742681, 0.1651028097, -0.1439481825, -0.4406920373, 0.473977387, -0.1370309442, -0.0694069713, 0.142831251, -0.1771286875, -0.0402117707, -0.1298947185, -0.085023433, -0.007480979, 0.0441753492, 0.2500825226, 0.4493282437, -0.059943825, -0.4387772083, -0.0666085929, 0.2690036893, 0.1827787161, 0.1510509402, 0.0907959118, -0.0865505636, -0.1462571323, -0.0994366556, -0.5965251327, 0.4699760079, 0.007956326, -0.0964354575, -0.0773338526, 0.1617987454, -0.1623530984, 0.0246823505, 0.0292417612, 0.0215615369, 0.5249427557, 0.3105399609, 0.1777420044, -0.3436541259, 0.0938977376, -0.008297652, -0.0154360728, -0.228729099, 0.2008439153, -0.2161110342, -0.0077680498, -0.2932494581, 0.0225312784, -0.4134548008, -0.2659108937, -0.0204124004, 0.4188211262, 0.1691662222, 0.21319215, 0.0327043608, 0.0886700079, 0.1502598375, -0.287394464, 0.0878555775, -0.1656797826, -0.1369887888, -0.0366177298, 0.0988966078, -0.1391299069, 0.5425938368, 0.2488514483, 0.0985454619, -0.2540009022, 0.1322932839, 0.198636651, 0.0405144729, 0.0283314791, 0.1583033353, 0.0773256645, -0.2481867373, -0.266453594, 0.291187048, -0.1191451997, -0.1861180663, 0.0801184773, 0.0109011605, -0.0224563368, -0.0050233677, -0.6097725034, -0.2246842682, -0.2241443247, 0.2270318866, -0.0491175726, 0.0815525949, 0.1741750538, 0.004866045, 0.2601940334, 0.0624347888, -0.100180082, -0.0126523282, -0.2533333898, 0.2158101052, -0.1460838765, -0.4376559258, 0.0273984969, 0.0929992944, -0.1016624719, 0.1142239496, -0.0406721756, 0.0233941339, 0.1410517246, 0.2924294472, -0.2655848861, 0.1149232462, 0.3443347514, 0.0430166982, 0.0778844729, -0.0306632146, -0.2457074821, 0.0596971139, 0.1554532498, 0.3513271809, -0.0206241384, 0.0392362811, 0.1629589647, 0.861915946, 0.1855263412, -0.2794867456, 0.3941234052, -0.0292289704, 0.2752986252, -0.2377856225, -0.4469311237, 0.4460182488, -0.1733704507, 0.3204525411, 0.0607322343, -0.2573389113, -0.0113224443, -0.0635862425, 0.2717906237, -0.1492319703, -0.2496079504, 0.2806573808, -0.238517493, 0.1049524397, -0.1814575195, 0.2275059223, -0.0711084306, -0.3509440124, -0.0032614172, 0.1643670797, 0.4109750092, 0.1616706848, -0.4156160653, 0.0040466711, -0.4042150974, 0.3957032859, 0.1615813971, 0.4010527134, -0.0990791842, -0.2193684876, 0.1332553923, 0.118100062, 0.4137418568, 0.009663282, -0.0607226267, 0.3061224222, -0.1628254354, -0.5174531937, 0.0127817094, 0.0220165923, 0.4153405428, 0.1618515998, 0.2548160553, -0.138851732, -0.1510861814, 0.1636001915, 0.3699420691, -0.1934058368, -0.1140026897, -0.0574988462, -0.1429004818, -0.4427393079, -0.0616740733, -0.085310556, 0.2670449018, -0.0017048009, 0.2492302358, -0.1672134548, -0.210950166, 0.0936306566, -0.3807401657, 0.2851107121, -0.0029863007, 0.0652358979, 0.023420535, 0.4080888033, 0.0373502448, 0.2515793443, -0.2945906818, 0.2742486298, 0.1988429129, -0.0704242736, 0.1691574156, 0.237221688, 0.0521401837, 0.1120989174, -0.3705204725, -0.0667932332, 0.1262661964, -0.0717885122, 0.0833371207, -0.3304264247, -0.2719470561, -0.0292310454, 0.2321579456, 0.0300721899, 0.2362704724, 0.1166314483, -0.5146977305, -0.0924152955, 0.5315946937, 0.0563530028, 0.9179930687, -0.1772384644, 0.3260868788, -0.0321263708, 0.1401226223, 0.2217608392, 0.0599846989, 0.1831361949, -0.543037951, 0.1856838763, 0.0739595667, -0.0524220876, 0.0743603706, 0.1941401362, -0.1064024493, 0.354927808, -0.2108065337, 0.0285264291, -0.1503784955, 0.3296601474, 0.0767174363, -0.2352468073, -0.2108257413, 0.0077416338, -0.2141861469, 0.4785352647, 0.1097308248, -0.0900828466, 0.0994526297, -0.1806673408, -0.086374782, 0.1381824464, -0.1973130852, 0.5574910045, 0.1291612387, -0.8781003952, -0.0591265671, 0.6718177795, -0.0118319392, -0.2320772111, 0.0549749583, 0.1600877345, 0.2959394455, -0.1229823157, -0.2097710669, 0.1190073341, 0.4859684706, -0.0989250839, 0.0646487772, 0.1770045161, -0.1137924194, -0.3283298612, -0.1556127667, 0.2993593216, 0.3328756988, -0.4707869887, -0.4273251295, -0.2204253972, -0.236456722, -0.1510200799, -0.021564614, 0.0950373933, 0.1787852347, 0.1700584292, 0.1484197527, -0.1462187916, 0.0156765506, 0.8382954597, -0.2344839275, -0.3432262838, 0.552618742, 0.2660031319, -0.1367073655, -0.2085972726, 0.1926609874, 0.000745777, -0.3280693591, 0.125088349, -0.0769782811, 0.3351721168, 0.1462389827, 0.2212703824, -0.0975730419, -0.0387974381, 0.0120824724, -0.0563087724, -0.4843291938, -0.1846660674, 0.1859749407, 0.0648801774, 0.0486842096, 0.4098497927, 0.3081648052, 0.0342074335, -0.1843405068, 0.3117743134, -0.030765634, 0.2121687382, 0.4773921371, -0.1358636916, -0.0903608948, -0.0063375942, 0.0305295885, 0.0770381913, -0.1119333357, -0.144726783, -0.2219721079, 0.1734953523, 0.1860113144, -0.2156839669, -0.2647043169, -0.0095412582, 0.1922618896, -0.2260737717, 0.1810254604, 0.3889678121, 0.0224126223, 0.1593826711, -0.2167814076, 0.2523556352, -0.0527838916, -0.0752292275, -0.1053138301, 0.1062316075, 0.1237955838, -0.0736683309, 0.0280341916, -0.0351498351, -0.2667634785, -0.1414224654, 0.4792149961, 0.2084566802, 0.0186065212, -0.3838416338, -0.0946762636, -0.3431564867, 0.0114347115, 0.1630901843, -0.2923072278, -0.1363119036, 0.1053910553, 0.0154875871, 0.0025633872, 0.0211568736, 0.2502374351, 0.0474842228, -0.0992152989, 0.0905930996, -0.0050883889, 0.0905450284, -0.2394497544, 0.0969279706, 0.2744242251, -0.3339271843, 0.1398561895, 0.1069496125, 0.0865373611, -0.0021409653, 0.1351286471, -0.1257364154, 0.2360788584, 0.1482804567, -0.0117648952, 0.6780449748, 0.1148018539, 0.0790782049, 0.2390660048, -0.4852782488, -0.2917051911, -0.0672671944, 0.2548887134, 0.3690400124, 0.0166795701, 0.8710458279, -0.4937480688, -0.448451817, 0.2343616188, 0.5710668564, -0.1630053073, -0.2334979326, -0.1191925928, -0.0569721833, 0.0392915606, 0.2150212824, -0.4183962643, 0.194118619, 0.2040621936, 0.2310217917, -0.2608080804, -0.1571813077, 0.0455934554, 0.0524486341, 0.0539756194, 0.0109284222, -0.0749023259, -0.0152897127, -0.0038119685, -0.0421993732, 0.2800781727, 0.2520419359, 0.2627362311, -0.2105845362, 0.0034328476, 0.0593672432, 0.1137891039, 0.0121133178, -0.0418465771, -0.0237417631, -0.2986749709, 0.3994521499, 0.0088036135, -0.0923209786, 0.0307798609, 0.263725698, 0.1043348983, -0.1144670993, -0.0061396211, -0.0696774274, -0.391443193, -0.2446208, -0.0146357976, -0.098090902, 0.09523049, 0.2605695426, 0.4064267576, 0.1591133624, -0.0513000712, 0.04664772, 0.0826471224, 0.5026728511, 0.1973204911, -0.4350137711, -0.2800350189, 0.1274706125, -0.4370200336, 0.0792031214, 0.1688423604, 0.1076080278, -0.0158124659, 0.2462878823, -0.0497192107, 0.1373991668, -0.0568728447, -0.0229410492, 0.4012257457, 0.3032234907, -0.3561687768, -0.0688744858, -0.1765711904, 0.1089241952, 0.1225907803, -0.3322435021, -0.0499975309, 0.1990321726, 0.0644452497, -0.3312883079, -0.5067590475, 0.0539676249, 0.2614978254, 0.2660625875, -0.0659694448, 0.3709569275, -0.0439626724, -0.3260211349, 0.0345068574, -0.1666183472, 0.1727513373, 0.1132422835, 0.1573903561, 0.4533778429, 0.016114518, 0.1369046122, -0.4455272853, 0.5350667238, -0.0519479476, 0.1240376681, -0.1002100706, 0.1667047888, 0.0770303905, 0.2301460207, 0.0832028985, 0.5846358538, -0.1828309596, 0.3271815777, -0.6916028857, -0.3220061064, 0.5005270243, -0.2176021039, -0.1631494462, 0.0246394537, 0.1323575079, 0.2069167495, 0.1832205206, -0.6202582717, -0.0762674212, 0.2132002115, -0.242644459, -0.1637170315, -0.0185502544, -0.3184690475, -0.0223403871, 0.058058843, 0.3536972106, 0.2758465409, -0.0369550176, 0.0476077422, -0.1522230953 ]
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.0365024209, -0.1409250796, -0.0793721825, -0.1369621158, -0.1559907347, -0.3242331147, -0.1591327339, 0.1821869612, -0.3461934924, 0.0158341527, -0.0663877875, 0.3206755817, -0.1125185788, -0.044296585, 0.0447907224, -0.2458747029, 0.247595638, 0.4139316678, 0.1482367516, -0.1551827192, -0.0532763153, 0.2191117406, -0.2554684281, 0.0467050783, -0.4506121278, 0.1217017099, -0.4123180211, -0.26256001, -0.153648749, -0.5197574496, 0.4782426953, 0.1243591383, 0.267840147, 0.0743238851, -0.0001179494, -0.0224403143, 0.572715044, 0.0642090291, -0.1099308133, 0.1077397764, 0.045059137, -0.0126229897, 0.5089784861, -0.0682090074, -0.0491529256, -0.3134191036, 0.2057965249, 0.5061593652, 0.337870568, 0.067518793, 0.1206032038, -0.0178222246, 0.3498014808, -0.021093348, 0.4944709539, 0.1088030636, -0.1879489422, -0.0602933206, 0.4111688733, 0.0164821446, -0.0369281359, 0.0635465086, 0.1623756438, -0.2319166362, 0.116910249, 0.2194075584, 0.1412901282, -0.3700341582, -0.0103811203, 0.1250047088, 0.2487776279, -0.1683011204, -0.4690060019, -0.1358831078, 0.0131441541, -0.355420053, 0.3728210926, -0.2848746777, -0.1211848408, 0.1636746824, -0.0299987793, -0.2509263158, -0.1611309499, 0.3247070312, -0.1813230515, 0.5299854279, 0.0605143905, -0.254072845, 0.2310194373, -0.2415743768, 0.1807146221, 0.1000639796, 0.0172251221, 0.3674335778, -0.1381929666, -0.277477026, 0.2277396172, 0.1133943349, -0.1607003212, 0.0322506204, -0.4091063142, 0.1459733099, 0.1459762305, 0.0879992843, -0.1691192687, 0.2571030259, 0.1085833386, -0.0899460912, 0.2458999008, -0.4051270783, 0.1125743836, 0.1378308982, 0.046692837, 0.1622927487, -0.3634467125, -0.3564538062, -0.154892534, -0.1499219835, 0.0551365241, -0.2625106573, -0.2247930318, -0.3351934552, -0.1180677116, 0.297842592, 0.125329569, -0.3970761001, 0.0724130273, 0.1841657907, -0.1341166496, 0.0026784763, -0.064086698, -0.1569981128, -0.1755443662, 0.2645494342, 0.2724644542, -0.3028465211, 0.1628208905, -0.1974896193, -0.2274578512, 0.2945098281, -0.2795907259, 0.1216633618, -0.0080272704, 0.225805223, -0.1684638262, -0.1023586839, -0.4655604959, -0.1620363891, -0.2403616458, 0.0633196682, -0.0646848232, -0.2811251283, -0.3323860765, 0.115372926, -0.2723725736, -0.2752394974, 0.3653648496, 0.6273091435, -0.1054335982, -0.1463752538, 0.0370824672, 0.1117180437, 0.2649065256, -0.0908317268, 0.1279013306, -0.0669748709, -0.239274174, -0.3873826265, -0.1192889884, 0.1379835606, 0.0270554982, 0.2212779522, -0.2794341445, 0.2451287806, 0.029138796, 0.5474949479, 0.6518900394, -0.2099924684, -0.127574712, 0.0607611649, 0.1220452935, -0.2443281114, -0.002263695, -0.1838946939, 0.1356989145, -0.0307520162, -0.0200370662, 0.2575928271, 0.0576003343, -0.3025503159, -0.2730574012, -0.3634371758, 0.327467382, 0.37708202, 0.1571436524, -0.079503566, 0.2327451706, -0.3032671809, -0.0990577936, -0.0700982064, -0.0342255123, 0.1696012765, 0.1677805334, 0.0799392462, 0.326069206, -0.2400516123, -0.1048387811, -0.0388666838, -0.6121017933, 0.553406775, -0.1013177931, 0.0261405781, 0.0357755944, 0.0137109086, 0.0058048386, -0.3206298351, 0.0161505491, -0.1123406738, 0.2814391553, 0.1460613906, -0.3020930886, -0.0639567077, 0.3813223243, 0.0859741122, -0.2923623621, 0.4071858823, -0.2209589928, -0.5338461399, 0.0497611165, 0.2604353428, 0.0968717933, -0.1464818716, -0.0170065556, 0.1078795269, -0.3001841903, -0.1210721061, 0.2546690106, 0.1851669997, 0.2065511644, -0.4720923901, 0.0112440232, 0.0818918645, -0.0036513731, -0.0161533281, -0.0921352059, 0.2416182309, 0.4846396148, 0.0955205709, 0.2377485484, -0.1293535084, 0.2788258791, -0.1929997206, 0.0459288657, 0.0898495167, 0.15394032, -0.0809655041, 0.2004221529, 0.0485230163, -0.2047703564, 0.1411315203, 0.2866161466, -0.2145593911, 0.033678934, 0.5055498481, -0.20395872, -0.2953153551, 0.0027818978, -0.4623140991, 0.2144080698, 0.3736827672, -0.091890581, -0.1253005266, -0.2086354792, -0.2770304978, 0.2586471438, 0.09222918, -0.0739520863, -0.0727837384, 0.3840744793, 0.1688700318, -0.2430409491, -0.4180778265, -0.0768430531, -0.0994062722, -0.0273019299, -0.0034205168, -0.2512784302, -0.4178160429, 0.0691035092, -0.1639867127, -0.4351184666, -0.199075982, 0.4360972941, -0.2216427475, -0.067354776, 0.473299861, 0.1288900971, 0.2370727658, -0.1431439221, 0.0071053784, -0.4106119275, -0.2103326321, -0.5618729591, 0.0192083642, -0.1001335233, 0.2254371792, 0.0012147315, 0.0646457747, 0.2162147015, 0.2121964246, -0.7024002671, 0.3988602459, -0.0864367485, 0.2627844512, -0.1488776803, -0.5324485302, -0.2267729044, -0.4946581721, 0.0077943541, -0.1952162981, -0.1020658165, 0.0882288814, -0.0602556579, -0.2269310951, -0.109034352, -0.3814075589, -0.52807796, -0.1570463181, 0.2040131539, -0.0679100752, 0.107389316, 0.3181124628, -0.050650619, 0.1100220084, -0.2128945887, 0.0045777224, -0.0235254578, 0.3745415211, 0.6374520063, -0.0600388534, -0.3186363578, -0.2763059735, -0.3181282282, -0.0593606792, 0.1465307325, -0.1140687838, 0.1144092306, -0.2133481354, 0.0933075994, 0.2897820473, 0.2270317078, 0.5762736201, 0.1408127546, -0.1108591706, 0.057163015, -0.24298352, 0.1431852877, 0.1934713125, 0.3914710581, -0.1920498312, -0.058186356, -0.2578212917, 0.7521790266, -0.1656470597, -0.3004692793, 0.3863742352, 0.0796524659, 0.123576723, 0.0249825306, -0.1162037998, 0.2011024803, 0.0311030373, 0.0922007859, 0.4274142981, 0.060024213, -0.7173541188, -0.2091355026, -0.0713736564, -0.3607711792, -0.0738183409, 0.0101715233, 0.2364367098, 0.3325143158, -0.0094523504, 0.0543701798, -0.1251544654, -0.2496008128, 0.0913428441, 0.0156432688, 0.04759527, -0.1001980007, 0.0703956187, -0.3965112865, -0.2799776793, 0.3130533993, 0.2775231898, 0.1295530498, -0.0985507891, 0.0140920058, 0.3031613231, 0.0464341678, 0.4732938707, -0.0971068665, -0.2817873955, 0.3034757376, 0.1876392812, -0.363434732, -0.0693610236, -0.4106263518, 0.1294399798, 0.4587595463, 0.2216700912, -0.2273667157, -0.0255947504, 0.114629522, -0.3202496767, -0.1248119622, -0.3508262634, -0.1368910521, -0.1614024043, -0.0480225831, 0.0086913817, -0.0388684459, 0.1223485917, -0.1172249094, -0.1230457574, -0.1439420134, -0.0151908025, -0.0530878305, 0.3789566755, -0.0107015315, -0.2664446831, 0.0614038929, 0.1220489293, -0.0638589412, 0.0691425651, 0.0667539909, 0.1088242531, 0.055057954, 0.2126852125, 0.0544390306, 0.4107651114, 0.2898605466, 0.0406302884, 0.3420211971, -0.1964227557, 0.0381480232, -0.0950252414, -0.1867623925, 0.3242316842, -0.0163462907, -0.0734036565, 0.1530241668, 0.6108984351, 0.0410073251, -0.2492135912, -0.2941953838, 0.494892925, -0.2021752894, 0.9087721109, 0.0170327462, 1.1333745718, 0.13969253, 0.0611041896, 0.2462553978, -0.0842125118, 0.6033170223, -0.4079713523, 0.3965844512, -0.1873841435, 0.1477984041, 0.0454420522, -0.1510640681, 0.0959807411, 0.127227962, -0.428060025, 0.2706250548, 0.5491985083, -0.3083289266, 0.1935079694, 0.406275183, 0.271334976, -0.1410003901, -0.3117104173, 0.0427422225, 0.1393655539, 0.39519611, 0.0157006159, -0.465359062, -0.18145594, -0.1694208384, -0.1713798344, 0.2771305442, 0.1936978698, 0.1036171466, 0.6412374377, -0.0107711256, 0.3417342007, -0.1403706819, 0.1461078525, -0.2261624634, -0.3170706332, 0.3154677153, -0.1712602973, -0.0721536651, 0.14936845, 0.0974321663, 0.4282274842, -0.0895456076, -0.2788538039, 0.1490696073, 0.0220956281, -0.1760276556, -0.2314783782, -0.2273617983, -0.4244582057, -0.0597066283, 0.3894448578, 0.1086549312, -0.0448736586, -0.08189556, 0.1337121576, 0.0657284111, -0.0608471334, 0.3853736818, 0.1624204218, 0.1091582924, -0.1178533733, 0.4234655201, 0.1116660088, -0.0448560752, 0.2996020615, 0.0848901272, -0.3486421704, 0.00734891, -0.5456370115, -0.0168497823, -0.4922620654, -0.0559067987, 0.0285597965, -0.2865238488, 0.0879114866, 0.2721901536, 0.1671656519, -0.0502021573, -0.4117513299, 0.0614254922, -0.1304933131, 0.4549987912, 0.0094223656, 0.1388651729, -0.0578335002, 0.2327504009, 0.2530176044, 0.4221574366, -0.283944428, -0.1441481411, -0.1475256234, 0.2386000305, -0.2370136976, -0.402313292, 0.1479163319, 0.0238196701, 0.0114104338, 0.081942603, -0.0960620195, -0.0742327124, -0.039261546, 0.135000065, 0.262152046, -0.1402870417, -0.3260720968, -0.0002277419, 0.1000280529, -0.0954460502, -0.0983680487, -0.2853770852, 0.0039757621, 0.2688603699, 0.3101646602, -0.196874395, 0.2346123755, 0.1285112947, 0.1994065344, 0.4068390131, 0.255155772, 0.2564768791, -0.141621083, -0.0747370869, 0.1387983263, 0.1374052465, 0.126100421, 0.0589173734, 0.2528763115, -0.3256136775, -0.2401996702, -0.2625834346, 0.1354919523, 0.2462042868, -0.1196290255, -0.1188753843, 0.4286912084, 0.0911404938, -0.3163749576, -0.0043916032, 0.3697552681, 0.2083339691, -0.0783287957, -0.0964373499, 0.5143990517, 0.0273683369, 0.1132027581, 0.1560064405, 0.1627742648, 0.3030822277, -0.3191559315, -0.0194684789, 0.0985656381, 0.0524452105, 0.4392340183, 0.0536862276, 0.1793845147, 0.1957719028, -0.1282250881, 0.2207375914, -0.2564573884, 0.2605249584, 0.2463689893, 0.098071143, 0.0292850733, 0.0417117178, 0.692581296, 0.0133144958, 0.1029684842, 0.3768167198, 0.4046406746, -0.1469326913, -0.1315661073, 0.3730298877, 0.0391933359, -0.3156324625, 0.3761726618, -0.0364099443, -0.2104444206, -0.0256734937, -0.0667569488, -0.1785059571, 0.0451069921, 0.0448327474, -0.1364884973, -0.2802780271, 0.1971087754, 0.1187315434, 0.3354721069, 0.1892702281, 0.3666150272, -0.2245604098, -0.2313600034, 0.0424581207, 0.4983381927, 0.2246088088, 0.1280281842, -0.6307687163, 0.0605751984, -0.0917687491, -0.1626630723, -0.0357749388, 0.3476497531, 0.1403844357, 0.2971373796, -0.1498182416, -0.0090174414, -0.0943761319, -0.1213884801, 0.0095824255, 0.2688106894, -0.0016040392, 0.1707884371, 0.2349534184, -0.2277477384, 0.0978335291, -0.1615009606, -0.4631524682, 0.2085970193, 0.213436529, -0.1320756376, -0.059651643, 0.0094561055, 0.0610691123, 0.1110365987, 0.4639386237, 0.5046036839, 0.463421315, 0.0534517504, -0.109783791, -0.0632173866, 0.0661503822, -0.0042871754, 0.0065690279, 0.2461323142, 0.169541344, -0.0130821764, 0.0458687469, -0.0164375082, 0.2242898345, 0.0097211599, -0.0279510878, -0.3346087933, 0.2038645297, -0.3020478487, -0.0616791323, -0.1221168265, 0.2529072762, 0.043554008, -0.1262921691, -0.0740374774, -0.2473904192, -0.0063568205, 0.1367200911, 0.0700306296, 0.4863368273, 0.2643497884, 0.2858446836, -0.1685404778, 0.3572317958, -0.1491307169, -0.2684082091, -0.036923781, -0.0944068283, -0.0409677066, -0.0880124122, -0.2358719558, -0.2033034861, -0.1965103745, 0.0558085926, -0.2785730064, -0.0634657145, -0.1141151041, -0.0547991283, -0.2686130702, 0.0321200937, -0.0386709124, 0.0790921524, -0.0798289925, 0.170473069, -0.2691614628, -0.2769067585, 0.4201646447, -0.4225324094, 0.0081152096, 0.0434495099, 0.026598867, 0.6671050191, 0.1105668917, -0.5503883958, -0.2402533591, 0.0807972401, 0.0238997713, -0.1151852533, 0.0876499414, 0.3364041448, -0.196549505, -0.2017682046, 0.0055698268, 0.2425364256, 0.0938602984, -0.3759279549, -0.2207047641 ]
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.0592437834, -0.0141797066, -0.1230469495, -0.1746843755, -0.2136998326, -0.3094342351, -0.2024401426, 0.1878228188, -0.2731275558, -0.0180025026, 0.125861302, 0.4488862455, -0.1200057715, 0.0128097311, 0.0272125863, -0.2012904584, 0.2756507695, 0.4141334593, 0.1880780756, -0.1802966893, -0.0639466196, 0.2660612464, -0.375748992, 0.1084289253, -0.3733384013, 0.1195130795, -0.4001511931, -0.1794679314, -0.2072294354, -0.5200278759, 0.4982818067, 0.1200131029, 0.1677702218, -0.0054160357, -0.0001168645, -0.083437711, 0.5949625373, 0.0467752218, -0.0684177428, 0.0520083308, 0.0475997552, -0.115283668, 0.5010395646, -0.0478231683, 0.016452089, -0.3274895251, 0.2020201236, 0.4445806444, 0.2767577469, 0.1424146891, 0.1396359801, -0.1405017972, 0.3247388899, -0.0397443287, 0.401578486, -0.0442504026, -0.1242005676, -0.0819101185, 0.4457003772, -0.077432096, 0.006358888, -0.0440448895, 0.0988058299, -0.1819065958, 0.1066224054, 0.1319278777, 0.2320649922, -0.3828478158, -0.0229045767, 0.0497768521, 0.1373976022, -0.0845373124, -0.3730433583, -0.1281930655, 0.1072310433, -0.4572904706, 0.40092206, -0.2419739068, -0.21648027, 0.1059385389, -0.0273044854, -0.3213632703, -0.207993269, 0.317487359, -0.2134224474, 0.4697513878, 0.0514702015, -0.2200690806, 0.2339064926, -0.2200535238, 0.2091203481, 0.1614210308, 0.0046574604, 0.352492094, -0.0736416876, -0.2080271542, 0.2646897733, 0.2331189811, -0.1770541668, 0.0817958787, -0.4286389351, 0.1595922261, 0.0953153074, 0.081504494, -0.1969238222, 0.2000458837, 0.0850961357, -0.1773305386, 0.2752019465, -0.3191647232, 0.0964030176, 0.2266247571, -0.0213942342, 0.0757583231, -0.4990970194, -0.3258015513, -0.1640278101, -0.1835731268, -0.0718304366, -0.1695812196, -0.3082044125, -0.2747525573, -0.1742533296, 0.2096716762, 0.0724701062, -0.2116133273, 0.2005263418, 0.205686301, -0.1665835828, -0.0948192179, -0.0224238671, -0.0403508171, -0.2784217596, 0.2005556524, 0.2567538023, -0.2662539482, 0.2235690206, -0.1683190912, -0.234790504, 0.3373529613, -0.271401763, 0.1439442337, -0.0348654725, 0.1348386109, -0.1238649413, -0.1286257356, -0.4871388078, -0.2091959268, -0.174094215, 0.0499706119, -0.0126801692, -0.168468833, -0.3270563185, 0.1455114931, -0.2288084924, -0.3878188729, 0.4384028912, 0.6058793664, -0.154918313, -0.0916511491, 0.003691379, 0.0008419789, 0.31485641, -0.1032304838, 0.1083213538, -0.1296105981, -0.3205527067, -0.3506692052, -0.1114013046, 0.1302194893, 0.083670035, 0.2001710087, -0.2039763629, 0.2088035345, 0.0842562988, 0.5598303676, 0.7137579918, -0.2494046837, -0.0825684741, 0.0901599452, 0.1399413347, -0.2311058491, 0.0015102103, -0.1959900558, 0.1299804747, -0.0348636173, 0.0693845302, 0.361821413, 0.0850705877, -0.3851504028, -0.290869832, -0.4074509442, 0.349638015, 0.3368124366, 0.2358153611, -0.0990300179, 0.1416035593, -0.2938734591, -0.0359726213, -0.1276393235, 0.0053384602, 0.0921121687, 0.0934861302, 0.1497268081, 0.2479845583, -0.2244762927, 0.0610382371, -0.0596712157, -0.5969664454, 0.5358669162, 0.0315453187, 0.1064156741, 0.021718815, -0.0304881334, -0.0421891026, -0.3593742251, 0.046514824, -0.0584430061, 0.3487759531, 0.2340876311, -0.2853092253, -0.0835978985, 0.2847381532, 0.0492271371, -0.2090056241, 0.318923384, -0.2638424337, -0.5850797892, 0.1359112561, 0.3734184504, 0.0751915351, -0.0719692707, 0.0612215139, 0.0764650255, -0.3600910902, -0.1545645297, 0.1580304205, 0.0245530158, 0.219767496, -0.3405792415, 0.0494575575, 0.0365092792, -0.0102003738, 0.0282028466, 0.0433059894, 0.203734234, 0.52714324, 0.0429544523, 0.2765482068, -0.0150386766, 0.3046871126, -0.2103612423, 0.0834925771, 0.1226686835, 0.1765887439, -0.1501628458, 0.1475790143, -0.0668568686, -0.3327256739, 0.2287939787, 0.2919631004, -0.1852936447, 0.0069527263, 0.4050531089, -0.1685331166, -0.3128301799, 0.0323311314, -0.5013379455, 0.3017617464, 0.367020607, -0.1285232455, -0.0740581676, -0.3326495886, -0.3564533889, 0.2985065579, 0.0053436644, -0.1035915017, -0.1053142548, 0.369022131, 0.1527142525, -0.2460767031, -0.3854294121, -0.0478539094, -0.0822339803, -0.0234093741, -0.0061435029, -0.4174497128, -0.5681111217, 0.0978689641, -0.1454334855, -0.3099065125, -0.2747798562, 0.431537807, -0.1552891433, -0.0024638548, 0.4569201469, 0.0884081572, 0.2736099362, -0.1515215933, 0.1012929082, -0.4035412073, -0.2560888529, -0.5996537805, 0.0461746491, -0.0070881993, 0.2701750994, 0.0883505121, 0.0279435366, 0.1230095476, 0.1659342498, -0.6194011569, 0.3482750654, -0.1487368941, 0.2856455147, -0.0940538496, -0.5511430502, -0.2057671249, -0.42682302, -0.0547478423, -0.2271085382, -0.1468821615, 0.0188632235, -0.0572916493, -0.322955966, -0.1480235755, -0.4084334075, -0.43515715, -0.1401524693, 0.214241609, 0.0395386294, 0.0588510633, 0.1975745857, -0.0757114217, 0.1870776713, -0.1790193915, 0.0774519518, -0.0484720469, 0.408598125, 0.5637875199, -0.0856355876, -0.4115508795, -0.1669466943, -0.242240414, 0.0285182893, 0.147162959, -0.1828511953, 0.0580341369, -0.1403613538, 0.1632646471, 0.2589227557, 0.2589214444, 0.588092804, 0.0734347552, -0.1134549677, 0.0305125192, -0.2120329142, 0.1438655853, 0.0883478299, 0.3923084736, -0.1175514534, -0.0221717581, -0.2029244304, 0.638698101, -0.1549407244, -0.3184787929, 0.3930826485, 0.0697892904, 0.1298821718, 0.0054904725, -0.083811827, 0.2943467796, 0.0505585633, 0.206607461, 0.3836005628, -0.0216294713, -0.6913449764, -0.2100387812, -0.0116651878, -0.3025420606, 0.007763125, -0.1039873138, 0.061493434, 0.3284473717, 0.012121059, 0.0533968881, 0.0074179024, -0.2160621583, 0.0984760597, -0.0119179823, 0.0943684876, -0.0891461968, 0.0429693758, -0.4413606524, -0.2340092659, 0.3478423953, 0.1716233194, 0.1526610851, -0.1299132705, -0.0009563789, 0.2992292941, -0.0243389551, 0.3316761255, -0.1249462441, -0.3391498029, 0.4021449089, 0.3033944964, -0.3724468052, -0.1119723618, -0.3990403116, 0.1747430861, 0.490731746, 0.203534916, -0.1172671393, -0.0463108234, 0.1898662895, -0.3391608596, -0.0570781529, -0.246709168, -0.1130191386, -0.2649119496, -0.0847265348, 0.0074500814, -0.0721190348, 0.1336935163, -0.1844213754, -0.0550445318, -0.1349462867, -0.015063405, -0.0477611795, 0.3356502056, -0.1110275239, -0.2225151956, 0.0734513253, 0.0124912728, 0.0551690906, 0.032075353, 0.0116988793, 0.1928335726, 0.1264005899, 0.2378140092, -0.0401197895, 0.4711703956, 0.315834254, 0.0417377912, 0.301710844, -0.3949327171, 0.0374773741, -0.0748539716, -0.1443206072, 0.3766114116, -0.0541478731, -0.0129255876, 0.1214610636, 0.4406946301, 0.1119292527, -0.2288444638, -0.2961522639, 0.4306163788, -0.2071006596, 0.8095927238, 0.0416994207, 1.0631251335, 0.2075320035, 0.1021278352, 0.3214924932, -0.077638045, 0.6415960789, -0.3527670801, 0.3848255575, -0.203481093, 0.3640372753, 0.0502680168, -0.1063916683, 0.2313320637, 0.0651071072, -0.4607394338, 0.305026263, 0.6316834092, -0.5515395403, 0.2387443185, 0.2986893058, 0.2288753688, -0.1000687778, -0.3262158632, 0.0651114061, 0.1458827406, 0.3255532384, 0.0299457684, -0.3902043402, -0.2425752431, -0.154491961, -0.1828271598, 0.3070863485, 0.2162067294, 0.0256646723, 0.5504888892, -0.0480521694, 0.3429058194, -0.1830752194, 0.2019944787, -0.2214519531, -0.2795247138, 0.2059273124, -0.180663988, -0.186390996, 0.2789825499, 0.1108559221, 0.4783038199, -0.1785260886, -0.247166872, 0.2273514867, -0.0119849704, -0.1021619067, -0.4108906388, -0.1723776013, -0.380122751, 0.0314515457, 0.2445616722, 0.1389168799, 0.0763697624, -0.0390641801, 0.1476029456, 0.0275733806, -0.0304052625, 0.4520759284, 0.0978589207, 0.1462634355, -0.0796443671, 0.352255404, 0.0828052163, -0.1016987711, 0.336019516, 0.0391182825, -0.3150663376, -0.0359501392, -0.5736917257, -0.0591390841, -0.3388131261, -0.1081747413, 0.0787253901, -0.2951438427, 0.0935456678, 0.2771796286, 0.0542385951, -0.037845362, -0.2932760119, 0.0016483888, -0.0085251927, 0.4036149383, -0.0916771963, 0.0483509749, -0.0371697806, 0.3229560256, 0.3199605346, 0.3426155448, -0.2777293026, -0.0734340325, -0.1636999249, 0.2091829479, -0.1636303365, -0.3471165001, -0.0160347968, 0.0460449681, 0.0319347531, 0.0929891765, -0.0288796406, -0.0872119814, -0.0063761622, 0.1165390164, 0.3504097462, -0.1507749259, -0.1828807443, -0.0751941726, 0.03937025, 0.0581013784, -0.1120647937, -0.3036648333, -0.1069651842, 0.3208748996, 0.205581069, -0.0668429807, 0.3638153672, 0.1654619277, 0.1632007957, 0.4954354167, 0.1743814051, 0.2557824552, -0.0062731393, -0.0377167761, 0.1178353354, 0.1068404019, -0.0002792329, 0.1137573943, 0.2845737636, -0.3544378877, -0.2378748357, -0.3208030462, 0.1212211698, 0.3710856736, -0.1773019284, -0.1021056324, 0.5498788953, 0.1040197387, -0.3391270638, 0.0448369943, 0.37764889, 0.1836228073, -0.178250134, -0.1613053083, 0.5033268332, -0.123718828, 0.0655730143, 0.1693846881, 0.0281038769, 0.1925699562, -0.3202221692, -0.1176672205, 0.1280378252, -0.0256598033, 0.2917713821, 0.0684881061, 0.1458538771, 0.2214780152, -0.0340511166, 0.1699713767, -0.131425038, 0.2671308815, 0.2083178014, 0.1047528535, -0.0451944619, 0.018086046, 0.6436561942, -0.0035916157, 0.0994984359, 0.4499211013, 0.3544279337, -0.1910550743, -0.0970868021, 0.4414840341, 0.017757358, -0.328275919, 0.2047426254, -0.046588175, -0.2082738876, -0.0006452203, -0.0472007655, -0.1011463851, 0.1203369275, 0.0842986777, -0.1994648725, -0.3489927053, 0.143758148, 0.0285494998, 0.3482125401, 0.2354931682, 0.3813441992, -0.2906368375, -0.2081053257, 0.0629171953, 0.5100593567, 0.3198820055, 0.2481945455, -0.6800204515, -0.0642881617, -0.1547393948, -0.1307307333, -0.1188487262, 0.4470880926, 0.253940165, 0.3018110394, -0.1008313745, 0.0009343624, -0.0910383314, 0.0122659709, 0.0730977952, 0.1565638036, -0.1025148332, 0.1844878495, 0.2533714771, -0.1798570901, 0.0738395452, -0.1097607017, -0.5304479003, 0.2042803764, 0.1903682202, -0.004753083, -0.0675145313, -0.1293380857, 0.0647715479, 0.0852478892, 0.4504697919, 0.5197364092, 0.3963973522, 0.1408578604, -0.2211328149, -0.0473365635, 0.1154522821, -0.0504339971, -0.1142699346, 0.1308118403, 0.2489544451, 0.0097399019, 0.0486928858, -0.0511356592, 0.2500572205, 0.0309252292, -0.009007832, -0.3527628183, 0.2127010226, -0.1986587942, -0.0564957559, -0.1171877757, 0.2376616597, 0.0571977869, -0.214233309, -0.032686729, -0.1692966074, 0.0233711749, 0.1450863779, 0.2061755806, 0.4772203267, 0.3472391069, 0.3181163669, -0.0800695047, 0.2827459574, -0.2654672861, -0.230360955, -0.1008695066, -0.0156666078, -0.0727605149, -0.1788676232, -0.1909886003, -0.1551173925, -0.1508607864, 0.0801039115, -0.3075984716, 0.0304197297, -0.1123350114, -0.0618693121, -0.237901032, 0.1116112024, -0.1198270097, 0.1063623279, -0.1496860981, 0.2067833692, -0.3719467521, -0.228792876, 0.3346478343, -0.4912215471, -0.0291730613, 0.0613739975, 0.0329635292, 0.524091661, 0.0522619635, -0.4273996651, -0.3150724173, 0.0883797407, 0.0220301487, -0.1135815606, 0.1176475137, 0.2750371993, -0.2203360796, -0.1301645339, -0.0367373638, 0.1877404153, 0.0569216087, -0.2648134828, -0.2374385297 ]
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.3334831297, -0.3722021282, -0.0924768448, 0.0178869125, -0.1826998591, 0.1093529835, 0.3688517213, 0.2643734515, -0.1256050617, 0.3148260117, -0.4613341093, -0.0776401237, -0.064803049, 0.180554226, 0.10165295, 0.1559135765, 0.0136736669, -0.0235784315, -0.1810163558, -0.0543648824, -0.2652777135, 0.266415447, -0.1272372603, -0.1815757155, -0.3280387223, 0.0483209267, -0.3616862595, 0.1481475383, -0.1781799346, -0.3179264367, -0.0962831974, 0.2018678337, 0.0043576062, 0.2368447185, -0.0001070355, -0.1905529499, -0.0762818456, -0.0908376053, -0.3510019481, 0.1006620526, -0.2646733224, -0.2651144862, -0.1263944209, -0.2893662751, -0.3872867525, -0.0671800226, -0.1151147261, -0.3258394897, 0.0424563512, 0.200076431, 0.2592929006, 0.2519877851, -0.3639665246, -0.2319182754, 0.0204405598, -0.1725867987, -0.1983190626, -0.0694198012, 0.5608638525, 0.272046864, -0.2547252476, 0.222103551, -0.0003466979, 0.1921163946, -0.0048927329, 0.1211781353, 0.3246237934, -0.0065180985, -0.1593533903, 0.4086940289, 0.3740613461, -0.1164142936, -0.2830063105, -0.0593641363, -0.1900770664, -0.2303512543, -0.2105084956, 0.0816254467, -0.1196680292, 0.1249302477, -0.0415162072, 0.0868019685, -0.2472939938, 0.1161826178, -0.0923117921, 0.9784514904, -0.009004714, -0.0894226059, -0.0342591964, -0.2545592487, -0.0455788523, -0.1130446121, 0.0165107958, -0.0601290092, -0.086163871, -0.2744801939, 0.2924728394, 0.0434695184, -0.0622244179, 0.0590409264, 0.102974996, 0.0711520463, 0.3325048983, -0.0934903622, -0.2517017126, 0.0551242158, -0.134421438, -0.4063020945, 0.0929868221, -0.1309957653, 0.0491632372, 0.1383206397, 0.122153908, -0.1984280348, -0.501650691, 0.0056258626, -0.1008068025, 0.0083084404, -0.1851607263, -0.0633360445, 0.1519849747, -0.217383936, -0.0983584374, 0.1566030085, 0.0331040882, 0.0121342558, 0.1411258429, -0.0101372749, -0.2406610847, -0.2322078645, -0.1520593911, 0.1009301692, -0.2026448399, 0.0283982307, 0.3800960481, 0.5238034129, -0.0418986939, -0.0189721547, 0.2195506394, 0.4000491798, -0.0696536005, 0.1028329656, 0.7088280916, 0.157848388, -0.0999296233, 0.0830122456, -0.0932009667, 0.1064205021, -0.2886229157, -0.069703877, 0.226124689, -0.1155598536, -0.0921945423, 0.2713845968, -0.1784694195, -0.2367867231, 0.5732966065, 0.4183844626, -0.0948930532, -0.0091868192, -0.0527611561, 0.0809450448, -0.3100987077, -0.1258615553, 0.0837472603, 0.2288594842, -0.5910979509, -0.1100831106, -0.1314506084, 0.2189662606, 0.2230557501, 0.112531215, -0.0430239849, 0.1650479436, -0.2222634256, 0.3110173345, -0.0164756849, 0.0106549636, 0.1134815589, -0.0392748564, -0.1310180873, -0.1334371716, 0.4240178764, 0.1913641542, 0.2322643846, -0.1136520356, -0.1647869051, 0.2035279572, -0.2517412603, 0.0421079695, -0.245138377, -0.2300683111, 0.5268055201, 0.1110179424, 0.192453593, -0.3725346923, 0.0999875665, 0.165906772, 0.4689546824, -0.2773911655, 0.1345430613, -0.1531639397, 0.3069568574, -0.0678337887, 0.1636536121, -0.2083520442, -0.0154856481, 0.1424131542, -0.1754941642, 0.6150254607, 0.2148752809, 0.3419878781, 0.017672345, -0.0650307611, -0.2481766641, -0.2017682344, 0.2806342542, 0.2754365802, -0.1205321476, -0.2836519778, -0.1200033948, -0.0141045712, -0.0794236064, -0.1126093268, -0.3751188815, 0.0413340405, -0.124436304, -0.0230784938, 0.1100061387, 0.4384028018, 0.0560679063, -0.1176026613, -0.0888801813, 0.0916531831, -0.2073235214, 0.280641824, 0.2597598433, 0.5066598654, 0.1799171269, -0.3302952051, 0.2640103996, -0.0370450281, 0.0020615943, -0.1470849216, 0.2458806634, 0.4308549464, -0.1414054632, 0.2891128957, 0.0322198272, -0.1204732955, 0.1530537903, -0.1407213509, -0.1774056852, -0.2646363378, 0.2876602113, -0.0283267107, 0.0307485759, -0.0372505412, 0.3311649859, 0.3989813328, 0.410697192, 0.1012395844, 0.0374424309, -0.1233825237, -0.0856722593, -0.114009507, 0.1963425279, -0.1481395066, 0.1982422173, 0.3941272199, 0.293068409, -0.0063038599, -0.0081454869, -0.2674536705, 0.3682322502, 0.0831601173, -0.0806124061, 0.3035698533, -0.102572687, -0.0797003061, -0.3303622603, 0.0464312285, 0.0004443713, -0.0467906483, 0.0490886718, 0.0173670873, -0.2349142134, -0.1608106941, -0.2334726453, -0.3551641703, -0.0800622404, -0.3991765678, 0.2940739691, -0.0091908602, -0.2574595809, 0.149100244, 0.0934516788, 0.5956990719, -0.1647154987, 0.38822487, -0.2031997442, -0.2412426919, -0.2354213148, 0.3034732044, 0.1065902337, 0.0333323032, 0.5829256177, -0.2871761024, 0.1692099571, -0.0815072283, -0.4728702307, 0.1743198335, 0.0151838902, 0.0840859935, 0.2246306688, 0.0063929334, 0.1907294393, -0.2680405676, 0.1473169625, -0.1281912476, -0.0734211355, -0.0660989508, -0.2781065702, -0.3567062616, -0.0101305991, -0.807267487, -0.4668092728, -0.2272170782, -0.0012443438, -0.2746875286, 0.0771184713, 0.2422078401, -0.112737596, 0.1935002357, -0.1483845115, 0.1213302612, -0.2372917235, -0.0725687444, 0.2338348925, -0.3333694339, -0.1917578727, 0.0768793821, -0.0045275763, 0.321501106, -0.1392314732, -0.0256987512, 0.4002659619, 0.0484406725, 0.2887954116, 0.3326585293, 0.4452303946, 0.2124413997, 0.2143187374, -0.2785194814, -0.34472844, -0.078080833, 0.0277505163, 0.187992081, 0.2707403302, 0.1232826859, -0.0448733121, 0.1365176439, 0.429982841, 0.1162667572, -0.1589789093, 0.2109696865, 0.0902184919, -0.0171171874, 0.0547475368, -0.4609020352, 0.4322130382, -0.0753142089, -0.0908729881, 0.6659477949, -0.0355999246, -0.0778804421, -0.1606562138, 0.4709330201, -0.0669511557, -0.2566490173, 0.0866395682, -0.0473853685, 0.2723078728, 0.1539362073, -0.3449328244, -0.3575872183, -0.2558022141, 0.0479977168, 0.0553065576, -0.1811757088, -0.1124146879, 0.0172270387, 0.0508790053, -0.4486723542, 0.1748120487, 0.2414567024, 0.3168323636, -0.2165374458, -0.1181848645, -0.0517669804, 0.1543855965, 0.1541742086, -0.3376966715, -0.0922998935, 0.1863250881, -0.1468837708, -0.0556478687, 0.0642165244, -0.4884223938, 0.0165668651, 0.4068894386, 0.0029172357, -0.0957782343, -0.2474064082, 0.0839541852, 0.3582585454, -0.2509701848, -0.0592713058, 0.0600357279, -0.0164426416, -0.0580675304, 0.0867891759, 0.0004030839, 0.1273497939, 0.0102265663, 0.0821224153, 0.1796138734, -0.0833234116, 0.2549475431, 0.1805137992, -0.1419229209, 0.2616843283, -0.019486472, 0.0551654361, 0.3926156759, 0.104179278, 0.298287034, -0.2377617955, -0.0168037005, 0.1231902689, -0.2735188603, 0.3650428653, 0.5031780005, 0.054216437, 0.0683700889, 0.1348579824, 0.0356110707, -0.3472727835, 0.1898888499, -0.1537940502, 0.2292508632, -0.1234715432, 0.160845086, 0.0043981597, -0.1318328679, -0.1393217593, 0.1764628142, 0.0369970798, -0.4177049398, 0.0813199729, 0.2697204351, 0.9081614614, 0.1166392714, 0.1585988849, 0.2479416281, -0.1069555283, -0.1235682145, -0.0871867537, 0.0164082684, -0.2227157056, 0.0723861754, -0.0025102571, 0.0884085521, -0.0037572272, 0.4009152353, -0.0551584512, 0.1393931359, 0.5569095612, 0.1016305238, 0.1585956514, 0.2449046075, 0.1326386034, -0.4203196466, -0.0103842961, 0.2484361529, -0.0707784891, -0.1553053409, -0.1357746422, -0.1143149137, 0.0853031427, 0.0539997444, -0.2807553113, -0.040702492, -0.5479022861, 0.1362299472, -0.4296942353, -0.1737637073, 0.112477228, -0.2767392993, 0.3626976311, -0.005013803, -0.1961693913, -0.0884707719, -0.1599103212, 0.1444286853, -0.2347541153, -0.0022885948, 0.3436670899, -0.2297106385, -0.2189771235, -0.1852140129, 0.1544436961, -0.1659739465, 0.0369706601, 0.0560203642, 0.4264520407, -0.1247681826, 0.2401203066, 0.3004259765, -0.1864311695, -0.2889266014, 0.1699923277, 0.0530196764, -0.4662048817, 0.4557079375, 0.0103965569, -0.1018573418, -0.2058900893, 0.1422104686, 0.1639942825, 0.1020239517, 0.0889321864, 0.4726658762, -0.2444575727, -0.3337055445, 0.1085771918, 0.2642263174, -0.2122596502, 0.0464468747, 0.2941992879, -0.2451594472, 0.0327761397, 0.5464959741, 0.4080556929, 0.0927015394, -0.2307901382, -0.0631738454, -0.1403222978, 0.1981208622, 0.0118739372, 0.5117023587, -0.0265917443, 0.2004824281, -0.1185655445, -0.0341290571, -0.4652319551, -0.0402004011, 0.0808378384, 0.0937294662, -0.101930365, -0.2751199603, -0.1194092408, 0.1739662886, 0.1288014948, -0.1284706444, -0.2571575344, -0.2986705601, -0.260506928, 0.084671624, 0.0810296759, -0.2016498148, 0.0910662413, 0.0473578572, -0.0333054215, -0.1721803546, 0.1191197187, -0.0243671648, -0.0794989243, 0.3310460746, 0.3911221325, -0.4266450405, -0.064651303, 0.0187308658, 0.3707017303, 0.0060197301, 0.1250882149, 0.2350400388, 0.117331773, -0.1971157193, 0.3461294472, 0.2029721439, 0.1662789732, -0.098064512, 0.1162737757, -0.0107700843, -0.1371085793, 0.2711569071, 0.2495610267, 0.0644430071, 0.0991468206, -0.3754108846, 0.0503887311, 0.2874405682, -0.4011576772, -0.078339234, -0.0078469571, -0.0178264529, 0.3304075897, 0.2903864682, 0.4299237132, -0.0786554813, 0.1788135618, -0.0167876966, -0.2648408115, -0.1244054139, 0.0836113244, 0.1068066731, -0.0598885082, 0.1551775634, 0.1306481808, -0.1934786439, 0.0083460696, 0.0659054816, -0.0772136748, 0.9309540987, -0.0250183977, 0.0329420641, 0.2934620082, -0.0905069038, 0.1361296475, -0.3587462902, 0.1030768454, 0.2292920053, 0.138823539, 0.2720465958, 0.0696396679, -0.3048448563, -0.2312244475, 0.2099304646, -0.3689034283, -0.0648867637, 0.047106877, -0.2788592279, -0.2459999621, -0.1239404082, -0.0792428628, 0.0644881129, 0.3866285682, 0.0630614087, 0.1302512139, -0.1684918404, -0.0924479514, -0.084395647, 0.0218425095, -0.1803235114, 0.3002915084, 0.4029870033, -0.2464873046, -0.079239063, 0.4237114787, 0.0625784993, -0.0248853732, -0.1714931428, 0.175006628, -0.226255551, -0.140263319, -0.1907268763, 0.240052253, -0.0189459659, -0.2605827451, 0.2505832613, 0.131729275, -0.1262592971, -0.1668639183, 0.1634865254, -0.5733739138, -0.0259806737, 0.0337545499, 0.1563694477, -0.0879799873, -0.1432313621, 0.2840705514, -0.3045532703, 0.0279309601, 0.2656627893, -0.3911352158, 0.0452729985, 0.0023916513, 0.1117326468, -0.0416820496, 0.7474101782, 0.1418002099, -0.1485965848, -0.3499348164, -0.2589433491, -0.372082293, -0.0815170556, 0.1000942886, 0.3815596104, -0.3538080156, 0.106478028, 0.2908459306, 0.1203454658, 0.1783050001, 0.1155846342, -0.1099237427, 0.1122639626, -0.5181726813, -0.0041557737, 0.3043669164, 0.281452626, -0.0202699192, 0.0776095241, 0.0000653248, -0.0739584938, 0.1314822882, -0.1722524762, -0.1767569482, 0.3135388494, 0.2274089456, -0.0641394928, 0.2742764354, 0.3530698419, -0.3639173508, -0.1765116751, -0.255138129, -0.1928961575, -0.0312146638, 0.2922406793, 0.090678975, 0.3055389524, 0.0111886784, -0.1774161756, -0.0460418314, -0.2982521653, -0.007424444, -0.0276955254, -0.2427573651, 0.2052915692, -0.1747414768, 0.3201978803, 0.0931884646, 0.5315691233, -0.0653214902, 0.2351939678, -0.1621197611, -0.3991538584, 0.3055488169, 0.0906888247, -0.3430291712, -0.2722947598, 0.1945740283, -0.0463960022, 0.2940961719, -0.3802621961, -0.1947213113, 0.1568623334, 0.0015752893, 0.1056378633, 0.522100091, 0.3171328306, -0.1515061557, -0.1247107536, -0.076313071, 0.4320124388, -0.2402195483, -0.3114910722, -0.2136413753 ]
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.351095438, -0.420157373, -0.0554757677, 0.0014690459, -0.2052135915, 0.1677959114, 0.3096145988, 0.2312007546, -0.1078790501, 0.326869607, -0.4746790528, -0.0717086047, -0.0530308485, 0.0761437342, 0.1126479805, 0.2031460404, -0.0415976159, 0.0062063672, -0.2050026059, -0.0367567018, -0.2811894715, 0.2966845334, -0.1565784663, -0.1628475934, -0.3049374819, 0.1075594351, -0.3232403696, 0.1289973259, -0.0864094943, -0.2628647387, -0.0710037425, 0.1811726689, -0.0486798398, 0.0939840972, -0.0001127129, -0.1136949062, 0.0116597004, -0.1016761661, -0.3240740299, 0.0458124094, -0.3665427268, -0.263951391, -0.2142888904, -0.3062394261, -0.4367866218, 0.0272238925, -0.1832000613, -0.3564965725, -0.0052964091, 0.1945137382, 0.2235887051, 0.3457291424, -0.3143995106, -0.2822670937, 0.0567384586, -0.2643663883, -0.1838620901, -0.0266633723, 0.4762522578, 0.3321306705, -0.0531216674, 0.2584946454, 0.0270024464, 0.1334306598, -0.034909375, 0.1428125799, 0.364931345, 0.0173943657, -0.0727357268, 0.3325247765, 0.4082348049, -0.0555602536, -0.2953051925, 0.024360247, -0.186671406, -0.1836408824, -0.1656775177, -0.0150444601, -0.069091253, 0.1800314188, -0.0824473575, 0.0707494467, -0.2317941189, 0.2495975792, -0.0581960157, 0.9896838069, 0.0268572271, -0.0273060836, 0.0627436861, -0.2822173536, -0.1278500855, -0.1018945128, 0.0349730738, -0.053546302, -0.0472451709, -0.1655717343, 0.3346604109, 0.1215331405, -0.1151125878, 0.0373837799, 0.026278805, 0.0181198437, 0.3821307719, -0.1026365757, -0.3399941623, 0.146821782, -0.1371391714, -0.3576857448, 0.0676686987, -0.0888853818, 0.084997952, 0.1274546087, 0.0989750028, -0.2352349609, -0.5490623713, -0.0274978504, -0.1431760788, -0.0249173865, -0.3145843148, -0.0480165146, 0.0230618939, -0.2022249848, -0.0835165679, 0.2277547121, 0.0744657516, -0.0106370393, 0.2954711318, 0.0556021184, -0.2634869218, -0.1860878617, -0.1568223238, 0.221424371, -0.1861121207, 0.0067128129, 0.3576881588, 0.5407779813, -0.0904791951, -0.0771081448, 0.2304047346, 0.3313209713, -0.2134871483, 0.0881098956, 0.688241899, 0.1761724502, -0.0530855842, 0.1961774528, -0.1271324456, 0.1290376633, -0.252800107, 0.0350095406, 0.1868714392, -0.1165915281, -0.0831097662, 0.2308927178, -0.1885020286, -0.255754143, 0.6013919711, 0.2973758578, 0.0287982114, -0.0596828498, -0.0815000534, 0.0976897031, -0.3347741663, -0.0301047899, 0.1800952554, 0.2333525717, -0.6572198868, -0.1665282547, -0.2068192512, 0.2950186133, 0.3693425059, 0.1796916425, -0.0453509688, 0.2924354076, -0.2584975362, 0.4198892713, 0.0101491734, -0.0049061552, -0.0069703255, -0.1160338446, -0.1494865119, -0.0744256675, 0.4314528704, 0.2410664409, 0.1457806528, -0.0348603427, -0.1443371475, 0.1764109433, -0.1311490089, -0.0318326652, -0.2274165303, -0.1784520149, 0.5984964371, 0.1068543941, 0.1780116558, -0.3074261248, 0.1291625947, 0.2362652272, 0.4651764333, -0.3246690631, 0.2200806886, -0.131089747, 0.3670409322, -0.0452756658, 0.157195881, -0.1688231975, 0.0765767992, 0.1846998036, -0.1489464343, 0.6234949231, 0.1539904475, 0.3873571754, -0.0878155679, -0.0449773446, -0.3361417949, -0.178745687, 0.208551228, 0.3206884265, -0.1827823222, -0.3383506536, -0.0287232623, -0.0390565768, -0.0480928943, -0.2065084577, -0.4026567638, 0.1354040504, -0.2129509896, -0.0521700308, 0.1030204445, 0.5125252008, 0.103375867, -0.069964543, -0.1244540364, 0.0962444395, -0.320360899, 0.303958416, 0.2060094476, 0.3942100406, 0.1310861856, -0.3835149407, 0.1998649687, 0.0237829909, 0.0238177106, -0.1549520344, 0.3204907477, 0.3441525698, -0.07729958, 0.3010516763, -0.0337891504, -0.1454750597, 0.1417855322, -0.1534952819, -0.1454749256, -0.361662209, 0.3138566911, -0.0337950066, 0.0471856147, -0.1138971373, 0.3828148246, 0.4016875029, 0.3852695227, 0.1135989055, 0.1079315841, -0.0844481587, -0.0436758846, -0.0492627844, 0.2282622159, -0.2101128101, 0.2338314801, 0.3430885673, 0.2765447199, 0.0183298122, -0.0082963519, -0.2246361971, 0.3973411024, 0.0774704888, -0.1221394613, 0.2896922231, -0.1076158509, -0.0456978902, -0.2772288322, 0.1048429459, 0.0116620436, -0.0693209171, -0.1093095988, -0.0416323468, -0.3411887288, -0.2628667951, -0.2388813794, -0.3346976042, -0.0919717029, -0.4030730724, 0.2417893857, -0.0480078831, -0.2613850534, 0.2518023252, 0.1039008126, 0.5412729383, -0.1396018416, 0.2570075393, -0.2098885477, -0.1634465903, -0.3350365758, 0.261544764, 0.0714805424, -0.0096900947, 0.6337126493, -0.2877263129, 0.2285159677, -0.0371139944, -0.4671824276, 0.1131048426, 0.0834076405, 0.0288719628, 0.2216667235, 0.0138425156, 0.2017316222, -0.3470588923, 0.2213798463, -0.0603056252, -0.0653209984, -0.1738290191, -0.2651664317, -0.4449756742, -0.0321836658, -0.7677303553, -0.4418917298, -0.2651731968, -0.0865017325, -0.3642122149, 0.0767289549, 0.2934863269, -0.1501423419, 0.2195659429, -0.0729877949, 0.11997585, -0.2860830724, 0.0994729698, 0.3871656656, -0.2667456567, -0.2149745673, 0.1425022483, 0.0106075034, 0.3104969263, -0.1521057785, 0.0015576258, 0.4561624229, 0.0843992308, 0.2617929578, 0.3264423609, 0.5436174273, 0.1978022754, 0.1510168612, -0.2413120568, -0.3730678558, -0.1842398494, 0.1567747742, 0.1619583517, 0.4169943035, 0.1445747763, 0.0645280629, 0.1511708349, 0.4219461679, 0.1103281155, -0.144294247, 0.2931166291, 0.0483068079, -0.0265369266, -0.0388946645, -0.5767920017, 0.4208676815, -0.0256162956, -0.1082329601, 0.6724064946, -0.0665038526, -0.0511073694, -0.2036520541, 0.4617723823, -0.0509655587, -0.2799989581, -0.0089733955, 0.0442188196, 0.2523651719, 0.1876971126, -0.3371652365, -0.331094116, -0.3479611278, 0.1593678147, 0.0800976232, -0.2242391407, -0.0849360526, 0.061280638, -0.0710920691, -0.4463778734, 0.2790630758, 0.3362530768, 0.342972964, -0.2130680531, -0.1520629227, -0.0080820434, 0.1516470313, 0.2631421387, -0.3619674146, 0.0387281515, 0.1935980171, -0.0585506819, -0.0356016122, -0.0033467487, -0.4417619109, 0.0097291656, 0.5186337829, -0.051732026, -0.1301385015, -0.0895860493, 0.1040925831, 0.2793540955, -0.2680600882, -0.1181624085, 0.0353961661, -0.0534728952, -0.0841064751, -0.0106588341, 0.0163347721, 0.2835980654, 0.0665000752, 0.1180796251, 0.202633217, -0.2388780415, 0.2810308337, 0.0962099433, -0.0650151074, 0.3816201985, -0.0399198458, 0.06557028, 0.3526311815, 0.020624755, 0.2904704213, -0.302200824, 0.0148081928, 0.1298611909, -0.3256895244, 0.3235579133, 0.505484879, -0.0188407879, 0.024714049, 0.1384248435, -0.0317913741, -0.200470984, 0.237116307, -0.1519358009, 0.2129080594, -0.0947297513, 0.1840766519, 0.0550774895, -0.1166446954, -0.104054831, 0.1748666614, 0.1363045275, -0.4941784739, -0.0732408091, 0.2296173722, 0.9664263725, 0.1904887855, 0.1384126544, 0.2758404016, -0.0335016027, -0.0657851622, 0.0482106656, 0.0508120656, -0.1869108677, 0.1847469807, -0.0306973048, 0.0752526894, -0.0217727199, 0.4314560294, -0.0369336754, 0.1354801953, 0.515627265, 0.1383625418, 0.2337651551, 0.220538184, 0.2501477897, -0.4087949097, -0.0756471455, 0.1737964153, -0.0941089988, -0.0286715198, -0.1461782008, -0.1536180824, 0.0346106738, -0.0042650253, -0.2722616196, 0.0789709464, -0.5890014768, 0.2749348581, -0.4028263986, -0.1198009029, 0.1747232974, -0.3142211437, 0.3008862734, 0.056545835, -0.226976946, -0.0626106635, -0.15545699, 0.0963049605, -0.2385855913, 0.0207431689, 0.2923783362, -0.3063319921, -0.1959642768, -0.1612963378, 0.1649286002, -0.2451207638, 0.0903505087, 0.0248100441, 0.3714934886, -0.0985416919, 0.1155395955, 0.3394878805, -0.0872316733, -0.2886784077, 0.1070467457, -0.0192577392, -0.5331576467, 0.3946989179, -0.0765466243, -0.0747832805, -0.1277846396, 0.2739506364, 0.0700786263, 0.1094879135, 0.2058129758, 0.4449132979, -0.2676796317, -0.217817083, 0.0435202718, 0.204848811, -0.2141149044, 0.0088803694, 0.3181267679, -0.2386742681, -0.0540531538, 0.6365109682, 0.4068299532, 0.1738204509, -0.1967403144, -0.15196307, -0.1225922406, 0.1349277049, 0.0622541271, 0.4929792285, -0.0479074307, 0.2813069224, -0.049419634, -0.146720767, -0.3966434002, -0.1032468081, 0.0390231237, 0.1037645862, -0.0148998909, -0.2560129166, -0.0667770505, 0.2031358033, 0.0904710591, -0.1550719738, -0.2829789519, -0.2200040519, -0.214464277, 0.0886421949, 0.1174130216, -0.2440492362, 0.1041123718, -0.0271587148, 0.0535267442, -0.1022973806, 0.1413943768, -0.1261366308, -0.1579964608, 0.2246874273, 0.3801624775, -0.5120624304, -0.124544844, 0.070539102, 0.3344873488, -0.0049787015, 0.1500239521, 0.2852223516, 0.116942957, -0.1642131656, 0.3835919797, 0.1137948781, 0.1523494869, -0.043805968, 0.1136314943, -0.1248554438, -0.1711814106, 0.2598102093, 0.3023607135, 0.0808530077, 0.0230443738, -0.4058659077, -0.0352057181, 0.2159340084, -0.4422448874, -0.0763631612, -0.0454622619, -0.0431355052, 0.2890427709, 0.2946327925, 0.3833945394, -0.0936123431, 0.2146469504, 0.0091507137, -0.2317998707, -0.106311962, -0.0498083979, 0.1242760345, -0.1273803413, 0.2068742812, 0.0705612451, -0.2522340715, -0.0125628896, 0.0357787088, -0.0393284224, 0.9443346858, 0.0554240756, 0.1277290136, 0.2607845068, -0.1525975168, 0.1444084942, -0.4156577587, 0.090736255, 0.2228736877, 0.0885286033, 0.165901199, 0.105140388, -0.3098655641, -0.1888137907, 0.3234904408, -0.3527394533, -0.1041433066, 0.0336167216, -0.272153616, -0.2560216784, -0.175317049, -0.0485171676, 0.0755501017, 0.3166672289, 0.0322543494, 0.1280552596, -0.1600308418, -0.1547183394, -0.1163782626, 0.0096214078, -0.2166686356, 0.2953332365, 0.3576922417, -0.2117869556, -0.0517914109, 0.3719342351, 0.1156516224, 0.0277742408, -0.050783705, 0.1282896101, -0.2201649547, -0.1960469037, -0.1785311401, 0.3015793264, 0.0281733442, -0.2969718575, 0.2875294983, 0.0589092895, -0.1092374846, -0.1599851996, 0.1798596978, -0.4980974197, -0.0589873344, 0.0835055485, 0.0308133848, -0.1172931343, -0.1961735785, 0.2696999013, -0.2349767089, 0.0529689863, 0.23625274, -0.4396252632, 0.0057426728, 0.0263646655, 0.0801034495, -0.0749604553, 0.7365739942, 0.0980665237, -0.1362931728, -0.3667146862, -0.2292539626, -0.4123723507, -0.1163258925, 0.1767958254, 0.3161048293, -0.3612352014, 0.0795735717, 0.2017932385, -0.0329301693, 0.2464621961, 0.1410082281, -0.0573465526, 0.0953295082, -0.4217143655, -0.0286549032, 0.2718576193, 0.2104885727, -0.0182137303, 0.0703179389, -0.0346259624, -0.0834260285, 0.0849488974, -0.1449534744, -0.2116880715, 0.24177064, 0.261348933, -0.0441510342, 0.2784503996, 0.4927449226, -0.3866877556, -0.0587783903, -0.255282402, -0.2277169526, 0.0211431049, 0.2991322875, 0.0188775174, 0.3166451454, 0.0603140667, -0.1228149533, -0.0644251928, -0.3232992887, 0.0511763543, -0.0216294788, -0.2860192358, 0.2448618412, -0.295673877, 0.3996622562, 0.1211717129, 0.4754556417, -0.0391975343, 0.2557390034, -0.2701252997, -0.4410143793, 0.3719324768, 0.0036638565, -0.3797160983, -0.3095817268, 0.2952938676, -0.1029622853, 0.2130258232, -0.4063833356, -0.3061916232, 0.2061427534, 0.0328863673, 0.0601147264, 0.5993670225, 0.31198138, -0.080383569, -0.0860493407, -0.1394548118, 0.4770438373, -0.2324856222, -0.2941694856, -0.2447911501 ]
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.3629813194, 0.2522221208, 0.0292831957, 0.0668663681, -0.0656065717, -0.317953229, 0.3687322736, 0.1455652118, -0.1377867758, 0.1537568569, -0.0934411585, 0.422970742, -0.1183705479, 0.0239225477, 0.1916111112, -0.0460922085, 0.0454055034, 0.3213038445, -0.1009333506, 0.2128737867, -0.1327810585, 0.3483657241, -0.5873014331, 0.2542974949, -0.2375738919, -0.0698924735, -0.0117018297, -0.0221685581, -0.126580447, -0.7411342263, 0.3176330328, -0.078956455, 0.0764137357, 0.3993419707, -0.0001173493, 0.0144256055, 0.482244283, 0.0728603527, -0.2069345564, -0.3872157633, 0.0386753082, -0.2277512401, 0.3138643503, 0.0373716205, 0.0358880237, 0.1512115747, 0.2212148905, 0.4453008175, 0.3842618763, 0.4977121353, 0.1408521235, 0.1463239193, 0.2370873094, 0.0650928542, 0.5099896789, -0.2810861766, -0.151342839, 0.4955285788, 0.3179703355, -0.1587510109, -0.0368673131, 0.1034917831, -0.1534600705, 0.0865597874, 0.0030837674, 0.104121238, -0.2000457048, -0.1258924901, -0.0360219032, 0.2756790519, 0.3768592477, -0.4508688748, -0.2491980195, -0.0131760091, 0.118537426, -0.6331676245, 0.2870849967, 0.1160992458, -0.2995829284, 0.2648496032, -0.1115240678, 0.0107541755, -0.1450329125, 0.1135523617, -0.0236421153, 0.6451188326, 0.0126204938, 0.1286133677, 0.1633942127, -0.0405532122, 0.4524587989, 0.1952839196, -0.0274375957, 0.1291083246, -0.0782347918, 0.0992480889, -0.1888788342, 0.0984961689, 0.1803100705, -0.1165360361, 0.02491704, 0.0484944098, -0.0032618493, 0.3548352718, -0.0418045446, 0.1982089132, 0.1764469743, -0.0754629076, 0.4000109732, 0.2195629179, -0.1564374864, 0.1064230949, 0.0805542618, -0.3143375814, 0.0116779581, -0.09238033, 0.2431235313, -0.334220916, -0.4480617046, -0.2376206368, -0.5925033689, -0.0588284098, -0.0057861619, 0.3084497452, -0.1026287228, -0.2543332577, 0.0440537333, 0.3627562523, -0.306545645, -0.1034832597, -0.0444493145, 0.1358827949, -0.1913899779, 0.0998170152, 0.3135402203, -0.1987223178, 0.2418405861, 0.0600405894, -0.0656104907, 0.1117262319, -0.1427792162, -0.1940475255, -0.0809838921, 0.2763285637, 0.1291204691, -0.1630796045, -0.1771036685, -0.4345964193, -0.1928698868, 0.3411627114, -0.1402750909, -0.2219149321, 0.0338347033, 0.1234437227, -0.3155338168, -0.2954389155, -0.2915066481, 0.2421060503, -0.1154175848, -0.3325149417, 0.0051547475, -0.3383249938, -0.2549369335, -0.0052292012, 0.101986371, 0.3170406818, -0.33841452, -0.0378377736, -0.0716532916, -0.1312978268, 0.1759167612, 0.1195300445, -0.1356284469, 0.0528884456, -0.0810477212, 0.3707364202, 0.1033158526, -0.080041483, -0.315187633, -0.109557271, -0.0785586834, -0.1270705611, -0.0561668351, -0.2193421125, -0.2982592285, -0.0450606719, 0.209131062, 0.219727546, 0.0764504299, 0.0485543609, -0.3125257492, -0.2832558453, 0.2770356238, 0.136628896, 0.043674726, -0.2376753688, -0.0044839382, -0.3707580864, 0.0189565793, -0.1722558141, -0.2514599562, -0.037515454, 0.303707689, -0.2670270801, -0.0709288865, -0.0049367398, -0.2513347864, 0.0999910235, -0.1986753792, 0.3306251764, -0.2112035304, -0.1016847938, -0.3360030055, 0.2426894605, 0.1568354815, -0.0757176429, 0.0537428334, 0.0139936749, 0.1294902265, 0.4455617964, -0.0342871845, 0.1879515946, -0.0059922263, 0.1484077275, 0.2585424185, 0.1822600067, -0.3008644879, -0.5154072046, 0.2087282985, 0.1776777208, 0.0894745439, 0.0034554377, -0.0724014416, 0.1765433699, -0.0092750229, 0.0763942376, -0.2671250701, -0.2846677303, 0.1067421585, -0.4681561589, -0.0044742078, 0.0258459263, -0.0397188365, 0.0368183702, 0.3439414799, 0.1939017475, 0.0860985368, -0.0027804673, 0.1075401604, -0.0836931989, 0.121453397, -0.1025411412, 0.1862477064, 0.1555066705, 0.1888846457, 0.1804462075, 0.3516587317, -0.0817365423, -0.1929061413, 0.0209466182, 0.5004718304, -0.0104154125, 0.3968640268, 0.2594713569, -0.13919954, -0.2249691486, 0.1984294355, -0.2625111043, 0.3533536196, 0.1530501544, -0.0697850138, 0.3267529309, -0.269104898, -0.3553439379, 0.1939435452, 0.0401574895, 0.2229404151, -0.0164990071, 0.3850227892, -0.0000718925, -0.4463832974, -0.2158682048, -0.0241144821, 0.2902513146, -0.1957820356, 0.233346507, -0.278899014, -0.4786585271, -0.3216553926, -0.3746157289, -0.2644888759, -0.1139182895, 0.1861761361, 0.087578088, 0.0209138542, 0.2171656489, 0.306568861, 0.2534182072, -0.2405574322, -0.2795979977, -0.2933272719, -0.2630260587, -0.6036444902, 0.0401453301, 0.3904754221, 0.1700222492, 0.1620035768, -0.1685164869, -0.0609381646, 0.4120285809, -0.5072562099, 0.0628773421, -0.1883170754, 0.3759164214, 0.0254064854, -0.1615849733, -0.4956678152, -0.4668340683, 0.0776248053, -0.3616189957, -0.2719081044, 0.0947326273, -0.0823630095, -0.0533252917, -0.2126680017, -0.4288896322, -0.4334759712, -0.176218003, 0.291244477, 0.1114314795, 0.0875861794, 0.4321457446, 0.1826330572, 0.3838964999, -0.0788135603, -0.0156473573, 0.0568739474, 0.1579794288, 0.1709012091, -0.1130349338, -0.286318481, 0.0840019733, -0.0555578247, 0.1250373572, -0.1318464726, -0.5317521691, -0.281597048, -0.0561026186, 0.1225523949, 0.2538727522, 0.0234747734, 0.3396733999, 0.0629492998, -0.0319779441, 0.0732183605, -0.4039271772, 0.0338627622, -0.0514900051, -0.0284922831, 0.0802507401, 0.1063991189, -0.0677917078, 0.7185683846, -0.1301944107, -0.109186016, 0.3972301781, -0.1039800346, 0.1648678184, -0.2360557467, -0.0234851092, 0.1025643945, -0.0177809, -0.1606342494, 0.2749055624, -0.1622767895, -0.4740837514, -0.1905347854, -0.1989636719, -0.2541109622, -0.2911299467, 0.1263338029, 0.3540951014, 0.0426924117, 0.0501411855, -0.1241015643, 0.1096642911, -0.3338997364, -0.0762935355, -0.0461400151, -0.1030332893, -0.0380761065, 0.0496420115, -0.4655982852, -0.456582576, 0.3200002015, 0.4237252176, 0.2264299691, -0.0685279593, 0.003459014, -0.0761089176, -0.2204847038, -0.0725470111, 0.0178988073, -0.0144483736, 0.329928875, 0.1291981637, -0.0789631978, -0.1727334857, -0.3289534152, -0.089214623, 0.3047029078, -0.0836103633, -0.3240817785, 0.1537424922, 0.4683856666, 0.348138839, 0.2129236609, 0.1987856776, -0.321583122, -0.3988632858, -0.1383432597, 0.239751935, 0.0547612309, 0.3466660082, -0.175749734, 0.2279437035, 0.0948213637, -0.1361166835, 0.027053073, 0.4200961292, -0.0073742773, -0.0413124897, -0.0127852857, -0.1898571402, -0.4006465077, 0.1230435222, 0.6168135405, 0.1352258474, -0.2412734628, -0.2904063463, 0.1564191431, 0.4171553254, 0.1968601644, -0.0951199085, 0.0853087902, -0.2908750474, -0.1272574514, 0.1797146797, 0.0900784433, 0.1424270868, 0.1347000599, -0.0143319219, 0.1334297657, 0.6629952192, 0.0605985671, -0.019560799, 0.1840837896, -0.0039892606, -0.3596171141, 0.4945670068, -0.0165605508, 0.9023060799, 0.0052773962, 0.102513507, 0.5774896145, -0.0107114241, 0.3412153125, 0.0877745748, 0.234559536, -0.4027552307, -0.0981083512, 0.0909470618, -0.1632781327, 0.146184966, -0.131116882, -0.5301916003, 0.2345525026, 0.3508247137, 0.0767905712, 0.3780784011, 0.1693215221, -0.1686767191, -0.008611856, -0.4974400699, 0.0724886656, -0.0794619098, 0.1858565807, -0.2010644972, 0.0256023593, 0.0126182586, -0.2772426009, -0.4413923621, 0.3447719812, -0.4248201251, -0.1189622581, 0.4366092086, -0.234528929, 0.2927359939, 0.1134289354, 0.2366979271, 0.1430511326, -0.1989373416, 0.2038394511, -0.1790079623, -0.2164797485, 0.1933829635, 0.1081501395, 0.2353773713, -0.1960169077, -0.2463547587, 0.1433785707, 0.0282352343, -0.2993825972, 0.2750104666, 0.0317363031, -0.0479597151, -0.049714271, 0.0818248466, 0.1291489154, 0.1013893634, -0.1726246476, 0.0994525403, -0.0143505968, -0.096863851, 0.1849934906, 0.0256233606, -0.2739041448, -0.0856633037, 0.3191244006, -0.11602512, 0.12270087, 0.6109798551, 0.3582256436, -0.0135365501, -0.1439748704, -0.1954408735, -0.197633177, -0.347258687, 0.1349239051, -0.089348197, -0.0829551965, 0.2065326422, 0.6358379722, 0.0321334451, 0.0342594534, 0.0322363377, -0.4378576279, -0.1001105458, 0.2935987413, 0.3192721009, 0.0036183624, 0.3327150941, 0.2987147272, 0.2375250757, -0.003166927, -0.2429558039, 0.1284070909, -0.280246824, 0.1713701785, -0.2991990447, -0.1453394294, 0.2783918083, 0.0976633579, 0.0292560756, 0.2056999356, -0.077314347, -0.2213223279, -0.1646213681, 0.1092193723, 0.117989704, -0.2578454614, -0.0989031866, -0.0665440485, 0.2309484631, 0.0404100418, 0.0834897012, -0.1175377592, -0.2224592865, 0.2460853755, 0.0818295926, 0.3629995883, -0.1728778183, -0.0356268957, -0.4094318449, 0.378341049, 0.2551010847, 0.2278324515, 0.1126708388, -0.0049372539, 0.1982801855, -0.0532478578, -0.159825772, 0.0588524491, 0.0549331307, -0.4088421464, -0.0978531092, -0.3386641443, 0.1693821847, 0.3265036345, -0.1732738465, -0.1791539788, 0.4539533556, 0.1184347123, -0.4062668085, -0.0042904504, 0.1541661322, 0.1295665652, -0.0078925118, 0.2604047358, 0.2204558849, -0.1430948973, 0.0729007721, 0.2042341679, 0.2934797108, 0.0710897893, -0.1808235943, 0.2278168947, -0.2106998563, 0.0991224796, 0.1873727441, 0.047317557, 0.4222981334, 0.1560612917, -0.2856240869, 0.209425956, -0.274192214, 0.2412853837, 0.12571913, -0.1985060275, 0.0964619815, 0.4508839846, 0.290731132, -0.1011622548, 0.2107513547, 0.5228332281, -0.1316389591, 0.0980872214, -0.185736388, 0.2679846883, -0.0171089731, -0.1236454397, -0.0687999874, 0.0355309099, -0.1854602098, 0.1501880884, -0.1470806152, -0.0095155127, 0.3960524797, 0.2103189528, -0.2445914, -0.0783881545, 0.0146136843, 0.1155374497, 0.06769339, -0.1753289104, 0.3981388211, 0.0947019011, -0.187160328, -0.0908767283, 0.6913025379, 0.5602603555, 0.1460423321, -0.3398174345, -0.1216661781, -0.3152952492, 0.0107180327, -0.104977563, 0.2884893417, 0.3598893583, 0.4698313177, 0.2505151927, 0.0743763372, -0.0902577788, 0.3026506007, 0.1644704193, -0.1791979969, -0.0782846883, 0.0311261415, 0.124298811, -0.1412471831, -0.308264941, 0.027674688, -0.1040878817, 0.3828433156, 0.182832703, -0.0276295189, -0.0220517404, -0.1087612361, 0.0421988554, 0.2338199317, 0.5969293714, 0.4660426676, 0.5083937645, -0.3644014597, -0.17659235, -0.5498262048, 0.1105112359, -0.3375611901, -0.0191143565, 0.0430706628, -0.1309382766, -0.1224299669, 0.3655652404, -0.2373730838, 0.4322907627, -0.3409903944, -0.1812257916, -0.4165716171, 0.0285935551, 0.0152049884, -0.2957244515, -0.1329243183, -0.2455764115, 0.2400432974, -0.6261114478, -0.0680846274, -0.1121461317, -0.2224588394, 0.1780539006, 0.1108795479, 0.4410932362, 0.1155420691, 0.5288137197, 0.0060330108, 0.0991595015, -0.1156324148, -0.3268687129, -0.1695926189, 0.156598568, 0.0898522362, 0.1825830787, 0.0029964112, 0.2266045213, -0.0841833353, 0.581563592, -0.0408005379, 0.2421085238, 0.2631012797, 0.0312383547, -0.0804893598, -0.082791239, -0.0333435535, 0.2000128478, -0.0544319786, -0.1092604399, -0.5326638818, -0.4132596552, 0.3147660792, -0.5150582194, -0.0720602199, -0.2050060481, 0.0867945701, 0.267555505, -0.3100771308, -0.6111451983, 0.0503032953, 0.2234053612, 0.0954605639, -0.4149086475, 0.1335823536, 0.2899444103, 0.0462744832, -0.0948519483, 0.4303212762, 0.0408821665, -0.0606980696, -0.2343916595, -0.2921996415 ]
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.3563596606, 0.2692832947, 0.0403540805, 0.0255090427, -0.1082256585, -0.212416321, 0.1698408872, 0.2209275365, -0.1462265551, 0.1146728992, 0.0956545621, 0.5587816238, -0.2984775305, 0.0380700156, 0.062306758, -0.0809184313, 0.1304243207, 0.385869354, 0.0610737056, 0.1696230471, -0.2576373816, 0.3070938587, -0.4419917166, 0.2494820803, -0.2984103858, 0.0139223915, 0.0193618909, 0.0773461461, -0.3678002059, -0.6848936081, 0.4637120366, -0.1372094601, 0.2255126238, 0.325245291, -0.000117499, -0.0126846284, 0.4980807006, 0.1090353206, -0.1948446184, -0.4525274038, 0.0962284654, -0.4826615155, 0.387570858, 0.0097493529, 0.0457870364, -0.026452532, 0.3028817177, 0.6757782102, 0.265758574, 0.217684716, 0.166781202, 0.2213875949, 0.4098851085, 0.025735192, 0.4948374033, -0.2362094223, -0.1034502685, 0.7628588676, 0.2007295489, -0.3635477424, 0.0591912493, 0.1609632075, -0.2842776477, 0.0079968534, 0.0868148804, -0.0093613528, -0.0282803215, -0.280356288, -0.0704236701, 0.2334548682, 0.278668493, -0.3727607727, -0.2139856219, -0.0369420499, 0.1685261577, -0.5201522708, 0.2031878531, 0.2061317265, -0.2479265034, 0.2166701555, 0.0423113704, -0.036325559, -0.1677533686, 0.1888072938, -0.1594610065, 0.7550781369, 0.0910480469, 0.1258874834, 0.2515867651, -0.0595552586, 0.5646768808, 0.2610051632, -0.0171776824, 0.1957464516, -0.0181444474, 0.0440118909, 0.0082142092, 0.5163200498, 0.0293625295, -0.344895184, 0.0096517503, -0.0534602702, 0.1265421808, 0.4474956989, 0.0249657966, -0.0634339824, 0.0032088589, -0.1259063482, 0.3919042051, 0.0218872838, 0.1578954458, 0.103036575, 0.0269261412, -0.3716895282, -0.0051642433, -0.0394148268, 0.3415208459, -0.2093355656, -0.302834332, -0.2567170262, -0.5051162839, -0.0087983012, 0.0819453225, 0.1959879696, -0.1884274781, -0.0456600226, -0.0135043189, 0.1332434714, -0.2568022609, -0.1132040322, -0.0069235396, 0.174941048, -0.233750701, 0.0082894936, 0.248878777, -0.1568795294, 0.2385910451, 0.1839187294, -0.158338204, 0.1740049273, -0.0879789516, -0.154387489, -0.1690747738, 0.3463727534, 0.0948099643, -0.0689554811, -0.1549713612, -0.441806376, -0.2765376568, 0.3989025056, -0.2178524137, -0.3779515028, -0.2776353061, 0.1390898377, -0.4142242074, -0.197752431, -0.2286474407, 0.1975178719, -0.0626466423, -0.518541038, -0.1106969342, -0.4185703993, -0.258801192, -0.2167461514, -0.0355004855, 0.2313153446, -0.4213175774, -0.0013214052, -0.2052949369, -0.1577325463, 0.202918902, 0.1241732016, -0.2396297753, 0.0035148263, -0.071043171, 0.2006300688, 0.3293654919, -0.1011556163, -0.3482895494, 0.0037730597, -0.1243554428, -0.0796840489, -0.0503575504, -0.0146264322, -0.2075434178, -0.1026688665, 0.1115061417, 0.219184041, -0.0628921315, 0.0518534109, -0.3201493323, -0.282230705, 0.240940243, 0.1795420349, 0.0290730316, -0.1322246194, 0.1251464486, -0.0511677153, 0.1506909132, -0.1088013351, -0.195681721, -0.0068310052, 0.3765252829, -0.1861535609, -0.1213011071, -0.0252114832, -0.4246261418, 0.1397030354, -0.2081702352, 0.2105349749, -0.1813574433, -0.138798058, -0.1585412174, 0.2024341822, 0.0917206556, 0.086493291, 0.0574881323, -0.0538417622, 0.148298949, 0.2236872464, 0.0374072716, 0.0488240719, 0.0423657447, 0.1162125468, -0.0075119939, 0.2853105664, -0.3939153552, -0.5148022771, 0.1104201525, 0.1565468162, 0.1446731538, 0.0030893125, 0.0473883636, 0.0985333323, 0.0302923508, 0.1519058496, -0.4095864892, -0.1629497558, 0.1721083671, -0.4360500872, 0.0903435424, -0.0005214661, -0.0892998427, 0.1381736994, 0.3890040219, 0.2938118875, 0.1787321121, -0.0771885663, -0.0478579402, 0.0068732128, 0.0108243451, -0.021976158, 0.0616079271, 0.0079061314, 0.1270698905, 0.3067644835, 0.1165507734, 0.0130091645, -0.3182851672, 0.1458011568, 0.4736978412, 0.0787649155, 0.1612202823, 0.1202906668, -0.0150474012, -0.2019604892, 0.2824192643, -0.2004909962, 0.2364269942, 0.2488379031, -0.079195708, 0.2862407565, -0.3474994898, -0.2463964522, 0.066219829, 0.079555586, 0.247833997, 0.0545607321, 0.2800652981, 0.0440860167, -0.3395345807, -0.0405014083, -0.0013771169, 0.3130807877, -0.1538748741, 0.2280434519, -0.3657150269, -0.5152049065, -0.293438375, -0.3485786319, -0.4190297723, -0.04557392, 0.0744506568, 0.3852238655, 0.0903393626, 0.2260422111, 0.3749237359, 0.0267463624, -0.2834902406, -0.2804328799, -0.1622313261, -0.318716377, -0.5653554201, 0.005158633, 0.274171859, 0.1464021206, 0.183404997, -0.1747496128, -0.0374334231, 0.1914409399, -0.6024133563, 0.0411877297, -0.2708110213, 0.3899643421, 0.1654329747, -0.0756171346, -0.4261088371, -0.3029899299, 0.0499659777, -0.2672174573, -0.2311028838, -0.0775555149, -0.3112014532, 0.1056583524, -0.2025436163, -0.0183188766, -0.583675921, -0.2559036314, 0.0728111565, 0.0824735463, 0.1966980249, 0.3112362027, 0.2778767645, 0.2048359215, 0.099917978, -0.1780399233, 0.074447602, 0.0728751868, 0.2003842443, -0.1788430363, -0.2410309613, 0.2172350585, -0.120208092, 0.0211117268, -0.0540608726, -0.4464502931, -0.4577822685, 0.0401119664, 0.3177599311, 0.1763345748, -0.0380549878, 0.4169330299, 0.0920339525, 0.0213223286, 0.011006847, -0.4104077816, -0.222530216, 0.0307435691, 0.1950928122, 0.1226698905, 0.2151461989, -0.0781215653, 0.6302810311, -0.2324965596, -0.1335867047, 0.4108280838, -0.1130619347, 0.2641091347, -0.0445306748, -0.0441884995, 0.0038074553, 0.0769339651, -0.0762547627, 0.2126750201, -0.142768532, -0.5381869078, -0.2042011619, -0.2447572052, -0.215671733, -0.17748335, 0.0836957097, 0.4492427707, 0.1635317355, 0.1125489622, -0.1237437427, 0.0148284882, -0.3518212438, -0.1838133931, 0.0659232512, -0.1047118753, 0.0882325768, 0.3130834401, -0.5570734143, -0.3975997865, 0.3536091447, 0.4260615706, 0.0035992041, 0.0674594864, -0.0581376255, 0.0563076958, -0.1231956035, 0.094919242, -0.0509751439, -0.0039707222, 0.237579152, 0.1718691587, -0.2469354272, -0.19550924, -0.1156434491, 0.0992515534, 0.2949612737, -0.0017339475, -0.2660155594, 0.0775735304, 0.5640844703, 0.4030726254, 0.0865183622, 0.041852165, -0.4508180618, -0.4398842454, 0.0007968023, 0.0757174119, -0.0469193086, 0.2802648246, -0.1493752897, 0.1977668703, 0.1838616282, -0.1324866265, -0.1131207198, 0.4778262973, 0.0720001161, 0.0505935252, -0.0745617747, -0.1453447342, -0.2305831611, 0.3679276407, 0.4935187697, 0.1361134648, -0.0545003973, -0.1077051163, 0.3420846462, 0.221244216, 0.1268025041, -0.0517875478, 0.0296381153, -0.1030544639, -0.2111228406, 0.2338954508, -0.0035015158, 0.0897078961, -0.0347039849, -0.2627059817, 0.1297745109, 0.666052103, 0.2021788359, -0.0882268548, 0.0257418621, -0.0114509314, -0.1990587711, 0.3481171131, 0.0743566081, 0.8326461315, -0.0258946307, 0.0767494291, 0.6967656016, -0.1195193082, 0.6577324867, 0.2338545024, 0.3234879076, -0.3517786264, 0.0525325537, 0.0392548069, -0.0763088316, 0.1141754016, -0.1606543958, -0.4357736111, 0.2853177488, 0.2705798447, 0.0429766104, 0.3506115675, 0.150079295, -0.0647966787, 0.0263772383, -0.3548264503, 0.0793814138, -0.1717133522, 0.2368306667, -0.3579494953, -0.0989946276, 0.07264705, -0.3737099469, -0.4061588645, 0.1980189383, -0.3119515181, -0.0859909058, 0.2118493617, -0.4263005853, 0.0714573562, 0.0048072929, -0.0199047998, 0.0301705264, -0.1736851484, 0.2135379016, 0.0277873557, -0.2682162821, -0.0950965062, 0.1593030542, 0.1995507628, -0.1809954941, -0.18069157, 0.1141974106, -0.0766468346, -0.1602270901, 0.1103010029, 0.2179473042, -0.1576022655, 0.2590269446, 0.0707158446, 0.0208600406, 0.2043579221, -0.154830128, 0.1161687672, -0.0316251926, 0.0968475714, 0.1447460055, -0.1322199106, -0.2569978833, -0.1296864748, 0.29179281, 0.0648807734, 0.1338760853, 0.4178506434, 0.2300006747, -0.0808646604, -0.0924580991, -0.1907214373, -0.2852122188, -0.3821772039, 0.0474343784, 0.1602157652, 0.1208627373, 0.2363419235, 0.4325949252, 0.175997138, 0.0349694155, -0.0027747825, -0.3610960841, -0.1583455503, 0.3478942513, 0.1118844599, -0.0918348432, 0.2412368655, 0.43023476, 0.2563734949, -0.2708001435, -0.2438817918, 0.2088716477, -0.0774834007, 0.1995979995, -0.1697114706, -0.038477771, 0.0325776301, 0.0321034044, 0.0391287841, 0.103498362, -0.0770382807, -0.1986405253, -0.1042039841, 0.1216511875, 0.1287730187, -0.2363010645, -0.1117767021, -0.1011831462, 0.0765411556, 0.1567934602, 0.0715918615, 0.0031397343, -0.1735083163, 0.1497433484, 0.1444467306, 0.2842688859, 0.0129262283, 0.1131563634, -0.2149541378, 0.4630051255, 0.2806184292, 0.360798806, 0.1898019612, 0.0785510838, 0.2958896756, -0.1503777057, -0.2741988897, -0.1127206013, 0.0156947877, -0.3167330325, -0.0584834032, -0.3318294585, 0.2149788737, 0.3215720654, -0.077657342, -0.1874495447, 0.5202893019, 0.1215226725, -0.4359512627, 0.0913800374, 0.191585511, 0.145250693, -0.0492454767, 0.2615137398, 0.2311931998, -0.0020170361, 0.2134949565, 0.2170176804, 0.2639145553, 0.2480230778, -0.0180775803, 0.2537197173, -0.1021506339, 0.1275252402, 0.2133235335, 0.1908535808, 0.3731150627, 0.0213817153, -0.2727659643, 0.1267825663, -0.2584777474, 0.0701355413, 0.0152741764, -0.4455846548, -0.0612624846, 0.3297211826, 0.2798148692, -0.2126592696, 0.2182136178, 0.3516300619, -0.0680862963, -0.0510077104, -0.1703102589, 0.3314241171, -0.102005899, -0.0153342448, -0.0075725392, 0.0484620482, -0.151190415, 0.2374205142, -0.0631156936, -0.0850850567, 0.1830565482, 0.2144212574, -0.2929427922, -0.1625159383, 0.0525892787, 0.2145337909, -0.0869384855, -0.0650165752, 0.3325572908, -0.1309388429, -0.3034471571, -0.2252879441, 0.4857278466, 0.5330036283, 0.3011163771, -0.2612906396, -0.2222594321, -0.2724911571, 0.0934620798, -0.1609717607, 0.0910235494, 0.4010381699, 0.4848848879, 0.2285536975, 0.0634375438, -0.1281142682, 0.3109258115, 0.1588610411, -0.0454523563, -0.0872867852, 0.0489245318, 0.0879377127, -0.0846334547, -0.1388154626, 0.1435384005, -0.2690293193, 0.480211705, 0.189414978, 0.2815274894, -0.0888151973, -0.1190420091, 0.0334635861, 0.1205507293, 0.5594963431, 0.4931657314, 0.5704357028, -0.1983356178, -0.2719708681, -0.6176347733, 0.1832295358, -0.5359069705, 0.2179710269, 0.0753015056, -0.0515667647, -0.2211532444, 0.3695659041, -0.2084881067, 0.1653896272, -0.1704199612, -0.1918790787, -0.2623127699, -0.0385401547, 0.0660196394, -0.3587387502, -0.0989604369, -0.2771790624, 0.1449617594, -0.7602840066, -0.0124444552, -0.3348177373, -0.2329120934, 0.0799500793, 0.1844254136, 0.5588232279, 0.1272923201, 0.468396306, 0.1397475302, 0.0165383294, -0.2916197479, -0.261952728, -0.3168057501, 0.2344325185, 0.0930425525, 0.2211835384, -0.1172398329, 0.1349563301, -0.2433461398, 0.4795068502, -0.1296812296, 0.1860697567, 0.2657741904, 0.0335795507, -0.1438552588, -0.0505993254, -0.2359083593, 0.0007022773, 0.0278323311, 0.0293658674, -0.5606936812, -0.348097831, 0.3855324388, -0.4710201025, 0.029595837, -0.2068918347, 0.1031739563, 0.1791052222, -0.3120689094, -0.396477133, 0.1284192801, 0.2803569436, 0.1081898063, -0.3001502156, 0.1338800192, 0.0364999883, -0.0632792264, -0.0691589117, 0.2066378891, -0.0287697613, -0.2944737673, -0.1139805689, -0.2467908859 ]
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.3427738845, 0.2993348837, 0.0278662331, 0.000825068, -0.053373795, -0.2322781086, 0.258243382, 0.1790958345, -0.2328969389, 0.1098071635, -0.0035005212, 0.6347991824, -0.2590233684, 0.1106951535, 0.1111481637, -0.0966254249, 0.1224776879, 0.3842332363, 0.032078214, 0.1150274873, -0.2321145535, 0.3013064861, -0.4014841616, 0.2736142576, -0.3001113832, -0.0178908743, -0.0336272269, 0.0969625711, -0.286727041, -0.6638885736, 0.4799574018, -0.0461135916, 0.2491191924, 0.2177291363, -0.0001120963, 0.0018573254, 0.4446172714, 0.0588437393, -0.1980580389, -0.4029646516, 0.034119159, -0.4738247991, 0.4145331681, -0.0984017998, 0.0098399073, -0.0233777519, 0.2621847689, 0.6624276638, 0.3113106787, 0.202609241, 0.2112782747, 0.2363432944, 0.3234766722, 0.0074098669, 0.4227244258, -0.1575136781, -0.0963937789, 0.764811039, 0.1429359615, -0.3419243991, 0.0089759827, 0.1031950414, -0.2788569331, 0.0289602317, 0.0219220333, 0.0070115551, -0.1472039372, -0.3071438968, -0.0639110059, 0.2735511959, 0.2462309003, -0.3698071539, -0.1704454422, -0.0098758265, 0.1577401161, -0.5250216126, 0.1430395246, 0.2469918877, -0.3028102815, 0.2058751434, 0.1286192536, -0.1188331321, -0.186057061, 0.1715102941, -0.1171360612, 0.7375591397, 0.1335552335, 0.1152553111, 0.2805885077, -0.0567425452, 0.540766716, 0.3088674545, -0.0792702809, 0.1202863157, -0.0427252576, 0.0211690664, 0.0225462094, 0.3409097791, 0.024908796, -0.247307241, 0.0255865008, 0.022566963, 0.1256217062, 0.4503286779, 0.059961535, -0.0484906659, -0.0453351438, -0.0046343245, 0.4267907143, -0.0066439696, 0.1369570643, 0.0808407962, -0.012274269, -0.2847604752, -0.0170378387, -0.067654267, 0.2775865495, -0.1611774564, -0.3963501751, -0.282199055, -0.4359753132, 0.0238582343, 0.0372933634, 0.195022285, -0.1200188845, -0.1023529023, 0.0121810734, 0.1517195106, -0.2696358562, -0.0800237507, -0.0334360898, 0.195278883, -0.2237410098, 0.0621652082, 0.2317143381, -0.1511159241, 0.2136741281, 0.1638039351, -0.1062264442, 0.2310114652, -0.0294301584, -0.1341703534, -0.1386495382, 0.2887901068, 0.1331017911, -0.083909981, -0.1724686325, -0.3421244323, -0.2602790594, 0.3834967017, -0.2810297012, -0.3486572504, -0.3057535291, 0.1715805978, -0.3623221815, -0.2298499197, -0.2415512502, 0.1925080568, -0.1000902355, -0.5023196936, -0.1039682776, -0.3521399498, -0.0717570856, -0.2018391341, -0.0292972475, 0.2034841925, -0.3529724479, -0.0353136361, -0.1182200983, -0.1545044035, 0.2850584686, 0.2002338469, -0.2665146291, 0.0042174496, -0.1132774502, 0.2782344222, 0.2827666104, -0.0782019719, -0.3504201174, -0.0246290807, -0.0884431899, -0.1190677136, -0.05654677, -0.0112743713, -0.0793265253, -0.0798390061, 0.1883730292, 0.2289941758, -0.020691175, 0.0899544135, -0.344425261, -0.3358955979, 0.2805464268, 0.1920299381, 0.0722373575, -0.1789545715, 0.0699492469, -0.0459710173, 0.1574606597, -0.169922635, -0.181415379, 0.0086772647, 0.4186849594, -0.1727125943, -0.1212950945, 0.0149608329, -0.3636223376, 0.0653886274, -0.2499879003, 0.3446654379, -0.1689762622, -0.1383541524, -0.0968619585, 0.154022485, -0.0032700207, 0.0448436663, 0.1141757742, -0.0692192614, 0.0930159688, 0.230772227, 0.0139851719, 0.0700310245, 0.0974472016, 0.0902946666, 0.075529173, 0.3200627863, -0.3432149887, -0.5013924241, 0.1558917165, 0.1919504404, 0.0954931825, -0.0152712837, 0.0595765114, 0.0701607391, -0.0414919741, 0.1012135148, -0.3247618973, -0.18534033, 0.246216327, -0.4993384182, 0.0803941116, 0.0131682791, -0.0752407461, 0.1265432537, 0.402869314, 0.3070375919, 0.180332005, -0.0566326454, -0.0034644157, 0.060174711, 0.1596661061, -0.0279674008, 0.0723467916, 0.0341919437, 0.1038173884, 0.3129440844, 0.1196288764, -0.0223806947, -0.3551899791, 0.1838107854, 0.471106559, 0.0623613596, 0.2583271563, 0.2070450634, -0.0968047678, -0.1911535263, 0.2963225842, -0.2238921225, 0.2534522712, 0.2617912292, -0.0768612027, 0.2503485978, -0.3105473816, -0.3091455698, 0.0943921059, 0.0421276018, 0.1733685732, 0.0248517692, 0.3159974813, 0.0110517703, -0.3823559284, -0.0541484207, 0.0020073205, 0.2897808552, -0.1607692689, 0.2292200327, -0.3812182546, -0.584412694, -0.2033058107, -0.3761789799, -0.3669311404, -0.074316971, 0.0838028044, 0.3103743792, 0.0543878376, 0.2557636797, 0.4026352763, 0.0697185174, -0.2327950746, -0.2434328198, -0.209312588, -0.4130922258, -0.541390121, 0.0675750226, 0.2533716261, 0.1499052793, 0.2001347989, -0.1714406312, 0.0169509202, 0.1043808609, -0.5898127556, 0.1002968848, -0.2247342765, 0.3380075395, 0.1060064137, -0.0794154257, -0.3944553733, -0.3828274012, 0.1079261824, -0.2567721307, -0.1813483536, 0.0085921735, -0.3333747983, 0.0928748101, -0.2160847783, -0.1032110453, -0.6534885168, -0.2656673789, 0.1510529816, 0.1169590354, 0.1299254447, 0.3539074063, 0.229195267, 0.1824575514, 0.0490744486, -0.1751546264, -0.0114476439, 0.0290604606, 0.2000274062, -0.2042184025, -0.2945662141, 0.147258237, -0.1673743576, 0.093181476, -0.0429618992, -0.4215467572, -0.4417277575, 0.0855793953, 0.384021759, 0.1543041319, -0.0067447973, 0.3419800699, 0.0956141651, -0.034199439, 0.0839707777, -0.31510216, -0.0966732949, 0.1171038151, 0.1417522877, 0.0434582159, 0.1518177986, -0.1093010008, 0.6300574541, -0.2139457017, -0.1077205092, 0.4509526789, -0.10720478, 0.3438109756, -0.0944145024, -0.0752923042, 0.048007749, 0.0440236442, -0.0963852257, 0.1973456442, -0.2002138495, -0.5494319201, -0.1968809664, -0.2261254489, -0.1790664494, -0.2719098926, 0.0905910209, 0.4456665516, 0.1552731097, 0.1197676808, -0.1132985204, -0.0142352954, -0.3394672275, -0.1343711019, 0.0364557728, -0.101660952, 0.0346687287, 0.2814471126, -0.5303832293, -0.5247495174, 0.2502904832, 0.3806579113, 0.0215020999, 0.0081424713, -0.062611185, 0.0872102827, -0.1062910929, 0.0684471354, 0.0922205448, -0.097135812, 0.2445696592, 0.2222720236, -0.2340102792, -0.1920470595, -0.1934926957, 0.1639664918, 0.3089672029, 0.0047290567, -0.3216295242, 0.0847142935, 0.5238485932, 0.3645199835, 0.0546269268, 0.0535176173, -0.380958885, -0.5595189333, -0.0602218881, 0.0733546093, -0.0392755792, 0.2775349617, -0.1529998779, 0.1538331211, 0.1033133864, -0.1528434455, -0.104369536, 0.4947176576, 0.0936842561, -0.0129777044, -0.0004543364, -0.1389582455, -0.2887955904, 0.3949984908, 0.4543973804, 0.1464977562, -0.0440173298, -0.0468862578, 0.2194832116, 0.2195370942, 0.0662068799, -0.0709818751, 0.1114897802, -0.2176209688, -0.1598273367, 0.1562424153, 0.0562022403, 0.0816565305, -0.0320802629, -0.2292524874, 0.0558030978, 0.6698861122, 0.1846268326, -0.0693131164, -0.027919475, -0.0430284217, -0.2264949679, 0.3169517219, 0.1045501828, 0.822883606, -0.0489421785, 0.1441758871, 0.7622257471, -0.029668279, 0.6805465817, 0.1497792006, 0.3072378039, -0.3835256696, 0.0588018633, 0.0728256479, -0.0609899946, 0.0731472597, -0.1455004215, -0.3930556476, 0.2606293261, 0.2867896557, -0.0264761969, 0.2877855599, 0.141999051, -0.026943922, -0.0531504676, -0.3452912867, 0.1084248573, -0.1777224094, 0.2079710215, -0.3530265987, -0.1281891465, 0.0871091336, -0.3031853437, -0.359116137, 0.2581677139, -0.2969035804, 0.046878539, 0.174272269, -0.4596209526, 0.0165952519, -0.0784514919, -0.0620595366, -0.037171226, -0.1562342942, 0.1665723324, 0.0004105587, -0.3037153184, -0.0537535958, 0.2256668806, 0.2189046293, -0.2000871301, -0.1893268079, 0.1877376139, -0.0495270826, -0.1875082254, 0.10612607, 0.2045487463, -0.1142982766, 0.1869373024, 0.0794340745, 0.0730263889, 0.1906561106, -0.1356146485, 0.1421960741, 0.0207576361, 0.0778237879, 0.1563088894, -0.0535741746, -0.1859850883, -0.1643832326, 0.2252759039, 0.0967031568, 0.1861317158, 0.4558209479, 0.174126029, -0.0832391828, -0.1470934153, -0.1463322937, -0.3217687011, -0.3653514683, 0.0773962066, 0.2588823736, 0.1288866997, 0.2183811367, 0.3914042711, 0.1139284372, 0.0233523976, -0.0448612422, -0.3423526883, -0.2197382897, 0.3276676834, 0.0574601851, -0.0691527352, 0.2971717715, 0.4240754545, 0.1978619844, -0.263489306, -0.2902501822, 0.1804887354, -0.1675820053, 0.1667113006, -0.1106210649, -0.1134624407, 0.0569194369, 0.0713067204, 0.0857155621, 0.1060403436, -0.0339441225, -0.2348020673, -0.0859386697, 0.0918136835, 0.161465928, -0.2099700719, -0.1105782017, -0.1162212193, 0.055226136, 0.1327280998, 0.0840236843, -0.02907639, -0.2390405834, 0.1647337973, 0.1377288699, 0.2250226736, -0.000517197, 0.1514250636, -0.1787543297, 0.4222080708, 0.23052378, 0.3370656967, 0.1093784422, 0.098259449, 0.3143338561, -0.121488817, -0.1571284533, -0.1349675208, 0.0401115716, -0.3493872881, -0.0280438513, -0.3854213655, 0.1530696303, 0.3556881249, -0.0881109238, -0.1875219345, 0.5486344695, 0.1611547321, -0.4660822451, 0.052332744, 0.0850413218, 0.0544776022, -0.0468841046, 0.2423153818, 0.2471879721, -0.0384110138, 0.2116465867, 0.1933157444, 0.2679807544, 0.2615717649, 0.0040840097, 0.2276210487, -0.135846436, 0.1243591011, 0.2575095296, 0.1837985665, 0.3727380633, 0.0371420719, -0.3018249869, 0.2114649415, -0.2427953035, 0.0761609972, 0.0475601926, -0.4293703437, -0.1298655868, 0.2108360082, 0.2840992212, -0.1893673539, 0.1755263805, 0.4341079891, -0.1155912057, 0.0032039694, -0.1722658426, 0.4161436558, -0.1437199414, -0.0262854174, 0.0578351542, 0.0214270353, -0.0630157292, 0.2276251912, -0.1368115842, -0.1164048985, 0.2230812162, 0.1955063343, -0.1940454841, -0.1434908062, 0.0630191863, 0.2389403284, -0.1176957935, -0.0176229179, 0.2848542631, -0.0744715929, -0.3305773437, -0.2518535256, 0.5178359747, 0.557028532, 0.2944158614, -0.3138181567, -0.228109628, -0.2676805854, 0.0981901139, -0.1367555708, 0.0734224617, 0.4513372779, 0.4381738305, 0.1812367588, 0.1011428833, -0.1797259152, 0.261293143, 0.2013242841, -0.0368176587, -0.0303332955, 0.0452714115, 0.0853583664, -0.1082080528, -0.1608339846, 0.0098688304, -0.2683596015, 0.4186892211, 0.2106876373, 0.2166280299, -0.1077708304, -0.144601211, 0.0757287517, 0.1124669462, 0.6587210894, 0.4152348042, 0.5267051458, -0.2332032323, -0.2329096347, -0.5888137221, 0.2068112344, -0.4867606461, 0.0917183533, 0.0359306559, -0.0490405373, -0.1855452359, 0.3980053663, -0.2160434723, 0.3255216181, -0.1239697188, -0.2867913842, -0.3391120434, -0.0271018315, 0.018910164, -0.3432719409, -0.0960095152, -0.2429415137, 0.1460619569, -0.6712960005, 0.0536423028, -0.3101528287, -0.1983036995, 0.0495860651, 0.1595617831, 0.5663315058, 0.1240323633, 0.5083731413, 0.1158206463, 0.0103750974, -0.1272683442, -0.380597055, -0.2422289848, 0.2114136964, 0.1376101375, 0.1287819445, -0.076254867, 0.0794654489, -0.2455942631, 0.4317283928, -0.1461814493, 0.1392711401, 0.2135456502, 0.100648649, -0.0860764012, -0.0981784537, -0.209415555, 0.0486906879, -0.0006398018, -0.0257485509, -0.5031927228, -0.3479790986, 0.3578094244, -0.4954041243, 0.0160117, -0.1722180247, 0.0751726851, 0.0758838356, -0.2522552311, -0.3977369964, 0.1655828655, 0.2635035217, 0.0735245943, -0.2914825082, 0.1351568252, 0.0072117448, -0.0872237906, -0.1138579994, 0.2276300192, 0.0252948888, -0.2854982018, -0.1105774492, -0.1900272965 ]