html_url
stringlengths
48
51
title
stringlengths
5
268
comments
stringlengths
63
51.8k
body
stringlengths
0
36.2k
comment_length
int64
16
1.52k
text
stringlengths
164
54.1k
embeddings
sequence
https://github.com/huggingface/datasets/issues/741
Creating dataset consumes too much memory
Yes you did it right. Did you rebase to include the changes of #828 ? EDIT: looks like you merged from master in the PR. Not sure why you still have an issue then, I will investigate
Moving this issue from https://github.com/huggingface/datasets/pull/722 here, because it seems like a general issue. Given the following dataset example, where each example saves a sequence of 260x210x3 images (max length 400): ```python def _generate_examples(self, base_path, split): """ Yields examples. """ filepath = os.path.join(base_path, "annotations", "manual", "PHOENIX-2014-T." + split + ".corpus.csv") images_path = os.path.join(base_path, "features", "fullFrame-210x260px", split) with open(filepath, "r", encoding="utf-8") as f: data = csv.DictReader(f, delimiter="|", quoting=csv.QUOTE_NONE) for row in data: frames_path = os.path.join(images_path, row["video"])[:-7] np_frames = [] for frame_name in os.listdir(frames_path): frame_path = os.path.join(frames_path, frame_name) im = Image.open(frame_path) np_frames.append(np.asarray(im)) im.close() yield row["name"], {"video": np_frames} ``` The dataset creation process goes out of memory on a machine with 500GB RAM. I was under the impression that the "generator" here is exactly for that, to avoid memory constraints. However, even if you want the entire dataset in memory, it would be in the worst case `260x210x3 x 400 max length x 7000 samples` in bytes (uint8) = 458.64 gigabytes So I'm not sure why it's taking more than 500GB. And the dataset creation fails after 170 examples on a machine with 120gb RAM, and after 672 examples on a machine with 500GB RAM. --- ## Info that might help: Iterating over examples is extremely slow. ![image](https://user-images.githubusercontent.com/5757359/96359590-3c666780-111d-11eb-9347-1f833ad982a9.png) If I perform this iteration in my own, custom loop (Without saving to file), it runs at 8-9 examples/sec And you can see at this state it is using 94% of the memory: ![image](https://user-images.githubusercontent.com/5757359/96359606-7afc2200-111d-11eb-8c11-0afbdba1a6a3.png) And it is only using one CPU core, which is probably why it's so slow: ![image](https://user-images.githubusercontent.com/5757359/96359630-a3841c00-111d-11eb-9ba0-7fd3cdf51d26.png)
37
Creating dataset consumes too much memory Moving this issue from https://github.com/huggingface/datasets/pull/722 here, because it seems like a general issue. Given the following dataset example, where each example saves a sequence of 260x210x3 images (max length 400): ```python def _generate_examples(self, base_path, split): """ Yields examples. """ filepath = os.path.join(base_path, "annotations", "manual", "PHOENIX-2014-T." + split + ".corpus.csv") images_path = os.path.join(base_path, "features", "fullFrame-210x260px", split) with open(filepath, "r", encoding="utf-8") as f: data = csv.DictReader(f, delimiter="|", quoting=csv.QUOTE_NONE) for row in data: frames_path = os.path.join(images_path, row["video"])[:-7] np_frames = [] for frame_name in os.listdir(frames_path): frame_path = os.path.join(frames_path, frame_name) im = Image.open(frame_path) np_frames.append(np.asarray(im)) im.close() yield row["name"], {"video": np_frames} ``` The dataset creation process goes out of memory on a machine with 500GB RAM. I was under the impression that the "generator" here is exactly for that, to avoid memory constraints. However, even if you want the entire dataset in memory, it would be in the worst case `260x210x3 x 400 max length x 7000 samples` in bytes (uint8) = 458.64 gigabytes So I'm not sure why it's taking more than 500GB. And the dataset creation fails after 170 examples on a machine with 120gb RAM, and after 672 examples on a machine with 500GB RAM. --- ## Info that might help: Iterating over examples is extremely slow. ![image](https://user-images.githubusercontent.com/5757359/96359590-3c666780-111d-11eb-9347-1f833ad982a9.png) If I perform this iteration in my own, custom loop (Without saving to file), it runs at 8-9 examples/sec And you can see at this state it is using 94% of the memory: ![image](https://user-images.githubusercontent.com/5757359/96359606-7afc2200-111d-11eb-8c11-0afbdba1a6a3.png) And it is only using one CPU core, which is probably why it's so slow: ![image](https://user-images.githubusercontent.com/5757359/96359630-a3841c00-111d-11eb-9ba0-7fd3cdf51d26.png) Yes you did it right. Did you rebase to include the changes of #828 ? EDIT: looks like you merged from master in the PR. Not sure why you still have an issue then, I will investigate
[ -0.2472245246, -0.0484530441, -0.0161761995, 0.2615477145, 0.1814281195, 0.202324003, 0.1410057545, 0.2836433649, -0.0936913937, 0.2016250044, 0.4972397387, 0.1490257382, -0.2346244454, 0.0067336364, -0.0158065781, -0.3033438623, 0.0866440013, 0.055245664, -0.14935112, -0.0251511633, -0.4015743732, -0.0364088193, 0.0979414061, -0.266710043, -0.5073341727, -0.201848805, -0.0731501579, 0.0787196979, -0.1270603091, -0.2315945774, -0.1274704784, -0.0400048569, 0.1177601963, 0.348085165, -0.0001107187, -0.0142072737, 0.2528395057, 0.0560582094, -0.2610013783, 0.255135715, 0.0024831975, -0.2779873312, -0.1727148592, -0.0488481745, 0.2572744191, -0.3003965318, 0.1659738868, -0.358736366, 0.2852359712, 0.310329169, 0.1906798929, 0.2333974391, 0.0225878656, -0.0645371377, 0.0283547472, 0.1364508569, -0.2712321877, -0.0043949671, -0.0322477855, -0.1391171217, -0.1249333546, 0.3213859499, 0.1251341403, 0.0555913374, 0.3767856359, -0.0258993786, -0.3605356812, -0.4826663733, 0.1298621297, 0.2105497867, 0.4798397422, -0.2130852789, -0.1907443553, -0.3127379119, -0.0608718731, -0.2809079587, -0.0386912487, 0.5055589676, -0.4797234833, -0.1568405479, -0.4373590946, 0.0112414192, -0.073932305, -0.0789557174, 0.2725886703, -0.4267039895, -0.0361703448, 0.2112912834, 0.4411445856, 0.0069414587, 0.1683402956, -0.173548162, 0.0405640639, -0.0908014625, -0.2532207668, -0.0523643121, 0.287623018, -0.145363301, 0.3291010857, -0.0412683226, 0.0245143399, -0.2715127766, 0.1530069858, -0.005894172, 0.0967002735, 0.2201670557, -0.4858939052, -0.1767416596, 0.2278589159, 0.0444845669, 0.089915432, -0.1590839624, -0.0274223667, -0.1531637609, 0.2210887372, -0.3335965276, 0.1901998669, 0.2805505395, -0.2625468075, 0.2027173936, -0.2653441429, 0.1029189304, -0.1461306363, 0.1159537807, 0.0655319765, 0.1141219884, -0.1104515344, 0.1520260274, -0.2346289605, -0.2064010501, -0.2843565643, 0.0219006222, -0.2518552542, 0.2018955499, 0.1339295805, 0.2431205362, 0.2170632035, 0.0080231354, 0.0536194742, -0.0079492033, 0.4056237042, -0.2521451414, -0.0064556878, 0.2825169563, 0.1068823636, 0.1090517566, -0.0290897582, 0.1394090205, -0.0898926705, 0.2382695675, 0.0490416139, -0.4122443497, 0.0999206305, 0.150838837, 0.0951702893, 0.2297327965, -0.4434715807, 0.2292865366, 0.1947138309, 0.3888750374, -0.0545384362, -0.0666550547, -0.3439251482, -0.2636186182, 0.1964846998, 0.7139769793, -0.3620709777, 0.2919794321, -0.1818292439, 0.1198834851, 0.1442039907, 0.4414610565, -0.0528312325, 0.488263011, -0.2243761867, -0.2710963488, -0.0880411863, -0.094117485, -0.2132637799, 0.2518541217, -0.1075511202, 0.1572636664, 0.3729577959, 0.2033798248, -0.033494588, -0.0882050395, 0.0497727841, 0.2308511436, -0.358627826, 0.124964878, -0.1097934172, -0.3897539973, -0.0506444015, -0.0010802221, 0.1469896734, 0.0434502959, -0.1591924578, 0.0015703548, 0.1117233187, -0.3314083517, 0.180274561, 0.2826016843, 0.1433033198, -0.1382263303, -0.0929222703, 0.0918077603, -0.2511994839, 0.2500662208, 0.221789822, 0.157918036, -0.0372049212, -0.1576396823, 0.1384071261, 0.0796203837, -0.0405748822, -0.1741779894, 0.0987475514, 0.040851783, 0.2424798012, -0.1990907639, 0.0407797322, 0.4570712149, -0.2844361663, 0.0364054181, -0.6800736189, -0.002343355, -0.0597890392, -0.1311698258, -0.0204952396, 0.029290989, -0.0755664557, -0.0433139876, -0.0115973735, 0.2988156974, 0.2784372866, 0.0222370904, -0.0605902411, 0.1867605001, 0.1487033367, -0.1612708271, 0.3168521821, 0.0585199967, 0.1633767188, -0.0719095096, -0.206185773, 0.0668224692, -0.0958223492, 0.3077230453, 0.2266748548, 0.0122986948, 0.0099704461, 0.2215040475, 0.150966078, -0.0508124419, 0.0896445662, 0.2920499742, 0.1799526811, 0.1877630055, -0.3006310761, 0.0827776194, 0.1254699081, -0.0749200061, -0.10556072, 0.2994287312, -0.1035910323, -0.2416673154, 0.0810322315, 0.2266721874, 0.5017876625, 0.1558397561, -0.1444336772, 0.0478162281, 0.0574759394, -0.2169305235, 0.1586065888, 0.1800119132, 0.3289296031, -0.1385488957, 0.0901936665, -0.0619817339, -0.4440476894, -0.0912800431, 0.1848453879, 0.2858142555, -0.1865232289, 0.2504455149, 0.0615524761, -0.0788814053, -0.0309185535, 0.4246843457, -0.0496709347, -0.2127267122, -0.1706473976, 0.2725590169, -0.0189575031, -0.0283495784, 0.0066528171, 0.2610562444, 0.2244725972, -0.0232953224, 0.0941694677, -0.0079310732, -0.0817144066, 0.1298801601, 0.1777150631, -0.2123886198, 0.4530032575, -0.1707894355, -0.0871115923, -0.2084839046, -0.0723171309, 0.1136234105, -0.228081435, 0.5252374411, 0.1035801321, 0.2522767186, -0.1173249483, -0.1160967723, 0.081955649, -0.0663690642, -0.1613079906, 0.0102342935, -0.0259696357, -0.1146582812, -0.0101680569, -0.1553609669, 0.0795827731, -0.3436992764, 0.3560944796, 0.1022503152, 0.1887515038, 0.5033756495, 0.4098785222, -0.0466414131, 0.1624168158, 0.1523554176, -0.1796499342, -0.3409413695, 0.1021590233, -0.3160605729, -0.3371724486, 0.0466640443, -0.2274665534, 0.2909381688, 0.4419276416, -0.5405669808, -0.2555699646, -0.512784183, 0.178343311, -0.0151667399, 0.2652283907, 0.0903320312, -0.001946914, -0.1002619416, 0.0065975836, -0.1557335705, -0.0046920488, 0.0445124954, 0.1287517548, 0.2151253074, 0.5913012624, 0.0606980287, 0.7865703702, 0.4150092304, 0.1420452893, 0.3436699808, -0.0614235103, 0.4706938565, -0.2932084501, -0.1800682098, 0.2319210619, -0.178716585, -0.2574402988, -0.0831609517, 0.1046685576, 0.0142659871, 0.1273812652, 0.0586723164, 0.0460092425, -0.1819887012, 0.2668033242, -0.0274688974, 0.3461062312, 0.0467384942, 0.036607787, -0.1479358375, -0.016332034, -0.1037027687, -0.1109502763, 0.4852957129, -0.0441752151, -0.4239207804, 0.1098548919, -0.6938712597, -0.1332409382, -0.0965697691, 0.2234218717, -0.0490843393, 0.0660197437, 0.0475893877, 0.0453440584, 0.9892041087, 0.0007065196, -0.2966734469, -0.2548517883, -0.3207205534, -0.4081356525, 0.1653788835, 0.0722285286, 0.1199957877, -0.1644742936, 0.1693555713, -0.1526905894, -0.2036913037, 0.2588399053, 0.4127707481, -0.1430652142, 0.0404213332, -0.2801088393, -0.5489316583, -0.2964857817, -0.1632168144, -0.0055410555, 0.048478175, 0.2352022529, 0.0255420282, -0.0487964526, -0.1557961851, 0.2111777961, 0.1084237397, 0.2446291, -0.0259844474, 0.4257115126, 0.1911683232, -0.3292507827, 0.2183282673, 0.3244982362, -0.0656346008, -0.1088470519, -0.0289759841, 0.1022882462, 0.2475357354, 0.4917107224, -0.2284799516, -0.3292702138, -0.1282334328, 0.2469944954, -0.563716054, 0.1934457123, 0.4815808237, -0.2082684487, -0.1923841387, -0.7430679798, 0.3641575575, 0.3175491095, 0.1278441101, 0.3630659282, 0.0887515023, -0.1641531438, 0.3955097497, 0.2683004439, 0.6815106273, -0.1718037426, 0.4881140292, 0.3426569998, 0.2432330251, 0.3742547631, -0.0830153301, 0.4212850034, -0.0590208843, -0.4138421416, 0.0700451881, -0.1448522061, 0.1890717447, 0.1100220904, 0.2438377142, 0.3425055742, 0.078169547, 0.0153282508, -0.159676373, 0.2752978802, -0.3474655449, -0.4178956747, -0.0688187256, 0.1925275326, 0.0487386324, -0.186029464, -0.0940658599, 0.1372857988, -0.0540783778, -0.1073367298, -0.2376546413, -0.1235264018, -0.2773987055, 0.2645848989, -0.0288830567, -0.1680648178, -0.1311215907, 0.0741544664, 0.0400641374, 0.1833520234, 0.0875315666, 0.1229821965, 0.0256562065, -0.0608530268, 0.0861575231, -0.2096136957, 0.3166002631, -0.0610504635, 0.0272021778, 0.0231164228, -0.0450548269, 0.0166370161, -0.2683942914, -0.0405098312, -0.0224608295, -0.09480986, -0.3335686028, -0.1030180529, -0.2790772021, -0.1800314486, 0.1073122993, 0.167647019, -0.0732504949, 0.393338263, -0.3213767409, -0.1825402826, -0.1805839688, -0.0805970728, 0.2867522836, 0.224737227, 0.344374299, 0.1867702007, -0.0413238779, -0.1183304861, 0.2398529947, 0.2784737349, -0.3960601985, 0.3994886279, -0.0061354511, -0.0835075453, -0.1741186529, 0.0222122893, -0.0347572118, -0.1690719724, -0.0011353826, 0.025138855, -0.4378543794, -0.0114885746, -0.0359177142, 0.309658587, -0.0809227154, -0.2384005785, 0.0569272675, 0.0623046234, -0.2509617507, -0.180609405, -0.0545279011, 0.1300977916, 0.1445484608, -0.0649976805, 0.2266217321, -0.0639651418, 0.0592434555, 0.0769752637, -0.2337152064, -0.1937136948, -0.2092722207, 0.1047558114, 0.1538063288, -0.5640977621, 0.3158084154, -0.2536371052, -0.2878131568, -0.3615009189, 0.2732216716, 0.1587804407, -0.0976023376, -0.2814571261, 0.0315279439, -0.238415882, 0.1754497886, 0.1772964001, -0.0986451581, 0.4965090752, 0.2690392435, 0.2676722407, 0.2177265435, -0.1677126139, -0.3551410437, 0.2323107719, -0.1757253557, -0.2370796204, 0.1685319543, -0.1453194022, -0.1803851426, 0.12709409, 0.1900753826, 0.3366612196, -0.1190790534, 0.0566111393, 0.0406589806, 0.1578795761, -0.0442556664, -0.1291688681, -0.1578694433, -0.0657628328, 0.178305164, 0.4919784069, 0.1858620346, 0.0189373679, -0.4908384681, 0.0165940095, 0.2409808338, -0.0848555639, 0.1650960445, 0.2115797251, 0.1125839129, 0.0071790526, 0.1997704357, 0.2766705155, 0.2983656824, 0.4596777856, 0.0335594602, 0.337552309, 0.153371051, -0.0437305495, -0.0128277941, -0.3350022733, 0.0359270424, 0.2339583784, -0.1810236871, 0.2591884732, -0.0643164143, -0.1826625615, -0.0755793378, -0.2131424993, -0.2734746039, 0.1559333205, -0.1004548892, -0.0916265696, 0.1778086424, -0.0592285581, -0.0837883279, 0.4182518423, 0.0563771985, -0.656408608, 0.1858103424, -0.0279026404, -0.2183392048, -0.0040366384, 0.2878217399, 0.0002881676, 0.1268145889, -0.1856124699, -0.0568970665, 0.1019746885, -0.1687735319, -0.23352772, 0.4316361248, 0.5210511684, 0.2962181568, -0.0155670308, 0.225341633, 0.1285900921, -0.0580608621, -0.2433926016, 0.2078299522, -0.0938503519, 0.347029984, 0.0298523102, 0.0564286709, -0.1199411899, -0.2313877642, 0.4667381644, -0.0322325751, -0.509973526, 0.0713699758, -0.2709576786, -0.0831900015, -0.0014892695, 0.1556717902, -0.3743119538, 0.0142019605, 0.6617760658, -0.3358904421, 0.0529744886, -0.1549556255, 0.0486678854, -0.4334236979, 0.5622742176, 0.2479631305, 0.0245910827, -0.5293911695, -0.0578940362, -0.414503932, -0.2513062358, -0.5728729367, 0.1208465621, 0.2157160938, 0.2678524554, -0.0817704499, 0.1097255126, -0.099143371, 0.1220088974, -0.2385522723, 0.2867417932, -0.0255692955, -0.2052705139, -0.0512691252, 0.0605060756, -0.1328711212, -0.4785496891, 0.217145592, -0.3334966302, 0.0321598276, -0.1802652031, 0.091569908, 0.082893312, 0.1091512442, 0.3665706515, 0.30011186, 0.0304143224, -0.0899441093, -0.4216741025, -0.4540978074, -0.0191898402, -0.2367719561, 0.1167338565, 0.1283491701, 0.3148857653, -0.2542373538, 0.1739490926, -0.2994902432, 0.3420860469, 0.2490569055, -0.2070639133, -0.0978221819, 0.2675933838, -0.3416648209, 0.1588354558, 0.4218653142, 0.2471740097, -0.2160967737, 0.0314046703, -0.2623043954, -0.3741123378, 0.2344355732, -0.3907604814, -0.3366750479, -0.1116327196, 0.0749207363, -0.0133861117, -0.1945162714, -0.1902232319, 0.121638827, 0.1056284159, -0.1063161269, -0.2567143142, 0.2248544544, -0.0328451805, -0.2498074174, 0.0614075884, 0.3020297587, -0.2057995796, -0.3960453868, 0.4934434891, -0.1076573804 ]
https://github.com/huggingface/datasets/issues/741
Creating dataset consumes too much memory
Sorry for the delay, I was busy with the dataset sprint and the incredible amount of contributions to the library ^^' What you can try to do to find what's wrong is check at which frequency the arrow writer writes all the examples from its in-memory buffer on disk. This happens [here](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L257-L258) in the code. The idea is that `write_on_file` writes the examples every `writer_batch_size` examples and clear the buffer `self. current_rows`. As soon as `writer_batch_size` is small enough you shouldn't have memory issues in theory. Let me know if you have questions or if I can help. Since the dataset sprint is over and I will also be done with all the PRs soon I will be able to go back at it and take a look.
Moving this issue from https://github.com/huggingface/datasets/pull/722 here, because it seems like a general issue. Given the following dataset example, where each example saves a sequence of 260x210x3 images (max length 400): ```python def _generate_examples(self, base_path, split): """ Yields examples. """ filepath = os.path.join(base_path, "annotations", "manual", "PHOENIX-2014-T." + split + ".corpus.csv") images_path = os.path.join(base_path, "features", "fullFrame-210x260px", split) with open(filepath, "r", encoding="utf-8") as f: data = csv.DictReader(f, delimiter="|", quoting=csv.QUOTE_NONE) for row in data: frames_path = os.path.join(images_path, row["video"])[:-7] np_frames = [] for frame_name in os.listdir(frames_path): frame_path = os.path.join(frames_path, frame_name) im = Image.open(frame_path) np_frames.append(np.asarray(im)) im.close() yield row["name"], {"video": np_frames} ``` The dataset creation process goes out of memory on a machine with 500GB RAM. I was under the impression that the "generator" here is exactly for that, to avoid memory constraints. However, even if you want the entire dataset in memory, it would be in the worst case `260x210x3 x 400 max length x 7000 samples` in bytes (uint8) = 458.64 gigabytes So I'm not sure why it's taking more than 500GB. And the dataset creation fails after 170 examples on a machine with 120gb RAM, and after 672 examples on a machine with 500GB RAM. --- ## Info that might help: Iterating over examples is extremely slow. ![image](https://user-images.githubusercontent.com/5757359/96359590-3c666780-111d-11eb-9347-1f833ad982a9.png) If I perform this iteration in my own, custom loop (Without saving to file), it runs at 8-9 examples/sec And you can see at this state it is using 94% of the memory: ![image](https://user-images.githubusercontent.com/5757359/96359606-7afc2200-111d-11eb-8c11-0afbdba1a6a3.png) And it is only using one CPU core, which is probably why it's so slow: ![image](https://user-images.githubusercontent.com/5757359/96359630-a3841c00-111d-11eb-9ba0-7fd3cdf51d26.png)
128
Creating dataset consumes too much memory Moving this issue from https://github.com/huggingface/datasets/pull/722 here, because it seems like a general issue. Given the following dataset example, where each example saves a sequence of 260x210x3 images (max length 400): ```python def _generate_examples(self, base_path, split): """ Yields examples. """ filepath = os.path.join(base_path, "annotations", "manual", "PHOENIX-2014-T." + split + ".corpus.csv") images_path = os.path.join(base_path, "features", "fullFrame-210x260px", split) with open(filepath, "r", encoding="utf-8") as f: data = csv.DictReader(f, delimiter="|", quoting=csv.QUOTE_NONE) for row in data: frames_path = os.path.join(images_path, row["video"])[:-7] np_frames = [] for frame_name in os.listdir(frames_path): frame_path = os.path.join(frames_path, frame_name) im = Image.open(frame_path) np_frames.append(np.asarray(im)) im.close() yield row["name"], {"video": np_frames} ``` The dataset creation process goes out of memory on a machine with 500GB RAM. I was under the impression that the "generator" here is exactly for that, to avoid memory constraints. However, even if you want the entire dataset in memory, it would be in the worst case `260x210x3 x 400 max length x 7000 samples` in bytes (uint8) = 458.64 gigabytes So I'm not sure why it's taking more than 500GB. And the dataset creation fails after 170 examples on a machine with 120gb RAM, and after 672 examples on a machine with 500GB RAM. --- ## Info that might help: Iterating over examples is extremely slow. ![image](https://user-images.githubusercontent.com/5757359/96359590-3c666780-111d-11eb-9347-1f833ad982a9.png) If I perform this iteration in my own, custom loop (Without saving to file), it runs at 8-9 examples/sec And you can see at this state it is using 94% of the memory: ![image](https://user-images.githubusercontent.com/5757359/96359606-7afc2200-111d-11eb-8c11-0afbdba1a6a3.png) And it is only using one CPU core, which is probably why it's so slow: ![image](https://user-images.githubusercontent.com/5757359/96359630-a3841c00-111d-11eb-9ba0-7fd3cdf51d26.png) Sorry for the delay, I was busy with the dataset sprint and the incredible amount of contributions to the library ^^' What you can try to do to find what's wrong is check at which frequency the arrow writer writes all the examples from its in-memory buffer on disk. This happens [here](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L257-L258) in the code. The idea is that `write_on_file` writes the examples every `writer_batch_size` examples and clear the buffer `self. current_rows`. As soon as `writer_batch_size` is small enough you shouldn't have memory issues in theory. Let me know if you have questions or if I can help. Since the dataset sprint is over and I will also be done with all the PRs soon I will be able to go back at it and take a look.
[ -0.2472245246, -0.0484530441, -0.0161761995, 0.2615477145, 0.1814281195, 0.202324003, 0.1410057545, 0.2836433649, -0.0936913937, 0.2016250044, 0.4972397387, 0.1490257382, -0.2346244454, 0.0067336364, -0.0158065781, -0.3033438623, 0.0866440013, 0.055245664, -0.14935112, -0.0251511633, -0.4015743732, -0.0364088193, 0.0979414061, -0.266710043, -0.5073341727, -0.201848805, -0.0731501579, 0.0787196979, -0.1270603091, -0.2315945774, -0.1274704784, -0.0400048569, 0.1177601963, 0.348085165, -0.0001107187, -0.0142072737, 0.2528395057, 0.0560582094, -0.2610013783, 0.255135715, 0.0024831975, -0.2779873312, -0.1727148592, -0.0488481745, 0.2572744191, -0.3003965318, 0.1659738868, -0.358736366, 0.2852359712, 0.310329169, 0.1906798929, 0.2333974391, 0.0225878656, -0.0645371377, 0.0283547472, 0.1364508569, -0.2712321877, -0.0043949671, -0.0322477855, -0.1391171217, -0.1249333546, 0.3213859499, 0.1251341403, 0.0555913374, 0.3767856359, -0.0258993786, -0.3605356812, -0.4826663733, 0.1298621297, 0.2105497867, 0.4798397422, -0.2130852789, -0.1907443553, -0.3127379119, -0.0608718731, -0.2809079587, -0.0386912487, 0.5055589676, -0.4797234833, -0.1568405479, -0.4373590946, 0.0112414192, -0.073932305, -0.0789557174, 0.2725886703, -0.4267039895, -0.0361703448, 0.2112912834, 0.4411445856, 0.0069414587, 0.1683402956, -0.173548162, 0.0405640639, -0.0908014625, -0.2532207668, -0.0523643121, 0.287623018, -0.145363301, 0.3291010857, -0.0412683226, 0.0245143399, -0.2715127766, 0.1530069858, -0.005894172, 0.0967002735, 0.2201670557, -0.4858939052, -0.1767416596, 0.2278589159, 0.0444845669, 0.089915432, -0.1590839624, -0.0274223667, -0.1531637609, 0.2210887372, -0.3335965276, 0.1901998669, 0.2805505395, -0.2625468075, 0.2027173936, -0.2653441429, 0.1029189304, -0.1461306363, 0.1159537807, 0.0655319765, 0.1141219884, -0.1104515344, 0.1520260274, -0.2346289605, -0.2064010501, -0.2843565643, 0.0219006222, -0.2518552542, 0.2018955499, 0.1339295805, 0.2431205362, 0.2170632035, 0.0080231354, 0.0536194742, -0.0079492033, 0.4056237042, -0.2521451414, -0.0064556878, 0.2825169563, 0.1068823636, 0.1090517566, -0.0290897582, 0.1394090205, -0.0898926705, 0.2382695675, 0.0490416139, -0.4122443497, 0.0999206305, 0.150838837, 0.0951702893, 0.2297327965, -0.4434715807, 0.2292865366, 0.1947138309, 0.3888750374, -0.0545384362, -0.0666550547, -0.3439251482, -0.2636186182, 0.1964846998, 0.7139769793, -0.3620709777, 0.2919794321, -0.1818292439, 0.1198834851, 0.1442039907, 0.4414610565, -0.0528312325, 0.488263011, -0.2243761867, -0.2710963488, -0.0880411863, -0.094117485, -0.2132637799, 0.2518541217, -0.1075511202, 0.1572636664, 0.3729577959, 0.2033798248, -0.033494588, -0.0882050395, 0.0497727841, 0.2308511436, -0.358627826, 0.124964878, -0.1097934172, -0.3897539973, -0.0506444015, -0.0010802221, 0.1469896734, 0.0434502959, -0.1591924578, 0.0015703548, 0.1117233187, -0.3314083517, 0.180274561, 0.2826016843, 0.1433033198, -0.1382263303, -0.0929222703, 0.0918077603, -0.2511994839, 0.2500662208, 0.221789822, 0.157918036, -0.0372049212, -0.1576396823, 0.1384071261, 0.0796203837, -0.0405748822, -0.1741779894, 0.0987475514, 0.040851783, 0.2424798012, -0.1990907639, 0.0407797322, 0.4570712149, -0.2844361663, 0.0364054181, -0.6800736189, -0.002343355, -0.0597890392, -0.1311698258, -0.0204952396, 0.029290989, -0.0755664557, -0.0433139876, -0.0115973735, 0.2988156974, 0.2784372866, 0.0222370904, -0.0605902411, 0.1867605001, 0.1487033367, -0.1612708271, 0.3168521821, 0.0585199967, 0.1633767188, -0.0719095096, -0.206185773, 0.0668224692, -0.0958223492, 0.3077230453, 0.2266748548, 0.0122986948, 0.0099704461, 0.2215040475, 0.150966078, -0.0508124419, 0.0896445662, 0.2920499742, 0.1799526811, 0.1877630055, -0.3006310761, 0.0827776194, 0.1254699081, -0.0749200061, -0.10556072, 0.2994287312, -0.1035910323, -0.2416673154, 0.0810322315, 0.2266721874, 0.5017876625, 0.1558397561, -0.1444336772, 0.0478162281, 0.0574759394, -0.2169305235, 0.1586065888, 0.1800119132, 0.3289296031, -0.1385488957, 0.0901936665, -0.0619817339, -0.4440476894, -0.0912800431, 0.1848453879, 0.2858142555, -0.1865232289, 0.2504455149, 0.0615524761, -0.0788814053, -0.0309185535, 0.4246843457, -0.0496709347, -0.2127267122, -0.1706473976, 0.2725590169, -0.0189575031, -0.0283495784, 0.0066528171, 0.2610562444, 0.2244725972, -0.0232953224, 0.0941694677, -0.0079310732, -0.0817144066, 0.1298801601, 0.1777150631, -0.2123886198, 0.4530032575, -0.1707894355, -0.0871115923, -0.2084839046, -0.0723171309, 0.1136234105, -0.228081435, 0.5252374411, 0.1035801321, 0.2522767186, -0.1173249483, -0.1160967723, 0.081955649, -0.0663690642, -0.1613079906, 0.0102342935, -0.0259696357, -0.1146582812, -0.0101680569, -0.1553609669, 0.0795827731, -0.3436992764, 0.3560944796, 0.1022503152, 0.1887515038, 0.5033756495, 0.4098785222, -0.0466414131, 0.1624168158, 0.1523554176, -0.1796499342, -0.3409413695, 0.1021590233, -0.3160605729, -0.3371724486, 0.0466640443, -0.2274665534, 0.2909381688, 0.4419276416, -0.5405669808, -0.2555699646, -0.512784183, 0.178343311, -0.0151667399, 0.2652283907, 0.0903320312, -0.001946914, -0.1002619416, 0.0065975836, -0.1557335705, -0.0046920488, 0.0445124954, 0.1287517548, 0.2151253074, 0.5913012624, 0.0606980287, 0.7865703702, 0.4150092304, 0.1420452893, 0.3436699808, -0.0614235103, 0.4706938565, -0.2932084501, -0.1800682098, 0.2319210619, -0.178716585, -0.2574402988, -0.0831609517, 0.1046685576, 0.0142659871, 0.1273812652, 0.0586723164, 0.0460092425, -0.1819887012, 0.2668033242, -0.0274688974, 0.3461062312, 0.0467384942, 0.036607787, -0.1479358375, -0.016332034, -0.1037027687, -0.1109502763, 0.4852957129, -0.0441752151, -0.4239207804, 0.1098548919, -0.6938712597, -0.1332409382, -0.0965697691, 0.2234218717, -0.0490843393, 0.0660197437, 0.0475893877, 0.0453440584, 0.9892041087, 0.0007065196, -0.2966734469, -0.2548517883, -0.3207205534, -0.4081356525, 0.1653788835, 0.0722285286, 0.1199957877, -0.1644742936, 0.1693555713, -0.1526905894, -0.2036913037, 0.2588399053, 0.4127707481, -0.1430652142, 0.0404213332, -0.2801088393, -0.5489316583, -0.2964857817, -0.1632168144, -0.0055410555, 0.048478175, 0.2352022529, 0.0255420282, -0.0487964526, -0.1557961851, 0.2111777961, 0.1084237397, 0.2446291, -0.0259844474, 0.4257115126, 0.1911683232, -0.3292507827, 0.2183282673, 0.3244982362, -0.0656346008, -0.1088470519, -0.0289759841, 0.1022882462, 0.2475357354, 0.4917107224, -0.2284799516, -0.3292702138, -0.1282334328, 0.2469944954, -0.563716054, 0.1934457123, 0.4815808237, -0.2082684487, -0.1923841387, -0.7430679798, 0.3641575575, 0.3175491095, 0.1278441101, 0.3630659282, 0.0887515023, -0.1641531438, 0.3955097497, 0.2683004439, 0.6815106273, -0.1718037426, 0.4881140292, 0.3426569998, 0.2432330251, 0.3742547631, -0.0830153301, 0.4212850034, -0.0590208843, -0.4138421416, 0.0700451881, -0.1448522061, 0.1890717447, 0.1100220904, 0.2438377142, 0.3425055742, 0.078169547, 0.0153282508, -0.159676373, 0.2752978802, -0.3474655449, -0.4178956747, -0.0688187256, 0.1925275326, 0.0487386324, -0.186029464, -0.0940658599, 0.1372857988, -0.0540783778, -0.1073367298, -0.2376546413, -0.1235264018, -0.2773987055, 0.2645848989, -0.0288830567, -0.1680648178, -0.1311215907, 0.0741544664, 0.0400641374, 0.1833520234, 0.0875315666, 0.1229821965, 0.0256562065, -0.0608530268, 0.0861575231, -0.2096136957, 0.3166002631, -0.0610504635, 0.0272021778, 0.0231164228, -0.0450548269, 0.0166370161, -0.2683942914, -0.0405098312, -0.0224608295, -0.09480986, -0.3335686028, -0.1030180529, -0.2790772021, -0.1800314486, 0.1073122993, 0.167647019, -0.0732504949, 0.393338263, -0.3213767409, -0.1825402826, -0.1805839688, -0.0805970728, 0.2867522836, 0.224737227, 0.344374299, 0.1867702007, -0.0413238779, -0.1183304861, 0.2398529947, 0.2784737349, -0.3960601985, 0.3994886279, -0.0061354511, -0.0835075453, -0.1741186529, 0.0222122893, -0.0347572118, -0.1690719724, -0.0011353826, 0.025138855, -0.4378543794, -0.0114885746, -0.0359177142, 0.309658587, -0.0809227154, -0.2384005785, 0.0569272675, 0.0623046234, -0.2509617507, -0.180609405, -0.0545279011, 0.1300977916, 0.1445484608, -0.0649976805, 0.2266217321, -0.0639651418, 0.0592434555, 0.0769752637, -0.2337152064, -0.1937136948, -0.2092722207, 0.1047558114, 0.1538063288, -0.5640977621, 0.3158084154, -0.2536371052, -0.2878131568, -0.3615009189, 0.2732216716, 0.1587804407, -0.0976023376, -0.2814571261, 0.0315279439, -0.238415882, 0.1754497886, 0.1772964001, -0.0986451581, 0.4965090752, 0.2690392435, 0.2676722407, 0.2177265435, -0.1677126139, -0.3551410437, 0.2323107719, -0.1757253557, -0.2370796204, 0.1685319543, -0.1453194022, -0.1803851426, 0.12709409, 0.1900753826, 0.3366612196, -0.1190790534, 0.0566111393, 0.0406589806, 0.1578795761, -0.0442556664, -0.1291688681, -0.1578694433, -0.0657628328, 0.178305164, 0.4919784069, 0.1858620346, 0.0189373679, -0.4908384681, 0.0165940095, 0.2409808338, -0.0848555639, 0.1650960445, 0.2115797251, 0.1125839129, 0.0071790526, 0.1997704357, 0.2766705155, 0.2983656824, 0.4596777856, 0.0335594602, 0.337552309, 0.153371051, -0.0437305495, -0.0128277941, -0.3350022733, 0.0359270424, 0.2339583784, -0.1810236871, 0.2591884732, -0.0643164143, -0.1826625615, -0.0755793378, -0.2131424993, -0.2734746039, 0.1559333205, -0.1004548892, -0.0916265696, 0.1778086424, -0.0592285581, -0.0837883279, 0.4182518423, 0.0563771985, -0.656408608, 0.1858103424, -0.0279026404, -0.2183392048, -0.0040366384, 0.2878217399, 0.0002881676, 0.1268145889, -0.1856124699, -0.0568970665, 0.1019746885, -0.1687735319, -0.23352772, 0.4316361248, 0.5210511684, 0.2962181568, -0.0155670308, 0.225341633, 0.1285900921, -0.0580608621, -0.2433926016, 0.2078299522, -0.0938503519, 0.347029984, 0.0298523102, 0.0564286709, -0.1199411899, -0.2313877642, 0.4667381644, -0.0322325751, -0.509973526, 0.0713699758, -0.2709576786, -0.0831900015, -0.0014892695, 0.1556717902, -0.3743119538, 0.0142019605, 0.6617760658, -0.3358904421, 0.0529744886, -0.1549556255, 0.0486678854, -0.4334236979, 0.5622742176, 0.2479631305, 0.0245910827, -0.5293911695, -0.0578940362, -0.414503932, -0.2513062358, -0.5728729367, 0.1208465621, 0.2157160938, 0.2678524554, -0.0817704499, 0.1097255126, -0.099143371, 0.1220088974, -0.2385522723, 0.2867417932, -0.0255692955, -0.2052705139, -0.0512691252, 0.0605060756, -0.1328711212, -0.4785496891, 0.217145592, -0.3334966302, 0.0321598276, -0.1802652031, 0.091569908, 0.082893312, 0.1091512442, 0.3665706515, 0.30011186, 0.0304143224, -0.0899441093, -0.4216741025, -0.4540978074, -0.0191898402, -0.2367719561, 0.1167338565, 0.1283491701, 0.3148857653, -0.2542373538, 0.1739490926, -0.2994902432, 0.3420860469, 0.2490569055, -0.2070639133, -0.0978221819, 0.2675933838, -0.3416648209, 0.1588354558, 0.4218653142, 0.2471740097, -0.2160967737, 0.0314046703, -0.2623043954, -0.3741123378, 0.2344355732, -0.3907604814, -0.3366750479, -0.1116327196, 0.0749207363, -0.0133861117, -0.1945162714, -0.1902232319, 0.121638827, 0.1056284159, -0.1063161269, -0.2567143142, 0.2248544544, -0.0328451805, -0.2498074174, 0.0614075884, 0.3020297587, -0.2057995796, -0.3960453868, 0.4934434891, -0.1076573804 ]
https://github.com/huggingface/datasets/issues/741
Creating dataset consumes too much memory
I had the same issue. It works for me by setting `DEFAULT_WRITER_BATCH_SIZE = 10` of my dataset builder class. (And not `_writer_batch_size` as previously mentioned). I guess this is because `_writer_batch_size` is overwritten in `__init__` (see [here](https://github.com/huggingface/datasets/blob/0e2563e5d5c2fc193ea27d7c24607bb35607f2d5/src/datasets/builder.py#L934))
Moving this issue from https://github.com/huggingface/datasets/pull/722 here, because it seems like a general issue. Given the following dataset example, where each example saves a sequence of 260x210x3 images (max length 400): ```python def _generate_examples(self, base_path, split): """ Yields examples. """ filepath = os.path.join(base_path, "annotations", "manual", "PHOENIX-2014-T." + split + ".corpus.csv") images_path = os.path.join(base_path, "features", "fullFrame-210x260px", split) with open(filepath, "r", encoding="utf-8") as f: data = csv.DictReader(f, delimiter="|", quoting=csv.QUOTE_NONE) for row in data: frames_path = os.path.join(images_path, row["video"])[:-7] np_frames = [] for frame_name in os.listdir(frames_path): frame_path = os.path.join(frames_path, frame_name) im = Image.open(frame_path) np_frames.append(np.asarray(im)) im.close() yield row["name"], {"video": np_frames} ``` The dataset creation process goes out of memory on a machine with 500GB RAM. I was under the impression that the "generator" here is exactly for that, to avoid memory constraints. However, even if you want the entire dataset in memory, it would be in the worst case `260x210x3 x 400 max length x 7000 samples` in bytes (uint8) = 458.64 gigabytes So I'm not sure why it's taking more than 500GB. And the dataset creation fails after 170 examples on a machine with 120gb RAM, and after 672 examples on a machine with 500GB RAM. --- ## Info that might help: Iterating over examples is extremely slow. ![image](https://user-images.githubusercontent.com/5757359/96359590-3c666780-111d-11eb-9347-1f833ad982a9.png) If I perform this iteration in my own, custom loop (Without saving to file), it runs at 8-9 examples/sec And you can see at this state it is using 94% of the memory: ![image](https://user-images.githubusercontent.com/5757359/96359606-7afc2200-111d-11eb-8c11-0afbdba1a6a3.png) And it is only using one CPU core, which is probably why it's so slow: ![image](https://user-images.githubusercontent.com/5757359/96359630-a3841c00-111d-11eb-9ba0-7fd3cdf51d26.png)
37
Creating dataset consumes too much memory Moving this issue from https://github.com/huggingface/datasets/pull/722 here, because it seems like a general issue. Given the following dataset example, where each example saves a sequence of 260x210x3 images (max length 400): ```python def _generate_examples(self, base_path, split): """ Yields examples. """ filepath = os.path.join(base_path, "annotations", "manual", "PHOENIX-2014-T." + split + ".corpus.csv") images_path = os.path.join(base_path, "features", "fullFrame-210x260px", split) with open(filepath, "r", encoding="utf-8") as f: data = csv.DictReader(f, delimiter="|", quoting=csv.QUOTE_NONE) for row in data: frames_path = os.path.join(images_path, row["video"])[:-7] np_frames = [] for frame_name in os.listdir(frames_path): frame_path = os.path.join(frames_path, frame_name) im = Image.open(frame_path) np_frames.append(np.asarray(im)) im.close() yield row["name"], {"video": np_frames} ``` The dataset creation process goes out of memory on a machine with 500GB RAM. I was under the impression that the "generator" here is exactly for that, to avoid memory constraints. However, even if you want the entire dataset in memory, it would be in the worst case `260x210x3 x 400 max length x 7000 samples` in bytes (uint8) = 458.64 gigabytes So I'm not sure why it's taking more than 500GB. And the dataset creation fails after 170 examples on a machine with 120gb RAM, and after 672 examples on a machine with 500GB RAM. --- ## Info that might help: Iterating over examples is extremely slow. ![image](https://user-images.githubusercontent.com/5757359/96359590-3c666780-111d-11eb-9347-1f833ad982a9.png) If I perform this iteration in my own, custom loop (Without saving to file), it runs at 8-9 examples/sec And you can see at this state it is using 94% of the memory: ![image](https://user-images.githubusercontent.com/5757359/96359606-7afc2200-111d-11eb-8c11-0afbdba1a6a3.png) And it is only using one CPU core, which is probably why it's so slow: ![image](https://user-images.githubusercontent.com/5757359/96359630-a3841c00-111d-11eb-9ba0-7fd3cdf51d26.png) I had the same issue. It works for me by setting `DEFAULT_WRITER_BATCH_SIZE = 10` of my dataset builder class. (And not `_writer_batch_size` as previously mentioned). I guess this is because `_writer_batch_size` is overwritten in `__init__` (see [here](https://github.com/huggingface/datasets/blob/0e2563e5d5c2fc193ea27d7c24607bb35607f2d5/src/datasets/builder.py#L934))
[ -0.2472245246, -0.0484530441, -0.0161761995, 0.2615477145, 0.1814281195, 0.202324003, 0.1410057545, 0.2836433649, -0.0936913937, 0.2016250044, 0.4972397387, 0.1490257382, -0.2346244454, 0.0067336364, -0.0158065781, -0.3033438623, 0.0866440013, 0.055245664, -0.14935112, -0.0251511633, -0.4015743732, -0.0364088193, 0.0979414061, -0.266710043, -0.5073341727, -0.201848805, -0.0731501579, 0.0787196979, -0.1270603091, -0.2315945774, -0.1274704784, -0.0400048569, 0.1177601963, 0.348085165, -0.0001107187, -0.0142072737, 0.2528395057, 0.0560582094, -0.2610013783, 0.255135715, 0.0024831975, -0.2779873312, -0.1727148592, -0.0488481745, 0.2572744191, -0.3003965318, 0.1659738868, -0.358736366, 0.2852359712, 0.310329169, 0.1906798929, 0.2333974391, 0.0225878656, -0.0645371377, 0.0283547472, 0.1364508569, -0.2712321877, -0.0043949671, -0.0322477855, -0.1391171217, -0.1249333546, 0.3213859499, 0.1251341403, 0.0555913374, 0.3767856359, -0.0258993786, -0.3605356812, -0.4826663733, 0.1298621297, 0.2105497867, 0.4798397422, -0.2130852789, -0.1907443553, -0.3127379119, -0.0608718731, -0.2809079587, -0.0386912487, 0.5055589676, -0.4797234833, -0.1568405479, -0.4373590946, 0.0112414192, -0.073932305, -0.0789557174, 0.2725886703, -0.4267039895, -0.0361703448, 0.2112912834, 0.4411445856, 0.0069414587, 0.1683402956, -0.173548162, 0.0405640639, -0.0908014625, -0.2532207668, -0.0523643121, 0.287623018, -0.145363301, 0.3291010857, -0.0412683226, 0.0245143399, -0.2715127766, 0.1530069858, -0.005894172, 0.0967002735, 0.2201670557, -0.4858939052, -0.1767416596, 0.2278589159, 0.0444845669, 0.089915432, -0.1590839624, -0.0274223667, -0.1531637609, 0.2210887372, -0.3335965276, 0.1901998669, 0.2805505395, -0.2625468075, 0.2027173936, -0.2653441429, 0.1029189304, -0.1461306363, 0.1159537807, 0.0655319765, 0.1141219884, -0.1104515344, 0.1520260274, -0.2346289605, -0.2064010501, -0.2843565643, 0.0219006222, -0.2518552542, 0.2018955499, 0.1339295805, 0.2431205362, 0.2170632035, 0.0080231354, 0.0536194742, -0.0079492033, 0.4056237042, -0.2521451414, -0.0064556878, 0.2825169563, 0.1068823636, 0.1090517566, -0.0290897582, 0.1394090205, -0.0898926705, 0.2382695675, 0.0490416139, -0.4122443497, 0.0999206305, 0.150838837, 0.0951702893, 0.2297327965, -0.4434715807, 0.2292865366, 0.1947138309, 0.3888750374, -0.0545384362, -0.0666550547, -0.3439251482, -0.2636186182, 0.1964846998, 0.7139769793, -0.3620709777, 0.2919794321, -0.1818292439, 0.1198834851, 0.1442039907, 0.4414610565, -0.0528312325, 0.488263011, -0.2243761867, -0.2710963488, -0.0880411863, -0.094117485, -0.2132637799, 0.2518541217, -0.1075511202, 0.1572636664, 0.3729577959, 0.2033798248, -0.033494588, -0.0882050395, 0.0497727841, 0.2308511436, -0.358627826, 0.124964878, -0.1097934172, -0.3897539973, -0.0506444015, -0.0010802221, 0.1469896734, 0.0434502959, -0.1591924578, 0.0015703548, 0.1117233187, -0.3314083517, 0.180274561, 0.2826016843, 0.1433033198, -0.1382263303, -0.0929222703, 0.0918077603, -0.2511994839, 0.2500662208, 0.221789822, 0.157918036, -0.0372049212, -0.1576396823, 0.1384071261, 0.0796203837, -0.0405748822, -0.1741779894, 0.0987475514, 0.040851783, 0.2424798012, -0.1990907639, 0.0407797322, 0.4570712149, -0.2844361663, 0.0364054181, -0.6800736189, -0.002343355, -0.0597890392, -0.1311698258, -0.0204952396, 0.029290989, -0.0755664557, -0.0433139876, -0.0115973735, 0.2988156974, 0.2784372866, 0.0222370904, -0.0605902411, 0.1867605001, 0.1487033367, -0.1612708271, 0.3168521821, 0.0585199967, 0.1633767188, -0.0719095096, -0.206185773, 0.0668224692, -0.0958223492, 0.3077230453, 0.2266748548, 0.0122986948, 0.0099704461, 0.2215040475, 0.150966078, -0.0508124419, 0.0896445662, 0.2920499742, 0.1799526811, 0.1877630055, -0.3006310761, 0.0827776194, 0.1254699081, -0.0749200061, -0.10556072, 0.2994287312, -0.1035910323, -0.2416673154, 0.0810322315, 0.2266721874, 0.5017876625, 0.1558397561, -0.1444336772, 0.0478162281, 0.0574759394, -0.2169305235, 0.1586065888, 0.1800119132, 0.3289296031, -0.1385488957, 0.0901936665, -0.0619817339, -0.4440476894, -0.0912800431, 0.1848453879, 0.2858142555, -0.1865232289, 0.2504455149, 0.0615524761, -0.0788814053, -0.0309185535, 0.4246843457, -0.0496709347, -0.2127267122, -0.1706473976, 0.2725590169, -0.0189575031, -0.0283495784, 0.0066528171, 0.2610562444, 0.2244725972, -0.0232953224, 0.0941694677, -0.0079310732, -0.0817144066, 0.1298801601, 0.1777150631, -0.2123886198, 0.4530032575, -0.1707894355, -0.0871115923, -0.2084839046, -0.0723171309, 0.1136234105, -0.228081435, 0.5252374411, 0.1035801321, 0.2522767186, -0.1173249483, -0.1160967723, 0.081955649, -0.0663690642, -0.1613079906, 0.0102342935, -0.0259696357, -0.1146582812, -0.0101680569, -0.1553609669, 0.0795827731, -0.3436992764, 0.3560944796, 0.1022503152, 0.1887515038, 0.5033756495, 0.4098785222, -0.0466414131, 0.1624168158, 0.1523554176, -0.1796499342, -0.3409413695, 0.1021590233, -0.3160605729, -0.3371724486, 0.0466640443, -0.2274665534, 0.2909381688, 0.4419276416, -0.5405669808, -0.2555699646, -0.512784183, 0.178343311, -0.0151667399, 0.2652283907, 0.0903320312, -0.001946914, -0.1002619416, 0.0065975836, -0.1557335705, -0.0046920488, 0.0445124954, 0.1287517548, 0.2151253074, 0.5913012624, 0.0606980287, 0.7865703702, 0.4150092304, 0.1420452893, 0.3436699808, -0.0614235103, 0.4706938565, -0.2932084501, -0.1800682098, 0.2319210619, -0.178716585, -0.2574402988, -0.0831609517, 0.1046685576, 0.0142659871, 0.1273812652, 0.0586723164, 0.0460092425, -0.1819887012, 0.2668033242, -0.0274688974, 0.3461062312, 0.0467384942, 0.036607787, -0.1479358375, -0.016332034, -0.1037027687, -0.1109502763, 0.4852957129, -0.0441752151, -0.4239207804, 0.1098548919, -0.6938712597, -0.1332409382, -0.0965697691, 0.2234218717, -0.0490843393, 0.0660197437, 0.0475893877, 0.0453440584, 0.9892041087, 0.0007065196, -0.2966734469, -0.2548517883, -0.3207205534, -0.4081356525, 0.1653788835, 0.0722285286, 0.1199957877, -0.1644742936, 0.1693555713, -0.1526905894, -0.2036913037, 0.2588399053, 0.4127707481, -0.1430652142, 0.0404213332, -0.2801088393, -0.5489316583, -0.2964857817, -0.1632168144, -0.0055410555, 0.048478175, 0.2352022529, 0.0255420282, -0.0487964526, -0.1557961851, 0.2111777961, 0.1084237397, 0.2446291, -0.0259844474, 0.4257115126, 0.1911683232, -0.3292507827, 0.2183282673, 0.3244982362, -0.0656346008, -0.1088470519, -0.0289759841, 0.1022882462, 0.2475357354, 0.4917107224, -0.2284799516, -0.3292702138, -0.1282334328, 0.2469944954, -0.563716054, 0.1934457123, 0.4815808237, -0.2082684487, -0.1923841387, -0.7430679798, 0.3641575575, 0.3175491095, 0.1278441101, 0.3630659282, 0.0887515023, -0.1641531438, 0.3955097497, 0.2683004439, 0.6815106273, -0.1718037426, 0.4881140292, 0.3426569998, 0.2432330251, 0.3742547631, -0.0830153301, 0.4212850034, -0.0590208843, -0.4138421416, 0.0700451881, -0.1448522061, 0.1890717447, 0.1100220904, 0.2438377142, 0.3425055742, 0.078169547, 0.0153282508, -0.159676373, 0.2752978802, -0.3474655449, -0.4178956747, -0.0688187256, 0.1925275326, 0.0487386324, -0.186029464, -0.0940658599, 0.1372857988, -0.0540783778, -0.1073367298, -0.2376546413, -0.1235264018, -0.2773987055, 0.2645848989, -0.0288830567, -0.1680648178, -0.1311215907, 0.0741544664, 0.0400641374, 0.1833520234, 0.0875315666, 0.1229821965, 0.0256562065, -0.0608530268, 0.0861575231, -0.2096136957, 0.3166002631, -0.0610504635, 0.0272021778, 0.0231164228, -0.0450548269, 0.0166370161, -0.2683942914, -0.0405098312, -0.0224608295, -0.09480986, -0.3335686028, -0.1030180529, -0.2790772021, -0.1800314486, 0.1073122993, 0.167647019, -0.0732504949, 0.393338263, -0.3213767409, -0.1825402826, -0.1805839688, -0.0805970728, 0.2867522836, 0.224737227, 0.344374299, 0.1867702007, -0.0413238779, -0.1183304861, 0.2398529947, 0.2784737349, -0.3960601985, 0.3994886279, -0.0061354511, -0.0835075453, -0.1741186529, 0.0222122893, -0.0347572118, -0.1690719724, -0.0011353826, 0.025138855, -0.4378543794, -0.0114885746, -0.0359177142, 0.309658587, -0.0809227154, -0.2384005785, 0.0569272675, 0.0623046234, -0.2509617507, -0.180609405, -0.0545279011, 0.1300977916, 0.1445484608, -0.0649976805, 0.2266217321, -0.0639651418, 0.0592434555, 0.0769752637, -0.2337152064, -0.1937136948, -0.2092722207, 0.1047558114, 0.1538063288, -0.5640977621, 0.3158084154, -0.2536371052, -0.2878131568, -0.3615009189, 0.2732216716, 0.1587804407, -0.0976023376, -0.2814571261, 0.0315279439, -0.238415882, 0.1754497886, 0.1772964001, -0.0986451581, 0.4965090752, 0.2690392435, 0.2676722407, 0.2177265435, -0.1677126139, -0.3551410437, 0.2323107719, -0.1757253557, -0.2370796204, 0.1685319543, -0.1453194022, -0.1803851426, 0.12709409, 0.1900753826, 0.3366612196, -0.1190790534, 0.0566111393, 0.0406589806, 0.1578795761, -0.0442556664, -0.1291688681, -0.1578694433, -0.0657628328, 0.178305164, 0.4919784069, 0.1858620346, 0.0189373679, -0.4908384681, 0.0165940095, 0.2409808338, -0.0848555639, 0.1650960445, 0.2115797251, 0.1125839129, 0.0071790526, 0.1997704357, 0.2766705155, 0.2983656824, 0.4596777856, 0.0335594602, 0.337552309, 0.153371051, -0.0437305495, -0.0128277941, -0.3350022733, 0.0359270424, 0.2339583784, -0.1810236871, 0.2591884732, -0.0643164143, -0.1826625615, -0.0755793378, -0.2131424993, -0.2734746039, 0.1559333205, -0.1004548892, -0.0916265696, 0.1778086424, -0.0592285581, -0.0837883279, 0.4182518423, 0.0563771985, -0.656408608, 0.1858103424, -0.0279026404, -0.2183392048, -0.0040366384, 0.2878217399, 0.0002881676, 0.1268145889, -0.1856124699, -0.0568970665, 0.1019746885, -0.1687735319, -0.23352772, 0.4316361248, 0.5210511684, 0.2962181568, -0.0155670308, 0.225341633, 0.1285900921, -0.0580608621, -0.2433926016, 0.2078299522, -0.0938503519, 0.347029984, 0.0298523102, 0.0564286709, -0.1199411899, -0.2313877642, 0.4667381644, -0.0322325751, -0.509973526, 0.0713699758, -0.2709576786, -0.0831900015, -0.0014892695, 0.1556717902, -0.3743119538, 0.0142019605, 0.6617760658, -0.3358904421, 0.0529744886, -0.1549556255, 0.0486678854, -0.4334236979, 0.5622742176, 0.2479631305, 0.0245910827, -0.5293911695, -0.0578940362, -0.414503932, -0.2513062358, -0.5728729367, 0.1208465621, 0.2157160938, 0.2678524554, -0.0817704499, 0.1097255126, -0.099143371, 0.1220088974, -0.2385522723, 0.2867417932, -0.0255692955, -0.2052705139, -0.0512691252, 0.0605060756, -0.1328711212, -0.4785496891, 0.217145592, -0.3334966302, 0.0321598276, -0.1802652031, 0.091569908, 0.082893312, 0.1091512442, 0.3665706515, 0.30011186, 0.0304143224, -0.0899441093, -0.4216741025, -0.4540978074, -0.0191898402, -0.2367719561, 0.1167338565, 0.1283491701, 0.3148857653, -0.2542373538, 0.1739490926, -0.2994902432, 0.3420860469, 0.2490569055, -0.2070639133, -0.0978221819, 0.2675933838, -0.3416648209, 0.1588354558, 0.4218653142, 0.2471740097, -0.2160967737, 0.0314046703, -0.2623043954, -0.3741123378, 0.2344355732, -0.3907604814, -0.3366750479, -0.1116327196, 0.0749207363, -0.0133861117, -0.1945162714, -0.1902232319, 0.121638827, 0.1056284159, -0.1063161269, -0.2567143142, 0.2248544544, -0.0328451805, -0.2498074174, 0.0614075884, 0.3020297587, -0.2057995796, -0.3960453868, 0.4934434891, -0.1076573804 ]
https://github.com/huggingface/datasets/issues/741
Creating dataset consumes too much memory
Yes the class attribute you can change is `DEFAULT_WRITER_BATCH_SIZE`. Otherwise in `load_dataset` you can specify `writer_batch_size=`
Moving this issue from https://github.com/huggingface/datasets/pull/722 here, because it seems like a general issue. Given the following dataset example, where each example saves a sequence of 260x210x3 images (max length 400): ```python def _generate_examples(self, base_path, split): """ Yields examples. """ filepath = os.path.join(base_path, "annotations", "manual", "PHOENIX-2014-T." + split + ".corpus.csv") images_path = os.path.join(base_path, "features", "fullFrame-210x260px", split) with open(filepath, "r", encoding="utf-8") as f: data = csv.DictReader(f, delimiter="|", quoting=csv.QUOTE_NONE) for row in data: frames_path = os.path.join(images_path, row["video"])[:-7] np_frames = [] for frame_name in os.listdir(frames_path): frame_path = os.path.join(frames_path, frame_name) im = Image.open(frame_path) np_frames.append(np.asarray(im)) im.close() yield row["name"], {"video": np_frames} ``` The dataset creation process goes out of memory on a machine with 500GB RAM. I was under the impression that the "generator" here is exactly for that, to avoid memory constraints. However, even if you want the entire dataset in memory, it would be in the worst case `260x210x3 x 400 max length x 7000 samples` in bytes (uint8) = 458.64 gigabytes So I'm not sure why it's taking more than 500GB. And the dataset creation fails after 170 examples on a machine with 120gb RAM, and after 672 examples on a machine with 500GB RAM. --- ## Info that might help: Iterating over examples is extremely slow. ![image](https://user-images.githubusercontent.com/5757359/96359590-3c666780-111d-11eb-9347-1f833ad982a9.png) If I perform this iteration in my own, custom loop (Without saving to file), it runs at 8-9 examples/sec And you can see at this state it is using 94% of the memory: ![image](https://user-images.githubusercontent.com/5757359/96359606-7afc2200-111d-11eb-8c11-0afbdba1a6a3.png) And it is only using one CPU core, which is probably why it's so slow: ![image](https://user-images.githubusercontent.com/5757359/96359630-a3841c00-111d-11eb-9ba0-7fd3cdf51d26.png)
16
Creating dataset consumes too much memory Moving this issue from https://github.com/huggingface/datasets/pull/722 here, because it seems like a general issue. Given the following dataset example, where each example saves a sequence of 260x210x3 images (max length 400): ```python def _generate_examples(self, base_path, split): """ Yields examples. """ filepath = os.path.join(base_path, "annotations", "manual", "PHOENIX-2014-T." + split + ".corpus.csv") images_path = os.path.join(base_path, "features", "fullFrame-210x260px", split) with open(filepath, "r", encoding="utf-8") as f: data = csv.DictReader(f, delimiter="|", quoting=csv.QUOTE_NONE) for row in data: frames_path = os.path.join(images_path, row["video"])[:-7] np_frames = [] for frame_name in os.listdir(frames_path): frame_path = os.path.join(frames_path, frame_name) im = Image.open(frame_path) np_frames.append(np.asarray(im)) im.close() yield row["name"], {"video": np_frames} ``` The dataset creation process goes out of memory on a machine with 500GB RAM. I was under the impression that the "generator" here is exactly for that, to avoid memory constraints. However, even if you want the entire dataset in memory, it would be in the worst case `260x210x3 x 400 max length x 7000 samples` in bytes (uint8) = 458.64 gigabytes So I'm not sure why it's taking more than 500GB. And the dataset creation fails after 170 examples on a machine with 120gb RAM, and after 672 examples on a machine with 500GB RAM. --- ## Info that might help: Iterating over examples is extremely slow. ![image](https://user-images.githubusercontent.com/5757359/96359590-3c666780-111d-11eb-9347-1f833ad982a9.png) If I perform this iteration in my own, custom loop (Without saving to file), it runs at 8-9 examples/sec And you can see at this state it is using 94% of the memory: ![image](https://user-images.githubusercontent.com/5757359/96359606-7afc2200-111d-11eb-8c11-0afbdba1a6a3.png) And it is only using one CPU core, which is probably why it's so slow: ![image](https://user-images.githubusercontent.com/5757359/96359630-a3841c00-111d-11eb-9ba0-7fd3cdf51d26.png) Yes the class attribute you can change is `DEFAULT_WRITER_BATCH_SIZE`. Otherwise in `load_dataset` you can specify `writer_batch_size=`
[ -0.2472245246, -0.0484530441, -0.0161761995, 0.2615477145, 0.1814281195, 0.202324003, 0.1410057545, 0.2836433649, -0.0936913937, 0.2016250044, 0.4972397387, 0.1490257382, -0.2346244454, 0.0067336364, -0.0158065781, -0.3033438623, 0.0866440013, 0.055245664, -0.14935112, -0.0251511633, -0.4015743732, -0.0364088193, 0.0979414061, -0.266710043, -0.5073341727, -0.201848805, -0.0731501579, 0.0787196979, -0.1270603091, -0.2315945774, -0.1274704784, -0.0400048569, 0.1177601963, 0.348085165, -0.0001107187, -0.0142072737, 0.2528395057, 0.0560582094, -0.2610013783, 0.255135715, 0.0024831975, -0.2779873312, -0.1727148592, -0.0488481745, 0.2572744191, -0.3003965318, 0.1659738868, -0.358736366, 0.2852359712, 0.310329169, 0.1906798929, 0.2333974391, 0.0225878656, -0.0645371377, 0.0283547472, 0.1364508569, -0.2712321877, -0.0043949671, -0.0322477855, -0.1391171217, -0.1249333546, 0.3213859499, 0.1251341403, 0.0555913374, 0.3767856359, -0.0258993786, -0.3605356812, -0.4826663733, 0.1298621297, 0.2105497867, 0.4798397422, -0.2130852789, -0.1907443553, -0.3127379119, -0.0608718731, -0.2809079587, -0.0386912487, 0.5055589676, -0.4797234833, -0.1568405479, -0.4373590946, 0.0112414192, -0.073932305, -0.0789557174, 0.2725886703, -0.4267039895, -0.0361703448, 0.2112912834, 0.4411445856, 0.0069414587, 0.1683402956, -0.173548162, 0.0405640639, -0.0908014625, -0.2532207668, -0.0523643121, 0.287623018, -0.145363301, 0.3291010857, -0.0412683226, 0.0245143399, -0.2715127766, 0.1530069858, -0.005894172, 0.0967002735, 0.2201670557, -0.4858939052, -0.1767416596, 0.2278589159, 0.0444845669, 0.089915432, -0.1590839624, -0.0274223667, -0.1531637609, 0.2210887372, -0.3335965276, 0.1901998669, 0.2805505395, -0.2625468075, 0.2027173936, -0.2653441429, 0.1029189304, -0.1461306363, 0.1159537807, 0.0655319765, 0.1141219884, -0.1104515344, 0.1520260274, -0.2346289605, -0.2064010501, -0.2843565643, 0.0219006222, -0.2518552542, 0.2018955499, 0.1339295805, 0.2431205362, 0.2170632035, 0.0080231354, 0.0536194742, -0.0079492033, 0.4056237042, -0.2521451414, -0.0064556878, 0.2825169563, 0.1068823636, 0.1090517566, -0.0290897582, 0.1394090205, -0.0898926705, 0.2382695675, 0.0490416139, -0.4122443497, 0.0999206305, 0.150838837, 0.0951702893, 0.2297327965, -0.4434715807, 0.2292865366, 0.1947138309, 0.3888750374, -0.0545384362, -0.0666550547, -0.3439251482, -0.2636186182, 0.1964846998, 0.7139769793, -0.3620709777, 0.2919794321, -0.1818292439, 0.1198834851, 0.1442039907, 0.4414610565, -0.0528312325, 0.488263011, -0.2243761867, -0.2710963488, -0.0880411863, -0.094117485, -0.2132637799, 0.2518541217, -0.1075511202, 0.1572636664, 0.3729577959, 0.2033798248, -0.033494588, -0.0882050395, 0.0497727841, 0.2308511436, -0.358627826, 0.124964878, -0.1097934172, -0.3897539973, -0.0506444015, -0.0010802221, 0.1469896734, 0.0434502959, -0.1591924578, 0.0015703548, 0.1117233187, -0.3314083517, 0.180274561, 0.2826016843, 0.1433033198, -0.1382263303, -0.0929222703, 0.0918077603, -0.2511994839, 0.2500662208, 0.221789822, 0.157918036, -0.0372049212, -0.1576396823, 0.1384071261, 0.0796203837, -0.0405748822, -0.1741779894, 0.0987475514, 0.040851783, 0.2424798012, -0.1990907639, 0.0407797322, 0.4570712149, -0.2844361663, 0.0364054181, -0.6800736189, -0.002343355, -0.0597890392, -0.1311698258, -0.0204952396, 0.029290989, -0.0755664557, -0.0433139876, -0.0115973735, 0.2988156974, 0.2784372866, 0.0222370904, -0.0605902411, 0.1867605001, 0.1487033367, -0.1612708271, 0.3168521821, 0.0585199967, 0.1633767188, -0.0719095096, -0.206185773, 0.0668224692, -0.0958223492, 0.3077230453, 0.2266748548, 0.0122986948, 0.0099704461, 0.2215040475, 0.150966078, -0.0508124419, 0.0896445662, 0.2920499742, 0.1799526811, 0.1877630055, -0.3006310761, 0.0827776194, 0.1254699081, -0.0749200061, -0.10556072, 0.2994287312, -0.1035910323, -0.2416673154, 0.0810322315, 0.2266721874, 0.5017876625, 0.1558397561, -0.1444336772, 0.0478162281, 0.0574759394, -0.2169305235, 0.1586065888, 0.1800119132, 0.3289296031, -0.1385488957, 0.0901936665, -0.0619817339, -0.4440476894, -0.0912800431, 0.1848453879, 0.2858142555, -0.1865232289, 0.2504455149, 0.0615524761, -0.0788814053, -0.0309185535, 0.4246843457, -0.0496709347, -0.2127267122, -0.1706473976, 0.2725590169, -0.0189575031, -0.0283495784, 0.0066528171, 0.2610562444, 0.2244725972, -0.0232953224, 0.0941694677, -0.0079310732, -0.0817144066, 0.1298801601, 0.1777150631, -0.2123886198, 0.4530032575, -0.1707894355, -0.0871115923, -0.2084839046, -0.0723171309, 0.1136234105, -0.228081435, 0.5252374411, 0.1035801321, 0.2522767186, -0.1173249483, -0.1160967723, 0.081955649, -0.0663690642, -0.1613079906, 0.0102342935, -0.0259696357, -0.1146582812, -0.0101680569, -0.1553609669, 0.0795827731, -0.3436992764, 0.3560944796, 0.1022503152, 0.1887515038, 0.5033756495, 0.4098785222, -0.0466414131, 0.1624168158, 0.1523554176, -0.1796499342, -0.3409413695, 0.1021590233, -0.3160605729, -0.3371724486, 0.0466640443, -0.2274665534, 0.2909381688, 0.4419276416, -0.5405669808, -0.2555699646, -0.512784183, 0.178343311, -0.0151667399, 0.2652283907, 0.0903320312, -0.001946914, -0.1002619416, 0.0065975836, -0.1557335705, -0.0046920488, 0.0445124954, 0.1287517548, 0.2151253074, 0.5913012624, 0.0606980287, 0.7865703702, 0.4150092304, 0.1420452893, 0.3436699808, -0.0614235103, 0.4706938565, -0.2932084501, -0.1800682098, 0.2319210619, -0.178716585, -0.2574402988, -0.0831609517, 0.1046685576, 0.0142659871, 0.1273812652, 0.0586723164, 0.0460092425, -0.1819887012, 0.2668033242, -0.0274688974, 0.3461062312, 0.0467384942, 0.036607787, -0.1479358375, -0.016332034, -0.1037027687, -0.1109502763, 0.4852957129, -0.0441752151, -0.4239207804, 0.1098548919, -0.6938712597, -0.1332409382, -0.0965697691, 0.2234218717, -0.0490843393, 0.0660197437, 0.0475893877, 0.0453440584, 0.9892041087, 0.0007065196, -0.2966734469, -0.2548517883, -0.3207205534, -0.4081356525, 0.1653788835, 0.0722285286, 0.1199957877, -0.1644742936, 0.1693555713, -0.1526905894, -0.2036913037, 0.2588399053, 0.4127707481, -0.1430652142, 0.0404213332, -0.2801088393, -0.5489316583, -0.2964857817, -0.1632168144, -0.0055410555, 0.048478175, 0.2352022529, 0.0255420282, -0.0487964526, -0.1557961851, 0.2111777961, 0.1084237397, 0.2446291, -0.0259844474, 0.4257115126, 0.1911683232, -0.3292507827, 0.2183282673, 0.3244982362, -0.0656346008, -0.1088470519, -0.0289759841, 0.1022882462, 0.2475357354, 0.4917107224, -0.2284799516, -0.3292702138, -0.1282334328, 0.2469944954, -0.563716054, 0.1934457123, 0.4815808237, -0.2082684487, -0.1923841387, -0.7430679798, 0.3641575575, 0.3175491095, 0.1278441101, 0.3630659282, 0.0887515023, -0.1641531438, 0.3955097497, 0.2683004439, 0.6815106273, -0.1718037426, 0.4881140292, 0.3426569998, 0.2432330251, 0.3742547631, -0.0830153301, 0.4212850034, -0.0590208843, -0.4138421416, 0.0700451881, -0.1448522061, 0.1890717447, 0.1100220904, 0.2438377142, 0.3425055742, 0.078169547, 0.0153282508, -0.159676373, 0.2752978802, -0.3474655449, -0.4178956747, -0.0688187256, 0.1925275326, 0.0487386324, -0.186029464, -0.0940658599, 0.1372857988, -0.0540783778, -0.1073367298, -0.2376546413, -0.1235264018, -0.2773987055, 0.2645848989, -0.0288830567, -0.1680648178, -0.1311215907, 0.0741544664, 0.0400641374, 0.1833520234, 0.0875315666, 0.1229821965, 0.0256562065, -0.0608530268, 0.0861575231, -0.2096136957, 0.3166002631, -0.0610504635, 0.0272021778, 0.0231164228, -0.0450548269, 0.0166370161, -0.2683942914, -0.0405098312, -0.0224608295, -0.09480986, -0.3335686028, -0.1030180529, -0.2790772021, -0.1800314486, 0.1073122993, 0.167647019, -0.0732504949, 0.393338263, -0.3213767409, -0.1825402826, -0.1805839688, -0.0805970728, 0.2867522836, 0.224737227, 0.344374299, 0.1867702007, -0.0413238779, -0.1183304861, 0.2398529947, 0.2784737349, -0.3960601985, 0.3994886279, -0.0061354511, -0.0835075453, -0.1741186529, 0.0222122893, -0.0347572118, -0.1690719724, -0.0011353826, 0.025138855, -0.4378543794, -0.0114885746, -0.0359177142, 0.309658587, -0.0809227154, -0.2384005785, 0.0569272675, 0.0623046234, -0.2509617507, -0.180609405, -0.0545279011, 0.1300977916, 0.1445484608, -0.0649976805, 0.2266217321, -0.0639651418, 0.0592434555, 0.0769752637, -0.2337152064, -0.1937136948, -0.2092722207, 0.1047558114, 0.1538063288, -0.5640977621, 0.3158084154, -0.2536371052, -0.2878131568, -0.3615009189, 0.2732216716, 0.1587804407, -0.0976023376, -0.2814571261, 0.0315279439, -0.238415882, 0.1754497886, 0.1772964001, -0.0986451581, 0.4965090752, 0.2690392435, 0.2676722407, 0.2177265435, -0.1677126139, -0.3551410437, 0.2323107719, -0.1757253557, -0.2370796204, 0.1685319543, -0.1453194022, -0.1803851426, 0.12709409, 0.1900753826, 0.3366612196, -0.1190790534, 0.0566111393, 0.0406589806, 0.1578795761, -0.0442556664, -0.1291688681, -0.1578694433, -0.0657628328, 0.178305164, 0.4919784069, 0.1858620346, 0.0189373679, -0.4908384681, 0.0165940095, 0.2409808338, -0.0848555639, 0.1650960445, 0.2115797251, 0.1125839129, 0.0071790526, 0.1997704357, 0.2766705155, 0.2983656824, 0.4596777856, 0.0335594602, 0.337552309, 0.153371051, -0.0437305495, -0.0128277941, -0.3350022733, 0.0359270424, 0.2339583784, -0.1810236871, 0.2591884732, -0.0643164143, -0.1826625615, -0.0755793378, -0.2131424993, -0.2734746039, 0.1559333205, -0.1004548892, -0.0916265696, 0.1778086424, -0.0592285581, -0.0837883279, 0.4182518423, 0.0563771985, -0.656408608, 0.1858103424, -0.0279026404, -0.2183392048, -0.0040366384, 0.2878217399, 0.0002881676, 0.1268145889, -0.1856124699, -0.0568970665, 0.1019746885, -0.1687735319, -0.23352772, 0.4316361248, 0.5210511684, 0.2962181568, -0.0155670308, 0.225341633, 0.1285900921, -0.0580608621, -0.2433926016, 0.2078299522, -0.0938503519, 0.347029984, 0.0298523102, 0.0564286709, -0.1199411899, -0.2313877642, 0.4667381644, -0.0322325751, -0.509973526, 0.0713699758, -0.2709576786, -0.0831900015, -0.0014892695, 0.1556717902, -0.3743119538, 0.0142019605, 0.6617760658, -0.3358904421, 0.0529744886, -0.1549556255, 0.0486678854, -0.4334236979, 0.5622742176, 0.2479631305, 0.0245910827, -0.5293911695, -0.0578940362, -0.414503932, -0.2513062358, -0.5728729367, 0.1208465621, 0.2157160938, 0.2678524554, -0.0817704499, 0.1097255126, -0.099143371, 0.1220088974, -0.2385522723, 0.2867417932, -0.0255692955, -0.2052705139, -0.0512691252, 0.0605060756, -0.1328711212, -0.4785496891, 0.217145592, -0.3334966302, 0.0321598276, -0.1802652031, 0.091569908, 0.082893312, 0.1091512442, 0.3665706515, 0.30011186, 0.0304143224, -0.0899441093, -0.4216741025, -0.4540978074, -0.0191898402, -0.2367719561, 0.1167338565, 0.1283491701, 0.3148857653, -0.2542373538, 0.1739490926, -0.2994902432, 0.3420860469, 0.2490569055, -0.2070639133, -0.0978221819, 0.2675933838, -0.3416648209, 0.1588354558, 0.4218653142, 0.2471740097, -0.2160967737, 0.0314046703, -0.2623043954, -0.3741123378, 0.2344355732, -0.3907604814, -0.3366750479, -0.1116327196, 0.0749207363, -0.0133861117, -0.1945162714, -0.1902232319, 0.121638827, 0.1056284159, -0.1063161269, -0.2567143142, 0.2248544544, -0.0328451805, -0.2498074174, 0.0614075884, 0.3020297587, -0.2057995796, -0.3960453868, 0.4934434891, -0.1076573804 ]
https://github.com/huggingface/datasets/issues/737
Trec Dataset Connection Error
Thanks for reporting. That's because the download url has changed. The old url now redirects to the new one but we don't support redirection for downloads. I'm opening a PR to update the url
**Datasets Version:** 1.1.2 **Python Version:** 3.6/3.7 **Code:** ```python from datasets import load_dataset load_dataset("trec") ``` **Expected behavior:** Download Trec dataset and load Dataset object **Current Behavior:** Get a connection error saying it couldn't reach http://cogcomp.org/Data/QA/QC/train_5500.label (but the link doesn't seem broken) <details> <summary>Error Logs</summary> Using custom data configuration default Downloading and preparing dataset trec/default (download: 350.79 KiB, generated: 403.39 KiB, post-processed: Unknown size, total: 754.18 KiB) to /root/.cache/huggingface/datasets/trec/default/1.1.0/ca4248481ad244f235f4cf277186cad2ee8769f975119a2bbfc41b8932b88bd7... --------------------------------------------------------------------------- ConnectionError Traceback (most recent call last) <ipython-input-8-66bf1242096e> in <module>() ----> 1 load_dataset("trec") 10 frames /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag) 473 elif response is not None and response.status_code == 404: 474 raise FileNotFoundError("Couldn't find file at {}".format(url)) --> 475 raise ConnectionError("Couldn't reach {}".format(url)) 476 477 # Try a second time ConnectionError: Couldn't reach http://cogcomp.org/Data/QA/QC/train_5500.label </details>
34
Trec Dataset Connection Error **Datasets Version:** 1.1.2 **Python Version:** 3.6/3.7 **Code:** ```python from datasets import load_dataset load_dataset("trec") ``` **Expected behavior:** Download Trec dataset and load Dataset object **Current Behavior:** Get a connection error saying it couldn't reach http://cogcomp.org/Data/QA/QC/train_5500.label (but the link doesn't seem broken) <details> <summary>Error Logs</summary> Using custom data configuration default Downloading and preparing dataset trec/default (download: 350.79 KiB, generated: 403.39 KiB, post-processed: Unknown size, total: 754.18 KiB) to /root/.cache/huggingface/datasets/trec/default/1.1.0/ca4248481ad244f235f4cf277186cad2ee8769f975119a2bbfc41b8932b88bd7... --------------------------------------------------------------------------- ConnectionError Traceback (most recent call last) <ipython-input-8-66bf1242096e> in <module>() ----> 1 load_dataset("trec") 10 frames /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag) 473 elif response is not None and response.status_code == 404: 474 raise FileNotFoundError("Couldn't find file at {}".format(url)) --> 475 raise ConnectionError("Couldn't reach {}".format(url)) 476 477 # Try a second time ConnectionError: Couldn't reach http://cogcomp.org/Data/QA/QC/train_5500.label </details> Thanks for reporting. That's because the download url has changed. The old url now redirects to the new one but we don't support redirection for downloads. I'm opening a PR to update the url
[ -0.2436393648, 0.1074595153, -0.0149687706, 0.1505167335, 0.3800679147, -0.1288011372, 0.2745416462, 0.3322345912, -0.2046610564, 0.116294913, -0.1912940443, 0.2581111193, 0.0722814873, -0.1658233851, -0.1021717787, 0.0497930571, -0.1717510372, 0.0062031238, -0.2832171321, 0.0877528265, -0.044222828, 0.2602859139, -0.0055205515, 0.2427943349, -0.59843117, -0.18845281, 0.1804314703, 0.4515566826, -0.2506007254, -0.570951581, 0.3888580799, 0.0727969334, 0.1287526041, 0.5149003863, -0.0001109371, 0.0566039048, 0.2422578484, -0.0557587184, -0.5349962115, -0.4334147573, -0.5455431938, -0.0273085572, 0.1403694153, -0.1366652846, -0.2754543126, 0.4765297174, 0.0609512478, -0.4809706807, 0.2310197353, 0.6710781455, 0.2249374986, 0.2940624356, 0.0680480525, -0.2650926709, 0.2843117714, -0.1481318325, -0.1591582596, 0.4663556814, 0.136413902, -0.0583355278, -0.0214010403, 0.1513235569, 0.0624632053, 0.1721278131, 0.174529016, 0.0565684214, 0.1772674471, -0.3218347728, 0.2633388937, 0.2760294676, 0.4948784113, -0.3989418447, -0.2013633847, 0.0997701958, -0.0143682417, -0.6580311656, 0.2096263319, -0.0679786205, -0.1465303749, 0.2543894053, -0.3509272039, 0.084867008, -0.3491249681, 0.1558762193, -0.2747199833, -0.1051500142, -0.2008481771, -0.0068782256, -0.113338992, -0.0278358255, 0.1749706864, 0.0200292151, -0.2384964824, 0.0650305301, -0.5116372705, 0.0560320392, 0.0803836286, -0.1478818208, -0.0281519033, 0.3335971832, 0.0427140258, 0.0381031595, -0.1636675447, 0.2506559193, 0.0588729829, 0.2197353691, -0.176910013, 0.3202085495, 0.2743512392, 0.2332796007, -0.174876377, -0.1759631634, -0.1833798736, -0.0463013239, 0.1591340452, 0.1637719274, 0.3319266438, -0.1655626297, -0.521119833, 0.2541390955, -0.1025258228, 0.1115968972, 0.0097521078, 0.42476511, -0.1067637131, 0.0908646286, -0.1643859893, 0.0531060025, -0.2054544389, -0.0588538162, -0.1864494532, 0.0197911412, -0.238414228, 0.0471159406, 0.3205462694, 0.027004797, 0.1940556616, -0.0945624784, 0.0846997201, -0.1832989603, 0.1642669588, -0.3243234158, 0.0265540183, 0.3521920741, -0.0864368454, 0.1659188122, 0.2515587211, -0.2422624677, -0.0546778217, -0.0281226691, -0.4812554717, -0.4549756944, -0.0710662082, 0.2084080875, 0.154865399, -0.0179843139, 0.1349477172, -0.202508837, 0.0613221638, -0.2018947005, -0.0231008641, -0.2384262681, -0.174721241, -0.2204871029, 0.3749774992, 0.3168279529, -0.5557841659, 0.0769454688, -0.0761042461, 0.1106990874, 0.1391876042, 0.203517735, -0.1795077473, 0.1495828629, -0.2587056756, -0.0297242422, 0.3721455932, -0.4308862388, -0.5118092299, 0.0736472905, -0.1449171454, 0.1010432541, -0.1864411235, 0.1634263247, 0.246197626, 0.07456211, 0.3918345571, 0.0501544178, -0.2675366402, -0.117220968, -0.2557191551, -0.1203596368, -0.2273943871, -0.0058596088, 0.0968563706, 0.0362854041, 0.2212333679, -0.1534668803, 0.288346082, 0.1403518468, 0.0544888936, 0.2114232033, 0.5641494393, -0.0762911588, -0.2149102688, -0.0440054983, -0.2572889626, 0.2746305466, 0.0434313864, 0.1699550152, -0.3841554821, -0.0731170401, -0.5478705764, 0.0116438521, -0.1969335377, -0.2449872196, 0.1305416971, 0.2496085316, 0.1088533178, 0.1462855786, -0.1167911291, 0.4556649625, 0.0960787311, 0.1042426303, 0.0182098597, 0.2494754046, -0.098302722, -0.0271587893, -0.1154527217, 0.201194793, 0.1797365248, -0.1083228812, -0.2002046257, 0.4768727422, 0.2418260276, -0.0474008285, -0.0944385156, 0.1279828548, 0.2421501279, -0.1477310508, 0.0017797634, -0.0935003832, 0.1546035707, 0.025384156, -0.0430583991, 0.3091505766, -0.0131638823, 0.1504991353, 0.1926893592, -0.0952667147, 0.2412176728, 0.0416729189, -0.0225719828, 0.0657677129, 0.0182510354, 0.2073458582, 0.1549005955, -0.1155512258, -0.2918311357, 0.1244800314, 0.3424336016, 0.0697864294, -0.08127556, 0.0232154634, -0.2145896703, 0.0729295164, 0.1710627675, 0.2937608361, 0.4095776379, 0.154396683, 0.0596785322, 0.1239820942, -0.2317828536, -0.1342635304, -0.0668331683, 0.0030501501, 0.2552393079, 0.3379248381, 0.249605, 0.0391559415, -0.0740778446, -0.3382086456, -0.0782374069, 0.2021335512, -0.3116459548, 0.2916003466, -0.2804920673, -0.2236142755, -0.0499675833, -0.4288075864, -0.078907676, -0.3910886645, -0.1048754305, 0.4562001824, 0.0663823411, 0.1978207231, -0.4925709963, 0.0761060864, 0.1892469376, -0.4692905545, 0.0011928312, -0.1383706331, -0.3143916726, 0.1267778426, 0.0829906911, -0.1739953309, 0.2517476082, -0.2204299569, 0.0104241883, -0.2139103264, -0.2533701956, 0.0877239108, 0.1492301673, 0.1897945553, 0.0066280188, 0.0844303817, -0.122154288, -0.0734416246, 0.3308883309, 0.0803055316, 0.1345987767, 0.0250459537, -0.0844900906, -0.0403570421, -0.0288424697, -0.5540795326, -0.4347094893, -0.4233095944, 0.0265905187, 0.0278890897, 0.2145304382, 0.3089235723, -0.0137014873, 0.1361341178, -0.1069937348, -0.0539861061, -0.13827461, -0.4636728168, 0.2503553331, -0.3218648732, -0.3025491834, 0.1655755192, -0.0695523471, 0.5321611762, 0.0086489366, -0.4650235176, -0.2676861286, -0.0982104838, 0.6345690489, 0.0915189534, -0.2353430092, 0.2610231936, -0.0646527335, -0.1607627571, 0.0247909762, -0.1128007248, -0.005971917, 0.0834127963, 0.3514321744, -0.0541353971, 0.4497286379, -0.0431190319, 0.5627844334, 0.1353466511, -0.1065160707, 0.425345242, -0.3066238463, 0.5101925135, -0.2793847919, -0.27978912, -0.1413614452, -0.2360911071, -0.2632611692, 0.0153985573, 0.2132202089, 0.0382810421, -0.3137512207, 0.3839372396, -0.0350421444, -0.3948903382, -0.0420298912, -0.0412914045, 0.2510325313, 0.1905150563, 0.1083174571, -0.0192352608, -0.1726912707, -0.2439660281, 0.3814211786, -0.0949059948, 0.0308568571, -0.0607868582, 0.2049267441, -0.6307373047, 0.1342717707, 0.1163183004, 0.439796418, -0.2941680253, -0.1318407506, -0.0849411413, 0.0801966861, 0.2074446827, -0.0995106474, 0.0841595009, 0.4266171753, 0.0836057216, -0.1135633513, -0.1509215385, 0.0033232404, 0.0818037391, 0.6349381804, 0.4348049164, 0.0743153691, 0.0479369275, 0.2320049554, 0.0532671027, 0.0615116991, 0.0781044215, -0.2655320764, -0.217186138, -0.1533264667, -0.0631936193, -0.0232890043, 0.3115465343, -0.0437206365, -0.1754530668, 0.0472506061, -0.1432408541, 0.1013278663, 0.137177214, 0.0246308632, -0.0246403646, 0.3024008572, 0.0889823437, 0.2391397804, 0.2632664442, 0.6313421726, -0.188928172, -0.2625212669, 0.1411159337, 0.0982742831, 0.0219229553, 0.2090876549, -0.0440432057, -0.0713761076, -0.104332231, 0.1706366539, 0.0076203221, 0.4123370349, 0.1464786232, 0.0978742838, -0.6797945499, -0.1825642288, 0.0809005946, -0.1793083251, -0.0737981722, 0.0318265036, -0.0273169838, -0.1100972071, -0.101331763, -0.340772301, 0.7502116561, 0.1051543429, 0.1461162716, 0.2128794789, -0.1000243872, 0.3703202307, -0.6265904307, 0.2992114127, -0.3391889036, -0.1779634655, -0.1715644002, -0.0644574985, 0.0427021459, -0.0872039497, -0.0587895587, 0.3925189376, -0.0232674461, 0.1652842462, 0.0695062578, -0.0482042767, -0.0568276607, 0.1105865091, -0.0691033602, 0.2089672536, 0.0741487816, 0.3698209524, -0.0456229933, -0.0529727861, -0.1782884896, -0.1797784567, -0.2008443624, 0.1354666352, -0.6049460173, 0.1428331584, -0.0269673821, -0.2785520256, -0.0808910131, -0.1312798411, -0.0144918999, 0.1817365289, -0.1985466629, 0.2753667533, -0.0028112605, 0.0133360494, 0.1627681255, -0.0252936818, 0.0766094849, -0.0047155111, -0.172884658, 0.4410366118, -0.0212820619, -0.1607270986, 0.2650494576, 0.0032533163, 0.4391769767, -0.291465342, -0.0309474859, -0.1398820281, -0.0298232269, -0.1710262597, 0.1774251163, -0.1339994222, 0.1550926268, 0.081562452, 0.028625397, -0.3594525754, -0.0321367085, 0.4235405028, -0.3132709563, 0.0055289739, 0.300578624, 0.2023658454, -0.1440220028, -0.1973552406, 0.1408712715, 0.1862576902, -0.5022172332, -0.0584824458, 0.1394027323, 0.1922179163, 0.0379431695, 0.2046678066, 0.2547498345, -0.0284734461, 0.0760839134, -0.3847141564, -0.3824967146, -0.0481146276, 0.0224587824, 0.2585420012, 0.0243495237, 0.0337021984, -0.051769238, -0.0630751476, -0.3346201479, -0.0273289606, -0.2622386813, 0.0126387179, 0.3208867908, -0.057591673, 0.5082913637, -0.0331904963, 0.182707265, -0.038972117, -0.3674545586, -0.2421672195, -0.0671876669, 0.1398567855, 0.1127963588, -0.529923439, 0.0158395227, -0.0475148894, 0.0082086558, -0.0270214304, 0.1269885749, 0.1069454327, -0.1901587099, -0.0041020261, -0.461994499, 0.1204531491, -0.062627539, 0.1747385412, 0.235382095, 0.4555340111, 0.0081377709, 0.2163466662, -0.1688100398, -0.0649159104, -0.2859052122, 0.0310635325, -0.0958552063, -0.2007582784, 0.3629793823, -0.260288626, 0.0281876586, -0.0610697679, 0.2967253923, 0.0044667949, -0.1540704519, -0.1034804508, 0.0677495971, 0.3193879128, -0.1193158925, -0.0457676686, -0.0623314939, 0.0754422173, 0.213804096, -0.0005388443, 0.0787803531, 0.0369654819, 0.0524554029, 0.1924660951, 0.412953347, -0.2597540319, 0.1540229321, 0.2356326282, 0.0374271534, 0.1041541845, 0.3256739676, -0.0771511048, 0.0053669047, 0.4985240698, -0.3577445149, 0.1061746627, 0.1248716041, 0.00727602, -0.0331473388, -0.3750708699, 0.0520824865, -0.0397390798, -0.3141107857, -0.1003407389, -0.0710789263, 0.2068196237, -0.1854571998, 0.1388016492, -0.2510988712, 0.007970863, -0.1095806956, -0.0449367873, 0.168359533, -0.4044201374, -0.1095408052, -0.0832008496, -0.1020621657, 0.0784510523, 0.0795239732, 0.1483846605, -0.0089102509, -0.4815812409, 0.0227167662, 0.1650718153, 0.0516877323, -0.1169059351, 0.4407913387, 0.2734146118, -0.0331331268, 0.0902166814, 0.1800568104, 0.5992759466, 0.3276754916, 0.2336026579, 0.1383286566, -0.0980865285, -0.1120544598, 0.1027598828, 0.0545510314, 0.1344370842, -0.2265278846, 0.1893155128, 0.2322294414, -0.1436277032, 0.2335053086, -0.0963102952, 0.0910944864, -0.1523349434, 0.4199560285, -0.0260073636, -0.1321962774, -0.1843299121, 0.1535145491, -0.2354540229, 0.2184884548, 0.5031727552, 0.0140187507, 0.2912633717, -0.0805422142, 0.0961987898, -0.2021584809, 0.2815184295, 0.2193567902, 0.1679269671, -0.4231606424, -0.0806226209, -0.3168094158, 0.1508147418, -0.0500687733, -0.2932550013, -0.1034139916, 0.104993917, -0.294822365, 0.2415293902, 0.2013256252, 0.0316751301, 0.1292237788, 0.1623033881, -0.2166966647, -0.0907825679, -0.2303545177, -0.0631653592, -0.02731435, -0.5374891162, 0.0025254139, -0.1326078475, 0.0612038933, -0.1515269876, -0.0150004625, 0.1695074141, 0.0840088949, 0.3490770757, 0.1543770432, 0.6344002485, 0.1395267844, -0.0493562482, -0.1607924998, -0.3679966629, -0.0795510411, -0.0187561419, 0.2487580329, 0.3183908463, 0.1491256356, -0.4152112007, -0.378049016, 0.5051017404, 0.0849961936, 0.0548368134, 0.1152701825, 0.0360174216, -0.102001071, 0.1671331674, -0.048242934, 0.0784009248, 0.1712701619, 0.3160137534, -0.1110541821, -0.406039089, 0.4514369667, -0.3892625868, -0.0561610311, -0.2896740437, 0.4707399011, 0.1972316653, -0.1055884063, -0.373465389, 0.1589311659, 0.4805704653, -0.125790596, -0.3419941366, 0.3100986481, -0.1594553292, 0.1204136014, 0.0147895049, 0.6515811682, -0.0898189172, -0.2755630016, -0.1567624062, -0.1716499925 ]
https://github.com/huggingface/datasets/issues/730
Possible caching bug
Thanks for reporting. That's a bug indeed. Apparently only the `data_files` parameter is taken into account right now in `DatasetBuilder._create_builder_config` but it should also be the case for `config_kwargs` (or at least the instantiated `builder_config`)
The following code with `test1.txt` containing just "🤗🤗🤗": ``` dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="latin_1") print(dataset[0]) dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="utf-8") print(dataset[0]) ``` produces this output: ``` Downloading and preparing dataset text/default-15600e4d83254059 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155... Dataset text downloaded and prepared to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155. Subsequent calls will reuse this data. {'text': 'ð\x9f¤\x97ð\x9f¤\x97ð\x9f¤\x97'} Using custom data configuration default Reusing dataset text (/home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155) {'text': 'ð\x9f¤\x97ð\x9f¤\x97ð\x9f¤\x97'} ``` Just changing the order (and deleting the temp files): ``` dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="utf-8") print(dataset[0]) dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="latin_1") print(dataset[0]) ``` produces this: ``` Using custom data configuration default Downloading and preparing dataset text/default-15600e4d83254059 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155... Dataset text downloaded and prepared to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155. Subsequent calls will reuse this data. {'text': '🤗🤗🤗'} Using custom data configuration default Reusing dataset text (/home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155) {'text': '🤗🤗🤗'} ``` Is it intended that the cache path does not depend on the config entries? tested with datasets==1.1.2 and python==3.8.5
35
Possible caching bug The following code with `test1.txt` containing just "🤗🤗🤗": ``` dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="latin_1") print(dataset[0]) dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="utf-8") print(dataset[0]) ``` produces this output: ``` Downloading and preparing dataset text/default-15600e4d83254059 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155... Dataset text downloaded and prepared to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155. Subsequent calls will reuse this data. {'text': 'ð\x9f¤\x97ð\x9f¤\x97ð\x9f¤\x97'} Using custom data configuration default Reusing dataset text (/home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155) {'text': 'ð\x9f¤\x97ð\x9f¤\x97ð\x9f¤\x97'} ``` Just changing the order (and deleting the temp files): ``` dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="utf-8") print(dataset[0]) dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="latin_1") print(dataset[0]) ``` produces this: ``` Using custom data configuration default Downloading and preparing dataset text/default-15600e4d83254059 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155... Dataset text downloaded and prepared to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155. Subsequent calls will reuse this data. {'text': '🤗🤗🤗'} Using custom data configuration default Reusing dataset text (/home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155) {'text': '🤗🤗🤗'} ``` Is it intended that the cache path does not depend on the config entries? tested with datasets==1.1.2 and python==3.8.5 Thanks for reporting. That's a bug indeed. Apparently only the `data_files` parameter is taken into account right now in `DatasetBuilder._create_builder_config` but it should also be the case for `config_kwargs` (or at least the instantiated `builder_config`)
[ 0.0632610768, -0.1689580232, -0.1356959194, 0.3066905141, 0.3663585782, -0.082266517, 0.21097067, 0.1932277232, -0.0809331015, 0.1459649354, -0.0522679836, 0.0610482916, 0.177519694, -0.0559846424, 0.1316589862, 0.2184452862, 0.0873200074, 0.066333048, -0.1263158917, -0.2109901011, -0.0102704754, 0.2062478215, 0.0173397604, -0.1451740861, -0.4371201396, 0.1228284165, -0.0854628161, 0.082642518, 0.0433101952, -0.2312454134, 0.0753920153, 0.1557573527, -0.1427129805, 0.393353641, -0.0001079512, -0.0463828035, 0.0049219555, -0.0751269311, -0.4451856911, -0.0241020527, 0.0668386295, 0.1159064248, -0.0537760444, -0.1792439222, -0.0638849959, 0.0890598372, 0.0805220008, -0.6234312057, 0.42119506, 0.3092535138, 0.2928188145, 0.0181102399, -0.3509518206, 0.1025871709, 0.2549996674, 0.2605432868, -0.0601469912, 0.0162581094, 0.2008947283, 0.1844872981, -0.1797302514, 0.4905601442, 0.0224631075, -0.0929092839, 0.0126929283, 0.3502129316, -0.1973472387, 0.1078347191, 0.4177005589, 0.2047118992, 0.4102975428, -0.4855338931, -0.2600766718, -0.3530350626, -0.1391109675, -0.39680323, 0.3521829545, -0.0104582207, -0.0381051116, 0.2515205741, -0.2373823225, -0.0499011427, 0.0433753133, -0.037861526, -0.1471814215, 0.063989386, -0.2387993634, -0.1049142703, -0.056513153, -0.0936134458, 0.0106651317, -0.2465812415, -0.0519434698, 0.1307705045, -0.0817518085, 0.1496286392, -0.0354528949, 0.0141135594, 0.0869545713, 0.0944406167, 0.2200159878, 0.1656223238, -0.0772433132, -0.1178846881, -0.0753503069, 0.4089234769, 0.1265444756, -0.1236861423, 0.1996537745, 0.1021117046, -0.2863744199, -0.1559412032, 0.0823154822, -0.0663742274, 0.3497544229, -0.2117480487, 0.1754064262, -0.1227145046, -0.1732729226, 0.1200613976, -0.013754081, -0.0166406538, -0.0045665922, 0.2791537941, -0.2176062614, 0.080450058, -0.1096233875, 0.0016868047, -0.2030216306, -0.2661355138, -0.4274787903, -0.1317585111, -0.1823940575, 0.1311707795, 0.1808477789, -0.0524300933, 0.1408108175, 0.1967481673, 0.1277533025, -0.3219614029, -0.113664493, -0.2299861461, 0.2369440496, -0.0064799879, -0.2771320045, 0.203274861, 0.1169216111, -0.2279541641, -0.0955289826, 0.0284314789, -0.2402470559, -0.1247917339, 0.0569323264, 0.2919855416, -0.2366799712, -0.12620157, 0.0572552755, 0.0542956293, 0.5505170822, 0.0660652816, 0.1900553405, 0.0139558883, -0.4436228275, -0.1973882914, 0.0649240911, 0.3066076338, -0.2653447986, -0.218673721, 0.084126614, 0.0026897632, 0.2216520756, 0.3893524706, -0.1010951996, 0.1029094979, -0.348085463, 0.3724373281, 0.1862324327, -0.3808501065, -0.5444985628, 0.2635792196, -0.0366772376, 0.330731988, 0.2198258638, 0.0197250787, 0.1979732066, 0.009749393, 0.2746681273, 0.110991165, 0.3599118292, -0.0539453663, -0.2629932463, -0.1501541138, -0.0911058933, -0.0414851792, -0.1381846517, 0.0672325939, 0.0885717049, -0.113896586, 0.3438816071, -0.1182795689, 0.2481807172, 0.129885897, 0.2086011171, 0.1743336618, 0.1099111661, -0.0403511338, -0.3164937198, 0.188082546, -0.0852981061, -0.0295292605, -0.3783092797, -0.3485531211, -0.1945720017, -0.0583881885, -0.2409087718, -0.1717124879, 0.23857297, 0.43725124, 0.181135565, 0.2541653216, -0.001799213, 0.4922894835, -0.22596021, 0.0430974364, -0.410794884, -0.0639333054, 0.2076206654, -0.1066016257, -0.3256844878, 0.2294677943, -0.0379209109, -0.0506644696, -0.0245665424, 0.3689853251, -0.0090350062, 0.5451438427, -0.1396269649, 0.0909881666, 0.0636200458, 0.0560452081, 0.0607164055, 0.1490698308, 0.2253749967, -0.2123257369, -0.2007147521, 0.4290677905, 0.1339482665, 0.0944108739, 0.1008229852, -0.3489763141, 0.1937701702, -0.1465733945, -0.0214690696, -0.4593221545, 0.3228977621, -0.1863934696, 0.3557105064, 0.3392951488, -0.4177326262, 0.1546920687, 0.6486350894, -0.0221167877, 0.0970359072, 0.1618768275, -0.089494653, -0.1046930104, -0.2154046148, 0.3116969466, 0.4378975332, 0.1979781687, 0.3201467395, 0.2175666243, 0.1970351934, -0.4783407152, 0.2719821334, -0.2613619566, -0.0497350506, 0.3116178811, 0.2337706387, -0.1056018621, -0.5463243723, 0.178443104, -0.0284871943, 0.0335316099, -0.2530534863, 0.1925890595, -0.4839986265, -0.3050447702, -0.4533793032, -0.0004832382, -0.1906901002, -0.2545404732, 0.0010063193, 0.0512658581, 0.0556200221, 0.0102702528, -0.1824672073, 0.1323812753, -0.1237925887, -0.376193434, -0.2686218917, -0.0481046848, -0.3546078801, 0.1346622258, -0.0071912333, -0.1643133312, 0.2114717513, -0.2651866674, -0.0801100284, -0.127054885, -0.2446544915, 0.1423726082, -0.0068994593, 0.0158225931, 0.0206632502, -0.1169910356, -0.0731750205, 0.0459409505, 0.2070354968, -0.14671278, -0.2457351387, -0.1974944919, 0.0298747215, 0.0841841772, -0.3097212911, -0.3685529232, -0.1084534079, -0.112313062, 0.308910042, -0.0926161483, 0.1283420473, 0.3613404632, -0.1768619716, 0.2316176891, -0.0665878579, 0.2496747524, -0.5686767697, -0.445715338, 0.3216124177, -0.0838067383, -0.2544898093, -0.081635572, 0.0415058099, 0.2657451034, 0.205958724, -0.7856477499, -0.125015825, -0.3293461204, 0.0665294901, -0.0561572239, -0.0514069982, 0.1831352115, -0.1885336936, -0.1543068141, -0.1911270171, -0.0294202287, 0.1126434281, -0.054977607, 0.1539234966, -0.0694050044, 0.2732541859, 0.3387185931, 0.5176924467, 0.2432591319, 0.0198028274, 0.2993904054, -0.1592840701, 0.3542063534, -0.3163364828, -0.0658519566, 0.0955877081, -0.2693162858, -0.0386299901, 0.3650592864, 0.1198535934, 0.1819968224, 0.0208006799, 0.0422854237, -0.1887390018, -0.3113324046, 0.2352001518, -0.2445180416, 0.1443542689, 0.1757643372, 0.1281600147, -0.033273641, -0.1915499121, -0.1471122801, 0.0002006999, 0.0424688868, -0.0058078603, -0.360452652, 0.1492104083, -0.5625632405, 0.2226693183, 0.1985480934, 0.1745431125, -0.1717175394, -0.0993916616, 0.2057585567, -0.0968841463, 0.7381255627, 0.0631979629, 0.053792499, 0.0406155549, -0.1717144996, -0.3108314872, 0.1234150752, -0.0936186463, 0.0283296984, 0.190621689, 0.4489214122, -0.156693548, -0.0801724121, -0.1717059612, 0.1107356027, -0.0656810477, -0.0861324891, -0.2430153638, -0.3393822014, -0.1723990142, 0.0112697361, 0.0917005464, 0.1303763688, -0.1485612988, 0.2206911296, -0.0087008923, 0.0192538816, 0.2384980023, -0.0867405832, 0.39905864, -0.1014835536, 0.029569976, 0.188695997, 0.1497642845, -0.0293979496, 0.5788061619, -0.0160102416, -0.2766888142, -0.2209344208, -0.2195674777, 0.0078752898, 0.5253734589, -0.1171141192, 0.1944184452, 0.2502795458, -0.0213027783, -0.2537554502, 0.0922320634, 0.2513118088, 0.1302418262, -0.2400282025, -0.3940948546, 0.384508431, 0.0931558758, -0.1280459762, 0.0852605551, 0.0336191654, -0.5783618093, 0.0121259661, -0.1870982498, 1.0526432991, 0.0697232112, 0.543843925, 0.164458856, -0.234312281, 0.2079812288, 0.0299137551, 0.0776037797, -0.1372854561, -0.1231848076, -0.0392165408, 0.0493474677, 0.1252042949, 0.0445113443, -0.1628303081, 0.1048294082, -0.132482633, 0.4626202583, 0.0255191643, 0.055490952, -0.3534593284, -0.2368060052, -0.1421906948, 0.1792888939, -0.0040251091, 0.1795131564, -0.0311279222, 0.0284818597, -0.1299781948, -0.159406811, -0.040060252, 0.0552265868, -0.2622328401, 0.0518416837, 0.1309133023, -0.2550184429, -0.185267359, 0.3582660258, 0.4886324108, 0.0589947924, -0.022681674, 0.1810296327, 0.1769504547, 0.3690520227, 0.1631841511, -0.0711860806, 0.1402852386, 0.0347780399, -0.2269736677, -0.0868552998, 0.0416179039, -0.2070047706, -0.1773606986, 0.1021571532, -0.2035155594, -0.3819693923, -0.1024415344, -0.0708090737, 0.0490291156, -0.154362306, 0.2164075375, 0.0182431471, -0.147185564, 0.1232393309, -0.23012501, -0.3487479389, -0.2812534571, 0.6182489395, 0.3330360055, -0.1536254287, 0.6093754768, 0.0298630521, -0.2135219723, -0.2331239879, -0.0615368001, -0.0391104259, -0.3748997748, 0.175354138, -0.1659013778, -0.0390573852, -0.1358300596, 0.0943607613, -0.0543194562, -0.0048590447, -0.0295860041, -0.2917803228, -0.2042460442, -0.0120188147, 0.2862657011, 0.2789079547, 0.2129033953, 0.1974249482, -0.0714543536, 0.0140296137, -0.4197109342, 0.2962634563, 0.1460196823, 0.1726620495, 0.0889053196, -0.1397818625, 0.3646045923, -0.0083556492, 0.2012529373, 0.2086617649, -0.2705424428, -0.3591169715, -0.2536821663, 0.0615097322, -0.1423662901, -0.079969272, 0.0010466318, 0.0470731743, 0.0717448741, -0.3589704633, 0.3513583839, 0.4166297913, 0.0382951424, 0.1437447965, -0.0534599312, 0.3532391489, 0.1702318192, -0.1074286997, -0.0596708432, 0.1759940386, 0.0771525204, 0.146157667, -0.3433858156, 0.0248259436, 0.1210996434, -0.0221877024, 0.2799771428, 0.007143524, 0.0858667269, -0.4575454593, -0.1887640208, 0.1324161738, 0.4153513908, 0.3262940347, -0.3256800473, -0.3639091551, 0.0287526529, 0.2579561472, -0.0927455276, -0.2130314857, 0.284270227, 0.0909185261, 0.0438742265, 0.3295019269, 0.3479602635, -0.0955454111, 0.0770696178, -0.0678817034, 0.502114296, -0.50446558, 0.1415497512, 0.1453692913, -0.0150588388, 0.1046006382, 0.2185519338, 0.402728498, 0.0882583261, 0.7428874373, 0.069424659, 0.2655399442, 0.0344631448, 0.3497873545, -0.3061890304, -0.2714811563, 0.0087831542, 0.3392658234, -0.5183722973, 0.3594900966, 0.0399046466, 0.2947768569, 0.1023313999, 0.0146621764, -0.1142983064, 0.0610382967, -0.192738995, -0.4710099995, 0.154336825, -0.1860476285, -0.0982344672, 0.0535010062, -0.042349875, 0.0210374687, 0.1267085075, -0.0657493398, -0.0144561958, -0.3596040606, -0.0651700124, -0.263450712, 0.2892221212, -0.2736437023, 0.3618339002, 0.2516242564, -0.0244299825, 0.266410321, 0.1843282282, 0.4134004116, 0.0964875072, 0.139186129, 0.2343907803, -0.3441283703, 0.0173972305, -0.2722978294, 0.3577623665, 0.3037007451, -0.0722732171, 0.1832403541, 0.2278224677, -0.1841201633, 0.1968554109, 0.2459048927, 0.2491842508, -0.4332530499, 0.1303796023, -0.2235025167, -0.0221770778, -0.2555291951, 0.0684457719, -0.4019799232, 0.0493899807, 0.4003739655, -0.0126159489, 0.3317834735, -0.0323128514, 0.1192989573, 0.0970786437, 0.3910096884, 0.2467081249, 0.0202427041, 0.0852723494, -0.1726862639, -0.5865500569, 0.2221587598, -0.0296891741, 0.1344584227, -0.1434547454, 0.2045403421, -0.0341444276, -0.0542166531, -0.0914014131, -0.1793845594, -0.2699120343, -0.2181198746, -0.225309819, -0.3098490536, -0.0570990443, 0.0176588688, 0.126298219, -0.2951637805, 0.1995939016, -0.1299217194, 0.1710950732, -0.0734914318, 0.1191048622, -0.1012369841, -0.0817151517, 0.3345757127, 0.213446185, 0.0621458739, -0.1052115485, -0.0699440837, -0.2133231461, -0.0632964522, -0.1850118935, 0.3975628316, 0.1383020729, 0.2409787029, -0.2387066036, -0.1000700593, -0.0154633783, 0.3532560468, 0.3000926673, -0.2251818776, 0.0405857861, 0.0742221028, 0.0315964669, 0.0677158982, -0.0424555391, 0.711935401, -0.1609654427, 0.1956682801, -0.1226238385, -0.4357624054, 0.4972658753, -0.4109684229, -0.3635086715, 0.099960722, 0.1996231228, 0.1974008083, -0.2245983779, -0.6479584575, 0.240289703, 0.324463129, -0.1465073824, -0.2898398638, 0.2578243613, -0.0659370795, -0.056015756, -0.1371864825, 0.4104945958, 0.2625234425, -0.1719956547, 0.1602530181, -0.4273613095 ]
https://github.com/huggingface/datasets/issues/730
Possible caching bug
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command `!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/` change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html `dataset = datasets.load_dataset('json', data_files=args.dataset)` Errors: `Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264... `
The following code with `test1.txt` containing just "🤗🤗🤗": ``` dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="latin_1") print(dataset[0]) dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="utf-8") print(dataset[0]) ``` produces this output: ``` Downloading and preparing dataset text/default-15600e4d83254059 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155... Dataset text downloaded and prepared to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155. Subsequent calls will reuse this data. {'text': 'ð\x9f¤\x97ð\x9f¤\x97ð\x9f¤\x97'} Using custom data configuration default Reusing dataset text (/home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155) {'text': 'ð\x9f¤\x97ð\x9f¤\x97ð\x9f¤\x97'} ``` Just changing the order (and deleting the temp files): ``` dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="utf-8") print(dataset[0]) dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="latin_1") print(dataset[0]) ``` produces this: ``` Using custom data configuration default Downloading and preparing dataset text/default-15600e4d83254059 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155... Dataset text downloaded and prepared to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155. Subsequent calls will reuse this data. {'text': '🤗🤗🤗'} Using custom data configuration default Reusing dataset text (/home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155) {'text': '🤗🤗🤗'} ``` Is it intended that the cache path does not depend on the config entries? tested with datasets==1.1.2 and python==3.8.5
63
Possible caching bug The following code with `test1.txt` containing just "🤗🤗🤗": ``` dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="latin_1") print(dataset[0]) dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="utf-8") print(dataset[0]) ``` produces this output: ``` Downloading and preparing dataset text/default-15600e4d83254059 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155... Dataset text downloaded and prepared to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155. Subsequent calls will reuse this data. {'text': 'ð\x9f¤\x97ð\x9f¤\x97ð\x9f¤\x97'} Using custom data configuration default Reusing dataset text (/home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155) {'text': 'ð\x9f¤\x97ð\x9f¤\x97ð\x9f¤\x97'} ``` Just changing the order (and deleting the temp files): ``` dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="utf-8") print(dataset[0]) dataset = datasets.load_dataset('text', data_files=['test1.txt'], split="train", encoding="latin_1") print(dataset[0]) ``` produces this: ``` Using custom data configuration default Downloading and preparing dataset text/default-15600e4d83254059 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155... Dataset text downloaded and prepared to /home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155. Subsequent calls will reuse this data. {'text': '🤗🤗🤗'} Using custom data configuration default Reusing dataset text (/home/arne/.cache/huggingface/datasets/text/default-15600e4d83254059/0.0.0/52cefbb2b82b015d4253f1aeb1e6ee5591124a6491e834acfe1751f765925155) {'text': '🤗🤗🤗'} ``` Is it intended that the cache path does not depend on the config entries? tested with datasets==1.1.2 and python==3.8.5 Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command `!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/` change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html `dataset = datasets.load_dataset('json', data_files=args.dataset)` Errors: `Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264... `
[ 0.0632610768, -0.1689580232, -0.1356959194, 0.3066905141, 0.3663585782, -0.082266517, 0.21097067, 0.1932277232, -0.0809331015, 0.1459649354, -0.0522679836, 0.0610482916, 0.177519694, -0.0559846424, 0.1316589862, 0.2184452862, 0.0873200074, 0.066333048, -0.1263158917, -0.2109901011, -0.0102704754, 0.2062478215, 0.0173397604, -0.1451740861, -0.4371201396, 0.1228284165, -0.0854628161, 0.082642518, 0.0433101952, -0.2312454134, 0.0753920153, 0.1557573527, -0.1427129805, 0.393353641, -0.0001079512, -0.0463828035, 0.0049219555, -0.0751269311, -0.4451856911, -0.0241020527, 0.0668386295, 0.1159064248, -0.0537760444, -0.1792439222, -0.0638849959, 0.0890598372, 0.0805220008, -0.6234312057, 0.42119506, 0.3092535138, 0.2928188145, 0.0181102399, -0.3509518206, 0.1025871709, 0.2549996674, 0.2605432868, -0.0601469912, 0.0162581094, 0.2008947283, 0.1844872981, -0.1797302514, 0.4905601442, 0.0224631075, -0.0929092839, 0.0126929283, 0.3502129316, -0.1973472387, 0.1078347191, 0.4177005589, 0.2047118992, 0.4102975428, -0.4855338931, -0.2600766718, -0.3530350626, -0.1391109675, -0.39680323, 0.3521829545, -0.0104582207, -0.0381051116, 0.2515205741, -0.2373823225, -0.0499011427, 0.0433753133, -0.037861526, -0.1471814215, 0.063989386, -0.2387993634, -0.1049142703, -0.056513153, -0.0936134458, 0.0106651317, -0.2465812415, -0.0519434698, 0.1307705045, -0.0817518085, 0.1496286392, -0.0354528949, 0.0141135594, 0.0869545713, 0.0944406167, 0.2200159878, 0.1656223238, -0.0772433132, -0.1178846881, -0.0753503069, 0.4089234769, 0.1265444756, -0.1236861423, 0.1996537745, 0.1021117046, -0.2863744199, -0.1559412032, 0.0823154822, -0.0663742274, 0.3497544229, -0.2117480487, 0.1754064262, -0.1227145046, -0.1732729226, 0.1200613976, -0.013754081, -0.0166406538, -0.0045665922, 0.2791537941, -0.2176062614, 0.080450058, -0.1096233875, 0.0016868047, -0.2030216306, -0.2661355138, -0.4274787903, -0.1317585111, -0.1823940575, 0.1311707795, 0.1808477789, -0.0524300933, 0.1408108175, 0.1967481673, 0.1277533025, -0.3219614029, -0.113664493, -0.2299861461, 0.2369440496, -0.0064799879, -0.2771320045, 0.203274861, 0.1169216111, -0.2279541641, -0.0955289826, 0.0284314789, -0.2402470559, -0.1247917339, 0.0569323264, 0.2919855416, -0.2366799712, -0.12620157, 0.0572552755, 0.0542956293, 0.5505170822, 0.0660652816, 0.1900553405, 0.0139558883, -0.4436228275, -0.1973882914, 0.0649240911, 0.3066076338, -0.2653447986, -0.218673721, 0.084126614, 0.0026897632, 0.2216520756, 0.3893524706, -0.1010951996, 0.1029094979, -0.348085463, 0.3724373281, 0.1862324327, -0.3808501065, -0.5444985628, 0.2635792196, -0.0366772376, 0.330731988, 0.2198258638, 0.0197250787, 0.1979732066, 0.009749393, 0.2746681273, 0.110991165, 0.3599118292, -0.0539453663, -0.2629932463, -0.1501541138, -0.0911058933, -0.0414851792, -0.1381846517, 0.0672325939, 0.0885717049, -0.113896586, 0.3438816071, -0.1182795689, 0.2481807172, 0.129885897, 0.2086011171, 0.1743336618, 0.1099111661, -0.0403511338, -0.3164937198, 0.188082546, -0.0852981061, -0.0295292605, -0.3783092797, -0.3485531211, -0.1945720017, -0.0583881885, -0.2409087718, -0.1717124879, 0.23857297, 0.43725124, 0.181135565, 0.2541653216, -0.001799213, 0.4922894835, -0.22596021, 0.0430974364, -0.410794884, -0.0639333054, 0.2076206654, -0.1066016257, -0.3256844878, 0.2294677943, -0.0379209109, -0.0506644696, -0.0245665424, 0.3689853251, -0.0090350062, 0.5451438427, -0.1396269649, 0.0909881666, 0.0636200458, 0.0560452081, 0.0607164055, 0.1490698308, 0.2253749967, -0.2123257369, -0.2007147521, 0.4290677905, 0.1339482665, 0.0944108739, 0.1008229852, -0.3489763141, 0.1937701702, -0.1465733945, -0.0214690696, -0.4593221545, 0.3228977621, -0.1863934696, 0.3557105064, 0.3392951488, -0.4177326262, 0.1546920687, 0.6486350894, -0.0221167877, 0.0970359072, 0.1618768275, -0.089494653, -0.1046930104, -0.2154046148, 0.3116969466, 0.4378975332, 0.1979781687, 0.3201467395, 0.2175666243, 0.1970351934, -0.4783407152, 0.2719821334, -0.2613619566, -0.0497350506, 0.3116178811, 0.2337706387, -0.1056018621, -0.5463243723, 0.178443104, -0.0284871943, 0.0335316099, -0.2530534863, 0.1925890595, -0.4839986265, -0.3050447702, -0.4533793032, -0.0004832382, -0.1906901002, -0.2545404732, 0.0010063193, 0.0512658581, 0.0556200221, 0.0102702528, -0.1824672073, 0.1323812753, -0.1237925887, -0.376193434, -0.2686218917, -0.0481046848, -0.3546078801, 0.1346622258, -0.0071912333, -0.1643133312, 0.2114717513, -0.2651866674, -0.0801100284, -0.127054885, -0.2446544915, 0.1423726082, -0.0068994593, 0.0158225931, 0.0206632502, -0.1169910356, -0.0731750205, 0.0459409505, 0.2070354968, -0.14671278, -0.2457351387, -0.1974944919, 0.0298747215, 0.0841841772, -0.3097212911, -0.3685529232, -0.1084534079, -0.112313062, 0.308910042, -0.0926161483, 0.1283420473, 0.3613404632, -0.1768619716, 0.2316176891, -0.0665878579, 0.2496747524, -0.5686767697, -0.445715338, 0.3216124177, -0.0838067383, -0.2544898093, -0.081635572, 0.0415058099, 0.2657451034, 0.205958724, -0.7856477499, -0.125015825, -0.3293461204, 0.0665294901, -0.0561572239, -0.0514069982, 0.1831352115, -0.1885336936, -0.1543068141, -0.1911270171, -0.0294202287, 0.1126434281, -0.054977607, 0.1539234966, -0.0694050044, 0.2732541859, 0.3387185931, 0.5176924467, 0.2432591319, 0.0198028274, 0.2993904054, -0.1592840701, 0.3542063534, -0.3163364828, -0.0658519566, 0.0955877081, -0.2693162858, -0.0386299901, 0.3650592864, 0.1198535934, 0.1819968224, 0.0208006799, 0.0422854237, -0.1887390018, -0.3113324046, 0.2352001518, -0.2445180416, 0.1443542689, 0.1757643372, 0.1281600147, -0.033273641, -0.1915499121, -0.1471122801, 0.0002006999, 0.0424688868, -0.0058078603, -0.360452652, 0.1492104083, -0.5625632405, 0.2226693183, 0.1985480934, 0.1745431125, -0.1717175394, -0.0993916616, 0.2057585567, -0.0968841463, 0.7381255627, 0.0631979629, 0.053792499, 0.0406155549, -0.1717144996, -0.3108314872, 0.1234150752, -0.0936186463, 0.0283296984, 0.190621689, 0.4489214122, -0.156693548, -0.0801724121, -0.1717059612, 0.1107356027, -0.0656810477, -0.0861324891, -0.2430153638, -0.3393822014, -0.1723990142, 0.0112697361, 0.0917005464, 0.1303763688, -0.1485612988, 0.2206911296, -0.0087008923, 0.0192538816, 0.2384980023, -0.0867405832, 0.39905864, -0.1014835536, 0.029569976, 0.188695997, 0.1497642845, -0.0293979496, 0.5788061619, -0.0160102416, -0.2766888142, -0.2209344208, -0.2195674777, 0.0078752898, 0.5253734589, -0.1171141192, 0.1944184452, 0.2502795458, -0.0213027783, -0.2537554502, 0.0922320634, 0.2513118088, 0.1302418262, -0.2400282025, -0.3940948546, 0.384508431, 0.0931558758, -0.1280459762, 0.0852605551, 0.0336191654, -0.5783618093, 0.0121259661, -0.1870982498, 1.0526432991, 0.0697232112, 0.543843925, 0.164458856, -0.234312281, 0.2079812288, 0.0299137551, 0.0776037797, -0.1372854561, -0.1231848076, -0.0392165408, 0.0493474677, 0.1252042949, 0.0445113443, -0.1628303081, 0.1048294082, -0.132482633, 0.4626202583, 0.0255191643, 0.055490952, -0.3534593284, -0.2368060052, -0.1421906948, 0.1792888939, -0.0040251091, 0.1795131564, -0.0311279222, 0.0284818597, -0.1299781948, -0.159406811, -0.040060252, 0.0552265868, -0.2622328401, 0.0518416837, 0.1309133023, -0.2550184429, -0.185267359, 0.3582660258, 0.4886324108, 0.0589947924, -0.022681674, 0.1810296327, 0.1769504547, 0.3690520227, 0.1631841511, -0.0711860806, 0.1402852386, 0.0347780399, -0.2269736677, -0.0868552998, 0.0416179039, -0.2070047706, -0.1773606986, 0.1021571532, -0.2035155594, -0.3819693923, -0.1024415344, -0.0708090737, 0.0490291156, -0.154362306, 0.2164075375, 0.0182431471, -0.147185564, 0.1232393309, -0.23012501, -0.3487479389, -0.2812534571, 0.6182489395, 0.3330360055, -0.1536254287, 0.6093754768, 0.0298630521, -0.2135219723, -0.2331239879, -0.0615368001, -0.0391104259, -0.3748997748, 0.175354138, -0.1659013778, -0.0390573852, -0.1358300596, 0.0943607613, -0.0543194562, -0.0048590447, -0.0295860041, -0.2917803228, -0.2042460442, -0.0120188147, 0.2862657011, 0.2789079547, 0.2129033953, 0.1974249482, -0.0714543536, 0.0140296137, -0.4197109342, 0.2962634563, 0.1460196823, 0.1726620495, 0.0889053196, -0.1397818625, 0.3646045923, -0.0083556492, 0.2012529373, 0.2086617649, -0.2705424428, -0.3591169715, -0.2536821663, 0.0615097322, -0.1423662901, -0.079969272, 0.0010466318, 0.0470731743, 0.0717448741, -0.3589704633, 0.3513583839, 0.4166297913, 0.0382951424, 0.1437447965, -0.0534599312, 0.3532391489, 0.1702318192, -0.1074286997, -0.0596708432, 0.1759940386, 0.0771525204, 0.146157667, -0.3433858156, 0.0248259436, 0.1210996434, -0.0221877024, 0.2799771428, 0.007143524, 0.0858667269, -0.4575454593, -0.1887640208, 0.1324161738, 0.4153513908, 0.3262940347, -0.3256800473, -0.3639091551, 0.0287526529, 0.2579561472, -0.0927455276, -0.2130314857, 0.284270227, 0.0909185261, 0.0438742265, 0.3295019269, 0.3479602635, -0.0955454111, 0.0770696178, -0.0678817034, 0.502114296, -0.50446558, 0.1415497512, 0.1453692913, -0.0150588388, 0.1046006382, 0.2185519338, 0.402728498, 0.0882583261, 0.7428874373, 0.069424659, 0.2655399442, 0.0344631448, 0.3497873545, -0.3061890304, -0.2714811563, 0.0087831542, 0.3392658234, -0.5183722973, 0.3594900966, 0.0399046466, 0.2947768569, 0.1023313999, 0.0146621764, -0.1142983064, 0.0610382967, -0.192738995, -0.4710099995, 0.154336825, -0.1860476285, -0.0982344672, 0.0535010062, -0.042349875, 0.0210374687, 0.1267085075, -0.0657493398, -0.0144561958, -0.3596040606, -0.0651700124, -0.263450712, 0.2892221212, -0.2736437023, 0.3618339002, 0.2516242564, -0.0244299825, 0.266410321, 0.1843282282, 0.4134004116, 0.0964875072, 0.139186129, 0.2343907803, -0.3441283703, 0.0173972305, -0.2722978294, 0.3577623665, 0.3037007451, -0.0722732171, 0.1832403541, 0.2278224677, -0.1841201633, 0.1968554109, 0.2459048927, 0.2491842508, -0.4332530499, 0.1303796023, -0.2235025167, -0.0221770778, -0.2555291951, 0.0684457719, -0.4019799232, 0.0493899807, 0.4003739655, -0.0126159489, 0.3317834735, -0.0323128514, 0.1192989573, 0.0970786437, 0.3910096884, 0.2467081249, 0.0202427041, 0.0852723494, -0.1726862639, -0.5865500569, 0.2221587598, -0.0296891741, 0.1344584227, -0.1434547454, 0.2045403421, -0.0341444276, -0.0542166531, -0.0914014131, -0.1793845594, -0.2699120343, -0.2181198746, -0.225309819, -0.3098490536, -0.0570990443, 0.0176588688, 0.126298219, -0.2951637805, 0.1995939016, -0.1299217194, 0.1710950732, -0.0734914318, 0.1191048622, -0.1012369841, -0.0817151517, 0.3345757127, 0.213446185, 0.0621458739, -0.1052115485, -0.0699440837, -0.2133231461, -0.0632964522, -0.1850118935, 0.3975628316, 0.1383020729, 0.2409787029, -0.2387066036, -0.1000700593, -0.0154633783, 0.3532560468, 0.3000926673, -0.2251818776, 0.0405857861, 0.0742221028, 0.0315964669, 0.0677158982, -0.0424555391, 0.711935401, -0.1609654427, 0.1956682801, -0.1226238385, -0.4357624054, 0.4972658753, -0.4109684229, -0.3635086715, 0.099960722, 0.1996231228, 0.1974008083, -0.2245983779, -0.6479584575, 0.240289703, 0.324463129, -0.1465073824, -0.2898398638, 0.2578243613, -0.0659370795, -0.056015756, -0.1371864825, 0.4104945958, 0.2625234425, -0.1719956547, 0.1602530181, -0.4273613095 ]
https://github.com/huggingface/datasets/issues/726
"Checksums didn't match for dataset source files" error while loading openwebtext dataset
Hi try, to provide more information please. Example code in a colab to reproduce the error, details on what you are trying to do and what you were expected and details on your environment (OS, PyPi packages version).
Hi, I have encountered this problem during loading the openwebtext dataset: ``` >>> dataset = load_dataset('openwebtext') Downloading and preparing dataset openwebtext/plain_text (download: 12.00 GiB, generated: 37.04 GiB, post-processed: Unknown size, total: 49.03 GiB) to /home/admin/.cache/huggingface/datasets/openwebtext/plain_text/1.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/load.py", line 611, in load_dataset ignore_verifications=ignore_verifications, File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 476, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 536, in _download_and_prepare self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/utils/info_utils.py", line 39, in verify_checksums raise NonMatchingChecksumError(error_msg + str(bad_urls)) datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://zenodo.org/record/3834942/files/openwebtext.tar.xz'] ``` I think this problem is caused because the released dataset has changed. Or I should download the dataset manually? Sorry for release the unfinised issue by mistake.
38
"Checksums didn't match for dataset source files" error while loading openwebtext dataset Hi, I have encountered this problem during loading the openwebtext dataset: ``` >>> dataset = load_dataset('openwebtext') Downloading and preparing dataset openwebtext/plain_text (download: 12.00 GiB, generated: 37.04 GiB, post-processed: Unknown size, total: 49.03 GiB) to /home/admin/.cache/huggingface/datasets/openwebtext/plain_text/1.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/load.py", line 611, in load_dataset ignore_verifications=ignore_verifications, File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 476, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 536, in _download_and_prepare self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/utils/info_utils.py", line 39, in verify_checksums raise NonMatchingChecksumError(error_msg + str(bad_urls)) datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://zenodo.org/record/3834942/files/openwebtext.tar.xz'] ``` I think this problem is caused because the released dataset has changed. Or I should download the dataset manually? Sorry for release the unfinised issue by mistake. Hi try, to provide more information please. Example code in a colab to reproduce the error, details on what you are trying to do and what you were expected and details on your environment (OS, PyPi packages version).
[ -0.4920597374, 0.0389879905, -0.0594883524, 0.3662637472, 0.2443766296, -0.0337876752, 0.1365439445, 0.550493896, -0.0006113529, -0.0602815896, -0.0666541159, -0.0310110059, 0.023809107, 0.3648073375, -0.2299018502, 0.2352986932, -0.1055582315, 0.0833996087, -0.3995416462, -0.0401988924, -0.2967324555, 0.1188191399, -0.1012960896, -0.1545279026, 0.0459315032, 0.0663645864, 0.2705117166, 0.1403156072, -0.2775344253, -0.2145340145, 0.1424367726, -0.1216852143, -0.1503289193, 0.3247880042, -0.0001102053, 0.2582598329, 0.3656149209, -0.2235869169, -0.2715172768, -0.1560240835, -0.4222050607, -0.1340992898, -0.1875573844, -0.1528116465, 0.0739324018, -0.2589226067, -0.1242830679, -0.4580082893, 0.0629989579, 0.2549594343, 0.2594358325, 0.5298961997, 0.4289398491, 0.1028632075, 0.2806051672, -0.0724725723, 0.0572917275, 0.1174186543, 0.1282487512, 0.1596286446, 0.0161916558, -0.0816257, -0.1522661597, 0.1627646089, 0.162322104, -0.3617705703, 0.0090029351, -0.1375185847, 0.1970815659, 0.3654462099, 0.7156858444, -0.1815348864, -0.3790056109, -0.0936340466, -0.1986480504, 0.0984760076, 0.3893741071, 0.3778525889, -0.0309309009, 0.0653218776, -0.5064874887, 0.1339265704, 0.1091974452, 0.0512660071, 0.0404527895, 0.0759121031, 0.0293369144, 0.0086893588, -0.1022983417, -0.1159980446, 0.3256937265, -0.2656747103, -0.3963983059, 0.1373596638, -0.3631494641, 0.050811138, -0.1439982504, 0.0500062667, 0.3663637638, 0.6212907434, 0.2462337315, 0.0420107357, -0.3080770671, 0.0778109953, 0.0899418741, 0.3613914847, -0.0054691168, 0.134678483, 0.1948352456, 0.1007193476, 0.0852299035, 0.0521176234, 0.0023272163, -0.5429376364, 0.144805029, 0.0951067284, 0.3429884315, -0.3038513958, -0.4549225867, 0.0472175665, 0.1378376335, -0.1998879015, 0.1437950879, -0.0076496196, -0.0868445709, 0.0802836567, 0.3436448574, 0.0880121067, -0.1021175459, -0.2038996965, -0.2310940921, -0.2034747303, -0.0948628634, -0.0629801974, 0.1900291443, -0.2003929317, 0.6136524081, -0.091705516, 0.0911764652, -0.1107357591, 0.0129412981, 0.0464535207, 0.0409470089, 0.3219111264, -0.1849274188, 0.0135513376, 0.1199885085, 0.1528469473, -0.0941033438, 0.2584346235, -0.2343890071, -0.3227926493, -0.1861533374, 0.2190783173, -0.3183859289, 0.0472871475, -0.1684521735, -0.3878967464, 0.3156641424, -0.2622768879, -0.0602095015, -0.2444444001, -0.1759609729, -0.1386691183, 0.3337226212, 0.2220811248, -0.1910728216, 0.1260491163, 0.1682972759, -0.1456350386, 0.0463750362, 0.2319476157, -0.1313236356, 0.0905490518, -0.2481277585, -0.0242460556, 0.0881312117, -0.5387328863, -0.4547850788, -0.0014980673, 0.2015115619, 0.0489919744, 0.1314415783, -0.1612882167, -0.072465606, -0.2714245617, -0.2563692629, 0.2582873702, -0.0346316025, 0.3893139064, -0.2438359559, -0.2965556085, 0.0666806921, 0.118002288, -0.0492596366, -0.0816777498, 0.1693634242, -0.0095627597, 0.2051237077, 0.0532164313, 0.0325854793, 0.1085416228, 0.1249748245, -0.1738586724, -0.0426242054, -0.0249789599, -0.1966192126, 0.2551013529, -0.0707981586, 0.1320104152, 0.0627515689, 0.1782782376, -0.4489193857, -0.1798516512, -0.2049348801, 0.0868077725, 0.1547745168, 0.1201990843, -0.1345558614, 0.0315445811, 0.0974422544, 0.1682492346, -0.1691212207, 0.0556032583, -0.2289180011, 0.2009187192, -0.0244284403, -0.1356209666, 0.4263866842, 0.0483331345, -0.0907465518, 0.0649094507, -0.4173125327, 0.4893443882, -0.0621393397, 0.0347023904, 0.0946340039, 0.4519069493, 0.0079326378, -0.3528209329, 0.0029319131, 0.029774271, 0.1392333806, -0.1301708817, 0.2713801861, -0.089352183, 0.0362148546, -0.103549026, -0.1582127661, -0.1385204941, 0.0254933704, -0.0858456194, -0.0036495172, -0.154721722, 0.0363347381, 0.2815307677, 0.2090258002, 0.1824415624, 0.3501012623, -0.2496141791, 0.3917298317, 0.0523991175, 0.0041366373, 0.1314525902, -0.0301865153, -0.0547486134, -0.1231309921, 0.2424139678, 0.4796058536, 0.0881364793, 0.0710716397, 0.102791369, 0.0828065872, -0.066603668, 0.2418121994, 0.1984368563, 0.3564120233, 0.4244211018, -0.1783009619, -0.1144582704, -0.2286890745, 0.1582079381, 0.1266210675, 0.2964774072, -0.5625894666, -0.2332415432, -0.3110374212, 0.1262902915, -0.0553843379, 0.03164519, -0.3143777251, -0.1802434176, -0.1689629257, 0.1081858203, -0.0475394204, 0.1951697767, -0.1458839178, 0.0477329046, 0.3103328049, 0.0443978347, 0.1516741812, -0.0028462638, -0.1123990566, 0.086535424, 0.674687922, -0.1140084192, 0.3397882283, -0.4775011837, 0.1271567196, -0.3800790906, 0.0426588766, -0.0863099173, -0.0893172249, 0.2315176725, 0.2202650905, 0.2755806446, 0.0788404569, -0.2032469809, 0.0359022021, 0.0523620285, -0.4162954688, 0.0309531, -0.063654162, -0.1320038736, 0.10256432, -0.0423323885, 0.0432344191, -0.3893761933, -0.0724424347, -0.0345689468, 0.1005240753, 0.0962933302, 0.0817187726, -0.050854113, 0.0996044725, 0.2866062224, -0.1770674437, -0.8880895376, 0.3540101647, -0.1670293212, -0.3587042093, -0.0214138348, 0.1422795057, 0.2374750078, 0.0288893636, -0.4529917538, -0.1852106303, -0.2191691548, -0.0274335556, 0.0638385266, 0.1969695538, 0.1162546203, 0.0691954866, -0.0823741406, -0.3447431028, -0.2273835689, 0.1099676117, -0.2630305886, 0.5279318094, -0.0101229269, 0.0629740581, 0.0090144938, 0.1534842998, 0.4110189378, -0.1777413785, 0.4243548512, 0.2426644415, 0.3268180788, -0.2149715722, -0.1142092347, 0.0165321697, -0.1049814299, 0.3337228, 0.2043136507, 0.0627745613, 0.2587613463, -0.1610166281, -0.0275122374, -0.5019217134, -0.311925441, -0.1261366159, -0.4771395624, 0.1579100788, 0.0015202741, -0.0457787924, -0.1766193211, -0.2818225622, 0.1243384033, 0.0594625138, -0.0118076978, 0.0062618302, -0.1055892184, 0.1124698371, -0.0435051918, 0.3818669617, 0.1593197584, 0.4464142919, 0.0325869657, -0.0394473262, -0.1186380908, 0.2015808672, 0.1771976054, -0.1391034573, 0.3249416947, 0.0442028008, 0.1309690624, -0.198840037, -0.2067615837, 0.2606892288, -0.0236105472, 0.381657958, -0.1196591556, -0.4288542867, 0.0298065692, 0.228195861, 0.4090625942, -0.1562368423, -0.1394208819, -0.2068854272, -0.3080565631, -0.3402202725, -0.369473666, 0.1338024288, 0.2898081839, -0.1530364305, -0.0328775905, -0.1857860684, -0.266718179, 0.3404830396, -0.180463478, 0.4067646563, 0.0107003842, 0.3208975792, 0.0213312432, 0.2319337726, 0.4421768188, 0.7271000743, -0.1791524887, -0.2185595036, -0.0536127612, -0.1541268229, -0.208710447, 0.0071374206, 0.0306304768, -0.2557500601, 0.0924118012, -0.0574298985, 0.0443659723, 0.0608739853, 0.1258152127, 0.0699755028, -0.4000608623, -0.2998198569, 0.2181072235, -0.1561891139, 0.0378430672, 0.506482482, 0.0676233023, -0.0924676657, 0.0669310987, 0.1319430172, 0.6712409854, -0.1444396377, -0.1336938143, 0.0441394821, -0.1740806401, -0.2378407568, 0.0318626575, -0.2122766674, -0.3817217946, -0.5945904255, 0.0930715799, -0.2704686224, 0.0329008289, 0.2246017754, 0.066137746, 0.0567725934, -0.0167897195, -0.0726982206, 0.0699927807, 0.3150299191, -0.3102376759, 0.0056238803, 0.0674701408, 0.1505780965, -0.2651731968, 0.2959448099, -0.0667070374, -0.1344788671, -0.0533542596, -0.2241714448, -0.6046836376, 0.0633568242, -0.2882436812, 0.2968220115, 0.2508453429, 0.0494314767, 0.1574564725, 0.4011854827, 0.4436886013, 0.2695260942, -0.2344843149, 0.1727594435, 0.3623523414, -0.0145821925, -0.0064135762, 0.211714685, 0.4534878433, -0.1813888401, -0.2389177233, 0.0377393663, -0.0976290479, -0.4282444119, 0.1780986935, -0.2890241146, 0.1226880252, -0.4741538465, -0.0448159538, -0.1610464305, 0.0495673679, -0.1170773804, 0.1266120076, 0.3015564084, -0.025820829, 0.3938731849, 0.2872490287, -0.4737052023, 0.0818113983, 0.4354538023, -0.2639755905, -0.0656897873, 0.7143594027, -0.0224219766, -0.1156796366, -0.0845555663, 0.3356197476, 0.1899362206, -0.461309135, 0.1759459078, -0.1370142549, 0.16763933, -0.0239783265, 0.5160508752, 0.4567056596, 0.3805169165, 0.329077512, -0.5187922716, -0.1200369298, 0.0344010256, -0.1044826582, 0.3924303949, -0.1633546054, 0.069032751, 0.037948437, 0.0105708325, -0.2830747664, 0.1500228941, -0.3312318623, 0.0517839156, 0.1376153529, 0.0577626973, 0.0915412679, -0.0988199115, 0.1534479856, -0.1528943181, -0.3658683598, -0.2194008082, -0.0937627554, 0.1155197173, 0.0607095957, -0.3785832524, 0.1993468851, -0.3264402449, -0.1617551148, -0.1271058619, 0.0065266793, 0.0330898277, -0.0361988693, 0.0274357926, 0.2251443863, -0.0241947602, 0.0211056601, 0.0567586944, -0.3625778258, 0.0497006029, 0.0169093348, 0.1100958139, 0.0522978455, -0.1036030129, 0.0623392351, 0.0843106732, -0.024184633, 0.1517636478, 0.3195521832, -0.2027383596, 0.0648035184, 0.4826678336, 0.3069389462, 0.02040595, -0.2247436494, -0.1236109287, 0.1812739372, 0.1958635002, -0.3893769681, -0.0456151515, 0.0189759191, 0.2228654325, -0.0063583371, -0.1106347814, 0.2290060073, -0.2677124739, -0.0688796788, 0.0097187888, 0.2057591379, 0.2482972741, 0.2930919528, 0.5799325109, -0.1759134531, -0.1093826517, -0.0568372644, -0.1746615618, 0.0977744535, 0.0135682449, -0.1358995736, 0.4929815829, -0.3232512772, 0.2292831093, -0.2266657352, -0.708422184, 0.3919852078, -0.1421011686, 0.0754046738, 0.0047915108, 0.212447986, 0.24480398, -0.0497316942, 0.1501273513, -0.3210781813, 0.4191268682, 0.0932896361, -0.0296807438, -0.2051963806, -0.2670287788, 0.109669894, 0.0063233282, -0.1057886928, 0.1221757457, -0.0712559372, 0.16273202, -0.302937299, -0.1216506958, 0.0532988757, -0.1697727144, -0.0355588272, -0.2146686316, 0.2357461452, 0.2564387321, -0.1772018373, 0.3424800634, 0.7380923629, 0.3715671599, 0.4830287099, 0.1371566504, -0.1722052097, 0.1276462376, 0.127407223, -0.0393285342, 0.2327708602, 0.0634963438, -0.0034287118, 0.3761830926, 0.1473831534, -0.034196306, -0.3039712012, -0.2243896723, -0.2451120466, 0.0394474082, 0.2884536386, 0.0391371548, 0.0263522211, -0.2462792993, 0.1971479654, -0.0284640957, -0.0342448018, 0.2045909464, -0.0086462181, 0.1436298788, -0.0167891588, 0.0952034071, -0.1158063114, 0.4963772893, 0.3752226233, -0.1486889571, -0.1958690435, -0.370514065, -0.5975678563, 0.2106407136, 0.1432379782, -0.1041445807, 0.1782564223, -0.0372596569, 0.0617658161, -0.1067646369, 0.4922024608, 0.0131058693, -0.1966294199, 0.0617455803, -0.2441646457, -0.2179753184, -0.2281747013, -0.2018174976, -0.0431280695, -0.3614444733, 0.1915893555, 0.0650834516, 0.157985568, -0.1930200309, 0.0880775005, 0.0480719097, 0.0848010108, 0.1467908174, -0.0055304035, 0.4740927815, 0.053589996, -0.0633306503, -0.0972625613, -0.1911646277, -0.1607999951, 0.5104889274, -0.0338875502, 0.2085701376, -0.0188264847, -0.0699279755, -0.2319627553, 0.3770515621, -0.1640320122, -0.1332943588, -0.4568926096, -0.2069933265, -0.0227439664, -0.2393720448, 0.3742826581, -0.1085785925, -0.2206010967, 0.3657268286, 0.0113381948, -0.3828712106, 0.4573957622, 0.063447319, 0.0366951935, -0.147557959, 0.056918446, -0.1345570385, -0.0479522347, -0.5954987407, 0.2696995735, 0.4791093469, 0.0051989048, -0.0346903503, 0.2399042994, -0.1095317677, 0.2111076713, 0.0491967574, 0.1587299258, -0.0308018085, -0.2375634313, -0.2700147331, -0.0389960259 ]
https://github.com/huggingface/datasets/issues/726
"Checksums didn't match for dataset source files" error while loading openwebtext dataset
> Hi try, to provide more information please. > > Example code in a colab to reproduce the error, details on what you are trying to do and what you were expected and details on your environment (OS, PyPi packages version). I have update the description, sorry for the incomplete issue by mistake.
Hi, I have encountered this problem during loading the openwebtext dataset: ``` >>> dataset = load_dataset('openwebtext') Downloading and preparing dataset openwebtext/plain_text (download: 12.00 GiB, generated: 37.04 GiB, post-processed: Unknown size, total: 49.03 GiB) to /home/admin/.cache/huggingface/datasets/openwebtext/plain_text/1.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/load.py", line 611, in load_dataset ignore_verifications=ignore_verifications, File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 476, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 536, in _download_and_prepare self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/utils/info_utils.py", line 39, in verify_checksums raise NonMatchingChecksumError(error_msg + str(bad_urls)) datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://zenodo.org/record/3834942/files/openwebtext.tar.xz'] ``` I think this problem is caused because the released dataset has changed. Or I should download the dataset manually? Sorry for release the unfinised issue by mistake.
53
"Checksums didn't match for dataset source files" error while loading openwebtext dataset Hi, I have encountered this problem during loading the openwebtext dataset: ``` >>> dataset = load_dataset('openwebtext') Downloading and preparing dataset openwebtext/plain_text (download: 12.00 GiB, generated: 37.04 GiB, post-processed: Unknown size, total: 49.03 GiB) to /home/admin/.cache/huggingface/datasets/openwebtext/plain_text/1.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/load.py", line 611, in load_dataset ignore_verifications=ignore_verifications, File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 476, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 536, in _download_and_prepare self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/utils/info_utils.py", line 39, in verify_checksums raise NonMatchingChecksumError(error_msg + str(bad_urls)) datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://zenodo.org/record/3834942/files/openwebtext.tar.xz'] ``` I think this problem is caused because the released dataset has changed. Or I should download the dataset manually? Sorry for release the unfinised issue by mistake. > Hi try, to provide more information please. > > Example code in a colab to reproduce the error, details on what you are trying to do and what you were expected and details on your environment (OS, PyPi packages version). I have update the description, sorry for the incomplete issue by mistake.
[ -0.4920597374, 0.0389879905, -0.0594883524, 0.3662637472, 0.2443766296, -0.0337876752, 0.1365439445, 0.550493896, -0.0006113529, -0.0602815896, -0.0666541159, -0.0310110059, 0.023809107, 0.3648073375, -0.2299018502, 0.2352986932, -0.1055582315, 0.0833996087, -0.3995416462, -0.0401988924, -0.2967324555, 0.1188191399, -0.1012960896, -0.1545279026, 0.0459315032, 0.0663645864, 0.2705117166, 0.1403156072, -0.2775344253, -0.2145340145, 0.1424367726, -0.1216852143, -0.1503289193, 0.3247880042, -0.0001102053, 0.2582598329, 0.3656149209, -0.2235869169, -0.2715172768, -0.1560240835, -0.4222050607, -0.1340992898, -0.1875573844, -0.1528116465, 0.0739324018, -0.2589226067, -0.1242830679, -0.4580082893, 0.0629989579, 0.2549594343, 0.2594358325, 0.5298961997, 0.4289398491, 0.1028632075, 0.2806051672, -0.0724725723, 0.0572917275, 0.1174186543, 0.1282487512, 0.1596286446, 0.0161916558, -0.0816257, -0.1522661597, 0.1627646089, 0.162322104, -0.3617705703, 0.0090029351, -0.1375185847, 0.1970815659, 0.3654462099, 0.7156858444, -0.1815348864, -0.3790056109, -0.0936340466, -0.1986480504, 0.0984760076, 0.3893741071, 0.3778525889, -0.0309309009, 0.0653218776, -0.5064874887, 0.1339265704, 0.1091974452, 0.0512660071, 0.0404527895, 0.0759121031, 0.0293369144, 0.0086893588, -0.1022983417, -0.1159980446, 0.3256937265, -0.2656747103, -0.3963983059, 0.1373596638, -0.3631494641, 0.050811138, -0.1439982504, 0.0500062667, 0.3663637638, 0.6212907434, 0.2462337315, 0.0420107357, -0.3080770671, 0.0778109953, 0.0899418741, 0.3613914847, -0.0054691168, 0.134678483, 0.1948352456, 0.1007193476, 0.0852299035, 0.0521176234, 0.0023272163, -0.5429376364, 0.144805029, 0.0951067284, 0.3429884315, -0.3038513958, -0.4549225867, 0.0472175665, 0.1378376335, -0.1998879015, 0.1437950879, -0.0076496196, -0.0868445709, 0.0802836567, 0.3436448574, 0.0880121067, -0.1021175459, -0.2038996965, -0.2310940921, -0.2034747303, -0.0948628634, -0.0629801974, 0.1900291443, -0.2003929317, 0.6136524081, -0.091705516, 0.0911764652, -0.1107357591, 0.0129412981, 0.0464535207, 0.0409470089, 0.3219111264, -0.1849274188, 0.0135513376, 0.1199885085, 0.1528469473, -0.0941033438, 0.2584346235, -0.2343890071, -0.3227926493, -0.1861533374, 0.2190783173, -0.3183859289, 0.0472871475, -0.1684521735, -0.3878967464, 0.3156641424, -0.2622768879, -0.0602095015, -0.2444444001, -0.1759609729, -0.1386691183, 0.3337226212, 0.2220811248, -0.1910728216, 0.1260491163, 0.1682972759, -0.1456350386, 0.0463750362, 0.2319476157, -0.1313236356, 0.0905490518, -0.2481277585, -0.0242460556, 0.0881312117, -0.5387328863, -0.4547850788, -0.0014980673, 0.2015115619, 0.0489919744, 0.1314415783, -0.1612882167, -0.072465606, -0.2714245617, -0.2563692629, 0.2582873702, -0.0346316025, 0.3893139064, -0.2438359559, -0.2965556085, 0.0666806921, 0.118002288, -0.0492596366, -0.0816777498, 0.1693634242, -0.0095627597, 0.2051237077, 0.0532164313, 0.0325854793, 0.1085416228, 0.1249748245, -0.1738586724, -0.0426242054, -0.0249789599, -0.1966192126, 0.2551013529, -0.0707981586, 0.1320104152, 0.0627515689, 0.1782782376, -0.4489193857, -0.1798516512, -0.2049348801, 0.0868077725, 0.1547745168, 0.1201990843, -0.1345558614, 0.0315445811, 0.0974422544, 0.1682492346, -0.1691212207, 0.0556032583, -0.2289180011, 0.2009187192, -0.0244284403, -0.1356209666, 0.4263866842, 0.0483331345, -0.0907465518, 0.0649094507, -0.4173125327, 0.4893443882, -0.0621393397, 0.0347023904, 0.0946340039, 0.4519069493, 0.0079326378, -0.3528209329, 0.0029319131, 0.029774271, 0.1392333806, -0.1301708817, 0.2713801861, -0.089352183, 0.0362148546, -0.103549026, -0.1582127661, -0.1385204941, 0.0254933704, -0.0858456194, -0.0036495172, -0.154721722, 0.0363347381, 0.2815307677, 0.2090258002, 0.1824415624, 0.3501012623, -0.2496141791, 0.3917298317, 0.0523991175, 0.0041366373, 0.1314525902, -0.0301865153, -0.0547486134, -0.1231309921, 0.2424139678, 0.4796058536, 0.0881364793, 0.0710716397, 0.102791369, 0.0828065872, -0.066603668, 0.2418121994, 0.1984368563, 0.3564120233, 0.4244211018, -0.1783009619, -0.1144582704, -0.2286890745, 0.1582079381, 0.1266210675, 0.2964774072, -0.5625894666, -0.2332415432, -0.3110374212, 0.1262902915, -0.0553843379, 0.03164519, -0.3143777251, -0.1802434176, -0.1689629257, 0.1081858203, -0.0475394204, 0.1951697767, -0.1458839178, 0.0477329046, 0.3103328049, 0.0443978347, 0.1516741812, -0.0028462638, -0.1123990566, 0.086535424, 0.674687922, -0.1140084192, 0.3397882283, -0.4775011837, 0.1271567196, -0.3800790906, 0.0426588766, -0.0863099173, -0.0893172249, 0.2315176725, 0.2202650905, 0.2755806446, 0.0788404569, -0.2032469809, 0.0359022021, 0.0523620285, -0.4162954688, 0.0309531, -0.063654162, -0.1320038736, 0.10256432, -0.0423323885, 0.0432344191, -0.3893761933, -0.0724424347, -0.0345689468, 0.1005240753, 0.0962933302, 0.0817187726, -0.050854113, 0.0996044725, 0.2866062224, -0.1770674437, -0.8880895376, 0.3540101647, -0.1670293212, -0.3587042093, -0.0214138348, 0.1422795057, 0.2374750078, 0.0288893636, -0.4529917538, -0.1852106303, -0.2191691548, -0.0274335556, 0.0638385266, 0.1969695538, 0.1162546203, 0.0691954866, -0.0823741406, -0.3447431028, -0.2273835689, 0.1099676117, -0.2630305886, 0.5279318094, -0.0101229269, 0.0629740581, 0.0090144938, 0.1534842998, 0.4110189378, -0.1777413785, 0.4243548512, 0.2426644415, 0.3268180788, -0.2149715722, -0.1142092347, 0.0165321697, -0.1049814299, 0.3337228, 0.2043136507, 0.0627745613, 0.2587613463, -0.1610166281, -0.0275122374, -0.5019217134, -0.311925441, -0.1261366159, -0.4771395624, 0.1579100788, 0.0015202741, -0.0457787924, -0.1766193211, -0.2818225622, 0.1243384033, 0.0594625138, -0.0118076978, 0.0062618302, -0.1055892184, 0.1124698371, -0.0435051918, 0.3818669617, 0.1593197584, 0.4464142919, 0.0325869657, -0.0394473262, -0.1186380908, 0.2015808672, 0.1771976054, -0.1391034573, 0.3249416947, 0.0442028008, 0.1309690624, -0.198840037, -0.2067615837, 0.2606892288, -0.0236105472, 0.381657958, -0.1196591556, -0.4288542867, 0.0298065692, 0.228195861, 0.4090625942, -0.1562368423, -0.1394208819, -0.2068854272, -0.3080565631, -0.3402202725, -0.369473666, 0.1338024288, 0.2898081839, -0.1530364305, -0.0328775905, -0.1857860684, -0.266718179, 0.3404830396, -0.180463478, 0.4067646563, 0.0107003842, 0.3208975792, 0.0213312432, 0.2319337726, 0.4421768188, 0.7271000743, -0.1791524887, -0.2185595036, -0.0536127612, -0.1541268229, -0.208710447, 0.0071374206, 0.0306304768, -0.2557500601, 0.0924118012, -0.0574298985, 0.0443659723, 0.0608739853, 0.1258152127, 0.0699755028, -0.4000608623, -0.2998198569, 0.2181072235, -0.1561891139, 0.0378430672, 0.506482482, 0.0676233023, -0.0924676657, 0.0669310987, 0.1319430172, 0.6712409854, -0.1444396377, -0.1336938143, 0.0441394821, -0.1740806401, -0.2378407568, 0.0318626575, -0.2122766674, -0.3817217946, -0.5945904255, 0.0930715799, -0.2704686224, 0.0329008289, 0.2246017754, 0.066137746, 0.0567725934, -0.0167897195, -0.0726982206, 0.0699927807, 0.3150299191, -0.3102376759, 0.0056238803, 0.0674701408, 0.1505780965, -0.2651731968, 0.2959448099, -0.0667070374, -0.1344788671, -0.0533542596, -0.2241714448, -0.6046836376, 0.0633568242, -0.2882436812, 0.2968220115, 0.2508453429, 0.0494314767, 0.1574564725, 0.4011854827, 0.4436886013, 0.2695260942, -0.2344843149, 0.1727594435, 0.3623523414, -0.0145821925, -0.0064135762, 0.211714685, 0.4534878433, -0.1813888401, -0.2389177233, 0.0377393663, -0.0976290479, -0.4282444119, 0.1780986935, -0.2890241146, 0.1226880252, -0.4741538465, -0.0448159538, -0.1610464305, 0.0495673679, -0.1170773804, 0.1266120076, 0.3015564084, -0.025820829, 0.3938731849, 0.2872490287, -0.4737052023, 0.0818113983, 0.4354538023, -0.2639755905, -0.0656897873, 0.7143594027, -0.0224219766, -0.1156796366, -0.0845555663, 0.3356197476, 0.1899362206, -0.461309135, 0.1759459078, -0.1370142549, 0.16763933, -0.0239783265, 0.5160508752, 0.4567056596, 0.3805169165, 0.329077512, -0.5187922716, -0.1200369298, 0.0344010256, -0.1044826582, 0.3924303949, -0.1633546054, 0.069032751, 0.037948437, 0.0105708325, -0.2830747664, 0.1500228941, -0.3312318623, 0.0517839156, 0.1376153529, 0.0577626973, 0.0915412679, -0.0988199115, 0.1534479856, -0.1528943181, -0.3658683598, -0.2194008082, -0.0937627554, 0.1155197173, 0.0607095957, -0.3785832524, 0.1993468851, -0.3264402449, -0.1617551148, -0.1271058619, 0.0065266793, 0.0330898277, -0.0361988693, 0.0274357926, 0.2251443863, -0.0241947602, 0.0211056601, 0.0567586944, -0.3625778258, 0.0497006029, 0.0169093348, 0.1100958139, 0.0522978455, -0.1036030129, 0.0623392351, 0.0843106732, -0.024184633, 0.1517636478, 0.3195521832, -0.2027383596, 0.0648035184, 0.4826678336, 0.3069389462, 0.02040595, -0.2247436494, -0.1236109287, 0.1812739372, 0.1958635002, -0.3893769681, -0.0456151515, 0.0189759191, 0.2228654325, -0.0063583371, -0.1106347814, 0.2290060073, -0.2677124739, -0.0688796788, 0.0097187888, 0.2057591379, 0.2482972741, 0.2930919528, 0.5799325109, -0.1759134531, -0.1093826517, -0.0568372644, -0.1746615618, 0.0977744535, 0.0135682449, -0.1358995736, 0.4929815829, -0.3232512772, 0.2292831093, -0.2266657352, -0.708422184, 0.3919852078, -0.1421011686, 0.0754046738, 0.0047915108, 0.212447986, 0.24480398, -0.0497316942, 0.1501273513, -0.3210781813, 0.4191268682, 0.0932896361, -0.0296807438, -0.2051963806, -0.2670287788, 0.109669894, 0.0063233282, -0.1057886928, 0.1221757457, -0.0712559372, 0.16273202, -0.302937299, -0.1216506958, 0.0532988757, -0.1697727144, -0.0355588272, -0.2146686316, 0.2357461452, 0.2564387321, -0.1772018373, 0.3424800634, 0.7380923629, 0.3715671599, 0.4830287099, 0.1371566504, -0.1722052097, 0.1276462376, 0.127407223, -0.0393285342, 0.2327708602, 0.0634963438, -0.0034287118, 0.3761830926, 0.1473831534, -0.034196306, -0.3039712012, -0.2243896723, -0.2451120466, 0.0394474082, 0.2884536386, 0.0391371548, 0.0263522211, -0.2462792993, 0.1971479654, -0.0284640957, -0.0342448018, 0.2045909464, -0.0086462181, 0.1436298788, -0.0167891588, 0.0952034071, -0.1158063114, 0.4963772893, 0.3752226233, -0.1486889571, -0.1958690435, -0.370514065, -0.5975678563, 0.2106407136, 0.1432379782, -0.1041445807, 0.1782564223, -0.0372596569, 0.0617658161, -0.1067646369, 0.4922024608, 0.0131058693, -0.1966294199, 0.0617455803, -0.2441646457, -0.2179753184, -0.2281747013, -0.2018174976, -0.0431280695, -0.3614444733, 0.1915893555, 0.0650834516, 0.157985568, -0.1930200309, 0.0880775005, 0.0480719097, 0.0848010108, 0.1467908174, -0.0055304035, 0.4740927815, 0.053589996, -0.0633306503, -0.0972625613, -0.1911646277, -0.1607999951, 0.5104889274, -0.0338875502, 0.2085701376, -0.0188264847, -0.0699279755, -0.2319627553, 0.3770515621, -0.1640320122, -0.1332943588, -0.4568926096, -0.2069933265, -0.0227439664, -0.2393720448, 0.3742826581, -0.1085785925, -0.2206010967, 0.3657268286, 0.0113381948, -0.3828712106, 0.4573957622, 0.063447319, 0.0366951935, -0.147557959, 0.056918446, -0.1345570385, -0.0479522347, -0.5954987407, 0.2696995735, 0.4791093469, 0.0051989048, -0.0346903503, 0.2399042994, -0.1095317677, 0.2111076713, 0.0491967574, 0.1587299258, -0.0308018085, -0.2375634313, -0.2700147331, -0.0389960259 ]
https://github.com/huggingface/datasets/issues/726
"Checksums didn't match for dataset source files" error while loading openwebtext dataset
Hi, I have manually downloaded the compressed dataset `openwebtext.tar.xz' and use the following command to preprocess the examples: ``` >>> dataset = load_dataset('/home/admin/workspace/datasets/datasets-master/datasets-master/datasets/openwebtext', data_dir='/home/admin/workspace/datasets') Using custom data configuration default Downloading and preparing dataset openwebtext/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/admin/.cache/huggingface/datasets/openwebtext/default/0.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02... Dataset openwebtext downloaded and prepared to /home/admin/.cache/huggingface/datasets/openwebtext/default/0.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02. Subsequent calls will reuse this data. >>> len(dataset['train']) 74571 >>> ``` The size of the pre-processed example file is only 354MB, however the processed bookcorpus dataset is 4.6g. Are there any problems?
Hi, I have encountered this problem during loading the openwebtext dataset: ``` >>> dataset = load_dataset('openwebtext') Downloading and preparing dataset openwebtext/plain_text (download: 12.00 GiB, generated: 37.04 GiB, post-processed: Unknown size, total: 49.03 GiB) to /home/admin/.cache/huggingface/datasets/openwebtext/plain_text/1.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/load.py", line 611, in load_dataset ignore_verifications=ignore_verifications, File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 476, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 536, in _download_and_prepare self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/utils/info_utils.py", line 39, in verify_checksums raise NonMatchingChecksumError(error_msg + str(bad_urls)) datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://zenodo.org/record/3834942/files/openwebtext.tar.xz'] ``` I think this problem is caused because the released dataset has changed. Or I should download the dataset manually? Sorry for release the unfinised issue by mistake.
87
"Checksums didn't match for dataset source files" error while loading openwebtext dataset Hi, I have encountered this problem during loading the openwebtext dataset: ``` >>> dataset = load_dataset('openwebtext') Downloading and preparing dataset openwebtext/plain_text (download: 12.00 GiB, generated: 37.04 GiB, post-processed: Unknown size, total: 49.03 GiB) to /home/admin/.cache/huggingface/datasets/openwebtext/plain_text/1.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/load.py", line 611, in load_dataset ignore_verifications=ignore_verifications, File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 476, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 536, in _download_and_prepare self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/utils/info_utils.py", line 39, in verify_checksums raise NonMatchingChecksumError(error_msg + str(bad_urls)) datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://zenodo.org/record/3834942/files/openwebtext.tar.xz'] ``` I think this problem is caused because the released dataset has changed. Or I should download the dataset manually? Sorry for release the unfinised issue by mistake. Hi, I have manually downloaded the compressed dataset `openwebtext.tar.xz' and use the following command to preprocess the examples: ``` >>> dataset = load_dataset('/home/admin/workspace/datasets/datasets-master/datasets-master/datasets/openwebtext', data_dir='/home/admin/workspace/datasets') Using custom data configuration default Downloading and preparing dataset openwebtext/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/admin/.cache/huggingface/datasets/openwebtext/default/0.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02... Dataset openwebtext downloaded and prepared to /home/admin/.cache/huggingface/datasets/openwebtext/default/0.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02. Subsequent calls will reuse this data. >>> len(dataset['train']) 74571 >>> ``` The size of the pre-processed example file is only 354MB, however the processed bookcorpus dataset is 4.6g. Are there any problems?
[ -0.4920597374, 0.0389879905, -0.0594883524, 0.3662637472, 0.2443766296, -0.0337876752, 0.1365439445, 0.550493896, -0.0006113529, -0.0602815896, -0.0666541159, -0.0310110059, 0.023809107, 0.3648073375, -0.2299018502, 0.2352986932, -0.1055582315, 0.0833996087, -0.3995416462, -0.0401988924, -0.2967324555, 0.1188191399, -0.1012960896, -0.1545279026, 0.0459315032, 0.0663645864, 0.2705117166, 0.1403156072, -0.2775344253, -0.2145340145, 0.1424367726, -0.1216852143, -0.1503289193, 0.3247880042, -0.0001102053, 0.2582598329, 0.3656149209, -0.2235869169, -0.2715172768, -0.1560240835, -0.4222050607, -0.1340992898, -0.1875573844, -0.1528116465, 0.0739324018, -0.2589226067, -0.1242830679, -0.4580082893, 0.0629989579, 0.2549594343, 0.2594358325, 0.5298961997, 0.4289398491, 0.1028632075, 0.2806051672, -0.0724725723, 0.0572917275, 0.1174186543, 0.1282487512, 0.1596286446, 0.0161916558, -0.0816257, -0.1522661597, 0.1627646089, 0.162322104, -0.3617705703, 0.0090029351, -0.1375185847, 0.1970815659, 0.3654462099, 0.7156858444, -0.1815348864, -0.3790056109, -0.0936340466, -0.1986480504, 0.0984760076, 0.3893741071, 0.3778525889, -0.0309309009, 0.0653218776, -0.5064874887, 0.1339265704, 0.1091974452, 0.0512660071, 0.0404527895, 0.0759121031, 0.0293369144, 0.0086893588, -0.1022983417, -0.1159980446, 0.3256937265, -0.2656747103, -0.3963983059, 0.1373596638, -0.3631494641, 0.050811138, -0.1439982504, 0.0500062667, 0.3663637638, 0.6212907434, 0.2462337315, 0.0420107357, -0.3080770671, 0.0778109953, 0.0899418741, 0.3613914847, -0.0054691168, 0.134678483, 0.1948352456, 0.1007193476, 0.0852299035, 0.0521176234, 0.0023272163, -0.5429376364, 0.144805029, 0.0951067284, 0.3429884315, -0.3038513958, -0.4549225867, 0.0472175665, 0.1378376335, -0.1998879015, 0.1437950879, -0.0076496196, -0.0868445709, 0.0802836567, 0.3436448574, 0.0880121067, -0.1021175459, -0.2038996965, -0.2310940921, -0.2034747303, -0.0948628634, -0.0629801974, 0.1900291443, -0.2003929317, 0.6136524081, -0.091705516, 0.0911764652, -0.1107357591, 0.0129412981, 0.0464535207, 0.0409470089, 0.3219111264, -0.1849274188, 0.0135513376, 0.1199885085, 0.1528469473, -0.0941033438, 0.2584346235, -0.2343890071, -0.3227926493, -0.1861533374, 0.2190783173, -0.3183859289, 0.0472871475, -0.1684521735, -0.3878967464, 0.3156641424, -0.2622768879, -0.0602095015, -0.2444444001, -0.1759609729, -0.1386691183, 0.3337226212, 0.2220811248, -0.1910728216, 0.1260491163, 0.1682972759, -0.1456350386, 0.0463750362, 0.2319476157, -0.1313236356, 0.0905490518, -0.2481277585, -0.0242460556, 0.0881312117, -0.5387328863, -0.4547850788, -0.0014980673, 0.2015115619, 0.0489919744, 0.1314415783, -0.1612882167, -0.072465606, -0.2714245617, -0.2563692629, 0.2582873702, -0.0346316025, 0.3893139064, -0.2438359559, -0.2965556085, 0.0666806921, 0.118002288, -0.0492596366, -0.0816777498, 0.1693634242, -0.0095627597, 0.2051237077, 0.0532164313, 0.0325854793, 0.1085416228, 0.1249748245, -0.1738586724, -0.0426242054, -0.0249789599, -0.1966192126, 0.2551013529, -0.0707981586, 0.1320104152, 0.0627515689, 0.1782782376, -0.4489193857, -0.1798516512, -0.2049348801, 0.0868077725, 0.1547745168, 0.1201990843, -0.1345558614, 0.0315445811, 0.0974422544, 0.1682492346, -0.1691212207, 0.0556032583, -0.2289180011, 0.2009187192, -0.0244284403, -0.1356209666, 0.4263866842, 0.0483331345, -0.0907465518, 0.0649094507, -0.4173125327, 0.4893443882, -0.0621393397, 0.0347023904, 0.0946340039, 0.4519069493, 0.0079326378, -0.3528209329, 0.0029319131, 0.029774271, 0.1392333806, -0.1301708817, 0.2713801861, -0.089352183, 0.0362148546, -0.103549026, -0.1582127661, -0.1385204941, 0.0254933704, -0.0858456194, -0.0036495172, -0.154721722, 0.0363347381, 0.2815307677, 0.2090258002, 0.1824415624, 0.3501012623, -0.2496141791, 0.3917298317, 0.0523991175, 0.0041366373, 0.1314525902, -0.0301865153, -0.0547486134, -0.1231309921, 0.2424139678, 0.4796058536, 0.0881364793, 0.0710716397, 0.102791369, 0.0828065872, -0.066603668, 0.2418121994, 0.1984368563, 0.3564120233, 0.4244211018, -0.1783009619, -0.1144582704, -0.2286890745, 0.1582079381, 0.1266210675, 0.2964774072, -0.5625894666, -0.2332415432, -0.3110374212, 0.1262902915, -0.0553843379, 0.03164519, -0.3143777251, -0.1802434176, -0.1689629257, 0.1081858203, -0.0475394204, 0.1951697767, -0.1458839178, 0.0477329046, 0.3103328049, 0.0443978347, 0.1516741812, -0.0028462638, -0.1123990566, 0.086535424, 0.674687922, -0.1140084192, 0.3397882283, -0.4775011837, 0.1271567196, -0.3800790906, 0.0426588766, -0.0863099173, -0.0893172249, 0.2315176725, 0.2202650905, 0.2755806446, 0.0788404569, -0.2032469809, 0.0359022021, 0.0523620285, -0.4162954688, 0.0309531, -0.063654162, -0.1320038736, 0.10256432, -0.0423323885, 0.0432344191, -0.3893761933, -0.0724424347, -0.0345689468, 0.1005240753, 0.0962933302, 0.0817187726, -0.050854113, 0.0996044725, 0.2866062224, -0.1770674437, -0.8880895376, 0.3540101647, -0.1670293212, -0.3587042093, -0.0214138348, 0.1422795057, 0.2374750078, 0.0288893636, -0.4529917538, -0.1852106303, -0.2191691548, -0.0274335556, 0.0638385266, 0.1969695538, 0.1162546203, 0.0691954866, -0.0823741406, -0.3447431028, -0.2273835689, 0.1099676117, -0.2630305886, 0.5279318094, -0.0101229269, 0.0629740581, 0.0090144938, 0.1534842998, 0.4110189378, -0.1777413785, 0.4243548512, 0.2426644415, 0.3268180788, -0.2149715722, -0.1142092347, 0.0165321697, -0.1049814299, 0.3337228, 0.2043136507, 0.0627745613, 0.2587613463, -0.1610166281, -0.0275122374, -0.5019217134, -0.311925441, -0.1261366159, -0.4771395624, 0.1579100788, 0.0015202741, -0.0457787924, -0.1766193211, -0.2818225622, 0.1243384033, 0.0594625138, -0.0118076978, 0.0062618302, -0.1055892184, 0.1124698371, -0.0435051918, 0.3818669617, 0.1593197584, 0.4464142919, 0.0325869657, -0.0394473262, -0.1186380908, 0.2015808672, 0.1771976054, -0.1391034573, 0.3249416947, 0.0442028008, 0.1309690624, -0.198840037, -0.2067615837, 0.2606892288, -0.0236105472, 0.381657958, -0.1196591556, -0.4288542867, 0.0298065692, 0.228195861, 0.4090625942, -0.1562368423, -0.1394208819, -0.2068854272, -0.3080565631, -0.3402202725, -0.369473666, 0.1338024288, 0.2898081839, -0.1530364305, -0.0328775905, -0.1857860684, -0.266718179, 0.3404830396, -0.180463478, 0.4067646563, 0.0107003842, 0.3208975792, 0.0213312432, 0.2319337726, 0.4421768188, 0.7271000743, -0.1791524887, -0.2185595036, -0.0536127612, -0.1541268229, -0.208710447, 0.0071374206, 0.0306304768, -0.2557500601, 0.0924118012, -0.0574298985, 0.0443659723, 0.0608739853, 0.1258152127, 0.0699755028, -0.4000608623, -0.2998198569, 0.2181072235, -0.1561891139, 0.0378430672, 0.506482482, 0.0676233023, -0.0924676657, 0.0669310987, 0.1319430172, 0.6712409854, -0.1444396377, -0.1336938143, 0.0441394821, -0.1740806401, -0.2378407568, 0.0318626575, -0.2122766674, -0.3817217946, -0.5945904255, 0.0930715799, -0.2704686224, 0.0329008289, 0.2246017754, 0.066137746, 0.0567725934, -0.0167897195, -0.0726982206, 0.0699927807, 0.3150299191, -0.3102376759, 0.0056238803, 0.0674701408, 0.1505780965, -0.2651731968, 0.2959448099, -0.0667070374, -0.1344788671, -0.0533542596, -0.2241714448, -0.6046836376, 0.0633568242, -0.2882436812, 0.2968220115, 0.2508453429, 0.0494314767, 0.1574564725, 0.4011854827, 0.4436886013, 0.2695260942, -0.2344843149, 0.1727594435, 0.3623523414, -0.0145821925, -0.0064135762, 0.211714685, 0.4534878433, -0.1813888401, -0.2389177233, 0.0377393663, -0.0976290479, -0.4282444119, 0.1780986935, -0.2890241146, 0.1226880252, -0.4741538465, -0.0448159538, -0.1610464305, 0.0495673679, -0.1170773804, 0.1266120076, 0.3015564084, -0.025820829, 0.3938731849, 0.2872490287, -0.4737052023, 0.0818113983, 0.4354538023, -0.2639755905, -0.0656897873, 0.7143594027, -0.0224219766, -0.1156796366, -0.0845555663, 0.3356197476, 0.1899362206, -0.461309135, 0.1759459078, -0.1370142549, 0.16763933, -0.0239783265, 0.5160508752, 0.4567056596, 0.3805169165, 0.329077512, -0.5187922716, -0.1200369298, 0.0344010256, -0.1044826582, 0.3924303949, -0.1633546054, 0.069032751, 0.037948437, 0.0105708325, -0.2830747664, 0.1500228941, -0.3312318623, 0.0517839156, 0.1376153529, 0.0577626973, 0.0915412679, -0.0988199115, 0.1534479856, -0.1528943181, -0.3658683598, -0.2194008082, -0.0937627554, 0.1155197173, 0.0607095957, -0.3785832524, 0.1993468851, -0.3264402449, -0.1617551148, -0.1271058619, 0.0065266793, 0.0330898277, -0.0361988693, 0.0274357926, 0.2251443863, -0.0241947602, 0.0211056601, 0.0567586944, -0.3625778258, 0.0497006029, 0.0169093348, 0.1100958139, 0.0522978455, -0.1036030129, 0.0623392351, 0.0843106732, -0.024184633, 0.1517636478, 0.3195521832, -0.2027383596, 0.0648035184, 0.4826678336, 0.3069389462, 0.02040595, -0.2247436494, -0.1236109287, 0.1812739372, 0.1958635002, -0.3893769681, -0.0456151515, 0.0189759191, 0.2228654325, -0.0063583371, -0.1106347814, 0.2290060073, -0.2677124739, -0.0688796788, 0.0097187888, 0.2057591379, 0.2482972741, 0.2930919528, 0.5799325109, -0.1759134531, -0.1093826517, -0.0568372644, -0.1746615618, 0.0977744535, 0.0135682449, -0.1358995736, 0.4929815829, -0.3232512772, 0.2292831093, -0.2266657352, -0.708422184, 0.3919852078, -0.1421011686, 0.0754046738, 0.0047915108, 0.212447986, 0.24480398, -0.0497316942, 0.1501273513, -0.3210781813, 0.4191268682, 0.0932896361, -0.0296807438, -0.2051963806, -0.2670287788, 0.109669894, 0.0063233282, -0.1057886928, 0.1221757457, -0.0712559372, 0.16273202, -0.302937299, -0.1216506958, 0.0532988757, -0.1697727144, -0.0355588272, -0.2146686316, 0.2357461452, 0.2564387321, -0.1772018373, 0.3424800634, 0.7380923629, 0.3715671599, 0.4830287099, 0.1371566504, -0.1722052097, 0.1276462376, 0.127407223, -0.0393285342, 0.2327708602, 0.0634963438, -0.0034287118, 0.3761830926, 0.1473831534, -0.034196306, -0.3039712012, -0.2243896723, -0.2451120466, 0.0394474082, 0.2884536386, 0.0391371548, 0.0263522211, -0.2462792993, 0.1971479654, -0.0284640957, -0.0342448018, 0.2045909464, -0.0086462181, 0.1436298788, -0.0167891588, 0.0952034071, -0.1158063114, 0.4963772893, 0.3752226233, -0.1486889571, -0.1958690435, -0.370514065, -0.5975678563, 0.2106407136, 0.1432379782, -0.1041445807, 0.1782564223, -0.0372596569, 0.0617658161, -0.1067646369, 0.4922024608, 0.0131058693, -0.1966294199, 0.0617455803, -0.2441646457, -0.2179753184, -0.2281747013, -0.2018174976, -0.0431280695, -0.3614444733, 0.1915893555, 0.0650834516, 0.157985568, -0.1930200309, 0.0880775005, 0.0480719097, 0.0848010108, 0.1467908174, -0.0055304035, 0.4740927815, 0.053589996, -0.0633306503, -0.0972625613, -0.1911646277, -0.1607999951, 0.5104889274, -0.0338875502, 0.2085701376, -0.0188264847, -0.0699279755, -0.2319627553, 0.3770515621, -0.1640320122, -0.1332943588, -0.4568926096, -0.2069933265, -0.0227439664, -0.2393720448, 0.3742826581, -0.1085785925, -0.2206010967, 0.3657268286, 0.0113381948, -0.3828712106, 0.4573957622, 0.063447319, 0.0366951935, -0.147557959, 0.056918446, -0.1345570385, -0.0479522347, -0.5954987407, 0.2696995735, 0.4791093469, 0.0051989048, -0.0346903503, 0.2399042994, -0.1095317677, 0.2111076713, 0.0491967574, 0.1587299258, -0.0308018085, -0.2375634313, -0.2700147331, -0.0389960259 ]
https://github.com/huggingface/datasets/issues/726
"Checksums didn't match for dataset source files" error while loading openwebtext dataset
NonMatchingChecksumError: Checksums didn't match for dataset source files: i got this issue when i try to work on my own datasets kindly tell me, from where i can get checksums of train and dev file in my github repo
Hi, I have encountered this problem during loading the openwebtext dataset: ``` >>> dataset = load_dataset('openwebtext') Downloading and preparing dataset openwebtext/plain_text (download: 12.00 GiB, generated: 37.04 GiB, post-processed: Unknown size, total: 49.03 GiB) to /home/admin/.cache/huggingface/datasets/openwebtext/plain_text/1.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/load.py", line 611, in load_dataset ignore_verifications=ignore_verifications, File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 476, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 536, in _download_and_prepare self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/utils/info_utils.py", line 39, in verify_checksums raise NonMatchingChecksumError(error_msg + str(bad_urls)) datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://zenodo.org/record/3834942/files/openwebtext.tar.xz'] ``` I think this problem is caused because the released dataset has changed. Or I should download the dataset manually? Sorry for release the unfinised issue by mistake.
39
"Checksums didn't match for dataset source files" error while loading openwebtext dataset Hi, I have encountered this problem during loading the openwebtext dataset: ``` >>> dataset = load_dataset('openwebtext') Downloading and preparing dataset openwebtext/plain_text (download: 12.00 GiB, generated: 37.04 GiB, post-processed: Unknown size, total: 49.03 GiB) to /home/admin/.cache/huggingface/datasets/openwebtext/plain_text/1.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/load.py", line 611, in load_dataset ignore_verifications=ignore_verifications, File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 476, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 536, in _download_and_prepare self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/utils/info_utils.py", line 39, in verify_checksums raise NonMatchingChecksumError(error_msg + str(bad_urls)) datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://zenodo.org/record/3834942/files/openwebtext.tar.xz'] ``` I think this problem is caused because the released dataset has changed. Or I should download the dataset manually? Sorry for release the unfinised issue by mistake. NonMatchingChecksumError: Checksums didn't match for dataset source files: i got this issue when i try to work on my own datasets kindly tell me, from where i can get checksums of train and dev file in my github repo
[ -0.4920597374, 0.0389879905, -0.0594883524, 0.3662637472, 0.2443766296, -0.0337876752, 0.1365439445, 0.550493896, -0.0006113529, -0.0602815896, -0.0666541159, -0.0310110059, 0.023809107, 0.3648073375, -0.2299018502, 0.2352986932, -0.1055582315, 0.0833996087, -0.3995416462, -0.0401988924, -0.2967324555, 0.1188191399, -0.1012960896, -0.1545279026, 0.0459315032, 0.0663645864, 0.2705117166, 0.1403156072, -0.2775344253, -0.2145340145, 0.1424367726, -0.1216852143, -0.1503289193, 0.3247880042, -0.0001102053, 0.2582598329, 0.3656149209, -0.2235869169, -0.2715172768, -0.1560240835, -0.4222050607, -0.1340992898, -0.1875573844, -0.1528116465, 0.0739324018, -0.2589226067, -0.1242830679, -0.4580082893, 0.0629989579, 0.2549594343, 0.2594358325, 0.5298961997, 0.4289398491, 0.1028632075, 0.2806051672, -0.0724725723, 0.0572917275, 0.1174186543, 0.1282487512, 0.1596286446, 0.0161916558, -0.0816257, -0.1522661597, 0.1627646089, 0.162322104, -0.3617705703, 0.0090029351, -0.1375185847, 0.1970815659, 0.3654462099, 0.7156858444, -0.1815348864, -0.3790056109, -0.0936340466, -0.1986480504, 0.0984760076, 0.3893741071, 0.3778525889, -0.0309309009, 0.0653218776, -0.5064874887, 0.1339265704, 0.1091974452, 0.0512660071, 0.0404527895, 0.0759121031, 0.0293369144, 0.0086893588, -0.1022983417, -0.1159980446, 0.3256937265, -0.2656747103, -0.3963983059, 0.1373596638, -0.3631494641, 0.050811138, -0.1439982504, 0.0500062667, 0.3663637638, 0.6212907434, 0.2462337315, 0.0420107357, -0.3080770671, 0.0778109953, 0.0899418741, 0.3613914847, -0.0054691168, 0.134678483, 0.1948352456, 0.1007193476, 0.0852299035, 0.0521176234, 0.0023272163, -0.5429376364, 0.144805029, 0.0951067284, 0.3429884315, -0.3038513958, -0.4549225867, 0.0472175665, 0.1378376335, -0.1998879015, 0.1437950879, -0.0076496196, -0.0868445709, 0.0802836567, 0.3436448574, 0.0880121067, -0.1021175459, -0.2038996965, -0.2310940921, -0.2034747303, -0.0948628634, -0.0629801974, 0.1900291443, -0.2003929317, 0.6136524081, -0.091705516, 0.0911764652, -0.1107357591, 0.0129412981, 0.0464535207, 0.0409470089, 0.3219111264, -0.1849274188, 0.0135513376, 0.1199885085, 0.1528469473, -0.0941033438, 0.2584346235, -0.2343890071, -0.3227926493, -0.1861533374, 0.2190783173, -0.3183859289, 0.0472871475, -0.1684521735, -0.3878967464, 0.3156641424, -0.2622768879, -0.0602095015, -0.2444444001, -0.1759609729, -0.1386691183, 0.3337226212, 0.2220811248, -0.1910728216, 0.1260491163, 0.1682972759, -0.1456350386, 0.0463750362, 0.2319476157, -0.1313236356, 0.0905490518, -0.2481277585, -0.0242460556, 0.0881312117, -0.5387328863, -0.4547850788, -0.0014980673, 0.2015115619, 0.0489919744, 0.1314415783, -0.1612882167, -0.072465606, -0.2714245617, -0.2563692629, 0.2582873702, -0.0346316025, 0.3893139064, -0.2438359559, -0.2965556085, 0.0666806921, 0.118002288, -0.0492596366, -0.0816777498, 0.1693634242, -0.0095627597, 0.2051237077, 0.0532164313, 0.0325854793, 0.1085416228, 0.1249748245, -0.1738586724, -0.0426242054, -0.0249789599, -0.1966192126, 0.2551013529, -0.0707981586, 0.1320104152, 0.0627515689, 0.1782782376, -0.4489193857, -0.1798516512, -0.2049348801, 0.0868077725, 0.1547745168, 0.1201990843, -0.1345558614, 0.0315445811, 0.0974422544, 0.1682492346, -0.1691212207, 0.0556032583, -0.2289180011, 0.2009187192, -0.0244284403, -0.1356209666, 0.4263866842, 0.0483331345, -0.0907465518, 0.0649094507, -0.4173125327, 0.4893443882, -0.0621393397, 0.0347023904, 0.0946340039, 0.4519069493, 0.0079326378, -0.3528209329, 0.0029319131, 0.029774271, 0.1392333806, -0.1301708817, 0.2713801861, -0.089352183, 0.0362148546, -0.103549026, -0.1582127661, -0.1385204941, 0.0254933704, -0.0858456194, -0.0036495172, -0.154721722, 0.0363347381, 0.2815307677, 0.2090258002, 0.1824415624, 0.3501012623, -0.2496141791, 0.3917298317, 0.0523991175, 0.0041366373, 0.1314525902, -0.0301865153, -0.0547486134, -0.1231309921, 0.2424139678, 0.4796058536, 0.0881364793, 0.0710716397, 0.102791369, 0.0828065872, -0.066603668, 0.2418121994, 0.1984368563, 0.3564120233, 0.4244211018, -0.1783009619, -0.1144582704, -0.2286890745, 0.1582079381, 0.1266210675, 0.2964774072, -0.5625894666, -0.2332415432, -0.3110374212, 0.1262902915, -0.0553843379, 0.03164519, -0.3143777251, -0.1802434176, -0.1689629257, 0.1081858203, -0.0475394204, 0.1951697767, -0.1458839178, 0.0477329046, 0.3103328049, 0.0443978347, 0.1516741812, -0.0028462638, -0.1123990566, 0.086535424, 0.674687922, -0.1140084192, 0.3397882283, -0.4775011837, 0.1271567196, -0.3800790906, 0.0426588766, -0.0863099173, -0.0893172249, 0.2315176725, 0.2202650905, 0.2755806446, 0.0788404569, -0.2032469809, 0.0359022021, 0.0523620285, -0.4162954688, 0.0309531, -0.063654162, -0.1320038736, 0.10256432, -0.0423323885, 0.0432344191, -0.3893761933, -0.0724424347, -0.0345689468, 0.1005240753, 0.0962933302, 0.0817187726, -0.050854113, 0.0996044725, 0.2866062224, -0.1770674437, -0.8880895376, 0.3540101647, -0.1670293212, -0.3587042093, -0.0214138348, 0.1422795057, 0.2374750078, 0.0288893636, -0.4529917538, -0.1852106303, -0.2191691548, -0.0274335556, 0.0638385266, 0.1969695538, 0.1162546203, 0.0691954866, -0.0823741406, -0.3447431028, -0.2273835689, 0.1099676117, -0.2630305886, 0.5279318094, -0.0101229269, 0.0629740581, 0.0090144938, 0.1534842998, 0.4110189378, -0.1777413785, 0.4243548512, 0.2426644415, 0.3268180788, -0.2149715722, -0.1142092347, 0.0165321697, -0.1049814299, 0.3337228, 0.2043136507, 0.0627745613, 0.2587613463, -0.1610166281, -0.0275122374, -0.5019217134, -0.311925441, -0.1261366159, -0.4771395624, 0.1579100788, 0.0015202741, -0.0457787924, -0.1766193211, -0.2818225622, 0.1243384033, 0.0594625138, -0.0118076978, 0.0062618302, -0.1055892184, 0.1124698371, -0.0435051918, 0.3818669617, 0.1593197584, 0.4464142919, 0.0325869657, -0.0394473262, -0.1186380908, 0.2015808672, 0.1771976054, -0.1391034573, 0.3249416947, 0.0442028008, 0.1309690624, -0.198840037, -0.2067615837, 0.2606892288, -0.0236105472, 0.381657958, -0.1196591556, -0.4288542867, 0.0298065692, 0.228195861, 0.4090625942, -0.1562368423, -0.1394208819, -0.2068854272, -0.3080565631, -0.3402202725, -0.369473666, 0.1338024288, 0.2898081839, -0.1530364305, -0.0328775905, -0.1857860684, -0.266718179, 0.3404830396, -0.180463478, 0.4067646563, 0.0107003842, 0.3208975792, 0.0213312432, 0.2319337726, 0.4421768188, 0.7271000743, -0.1791524887, -0.2185595036, -0.0536127612, -0.1541268229, -0.208710447, 0.0071374206, 0.0306304768, -0.2557500601, 0.0924118012, -0.0574298985, 0.0443659723, 0.0608739853, 0.1258152127, 0.0699755028, -0.4000608623, -0.2998198569, 0.2181072235, -0.1561891139, 0.0378430672, 0.506482482, 0.0676233023, -0.0924676657, 0.0669310987, 0.1319430172, 0.6712409854, -0.1444396377, -0.1336938143, 0.0441394821, -0.1740806401, -0.2378407568, 0.0318626575, -0.2122766674, -0.3817217946, -0.5945904255, 0.0930715799, -0.2704686224, 0.0329008289, 0.2246017754, 0.066137746, 0.0567725934, -0.0167897195, -0.0726982206, 0.0699927807, 0.3150299191, -0.3102376759, 0.0056238803, 0.0674701408, 0.1505780965, -0.2651731968, 0.2959448099, -0.0667070374, -0.1344788671, -0.0533542596, -0.2241714448, -0.6046836376, 0.0633568242, -0.2882436812, 0.2968220115, 0.2508453429, 0.0494314767, 0.1574564725, 0.4011854827, 0.4436886013, 0.2695260942, -0.2344843149, 0.1727594435, 0.3623523414, -0.0145821925, -0.0064135762, 0.211714685, 0.4534878433, -0.1813888401, -0.2389177233, 0.0377393663, -0.0976290479, -0.4282444119, 0.1780986935, -0.2890241146, 0.1226880252, -0.4741538465, -0.0448159538, -0.1610464305, 0.0495673679, -0.1170773804, 0.1266120076, 0.3015564084, -0.025820829, 0.3938731849, 0.2872490287, -0.4737052023, 0.0818113983, 0.4354538023, -0.2639755905, -0.0656897873, 0.7143594027, -0.0224219766, -0.1156796366, -0.0845555663, 0.3356197476, 0.1899362206, -0.461309135, 0.1759459078, -0.1370142549, 0.16763933, -0.0239783265, 0.5160508752, 0.4567056596, 0.3805169165, 0.329077512, -0.5187922716, -0.1200369298, 0.0344010256, -0.1044826582, 0.3924303949, -0.1633546054, 0.069032751, 0.037948437, 0.0105708325, -0.2830747664, 0.1500228941, -0.3312318623, 0.0517839156, 0.1376153529, 0.0577626973, 0.0915412679, -0.0988199115, 0.1534479856, -0.1528943181, -0.3658683598, -0.2194008082, -0.0937627554, 0.1155197173, 0.0607095957, -0.3785832524, 0.1993468851, -0.3264402449, -0.1617551148, -0.1271058619, 0.0065266793, 0.0330898277, -0.0361988693, 0.0274357926, 0.2251443863, -0.0241947602, 0.0211056601, 0.0567586944, -0.3625778258, 0.0497006029, 0.0169093348, 0.1100958139, 0.0522978455, -0.1036030129, 0.0623392351, 0.0843106732, -0.024184633, 0.1517636478, 0.3195521832, -0.2027383596, 0.0648035184, 0.4826678336, 0.3069389462, 0.02040595, -0.2247436494, -0.1236109287, 0.1812739372, 0.1958635002, -0.3893769681, -0.0456151515, 0.0189759191, 0.2228654325, -0.0063583371, -0.1106347814, 0.2290060073, -0.2677124739, -0.0688796788, 0.0097187888, 0.2057591379, 0.2482972741, 0.2930919528, 0.5799325109, -0.1759134531, -0.1093826517, -0.0568372644, -0.1746615618, 0.0977744535, 0.0135682449, -0.1358995736, 0.4929815829, -0.3232512772, 0.2292831093, -0.2266657352, -0.708422184, 0.3919852078, -0.1421011686, 0.0754046738, 0.0047915108, 0.212447986, 0.24480398, -0.0497316942, 0.1501273513, -0.3210781813, 0.4191268682, 0.0932896361, -0.0296807438, -0.2051963806, -0.2670287788, 0.109669894, 0.0063233282, -0.1057886928, 0.1221757457, -0.0712559372, 0.16273202, -0.302937299, -0.1216506958, 0.0532988757, -0.1697727144, -0.0355588272, -0.2146686316, 0.2357461452, 0.2564387321, -0.1772018373, 0.3424800634, 0.7380923629, 0.3715671599, 0.4830287099, 0.1371566504, -0.1722052097, 0.1276462376, 0.127407223, -0.0393285342, 0.2327708602, 0.0634963438, -0.0034287118, 0.3761830926, 0.1473831534, -0.034196306, -0.3039712012, -0.2243896723, -0.2451120466, 0.0394474082, 0.2884536386, 0.0391371548, 0.0263522211, -0.2462792993, 0.1971479654, -0.0284640957, -0.0342448018, 0.2045909464, -0.0086462181, 0.1436298788, -0.0167891588, 0.0952034071, -0.1158063114, 0.4963772893, 0.3752226233, -0.1486889571, -0.1958690435, -0.370514065, -0.5975678563, 0.2106407136, 0.1432379782, -0.1041445807, 0.1782564223, -0.0372596569, 0.0617658161, -0.1067646369, 0.4922024608, 0.0131058693, -0.1966294199, 0.0617455803, -0.2441646457, -0.2179753184, -0.2281747013, -0.2018174976, -0.0431280695, -0.3614444733, 0.1915893555, 0.0650834516, 0.157985568, -0.1930200309, 0.0880775005, 0.0480719097, 0.0848010108, 0.1467908174, -0.0055304035, 0.4740927815, 0.053589996, -0.0633306503, -0.0972625613, -0.1911646277, -0.1607999951, 0.5104889274, -0.0338875502, 0.2085701376, -0.0188264847, -0.0699279755, -0.2319627553, 0.3770515621, -0.1640320122, -0.1332943588, -0.4568926096, -0.2069933265, -0.0227439664, -0.2393720448, 0.3742826581, -0.1085785925, -0.2206010967, 0.3657268286, 0.0113381948, -0.3828712106, 0.4573957622, 0.063447319, 0.0366951935, -0.147557959, 0.056918446, -0.1345570385, -0.0479522347, -0.5954987407, 0.2696995735, 0.4791093469, 0.0051989048, -0.0346903503, 0.2399042994, -0.1095317677, 0.2111076713, 0.0491967574, 0.1587299258, -0.0308018085, -0.2375634313, -0.2700147331, -0.0389960259 ]
https://github.com/huggingface/datasets/issues/726
"Checksums didn't match for dataset source files" error while loading openwebtext dataset
Hi, I got the similar issue for xnli dataset while working on colab with python3.7. `nlp.load_dataset(path = 'xnli')` The above command resulted in following issue : ``` NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://www.nyu.edu/projects/bowman/xnli/XNLI-1.0.zip'] ``` Any idea how to fix this ?
Hi, I have encountered this problem during loading the openwebtext dataset: ``` >>> dataset = load_dataset('openwebtext') Downloading and preparing dataset openwebtext/plain_text (download: 12.00 GiB, generated: 37.04 GiB, post-processed: Unknown size, total: 49.03 GiB) to /home/admin/.cache/huggingface/datasets/openwebtext/plain_text/1.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/load.py", line 611, in load_dataset ignore_verifications=ignore_verifications, File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 476, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 536, in _download_and_prepare self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/utils/info_utils.py", line 39, in verify_checksums raise NonMatchingChecksumError(error_msg + str(bad_urls)) datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://zenodo.org/record/3834942/files/openwebtext.tar.xz'] ``` I think this problem is caused because the released dataset has changed. Or I should download the dataset manually? Sorry for release the unfinised issue by mistake.
44
"Checksums didn't match for dataset source files" error while loading openwebtext dataset Hi, I have encountered this problem during loading the openwebtext dataset: ``` >>> dataset = load_dataset('openwebtext') Downloading and preparing dataset openwebtext/plain_text (download: 12.00 GiB, generated: 37.04 GiB, post-processed: Unknown size, total: 49.03 GiB) to /home/admin/.cache/huggingface/datasets/openwebtext/plain_text/1.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/load.py", line 611, in load_dataset ignore_verifications=ignore_verifications, File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 476, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 536, in _download_and_prepare self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/utils/info_utils.py", line 39, in verify_checksums raise NonMatchingChecksumError(error_msg + str(bad_urls)) datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://zenodo.org/record/3834942/files/openwebtext.tar.xz'] ``` I think this problem is caused because the released dataset has changed. Or I should download the dataset manually? Sorry for release the unfinised issue by mistake. Hi, I got the similar issue for xnli dataset while working on colab with python3.7. `nlp.load_dataset(path = 'xnli')` The above command resulted in following issue : ``` NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://www.nyu.edu/projects/bowman/xnli/XNLI-1.0.zip'] ``` Any idea how to fix this ?
[ -0.4920597374, 0.0389879905, -0.0594883524, 0.3662637472, 0.2443766296, -0.0337876752, 0.1365439445, 0.550493896, -0.0006113529, -0.0602815896, -0.0666541159, -0.0310110059, 0.023809107, 0.3648073375, -0.2299018502, 0.2352986932, -0.1055582315, 0.0833996087, -0.3995416462, -0.0401988924, -0.2967324555, 0.1188191399, -0.1012960896, -0.1545279026, 0.0459315032, 0.0663645864, 0.2705117166, 0.1403156072, -0.2775344253, -0.2145340145, 0.1424367726, -0.1216852143, -0.1503289193, 0.3247880042, -0.0001102053, 0.2582598329, 0.3656149209, -0.2235869169, -0.2715172768, -0.1560240835, -0.4222050607, -0.1340992898, -0.1875573844, -0.1528116465, 0.0739324018, -0.2589226067, -0.1242830679, -0.4580082893, 0.0629989579, 0.2549594343, 0.2594358325, 0.5298961997, 0.4289398491, 0.1028632075, 0.2806051672, -0.0724725723, 0.0572917275, 0.1174186543, 0.1282487512, 0.1596286446, 0.0161916558, -0.0816257, -0.1522661597, 0.1627646089, 0.162322104, -0.3617705703, 0.0090029351, -0.1375185847, 0.1970815659, 0.3654462099, 0.7156858444, -0.1815348864, -0.3790056109, -0.0936340466, -0.1986480504, 0.0984760076, 0.3893741071, 0.3778525889, -0.0309309009, 0.0653218776, -0.5064874887, 0.1339265704, 0.1091974452, 0.0512660071, 0.0404527895, 0.0759121031, 0.0293369144, 0.0086893588, -0.1022983417, -0.1159980446, 0.3256937265, -0.2656747103, -0.3963983059, 0.1373596638, -0.3631494641, 0.050811138, -0.1439982504, 0.0500062667, 0.3663637638, 0.6212907434, 0.2462337315, 0.0420107357, -0.3080770671, 0.0778109953, 0.0899418741, 0.3613914847, -0.0054691168, 0.134678483, 0.1948352456, 0.1007193476, 0.0852299035, 0.0521176234, 0.0023272163, -0.5429376364, 0.144805029, 0.0951067284, 0.3429884315, -0.3038513958, -0.4549225867, 0.0472175665, 0.1378376335, -0.1998879015, 0.1437950879, -0.0076496196, -0.0868445709, 0.0802836567, 0.3436448574, 0.0880121067, -0.1021175459, -0.2038996965, -0.2310940921, -0.2034747303, -0.0948628634, -0.0629801974, 0.1900291443, -0.2003929317, 0.6136524081, -0.091705516, 0.0911764652, -0.1107357591, 0.0129412981, 0.0464535207, 0.0409470089, 0.3219111264, -0.1849274188, 0.0135513376, 0.1199885085, 0.1528469473, -0.0941033438, 0.2584346235, -0.2343890071, -0.3227926493, -0.1861533374, 0.2190783173, -0.3183859289, 0.0472871475, -0.1684521735, -0.3878967464, 0.3156641424, -0.2622768879, -0.0602095015, -0.2444444001, -0.1759609729, -0.1386691183, 0.3337226212, 0.2220811248, -0.1910728216, 0.1260491163, 0.1682972759, -0.1456350386, 0.0463750362, 0.2319476157, -0.1313236356, 0.0905490518, -0.2481277585, -0.0242460556, 0.0881312117, -0.5387328863, -0.4547850788, -0.0014980673, 0.2015115619, 0.0489919744, 0.1314415783, -0.1612882167, -0.072465606, -0.2714245617, -0.2563692629, 0.2582873702, -0.0346316025, 0.3893139064, -0.2438359559, -0.2965556085, 0.0666806921, 0.118002288, -0.0492596366, -0.0816777498, 0.1693634242, -0.0095627597, 0.2051237077, 0.0532164313, 0.0325854793, 0.1085416228, 0.1249748245, -0.1738586724, -0.0426242054, -0.0249789599, -0.1966192126, 0.2551013529, -0.0707981586, 0.1320104152, 0.0627515689, 0.1782782376, -0.4489193857, -0.1798516512, -0.2049348801, 0.0868077725, 0.1547745168, 0.1201990843, -0.1345558614, 0.0315445811, 0.0974422544, 0.1682492346, -0.1691212207, 0.0556032583, -0.2289180011, 0.2009187192, -0.0244284403, -0.1356209666, 0.4263866842, 0.0483331345, -0.0907465518, 0.0649094507, -0.4173125327, 0.4893443882, -0.0621393397, 0.0347023904, 0.0946340039, 0.4519069493, 0.0079326378, -0.3528209329, 0.0029319131, 0.029774271, 0.1392333806, -0.1301708817, 0.2713801861, -0.089352183, 0.0362148546, -0.103549026, -0.1582127661, -0.1385204941, 0.0254933704, -0.0858456194, -0.0036495172, -0.154721722, 0.0363347381, 0.2815307677, 0.2090258002, 0.1824415624, 0.3501012623, -0.2496141791, 0.3917298317, 0.0523991175, 0.0041366373, 0.1314525902, -0.0301865153, -0.0547486134, -0.1231309921, 0.2424139678, 0.4796058536, 0.0881364793, 0.0710716397, 0.102791369, 0.0828065872, -0.066603668, 0.2418121994, 0.1984368563, 0.3564120233, 0.4244211018, -0.1783009619, -0.1144582704, -0.2286890745, 0.1582079381, 0.1266210675, 0.2964774072, -0.5625894666, -0.2332415432, -0.3110374212, 0.1262902915, -0.0553843379, 0.03164519, -0.3143777251, -0.1802434176, -0.1689629257, 0.1081858203, -0.0475394204, 0.1951697767, -0.1458839178, 0.0477329046, 0.3103328049, 0.0443978347, 0.1516741812, -0.0028462638, -0.1123990566, 0.086535424, 0.674687922, -0.1140084192, 0.3397882283, -0.4775011837, 0.1271567196, -0.3800790906, 0.0426588766, -0.0863099173, -0.0893172249, 0.2315176725, 0.2202650905, 0.2755806446, 0.0788404569, -0.2032469809, 0.0359022021, 0.0523620285, -0.4162954688, 0.0309531, -0.063654162, -0.1320038736, 0.10256432, -0.0423323885, 0.0432344191, -0.3893761933, -0.0724424347, -0.0345689468, 0.1005240753, 0.0962933302, 0.0817187726, -0.050854113, 0.0996044725, 0.2866062224, -0.1770674437, -0.8880895376, 0.3540101647, -0.1670293212, -0.3587042093, -0.0214138348, 0.1422795057, 0.2374750078, 0.0288893636, -0.4529917538, -0.1852106303, -0.2191691548, -0.0274335556, 0.0638385266, 0.1969695538, 0.1162546203, 0.0691954866, -0.0823741406, -0.3447431028, -0.2273835689, 0.1099676117, -0.2630305886, 0.5279318094, -0.0101229269, 0.0629740581, 0.0090144938, 0.1534842998, 0.4110189378, -0.1777413785, 0.4243548512, 0.2426644415, 0.3268180788, -0.2149715722, -0.1142092347, 0.0165321697, -0.1049814299, 0.3337228, 0.2043136507, 0.0627745613, 0.2587613463, -0.1610166281, -0.0275122374, -0.5019217134, -0.311925441, -0.1261366159, -0.4771395624, 0.1579100788, 0.0015202741, -0.0457787924, -0.1766193211, -0.2818225622, 0.1243384033, 0.0594625138, -0.0118076978, 0.0062618302, -0.1055892184, 0.1124698371, -0.0435051918, 0.3818669617, 0.1593197584, 0.4464142919, 0.0325869657, -0.0394473262, -0.1186380908, 0.2015808672, 0.1771976054, -0.1391034573, 0.3249416947, 0.0442028008, 0.1309690624, -0.198840037, -0.2067615837, 0.2606892288, -0.0236105472, 0.381657958, -0.1196591556, -0.4288542867, 0.0298065692, 0.228195861, 0.4090625942, -0.1562368423, -0.1394208819, -0.2068854272, -0.3080565631, -0.3402202725, -0.369473666, 0.1338024288, 0.2898081839, -0.1530364305, -0.0328775905, -0.1857860684, -0.266718179, 0.3404830396, -0.180463478, 0.4067646563, 0.0107003842, 0.3208975792, 0.0213312432, 0.2319337726, 0.4421768188, 0.7271000743, -0.1791524887, -0.2185595036, -0.0536127612, -0.1541268229, -0.208710447, 0.0071374206, 0.0306304768, -0.2557500601, 0.0924118012, -0.0574298985, 0.0443659723, 0.0608739853, 0.1258152127, 0.0699755028, -0.4000608623, -0.2998198569, 0.2181072235, -0.1561891139, 0.0378430672, 0.506482482, 0.0676233023, -0.0924676657, 0.0669310987, 0.1319430172, 0.6712409854, -0.1444396377, -0.1336938143, 0.0441394821, -0.1740806401, -0.2378407568, 0.0318626575, -0.2122766674, -0.3817217946, -0.5945904255, 0.0930715799, -0.2704686224, 0.0329008289, 0.2246017754, 0.066137746, 0.0567725934, -0.0167897195, -0.0726982206, 0.0699927807, 0.3150299191, -0.3102376759, 0.0056238803, 0.0674701408, 0.1505780965, -0.2651731968, 0.2959448099, -0.0667070374, -0.1344788671, -0.0533542596, -0.2241714448, -0.6046836376, 0.0633568242, -0.2882436812, 0.2968220115, 0.2508453429, 0.0494314767, 0.1574564725, 0.4011854827, 0.4436886013, 0.2695260942, -0.2344843149, 0.1727594435, 0.3623523414, -0.0145821925, -0.0064135762, 0.211714685, 0.4534878433, -0.1813888401, -0.2389177233, 0.0377393663, -0.0976290479, -0.4282444119, 0.1780986935, -0.2890241146, 0.1226880252, -0.4741538465, -0.0448159538, -0.1610464305, 0.0495673679, -0.1170773804, 0.1266120076, 0.3015564084, -0.025820829, 0.3938731849, 0.2872490287, -0.4737052023, 0.0818113983, 0.4354538023, -0.2639755905, -0.0656897873, 0.7143594027, -0.0224219766, -0.1156796366, -0.0845555663, 0.3356197476, 0.1899362206, -0.461309135, 0.1759459078, -0.1370142549, 0.16763933, -0.0239783265, 0.5160508752, 0.4567056596, 0.3805169165, 0.329077512, -0.5187922716, -0.1200369298, 0.0344010256, -0.1044826582, 0.3924303949, -0.1633546054, 0.069032751, 0.037948437, 0.0105708325, -0.2830747664, 0.1500228941, -0.3312318623, 0.0517839156, 0.1376153529, 0.0577626973, 0.0915412679, -0.0988199115, 0.1534479856, -0.1528943181, -0.3658683598, -0.2194008082, -0.0937627554, 0.1155197173, 0.0607095957, -0.3785832524, 0.1993468851, -0.3264402449, -0.1617551148, -0.1271058619, 0.0065266793, 0.0330898277, -0.0361988693, 0.0274357926, 0.2251443863, -0.0241947602, 0.0211056601, 0.0567586944, -0.3625778258, 0.0497006029, 0.0169093348, 0.1100958139, 0.0522978455, -0.1036030129, 0.0623392351, 0.0843106732, -0.024184633, 0.1517636478, 0.3195521832, -0.2027383596, 0.0648035184, 0.4826678336, 0.3069389462, 0.02040595, -0.2247436494, -0.1236109287, 0.1812739372, 0.1958635002, -0.3893769681, -0.0456151515, 0.0189759191, 0.2228654325, -0.0063583371, -0.1106347814, 0.2290060073, -0.2677124739, -0.0688796788, 0.0097187888, 0.2057591379, 0.2482972741, 0.2930919528, 0.5799325109, -0.1759134531, -0.1093826517, -0.0568372644, -0.1746615618, 0.0977744535, 0.0135682449, -0.1358995736, 0.4929815829, -0.3232512772, 0.2292831093, -0.2266657352, -0.708422184, 0.3919852078, -0.1421011686, 0.0754046738, 0.0047915108, 0.212447986, 0.24480398, -0.0497316942, 0.1501273513, -0.3210781813, 0.4191268682, 0.0932896361, -0.0296807438, -0.2051963806, -0.2670287788, 0.109669894, 0.0063233282, -0.1057886928, 0.1221757457, -0.0712559372, 0.16273202, -0.302937299, -0.1216506958, 0.0532988757, -0.1697727144, -0.0355588272, -0.2146686316, 0.2357461452, 0.2564387321, -0.1772018373, 0.3424800634, 0.7380923629, 0.3715671599, 0.4830287099, 0.1371566504, -0.1722052097, 0.1276462376, 0.127407223, -0.0393285342, 0.2327708602, 0.0634963438, -0.0034287118, 0.3761830926, 0.1473831534, -0.034196306, -0.3039712012, -0.2243896723, -0.2451120466, 0.0394474082, 0.2884536386, 0.0391371548, 0.0263522211, -0.2462792993, 0.1971479654, -0.0284640957, -0.0342448018, 0.2045909464, -0.0086462181, 0.1436298788, -0.0167891588, 0.0952034071, -0.1158063114, 0.4963772893, 0.3752226233, -0.1486889571, -0.1958690435, -0.370514065, -0.5975678563, 0.2106407136, 0.1432379782, -0.1041445807, 0.1782564223, -0.0372596569, 0.0617658161, -0.1067646369, 0.4922024608, 0.0131058693, -0.1966294199, 0.0617455803, -0.2441646457, -0.2179753184, -0.2281747013, -0.2018174976, -0.0431280695, -0.3614444733, 0.1915893555, 0.0650834516, 0.157985568, -0.1930200309, 0.0880775005, 0.0480719097, 0.0848010108, 0.1467908174, -0.0055304035, 0.4740927815, 0.053589996, -0.0633306503, -0.0972625613, -0.1911646277, -0.1607999951, 0.5104889274, -0.0338875502, 0.2085701376, -0.0188264847, -0.0699279755, -0.2319627553, 0.3770515621, -0.1640320122, -0.1332943588, -0.4568926096, -0.2069933265, -0.0227439664, -0.2393720448, 0.3742826581, -0.1085785925, -0.2206010967, 0.3657268286, 0.0113381948, -0.3828712106, 0.4573957622, 0.063447319, 0.0366951935, -0.147557959, 0.056918446, -0.1345570385, -0.0479522347, -0.5954987407, 0.2696995735, 0.4791093469, 0.0051989048, -0.0346903503, 0.2399042994, -0.1095317677, 0.2111076713, 0.0491967574, 0.1587299258, -0.0308018085, -0.2375634313, -0.2700147331, -0.0389960259 ]
https://github.com/huggingface/datasets/issues/726
"Checksums didn't match for dataset source files" error while loading openwebtext dataset
Says fixed but I'm still getting it. command: dataset = load_dataset("ted_talks_iwslt", language_pair=("en", "es"), year="2014",download_mode="force_redownload") got: Using custom data configuration en_es_2014-35a2d3350a0f9823 Downloading and preparing dataset ted_talks_iwslt/en_es_2014 (download: 2.15 KiB, generated: Unknown size, post-processed: Unknown size, total: 2.15 KiB) to /home/ken/.cache/huggingface/datasets/ted_talks_iwslt/en_es_2014-35a2d3350a0f9823/1.1.0/43935b3fe470c753a023642e1f54b068c590847f9928bd3f2ec99f15702ad6a6... Downloading: 2.21k/? [00:00<00:00, 141kB/s] NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://drive.google.com/u/0/uc?id=1Cz1Un9p8Xn9IpEMMrg2kXSDt0dnjxc4z&export=download']
Hi, I have encountered this problem during loading the openwebtext dataset: ``` >>> dataset = load_dataset('openwebtext') Downloading and preparing dataset openwebtext/plain_text (download: 12.00 GiB, generated: 37.04 GiB, post-processed: Unknown size, total: 49.03 GiB) to /home/admin/.cache/huggingface/datasets/openwebtext/plain_text/1.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/load.py", line 611, in load_dataset ignore_verifications=ignore_verifications, File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 476, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 536, in _download_and_prepare self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/utils/info_utils.py", line 39, in verify_checksums raise NonMatchingChecksumError(error_msg + str(bad_urls)) datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://zenodo.org/record/3834942/files/openwebtext.tar.xz'] ``` I think this problem is caused because the released dataset has changed. Or I should download the dataset manually? Sorry for release the unfinised issue by mistake.
52
"Checksums didn't match for dataset source files" error while loading openwebtext dataset Hi, I have encountered this problem during loading the openwebtext dataset: ``` >>> dataset = load_dataset('openwebtext') Downloading and preparing dataset openwebtext/plain_text (download: 12.00 GiB, generated: 37.04 GiB, post-processed: Unknown size, total: 49.03 GiB) to /home/admin/.cache/huggingface/datasets/openwebtext/plain_text/1.0.0/5c636399c7155da97c982d0d70ecdce30fbca66a4eb4fc768ad91f8331edac02... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/load.py", line 611, in load_dataset ignore_verifications=ignore_verifications, File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 476, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 536, in _download_and_prepare self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" File "/home/admin/workspace/anaconda3/envs/torch1.6-py3.7/lib/python3.7/site-packages/datasets/utils/info_utils.py", line 39, in verify_checksums raise NonMatchingChecksumError(error_msg + str(bad_urls)) datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://zenodo.org/record/3834942/files/openwebtext.tar.xz'] ``` I think this problem is caused because the released dataset has changed. Or I should download the dataset manually? Sorry for release the unfinised issue by mistake. Says fixed but I'm still getting it. command: dataset = load_dataset("ted_talks_iwslt", language_pair=("en", "es"), year="2014",download_mode="force_redownload") got: Using custom data configuration en_es_2014-35a2d3350a0f9823 Downloading and preparing dataset ted_talks_iwslt/en_es_2014 (download: 2.15 KiB, generated: Unknown size, post-processed: Unknown size, total: 2.15 KiB) to /home/ken/.cache/huggingface/datasets/ted_talks_iwslt/en_es_2014-35a2d3350a0f9823/1.1.0/43935b3fe470c753a023642e1f54b068c590847f9928bd3f2ec99f15702ad6a6... Downloading: 2.21k/? [00:00<00:00, 141kB/s] NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://drive.google.com/u/0/uc?id=1Cz1Un9p8Xn9IpEMMrg2kXSDt0dnjxc4z&export=download']
[ -0.4920597374, 0.0389879905, -0.0594883524, 0.3662637472, 0.2443766296, -0.0337876752, 0.1365439445, 0.550493896, -0.0006113529, -0.0602815896, -0.0666541159, -0.0310110059, 0.023809107, 0.3648073375, -0.2299018502, 0.2352986932, -0.1055582315, 0.0833996087, -0.3995416462, -0.0401988924, -0.2967324555, 0.1188191399, -0.1012960896, -0.1545279026, 0.0459315032, 0.0663645864, 0.2705117166, 0.1403156072, -0.2775344253, -0.2145340145, 0.1424367726, -0.1216852143, -0.1503289193, 0.3247880042, -0.0001102053, 0.2582598329, 0.3656149209, -0.2235869169, -0.2715172768, -0.1560240835, -0.4222050607, -0.1340992898, -0.1875573844, -0.1528116465, 0.0739324018, -0.2589226067, -0.1242830679, -0.4580082893, 0.0629989579, 0.2549594343, 0.2594358325, 0.5298961997, 0.4289398491, 0.1028632075, 0.2806051672, -0.0724725723, 0.0572917275, 0.1174186543, 0.1282487512, 0.1596286446, 0.0161916558, -0.0816257, -0.1522661597, 0.1627646089, 0.162322104, -0.3617705703, 0.0090029351, -0.1375185847, 0.1970815659, 0.3654462099, 0.7156858444, -0.1815348864, -0.3790056109, -0.0936340466, -0.1986480504, 0.0984760076, 0.3893741071, 0.3778525889, -0.0309309009, 0.0653218776, -0.5064874887, 0.1339265704, 0.1091974452, 0.0512660071, 0.0404527895, 0.0759121031, 0.0293369144, 0.0086893588, -0.1022983417, -0.1159980446, 0.3256937265, -0.2656747103, -0.3963983059, 0.1373596638, -0.3631494641, 0.050811138, -0.1439982504, 0.0500062667, 0.3663637638, 0.6212907434, 0.2462337315, 0.0420107357, -0.3080770671, 0.0778109953, 0.0899418741, 0.3613914847, -0.0054691168, 0.134678483, 0.1948352456, 0.1007193476, 0.0852299035, 0.0521176234, 0.0023272163, -0.5429376364, 0.144805029, 0.0951067284, 0.3429884315, -0.3038513958, -0.4549225867, 0.0472175665, 0.1378376335, -0.1998879015, 0.1437950879, -0.0076496196, -0.0868445709, 0.0802836567, 0.3436448574, 0.0880121067, -0.1021175459, -0.2038996965, -0.2310940921, -0.2034747303, -0.0948628634, -0.0629801974, 0.1900291443, -0.2003929317, 0.6136524081, -0.091705516, 0.0911764652, -0.1107357591, 0.0129412981, 0.0464535207, 0.0409470089, 0.3219111264, -0.1849274188, 0.0135513376, 0.1199885085, 0.1528469473, -0.0941033438, 0.2584346235, -0.2343890071, -0.3227926493, -0.1861533374, 0.2190783173, -0.3183859289, 0.0472871475, -0.1684521735, -0.3878967464, 0.3156641424, -0.2622768879, -0.0602095015, -0.2444444001, -0.1759609729, -0.1386691183, 0.3337226212, 0.2220811248, -0.1910728216, 0.1260491163, 0.1682972759, -0.1456350386, 0.0463750362, 0.2319476157, -0.1313236356, 0.0905490518, -0.2481277585, -0.0242460556, 0.0881312117, -0.5387328863, -0.4547850788, -0.0014980673, 0.2015115619, 0.0489919744, 0.1314415783, -0.1612882167, -0.072465606, -0.2714245617, -0.2563692629, 0.2582873702, -0.0346316025, 0.3893139064, -0.2438359559, -0.2965556085, 0.0666806921, 0.118002288, -0.0492596366, -0.0816777498, 0.1693634242, -0.0095627597, 0.2051237077, 0.0532164313, 0.0325854793, 0.1085416228, 0.1249748245, -0.1738586724, -0.0426242054, -0.0249789599, -0.1966192126, 0.2551013529, -0.0707981586, 0.1320104152, 0.0627515689, 0.1782782376, -0.4489193857, -0.1798516512, -0.2049348801, 0.0868077725, 0.1547745168, 0.1201990843, -0.1345558614, 0.0315445811, 0.0974422544, 0.1682492346, -0.1691212207, 0.0556032583, -0.2289180011, 0.2009187192, -0.0244284403, -0.1356209666, 0.4263866842, 0.0483331345, -0.0907465518, 0.0649094507, -0.4173125327, 0.4893443882, -0.0621393397, 0.0347023904, 0.0946340039, 0.4519069493, 0.0079326378, -0.3528209329, 0.0029319131, 0.029774271, 0.1392333806, -0.1301708817, 0.2713801861, -0.089352183, 0.0362148546, -0.103549026, -0.1582127661, -0.1385204941, 0.0254933704, -0.0858456194, -0.0036495172, -0.154721722, 0.0363347381, 0.2815307677, 0.2090258002, 0.1824415624, 0.3501012623, -0.2496141791, 0.3917298317, 0.0523991175, 0.0041366373, 0.1314525902, -0.0301865153, -0.0547486134, -0.1231309921, 0.2424139678, 0.4796058536, 0.0881364793, 0.0710716397, 0.102791369, 0.0828065872, -0.066603668, 0.2418121994, 0.1984368563, 0.3564120233, 0.4244211018, -0.1783009619, -0.1144582704, -0.2286890745, 0.1582079381, 0.1266210675, 0.2964774072, -0.5625894666, -0.2332415432, -0.3110374212, 0.1262902915, -0.0553843379, 0.03164519, -0.3143777251, -0.1802434176, -0.1689629257, 0.1081858203, -0.0475394204, 0.1951697767, -0.1458839178, 0.0477329046, 0.3103328049, 0.0443978347, 0.1516741812, -0.0028462638, -0.1123990566, 0.086535424, 0.674687922, -0.1140084192, 0.3397882283, -0.4775011837, 0.1271567196, -0.3800790906, 0.0426588766, -0.0863099173, -0.0893172249, 0.2315176725, 0.2202650905, 0.2755806446, 0.0788404569, -0.2032469809, 0.0359022021, 0.0523620285, -0.4162954688, 0.0309531, -0.063654162, -0.1320038736, 0.10256432, -0.0423323885, 0.0432344191, -0.3893761933, -0.0724424347, -0.0345689468, 0.1005240753, 0.0962933302, 0.0817187726, -0.050854113, 0.0996044725, 0.2866062224, -0.1770674437, -0.8880895376, 0.3540101647, -0.1670293212, -0.3587042093, -0.0214138348, 0.1422795057, 0.2374750078, 0.0288893636, -0.4529917538, -0.1852106303, -0.2191691548, -0.0274335556, 0.0638385266, 0.1969695538, 0.1162546203, 0.0691954866, -0.0823741406, -0.3447431028, -0.2273835689, 0.1099676117, -0.2630305886, 0.5279318094, -0.0101229269, 0.0629740581, 0.0090144938, 0.1534842998, 0.4110189378, -0.1777413785, 0.4243548512, 0.2426644415, 0.3268180788, -0.2149715722, -0.1142092347, 0.0165321697, -0.1049814299, 0.3337228, 0.2043136507, 0.0627745613, 0.2587613463, -0.1610166281, -0.0275122374, -0.5019217134, -0.311925441, -0.1261366159, -0.4771395624, 0.1579100788, 0.0015202741, -0.0457787924, -0.1766193211, -0.2818225622, 0.1243384033, 0.0594625138, -0.0118076978, 0.0062618302, -0.1055892184, 0.1124698371, -0.0435051918, 0.3818669617, 0.1593197584, 0.4464142919, 0.0325869657, -0.0394473262, -0.1186380908, 0.2015808672, 0.1771976054, -0.1391034573, 0.3249416947, 0.0442028008, 0.1309690624, -0.198840037, -0.2067615837, 0.2606892288, -0.0236105472, 0.381657958, -0.1196591556, -0.4288542867, 0.0298065692, 0.228195861, 0.4090625942, -0.1562368423, -0.1394208819, -0.2068854272, -0.3080565631, -0.3402202725, -0.369473666, 0.1338024288, 0.2898081839, -0.1530364305, -0.0328775905, -0.1857860684, -0.266718179, 0.3404830396, -0.180463478, 0.4067646563, 0.0107003842, 0.3208975792, 0.0213312432, 0.2319337726, 0.4421768188, 0.7271000743, -0.1791524887, -0.2185595036, -0.0536127612, -0.1541268229, -0.208710447, 0.0071374206, 0.0306304768, -0.2557500601, 0.0924118012, -0.0574298985, 0.0443659723, 0.0608739853, 0.1258152127, 0.0699755028, -0.4000608623, -0.2998198569, 0.2181072235, -0.1561891139, 0.0378430672, 0.506482482, 0.0676233023, -0.0924676657, 0.0669310987, 0.1319430172, 0.6712409854, -0.1444396377, -0.1336938143, 0.0441394821, -0.1740806401, -0.2378407568, 0.0318626575, -0.2122766674, -0.3817217946, -0.5945904255, 0.0930715799, -0.2704686224, 0.0329008289, 0.2246017754, 0.066137746, 0.0567725934, -0.0167897195, -0.0726982206, 0.0699927807, 0.3150299191, -0.3102376759, 0.0056238803, 0.0674701408, 0.1505780965, -0.2651731968, 0.2959448099, -0.0667070374, -0.1344788671, -0.0533542596, -0.2241714448, -0.6046836376, 0.0633568242, -0.2882436812, 0.2968220115, 0.2508453429, 0.0494314767, 0.1574564725, 0.4011854827, 0.4436886013, 0.2695260942, -0.2344843149, 0.1727594435, 0.3623523414, -0.0145821925, -0.0064135762, 0.211714685, 0.4534878433, -0.1813888401, -0.2389177233, 0.0377393663, -0.0976290479, -0.4282444119, 0.1780986935, -0.2890241146, 0.1226880252, -0.4741538465, -0.0448159538, -0.1610464305, 0.0495673679, -0.1170773804, 0.1266120076, 0.3015564084, -0.025820829, 0.3938731849, 0.2872490287, -0.4737052023, 0.0818113983, 0.4354538023, -0.2639755905, -0.0656897873, 0.7143594027, -0.0224219766, -0.1156796366, -0.0845555663, 0.3356197476, 0.1899362206, -0.461309135, 0.1759459078, -0.1370142549, 0.16763933, -0.0239783265, 0.5160508752, 0.4567056596, 0.3805169165, 0.329077512, -0.5187922716, -0.1200369298, 0.0344010256, -0.1044826582, 0.3924303949, -0.1633546054, 0.069032751, 0.037948437, 0.0105708325, -0.2830747664, 0.1500228941, -0.3312318623, 0.0517839156, 0.1376153529, 0.0577626973, 0.0915412679, -0.0988199115, 0.1534479856, -0.1528943181, -0.3658683598, -0.2194008082, -0.0937627554, 0.1155197173, 0.0607095957, -0.3785832524, 0.1993468851, -0.3264402449, -0.1617551148, -0.1271058619, 0.0065266793, 0.0330898277, -0.0361988693, 0.0274357926, 0.2251443863, -0.0241947602, 0.0211056601, 0.0567586944, -0.3625778258, 0.0497006029, 0.0169093348, 0.1100958139, 0.0522978455, -0.1036030129, 0.0623392351, 0.0843106732, -0.024184633, 0.1517636478, 0.3195521832, -0.2027383596, 0.0648035184, 0.4826678336, 0.3069389462, 0.02040595, -0.2247436494, -0.1236109287, 0.1812739372, 0.1958635002, -0.3893769681, -0.0456151515, 0.0189759191, 0.2228654325, -0.0063583371, -0.1106347814, 0.2290060073, -0.2677124739, -0.0688796788, 0.0097187888, 0.2057591379, 0.2482972741, 0.2930919528, 0.5799325109, -0.1759134531, -0.1093826517, -0.0568372644, -0.1746615618, 0.0977744535, 0.0135682449, -0.1358995736, 0.4929815829, -0.3232512772, 0.2292831093, -0.2266657352, -0.708422184, 0.3919852078, -0.1421011686, 0.0754046738, 0.0047915108, 0.212447986, 0.24480398, -0.0497316942, 0.1501273513, -0.3210781813, 0.4191268682, 0.0932896361, -0.0296807438, -0.2051963806, -0.2670287788, 0.109669894, 0.0063233282, -0.1057886928, 0.1221757457, -0.0712559372, 0.16273202, -0.302937299, -0.1216506958, 0.0532988757, -0.1697727144, -0.0355588272, -0.2146686316, 0.2357461452, 0.2564387321, -0.1772018373, 0.3424800634, 0.7380923629, 0.3715671599, 0.4830287099, 0.1371566504, -0.1722052097, 0.1276462376, 0.127407223, -0.0393285342, 0.2327708602, 0.0634963438, -0.0034287118, 0.3761830926, 0.1473831534, -0.034196306, -0.3039712012, -0.2243896723, -0.2451120466, 0.0394474082, 0.2884536386, 0.0391371548, 0.0263522211, -0.2462792993, 0.1971479654, -0.0284640957, -0.0342448018, 0.2045909464, -0.0086462181, 0.1436298788, -0.0167891588, 0.0952034071, -0.1158063114, 0.4963772893, 0.3752226233, -0.1486889571, -0.1958690435, -0.370514065, -0.5975678563, 0.2106407136, 0.1432379782, -0.1041445807, 0.1782564223, -0.0372596569, 0.0617658161, -0.1067646369, 0.4922024608, 0.0131058693, -0.1966294199, 0.0617455803, -0.2441646457, -0.2179753184, -0.2281747013, -0.2018174976, -0.0431280695, -0.3614444733, 0.1915893555, 0.0650834516, 0.157985568, -0.1930200309, 0.0880775005, 0.0480719097, 0.0848010108, 0.1467908174, -0.0055304035, 0.4740927815, 0.053589996, -0.0633306503, -0.0972625613, -0.1911646277, -0.1607999951, 0.5104889274, -0.0338875502, 0.2085701376, -0.0188264847, -0.0699279755, -0.2319627553, 0.3770515621, -0.1640320122, -0.1332943588, -0.4568926096, -0.2069933265, -0.0227439664, -0.2393720448, 0.3742826581, -0.1085785925, -0.2206010967, 0.3657268286, 0.0113381948, -0.3828712106, 0.4573957622, 0.063447319, 0.0366951935, -0.147557959, 0.056918446, -0.1345570385, -0.0479522347, -0.5954987407, 0.2696995735, 0.4791093469, 0.0051989048, -0.0346903503, 0.2399042994, -0.1095317677, 0.2111076713, 0.0491967574, 0.1587299258, -0.0308018085, -0.2375634313, -0.2700147331, -0.0389960259 ]
https://github.com/huggingface/datasets/issues/724
need to redirect /nlp to /datasets and remove outdated info
Should be fixed now: ![image](https://user-images.githubusercontent.com/35882/95917301-040b0600-0d78-11eb-9655-c4ac0e788089.png) Not sure I understand what you mean by the second part?
It looks like the website still has all the `nlp` data, e.g.: https://huggingface.co/nlp/viewer/?dataset=wikihow&config=all should probably redirect to: https://huggingface.co/datasets/wikihow also for some reason the new information is slightly borked. If you look at the old one it was nicely formatted and had the links marked up, the new one is just a jumble of text in one chunk and no markup for links (i.e. not clickable).
16
need to redirect /nlp to /datasets and remove outdated info It looks like the website still has all the `nlp` data, e.g.: https://huggingface.co/nlp/viewer/?dataset=wikihow&config=all should probably redirect to: https://huggingface.co/datasets/wikihow also for some reason the new information is slightly borked. If you look at the old one it was nicely formatted and had the links marked up, the new one is just a jumble of text in one chunk and no markup for links (i.e. not clickable). Should be fixed now: ![image](https://user-images.githubusercontent.com/35882/95917301-040b0600-0d78-11eb-9655-c4ac0e788089.png) Not sure I understand what you mean by the second part?
[ 0.2948437333, 0.1105566025, -0.0633751824, 0.109463349, -0.071327582, 0.0353954472, -0.2602992356, 0.6290496588, -0.2917530239, -0.4541853368, -0.1458731592, 0.2195107639, 0.2947606742, 0.0850116163, 0.1424256563, -0.3171723485, 0.0133650415, 0.0606416278, -0.0077776127, -0.1089686677, -0.1860749274, 0.0806224719, -0.40319556, 0.1164983809, -0.0495448522, 0.0418988653, -0.2173668295, 0.3226778805, -0.0874299929, -0.427148819, 0.1224369109, 0.0153163793, -0.0209401157, 0.1970619559, -0.0001060938, -0.3152423203, 0.3930563331, 0.1965436786, -0.3718171716, -0.0397978164, -0.265704602, -0.5014027357, -0.0838164389, -0.1341038793, 0.0758305266, -0.1319983006, 0.0686013624, 0.3240993619, 0.4053320885, 0.432992816, 0.2685539424, -0.2723815441, -0.1567653269, 0.1352106631, 0.0452874899, 0.3373910785, 0.1736279428, -0.1308057904, 0.1029125378, -0.0435013771, -0.1377883106, 0.6198436022, -0.1445964724, -0.272769779, 0.082448341, -0.0814060941, 0.0386758596, -0.108128123, -0.0297006387, 0.1601059586, 0.5080626011, -0.1142876074, -0.0372505151, -0.1996771693, 0.0020607244, -0.2207474858, 0.2206597328, 0.1426461786, -0.1553158164, 0.1439509243, -0.2525393069, -0.6442889571, -0.2582044899, 0.3472140133, 0.0650895238, 0.5357508659, 0.0393280983, -0.05098667, 0.0237033814, -0.0212878436, 0.2273879349, 0.0018416281, -0.1510283798, 0.2054465562, 0.2761592567, -0.1788724214, -0.0123917218, 0.4630790353, 0.0318616703, -0.0050340914, -0.0059897909, 0.1522026658, -0.2559987903, -0.0608550571, 0.1496134251, 0.0887269601, 0.1551509351, -0.0099968752, 0.1412390769, 0.2226881981, 0.1227824986, 0.1127250567, 0.2170556188, -0.0220430009, -0.414096415, 0.05992686, 0.3093501925, -0.3077694178, -0.0351449512, 0.0103129679, -0.0311404262, -0.1560906768, 0.0460283943, 0.0781728476, -0.2404727042, 0.2759420872, 0.2424456328, 0.0025037318, -0.2576318681, -0.1979254633, 0.0392019078, 0.1484767944, -0.5195069909, -0.003709374, 0.1793029904, 0.3031880856, 0.1963307709, 0.208883509, -0.49146384, -0.01032052, -0.1324129552, 0.0879880115, 0.348669678, -0.0020262604, -0.1399037838, 0.1751737744, -0.0648552552, -0.1758546978, -0.1601030082, 0.1516983509, -0.3903274536, -0.1063862294, -0.1017529368, 0.2205362767, 0.013221832, -0.0695659146, 0.1046736091, 0.5226594806, -0.0152455084, -0.2866698802, 0.0681397095, 0.2493868321, -0.0525913611, -0.160615176, 0.0980928093, 0.4052126706, 0.0794252977, -0.0646130666, -0.0768412501, -0.0301984474, -0.0066011692, 0.1782202423, -0.1378753632, 0.0530479662, -0.146334514, -0.221771881, 0.6264211535, -0.320830673, -0.0289239213, 0.2638677955, -0.0541575439, 0.1031714752, -0.2276760042, 0.0109347804, -0.150118351, -0.2054256946, -0.0772968084, 0.2869208157, 0.1903687119, -0.0708114132, -0.561244905, -0.1219866797, 0.0364454612, -0.1459210217, -0.1186744645, 0.2481558323, -0.1282702237, 0.1427187175, 0.5751601458, 0.1089750677, 0.2362706959, 0.046156995, -0.0069269734, 0.2162106186, -0.0232689306, 0.1955584586, -0.3031810224, -0.2531628311, -0.2206090987, 0.2218623906, 0.3798178732, -0.2203886658, -0.2938581705, -0.3824447095, -0.1047747433, -0.4056071043, 0.2608023882, 0.0412187874, 0.037069723, 0.1344972104, -0.2119551003, 0.1060417295, 0.0213720407, 0.1596154273, -0.2815702856, 0.2219356447, -0.2116108686, 0.113019675, 0.0817911625, 0.3167993724, 0.3062698245, 0.0317717828, 0.0738057345, 0.3021825254, -0.2413657159, 0.2140288651, 0.3557471931, 0.0032237719, 0.3906037211, -0.375846386, 0.1347481757, 0.2379238904, -0.2560374737, 0.123078227, -0.3258954585, 0.0145812789, 0.1396805942, 0.3352675438, 0.0611245073, 0.2751969993, 0.0969419852, -0.4506772757, 0.0199283306, 0.0352052003, 0.0350971669, 0.18070364, -0.1705885082, 0.047994595, -0.2274558991, 0.5184097886, -0.1327470094, -0.0902356878, -0.1630612165, 0.4421410859, -0.1375370771, -0.4395439029, 0.1946422607, 0.1848454326, -0.2379843295, 0.2428795397, 0.1344381124, 0.2076068819, 0.0131120915, -0.1935088187, 0.3632588089, 0.1367350072, 0.0137261162, -0.136960417, 0.093837373, 0.2238073051, -0.1558361053, -0.1874811351, -0.1377898306, 0.3766476214, -0.2000191212, -0.0217868257, -0.2344863713, -0.844961822, -0.2666620612, -0.0810863599, -0.4977443516, -0.4589169621, -0.0094366483, -0.0190992039, -0.2085680664, 0.1083397493, 0.0919970721, 0.2354968041, -0.2721154392, 0.3169378936, -0.535997808, -0.389277488, -0.1888777167, 0.1811915338, 0.1817517877, 0.3827545941, 0.1627143621, -0.0475812294, 0.0194037389, -0.2012938261, -0.6216058135, -0.0174884088, 0.1355211884, -0.0172694083, 0.0692635551, 0.345251888, -0.1315455139, -0.0921543017, 0.1151116937, -0.0690846071, 0.0220817495, -0.2542693913, 0.0454221591, 0.280974865, -0.0525239371, -0.2910259068, -0.2359345257, -0.3109244108, 0.0217908192, 0.1182690933, 0.3605513871, 0.4227544665, 0.0719412342, -0.2329274863, -0.1364894807, 0.1704230607, -0.3226846755, -0.248266995, 0.0414105952, -0.1580936164, -0.1972013116, -0.0252276156, 0.0646566153, 0.0775938109, -0.0499860421, -0.6025818586, -0.1269470155, -0.1313964576, -0.1286747009, 0.0709890947, 0.1048425511, 0.2839219868, 0.2563126385, -0.3228652775, 0.1037819237, -0.1825138927, -0.1681533605, 0.0071231979, 0.4162357152, -0.0056429449, -0.0713062957, 0.2042762786, 0.297085166, 0.1327783018, 0.2455477566, 0.1495492458, 0.2490271628, 0.389380008, 0.1003489196, -0.2246988714, 0.1389162391, -0.0300455708, 0.1968901157, 0.2607526481, 0.2953700423, -0.0710908324, -0.3592981994, -0.2804767489, -0.5068994761, -0.367810756, 0.2198279947, -0.0039301948, 0.196081996, 0.4365547895, -0.0586108044, -0.0607512183, -0.3621482551, 0.0613127239, 0.3835929334, 0.0864198059, -0.0400693789, -0.5179493427, -0.2183749229, -0.3404259086, 0.1040318757, -0.0162344463, -0.0700973645, -0.1219052374, -0.0853978768, -0.0417905487, 0.0335985236, 0.0560586713, -0.2636698186, -0.1103122309, -0.0688567087, 0.3781455457, -0.213382259, 0.3772484362, 0.005436833, 0.2163895816, 0.4170414209, 0.2548288703, -0.0886953697, -0.2946908176, 0.4732959569, -0.0484020188, -0.1588538736, 0.1752281785, -0.0133168995, -0.2834281325, -0.2460773885, 0.0070945858, -0.1668277234, -0.1399959326, -0.1437569708, 0.165079087, 0.377822876, 0.0647333935, 0.1096118987, 0.0086407401, 0.1039742902, 0.2948509753, -0.3788730204, 0.0881223828, 0.2247513682, 0.1009910256, 0.3582814932, -0.1854430139, 0.0883196145, -0.4033204019, 0.137519002, 0.5038174391, 0.5648976564, 0.4843837321, 0.1057307422, -0.0381658189, 0.0434283279, -0.2725444138, 0.1219579354, -0.036310222, -0.0668788403, -0.421253711, -0.2740129828, 0.4274559021, -0.2244533449, -0.3345917165, 0.1839264631, 0.384570539, -0.371457994, 0.0986311883, -0.0541161075, 1.3036724329, 0.1177564114, 0.2643564045, 0.2851366997, -0.326449573, 0.6118412614, 0.1351918131, 0.1803232878, -0.3115262091, 0.2939242721, 0.0758848861, 0.1033247113, 0.0355618, -0.0169034097, -0.2762359679, 0.1469130367, -0.0094632627, -0.1048596427, 0.3148035407, 0.5139608979, 0.0888588354, -0.0101274308, -0.495462954, 0.2104875892, -0.3010270298, 0.1579081416, -0.1387441158, -0.2165050358, -0.141422689, -0.00799629, 0.1591984481, 0.1593579054, 0.1233630851, -0.0102321142, -0.1897463948, -0.4062084258, -0.0905774087, 0.1806755513, 0.1331233531, 0.2241067737, -0.2983706295, 0.2756780684, -0.1352892518, -0.0084197707, 0.1512204558, 0.0875730067, 0.0199187435, -0.0425283238, -0.2699319422, -0.0053210668, 0.0387093872, -0.0304467529, -0.4081801176, -0.2474008799, 0.2023912072, -0.1728235781, 0.1758576334, 0.3450034261, -0.3697673678, -0.226670593, 0.1665833294, 0.1998151392, -0.0727843419, -0.1729568392, 0.4413705468, -0.0301593225, -0.0509584434, 0.1921457797, 0.1212325171, -0.3229697943, 0.3000789285, 0.1150270328, -0.076545313, -0.3487906158, 0.1123463511, -0.0191055499, -0.242069602, -0.0497961752, -0.2220896631, -0.044644773, -0.0433062799, 0.141259402, -0.1310528368, 0.1130349711, 0.0411256775, -0.2262658626, -0.2856755555, 0.3485091329, -0.1230341867, -0.0245351736, -0.1657323539, 0.1705524176, 0.2855712175, 0.1165855005, -0.3988352716, 0.2132156789, 0.1558327526, 0.3843374252, 0.0738095716, -0.1693648696, -0.0331112519, -0.1091756374, 0.0152052278, -0.3327124119, -0.0191910267, -0.3111661077, -0.157025218, 0.0958076045, 0.1315577775, -0.4206080437, -0.1938259006, 0.004829701, 0.3410653472, -0.0282675363, -0.3932339847, -0.0528082326, 0.1041388661, 0.3544599414, -0.0349466279, -0.1348583996, 0.2051251978, 0.1046087816, -0.0054756417, 0.3132791519, 0.0977762789, 0.0985784903, -0.1884910315, -0.1168107241, -0.0280480608, 0.20468086, 0.0945468172, 0.3071021736, 0.182325393, -0.0172698218, 0.0843006968, 0.1988328248, 0.2487662286, 0.3345123827, -0.1385534406, -0.1020022482, 0.2987513244, 0.2516277134, -0.1525030434, 0.3064535856, 0.4109358191, -0.2264779657, -0.1406466961, 0.0476465747, 0.0535163283, -0.1912402362, -0.0045947274, 0.1663722247, 0.3280133903, -0.3724979162, 0.1765819639, -0.0227066036, -0.1544037312, -0.186897859, 0.0649694428, -0.0025248756, -0.0139818816, 0.051051762, 0.1612491757, 0.0720991418, 0.2448979765, 0.1589888781, -0.0305769108, 0.1322416663, -0.1021416932, 0.2460070252, 0.047403954, 0.2853546441, 0.1320994645, 0.3234428465, 0.1637510359, -0.5597476363, 0.1861123592, 0.2872390449, -0.0840738863, -0.0687479153, -0.2393763214, -0.0950437635, 0.0250346493, -0.1406838447, -0.0047864281, -0.3113845885, 0.290238142, 0.0055974354, -0.271383673, -0.6167180538, 0.0540415011, 0.2305917293, 0.3701771498, 0.1306068748, -0.0161533672, 0.0870966688, 0.1048498452, 0.181063205, 0.3856887817, 0.2037331313, 0.0893044025, -0.2723141015, 0.1367500722, -0.0468955375, -0.1020637006, -0.0629250631, 0.1047947034, 0.4423389435, -0.10140457, 0.0856407508, 0.1887866706, -0.1606446803, 0.0905622616, 0.2436359674, -0.0757843852, 0.1476674229, 0.1856591254, 0.2298225313, -0.3325279355, -0.1175153255, -0.260014385, -0.373334229, -0.1117494628, 0.215391174, -0.1159698516, 0.1428104788, -0.0462604798, 0.1098517999, 0.2666890919, 0.3352410495, 0.4374490976, 0.0977305695, -0.2789229453, -0.4578018486, -0.5455570817, -0.1064727306, 0.0231019668, -0.214145422, -0.0622803494, 0.0830751285, -0.3161221445, 0.1527831256, -0.1049755737, -0.1918202192, 0.1794046611, -0.2479569316, -0.3061391711, 0.3506571651, 0.1376374215, 0.4061355293, -0.0138250608, -0.0866432264, 0.2708303034, -0.1054261625, 0.0904941335, 0.1379041374, 0.1030690745, 0.0266210791, 0.2724758685, 0.0227296501, 0.3079680502, 0.0580763035, -0.1209442168, -0.4421959221, -0.4232120812, -0.2431797236, -0.0730034485, 0.3129669726, 0.1411992162, 0.3724716008, -0.1217117682, -0.014142842, -0.0595384687, 0.2734525502, 0.1081353202, 0.2610919178, -0.2706222832, 0.1001243517, 0.302162081, 0.2522703707, -0.0820597857, 0.2043439746, -0.0370113142, 0.1082292497, -0.4340153337, -0.3835905492, 0.4355787337, -0.2187875211, -0.1724580824, 0.0330860801, 0.3791276813, -0.064490214, 0.2866304219, -0.6331456304, -0.255564779, 0.2507275343, 0.0525368042, -0.2529152632, 0.2137626112, -0.3686189055, -0.3414421082, 0.0525197461, 0.038479425, 0.2273091525, -0.4464929998, 0.1576785892, -0.1497326046 ]
https://github.com/huggingface/datasets/issues/724
need to redirect /nlp to /datasets and remove outdated info
Thank you! > Not sure I understand what you mean by the second part? Compare the 2: * https://huggingface.co/datasets/wikihow * https://huggingface.co/nlp/viewer/?dataset=wikihow&config=all Can you see the difference? 2nd has formatting, 1st doesn't.
It looks like the website still has all the `nlp` data, e.g.: https://huggingface.co/nlp/viewer/?dataset=wikihow&config=all should probably redirect to: https://huggingface.co/datasets/wikihow also for some reason the new information is slightly borked. If you look at the old one it was nicely formatted and had the links marked up, the new one is just a jumble of text in one chunk and no markup for links (i.e. not clickable).
31
need to redirect /nlp to /datasets and remove outdated info It looks like the website still has all the `nlp` data, e.g.: https://huggingface.co/nlp/viewer/?dataset=wikihow&config=all should probably redirect to: https://huggingface.co/datasets/wikihow also for some reason the new information is slightly borked. If you look at the old one it was nicely formatted and had the links marked up, the new one is just a jumble of text in one chunk and no markup for links (i.e. not clickable). Thank you! > Not sure I understand what you mean by the second part? Compare the 2: * https://huggingface.co/datasets/wikihow * https://huggingface.co/nlp/viewer/?dataset=wikihow&config=all Can you see the difference? 2nd has formatting, 1st doesn't.
[ 0.3347695172, -0.0313108675, -0.0245431308, 0.1223926023, -0.114665024, 0.0453223921, -0.3248900473, 0.6779083014, -0.4332502782, -0.5133857131, -0.1581163853, 0.0308901668, 0.2777540386, 0.0370306261, 0.0912268832, -0.3001835346, 0.0838998109, 0.0683063343, 0.1088941246, -0.0865247846, -0.1852570772, 0.0762515739, -0.4062893987, 0.1121501774, -0.0114804422, 0.1721999943, -0.2518546879, 0.2978981733, -0.0522662587, -0.402754426, 0.2221585363, -0.0079390202, -0.0050458205, 0.3382581174, -0.0001157863, -0.411652714, 0.4116844833, 0.1879997998, -0.4584498405, -0.0305532422, -0.4210918546, -0.4628531337, -0.0959180743, -0.0723488703, 0.0769468173, -0.0744698942, -0.0712040886, 0.3125738204, 0.3448779285, 0.4643401206, 0.1784187108, -0.2903705239, -0.241637677, 0.1717671603, 0.018993808, 0.4204217196, 0.2907690108, -0.1033793166, 0.1266768724, 0.0224709902, 0.0177701637, 0.600199163, -0.2633239627, -0.2864016294, 0.0878260508, -0.1737946272, 0.0100405822, 0.0187707506, 0.0099456906, 0.1783487201, 0.5071709156, -0.1586159617, -0.0345929787, -0.1617969871, -0.0723985657, -0.3024502099, 0.1925823838, 0.0792358369, -0.1341698021, 0.1910062432, -0.2741976082, -0.6634990573, -0.2567833066, 0.3719299734, 0.0737496167, 0.5255471468, 0.0017782602, -0.0485954545, -0.0253329705, 0.0524698384, 0.3299179971, -0.1322030425, -0.1498909593, 0.1076487824, 0.352032423, -0.2275377214, -0.1650883704, 0.3888022602, -0.0739496648, 0.0860260129, -0.0450348519, 0.1166945323, -0.2130916566, -0.0696078986, 0.0730749518, 0.0922402218, 0.240815416, 0.0387110375, 0.0163721256, 0.2204915732, 0.0733707026, 0.0563521497, 0.2624735534, 0.0330746844, -0.3904784024, 0.1451825947, 0.3424994051, -0.3545632958, -0.1334951818, -0.010732457, -0.1309119463, -0.2028387338, 0.1030150875, 0.0233708471, -0.2182503343, 0.2397343069, 0.2594828308, 0.0784375966, -0.2327988297, -0.2440483123, 0.115146704, 0.1520033479, -0.4599367678, -0.0848173648, 0.1431112289, 0.2702641487, 0.1501923651, 0.2429584414, -0.5883114934, -0.0873505175, -0.1672286838, 0.0308708213, 0.4714210033, -0.0219435375, -0.2133273333, 0.2547944188, 0.0051451991, -0.099328272, -0.225529179, 0.2119436711, -0.3909614384, -0.1834076643, -0.0727772266, 0.1527855694, 0.0505202673, -0.0792205036, 0.0594303794, 0.5098869205, 0.0243787467, -0.3396793604, 0.1360299438, 0.2457136065, -0.0578639545, -0.1810047626, 0.1157802567, 0.5219932199, 0.0678177476, -0.0532282405, -0.1457301676, 0.0465019941, 0.1242170408, 0.1956206709, -0.0921934769, 0.0991828218, -0.0882086307, -0.3709584177, 0.6637303233, -0.3511183262, -0.0227152519, 0.3351542354, -0.0081377188, 0.1604322344, -0.245332703, -0.0492000841, -0.1875028163, -0.2134548873, -0.0744738504, 0.2241968364, 0.3232368827, -0.1579635888, -0.513337791, -0.1274112165, 0.0353280865, -0.2628819942, -0.1963528097, 0.2379519939, -0.1808656007, 0.0626833439, 0.6130366921, 0.2045860589, 0.3268550634, 0.036696855, -0.0764689296, 0.2783766091, -0.0655193627, 0.1643217951, -0.2536492348, -0.3068727255, -0.2187331766, 0.0782774389, 0.3773009777, -0.1764591634, -0.3194610476, -0.4541699588, -0.1285854131, -0.3704754412, 0.1609471738, 0.0367840938, 0.0669014379, 0.091862306, -0.2161014676, 0.1195015833, 0.1221890748, 0.1626615673, -0.1556653529, 0.2343631536, -0.1073223874, 0.1185680404, 0.0680756569, 0.36757043, 0.3903981447, 0.0310996566, 0.0331880376, 0.3623470366, -0.2315731496, 0.1050685868, 0.3430276513, -0.0005023053, 0.2701266408, -0.3319276571, 0.114828907, 0.3078564405, -0.2995308638, 0.1157682166, -0.2941276431, -0.0970843881, 0.1080172807, 0.4377197325, 0.0486138463, 0.2380438, -0.0427466482, -0.4784867465, 0.0134780556, 0.0129247364, 0.0927126706, 0.1475966573, -0.1852421165, 0.149676159, -0.1700380892, 0.4890299439, -0.2432166785, -0.2002648264, -0.1469664425, 0.4490043223, -0.2449114472, -0.5029027462, 0.1238067076, 0.1460933387, -0.1699920893, 0.1770002991, 0.1778143346, 0.1586058885, 0.1773633063, -0.1300580353, 0.3911327422, 0.1921300739, -0.1077753529, -0.18211402, 0.0611280203, 0.2805326581, 0.0116038965, -0.2150402814, -0.1216224954, 0.3242531419, -0.1866367608, 0.0014890999, -0.3264099658, -0.86577034, -0.3520626724, -0.200429976, -0.5172258019, -0.4104233384, -0.09498965, -0.1143295541, -0.1342767775, 0.0450775363, 0.1265208274, 0.2379601151, -0.2683814168, 0.1645232886, -0.5306434631, -0.2966869473, -0.2325037718, 0.0822635069, 0.1692270041, 0.4310948849, 0.1023430899, -0.0135783013, 0.1317179352, -0.238417387, -0.5461179018, -0.0772489607, 0.1511232257, -0.1104475483, 0.0499578938, 0.327147156, -0.0515408665, -0.0389800854, 0.105877839, 0.0922542214, 0.0479797795, -0.18915914, 0.1006742418, 0.3573780358, 0.0506374873, -0.1992052346, -0.2320476025, -0.2316873968, -0.1065358818, 0.0011562153, 0.3030379415, 0.3275019228, 0.0424162149, -0.2985089123, -0.1533740312, 0.1980220079, -0.2720226049, -0.2821152806, -0.086512953, -0.0520651489, -0.0480844453, -0.0406526066, 0.1638765633, -0.0399581864, 0.0063312198, -0.5437180996, 0.0172788128, -0.1721353084, -0.2262421697, 0.0743887872, 0.0549086444, 0.3278780282, 0.2925353348, -0.2564881146, 0.1380578578, -0.2214042991, -0.2019817978, -0.0032888893, 0.4702104926, 0.0355640799, -0.08044146, 0.2707924843, 0.2245768607, 0.1259831935, 0.2435905188, 0.0709472448, 0.3061742485, 0.3696185648, 0.0687893629, -0.2160181999, 0.1123952866, -0.0352279507, 0.2803631127, 0.2662484944, 0.3352377415, 0.0372058228, -0.3397895098, -0.3865876198, -0.5043464303, -0.323056519, 0.2027923614, -0.1036222279, 0.249901399, 0.4611449838, -0.0946934596, -0.0032177856, -0.3765960634, 0.074805446, 0.4609956741, 0.1067182869, 0.0093263425, -0.5229616165, -0.2309433222, -0.2563523054, 0.2096586078, -0.0110529894, -0.0789277181, -0.0681877509, -0.1151456088, -0.0564893074, 0.1711409986, 0.0056749363, -0.289702028, -0.1365114152, -0.138513118, 0.4089795053, -0.273370862, 0.3602388799, 0.0629552081, 0.2372463495, 0.4312344491, 0.2234025747, -0.1197759882, -0.3254253864, 0.5697219372, 0.0645318255, -0.0614052974, 0.0964409858, -0.0524777211, -0.2221929282, -0.15602988, 0.08559753, -0.1968944371, -0.0881663337, -0.126977697, 0.2383782119, 0.3612761199, 0.0822325721, 0.1876221448, -0.1319358647, 0.0705619007, 0.1995442659, -0.4588721991, 0.1354635805, 0.2541296184, 0.2300759852, 0.2352900654, -0.2479999959, 0.0296639148, -0.4350303113, 0.1664228588, 0.5890612602, 0.5690317154, 0.5141727924, 0.1899053156, -0.0087941848, -0.0551821478, -0.2320432961, 0.055717282, -0.1033247635, 0.0282698423, -0.6692451239, -0.2759590447, 0.3434650302, -0.2014218569, -0.2996378839, 0.1327135414, 0.3680140078, -0.3256420493, 0.1358931959, -0.1386603415, 1.452506423, 0.01615455, 0.3074935079, 0.2622664273, -0.3694678247, 0.5940526128, 0.1238387302, 0.2053144574, -0.2839103043, 0.2496682554, 0.0036740948, 0.0618799366, 0.1228406951, 0.0623343065, -0.270188272, 0.2022425085, -0.2004914284, 0.0299868863, 0.399392575, 0.4282919765, 0.1693121791, 0.1005342156, -0.516079247, 0.1123959348, -0.28109622, 0.1808940172, -0.1239766702, -0.1440435797, -0.2226489782, 0.0313794576, 0.1877168417, 0.0839281753, 0.142121017, -0.0183626488, -0.280687362, -0.5062952042, -0.1181012467, 0.1595149338, 0.167870298, 0.3043162227, -0.2099968493, 0.2386779189, -0.0549515411, 0.0356585793, 0.2162671536, -0.0535349995, -0.0559000745, 0.0556208603, -0.2328427583, 0.0376837477, 0.0312077645, -0.102953583, -0.347405076, -0.1976025701, 0.2185408771, -0.2566683292, 0.0584220663, 0.3964408934, -0.362354964, -0.2125413567, 0.0836695805, 0.1809793115, 0.0384854935, -0.1831213981, 0.3429778814, -0.0922756791, -0.0582975931, 0.1865046322, 0.1581071913, -0.3483940065, 0.3420064449, 0.0313882641, -0.0707621351, -0.291249603, 0.1405386478, -0.0006708516, -0.1967127919, 0.0280772913, -0.283433497, 0.0484341495, 0.0363946483, 0.0581093319, -0.2070176005, 0.1525879353, 0.0304010157, -0.180290997, -0.2243572772, 0.2958810925, -0.0278941169, -0.056001097, -0.18102175, 0.2258635312, 0.238157168, 0.0413488038, -0.2912552357, 0.3446397781, 0.2932649255, 0.4035776854, 0.0138335209, -0.1386961639, 0.0836669952, -0.1347233802, -0.0722848922, -0.4095421731, 0.0911059082, -0.2318192273, -0.1355036795, 0.1214020625, 0.0832748786, -0.4337316155, -0.2626564801, -0.0199546646, 0.4507330358, -0.0571439303, -0.4337199628, 0.0790679008, 0.1367818862, 0.3330494165, -0.0103826886, -0.2221970111, 0.0730660483, 0.2071114331, -0.0344449133, 0.244562149, 0.0574371442, 0.1464101523, -0.1366048008, -0.0882484689, -0.063011989, 0.2419248372, 0.207302466, 0.2485895455, 0.1636387259, 0.0078864414, 0.0967049822, 0.1874342859, 0.2349242866, 0.3742613494, -0.1672324985, -0.190737173, 0.2022382766, 0.1570818275, -0.0633990243, 0.3117007315, 0.3845292926, -0.2091357112, -0.1957258731, -0.0179182347, 0.0369767733, -0.1840925664, -0.0103484709, 0.1297141165, 0.3523140252, -0.3151236773, 0.1350961328, 0.0284249578, 0.0555559322, -0.1573745012, 0.1570021957, -0.0206897482, -0.0604654998, -0.108005397, 0.2944137156, -0.0069987094, 0.4499298632, 0.0754647627, -0.1183184609, 0.0667598024, -0.1927375793, 0.2933215201, 0.0403673984, 0.2244838178, 0.1030921265, 0.2842247188, 0.1965310723, -0.5416136384, 0.3025434017, 0.2099868357, -0.0410257429, -0.0964832753, -0.1445708722, -0.0314278156, 0.0516259372, -0.2259207666, -0.0453446992, -0.3614835739, 0.3704488873, -0.0049911914, -0.2521319687, -0.5928740501, 0.0533663668, 0.281131655, 0.3872299492, 0.1061196253, -0.1477273852, 0.1504848301, 0.1130767986, 0.2815258503, 0.2899907231, 0.2494255006, 0.0743729472, -0.2620928288, 0.1713243872, -0.0873465911, -0.1128727198, -0.0194507726, 0.1650667489, 0.4752905667, -0.1073505655, 0.009632065, 0.1337346733, -0.0545265339, 0.1067201719, 0.3185572624, 0.0217737202, 0.0777640343, 0.1855483204, 0.1987588704, -0.3515220284, -0.1398885995, -0.1542218029, -0.3481055498, -0.0948708504, 0.2665058672, -0.0880785286, 0.0736075491, 0.0979896933, 0.0551433377, 0.3159168363, 0.2274740636, 0.5344840884, 0.0322410502, -0.3407532573, -0.4845392108, -0.3706593812, -0.2312299758, 0.0498786978, -0.1062832773, -0.1174252927, 0.0473177508, -0.351674974, 0.06693957, -0.1297478527, -0.2198439687, 0.1422680169, -0.2810112834, -0.2178431153, 0.3459417522, 0.1754383147, 0.4400461912, -0.0539129004, -0.1331344098, 0.2523143291, -0.0499268994, 0.0098539516, 0.1244201958, 0.104202196, 0.1302522421, 0.2840398848, -0.0573794432, 0.2944978178, 0.135045141, -0.0791730732, -0.4958038926, -0.3676655889, -0.1456316411, 0.0074782614, 0.4366791248, 0.0757362619, 0.2836894989, -0.1762487888, 0.0180860721, 0.0131634586, 0.3886205256, 0.065627858, 0.2432447523, -0.3522212803, 0.0078458255, 0.2614374757, 0.2554189563, -0.064133808, 0.2637678087, -0.0437515788, 0.2339205742, -0.5088477135, -0.2435072213, 0.4126275778, -0.1094498262, -0.1396605819, -0.0169328637, 0.4314409494, 0.0141381556, 0.4137528837, -0.6328083277, -0.3446972668, 0.342920661, 0.1071649194, -0.2154009789, 0.2676655352, -0.4782136679, -0.2345101237, 0.1565807909, 0.0931106582, 0.211096555, -0.431619674, 0.1794062406, -0.114484638 ]
https://github.com/huggingface/datasets/issues/724
need to redirect /nlp to /datasets and remove outdated info
For context, those are two different pages (not an old vs new one), one is from the dataset viewer (you can browse data inside the datasets) while the other is just a basic reference page displayed some metadata about the dataset. For the second one, we'll move to markdown parsing soon, so it'll be formatted better.
It looks like the website still has all the `nlp` data, e.g.: https://huggingface.co/nlp/viewer/?dataset=wikihow&config=all should probably redirect to: https://huggingface.co/datasets/wikihow also for some reason the new information is slightly borked. If you look at the old one it was nicely formatted and had the links marked up, the new one is just a jumble of text in one chunk and no markup for links (i.e. not clickable).
56
need to redirect /nlp to /datasets and remove outdated info It looks like the website still has all the `nlp` data, e.g.: https://huggingface.co/nlp/viewer/?dataset=wikihow&config=all should probably redirect to: https://huggingface.co/datasets/wikihow also for some reason the new information is slightly borked. If you look at the old one it was nicely formatted and had the links marked up, the new one is just a jumble of text in one chunk and no markup for links (i.e. not clickable). For context, those are two different pages (not an old vs new one), one is from the dataset viewer (you can browse data inside the datasets) while the other is just a basic reference page displayed some metadata about the dataset. For the second one, we'll move to markdown parsing soon, so it'll be formatted better.
[ 0.1384782642, 0.0236902609, -0.0979999155, 0.0289664585, -0.0519955903, 0.0458978377, -0.1316039562, 0.4961523712, -0.1375632435, -0.2072742283, -0.1407679021, 0.3467581868, 0.2411794513, 0.0714615285, 0.1461841464, -0.1521986574, -0.0214512832, 0.1132966578, -0.0513905324, -0.1351282895, -0.1931080669, 0.0566267967, -0.3132694364, 0.1716674566, -0.0621243082, 0.017595686, -0.140349865, 0.2805622518, -0.1343231201, -0.4249673486, 0.1020283625, 0.0087720295, -0.0224359855, 0.1715870053, -0.0000975793, -0.1550674736, 0.417780757, 0.2299159765, -0.4386449456, 0.0474659987, -0.1592709869, -0.4129196703, 0.0570612252, -0.2196608782, -0.030899182, -0.2214238495, 0.1375922412, 0.2655304372, 0.2472459674, 0.3672334552, 0.3661076427, -0.0199297033, -0.2039600015, 0.0462491214, 0.0675610676, 0.2029664069, 0.0472304262, -0.1386794895, 0.167168498, -0.1134864539, -0.2322293669, 0.5095512271, -0.0723001584, -0.2618307173, 0.0562583618, -0.001712084, -0.0014854365, -0.070292972, 0.0468759313, 0.1706981361, 0.4369102418, -0.054741919, -0.0492674857, -0.2271544486, -0.023238847, -0.1028957665, 0.292894125, 0.1422809362, -0.1384126693, 0.0905146673, -0.1495306492, -0.4678625762, -0.171379447, 0.304980278, -0.0220148414, 0.5642758608, 0.0080766967, -0.1040588692, 0.0742390081, -0.0737465546, 0.1059834734, 0.0995102301, -0.0752474889, 0.0970751345, 0.1928909719, -0.0765537769, 0.2435374707, 0.4252409339, 0.0815108567, -0.069550775, 0.0161835309, 0.1859908849, -0.1986389458, -0.0451905169, 0.1165731773, 0.0689192489, 0.0976121947, -0.1040061191, 0.2782569528, 0.3188301623, 0.0774902403, 0.1003956422, 0.2027647942, -0.0784590691, -0.284547776, -0.1333402544, 0.1968570054, -0.2208769172, -0.0664087757, -0.0128303068, 0.0212562047, -0.126184985, 0.0431217365, 0.2340464294, -0.1883872151, 0.1729915142, 0.0916702747, 0.004330826, -0.3476364017, -0.2004378736, -0.1041786224, 0.0623963512, -0.5295287371, 0.0361767858, 0.2182325572, 0.2483711988, 0.2229045182, 0.2349678874, -0.4926006794, 0.0033511983, -0.1259414554, 0.2126780301, 0.2112230361, 0.0128596043, 0.001435258, 0.2291311026, -0.0713291392, -0.2442646772, -0.0399353206, 0.0254284646, -0.3115341663, -0.1752976775, -0.1647271514, 0.3262215853, 0.0564430244, -0.0685153455, 0.1833928525, 0.3974272609, -0.0369957909, -0.2568759322, -0.0134542016, 0.3018790781, -0.1701183617, -0.1396076679, 0.0991515666, 0.3828623891, 0.095241107, -0.1544090062, -0.0409389734, -0.001237615, 0.0293819234, 0.1731403172, -0.212129131, 0.0950801522, -0.2189352959, -0.1023462936, 0.5547263622, -0.2279092073, -0.1078957841, 0.2369596064, -0.1232386231, 0.0524337664, -0.1402728856, -0.0220217388, -0.1591453254, -0.0985371992, 0.0036774091, 0.1784609556, 0.2680038512, 0.0771943107, -0.6268883944, -0.1140686348, 0.0701871663, -0.0578802675, -0.1109441817, 0.1748308241, -0.0566854812, 0.1209659651, 0.5310484767, -0.0093565006, 0.1440631151, 0.1365647763, 0.034369316, 0.0989691317, -0.0523039028, 0.068673104, -0.2810056508, -0.1475198269, -0.2399804294, 0.3287535906, 0.3268777728, -0.2241638005, -0.4039589763, -0.2527481019, -0.1470333785, -0.4105485976, 0.3645323813, 0.1858109981, 0.0403641947, 0.2435138524, -0.1546341628, 0.1094997004, -0.0035773991, 0.0948424637, -0.3514446914, 0.1881889105, -0.2791692019, 0.0763323605, 0.1151817217, 0.2385627031, 0.2698488533, 0.087714538, 0.0782880411, 0.2478951365, -0.2400451899, 0.2538330555, 0.3343013525, 0.0537941307, 0.3653839529, -0.3246807456, 0.0520901605, 0.206970647, -0.1764694154, 0.1793636829, -0.3303444982, 0.1332092881, 0.1781618148, 0.2474448234, 0.1418088973, 0.2600358725, 0.2022662163, -0.4204209149, 0.0664190874, -0.0762855113, 0.0819925964, 0.1620309204, -0.0552762225, 0.028512314, -0.2853656709, 0.5206697583, 0.0286519472, 0.0097684981, -0.0239301324, 0.3777435422, -0.1655337065, -0.3923076093, 0.1549367309, 0.2252097577, -0.195020631, 0.2894264162, 0.2376931608, 0.2057403028, -0.1825958788, -0.2519815564, 0.3104597926, 0.052447591, 0.0171946529, -0.0813842118, 0.1677494794, 0.1088387892, -0.3862135708, -0.0640426427, -0.1907244176, 0.3152852654, -0.2420072854, -0.0095192613, -0.2421172559, -0.6865225434, -0.1989767402, -0.0486600883, -0.376157254, -0.5674777031, 0.1000583023, 0.0890864134, -0.2643339634, 0.0962953568, 0.022066718, 0.2123070508, -0.2629900873, 0.4032298326, -0.4363814294, -0.3189543188, -0.2448747009, 0.2402091771, 0.1480137855, 0.4297666848, 0.1777308881, -0.0664894357, 0.0116418349, -0.2758164704, -0.5960997939, 0.0688936934, 0.159837082, 0.0652734563, 0.0897849798, 0.2754555941, -0.1754969656, -0.1561301798, 0.1922321022, -0.1071819365, 0.025094334, -0.1592064351, -0.0489173904, 0.128082782, -0.072123602, -0.4142032266, -0.1305123419, -0.3529880047, 0.0151671171, 0.0577153452, 0.3492696285, 0.390565455, -0.0092567615, -0.1279176921, -0.1278903037, 0.2130809277, -0.3561649024, -0.177602455, 0.1717916727, -0.2524497211, -0.3447202444, -0.0921413824, 0.0265412237, 0.1429202557, -0.1665218174, -0.5557921529, -0.1072854623, -0.2250917405, -0.0492845178, 0.0959308743, 0.0670159832, 0.2911284268, 0.212403059, -0.3828005493, 0.0761635005, -0.2007708848, -0.1852182597, -0.0926349759, 0.3297071755, -0.1473432332, -0.0259679314, 0.1464906037, 0.2578775585, 0.1349190474, 0.1953126937, 0.2204303443, 0.0854306296, 0.4196576774, 0.0110080699, -0.2900317609, 0.0634927973, 0.0090658981, 0.119535841, 0.3961510062, 0.2554289103, -0.133902207, -0.3042543232, -0.2171267122, -0.479075104, -0.4104218185, 0.1557457596, 0.0932823196, 0.1844753325, 0.4510629177, 0.0493236855, -0.1134251133, -0.3020303249, 0.1069518402, 0.3718750775, -0.0175997335, -0.0517835245, -0.4626868665, -0.1169179603, -0.4204595089, 0.0086066695, 0.012529213, 0.006832689, -0.1453167796, -0.179737255, 0.0675041378, -0.0653711483, 0.1453808695, -0.2783142924, 0.035592474, 0.0482698642, 0.3203532696, -0.250559926, 0.3439114094, -0.0825133547, 0.2027127743, 0.4124556482, 0.1730883121, -0.1125211045, -0.2332010865, 0.2836087048, -0.08886078, -0.1713406444, 0.1754533499, -0.1122347713, -0.2408094853, -0.1704412252, -0.0391075462, -0.2217509747, -0.1524665654, -0.1458525509, 0.0307616368, 0.3162335753, 0.0287965219, 0.06360434, 0.2657086253, 0.1218657941, 0.2786858082, -0.3115956783, 0.0927836448, 0.3133794963, -0.0665600449, 0.4313211441, -0.0712836981, 0.1204113513, -0.226297155, 0.0282770898, 0.369204551, 0.400642693, 0.3853724301, 0.0272871628, 0.0499906577, 0.0483685322, -0.275087446, 0.061783351, 0.1118878871, -0.0430066846, -0.3030903637, -0.165115267, 0.4166709185, -0.1593435407, -0.3416794837, 0.1539680958, 0.395431906, -0.281786859, 0.1258599013, -0.1199477687, 1.091557622, 0.0552989915, 0.2253073156, 0.3524339795, -0.2674306631, 0.4936011732, 0.1012986973, 0.1801206619, -0.2920378149, 0.1751582921, 0.1270914078, 0.1457633674, -0.0557670221, -0.0058917617, -0.2550280988, 0.1094243377, 0.1402426958, -0.078535594, 0.2105835229, 0.4886166453, 0.0843972862, -0.0641263425, -0.5037649274, 0.2985768914, -0.2262150347, 0.1996658891, -0.1277562082, -0.1631536931, -0.0601422153, -0.0321709961, 0.1165289655, 0.1792827994, 0.1863969862, -0.017904602, -0.0378008448, -0.2672232389, -0.0373408012, 0.1575271934, 0.1092488393, 0.2163614631, -0.373436451, 0.2302187681, -0.195914492, -0.0694234669, 0.0487481058, 0.1498443633, 0.0336112417, -0.0839716569, -0.2885699868, -0.0285131205, 0.036126107, -0.0350856818, -0.3423164785, -0.0780351385, 0.0723435059, -0.2086379081, 0.1602956802, 0.2669921219, -0.2990271151, -0.3812173009, 0.2623146772, 0.0443826392, 0.0296357349, -0.1978318542, 0.5369786024, -0.0462449752, -0.1385477185, 0.2511783838, 0.0826557726, -0.1980271488, 0.3518415689, 0.1640080363, -0.1358989179, -0.4078322947, 0.0390857831, 0.0016325298, -0.1626388729, -0.1120078042, -0.1261801273, -0.0972318351, 0.026788855, 0.1738173217, -0.1056142449, 0.0543489605, -0.0123706693, -0.1686032712, -0.2082093507, 0.3446322381, -0.0561456494, -0.0612730682, -0.0452139564, 0.1294669807, 0.2444754839, 0.0769979134, -0.4937222302, 0.0811449885, 0.0188793913, 0.2040676624, 0.0736447871, -0.2258642018, 0.0162374601, -0.103757672, 0.158581391, -0.3116463125, -0.0532300361, -0.394267261, -0.1345128268, 0.0667916089, 0.1154429391, -0.2621736228, -0.1713463813, 0.047921177, 0.1974190325, -0.0503354818, -0.264184773, -0.071334444, 0.0700575337, 0.2239851207, -0.0844434202, -0.0575151928, 0.1428699046, -0.057046324, -0.0508441217, 0.2087194175, 0.0167043172, -0.00388716, -0.1956357956, -0.1665589064, 0.015688587, 0.1917092949, 0.0438327268, 0.3789801896, 0.1804863662, -0.1043237522, 0.0294198599, 0.2393623888, 0.1878099889, 0.2477827966, -0.0290871393, -0.1235619634, 0.252525419, 0.3605394959, -0.2280335128, 0.1633859575, 0.3158960044, -0.2228289545, 0.0871225446, 0.079825215, 0.0638509989, -0.1516430378, 0.0634770542, 0.1242584735, 0.2361384928, -0.4074928164, 0.0833906978, -0.0008193633, -0.1425864249, -0.1591532081, 0.1008661911, -0.015424923, -0.0259343646, 0.1727671325, 0.1672541946, 0.1875387132, 0.199091956, 0.1983812153, -0.0316237584, 0.1032969654, -0.0272880886, 0.1560549736, 0.1149837151, 0.2188355923, 0.160669595, 0.3957932293, 0.0339276642, -0.3802355826, -0.0479915962, 0.2377633303, -0.1753584892, -0.1134167835, -0.2992446423, -0.1522037536, -0.0028738021, -0.0327749625, -0.0263367854, -0.1942235231, 0.1382889152, -0.1051364169, -0.2177476436, -0.5958802104, 0.041644115, 0.1248268262, 0.370264411, 0.1492660791, 0.1023703143, -0.0352712534, 0.0460775979, 0.0458046608, 0.4355768561, 0.1798754781, 0.1616176069, -0.215940699, 0.0523510203, -0.129766807, -0.1344490498, -0.1680031419, 0.1029506847, 0.3525753617, -0.0743376017, 0.2070358694, 0.2491972893, -0.2899198234, 0.0684607029, 0.1442240626, -0.036755681, 0.2184752226, 0.0735747665, 0.0894304812, -0.2402602285, -0.1313077807, -0.2430724353, -0.3983200788, 0.0277148522, 0.1920784116, -0.1561352909, 0.1798248589, -0.2516319752, 0.1540111154, 0.3098347485, 0.5025590062, 0.3681333661, 0.1169837415, -0.0317992084, -0.4122177958, -0.6755203605, 0.0369235314, -0.0604937077, -0.2278497219, -0.0889482573, 0.0863094628, -0.2890087366, 0.0963240564, -0.0644583479, -0.028050689, 0.0477552153, -0.262989372, -0.3645362854, 0.2613120377, 0.100449197, 0.2882199287, -0.0359892957, -0.109535329, 0.3306040466, -0.1103645414, 0.2111806273, 0.1841337085, 0.1408011913, -0.1183779538, 0.2390456349, 0.082643874, 0.2662587762, 0.0853164643, -0.2080551535, -0.4103216231, -0.4120031297, -0.2276321352, -0.0203007311, 0.3156793118, 0.1692175418, 0.3763762414, 0.0344469137, -0.0559515208, -0.0370044447, 0.2447824031, 0.2542079687, 0.2737857103, -0.2028926015, 0.2134632766, 0.3107578456, 0.1523429602, -0.0311637726, 0.2368995398, -0.0129878502, 0.003876427, -0.317687124, -0.5182989836, 0.3584727943, -0.2934136093, -0.1650801897, 0.0446166843, 0.3463248909, 0.0199225172, 0.1421870589, -0.5205224156, -0.1700234413, 0.1570400149, 0.0337523483, -0.241244033, 0.1453216076, -0.3328869343, -0.3634594083, 0.0072163306, 0.1913146377, 0.3161477745, -0.457780093, 0.1836124212, -0.0948202908 ]
https://github.com/huggingface/datasets/issues/723
Adding pseudo-labels to datasets
Nice ! :) It's indeed the first time we have such contributions so we'll have to figure out the appropriate way to integrate them. Could you add details on what they could be used for ?
I recently [uploaded pseudo-labels](https://github.com/huggingface/transformers/blob/master/examples/seq2seq/precomputed_pseudo_labels.md) for CNN/DM, XSUM and WMT16-en-ro to s3, and thom mentioned I should add them to this repo. Since pseudo-labels are just a large model's generations on an existing dataset, what is the right way to structure this contribution. I read https://huggingface.co/docs/datasets/add_dataset.html, but it doesn't really cover this type of contribution. I could, for example, make a new directory, `xsum_bart_pseudolabels` for each set of pseudolabels or add some sort of parametrization to `xsum.py`: https://github.com/huggingface/datasets/blob/5f4c6e830f603830117877b8990a0e65a2386aa6/datasets/xsum/xsum.py What do you think @lhoestq ?
36
Adding pseudo-labels to datasets I recently [uploaded pseudo-labels](https://github.com/huggingface/transformers/blob/master/examples/seq2seq/precomputed_pseudo_labels.md) for CNN/DM, XSUM and WMT16-en-ro to s3, and thom mentioned I should add them to this repo. Since pseudo-labels are just a large model's generations on an existing dataset, what is the right way to structure this contribution. I read https://huggingface.co/docs/datasets/add_dataset.html, but it doesn't really cover this type of contribution. I could, for example, make a new directory, `xsum_bart_pseudolabels` for each set of pseudolabels or add some sort of parametrization to `xsum.py`: https://github.com/huggingface/datasets/blob/5f4c6e830f603830117877b8990a0e65a2386aa6/datasets/xsum/xsum.py What do you think @lhoestq ? Nice ! :) It's indeed the first time we have such contributions so we'll have to figure out the appropriate way to integrate them. Could you add details on what they could be used for ?
[ 0.3508717716, -0.1339655817, 0.0640572011, 0.0146744885, 0.1172191352, 0.0425937586, 0.24841474, -0.0556927249, -0.1454747915, -0.0428761467, -0.227577433, 0.0762313828, -0.1649906486, 0.5450240374, 0.4980667233, -0.1480553597, 0.3547057807, -0.1910561621, 0.1890378147, -0.1643100679, -0.3369726837, -0.2637387812, 0.1954763681, -0.1774053127, -0.3335676491, -0.1520865858, -0.1881616116, 0.0017016983, 0.0816944912, -0.5430548191, 0.0081279455, 0.3411810994, 0.2522217631, 0.6251295209, -0.0001249106, -0.1294020563, -0.0920359716, -0.1204194725, -0.1105553582, 0.190760836, -0.0204500295, -0.2631739378, -0.2147086263, 0.1969446987, -0.0902936682, -0.4064388275, -0.1335062087, 0.0102538764, 0.1772879213, -0.0072266436, 0.0163612273, 0.1366707236, 0.2723226547, 0.1299424767, 0.5037113428, 0.3426887095, -0.2014468312, 0.3047897816, 0.3386515379, 0.3808410168, 0.499655962, 0.4813929796, -0.0260891486, -0.1911639422, 0.581720829, 0.0361271389, -0.0280091744, -0.2036753595, -0.3807861209, 0.1567305773, 0.4856581986, -0.2559434772, -0.66003865, -0.4705186486, 0.0994573757, -0.2843773365, -0.1884533763, -0.1961779743, 0.4040837884, -0.0619082041, -0.0100463135, -0.2337230891, -0.085089162, 0.2030261904, 0.1202187985, 0.5472027063, -0.200703606, 0.2139022946, 0.0618339665, -0.1964245588, -0.0501444452, -0.2513431013, 0.1982957721, 0.1462723613, 0.1533989012, -0.1464243233, -0.0554306842, 0.0358225331, 0.2769577503, 0.3060526252, -0.0804548636, -0.1082587987, -0.261829406, -0.091894187, -0.0831923485, 0.146903798, 0.0197888892, 0.2458152175, 0.2622637749, 0.0032121551, 0.3767154217, -0.0831515193, -0.4829545617, 0.5400190949, -0.0798432827, -0.1844706833, 0.0166599657, -0.1186084226, -0.0216395855, -0.0099639799, 0.1242486387, -0.1875852644, 0.0789722875, -0.1136771739, 0.0045648203, 0.0730933324, -0.0961932316, 0.3804773092, 0.2330142856, -0.004136418, -0.0311320387, -0.1038938984, -0.0761066079, 0.3563047349, 0.0114583774, -0.312594682, 0.2468476892, -0.2488931715, 0.1981738359, -0.2102049887, 0.0347835645, 0.1707413793, -0.0479497649, 0.2335940152, -0.1842189133, 0.0526870377, 0.0468662642, 0.0510807782, -0.2296123207, -0.084722124, -0.0553178824, -0.1274139285, -0.3076141179, -0.0074043632, -0.3845645785, -0.3234859705, -0.3623290956, 0.3362719715, 0.1467136592, -0.0148568479, 0.0895835832, 0.1612402201, -0.1204106957, -0.1194281653, 0.3341802955, 0.1501197815, -0.3646391332, -0.2879036367, 0.1363933533, 0.0274318941, 0.130415529, 0.2103500664, 0.0395958312, 0.1638568938, 0.2064767033, -0.069935292, -0.1187321171, -0.4139878452, -0.1851712018, -0.0824121162, -0.0383957028, -0.0672680289, -0.0235430077, 0.4471973479, -0.0290769469, -0.2683321238, -0.0834476277, 0.0239268653, -0.0027648602, -0.0937339067, -0.0517459027, 0.0094914529, -0.1063964814, 0.5546261668, -0.0790552571, 0.0317619815, -0.0460540503, -0.1878688186, -0.1235043034, -0.0379969403, 0.1124467701, -0.0244039297, 0.4308759272, 0.4505263269, -0.0841157958, -0.3351358473, -0.4225292206, 0.0643080249, 0.3131961524, 0.1518680155, 0.2139701843, -0.3543727398, -0.2606376112, -0.1056090519, -0.1188810542, -0.003225076, -0.1172124967, 0.1667601764, 0.21048522, 0.0392618775, -0.3519262969, -0.1949400157, 0.0344018415, 0.2529695928, -0.0170261469, 0.1207968891, 0.1968994141, 0.0700705051, -0.2180459201, 0.5762589574, 0.0122704878, -0.0774032548, 0.2291520387, 0.2382851243, -0.0247947238, -0.082715027, 0.1057936922, 0.3093138635, 0.4576765299, -0.1437066793, 0.1279942691, -0.3059831858, 0.0114492942, -0.1778568774, -0.1341263652, 0.0533384979, 0.1222601905, 0.1460711807, -0.3488899469, -0.1220631152, -0.0647724867, 0.1816108823, -0.1966081709, 0.0349036902, -0.0665331185, 0.1509810984, 0.4198544323, 0.0485272296, -0.1534424573, 0.3250513077, -0.0170397386, -0.3731518388, 0.1307832003, 0.1720673442, -0.4888529778, 0.2132398933, -0.0017559632, 0.3827132881, -0.0193846412, 0.0638611615, 0.2843585908, 0.0112366099, -0.0600267276, 0.060033679, -0.1200996935, 0.3133029044, 0.0610035285, 0.0473007001, 0.0482839756, 0.1464208364, 0.156934306, 0.0194784105, -0.0098285805, -0.0560708418, -0.2550227046, -0.0708104894, 0.2456014007, -0.0945198685, -0.2045023292, -0.6011889577, -0.4497776628, -0.2454850376, 0.0487111583, -0.1344197541, -0.1453189105, 0.1909581423, 0.1226613298, 0.4898835123, -0.3512582481, -0.2254018486, 0.1413588673, -0.1690037698, 0.1628852636, -0.1073579043, 0.1542330831, -0.1214861125, 0.4159196317, -0.1388187706, 0.1517220289, -0.1876494586, -0.5756070614, 0.063646473, -0.4807730913, 0.1864725351, 0.2330859452, -0.2272553593, 0.3000869453, -0.2512018085, 0.0596797131, 0.1218447015, 0.1086959392, -0.2782357931, -0.1743098497, 0.0284926221, -0.3839600086, 0.1303287894, -0.4349295497, -0.1555611789, 0.3866903782, 0.1300320625, 0.0219937433, 0.2576770484, -0.2734603584, 0.1378860772, -0.0586664751, 0.0084960088, -0.0351492763, -0.5451734662, 0.4454016685, -0.0228167139, 0.0330390669, 0.1718705148, -0.1100521758, -0.0759961009, -0.0923955068, -0.1332693845, -0.3692466617, 0.0426125713, -0.0050610113, 0.3581796587, 0.3633761108, 0.049886778, 0.0678376257, 0.1727569103, -0.1507345736, -0.3482176363, 0.109635286, -0.0155548574, 0.2649584115, -0.1149395928, 0.1408981383, -0.2226189524, 0.6270326972, 0.176966846, -0.234568432, 0.1262999177, 0.2979916334, 0.2040142715, 0.268447876, 0.0368236527, 0.1379389316, 0.0083835172, 0.1878977865, 0.1212025955, 0.257075429, 0.3262633979, 0.0405184813, 0.1368396729, 0.0201741494, 0.057170283, -0.0872630104, 0.1436318606, 0.271271944, -0.2260146141, -0.3325643837, -0.447147876, 0.0698932931, -0.1096522808, 0.1832591295, 0.2942574024, 0.2618866563, -0.6611452699, -0.0527036823, -0.3960132897, 0.1748717725, 0.2447992116, -0.3084751666, 0.0568711199, -0.1571286768, 0.0546978638, 0.0243415888, 0.268718183, -0.3838987947, -0.3637041152, -0.0688951239, 0.0773934796, -0.0373581462, 0.0751034021, -0.0106499493, -0.3649799228, 0.1830195934, 0.3641940951, -0.5304684043, 0.045203045, 0.3095270097, 0.05914893, -0.0988950357, -0.1686681509, -0.2364960015, -0.4657750428, -0.2433307618, -0.0507248193, 0.1441116333, -0.0580592826, 0.1163626611, -0.0124947606, 0.037709184, 0.0951123983, 0.3177093267, 0.1828721315, -0.1146073043, 0.5422515869, 0.2085556984, 0.4471333027, -0.050990019, 0.5076364875, 0.5242840052, -0.377145201, -0.4337597787, -0.2176911831, -0.2883629501, 0.5144398212, -0.0313568152, 0.3144395053, 0.1530525833, 0.08465904, 0.1049329787, -0.5463406444, 0.3300388753, 0.086114563, 0.1523803622, -0.328134656, -0.435492903, 0.6497976184, 0.1358160526, -0.1339676827, -0.0957172513, 0.5035575032, -0.195779711, -0.0542916469, 0.3126243651, 0.9838211536, -0.2847191393, 0.336144805, 0.0421895273, 0.1361601353, 1.0483943224, -0.0625780374, -0.2609398663, 0.0118769677, -0.1134010032, -0.1125743315, -0.0819377229, -0.0747893974, -0.0406229645, -0.1220683381, 0.1819447875, -0.129168421, -0.0067713619, -0.053292457, -0.1155592501, 0.283118546, -0.3984209895, -0.0422258712, 0.0064978101, -0.2303172648, 0.0134918131, -0.2043283433, -0.1657583266, -0.1504693776, 0.2722949982, -0.0898273438, -0.1634230018, 0.0383805409, -0.4214063585, 0.0512670875, -0.0482462794, 0.2185050249, -0.1262952983, 0.7867926359, -0.0273046754, -0.0350664221, 0.0809141025, -0.2605222464, 0.0955460966, -0.1866037548, -0.2229930907, 0.1329691261, 0.103650026, -0.3126797676, 0.024966538, 0.2777661085, -0.2456263453, -0.3948040605, -0.2721704841, 0.141869843, -0.1429702044, 0.2579843104, 0.5297656655, 0.2009955794, -0.1535037309, -0.0071224365, 0.2283547223, -0.1628367007, -0.0830905363, -0.3562008142, 0.1110171452, -0.2488142252, -0.1822175086, -0.0937632546, -0.0923339054, -0.0918207839, 0.1986858249, -0.0517796576, 0.0627987385, -0.1350750178, 0.0867515802, -0.3095859885, -0.1989091486, 0.2536411583, -0.5064382553, -0.3839592636, 0.3182437122, 0.4344846904, -0.3665499985, 0.1841073334, 0.099557817, -0.5240020752, 0.1594323218, -0.0566582792, 0.2099517137, -0.0559373125, 0.3442658484, -0.1018176377, 0.304281354, -0.1520160437, -0.1078564599, -0.0911136642, -0.0349742696, 0.2185707241, 0.0066313804, 0.1537868977, -0.0997632667, -0.1474540979, 0.0516325794, -0.0515035689, 0.0500357859, -0.3707666993, 0.2346186042, 0.3052383661, -0.4240824282, 0.1333967894, 0.092096597, 0.0870786086, -0.1338678151, 0.311467737, -0.1317246109, 0.0855243057, 0.3123396635, -0.1351479292, 0.3421087563, -0.0184534844, 0.2410947382, 0.3581305444, 0.2474867851, 0.2924285531, -0.0333468206, 0.0091082659, -0.1073801741, -0.1162344888, 0.2303810567, 0.2635425925, -0.1329413652, 0.2961376011, 0.0176960919, 0.0926958099, 0.313485831, 0.2257470936, 0.108360149, -0.1284770519, 0.1317340285, 0.2081292868, 0.075014852, -0.0244702119, -0.1884944439, 0.0053491676, 0.0648608804, 0.1536206752, 0.3775360286, 0.2366762012, 0.4687486589, -0.0074421037, -0.0442515798, 0.2752282619, 0.1589069068, 0.0878037736, 0.0405058376, -0.0363950729, 0.1538603753, 0.4635968506, 0.4276757538, 0.0430367179, -0.031520389, 0.142085731, 0.5564658642, -0.0167645793, -0.0514043719, 0.149833709, 0.0308406092, 0.2447380573, 0.2975251973, 0.2078221142, 0.0666145012, 0.0108240936, 0.0854117796, -0.3406425118, -0.2226178795, -0.0471164584, 0.423878938, 0.1994224042, -0.3127708733, -0.2827528119, 0.0637792647, -0.0132114701, -0.154759407, 0.0589313358, -0.7018325329, 0.3001566231, -0.0447960384, 0.1599147171, -0.4526434541, -0.5470300913, 0.3091585934, 0.3365089893, 0.0706115589, 0.1328465939, 0.4084152877, -0.148955062, 0.1680804789, 0.2040939629, 0.1232495904, -0.2361435145, -0.041145239, 0.4352782667, -0.3590354621, 0.1281315833, 0.0861172602, 0.0697083548, -0.163410306, 0.0828655437, 0.1794779748, 0.0074131787, 0.0095493961, -0.1601141244, -0.3326461911, 0.0501828566, -0.2415522188, 0.4797547758, -0.3484769166, -0.1995494366, -0.1394897401, 0.3175760508, -0.3148475587, 0.4054407477, 0.4090916514, -0.0522531644, -0.078952089, -0.136701569, -0.0390763581, -0.0270057898, 0.2926072776, 0.3595174253, 0.3388389647, -0.1954763085, 0.0177003872, -0.3608803153, 0.0704913363, 0.0115093784, -0.5107099414, -0.0568261594, -0.2980890572, 0.4002338946, -0.1214182451, -0.1359262168, -0.2043281794, 0.0047959331, -0.3248299956, -0.1442601085, 0.0766165033, -0.3093498647, 0.2042372823, 0.1153708622, 0.1524991244, -0.1460662931, 0.3247855008, -0.1544344276, -0.0842669755, 0.2609606385, -0.2007670552, -0.0252758563, 0.1296454072, -0.0191542171, 0.4863823056, 0.1082793027, -0.2453234941, 0.0161080062, -0.089029111, -0.3318751454, -0.0126883611, -0.4134606719, 0.2549859583, -0.2719509304, -0.0313542597, -0.2527204454, 0.1063455343, 0.1150478646, 0.0308026318, -0.3354078233, 0.4304690957, -0.2455371916, -0.2542997003, 0.571205914, 0.2878659368, 0.1374260634, 0.0928031951, -0.0813295245, -0.0595384985, 0.3417319655, -0.0514125675, -0.0964719504, 0.0206323415, 0.1394738853, 0.3758436739, -0.1184827089, -0.8774784207, 0.1891067326, 0.2884033918, 0.0653264076, -0.5017672181, 0.2753758729, -0.0326776952, -0.422531873, -0.0748914331, 0.2685989439, -0.274988085, -0.0157777779, 0.0272684358, -0.174765259 ]
https://github.com/huggingface/datasets/issues/723
Adding pseudo-labels to datasets
A new configuration for those datasets should do the job then. Note that until now datasets like xsum only had one configuration. It means that users didn't have to specify the configuration name when loading the dataset. If we add new configs, users that update the lib will have to update their code to specify the default/standard configuration name (not the one with pseudo labels).
I recently [uploaded pseudo-labels](https://github.com/huggingface/transformers/blob/master/examples/seq2seq/precomputed_pseudo_labels.md) for CNN/DM, XSUM and WMT16-en-ro to s3, and thom mentioned I should add them to this repo. Since pseudo-labels are just a large model's generations on an existing dataset, what is the right way to structure this contribution. I read https://huggingface.co/docs/datasets/add_dataset.html, but it doesn't really cover this type of contribution. I could, for example, make a new directory, `xsum_bart_pseudolabels` for each set of pseudolabels or add some sort of parametrization to `xsum.py`: https://github.com/huggingface/datasets/blob/5f4c6e830f603830117877b8990a0e65a2386aa6/datasets/xsum/xsum.py What do you think @lhoestq ?
65
Adding pseudo-labels to datasets I recently [uploaded pseudo-labels](https://github.com/huggingface/transformers/blob/master/examples/seq2seq/precomputed_pseudo_labels.md) for CNN/DM, XSUM and WMT16-en-ro to s3, and thom mentioned I should add them to this repo. Since pseudo-labels are just a large model's generations on an existing dataset, what is the right way to structure this contribution. I read https://huggingface.co/docs/datasets/add_dataset.html, but it doesn't really cover this type of contribution. I could, for example, make a new directory, `xsum_bart_pseudolabels` for each set of pseudolabels or add some sort of parametrization to `xsum.py`: https://github.com/huggingface/datasets/blob/5f4c6e830f603830117877b8990a0e65a2386aa6/datasets/xsum/xsum.py What do you think @lhoestq ? A new configuration for those datasets should do the job then. Note that until now datasets like xsum only had one configuration. It means that users didn't have to specify the configuration name when loading the dataset. If we add new configs, users that update the lib will have to update their code to specify the default/standard configuration name (not the one with pseudo labels).
[ 0.2998084128, -0.1344269961, 0.1064767614, -0.0421034507, 0.1416294426, 0.0385906808, 0.3353702426, -0.0611249581, -0.1213261262, 0.0122371726, -0.2308754325, 0.1057623699, -0.1279499233, 0.5004863739, 0.4318873882, -0.0726465881, 0.3291834891, -0.1554973423, 0.2026747018, -0.1546932012, -0.3575718105, -0.273748368, 0.2698327601, -0.1786538363, -0.3203118742, -0.1530623585, -0.149909243, -0.024425583, 0.1104238778, -0.5956421494, 0.03784642, 0.4156607687, 0.2552714348, 0.5836081505, -0.0001237342, -0.089877151, -0.1095680445, -0.1492247134, -0.1526645422, 0.1862166822, -0.0167718641, -0.270573169, -0.1030806005, 0.1222246885, -0.1497651041, -0.3686207831, -0.0767854825, -0.0310837608, 0.151106298, -0.0925191045, 0.0303301904, 0.1451058686, 0.1626514792, 0.1272767484, 0.3680982292, 0.2810040712, -0.2382878661, 0.3393152058, 0.281057626, 0.4066391587, 0.4596782923, 0.495606333, -0.0231238678, -0.0686174035, 0.5873852968, 0.0751344562, 0.000565874, -0.1729782224, -0.3276819885, 0.239690274, 0.4566646218, -0.3164327443, -0.6837276816, -0.5047789812, 0.1867569238, -0.3624065816, -0.0957859159, -0.2155634612, 0.3606553078, -0.034691494, 0.031415578, -0.2650184631, -0.0182420388, 0.1895076931, 0.0594545342, 0.5780057311, -0.1692249775, 0.2320204228, 0.0101038795, -0.266759336, -0.0918958709, -0.2660844028, 0.1848728806, 0.0811001807, 0.1097538918, -0.1387264729, -0.1134846359, -0.0457391217, 0.2438459545, 0.2950545549, -0.0437585488, -0.0620149635, -0.2086886615, -0.1097076386, -0.103572011, 0.1209541559, 0.087491259, 0.2561558485, 0.2847910225, 0.0440343991, 0.3656741679, -0.0779901594, -0.4416407645, 0.5037556887, -0.1021511033, -0.1318588257, 0.077978313, -0.0652203262, 0.0415388606, -0.0243342128, 0.1696673334, -0.2140190005, 0.0382403322, -0.078593649, 0.0153715024, 0.0808276013, -0.0493979715, 0.334574163, 0.1719157845, 0.0234977305, -0.0198374353, -0.1612988859, -0.0988189727, 0.3643388152, 0.0371232256, -0.3528377414, 0.2718881071, -0.2289153785, 0.1966087371, -0.2133773267, 0.0106294211, 0.216099292, -0.0613003001, 0.2263831645, -0.2178617418, 0.1044051275, 0.0036460848, -0.0238877218, -0.2566463649, -0.1206151918, -0.095330216, -0.0889451057, -0.3241752386, 0.0147484904, -0.4072446823, -0.303271383, -0.3384976089, 0.3656529188, 0.1131782904, -0.0525874607, 0.0730778351, 0.1723833978, -0.0328397118, -0.1349071115, 0.2840850353, 0.2005075514, -0.3355904222, -0.3381417394, 0.1224142313, 0.056646429, 0.0789860934, 0.1605285704, 0.0321433209, 0.0978842899, 0.220655039, -0.0889735445, -0.0675246269, -0.3826145232, -0.1448276639, -0.0675379857, -0.0896224305, -0.0237174053, 0.0551168025, 0.4480417967, -0.0472853445, -0.2814718783, -0.1423391104, -0.0717053115, 0.0374271907, -0.0787703395, -0.033207044, -0.0672873408, -0.1441836804, 0.428765893, -0.0894118249, 0.0541011468, -0.0772447288, -0.1134880409, -0.074760586, -0.0645027831, 0.101748012, -0.011480771, 0.4220193923, 0.4557923675, -0.0916470215, -0.2570296824, -0.481033206, 0.1187710091, 0.3459647, 0.1877481937, 0.2587982118, -0.3725941777, -0.2178402841, -0.1814524829, -0.1556060761, -0.0693743825, -0.1133409142, 0.250172019, 0.170545876, -0.0530528314, -0.3825322092, -0.1964839846, 0.0427179486, 0.2877757847, -0.1020272225, 0.0700212792, 0.1953104883, 0.0370661393, -0.2225670516, 0.4910913706, 0.0013809216, -0.1018631309, 0.1985343546, 0.3084602952, -0.0033228269, -0.071301043, 0.0395374596, 0.3227551281, 0.479121387, -0.0398231223, 0.1532623321, -0.2845877111, -0.0183799658, -0.0789751634, -0.1487844437, 0.0462144725, 0.2128415704, 0.1702634841, -0.3061312437, -0.1273020059, -0.0200700611, 0.1623201519, -0.2193686664, -0.0518596657, -0.0748730153, 0.181813255, 0.4083225131, 0.0816130489, -0.2233511955, 0.2831477523, 0.0431269705, -0.3308480978, 0.0959244892, 0.1368112266, -0.4195856452, 0.2700432241, 0.0196659435, 0.437004745, -0.0176326111, 0.0807091817, 0.2086808234, 0.0106298011, -0.10435085, 0.0108248871, -0.1265755594, 0.2933962941, 0.100474, 0.0300721489, 0.0111524798, 0.1413503885, 0.1606978178, -0.077359505, 0.0576365143, -0.1008786932, -0.2513286471, -0.102058962, 0.1794403791, -0.0913674012, -0.3065831959, -0.5622992516, -0.5115969181, -0.2192707658, 0.0635913685, -0.1512477845, -0.2140169144, 0.3226278126, 0.0542419814, 0.3781419992, -0.350831151, -0.2711753845, 0.168088913, -0.1181779951, 0.1399009228, -0.123668462, 0.0609188899, -0.2141327411, 0.418808192, -0.1850166619, 0.1274846047, -0.2075189501, -0.5780904293, 0.103936784, -0.482378304, 0.220402807, 0.2675940096, -0.183357507, 0.3257481754, -0.2888326943, 0.1066212207, 0.133020103, 0.1489216685, -0.3089151978, -0.1425169408, 0.0886036977, -0.3205435574, 0.0195568185, -0.3618175387, -0.1463156343, 0.3072497547, 0.1251452714, 0.0840292424, 0.3436689675, -0.2473947555, 0.0715098232, -0.0873198286, 0.0665148199, -0.0324893035, -0.5351749659, 0.3863257766, -0.0446911491, 0.1066344976, 0.1578732878, -0.1220843866, -0.0349110253, -0.0149168381, -0.0934660956, -0.4165669382, 0.055048462, 0.0668339506, 0.3598325551, 0.3506227136, 0.0857240707, 0.1384339333, 0.1219526529, -0.1305478811, -0.4114060998, 0.138179183, -0.0073748087, 0.2347895652, -0.0767002329, 0.1047660559, -0.2347688675, 0.6055541635, 0.137882486, -0.2848439217, 0.1233671084, 0.2139333487, 0.2773599923, 0.2527816296, 0.0802338868, 0.1231471673, 0.0979403555, 0.1768228114, 0.1326759011, 0.2246925533, 0.3301960528, 0.0223204866, 0.2020406574, 0.0368255265, -0.0451366268, -0.0612310879, 0.0891548321, 0.2640229166, -0.1869101226, -0.1962650269, -0.4515401721, 0.0963483006, -0.1350035369, 0.2445068806, 0.1784921587, 0.2270116806, -0.6722141504, -0.0581220761, -0.373331964, 0.1896590292, 0.2063451558, -0.2074153125, 0.0756509304, -0.1758773327, 0.0184060354, 0.0383831076, 0.2505621612, -0.379057765, -0.3750825226, -0.0604161806, 0.1172765866, -0.0674982816, 0.0474803783, 0.0205091778, -0.3828159869, 0.2052792162, 0.3741311431, -0.5892175436, -0.0659435391, 0.3306910098, 0.092789948, -0.1313438267, -0.2216570079, -0.2396980822, -0.4524116218, -0.2524760962, -0.1162350774, 0.0258924942, -0.0764977261, 0.1203002855, 0.0198929869, 0.0247088615, 0.0644341111, 0.3508711457, 0.2437825501, -0.0878821015, 0.5968900323, 0.1840089411, 0.4270556569, 0.0044477922, 0.5245035291, 0.5270327926, -0.4492976964, -0.4075216353, -0.2239105552, -0.2210034579, 0.4601718783, 0.0576398447, 0.317401439, 0.1746520251, 0.1301117837, 0.1193815619, -0.5778488517, 0.3765327632, 0.0762029439, 0.131757468, -0.3012313545, -0.5492859483, 0.6775779724, 0.1472241879, -0.1553730518, -0.0644811317, 0.5425696373, -0.2256022543, -0.0472149327, 0.3019177318, 0.9438104033, -0.3285493851, 0.297395438, 0.0565994717, 0.1290179491, 1.0668781996, -0.0426606983, -0.2235747576, 0.0169679727, -0.0606754571, -0.0645462275, -0.0610055514, 0.0100097572, -0.0399788879, -0.0866565555, 0.2626315355, -0.1319754273, -0.0048605646, -0.0524096452, -0.0074080741, 0.1156437993, -0.4434280694, -0.0620699786, -0.0200741347, -0.3278386295, 0.0460786857, -0.1779174358, -0.1064755768, -0.138446182, 0.1808557063, -0.0782789737, -0.2005704641, 0.0090068504, -0.4644104242, 0.0459140316, -0.0538136363, 0.1084046289, -0.1514494866, 0.7425774932, 0.0360546112, -0.0078963349, 0.0601476133, -0.2602534294, 0.0951505974, -0.203208372, -0.2163183838, 0.1532933414, 0.1491841525, -0.3035728037, -0.0210449994, 0.2473722398, -0.1629264951, -0.3291382492, -0.3351071179, 0.1814853549, -0.1905628592, 0.3235604763, 0.4867150486, 0.2079120278, -0.1768244207, -0.0023309942, 0.1727013588, -0.1673435867, -0.0578974709, -0.318595767, 0.0766083375, -0.2999002635, -0.180229798, -0.1048278362, -0.0745196268, -0.0544161685, 0.1132206246, -0.010780137, 0.0677028522, -0.1136699095, 0.0543844998, -0.3007854223, -0.2121465951, 0.2832658887, -0.5372552872, -0.3484556079, 0.3236200809, 0.4322235584, -0.3114254475, 0.1920561194, 0.1686388403, -0.4940829277, 0.1778880805, -0.0366949774, 0.2591642737, -0.0096711786, 0.4078371525, -0.1230254769, 0.2761676311, -0.1747024953, -0.1363597065, -0.0695874691, 0.0363729522, 0.1963929832, 0.0861261263, 0.1853116602, -0.0782122537, -0.1013666093, -0.0254175868, -0.0959807932, 0.05367174, -0.408713311, 0.2254896611, 0.2022176683, -0.3918565512, 0.0987537429, 0.0750088021, 0.094620727, -0.1908843666, 0.3108456433, -0.0324765816, 0.0353289396, 0.3759315908, -0.1677111089, 0.2833203077, 0.0218124297, 0.2113076001, 0.3199461401, 0.2520156801, 0.2788860798, -0.0036714121, -0.0880028382, -0.0903638974, -0.0697050691, 0.2032179981, 0.1966567189, -0.0789695457, 0.193989411, 0.019747844, 0.0650335178, 0.3351964355, 0.2463514954, 0.1834523678, -0.138452962, 0.0547075868, 0.2898480296, 0.0893732384, -0.0177551322, -0.1585974544, 0.0265493188, 0.0859431326, 0.2274187654, 0.4988341033, 0.2685058117, 0.3956283033, -0.0129987849, -0.0677449182, 0.2840413749, 0.0716923401, 0.1701557636, 0.0837532878, -0.0594905801, 0.1950878054, 0.5000243187, 0.4496957064, 0.0386445448, -0.0388262235, 0.1041431203, 0.5346740484, -0.0056029134, -0.0620781146, 0.1263549775, -0.0043648132, 0.2718455195, 0.2628069818, 0.1722573042, 0.1215166003, 0.0264299866, 0.0776844397, -0.3849413097, -0.1851020455, -0.0095242411, 0.3350856304, 0.1930453926, -0.3616015017, -0.2882716954, 0.0896723121, 0.0271636583, -0.1577624381, 0.0481803119, -0.7170669436, 0.3460786045, -0.051770106, 0.2031665593, -0.5002552867, -0.4857997298, 0.2336295247, 0.3497900069, 0.0259190071, 0.1968865395, 0.4087083042, -0.1984280646, 0.2039636672, 0.2398052514, 0.1072587371, -0.2287326902, 0.065377079, 0.4185301065, -0.2756540179, 0.1485028565, 0.0549342334, -0.0024056789, -0.1555737704, 0.0931706876, 0.2085334361, 0.0101443501, -0.006374456, -0.1862781197, -0.3286515474, 0.0274995882, -0.2652024329, 0.4785494804, -0.2938705683, -0.1582932174, -0.0565156415, 0.3390564024, -0.3580414355, 0.4116490781, 0.443757236, -0.0325083397, -0.1012703553, -0.1758370548, -0.025127776, 0.002725699, 0.2918703556, 0.275559783, 0.2722046971, -0.2335118055, 0.0860364512, -0.3426699936, 0.0365581326, -0.0267137997, -0.5635900497, -0.1061022878, -0.3014020026, 0.3944292068, -0.1160803139, -0.1211904734, -0.2254064083, 0.0692922994, -0.224791646, -0.1723794937, -0.0211837031, -0.2945219576, 0.2290800512, 0.1749407053, 0.1203295365, -0.1489343047, 0.2933545709, -0.1696757078, -0.0576499291, 0.2612988055, -0.0561525896, -0.0316386223, 0.1851319522, 0.0004078726, 0.4343343973, 0.0401109718, -0.3034464121, -0.0748710558, -0.0829512626, -0.3774101138, -0.014411537, -0.3562152088, 0.2779450715, -0.2749112844, 0.0190287661, -0.3525391519, 0.09709993, 0.0886841118, 0.0865050852, -0.2903698385, 0.4144822657, -0.1972636282, -0.2823800147, 0.5451181531, 0.3401220739, 0.1585600823, 0.1627669334, -0.0933097228, -0.1237035692, 0.4480283558, -0.0308440998, -0.0846612826, 0.0062059411, 0.1697439104, 0.4019328058, -0.0590478517, -0.844029963, 0.2708308101, 0.3358243704, 0.0583689883, -0.5356234312, 0.2374905199, -0.1027967706, -0.4529282153, -0.0601693876, 0.3132776618, -0.2470306456, -0.0735245571, -0.0563192442, -0.1896903813 ]
https://github.com/huggingface/datasets/issues/723
Adding pseudo-labels to datasets
Oh yes why not. I'm more in favor of this actually since pseudo labels are things that users (not dataset authors in general) can compute by themselves and share with the community
I recently [uploaded pseudo-labels](https://github.com/huggingface/transformers/blob/master/examples/seq2seq/precomputed_pseudo_labels.md) for CNN/DM, XSUM and WMT16-en-ro to s3, and thom mentioned I should add them to this repo. Since pseudo-labels are just a large model's generations on an existing dataset, what is the right way to structure this contribution. I read https://huggingface.co/docs/datasets/add_dataset.html, but it doesn't really cover this type of contribution. I could, for example, make a new directory, `xsum_bart_pseudolabels` for each set of pseudolabels or add some sort of parametrization to `xsum.py`: https://github.com/huggingface/datasets/blob/5f4c6e830f603830117877b8990a0e65a2386aa6/datasets/xsum/xsum.py What do you think @lhoestq ?
32
Adding pseudo-labels to datasets I recently [uploaded pseudo-labels](https://github.com/huggingface/transformers/blob/master/examples/seq2seq/precomputed_pseudo_labels.md) for CNN/DM, XSUM and WMT16-en-ro to s3, and thom mentioned I should add them to this repo. Since pseudo-labels are just a large model's generations on an existing dataset, what is the right way to structure this contribution. I read https://huggingface.co/docs/datasets/add_dataset.html, but it doesn't really cover this type of contribution. I could, for example, make a new directory, `xsum_bart_pseudolabels` for each set of pseudolabels or add some sort of parametrization to `xsum.py`: https://github.com/huggingface/datasets/blob/5f4c6e830f603830117877b8990a0e65a2386aa6/datasets/xsum/xsum.py What do you think @lhoestq ? Oh yes why not. I'm more in favor of this actually since pseudo labels are things that users (not dataset authors in general) can compute by themselves and share with the community
[ 0.2814159393, -0.0320713893, 0.0793316513, -0.0085590864, 0.0833108276, 0.0303216875, 0.3540935218, -0.1127623767, -0.1846269518, 0.0258007497, -0.2245691568, 0.0616266653, -0.1164304316, 0.5070895553, 0.459064275, -0.0578460135, 0.299020946, -0.1764773875, 0.2383633554, -0.1696522087, -0.3217113018, -0.3061877787, 0.2590851188, -0.1265664548, -0.301304996, -0.1725135297, -0.1364625096, -0.0555801168, 0.072270751, -0.5509163737, 0.0033324871, 0.3938508034, 0.2134949267, 0.6353232861, -0.000124414, -0.1101551205, -0.1351693869, -0.091316022, -0.1328717023, 0.1952456534, -0.024194682, -0.2377731055, -0.2085630596, 0.1316627711, -0.1162410006, -0.3956460059, -0.1321437806, -0.0004316934, 0.1173863485, -0.0123413987, 0.026737703, 0.1343831718, 0.2572759986, 0.1317083389, 0.4373752177, 0.3451999128, -0.240969345, 0.3131235242, 0.2690952718, 0.4111147523, 0.4979707301, 0.4555451274, 0.0043595675, -0.1650131494, 0.5459336042, 0.0560601987, -0.0244430397, -0.1503380537, -0.3245472312, 0.1916166842, 0.5204408169, -0.2745697498, -0.7477307916, -0.4786068499, 0.1339403093, -0.2930113077, -0.168170929, -0.1566390097, 0.3763651848, -0.0557195619, 0.0327076837, -0.2535894215, -0.0172958411, 0.1539382339, 0.0945213214, 0.5230645537, -0.1751053333, 0.2421140522, 0.0016060716, -0.2349188328, -0.059518978, -0.2889635265, 0.1365660429, 0.0885231793, 0.1371404976, -0.1648372114, -0.0790541396, -0.025063619, 0.2834424973, 0.2805245519, -0.001930288, -0.1625100076, -0.2505150139, -0.1046127379, -0.0205005463, 0.099494651, 0.0174179059, 0.3107477129, 0.2868222892, -0.0311153755, 0.3509351909, -0.1240790039, -0.4875077307, 0.5173029304, -0.0417707339, -0.1651957184, 0.0297071803, -0.1252251416, -0.0369140841, -0.004920566, 0.1060513183, -0.1697646528, 0.061437659, -0.0727175698, 0.0455630682, 0.0100790979, -0.1098933145, 0.3468414247, 0.2264734656, -0.0099693993, -0.0446697026, -0.1268307269, -0.084992215, 0.3702797294, -0.0208648108, -0.3191277981, 0.2367657721, -0.2677617073, 0.2227563858, -0.2555195093, 0.0397371873, 0.1664509326, -0.0787944198, 0.2072921246, -0.1710774899, 0.1300289333, -0.0064155129, -0.0165121015, -0.2232582122, -0.075565584, -0.0772995874, -0.0885616839, -0.3378318548, 0.016343018, -0.3694381714, -0.317804724, -0.4057458043, 0.2678419352, 0.1626000404, -0.0445061624, 0.1314776689, 0.1778279841, -0.0925154537, -0.1411686093, 0.3071727753, 0.1757804155, -0.3151316941, -0.2468123585, 0.0979713127, 0.070853278, 0.1062213331, 0.2732609212, 0.027360443, 0.1782806665, 0.191038996, -0.0352517478, -0.0270007402, -0.3939894736, -0.1756525785, -0.0302182715, -0.0872521922, -0.1030463874, 0.0150573691, 0.4775818586, -0.0071325842, -0.3312188685, -0.0948219746, -0.0311433561, 0.0078072259, -0.0605017468, -0.0415952951, 0.0101686586, -0.0982991382, 0.4570450783, -0.1014260277, 0.0463858806, -0.0321485661, -0.1647462845, -0.0758877844, -0.050092604, 0.0503237285, -0.0062795831, 0.4870736301, 0.4675253332, -0.138830781, -0.3249926269, -0.3900243938, 0.0731933042, 0.3471090794, 0.1582395285, 0.2516157329, -0.4307460189, -0.2431634665, -0.1022992879, -0.1021445468, -0.0536686331, -0.113078773, 0.1869274825, 0.2021275163, 0.0301726442, -0.3294790089, -0.1759523898, 0.0199267659, 0.2592221498, 0.0052644736, 0.0779906288, 0.1858627796, 0.063395381, -0.1451583952, 0.5716481805, 0.0037003555, -0.0492232107, 0.2115735412, 0.2514578402, -0.0341299437, -0.1268546283, 0.0779059604, 0.2899094224, 0.4492065609, -0.1023445725, 0.1202340797, -0.3016072512, -0.0062871105, -0.1210775375, -0.1607471108, 0.0325910114, 0.1353399307, 0.1079137623, -0.3179317117, -0.1142707244, -0.0362307839, 0.2148620337, -0.2025920004, 0.0159472506, -0.0470701121, 0.1973655373, 0.4283906817, 0.0691282526, -0.1270359159, 0.3050813973, 0.0148118194, -0.3362830877, 0.1448356807, 0.1154862344, -0.4773353338, 0.264605552, 0.0246777628, 0.396792084, -0.0382047147, 0.0665161535, 0.2858522534, -0.0505743586, -0.0769792497, 0.0505824611, -0.1785833091, 0.2639610469, 0.0444800965, 0.0173523724, 0.0846812427, 0.1115207151, 0.1685484946, 0.0215706043, 0.0050873812, -0.0695073381, -0.257766217, -0.0902423188, 0.3064966202, -0.1113593131, -0.2288331985, -0.5478329062, -0.477070123, -0.2435190976, 0.0457400158, -0.1163430586, -0.1515194327, 0.2037444413, 0.0828666314, 0.3769291341, -0.3681285977, -0.234116599, 0.2060318589, -0.1579405367, 0.1751887202, -0.1088227183, 0.1013142318, -0.1739377975, 0.4595063627, -0.0909389704, 0.157600224, -0.2395854592, -0.5610397458, 0.0532134697, -0.4868709445, 0.126297161, 0.2272780389, -0.2064220309, 0.3010926545, -0.2319122851, 0.1144014224, 0.0976798311, 0.1071136668, -0.3073494732, -0.0991425961, 0.0282772724, -0.3704605103, 0.1602453589, -0.3832559884, -0.1707059145, 0.36193344, 0.1385252178, 0.0145236189, 0.2654289305, -0.2644994259, 0.0720603317, -0.0012258322, 0.0056854426, -0.045701012, -0.5406398773, 0.4097237885, -0.0630017743, 0.045003511, 0.1832071543, -0.0863223597, -0.0787309334, -0.0366437212, -0.0980237946, -0.3702328801, 0.0372951068, 0.0601625815, 0.3296085894, 0.3650108874, 0.0784117356, 0.0801626518, 0.1541107297, -0.1120470166, -0.377705425, 0.1402949393, -0.0060773175, 0.2007027417, -0.1400780529, 0.123765558, -0.2093785703, 0.6475248933, 0.1835403889, -0.2741865218, 0.090975374, 0.2186029404, 0.2789508402, 0.2184008509, 0.0629039928, 0.1245019212, 0.0851546973, 0.1187769324, 0.0922011286, 0.2761642337, 0.3328821957, 0.036304906, 0.1667710096, -0.0027101606, 0.0036800711, -0.0742742047, 0.1283904165, 0.3042137921, -0.2279257476, -0.2393443733, -0.4707077146, 0.0233208649, -0.1196450293, 0.2016665787, 0.2855395973, 0.2183595896, -0.6506950855, -0.0337943397, -0.4541130364, 0.1646953225, 0.2548807561, -0.25150612, 0.0080291601, -0.0985735208, 0.0416143723, 0.0023286347, 0.2471234798, -0.4359415174, -0.3356825411, -0.1177062765, 0.1285507828, -0.0474907644, 0.0873640701, 0.0326301828, -0.3131890893, 0.1383747607, 0.3104919195, -0.59034729, 0.0822378024, 0.3321758509, 0.0320971087, -0.1716782749, -0.2003043741, -0.2402272224, -0.4535845518, -0.2054433376, -0.1358858347, 0.1491917819, -0.0974567905, 0.1312786341, 0.0220571104, -0.0093615996, 0.1175546348, 0.3391138613, 0.188261196, -0.1085174531, 0.5585424304, 0.2293507159, 0.3981236517, -0.0017460444, 0.4851604998, 0.5506291986, -0.3786622584, -0.4305568039, -0.2744673789, -0.297783941, 0.4987260103, -0.0239645354, 0.301517725, 0.1344213337, 0.1156229302, 0.0313125327, -0.5718577504, 0.33172369, 0.1132675037, 0.1221410185, -0.3394649327, -0.5148456693, 0.643489778, 0.1709306091, -0.1328039914, -0.0769740939, 0.5751502514, -0.1831361055, -0.0781724751, 0.3106164634, 0.9312642813, -0.3546269238, 0.3402824402, 0.0096713044, 0.120612815, 1.1054619551, -0.0826205909, -0.2693210244, -0.0225141477, -0.1110869721, -0.0988920107, -0.1021145359, -0.0899724364, -0.019081587, -0.0169625618, 0.2067678869, -0.1112792864, 0.0422422998, -0.0314111896, -0.0288623963, 0.2507328689, -0.3882372081, -0.0254847202, 0.0088858437, -0.2618277967, 0.0024440782, -0.2029460669, -0.1366048604, -0.1641851813, 0.2521754503, -0.1696011126, -0.165490061, 0.0459348634, -0.423836112, 0.0301599763, -0.0661277026, 0.1879515052, -0.1320542693, 0.8199995756, 0.0269339886, -0.0102601182, 0.0369615741, -0.3038389981, 0.1092839092, -0.2030629218, -0.1565512419, 0.0781788379, 0.1217693388, -0.243327722, 0.0456176065, 0.2912815511, -0.2466260344, -0.3772775829, -0.3010877371, 0.1230077967, -0.2192458212, 0.3524188399, 0.526248455, 0.1640691459, -0.1386026442, -0.0056378231, 0.2523896098, -0.164495483, -0.1531696916, -0.3391693234, 0.1415352374, -0.2554899156, -0.1679079533, -0.1020873338, -0.0440893769, -0.1231992468, 0.1124009416, -0.0385665745, 0.0602386482, -0.1376805007, 0.0562336147, -0.3003268242, -0.2097402066, 0.2434343696, -0.5009251833, -0.4061093926, 0.3031411767, 0.4211233854, -0.3773588836, 0.1892690808, 0.1726637334, -0.4455313981, 0.108485125, -0.0434051417, 0.2288217098, -0.0389683843, 0.3678353727, -0.1221151575, 0.2558903396, -0.1640506238, -0.1598452628, -0.0952678472, -0.0218969509, 0.2124328464, 0.0834649652, 0.1798059195, -0.1412160844, -0.125238955, 0.0408812352, -0.0275078248, 0.0482729562, -0.3353329897, 0.2303615659, 0.2928527892, -0.3914381862, 0.1151463389, 0.0627151728, 0.0759788677, -0.1434511095, 0.3050142825, -0.067611523, 0.0672237426, 0.2963533103, -0.1880674958, 0.3651652932, -0.0393467583, 0.2685132027, 0.3243948817, 0.3087013662, 0.3029634655, -0.0125711905, 0.0382776409, -0.0775368437, -0.0944029018, 0.2028938681, 0.212622717, -0.0965497196, 0.2434111983, -0.032730449, 0.0925736353, 0.3101595342, 0.2636580765, 0.1240705177, -0.1384518445, 0.1463161111, 0.2341848612, 0.0929590985, 0.0249174405, -0.1522685885, 0.0213424917, 0.0459069125, 0.2269610912, 0.4519794583, 0.2267322242, 0.4235095084, -0.045736786, -0.0722151101, 0.2700067163, 0.1288207322, 0.0932013243, 0.0590198338, -0.0335599221, 0.1987069249, 0.4678207338, 0.4600563943, 0.0148075614, 0.0027085398, 0.1728650779, 0.5681413412, 0.0498112291, -0.1248595193, 0.1993464679, 0.0748146251, 0.268219471, 0.2298012674, 0.2823825777, 0.0614927076, 0.0262119044, -0.0040477533, -0.4006950557, -0.1534422636, -0.0729165673, 0.3058268726, 0.1598052233, -0.274448365, -0.3161004484, 0.1162029207, 0.0345212221, -0.1704605371, 0.0241408218, -0.7365186214, 0.2727885544, -0.0846394002, 0.2248660773, -0.4340874851, -0.4931130707, 0.2739283442, 0.3674137592, 0.0638419241, 0.1478434354, 0.3270256221, -0.1447974294, 0.167835176, 0.2406978011, 0.1115865707, -0.2690820396, 0.0377586186, 0.4323948026, -0.3454430103, 0.1450860947, 0.0528867133, 0.0522497185, -0.2151184082, 0.0879143029, 0.2273893058, 0.0081381192, 0.0221004691, -0.1368326545, -0.3013672829, 0.0518694036, -0.291800648, 0.4736701548, -0.3938241601, -0.214286387, -0.0800403059, 0.3053120375, -0.2383293808, 0.444070071, 0.4377976954, -0.0314485319, -0.1012362838, -0.1655848324, -0.0306710955, -0.0058882777, 0.261307478, 0.352966398, 0.3276172876, -0.1994429827, 0.0735998973, -0.3824088275, 0.0646591857, -0.080791153, -0.5424757004, -0.1202826053, -0.2737545669, 0.3947318494, -0.0442481712, -0.1000178307, -0.1935767382, 0.0120286234, -0.2517723739, -0.1323551834, -0.0638130158, -0.3120061755, 0.183552891, 0.1365462989, 0.142367065, -0.1529539973, 0.2993768752, -0.1273600161, -0.0680196062, 0.264539212, -0.1696015149, -0.0250621382, 0.1452662498, -0.0240019988, 0.4277551174, 0.1341849566, -0.2914251983, 0.0280222576, -0.0703515634, -0.3189185858, 0.0110619375, -0.3908274174, 0.229315117, -0.2439142913, -0.0141696027, -0.3038209975, 0.0421397611, 0.1075416431, 0.0643726066, -0.2987958491, 0.4347044528, -0.1804735214, -0.2937621474, 0.5569199324, 0.2664338946, 0.1236703694, 0.0532937311, -0.0540953614, -0.0849279091, 0.3328028917, -0.1001132429, -0.0730896518, 0.0278327819, 0.1979802847, 0.3826813996, -0.1051415727, -0.838541925, 0.2493815571, 0.3333536088, 0.044268515, -0.4850106239, 0.221386686, -0.0739432722, -0.4330569804, -0.0398640595, 0.294326514, -0.304584235, -0.0232386645, 0.0507725216, -0.1518713236 ]
https://github.com/huggingface/datasets/issues/723
Adding pseudo-labels to datasets
![image](https://user-images.githubusercontent.com/6045025/96045248-b528a380-0e3f-11eb-9124-bd55afa031bb.png) I assume I should (for example) rename the xsum dir, change the URL, and put the modified dir somewhere in S3?
I recently [uploaded pseudo-labels](https://github.com/huggingface/transformers/blob/master/examples/seq2seq/precomputed_pseudo_labels.md) for CNN/DM, XSUM and WMT16-en-ro to s3, and thom mentioned I should add them to this repo. Since pseudo-labels are just a large model's generations on an existing dataset, what is the right way to structure this contribution. I read https://huggingface.co/docs/datasets/add_dataset.html, but it doesn't really cover this type of contribution. I could, for example, make a new directory, `xsum_bart_pseudolabels` for each set of pseudolabels or add some sort of parametrization to `xsum.py`: https://github.com/huggingface/datasets/blob/5f4c6e830f603830117877b8990a0e65a2386aa6/datasets/xsum/xsum.py What do you think @lhoestq ?
22
Adding pseudo-labels to datasets I recently [uploaded pseudo-labels](https://github.com/huggingface/transformers/blob/master/examples/seq2seq/precomputed_pseudo_labels.md) for CNN/DM, XSUM and WMT16-en-ro to s3, and thom mentioned I should add them to this repo. Since pseudo-labels are just a large model's generations on an existing dataset, what is the right way to structure this contribution. I read https://huggingface.co/docs/datasets/add_dataset.html, but it doesn't really cover this type of contribution. I could, for example, make a new directory, `xsum_bart_pseudolabels` for each set of pseudolabels or add some sort of parametrization to `xsum.py`: https://github.com/huggingface/datasets/blob/5f4c6e830f603830117877b8990a0e65a2386aa6/datasets/xsum/xsum.py What do you think @lhoestq ? ![image](https://user-images.githubusercontent.com/6045025/96045248-b528a380-0e3f-11eb-9124-bd55afa031bb.png) I assume I should (for example) rename the xsum dir, change the URL, and put the modified dir somewhere in S3?
[ 0.3824190199, -0.0590514131, 0.0575784929, 0.0074142446, 0.1342786998, 0.0131382914, 0.2963198125, -0.1217543483, -0.2198836207, -0.0435282253, -0.2787756026, 0.0804837942, -0.0839420632, 0.5122796297, 0.4707954526, -0.0267683174, 0.3672173321, -0.1611521989, 0.1646213979, -0.1702684313, -0.3577934504, -0.2848300338, 0.2717744708, -0.207309708, -0.3152387142, -0.1203105003, -0.2245425433, 0.0721222684, 0.0589685887, -0.5473185182, -0.0266392361, 0.4308968484, 0.2439987957, 0.6618465185, -0.0001245916, -0.1142087504, -0.1561795324, -0.1502090991, -0.182393223, 0.2175576389, -0.0315193832, -0.1962164789, -0.2061664313, 0.1632053256, -0.1114675999, -0.324881345, -0.0985212177, 0.0733945817, 0.1952248961, 0.0326189734, 0.0204023849, 0.1139786914, 0.2299673855, 0.1345407665, 0.4793927073, 0.3306820393, -0.1912674457, 0.349345237, 0.2104493529, 0.3990181386, 0.494325012, 0.4715924561, -0.019140549, -0.1135742739, 0.6187544465, 0.0427599326, -0.0338236988, -0.1695555598, -0.3249829113, 0.1218233109, 0.5115075707, -0.2819129229, -0.7312893271, -0.4637395442, 0.1253409833, -0.3203240335, -0.1134288013, -0.2277140617, 0.4337189496, -0.0508428216, -0.0439431369, -0.303587079, -0.0564606115, 0.2161291391, 0.0429830179, 0.535702765, -0.1913151592, 0.1910960823, -0.0058265906, -0.23527807, -0.0667267591, -0.2758329809, 0.1633463055, 0.124404639, 0.162894398, -0.1206509545, -0.0619258769, -0.005070087, 0.2346729934, 0.3252992928, 0.0175858848, -0.1301686168, -0.2440437078, -0.1120036319, -0.0779496729, 0.115524292, -0.0518660732, 0.2897706628, 0.230894357, 0.0532466173, 0.3382208049, -0.1240139529, -0.461414814, 0.455730617, -0.1177970245, -0.121867694, 0.0733862892, -0.0636415631, 0.0258409455, -0.0516756289, 0.1071727499, -0.1597566307, 0.0295773577, -0.0548922718, -0.0067706909, 0.0393006839, -0.0814273357, 0.3715890646, 0.177459836, 0.0856072307, -0.0314126797, -0.1327326596, -0.0919187143, 0.3518421948, -0.0154538024, -0.2775565088, 0.2595610917, -0.2489344925, 0.1895794272, -0.2381271124, 0.0119783264, 0.2015542239, -0.0093983747, 0.2288381308, -0.1336817592, 0.1308988631, -0.053430859, -0.0058627091, -0.2272227407, -0.1346719414, -0.0774061084, -0.1108797416, -0.3310883045, 0.005131939, -0.4340776801, -0.3205754757, -0.36982584, 0.2506903708, 0.1282765716, -0.0645630881, 0.1095784456, 0.1870940477, -0.093007043, -0.1487046331, 0.3043154776, 0.1734107435, -0.3290266395, -0.2644235492, 0.1126337126, 0.07589183, 0.0661481172, 0.2349951416, 0.0647130534, 0.1130081341, 0.1656984985, -0.0372065268, -0.0541798919, -0.4142206609, -0.20151636, -0.0602946281, -0.1206697971, -0.0934129283, 0.0243770946, 0.440390259, -0.0290452689, -0.3247784674, -0.1446690708, 0.0162285827, 0.0528158993, -0.0537546091, -0.0320782475, 0.0505709611, -0.1820054501, 0.4311702847, -0.1165946797, 0.0583201051, -0.0444589071, -0.1440144181, -0.1113425344, -0.0915569067, 0.104096666, 0.0736879557, 0.5007157326, 0.5515340567, -0.1130997315, -0.2475202978, -0.4533880651, 0.0532468706, 0.3159928322, 0.1733866632, 0.221634537, -0.375189811, -0.2680240273, -0.147418201, -0.1475024372, -0.0535795204, -0.0952902436, 0.2475849241, 0.2361048013, -0.0193322655, -0.2998919189, -0.2160847485, 0.1283094138, 0.2848452926, -0.0539392531, 0.1205329001, 0.1492781192, 0.0200023483, -0.1491579413, 0.5127786994, 0.0104663707, -0.1040400341, 0.2029867768, 0.3039377034, -0.0074415011, -0.0276310034, 0.1016782522, 0.3263530731, 0.4377632737, -0.099009797, 0.1382635832, -0.2529659867, -0.0132117504, -0.0791061968, -0.179391399, 0.0229728855, 0.1095796749, 0.1334803402, -0.2986079752, -0.15211308, 0.0372582674, 0.139322415, -0.1947152913, 0.0079036942, -0.1108313948, 0.2330357432, 0.3945528865, 0.1087794527, -0.0956887528, 0.3215182126, -0.0048884028, -0.3789288104, 0.1060976014, 0.1068024188, -0.4911378026, 0.1963324249, 0.0301521774, 0.4219143689, -0.034763027, 0.0619035289, 0.3403470814, 0.0125117805, -0.0475941747, 0.0253199115, -0.1276007295, 0.31110847, 0.0907707512, 0.0829464868, 0.1214504391, 0.100705713, 0.1734577417, -0.0229760017, 0.0254100319, -0.0625024289, -0.2944377661, -0.0636153072, 0.2560422421, -0.1195860282, -0.1983717531, -0.5820181966, -0.4939034283, -0.2003484517, 0.0969547555, -0.0954897702, -0.2112883478, 0.2024481744, 0.1277595162, 0.3231778741, -0.3230867386, -0.2451108098, 0.1739898324, -0.1317130923, 0.1823125035, -0.1230630726, 0.1306599379, -0.1697480381, 0.3952823579, -0.1792237908, 0.1420124769, -0.2615372241, -0.5440927744, 0.0700348169, -0.4652979672, 0.1871999353, 0.3011379242, -0.1650554985, 0.2846770883, -0.2040568143, 0.1087174714, 0.1524671614, 0.10834378, -0.2670250237, -0.1588963568, 0.0674753636, -0.366787225, 0.1237903982, -0.2899269164, -0.1475367099, 0.3569643199, 0.1526900381, 0.0271009225, 0.2999842465, -0.1780371815, 0.0791993439, -0.0334856212, 0.0238807704, -0.0537359528, -0.5200938582, 0.4123338759, -0.0438692234, 0.1034150645, 0.2109449655, -0.1105608046, -0.0498710312, -0.0476944037, -0.0883577615, -0.4446307421, 0.0703267902, 0.0244689044, 0.3464212418, 0.3912919164, 0.147447899, 0.0580125786, 0.1238528714, -0.1444467157, -0.3642099798, 0.0896709412, 0.0311480816, 0.2948602438, -0.1509864777, 0.1652624458, -0.2183776647, 0.6097125411, 0.1429274082, -0.2653751075, 0.1522257328, 0.2022415996, 0.2568857074, 0.2612132132, 0.1293953508, 0.1242533252, 0.0688541979, 0.0794269666, 0.131237492, 0.2361260504, 0.3546673059, 0.089038983, 0.1559654325, -0.022220226, -0.0110283922, -0.0568616167, 0.1160865575, 0.2757038474, -0.2265881747, -0.3143401146, -0.4439980686, 0.0765798017, -0.1103465557, 0.2083667815, 0.2990712225, 0.2141653597, -0.6747990847, -0.0784452185, -0.3940441906, 0.197457999, 0.2365425676, -0.2909454703, 0.0761527717, -0.1362183541, 0.0142465234, -0.0457083397, 0.3247344792, -0.4556797147, -0.3164594173, -0.0828954056, 0.0773032755, -0.0874931291, 0.0609921515, -0.0438270457, -0.3415930569, 0.191453293, 0.3583158851, -0.5709722638, 0.0013947968, 0.2717253268, 0.0476425253, -0.1293655783, -0.1451885551, -0.2763876319, -0.5452916622, -0.2844864428, -0.1423666477, 0.1368617266, -0.1235772595, 0.167820856, -0.0092439018, 0.0457212664, 0.06746272, 0.3087631166, 0.1833770871, -0.0732660368, 0.6347836256, 0.172715798, 0.4002008736, -0.0571849719, 0.5128045082, 0.5562189221, -0.3854486644, -0.408221513, -0.258903712, -0.1833526045, 0.4894202948, 0.0155211166, 0.3424209952, 0.1198454052, 0.087325491, 0.1135364696, -0.5821655989, 0.3661465943, 0.1292791367, 0.0931181461, -0.2194297016, -0.4939141572, 0.6453341842, 0.1312827766, -0.1917435378, -0.1537508816, 0.5240005851, -0.2538597584, -0.0462198928, 0.3815087378, 0.9618294239, -0.2958472371, 0.3563616276, 0.0945727825, 0.1051081866, 1.0278149843, -0.0388757996, -0.241513148, -0.0164213777, -0.0441416837, -0.077699475, -0.1024250165, -0.0843885541, -0.0279037338, -0.0509028398, 0.2172040045, -0.1412747502, 0.0122620948, -0.1010475308, -0.0335381664, 0.1910452843, -0.3727121055, -0.0745813847, 0.0126225762, -0.2252283692, 0.0033477331, -0.1828034818, -0.1266427338, -0.1935337484, 0.244008109, -0.0582863912, -0.1784501076, -0.0051927287, -0.5162862539, -0.006150262, -0.0745098516, 0.1101948842, -0.1065224111, 0.767162323, 0.0037605353, 0.008228912, 0.073907651, -0.2669684291, 0.0935747474, -0.2059942037, -0.2251675129, 0.0853207931, 0.1157646179, -0.2600770593, -0.0054510771, 0.2936968207, -0.2009811699, -0.3357980549, -0.3550329208, 0.0780129135, -0.2176429927, 0.2874296606, 0.4839887321, 0.1382376254, -0.1460637003, -0.0037412925, 0.2006302178, -0.1607756913, -0.1167374253, -0.3657361567, 0.1184466332, -0.2654043436, -0.1230228767, -0.1780189872, -0.0528780892, -0.0653270856, 0.1566043347, -0.0373743847, 0.055223804, -0.1481807232, 0.012309406, -0.2691959739, -0.1362372637, 0.2364192158, -0.5443878174, -0.3863466978, 0.3006246388, 0.4367996752, -0.3253632784, 0.1571233571, 0.1752298772, -0.4280361533, 0.1592923403, 0.0112796603, 0.2756151259, -0.0802961886, 0.3353218138, -0.086662747, 0.2324060202, -0.1703131497, -0.1076021641, -0.1109547466, 0.0298788715, 0.1536896676, 0.0183865782, 0.1671488136, -0.1511326581, -0.1201807335, 0.0055343839, -0.032426063, 0.0397700146, -0.3695159853, 0.2196667343, 0.2820345461, -0.4252112806, 0.1378549784, 0.0831331387, 0.1048718914, -0.1739907265, 0.3192072511, -0.0955536515, 0.0653208047, 0.3136178553, -0.1827657968, 0.2739146948, 0.002345602, 0.16883789, 0.2984246612, 0.2922677994, 0.2921113968, 0.0073127649, -0.0223776773, -0.1077288315, -0.1074774265, 0.2464700043, 0.23518911, -0.0750162005, 0.2435468882, -0.0104906522, 0.0915150419, 0.3255593777, 0.2787164748, 0.1505321413, -0.1560917646, 0.1145434007, 0.2418032587, 0.089840956, 0.0196206085, -0.1615660936, -0.0305626467, -0.0147939771, 0.2058152258, 0.4395158887, 0.1985481828, 0.4025261104, -0.0616395958, -0.0391609035, 0.3055089116, 0.2193685174, 0.083135806, 0.0658198223, -0.1280719936, 0.1707730889, 0.5006363988, 0.4155250788, 0.0268864334, 0.0178106949, 0.1701324284, 0.5361153483, -0.0182367116, -0.0289440583, 0.1848017126, 0.060425099, 0.1947866082, 0.2642329335, 0.2715238631, 0.1048758551, 0.003664321, 0.0176012944, -0.3718645573, -0.2035439909, -0.0392512307, 0.4397815764, 0.2133208364, -0.3237323165, -0.3560730517, 0.0858796313, 0.0262563992, -0.1113547459, 0.0130474223, -0.7505530715, 0.3144699633, -0.0556992404, 0.2290308028, -0.4288552701, -0.4792251885, 0.2262847573, 0.2891726196, 0.0530887805, 0.178193137, 0.4162328243, -0.1435066611, 0.1604762971, 0.1805380285, 0.1668722183, -0.290586859, 0.0015825555, 0.4147281349, -0.2863203883, 0.1159628853, 0.0697535649, 0.0077965092, -0.2317914367, 0.0784617886, 0.1609253734, 0.0187408812, -0.0161950495, -0.1664544046, -0.3410785794, 0.036342971, -0.1856468022, 0.4932833612, -0.342718035, -0.2011363953, -0.0916402042, 0.328587383, -0.3409662545, 0.4163323939, 0.4194246531, -0.0913837701, -0.0692445412, -0.1162861735, -0.0272596069, -0.0003643547, 0.3093914986, 0.3522861004, 0.3389696777, -0.2107867151, 0.0307672713, -0.365011543, 0.0416250192, -0.0584664643, -0.5650424957, -0.1128220186, -0.2199035287, 0.3593728542, -0.1182817519, -0.0938145593, -0.1921333969, -0.0020845246, -0.1872653365, -0.1280308664, 0.0157943126, -0.3481069803, 0.2568412125, 0.1659721881, 0.091538325, -0.1572400481, 0.323332727, -0.1375705451, -0.0374385826, 0.2889263928, -0.1651373953, -0.0691808537, 0.1549962759, -0.0092367446, 0.4199465811, 0.0389689319, -0.331871897, -0.0366801992, -0.0794463083, -0.3724077046, -0.0080790045, -0.4380821288, 0.2869101763, -0.2511076927, 0.0664694011, -0.3012429476, 0.0728721321, 0.1339550912, 0.0613199212, -0.300830096, 0.4762833714, -0.2457079589, -0.2488265932, 0.541446507, 0.2740879059, 0.1216178387, 0.0951969251, -0.1107433364, -0.1305069774, 0.4118337631, -0.0960555077, -0.1009868234, 0.0511972308, 0.1962416321, 0.3703523576, -0.1034032404, -0.8380082846, 0.286552757, 0.3024728, 0.1257443726, -0.5482907891, 0.2628130019, -0.0457668975, -0.423381716, -0.0525523983, 0.2995760441, -0.2467922419, -0.0660709068, -0.0452027619, -0.1770837456 ]
https://github.com/huggingface/datasets/issues/723
Adding pseudo-labels to datasets
You can use the `datasets-cli` to upload the folder with your version of xsum with the pseudo labels. ``` datasets-cli upload_dataset path/to/xsum ```
I recently [uploaded pseudo-labels](https://github.com/huggingface/transformers/blob/master/examples/seq2seq/precomputed_pseudo_labels.md) for CNN/DM, XSUM and WMT16-en-ro to s3, and thom mentioned I should add them to this repo. Since pseudo-labels are just a large model's generations on an existing dataset, what is the right way to structure this contribution. I read https://huggingface.co/docs/datasets/add_dataset.html, but it doesn't really cover this type of contribution. I could, for example, make a new directory, `xsum_bart_pseudolabels` for each set of pseudolabels or add some sort of parametrization to `xsum.py`: https://github.com/huggingface/datasets/blob/5f4c6e830f603830117877b8990a0e65a2386aa6/datasets/xsum/xsum.py What do you think @lhoestq ?
23
Adding pseudo-labels to datasets I recently [uploaded pseudo-labels](https://github.com/huggingface/transformers/blob/master/examples/seq2seq/precomputed_pseudo_labels.md) for CNN/DM, XSUM and WMT16-en-ro to s3, and thom mentioned I should add them to this repo. Since pseudo-labels are just a large model's generations on an existing dataset, what is the right way to structure this contribution. I read https://huggingface.co/docs/datasets/add_dataset.html, but it doesn't really cover this type of contribution. I could, for example, make a new directory, `xsum_bart_pseudolabels` for each set of pseudolabels or add some sort of parametrization to `xsum.py`: https://github.com/huggingface/datasets/blob/5f4c6e830f603830117877b8990a0e65a2386aa6/datasets/xsum/xsum.py What do you think @lhoestq ? You can use the `datasets-cli` to upload the folder with your version of xsum with the pseudo labels. ``` datasets-cli upload_dataset path/to/xsum ```
[ 0.3005567491, -0.0865523219, 0.0789876357, 0.0127476919, 0.1379012316, 0.0425926782, 0.2965244055, -0.0892709494, -0.1311772317, 0.0045272023, -0.2615564466, 0.1170213446, -0.1018751785, 0.5030105114, 0.4647359848, -0.0501750521, 0.3400837481, -0.1612030566, 0.120938547, -0.1879303306, -0.3377028406, -0.2674906254, 0.243432194, -0.166870147, -0.3428444564, -0.1463992, -0.1756635457, 0.0441339426, 0.0913104266, -0.5311968923, 0.0352853909, 0.410917908, 0.2603912652, 0.6441878676, -0.0001249052, -0.0960011706, -0.1164322346, -0.1558601856, -0.1917868555, 0.187281251, -0.0406610146, -0.1984740943, -0.1967242062, 0.1530398875, -0.1072223336, -0.37432307, -0.0886983573, -0.0048338003, 0.1889232397, -0.0055729304, 0.0162153635, 0.2126975507, 0.2619464099, 0.1145814806, 0.3966304362, 0.3124055564, -0.2199383527, 0.3298341334, 0.2574900687, 0.4000385404, 0.4975060523, 0.4654205441, 0.0034598899, -0.1363220662, 0.5766839981, 0.0685754642, 0.0213654768, -0.1638678759, -0.3478552401, 0.1882937551, 0.5000040531, -0.2947637141, -0.7588796616, -0.4253389835, 0.1248205453, -0.2834516466, -0.1056060567, -0.200381428, 0.3972682953, -0.053389255, -0.0065782736, -0.2543712258, -0.0843834504, 0.1836410016, 0.0637215972, 0.5415853858, -0.1714507937, 0.2019056827, 0.0627434775, -0.2626828253, -0.0453339964, -0.2511153519, 0.1567477137, 0.1438651383, 0.1374803185, -0.1627711058, -0.1111430824, 0.0124165835, 0.2875880003, 0.255408138, -0.0147288674, -0.1271377951, -0.2798383534, -0.0907067731, -0.0495130233, 0.1478042305, 0.0205166433, 0.2564307451, 0.2562675774, 0.0137423901, 0.3419876993, -0.1323286742, -0.5306584835, 0.5164090991, -0.0874369442, -0.1615374535, 0.0084341848, -0.1053057984, -0.0154334949, -0.0224044845, 0.1680037081, -0.1824712753, 0.0620616823, -0.0694895685, 0.0375248268, 0.0717608184, -0.0921622217, 0.367692858, 0.1835539192, -0.0092501584, -0.0526279695, -0.0945304185, -0.0871115923, 0.3537298739, -0.0076327347, -0.3353785276, 0.2623463571, -0.2569539249, 0.229471907, -0.1936967671, 0.012320308, 0.1991735846, -0.0730662718, 0.2315553427, -0.1415062845, 0.1508708745, -0.0122409547, -0.0095902244, -0.2297951281, -0.1294582188, -0.08316724, -0.0762729421, -0.3556429744, 0.0113504101, -0.4253793359, -0.3329549432, -0.4054363668, 0.2301380336, 0.1485270709, -0.0096588638, 0.0667014942, 0.1540711075, -0.1053178981, -0.1127881408, 0.3149796724, 0.1691001058, -0.4170016646, -0.2718284726, 0.1106528863, 0.0382297151, 0.0504453704, 0.2552046776, 0.0666078329, 0.1342074275, 0.1700589806, -0.0500866696, -0.0997084528, -0.4665152133, -0.2023462951, -0.0561343022, -0.0590187237, -0.0885886028, 0.0227515344, 0.4571011066, -0.015280555, -0.3111628592, -0.1316937804, -0.0294858236, 0.0568467006, -0.0687908009, -0.0553259663, -0.0011324603, -0.1273281127, 0.4534285069, -0.1470851302, 0.0185575001, -0.0733290613, -0.106896922, -0.0800816044, -0.0740579367, 0.0727355108, -0.0007413205, 0.4443891346, 0.4343408942, -0.1196610406, -0.3397577405, -0.4548970461, 0.1086859182, 0.295042038, 0.1677484363, 0.2402145416, -0.3612696826, -0.2660118937, -0.1327235103, -0.1280920058, -0.0307631698, -0.1144381389, 0.1807573736, 0.2044484615, -0.0083762361, -0.3424601853, -0.1521357596, 0.0372330956, 0.2448759824, -0.0409915932, 0.1239596084, 0.1826607436, 0.0440869741, -0.1847418249, 0.5197101831, 0.0191852804, -0.110980615, 0.1982564479, 0.3092308342, -0.0159006286, -0.0633956864, 0.1213108972, 0.2998846173, 0.4853621125, -0.0897499397, 0.1092523709, -0.2770065069, -0.0257102475, -0.0954571366, -0.1917812675, 0.0236201156, 0.1861288399, 0.1155370772, -0.2611897588, -0.1196407899, 0.0220844559, 0.2011288404, -0.1726161242, -0.0360720791, -0.0711006075, 0.2465388328, 0.4118816853, 0.0672813505, -0.1039958, 0.3385362029, 0.0379813462, -0.3380329609, 0.1061592698, 0.1020346656, -0.5140880346, 0.2836022675, -0.0069671823, 0.4016211629, -0.0132527063, 0.0652668476, 0.2741594911, -0.0282700025, -0.0877164975, 0.056449011, -0.1335626841, 0.270789206, 0.0627321899, 0.0439144596, 0.0381418243, 0.1198608726, 0.1434422582, 0.0160630867, 0.0239307452, -0.0458288454, -0.2845478356, -0.1033423692, 0.2123593092, -0.1288749278, -0.2173861414, -0.5689045787, -0.4772743583, -0.2290361524, 0.0598103814, -0.0901628211, -0.1786349565, 0.2162614614, 0.0645547658, 0.3908277154, -0.2997990251, -0.2319871634, 0.183528617, -0.134553358, 0.1550381929, -0.1198547184, 0.117587924, -0.1475572437, 0.3982764184, -0.1288673133, 0.1292863339, -0.2389436364, -0.5371052027, 0.0983881578, -0.451777041, 0.1908956766, 0.2576669753, -0.1502099186, 0.3111433685, -0.2268037647, 0.1120988652, 0.1109322608, 0.0671591759, -0.2997234464, -0.1118497774, 0.0367008336, -0.3677360415, 0.0979161412, -0.3780785203, -0.1553581655, 0.3291868269, 0.1468506455, 0.0413796753, 0.3024631441, -0.2576720417, 0.0737457722, -0.0114808558, -0.0000503005, -0.0530082434, -0.5784048438, 0.4582699835, -0.0525678247, 0.0255834833, 0.1926741004, -0.1010328159, -0.0518296547, -0.0418861434, -0.0808498561, -0.4202513695, 0.0469211899, 0.0205527823, 0.3903390169, 0.3359696567, 0.1172427312, 0.0368377343, 0.1378156245, -0.1517867297, -0.3558728099, 0.1650112569, 0.0210256334, 0.2545070946, -0.1433811784, 0.129175812, -0.2391848713, 0.5956509709, 0.2005893588, -0.2929971814, 0.1209340319, 0.2484628856, 0.2504306138, 0.2333758324, 0.0773002356, 0.112771973, 0.0980244875, 0.1541236043, 0.1273020506, 0.2796020806, 0.3740211725, 0.0768564567, 0.1701909751, 0.0721966252, 0.0184611119, -0.0998083353, 0.1475935429, 0.2638203502, -0.233671546, -0.2543124259, -0.4365409017, 0.0665396601, -0.1036041006, 0.203019619, 0.2736346424, 0.2449996322, -0.6622624993, -0.0344682299, -0.4082278311, 0.1590766609, 0.2376982868, -0.2505781949, 0.0388490595, -0.112946935, 0.0092550227, -0.0056987246, 0.293548584, -0.4202440083, -0.3173516393, -0.071571663, 0.0930693075, -0.1117161289, 0.0709919035, 0.0091689099, -0.3605172634, 0.2394086272, 0.3792348206, -0.5476181507, 0.0103416229, 0.2760301828, 0.065760538, -0.1663584709, -0.2120378762, -0.2518391907, -0.4434755147, -0.2146154046, -0.1189867631, 0.125009343, -0.0863538906, 0.1271367669, 0.0071244212, 0.0215216223, 0.0315176435, 0.3175495267, 0.1892133057, -0.0314186327, 0.5588912964, 0.2225305438, 0.4542618692, 0.0002594566, 0.4915842712, 0.5206646323, -0.3872157037, -0.4062043428, -0.2454668581, -0.2910206616, 0.4526284039, -0.0365537964, 0.3053735495, 0.0981245711, 0.1346927434, 0.0305019207, -0.5840029716, 0.3780724108, 0.109716326, 0.1045731306, -0.2726257145, -0.4577993751, 0.6577795744, 0.1590692401, -0.1287037432, -0.0958611891, 0.5477829576, -0.2254183143, -0.1127008423, 0.3520125449, 0.9328477979, -0.3369612098, 0.3329704702, 0.0396053381, 0.1636607796, 1.067281723, -0.0586958267, -0.2948020697, -0.0047522979, -0.163188234, -0.101525791, -0.0841585547, -0.1089161113, -0.0217038654, -0.05226117, 0.238696143, -0.1711100936, -0.0124159567, -0.0560392775, -0.0046275039, 0.218350336, -0.3940485418, -0.0156154465, 0.0040185009, -0.2048399597, 0.004700915, -0.1885084659, -0.1357958913, -0.1353676915, 0.2488987297, -0.1408223212, -0.1361059695, 0.0379497483, -0.4584197402, 0.0112080229, -0.0335462801, 0.157005161, -0.1123263538, 0.826220274, 0.0003975378, -0.0335020125, 0.0715708807, -0.3101947606, 0.0936177298, -0.1765090525, -0.1885768473, 0.1225454509, 0.1045515016, -0.2536049187, -0.0054938016, 0.2725920975, -0.22272484, -0.3585730493, -0.321280688, 0.1308985204, -0.1887421459, 0.2948667705, 0.4917615652, 0.1491301805, -0.1357511729, -0.0047588469, 0.2458880991, -0.172306031, -0.1269858479, -0.3595585525, 0.1188430116, -0.2846381962, -0.1014962867, -0.1405745745, -0.0804914907, -0.0579289421, 0.1359795481, -0.0435102135, 0.0516581498, -0.1861877739, 0.0736513138, -0.2694044113, -0.1747684628, 0.268992424, -0.5190674663, -0.4004071951, 0.3233270943, 0.4202765524, -0.3643450141, 0.1572704762, 0.1166160703, -0.5053479075, 0.1381151378, -0.0381042957, 0.2523899376, -0.0577999987, 0.359818995, -0.0919569209, 0.2455291003, -0.1634774804, -0.1431565434, -0.0721922219, -0.030104436, 0.2206996083, 0.0580459498, 0.215735361, -0.129977107, -0.1238181219, 0.0111896181, -0.0468100794, 0.0507179722, -0.4097669721, 0.2229914963, 0.3041748106, -0.4157531857, 0.1692836285, 0.0494495332, 0.099426724, -0.1515695006, 0.2793648243, -0.0760484636, 0.0589885935, 0.3352190554, -0.1418849528, 0.3381769657, -0.0312915035, 0.2499750704, 0.3630746007, 0.2893468738, 0.2955308855, -0.0161011461, -0.0333834738, -0.117147848, -0.1440601051, 0.2044928521, 0.2352797389, -0.0927619785, 0.2259897441, -0.0146828182, 0.0624649599, 0.3354094028, 0.2851721644, 0.1215860918, -0.1429920048, 0.0899209082, 0.2511620522, 0.092504479, 0.0040504648, -0.2070921659, -0.0063689956, 0.0486396141, 0.1939466, 0.4254964292, 0.2137171626, 0.3945175707, 0.0331695974, -0.0591631904, 0.2672291398, 0.1320348233, 0.1106251851, 0.0543668233, -0.0569674186, 0.1894164681, 0.4579182267, 0.416221559, 0.016917266, 0.0289580394, 0.1181009263, 0.532184124, 0.0321262218, -0.0732519031, 0.1708708107, 0.0514872484, 0.1962754726, 0.2941992581, 0.2453475296, 0.105500184, 0.0069782622, 0.0940506309, -0.374375999, -0.1930260956, -0.0829577744, 0.3710647523, 0.1964566559, -0.3320234716, -0.3283769786, 0.0903381407, 0.0467905812, -0.1340342462, 0.035713695, -0.723803103, 0.2991559505, -0.0731350929, 0.2032060623, -0.4646300972, -0.5324652791, 0.2731389999, 0.3042718172, 0.0662787631, 0.2049303651, 0.4383510351, -0.1478364617, 0.1783232093, 0.2021567374, 0.1201844588, -0.2224929035, 0.0403567106, 0.4374473095, -0.3001107574, 0.1411276758, 0.0549570322, 0.0160526801, -0.2383213639, 0.0554357246, 0.2008742392, 0.015481282, 0.0041682506, -0.1883980334, -0.3138982654, 0.083274655, -0.2254644781, 0.4769442379, -0.3305907845, -0.1597890854, -0.0889858156, 0.3159865141, -0.3112285733, 0.4488582611, 0.3846321702, -0.0216628984, -0.0756220594, -0.1248618513, -0.0264319014, -0.0443770364, 0.296554476, 0.3579022884, 0.332442522, -0.2424770892, 0.0267122928, -0.3693447709, 0.0541414246, -0.054359138, -0.5596653223, -0.111433588, -0.2042157352, 0.3585689068, -0.1240680218, -0.0400458984, -0.2223487347, -0.0023258687, -0.2603671253, -0.1678108573, 0.0122163696, -0.3369865417, 0.2500516772, 0.1526575834, 0.1316900402, -0.1519870758, 0.3455470204, -0.1487061381, -0.0182662476, 0.2930289507, -0.1870582253, -0.0279353335, 0.1037205234, -0.0328947566, 0.476454407, 0.0820056796, -0.2617828548, -0.016556317, -0.0336409248, -0.3932734132, -0.0621456318, -0.3720930219, 0.2455249876, -0.2771072388, 0.0273793377, -0.2961142957, 0.1016198546, 0.1016142517, 0.0018555275, -0.3415237665, 0.4706753194, -0.221170336, -0.2726422846, 0.5616237521, 0.2881715298, 0.1016222462, 0.0880299807, -0.0739530921, -0.0888886303, 0.3690779209, -0.1002472714, -0.0697909296, 0.0462501235, 0.1882791817, 0.3721482158, -0.0926841944, -0.8369211555, 0.2698468268, 0.3096072078, 0.0760966837, -0.5116294026, 0.25012815, -0.0500109904, -0.3855342269, -0.0597649775, 0.3162657619, -0.2229463905, -0.0423216596, 0.026151726, -0.1755759418 ]
https://github.com/huggingface/datasets/issues/721
feat(dl_manager): add support for ftp downloads
We only support http by default for downloading. If you really need to use ftp, then feel free to use a library that allows to download through ftp in your dataset script (I see that you've started working on #722 , that's awesome !). The users will get a message to install the extra library when they load the dataset. To make the download_manager work with a custom downloader, you can call `download_manager.download_custom` instead of `download_manager.download_and_extract`. The expected arguments are the following: ``` url_or_urls: url or `list`/`dict` of urls to download and extract. Each url is a `str`. custom_download: Callable with signature (src_url: str, dst_path: str) -> Any as for example `tf.io.gfile.copy`, that lets you download from google storage ```
I am working on a new dataset (#302) and encounter a problem downloading it. ```python # This is the official download link from https://www-i6.informatik.rwth-aachen.de/~koller/RWTH-PHOENIX-2014-T/ _URL = "ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz" dl_manager.download_and_extract(_URL) ``` I get an error: > ValueError: unable to parse ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz as a URL or as a local path I checked, and indeed you don't consider `ftp` as a remote file. https://github.com/huggingface/datasets/blob/4c2af707a6955cf4b45f83ac67990395327c5725/src/datasets/utils/file_utils.py#L188 Adding `ftp` to that list does not immediately solve the issue, so there probably needs to be some extra work.
120
feat(dl_manager): add support for ftp downloads I am working on a new dataset (#302) and encounter a problem downloading it. ```python # This is the official download link from https://www-i6.informatik.rwth-aachen.de/~koller/RWTH-PHOENIX-2014-T/ _URL = "ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz" dl_manager.download_and_extract(_URL) ``` I get an error: > ValueError: unable to parse ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz as a URL or as a local path I checked, and indeed you don't consider `ftp` as a remote file. https://github.com/huggingface/datasets/blob/4c2af707a6955cf4b45f83ac67990395327c5725/src/datasets/utils/file_utils.py#L188 Adding `ftp` to that list does not immediately solve the issue, so there probably needs to be some extra work. We only support http by default for downloading. If you really need to use ftp, then feel free to use a library that allows to download through ftp in your dataset script (I see that you've started working on #722 , that's awesome !). The users will get a message to install the extra library when they load the dataset. To make the download_manager work with a custom downloader, you can call `download_manager.download_custom` instead of `download_manager.download_and_extract`. The expected arguments are the following: ``` url_or_urls: url or `list`/`dict` of urls to download and extract. Each url is a `str`. custom_download: Callable with signature (src_url: str, dst_path: str) -> Any as for example `tf.io.gfile.copy`, that lets you download from google storage ```
[ -0.2777805328, 0.0965270549, -0.029432727, 0.2827263474, -0.0488572642, 0.0626956001, -0.2193705589, 0.4863720238, 0.2671811283, 0.0046165925, -0.0645396262, 0.1767715365, -0.133863762, 0.0276904572, 0.1833812147, -0.3053059876, -0.2551795542, 0.1110797599, 0.0832189023, 0.1619189382, -0.3100489974, 0.2241035849, 0.1274138242, 0.024796892, 0.1058143452, -0.0016974419, -0.0335106626, 0.2009849399, -0.360077709, -0.5725454092, 0.1596042365, 0.1998822242, 0.5002798438, 0.3012331426, -0.0001155282, -0.0273310505, 0.2771563828, -0.0509039648, -0.1939810663, -0.4507177472, -0.5581099987, -0.3901634216, 0.1760958582, -0.0818981826, 0.1434404403, -0.3247944415, -0.0656950101, 0.1504252255, 0.1654931158, 0.4937479496, 0.2138061225, 0.2187064439, 0.0942476094, -0.1992250085, 0.3822672963, 0.0258260537, -0.0190178957, 0.213603124, 0.2988850772, -0.0795226246, -0.0127827637, -0.29192397, -0.1655909568, 0.2839197814, 0.3653363585, 0.1697274148, 0.102001518, -0.4725708961, -0.3483141065, 0.2249997109, 0.6980256438, -0.0426876135, -0.1774826944, -0.0982261971, -0.1084202379, -0.0485818498, 0.163765803, 0.0252201241, -0.384796381, 0.1930247247, 0.1349449754, -0.2261705697, -0.2653414607, 0.3329019248, -0.1544879377, 0.4816542268, 0.0088160466, -0.1243843287, 0.3409362733, 0.2407483906, -0.1731476337, -0.1758921891, 0.0956521183, 0.0276541207, 0.2391527593, -0.0896977633, 0.1219807491, -0.3390657902, -0.0456425585, 0.3806222081, 0.0886812732, -0.063494958, -0.1267751008, 0.222598955, 0.0764586851, 0.2798477709, -0.1293371469, 0.0132238343, 0.4056568742, 0.3186862469, 0.2450586557, 0.0259220917, -0.1233368441, -0.1067254022, -0.3545545042, 0.0777446255, 0.2355566621, -0.1232113987, -0.1206973791, -0.0501871333, -0.1213950515, -0.2151161283, -0.0660386011, 0.1542131454, -0.1493150741, 0.1724776924, 0.028638117, 0.1730006933, 0.1612339914, -0.3008624911, 0.0119845727, 0.0084586954, -0.0474399552, -0.1504229754, 0.2176418751, 0.1390342712, -0.0804112628, -0.1865074486, 0.0279483479, 0.1799256206, -0.0033732185, 0.0043380638, 0.1290110499, 0.3257303536, 0.0308781657, 0.2170119733, 0.0210642815, -0.2257750183, -0.2357034385, 0.2544204295, -0.0345583372, -0.39469859, -0.3626573086, 0.1562716961, -0.2903931439, -0.4475145638, -0.3203413188, 0.1746924073, -0.3312830627, -0.2136012763, -0.1230313629, 0.0842836425, -0.2328644246, -0.1956684291, 0.1440957189, 0.4552595913, -0.4922565222, 0.060594283, -0.3768832088, -0.3115020394, 0.4496424496, 0.0502949581, -0.1240930408, 0.3914760947, -0.3554272056, 0.4173651338, 0.8397296667, -0.426720798, -0.3148742616, 0.6333287954, -0.2937243879, 0.113679029, 0.2245717943, -0.0514887162, 0.4169697762, -0.2857522368, -0.6332720518, 0.5020346642, -0.0726737902, 0.0090589616, -0.2345494926, -0.1996621639, 0.2574513257, 0.0535952747, 0.2425486445, 0.3365592957, 0.395203948, -0.0429331884, 0.3353666365, 0.3670588434, 0.2471553534, 0.062669009, 0.2879800797, 0.2796065211, -0.1349159181, -0.2456127852, -0.2629238963, 0.1651069522, 0.0862023681, 0.1697001904, -0.1856205761, 0.1597984582, -0.2809399366, -0.0604896732, -0.2156413496, -0.0157648753, 0.0051060682, 0.1655586213, 0.2290703952, 0.0236071832, -0.103140682, 0.113620691, 0.2875776887, 0.307385236, 0.1115077958, 0.1563329399, -0.1724863648, 0.039546404, 0.0204861201, -0.0457604863, 0.2629828751, -0.3486968279, -0.1585973203, 0.1335840523, -0.12390358, 0.0464615077, 0.3054713607, 0.1961766034, 0.2601018846, 0.1200304106, 0.0739793703, 0.4652783871, 0.2284345329, -0.0791875422, -0.0061101969, -0.046715416, 0.3204244673, 0.2881264687, 0.0336573943, 0.1974167526, 0.2212959379, -0.1061478481, 0.0918357521, -0.1773679405, 0.0986495689, -0.098504588, -0.1790418476, -0.2212844789, -0.092787683, 0.1402367502, -0.0492134355, -0.0503071547, 0.1286204904, 0.3818584383, 0.1158389673, -0.005042363, 0.083605662, 0.8543781042, 0.3756821156, 0.1835931242, 0.3064015508, 0.1088299006, 0.1027728543, -0.2426905483, 0.2653558254, 0.1198404431, -0.3955546916, 0.3678885996, -0.0257274043, 0.1617210656, 0.0320030227, -0.2243323326, 0.155139029, 0.3608127534, -0.2279526442, -0.0266592819, -0.6431183815, -0.5907306671, -0.1313005686, -0.1926854402, -0.1272394806, -0.4519249201, -0.1167864278, 0.321192801, -0.1044619977, 0.0826619714, -0.2848479748, -0.002674636, -0.2534916103, -0.3995340765, -0.2082606256, 0.1707179099, -0.1923682988, 0.089437604, 0.32110852, -0.0662637874, 0.3892351687, -0.0055794758, 0.1255534738, -0.5770409703, 0.0153358765, 0.2387177199, -0.1064804494, -0.0664172918, 0.2190168798, 0.026539728, 0.3372536302, -0.0493889004, 0.2074353546, -0.106151402, -0.1236341074, -0.1736952364, 0.1422601491, -0.0082120262, -0.1790385097, -0.2249695808, -0.369097054, -0.6310890913, 0.1111526638, 0.166015625, 0.1625750363, -0.0175438989, -0.2038412839, 0.2674896419, -0.2053000629, -0.1185508296, 0.0029460422, -0.1617116183, 0.4682968259, -0.3175648451, -0.378760457, 0.2251976281, 0.0455157794, -0.1362713575, 0.1256065816, -0.3536235094, -0.2745188773, -0.0791598782, 0.3072172105, -0.1262129843, 0.2914074361, 0.2416871935, -0.0288199987, -0.0462422669, 0.0606231838, -0.002599716, -0.0029889836, 0.4793729186, 0.3309398293, 0.2338622063, 0.3097513914, -0.0318109691, 0.6106980443, -0.0915336162, 0.2176849842, 0.5523763895, -0.0916206762, 0.1654034704, 0.1803812236, -0.238364473, 0.0747329146, -0.1104736403, 0.0982211456, 0.2661072314, -0.0720281973, -0.0428022593, -0.3615036309, -0.0274921972, -0.1111904755, -0.2581684291, 0.0229250062, 0.0385505036, 0.0067446041, 0.0458630882, -0.004321259, -0.0009687016, -0.1712151468, 0.1932059675, 0.541593492, 0.0281078126, 0.1365472972, 0.3491774201, 0.3713874817, -0.5879126191, 0.2287240028, 0.2666149735, 0.0969248861, 0.0114950556, -0.0824270993, 0.1188709363, 0.0548426025, 0.6556656361, -0.1353306174, 0.0986517221, 0.0666242763, -0.2603296638, 0.0821251646, -0.145247668, -0.1661817133, -0.0788560808, -0.1544732898, -0.219529435, -0.1011288986, -0.328396529, 0.1870179921, 0.0621364489, -0.0938745812, -0.2454237789, 0.0336946733, -0.2624855936, -0.4092604518, -0.281575799, -0.0104151694, 0.0559045598, 0.2774828076, 0.1103717834, 0.133396551, 0.006807474, 0.1335184425, -0.1390008032, -0.0577399209, -0.0085127614, 0.0141140949, 0.082246013, -0.0128304148, 0.1226614714, 0.3396206498, -0.1821528524, -0.3488292098, -0.0330329649, -0.0441379584, 0.3317429125, 0.2396515608, -0.1392121166, -0.0971873179, -0.2428284585, 0.2821035981, -0.2954569757, 0.1141915917, 0.4472607374, -0.3421836197, -0.1252634823, -0.3733778298, 0.4161617756, -0.1171205565, -0.0647556782, 0.1792526096, 0.1077385917, -0.1346814185, -0.1354333907, -0.231895566, 0.8524112105, 0.0752382204, 0.2058203965, 0.3293744922, -0.2937967479, 0.4327646196, -0.3588071167, 0.1133268401, -0.1409440339, 0.1773871481, -0.2753987312, 0.0096642217, -0.0011536735, 0.1388696134, -0.1896541268, 0.3798854351, 0.0313318372, 0.0757569671, 0.2302488983, 0.4625847042, 0.0513147824, -0.2804061174, -0.0043313657, 0.189153716, -0.2375762463, 0.4008998275, -0.1536160111, -0.3216962218, -0.0560974181, -0.165423274, -0.3222961724, 0.1248772517, -0.3765679896, 0.1581712216, -0.0971783251, -0.2147281617, 0.1250217855, -0.0915196165, -0.4460644126, -0.209153235, -0.190258801, -0.1778600067, -0.2255993187, -0.0631953552, -0.0331119858, 0.1158376262, 0.2146816105, -0.2299427837, 0.0233686566, -0.1044759601, -0.0207359474, -0.3708562553, 0.3247357011, 0.1927949041, 0.0721005723, 0.0160153769, -0.2242679596, -0.0809706897, -0.1510156542, -0.1725269407, 0.1021626219, 0.0208584182, -0.3076507747, 0.0750786439, -0.1099051386, -0.1160028428, -0.109364599, 0.3162164986, -0.3857376575, -0.0382146612, 0.1901693344, 0.1664544642, -0.2660349309, -0.1714632213, 0.0781780705, -0.3098060191, -0.2643666565, 0.2415319681, -0.0749420822, -0.0800470263, 0.0644377619, 0.5078143477, 0.2872805297, -0.1613526493, -0.1703558117, -0.41315642, -0.0904971734, -0.2093138844, -0.1304545701, -0.0088744937, -0.3474534452, 0.1425917894, 0.2795873284, -0.259778589, -0.2710268497, 0.1126309633, 0.0846957415, -0.1183348596, 0.6158230305, 0.1940930933, 0.3525829017, 0.1051707268, -0.0180042405, 0.0892752483, -0.3229302168, -0.0869442001, -0.2921777368, 0.1867014468, 0.1633132249, -0.2184814513, 0.1312788725, -0.17734842, -0.2802200913, 0.1531659663, -0.0902673379, 0.1098236367, -0.058262825, 0.1060826033, 0.2737483978, -0.2235980332, -0.1254299432, 0.3725330234, 0.156497702, 0.6829890609, -0.1120122969, 0.0962002277, -0.1482328027, 0.0144585287, 0.0713002384, -0.0329748653, 0.0731547326, -0.1383979917, 0.5538971424, -0.0048992606, 0.0972769037, 0.4584714174, 0.404527694, 0.3837920725, 0.2066976726, -0.0172285307, 0.4155071676, 0.0779509172, -0.218001008, -0.1995036453, 0.2127432227, 0.23976399, 0.0316165611, 0.2869145274, 0.0391414426, -0.0666022077, -0.0769208968, -0.0946749225, 0.4100940824, 0.1849679202, -0.0245683845, 0.3254157901, -0.0883879438, 0.2618139684, 0.1731977016, 0.3311842084, 0.2310247123, 0.1246363893, -0.2521330118, 0.0938148722, 0.0803413987, -0.0041572694, 0.0959160551, -0.4635381699, 0.1409641951, -0.0577627867, 0.1350244433, 0.0403652005, 0.1422888339, 0.3913532495, -0.3291977942, -0.0282009263, -0.1839511842, 0.3366116881, 0.1261388659, 0.2924502492, 0.181286931, -0.0276791155, -0.5020222068, 0.0247053374, 0.0370319337, -0.2099048048, -0.0175290927, 0.1742314845, 0.1238449514, -0.1536002457, -0.240649268, -0.3937408328, 0.0087388791, -0.3874934316, -0.1205584034, -0.0282659512, -0.277915746, 0.0365626439, 0.1705743074, 0.3475547433, 0.2376668304, -0.0724419579, -0.1863112152, -0.3535121083, 0.1091944501, -0.1476799399, 0.2919330001, 0.1634678543, 0.1949480027, 0.3043049276, -0.0075096954, -0.120673053, 0.0024495057, 0.0473201163, -0.2435743213, -0.0634315237, 0.8210979104, 0.2703954577, 0.0882319808, -0.1724933237, -0.1439773738, -0.3292528391, 0.2324588299, 0.21502994, -0.1479425132, 0.1105025113, -0.1574002653, 0.0451664552, 0.0527735688, 0.3405620158, 0.4622703195, -0.0701692924, -0.1550057232, -0.0200467035, -0.9037470222, 0.1082121804, 0.0543434918, -0.167096898, -0.0808641464, 0.0378520451, 0.1100156456, 0.4262301028, 0.1255438477, 0.236195147, 0.1714096218, -0.1668515652, -0.063020274, -0.109974809, -0.095484443, 0.1355502456, -0.0711727887, -0.1057146788, 0.0740881041, -0.4191249311, -0.0196007751, -0.2305948436, -0.2496818304, -0.1324824393, -0.1511649191, 0.593013525, 0.0655727834, 0.2280216664, -0.0595616847, -0.0824396759, -0.1598232538, 0.3103454113, -0.3625289798, 0.0681561977, -0.1976424903, 0.0475332476, -0.2573742867, 0.4077555239, -0.730889678, 0.081603229, -0.1295909137, 0.3909310699, -0.4042828679, -0.0866031423, -0.3370787203, -0.0990030617, 0.4670018852, 0.1077034473, -0.0946612954, 0.1264563203, -0.4665573537, -0.280914396, 0.325529635, -0.0217461139, -0.1913798004, -0.1035377383, 0.0917191133, -0.0933691412, -0.0350324064, -0.2697993815, -0.1936205328, 0.1508779377, -0.0902046189, -0.0572739281, -0.0011445155, -0.295856595, -0.1792340279, -0.0286261179, 0.2602675557, 0.0896153376, -0.1344241649, -0.0527025089, 0.0509839654 ]
https://github.com/huggingface/datasets/issues/721
feat(dl_manager): add support for ftp downloads
Also maybe it coud be interesting to have a direct support of ftp inside the `datasets` library. Do you know any good libraries that we might consider adding as a (optional ?) dependency ?
I am working on a new dataset (#302) and encounter a problem downloading it. ```python # This is the official download link from https://www-i6.informatik.rwth-aachen.de/~koller/RWTH-PHOENIX-2014-T/ _URL = "ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz" dl_manager.download_and_extract(_URL) ``` I get an error: > ValueError: unable to parse ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz as a URL or as a local path I checked, and indeed you don't consider `ftp` as a remote file. https://github.com/huggingface/datasets/blob/4c2af707a6955cf4b45f83ac67990395327c5725/src/datasets/utils/file_utils.py#L188 Adding `ftp` to that list does not immediately solve the issue, so there probably needs to be some extra work.
34
feat(dl_manager): add support for ftp downloads I am working on a new dataset (#302) and encounter a problem downloading it. ```python # This is the official download link from https://www-i6.informatik.rwth-aachen.de/~koller/RWTH-PHOENIX-2014-T/ _URL = "ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz" dl_manager.download_and_extract(_URL) ``` I get an error: > ValueError: unable to parse ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz as a URL or as a local path I checked, and indeed you don't consider `ftp` as a remote file. https://github.com/huggingface/datasets/blob/4c2af707a6955cf4b45f83ac67990395327c5725/src/datasets/utils/file_utils.py#L188 Adding `ftp` to that list does not immediately solve the issue, so there probably needs to be some extra work. Also maybe it coud be interesting to have a direct support of ftp inside the `datasets` library. Do you know any good libraries that we might consider adding as a (optional ?) dependency ?
[ -0.3274756968, 0.0598702803, -0.0164928474, 0.2534116209, -0.0806324258, 0.0911127105, -0.3827838898, 0.4749821424, 0.2600121796, -0.0128854541, 0.0683744475, 0.0932434127, -0.1218971983, 0.061172016, 0.2366615236, -0.2707271874, -0.1249642074, 0.1676851809, 0.0703391507, 0.1570512652, -0.3043114245, 0.2058284879, 0.1108848378, 0.0007486974, 0.0134708863, -0.0703272372, -0.0722676143, 0.183494851, -0.2807336748, -0.4544092715, 0.1355405897, 0.1415675431, 0.4248404503, 0.257706821, -0.0001219638, -0.0764311105, 0.2710135281, -0.0649453178, -0.1451146156, -0.4268165529, -0.5726467967, -0.4681802094, 0.2224382311, -0.0011483667, 0.1972092837, -0.3350040615, -0.0732629821, 0.0971458852, 0.0442159623, 0.4594889879, 0.1673591882, 0.2992139459, 0.0093544526, -0.1778150201, 0.4375675619, 0.0231841542, -0.0504500717, 0.1530665606, 0.3597563207, -0.1422445923, 0.055544015, -0.3372542262, -0.1355669349, 0.17609936, 0.386223942, 0.1103014275, 0.0883990675, -0.4388634562, -0.3785874248, 0.1965650767, 0.8066228628, -0.0113757243, -0.261582762, -0.1113187671, -0.0873067454, 0.0143470587, 0.1853112727, 0.0202662311, -0.3324303627, 0.1831114292, 0.1143505573, -0.3629404604, -0.2521945834, 0.4006338716, -0.1277103126, 0.5490372181, 0.1106914654, -0.1825641096, 0.2825982869, 0.2046846896, -0.1684250385, -0.1567011178, 0.0916962028, -0.0014256791, 0.2913460732, -0.1304873824, 0.1080868915, -0.263481617, -0.0174487438, 0.3301565051, 0.0243161749, -0.0238242783, -0.2186670303, 0.2281158566, 0.0460558385, 0.229918018, -0.1359343082, -0.0047336901, 0.5143219829, 0.1797384918, 0.3002930582, 0.0320505537, -0.1394655406, -0.0609622933, -0.421417743, 0.0173489135, 0.1475911289, -0.1914307028, -0.116472885, 0.0196854025, -0.1824110001, -0.0891882926, -0.0083672563, 0.1318997294, -0.1650014818, 0.2644904256, 0.0364155732, 0.1938410103, 0.106560722, -0.3565620482, 0.0130213546, 0.0204762965, -0.0704322234, -0.1268788576, 0.1904789209, 0.1413710117, -0.0339481495, -0.1371246129, 0.0703349411, 0.2175324559, 0.0164674297, 0.0222989116, 0.0715771243, 0.4026204646, -0.0590977035, 0.1796621531, -0.0069611147, -0.1225646883, -0.209503457, 0.2328030318, -0.0161453914, -0.3932776153, -0.4267930686, 0.080233261, -0.3305880129, -0.46700266, -0.2758012414, 0.1919845492, -0.4273515344, -0.3020413518, -0.1257279217, 0.1029540673, -0.1907227188, -0.2069380581, 0.1016143858, 0.3802593052, -0.4875879586, -0.0005754872, -0.3736154735, -0.289591372, 0.4132217467, 0.1140811592, -0.1112022325, 0.3359065652, -0.3094168007, 0.3546552956, 0.837008357, -0.4016802013, -0.275808692, 0.622094214, -0.2426194847, 0.0267045256, 0.1759943813, 0.0300459936, 0.2986841798, -0.2243283838, -0.6506486535, 0.5972315073, -0.0663960353, 0.0441403724, -0.1612776518, -0.2266777009, 0.3191097081, 0.1394777149, 0.3316976428, 0.2728153169, 0.4186460674, -0.023584459, 0.2792358696, 0.3195460737, 0.1983102262, 0.145864889, 0.2886610031, 0.3233471513, -0.1175428852, -0.3403542042, -0.2940297127, 0.0807634965, 0.1218630821, 0.1456165165, -0.1783809215, 0.1935076416, -0.1225425005, -0.0336224288, -0.0697398484, 0.0909017995, -0.0722765848, 0.1812812537, 0.194289133, 0.0414852574, -0.108673498, 0.1285372823, 0.2902017534, 0.3188759983, 0.1650922894, 0.2465960383, -0.1522357464, 0.0011206955, 0.112192221, 0.0614288412, 0.2203386873, -0.3315291405, -0.1351702362, 0.0924694911, -0.1107329279, 0.0936809704, 0.4048471749, 0.2875031829, 0.3451217413, 0.1375148296, 0.0838565975, 0.4250739515, 0.1754143536, -0.0993347913, 0.037697155, -0.0143033005, 0.2977045476, 0.2179090381, 0.0552521534, 0.240264833, 0.1647406518, -0.0411328226, 0.0723391995, -0.1136400774, 0.2451272458, -0.0986613706, -0.1570076793, -0.1735034436, -0.1777081937, 0.0258666277, -0.119938381, -0.0781920254, 0.1950011998, 0.3921465576, 0.1654785872, -0.0244767331, 0.2006295174, 0.7358022332, 0.3375620544, 0.2228245586, 0.2597003281, -0.0042512482, 0.0336219482, -0.2456350476, 0.1866519153, 0.1149216071, -0.4359811842, 0.4135334194, -0.0206874795, 0.1957434714, -0.0184399318, -0.1528042704, 0.1500846744, 0.3519281745, -0.1117860898, -0.0641986355, -0.6870808601, -0.6479414701, -0.09838368, -0.1577110291, -0.2821217775, -0.439879626, -0.1192174628, 0.2665981948, -0.0242010094, 0.1208498403, -0.280716747, 0.0926331729, -0.3800717294, -0.4477755129, -0.2674389184, 0.1894753128, -0.1792530566, 0.0328131653, 0.344219774, -0.0277354158, 0.4250333309, 0.0987615809, 0.1917736083, -0.6420846581, -0.0550661013, 0.1851614267, -0.0226981677, -0.0905224159, 0.1784202605, -0.0125822248, 0.382063508, -0.0953880399, 0.1900235265, -0.1293123364, -0.1178375408, -0.1879601032, 0.0874172524, -0.1212429404, -0.119833447, -0.0994131789, -0.4218280911, -0.6161509752, 0.0773662552, 0.1289636642, 0.0838462934, 0.0494506359, -0.2287163734, 0.2352486551, -0.1928626895, -0.0224559456, 0.0970233753, -0.0697936863, 0.4639668465, -0.2383593768, -0.422167629, 0.2020003051, 0.0862180218, -0.1741464883, 0.2055050433, -0.3952105343, -0.3099574149, -0.1374026984, 0.3529424369, -0.1657401174, 0.2932443619, 0.259790957, 0.0003004031, 0.014257363, 0.0154754855, -0.0873999894, -0.0309704691, 0.4773540199, 0.3319084942, 0.192602396, 0.228938058, -0.0619903095, 0.5613709092, -0.0307523776, 0.189808473, 0.5820300579, -0.0288635995, 0.17071338, 0.2009477317, -0.2395557165, 0.0938965231, -0.0521430634, 0.1095564887, 0.2972458005, -0.0014330435, -0.0615591817, -0.4131025076, -0.0158429574, -0.0998508558, -0.1463213116, -0.0108165294, -0.021587396, 0.1161767393, 0.0083654439, -0.0709473044, -0.0334242806, -0.1968570352, 0.2670753002, 0.5796685219, 0.0098494589, 0.1781526059, 0.4222673774, 0.2526377738, -0.5315036178, 0.1957263947, 0.3185508549, 0.2280298471, -0.1253430992, -0.0067170891, 0.0833460242, 0.0966139287, 0.6473724246, -0.2057650983, 0.0129506551, -0.0232139975, -0.2333062142, 0.131587103, -0.0692587048, -0.1822121292, -0.0757050961, -0.1233205497, -0.1422022432, -0.020631874, -0.3912433386, 0.1817766428, 0.0007343878, -0.0052398648, -0.2144482732, 0.0324899219, -0.1783385128, -0.3002639413, -0.2489540279, -0.0533283763, -0.0423794352, 0.3873756528, 0.0693247393, 0.1101594567, 0.0047996966, 0.1454617083, -0.1333235204, -0.1317715943, -0.0213038195, -0.0248572566, 0.0687912479, 0.0237299874, 0.1662737727, 0.3021895587, -0.2050031275, -0.3380508423, -0.0449011773, 0.0523117781, 0.4842706919, 0.2997091115, -0.0966038927, -0.0566529371, -0.3616667688, 0.2137579173, -0.3207516372, 0.0823279098, 0.4879281521, -0.2429905832, -0.1529643387, -0.2608980536, 0.423853755, -0.0134333437, -0.0632638037, 0.2081470639, 0.1353588551, -0.1122119576, -0.1404910833, -0.1748723388, 0.8917751908, 0.0603307709, 0.2355374843, 0.3040159941, -0.2715131044, 0.4350164831, -0.3444148302, 0.1655254066, -0.1084210724, 0.0808990002, -0.3537235558, -0.0491864681, -0.0066246474, 0.0630972385, -0.2247195989, 0.4155178368, 0.1061226651, 0.0291224383, 0.225103274, 0.5095053911, 0.0706731379, -0.2419832349, -0.0523018911, 0.1287377775, -0.2999566197, 0.4243381917, -0.2171363682, -0.276774466, -0.0605714694, -0.1455178708, -0.3997141421, 0.0774170756, -0.3578986824, 0.1576014608, -0.0801995844, -0.1929136366, 0.1894231588, -0.0851844326, -0.424215436, -0.1446503252, -0.2077788562, -0.1700900048, -0.314052701, -0.0997423902, -0.0234299973, 0.1824529916, 0.2166318297, -0.1875999719, 0.080577448, -0.1556883007, -0.0487634875, -0.3496395946, 0.3244369626, 0.1433217525, 0.0986517817, 0.0827322975, -0.2016392201, -0.0164321046, -0.1232625321, -0.1591062397, 0.0567836612, 0.0518705584, -0.1336102933, 0.0316609703, -0.0367131829, -0.1021827534, -0.149882406, 0.3496854007, -0.4334788322, -0.0269989371, 0.120352976, 0.2029505074, -0.3344462812, -0.1306482255, 0.1898961812, -0.3276114464, -0.1984566003, 0.2118930072, -0.0969294906, -0.1923663318, -0.0317957811, 0.5712575316, 0.3682622015, -0.2154656947, -0.2258194387, -0.4168663323, -0.0864840001, -0.0604596287, -0.1216491833, 0.0431945063, -0.3707618415, 0.0794190392, 0.3085108697, -0.2533969879, -0.1913246363, 0.0808723494, 0.0539450645, -0.1011631936, 0.5919699073, 0.2054125965, 0.3187372684, 0.0919778198, -0.0924518332, -0.0520378239, -0.3047582805, 0.0018518466, -0.2380411327, 0.2110367268, 0.2047670484, -0.1962420046, 0.1818408817, -0.2734619379, -0.2555224597, 0.1578820497, -0.1329609454, 0.083624579, -0.0757940933, 0.1405836046, 0.3700134456, -0.2467727214, -0.0867528468, 0.4178486764, 0.2024152279, 0.627569437, -0.1459679604, 0.0796033517, -0.0440057591, -0.0145971822, 0.0605167523, 0.0258422177, 0.0859872699, -0.2036665827, 0.5231634378, 0.0350403078, 0.0709353164, 0.5666954517, 0.4435302019, 0.3741244972, 0.2397099733, 0.0741063133, 0.4680722952, 0.0236283075, -0.2743923366, -0.3609835207, 0.1873312742, 0.2658541203, -0.0122590354, 0.2377748489, 0.0419113524, -0.0460753106, 0.0110878916, -0.1038416401, 0.2900452018, 0.1910844296, -0.013496819, 0.2848816812, -0.0172860306, 0.1840372384, 0.0829844773, 0.3664557338, 0.1889048964, 0.0957406536, -0.175790146, 0.0497316718, 0.0919541717, -0.0033339555, 0.1116236076, -0.413598299, 0.1131742969, -0.0520081781, 0.2789857984, -0.0077179493, 0.1429694146, 0.4874724746, -0.3883008361, -0.1104035079, -0.203103289, 0.294211477, 0.0637610853, 0.3726566732, 0.2644439936, 0.000541867, -0.5395003557, 0.031713061, 0.0097182579, -0.1933443993, -0.0180445723, 0.2489157617, 0.2446536869, -0.1977078766, -0.1926324964, -0.3577364683, -0.0176849402, -0.3825720847, -0.0630710647, -0.1717902422, -0.2582588792, 0.0350045152, 0.241626367, 0.3221462369, 0.1953472942, -0.0602963641, -0.2482363135, -0.3853001595, 0.130325228, -0.0747461319, 0.3600234687, 0.2693943083, 0.2696220279, 0.2516018748, -0.0916647464, -0.0394633487, 0.0659732446, -0.0240451582, -0.3908686042, -0.1267070472, 0.862013638, 0.2531177104, 0.0156929158, -0.2131471038, -0.1203512549, -0.253300339, 0.229648158, 0.1763812006, -0.1708405614, 0.022727713, -0.136128217, 0.0022074459, 0.0250170864, 0.3607391715, 0.5824882984, -0.0028289079, -0.1660873145, -0.1079358831, -0.8020972013, 0.132608071, 0.0481189191, -0.1215116233, 0.0048924922, -0.104361698, 0.048899956, 0.3867871761, 0.1092296243, 0.2687339783, 0.1751994938, -0.266521275, -0.109771505, -0.0943667591, -0.0636223182, 0.0400735587, -0.1191883981, -0.0213764533, 0.1035268083, -0.3948248029, -0.0899235904, -0.2828963101, -0.2706706822, -0.2346845418, -0.0991405621, 0.5682693124, 0.0655270368, 0.3026094139, -0.0307278112, -0.1387579441, -0.1106656641, 0.1714861989, -0.3984921873, 0.057731159, -0.2491497099, -0.0179350786, -0.336111486, 0.4585193098, -0.6438983679, 0.0134509811, -0.1773311347, 0.4412664473, -0.4494837821, -0.1079819277, -0.4080910981, -0.0742141753, 0.4904832244, 0.1567517519, -0.120559141, 0.0770308152, -0.4493557811, -0.1922594607, 0.2789192796, -0.0046787094, -0.0711622834, -0.1112411693, 0.0880337879, -0.0942265391, -0.1011070162, -0.258910954, -0.2988598347, 0.1036853194, -0.0099989586, -0.082978718, 0.0138976062, -0.2336740792, -0.2074283361, -0.0179911628, 0.3222561479, 0.0870111063, -0.1465876698, 0.0722437873, 0.040017724 ]
https://github.com/huggingface/datasets/issues/721
feat(dl_manager): add support for ftp downloads
Downloading an `ftp` file is as simple as: ```python import urllib urllib.urlretrieve('ftp://server/path/to/file', 'file') ``` I believe this should be supported by the library, as its not using any dependency and is trivial amount of code.
I am working on a new dataset (#302) and encounter a problem downloading it. ```python # This is the official download link from https://www-i6.informatik.rwth-aachen.de/~koller/RWTH-PHOENIX-2014-T/ _URL = "ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz" dl_manager.download_and_extract(_URL) ``` I get an error: > ValueError: unable to parse ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz as a URL or as a local path I checked, and indeed you don't consider `ftp` as a remote file. https://github.com/huggingface/datasets/blob/4c2af707a6955cf4b45f83ac67990395327c5725/src/datasets/utils/file_utils.py#L188 Adding `ftp` to that list does not immediately solve the issue, so there probably needs to be some extra work.
35
feat(dl_manager): add support for ftp downloads I am working on a new dataset (#302) and encounter a problem downloading it. ```python # This is the official download link from https://www-i6.informatik.rwth-aachen.de/~koller/RWTH-PHOENIX-2014-T/ _URL = "ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz" dl_manager.download_and_extract(_URL) ``` I get an error: > ValueError: unable to parse ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz as a URL or as a local path I checked, and indeed you don't consider `ftp` as a remote file. https://github.com/huggingface/datasets/blob/4c2af707a6955cf4b45f83ac67990395327c5725/src/datasets/utils/file_utils.py#L188 Adding `ftp` to that list does not immediately solve the issue, so there probably needs to be some extra work. Downloading an `ftp` file is as simple as: ```python import urllib urllib.urlretrieve('ftp://server/path/to/file', 'file') ``` I believe this should be supported by the library, as its not using any dependency and is trivial amount of code.
[ -0.2455562949, -0.005682548, 0.0114010051, 0.268014729, -0.0810397267, 0.056356933, -0.3472586572, 0.4960229993, 0.2105844766, 0.0559276827, 0.0054221442, 0.1040770486, -0.1624987125, -0.00030075, 0.2173726708, -0.3047148585, -0.1787897944, 0.161074385, 0.1181761995, 0.1564906687, -0.3281780183, 0.2467979193, 0.0930165052, 0.0433198437, 0.0368865915, -0.0102592167, -0.0181724578, 0.2312110662, -0.3351477683, -0.4214292467, 0.1100814641, 0.0631709471, 0.4437261522, 0.1806786209, -0.0001204356, -0.0327387452, 0.2680411935, -0.100268729, -0.1045102626, -0.4727419615, -0.4627039731, -0.4231169522, 0.223462373, -0.071460709, 0.1594661474, -0.2432890534, -0.0140075563, 0.2061715424, 0.0663917735, 0.4829702079, 0.1702731401, 0.3050337136, 0.0770795718, -0.1257835925, 0.4577260911, -0.040149942, -0.0512701571, 0.248623684, 0.2742140889, -0.0884236321, 0.0582273565, -0.3440451324, -0.1427601725, 0.252089411, 0.311675936, 0.1652507633, 0.1236159429, -0.4026138484, -0.3681641817, 0.1997760534, 0.63075459, -0.0083615193, -0.2014277875, -0.0267409179, -0.1026719138, -0.0145609453, 0.1862135679, 0.0254227202, -0.3613950908, 0.1787404418, 0.1856767982, -0.3242506385, -0.2554449141, 0.3719016016, -0.1366195381, 0.5931161046, 0.0658616722, -0.1004416049, 0.2225955278, 0.2331713885, -0.256200999, -0.0763918236, 0.1533758193, 0.0574025922, 0.342337966, -0.080617629, 0.0626315698, -0.320301801, 0.0128945513, 0.3063530624, 0.1055895463, -0.0480533876, -0.1900885254, 0.2983514667, 0.0536058918, 0.3080997467, -0.1729011387, -0.0186949559, 0.5094941258, 0.2821049988, 0.2624129653, 0.0560332052, -0.1178543866, -0.119499512, -0.4622592032, 0.054779239, 0.2014469653, -0.1590368301, -0.1283294261, -0.0145572526, -0.2463680953, -0.0972509682, 0.0239098016, 0.139369145, -0.2065573633, 0.1906873435, 0.1232687235, 0.1359560192, 0.0505211428, -0.2750117779, 0.0420159511, 0.0029451479, -0.001013071, -0.1553278565, 0.1617365181, 0.1152454168, -0.0066441242, -0.1665711254, 0.0627624467, 0.1509383917, 0.0086934818, -0.0056089489, 0.1514652073, 0.3983239532, 0.0141672036, 0.1728248298, 0.0121455221, -0.1598489434, -0.243770346, 0.2962782085, -0.1052592993, -0.3810894787, -0.4174821377, 0.0826404393, -0.2794828415, -0.4609342217, -0.2328964621, 0.1762949526, -0.3809169233, -0.3419991732, -0.1022482142, 0.0753773004, -0.2319995165, -0.2129217386, 0.1630423665, 0.3832989335, -0.3571052551, 0.0077983853, -0.2994361222, -0.2983500361, 0.5073295832, 0.1147065237, -0.1210709065, 0.3324904442, -0.3670813739, 0.4251605272, 0.8384567499, -0.3629839718, -0.2417305857, 0.6288359761, -0.2879822552, 0.0591513813, 0.153185308, -0.0149555421, 0.2839210331, -0.2343827784, -0.5873805285, 0.5538026094, -0.0242183656, 0.0745493919, -0.2459794581, -0.1850320399, 0.3185218871, 0.0530270115, 0.2675329447, 0.3087221086, 0.4214220047, 0.0938495919, 0.3757404387, 0.3142936528, 0.2340302318, 0.1025050059, 0.3178477287, 0.2957000732, -0.0954595655, -0.313298285, -0.2004292756, 0.0692325011, 0.026465768, 0.1947981268, -0.1536307633, 0.1266143918, -0.1657290906, -0.0594667532, -0.1859849095, 0.0433255099, -0.0508965515, 0.1662818193, 0.1799154133, 0.1008663028, -0.0685695335, 0.0021911794, 0.244986698, 0.30674389, 0.1160971895, 0.1882428527, -0.1808428466, 0.0640042424, 0.0556330942, 0.0540283695, 0.240952611, -0.3728551269, -0.1152886674, 0.1083641872, -0.0711677894, 0.0535151586, 0.3289979994, 0.2119722813, 0.3346287012, 0.1550183892, 0.0265760142, 0.5274913907, 0.2497471124, -0.0545661077, 0.0958918482, 0.0023238931, 0.3467339873, 0.244571507, 0.0871295631, 0.2104832232, 0.1962827146, -0.0432379432, 0.0579766221, -0.1230782047, 0.1969663352, -0.0660230517, -0.2364279032, -0.2281231433, -0.1946514249, -0.0071619255, -0.0965443477, -0.0657772198, 0.2163256258, 0.4139410257, 0.2313466668, -0.0124051534, 0.1543522626, 0.6730174422, 0.2891685665, 0.1565616578, 0.3078865409, 0.1071754694, 0.0316325501, -0.2539889812, 0.2010785192, 0.1231394485, -0.3899585009, 0.4704408944, 0.0261117145, 0.1698913127, -0.034668602, -0.1393000782, 0.1403880566, 0.3499345779, -0.149204731, -0.0147419497, -0.6423720121, -0.6558084488, -0.17479828, -0.1938224584, -0.2456444502, -0.4119880795, -0.1122542173, 0.2524811029, -0.0747434273, 0.0646305829, -0.198804453, -0.0023357531, -0.2858398557, -0.4750638008, -0.1838590652, 0.243769601, -0.2298302948, 0.0236967746, 0.3109209239, -0.0177714434, 0.3862733245, 0.0264209304, 0.1282990426, -0.6088418365, -0.1003482044, 0.2114330381, -0.06976071, -0.1035302952, 0.1966164857, -0.0041563967, 0.3545367122, -0.0289516952, 0.2459471375, -0.1386424303, -0.1292087883, -0.1795073599, 0.1364056319, -0.0362180732, -0.2145152986, -0.1819326729, -0.4030963778, -0.6090557575, 0.1008849367, 0.1400819272, 0.1651468277, 0.0233957954, -0.2871913016, 0.2522779703, -0.1295568496, -0.0499398112, 0.06009515, -0.0067991759, 0.4296650589, -0.3297210932, -0.4547199607, 0.2211283296, 0.0919660926, -0.1586784273, 0.1415460855, -0.3535100818, -0.3210869133, -0.0745455697, 0.2627055645, -0.1328367144, 0.3481781483, 0.2570133507, -0.0688444078, 0.0271192007, 0.0475398637, -0.0865594894, 0.0000649877, 0.5149266124, 0.3293808401, 0.2759389877, 0.2812846303, -0.0223777723, 0.528596282, -0.0103553506, 0.2793345749, 0.6546484828, -0.1272285134, 0.1461853534, 0.1091922, -0.1454850435, 0.1041268259, -0.101028055, 0.0010330704, 0.3067159653, 0.0013139074, -0.0367010124, -0.438008666, -0.0723106414, -0.1485420614, -0.1934873313, -0.0064140507, 0.0628307462, 0.0955517665, 0.0623799637, -0.0814207122, 0.007530455, -0.1989011616, 0.2500846088, 0.6497591138, 0.0407845527, 0.1961862147, 0.4838580489, 0.2168336809, -0.5869781971, 0.2241694182, 0.3614319563, 0.2293214649, -0.084384799, -0.0729416087, 0.1597605348, 0.0196557939, 0.5835809112, -0.1355076134, 0.0800048932, -0.047918085, -0.2808924615, 0.1180664003, -0.0848712102, -0.146149084, -0.0691082925, -0.0731124356, -0.1658734679, -0.0676341578, -0.3434210122, 0.1716646105, 0.0335459895, -0.0832163393, -0.1453418583, -0.0816605836, -0.2873145044, -0.3666786849, -0.3185656369, -0.0382612869, 0.0556674302, 0.437384218, 0.0862966031, 0.1122581959, -0.0060763112, 0.087336801, -0.1287390143, -0.0676566213, -0.019992929, -0.0933445618, 0.0826147795, 0.0600006059, 0.0529029332, 0.3506923318, -0.2123599797, -0.2946431339, 0.0113192368, 0.0367581062, 0.4046424627, 0.2768713534, -0.130266428, -0.082061179, -0.2634205818, 0.2308740616, -0.3231471777, 0.0556549728, 0.491887331, -0.2641446292, -0.1055586264, -0.2606640756, 0.4776839614, -0.0560220778, -0.0490366817, 0.1593179703, 0.1289281845, -0.1247926205, -0.1060233787, -0.2019781619, 0.8354328871, 0.0649856925, 0.2609167993, 0.335947603, -0.2869062424, 0.3655299842, -0.3152894974, 0.189350605, -0.1061527431, 0.2169638872, -0.3154325783, -0.0082637183, -0.0213816594, -0.0181405321, -0.2020684928, 0.3630113304, 0.0261506122, 0.0235217866, 0.1912669539, 0.5003854036, 0.0390166566, -0.189558506, -0.0844315961, 0.1286359876, -0.2541576624, 0.474106133, -0.1847447008, -0.3270063996, -0.0958316401, -0.197880879, -0.3076321483, 0.0921459645, -0.373437047, 0.1551282853, -0.0893380716, -0.1881127805, 0.0538570099, -0.1138694733, -0.4920059443, -0.2124910504, -0.1942314655, -0.2015947998, -0.3381812871, -0.1031343639, -0.0485129356, 0.220506072, 0.2001668364, -0.2613875866, 0.1094697788, -0.1464536488, -0.0642458573, -0.4030827582, 0.3618188202, 0.206346646, 0.0949151218, 0.1159402132, -0.2067646235, -0.0417547897, -0.1645788997, -0.1535401195, 0.0540537238, 0.011224783, -0.2702169716, -0.0296820216, -0.0247207358, -0.1064531133, -0.1103560477, 0.3347577453, -0.3714747727, 0.0169316214, 0.1162067577, 0.1637613326, -0.2936353087, -0.0866939798, 0.1692096442, -0.3307698071, -0.2059764415, 0.2427508086, -0.0761062652, -0.1194310188, 0.0063627302, 0.7024658918, 0.308285296, -0.1577435881, -0.302727282, -0.483019799, -0.0736643821, -0.1577161998, -0.1569100469, -0.0099719595, -0.3055679798, 0.1837369204, 0.322018683, -0.3346726596, -0.1891776323, 0.0789669082, 0.0266300775, -0.1228438392, 0.5291393995, 0.193597123, 0.3772791922, 0.1479271501, -0.0849593878, 0.0858313441, -0.2576892078, 0.0042258454, -0.2729090452, 0.2002913654, 0.2139136195, -0.1712887585, 0.0827091038, -0.2489265203, -0.3137808144, 0.1957259327, -0.0881542861, 0.0901519656, -0.0784057081, 0.1302752644, 0.2613145113, -0.292740047, -0.0622371137, 0.3811437786, 0.1899444759, 0.6598365307, -0.1306336075, 0.0564750358, -0.159779042, 0.0279126074, 0.0813174397, -0.0285925549, 0.0531031266, -0.243413642, 0.4898529947, 0.0037947064, 0.09483172, 0.4420146048, 0.4499049783, 0.3753206432, 0.2510330677, 0.0683607608, 0.452555865, 0.0076002497, -0.2783553004, -0.252345711, 0.1419271082, 0.2004342973, -0.0196968205, 0.2268147618, 0.0370481983, -0.0154263815, -0.0489893407, -0.0836614445, 0.2508755326, 0.1625108421, -0.104066588, 0.283354938, -0.077614136, 0.2967444956, 0.0831737965, 0.3155859411, 0.2682250738, 0.0576900207, -0.1999993622, 0.0581849329, 0.0687827244, 0.021381449, 0.127767235, -0.3788020611, 0.066799596, -0.0872436389, 0.2311302423, 0.037973728, 0.1320905685, 0.540869236, -0.3658206463, -0.0806364641, -0.2153704315, 0.3437009454, 0.0707583278, 0.3460202515, 0.2400041968, 0.0189423505, -0.527771771, 0.0124395536, 0.0408415869, -0.1840170473, -0.0811839849, 0.2307441831, 0.19913131, -0.1430068612, -0.2762210369, -0.3814670742, -0.0030755373, -0.356251508, -0.0800010115, -0.130396083, -0.252127856, -0.0151869403, 0.1799146831, 0.3148267567, 0.241860047, -0.0901046991, -0.2086495608, -0.403920114, 0.1592062414, -0.1104487255, 0.3354884982, 0.3182710111, 0.2607213855, 0.3081429303, -0.0947030932, -0.0463320836, 0.0743788108, -0.0318072326, -0.2770716846, -0.0186238848, 0.8982353806, 0.172950387, 0.1287472993, -0.2275305539, -0.1510953158, -0.3705112934, 0.2907259762, 0.1069380045, -0.1794192493, 0.0605519861, -0.114129439, 0.0029371325, -0.0107165147, 0.2982533574, 0.5337734222, -0.0062853675, -0.0811569393, -0.0855013132, -0.8763769269, 0.155804351, 0.1167664751, -0.1692450643, -0.0115709333, -0.081439212, 0.0054581524, 0.3687031269, 0.0448690802, 0.1964469105, 0.2288795412, -0.280189544, 0.0005460156, -0.1079414487, -0.1100931689, 0.0365705453, -0.1058530211, -0.0856235847, 0.0952273011, -0.4726800919, -0.0680823848, -0.3004283905, -0.2796400487, -0.2702930272, -0.0819356069, 0.5554599762, 0.1181736439, 0.2426398247, -0.0563714951, -0.0953733772, -0.1059933379, 0.2550347149, -0.3881649077, 0.0448975451, -0.2764706612, -0.002236763, -0.2648375332, 0.4739515483, -0.7042846084, 0.0773480535, -0.1230428144, 0.3312743008, -0.368727684, -0.1133646742, -0.393311739, -0.1210937127, 0.4775999486, 0.2249874175, -0.1043556556, 0.0414957628, -0.4784236848, -0.1934377402, 0.2941084802, -0.0705825239, -0.0907489583, -0.0579391755, 0.1131944209, -0.0954375714, -0.1294772327, -0.3328771591, -0.2636531591, 0.1053807959, -0.0307673737, -0.1391651034, 0.0020563446, -0.2911555767, -0.2257432491, -0.0343779773, 0.2167577893, 0.1243620962, -0.1454562247, 0.0569384694, 0.0046371403 ]
https://github.com/huggingface/datasets/issues/721
feat(dl_manager): add support for ftp downloads
I know its unorthodox, but I added `ftp` download support to `file_utils` in the same PR https://github.com/huggingface/datasets/pull/722 So its possible to understand the interaction of the download component with the ftp download ability
I am working on a new dataset (#302) and encounter a problem downloading it. ```python # This is the official download link from https://www-i6.informatik.rwth-aachen.de/~koller/RWTH-PHOENIX-2014-T/ _URL = "ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz" dl_manager.download_and_extract(_URL) ``` I get an error: > ValueError: unable to parse ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz as a URL or as a local path I checked, and indeed you don't consider `ftp` as a remote file. https://github.com/huggingface/datasets/blob/4c2af707a6955cf4b45f83ac67990395327c5725/src/datasets/utils/file_utils.py#L188 Adding `ftp` to that list does not immediately solve the issue, so there probably needs to be some extra work.
33
feat(dl_manager): add support for ftp downloads I am working on a new dataset (#302) and encounter a problem downloading it. ```python # This is the official download link from https://www-i6.informatik.rwth-aachen.de/~koller/RWTH-PHOENIX-2014-T/ _URL = "ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz" dl_manager.download_and_extract(_URL) ``` I get an error: > ValueError: unable to parse ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz as a URL or as a local path I checked, and indeed you don't consider `ftp` as a remote file. https://github.com/huggingface/datasets/blob/4c2af707a6955cf4b45f83ac67990395327c5725/src/datasets/utils/file_utils.py#L188 Adding `ftp` to that list does not immediately solve the issue, so there probably needs to be some extra work. I know its unorthodox, but I added `ftp` download support to `file_utils` in the same PR https://github.com/huggingface/datasets/pull/722 So its possible to understand the interaction of the download component with the ftp download ability
[ -0.2079320699, -0.0998931378, -0.0202529989, 0.3010162711, 0.0044639125, 0.0384780839, -0.3553129733, 0.3622785509, 0.1900349408, -0.0035549207, -0.0368137993, 0.0217453893, 0.0155007541, -0.003892882, 0.2229103446, -0.3022278547, -0.1582735181, 0.0847348347, 0.0404508002, 0.1436000913, -0.3097785413, 0.2319470793, 0.1025382653, 0.0332687162, -0.0504574664, -0.0144203259, 0.0126232784, 0.2164673358, -0.3532266319, -0.4517711997, 0.1148508415, 0.0617913119, 0.3427506089, 0.1893781126, -0.000120639, 0.0197099317, 0.3356404305, -0.0973490477, -0.2229552716, -0.4683343172, -0.5454902053, -0.4111309648, 0.199321419, 0.0049573826, 0.1873627305, -0.2422081083, -0.0317680649, 0.20300363, 0.0860506445, 0.4672454, 0.1789340526, 0.3690381944, 0.0318200439, -0.191026032, 0.3959609568, 0.0568567179, -0.0408923961, 0.2149499357, 0.3350114822, -0.0349812731, 0.0446458757, -0.3629600406, -0.0632880777, 0.276286155, 0.363366574, 0.2289076596, 0.1841491461, -0.4370957613, -0.2981274426, 0.1590770334, 0.6993598938, 0.0777133107, -0.2732341886, -0.116728276, -0.0868949518, 0.086162962, 0.2511810958, -0.07963828, -0.344917208, 0.1491218656, 0.1730012298, -0.2589466572, -0.1703979075, 0.3341837525, -0.1979998499, 0.521256566, 0.0061051683, -0.1265737712, 0.2468760163, 0.2629103661, -0.2788716257, -0.1374629736, 0.1785528958, 0.0504079163, 0.337733984, -0.0213779863, 0.1397554874, -0.2761087716, -0.0083405934, 0.3188734055, 0.1086750776, -0.1116597429, -0.2271295786, 0.2703462243, 0.0646889135, 0.3599972129, -0.1743902862, -0.0469688401, 0.3693582714, 0.317500174, 0.2482454479, 0.0066879708, -0.0072053215, -0.1123005003, -0.4965154231, -0.0217915494, 0.2988586128, -0.1590374559, -0.2438595742, -0.0120563284, -0.1646547616, -0.1358543187, -0.0548004434, 0.1574222445, -0.151469335, 0.1966956705, -0.0269034524, 0.2070274651, 0.0828977898, -0.2286737114, -0.0190481935, -0.0415510349, -0.0312385578, -0.2148875594, 0.1610391885, 0.1214094087, 0.0064423825, -0.1272522062, 0.0971123129, 0.0847672969, -0.0412050709, 0.0134568932, 0.124988772, 0.4334997535, -0.0127797667, 0.2451589853, 0.0644337386, -0.2286068052, -0.2067029476, 0.2412203997, -0.1036891416, -0.4144612551, -0.303444773, 0.1017005742, -0.3632732332, -0.3726770282, -0.1595050395, 0.1136645153, -0.3486051261, -0.315356195, -0.0868327841, 0.1165035963, -0.1531252265, -0.2190990895, 0.1667490453, 0.3835818768, -0.4564206898, -0.0472965501, -0.2854029834, -0.341742903, 0.5062981248, 0.1772536337, -0.1460352242, 0.3434443176, -0.3533620536, 0.430658251, 0.8133010864, -0.3829747438, -0.371663183, 0.7050058842, -0.4238269925, 0.2211802155, 0.2233173698, -0.0965155289, 0.2633063197, -0.2493053079, -0.5300372243, 0.4649726748, -0.0029222916, -0.0015163706, -0.2496089637, -0.1350478828, 0.284167856, -0.0408970304, 0.2322320193, 0.3378987312, 0.3964926898, 0.0519448407, 0.3205004036, 0.3770961165, 0.3032009006, 0.0766609013, 0.239383176, 0.2546313405, -0.0940830112, -0.2554591298, -0.2583704293, 0.1295384616, -0.0381315164, 0.1662786752, -0.1916954666, 0.1113922521, -0.2765846848, -0.0130323097, -0.1457217187, -0.0526319146, -0.0306961723, 0.2166980356, 0.1879995912, 0.029185012, -0.0721328333, 0.059545774, 0.2788746953, 0.2985240519, 0.1559008658, 0.1172474399, -0.2246598601, 0.0273794737, -0.0366573445, 0.0024454147, 0.2337850034, -0.4035800695, -0.1247585043, 0.1427868605, -0.1231000572, 0.1376373023, 0.2947224677, 0.1800481677, 0.3189501464, 0.2410548478, -0.0431588478, 0.4741292, 0.2841286659, -0.0888024792, 0.0731866434, -0.0395187214, 0.2465721667, 0.300481528, 0.0893414617, 0.1786064506, 0.2016615272, -0.068959631, 0.0651521981, -0.1590225101, 0.2348521054, -0.1180076525, -0.0782874227, -0.1455986649, -0.1292727441, 0.0702393726, -0.1378354579, -0.068251051, 0.1008943394, 0.3550203741, 0.124639146, -0.0563089214, 0.1041947678, 0.7412890792, 0.3876667619, 0.1605448425, 0.4062668979, 0.0733301118, 0.0268039256, -0.2988280058, 0.2523022294, 0.161068663, -0.4967058599, 0.5382868648, 0.0496948734, 0.2061890066, 0.0334013924, -0.0575257353, 0.2096962184, 0.3144171536, -0.2221792787, -0.027800817, -0.6374950409, -0.6009463668, -0.1810962856, -0.1889697462, -0.2641661167, -0.4526263773, -0.1407169402, 0.2260041684, -0.108114399, 0.0873986334, -0.2180070877, 0.0166964438, -0.3855965137, -0.3432737291, -0.2249443233, 0.2820159793, -0.1479976475, 0.0275823288, 0.2968629599, 0.0026490288, 0.3359047771, 0.0013948585, 0.0883508325, -0.590895474, -0.0373854898, 0.2585212588, -0.0719509721, -0.0291324221, 0.1516278237, -0.0415061414, 0.3573754728, -0.0887710378, 0.2683822811, -0.0947293118, -0.151052326, -0.1963444352, 0.1135051176, -0.0697750524, -0.1697796434, -0.1321098953, -0.3559782803, -0.5992090702, 0.2074671239, 0.0885053575, 0.1327046752, -0.0062961192, -0.3061017394, 0.2599480748, -0.1653514951, -0.0363083482, -0.0331936851, -0.0868114606, 0.3976346552, -0.3162905276, -0.4053560197, 0.142279461, 0.1079492941, -0.1221239716, 0.2139305323, -0.3075756133, -0.2922320366, -0.1043407023, 0.2637277246, -0.1654443741, 0.3404821157, 0.3213355839, -0.1051379368, -0.0344130546, -0.0144900065, 0.0042765327, 0.0218883585, 0.5916684866, 0.3955236077, 0.1449845433, 0.2034232318, -0.0138060907, 0.6329032779, -0.0128567368, 0.3049509823, 0.6129630208, -0.0857625604, 0.1866580248, 0.1140272468, -0.1501545906, 0.1227121279, -0.1731449515, -0.0008507649, 0.3054537177, -0.0267827995, 0.0470187441, -0.3564164937, 0.0124455011, -0.161676541, -0.1752307415, 0.0791461244, 0.0412772074, 0.083871685, 0.1225030348, -0.0530438237, -0.0046047657, -0.1046292111, 0.2206705362, 0.5886508822, 0.1143935993, 0.1677811444, 0.5067595243, 0.2036756426, -0.5534312129, 0.1838192642, 0.3727283776, 0.1865552515, -0.0981060639, -0.1176687703, 0.2423764914, 0.0393035151, 0.7532054782, -0.1371989101, 0.095169276, -0.0227047559, -0.2773638666, 0.0982569233, -0.0846479908, -0.2140581906, -0.1250433922, 0.0207217764, -0.1770864874, -0.0846204981, -0.3458727002, 0.0855673999, 0.012172509, -0.034485884, -0.1708544642, -0.0390408598, -0.191938743, -0.3701970577, -0.2853298187, -0.0260419529, 0.0063992091, 0.4199693203, 0.1443028748, 0.0727240518, 0.0505155995, 0.1016794518, -0.1505738497, -0.0936837569, -0.0648625866, -0.0634382144, 0.1325101554, 0.0797577351, 0.1074750647, 0.3926927745, -0.1583866179, -0.279073149, 0.0104631688, 0.0181778707, 0.3472701013, 0.3987159431, -0.0676065758, -0.0752262548, -0.3433763385, 0.2555631101, -0.3039536178, 0.1452272087, 0.4953187406, -0.2727422118, -0.0721673295, -0.2200799435, 0.4214270413, -0.1367312521, -0.1279634535, 0.0490635224, 0.2962499559, -0.0945501775, -0.1387536228, -0.2388079911, 0.9049036503, 0.1610274762, 0.258571893, 0.2879820466, -0.293795526, 0.4278523326, -0.3093656003, 0.1490637511, -0.0305965524, 0.0727651045, -0.3319313526, -0.0442947522, -0.0298078489, 0.0314100496, -0.1724544913, 0.3442896008, 0.0497847795, 0.1140830442, 0.2147448212, 0.4392105341, 0.0458887331, -0.2011903673, 0.0374382399, 0.125683248, -0.2235938907, 0.5764858723, -0.177350685, -0.2568200827, -0.1791772097, -0.1348349154, -0.3404054642, 0.0957406759, -0.3617022038, 0.1418790221, -0.0273759551, -0.3045828342, 0.0767920166, -0.1332894862, -0.4745096266, -0.3054873347, -0.2130949646, -0.1318245977, -0.2448129654, -0.0724517778, -0.0509191565, 0.1327763647, 0.2552106082, -0.2429926097, 0.0630494729, -0.1543953568, -0.1461342126, -0.2880742252, 0.3319581747, 0.182770431, -0.0111745885, 0.0390760116, -0.2839112282, -0.04043689, -0.1150364503, -0.1783133596, 0.0523863807, -0.0619814806, -0.279843986, -0.0301724225, -0.0061628935, -0.1752233207, -0.1325213909, 0.4075365961, -0.4034807682, -0.0355723202, 0.1406914145, 0.0237756092, -0.2962318957, -0.0895977393, 0.0937840566, -0.3314380944, -0.2941505909, 0.1725308597, -0.0792763755, -0.1536646336, -0.0614634305, 0.6250383854, 0.4542086124, -0.0486429296, -0.3735593259, -0.3518791497, -0.0759581774, -0.1955541819, -0.0323209651, -0.0543921478, -0.4404830337, 0.2066712677, 0.36879614, -0.1951181442, -0.2043243051, 0.0681994781, 0.0282807089, -0.0735630542, 0.5844714046, 0.1414518058, 0.3461655378, 0.0799480081, -0.069817327, 0.0713346526, -0.3271220326, -0.0190806966, -0.2705709934, 0.2029906362, 0.2286144793, -0.2062673569, 0.1012567505, -0.1428258568, -0.1720266789, 0.1476677507, -0.0604831465, 0.0595102981, -0.0511134118, 0.0235311482, 0.3245326579, -0.1672862172, -0.1156063005, 0.4272968471, 0.2004686445, 0.6626451612, -0.1361945421, -0.0056375875, -0.1852449328, 0.0673517138, 0.0413905643, -0.0049751885, 0.0635141879, -0.1287767887, 0.495836854, -0.0079005593, 0.1307932884, 0.3999165297, 0.4293604791, 0.3676392734, 0.2517673969, -0.0209887903, 0.4518891573, 0.006791526, -0.1872092336, -0.251067251, 0.1127900779, 0.2692392468, 0.0050620544, 0.2372929603, 0.123836562, -0.0276751183, 0.0061598681, -0.0874177366, 0.3391387165, 0.196725145, -0.1461263001, 0.3032360673, -0.0212116111, 0.3283678591, 0.1042567715, 0.2872180641, 0.2324741185, 0.0244455487, -0.2458744645, 0.030698061, -0.0026338818, 0.1167890504, 0.1313145161, -0.3960454166, 0.1197960451, -0.0447746255, 0.1062575355, 0.0339798629, 0.1775738895, 0.4260556996, -0.4361588359, -0.0607526824, -0.1934912503, 0.3412930965, 0.0521255434, 0.2550955117, 0.2244349867, -0.0461190231, -0.5083354712, 0.0352218375, 0.001054337, -0.1477968395, 0.0082435803, 0.1526286602, 0.1336370707, -0.1495599598, -0.2861798704, -0.4118019342, 0.0226511154, -0.3924215436, -0.0291103646, -0.1426414549, -0.2209938914, 0.0700140074, 0.1762846708, 0.3575515747, 0.2120593041, -0.040674448, -0.2111978829, -0.3224901557, 0.1345598847, -0.1515354216, 0.3563967049, 0.279463172, 0.1905570924, 0.3203725219, -0.0804374665, -0.1068700254, 0.0160682499, -0.0057102605, -0.3274736702, -0.098621428, 0.8825436234, 0.1085709333, 0.0574117079, -0.1607704163, -0.1185568795, -0.3888342083, 0.3574135303, 0.0243344381, -0.2475162894, 0.098330684, -0.0492088646, 0.0190823432, -0.04452461, 0.3944630027, 0.4977112412, -0.0882663727, -0.1012613997, -0.0730060041, -0.9552736282, 0.2226017565, 0.1122501418, -0.1343934536, -0.0110500474, -0.0381553359, 0.0013500571, 0.3666799664, 0.0849562809, 0.2992462218, 0.1383481771, -0.2450376898, -0.0024797097, -0.133880198, -0.1508326977, 0.0156512242, -0.1462726146, 0.0034540768, 0.1538895667, -0.4318594038, -0.0710957348, -0.1886006147, -0.2279031128, -0.2627553642, -0.1107052565, 0.5203107595, 0.1448258311, 0.2329774499, -0.0968300626, -0.1354694664, -0.1302618533, 0.2230711132, -0.3745641112, 0.1055758819, -0.3027053475, 0.0150274318, -0.2752319872, 0.4236094952, -0.6369170547, 0.1009454057, -0.0892453641, 0.4044833183, -0.4081543982, -0.0905563459, -0.4338991046, -0.1059969142, 0.527469635, 0.2321297079, -0.0608138964, 0.0233164001, -0.462501049, -0.2424897105, 0.3503895998, 0.034645047, -0.102427952, -0.0361545533, 0.126906693, -0.0896055922, -0.1684692949, -0.3031350076, -0.3479734957, 0.1281344146, -0.0834492892, -0.1291953921, -0.0283845309, -0.3197999001, -0.2465522736, -0.0224164445, 0.3546430171, 0.1518903971, -0.141455248, 0.1038641185, -0.0098317983 ]
https://github.com/huggingface/datasets/issues/721
feat(dl_manager): add support for ftp downloads
@hoanganhpham1006 yes. See pull request https://github.com/huggingface/datasets/pull/722 , it has a loader for this dataset, mostly ready. There's one issue that delays it being merged - https://github.com/huggingface/datasets/issues/741 - regarding memory consumption.
I am working on a new dataset (#302) and encounter a problem downloading it. ```python # This is the official download link from https://www-i6.informatik.rwth-aachen.de/~koller/RWTH-PHOENIX-2014-T/ _URL = "ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz" dl_manager.download_and_extract(_URL) ``` I get an error: > ValueError: unable to parse ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz as a URL or as a local path I checked, and indeed you don't consider `ftp` as a remote file. https://github.com/huggingface/datasets/blob/4c2af707a6955cf4b45f83ac67990395327c5725/src/datasets/utils/file_utils.py#L188 Adding `ftp` to that list does not immediately solve the issue, so there probably needs to be some extra work.
30
feat(dl_manager): add support for ftp downloads I am working on a new dataset (#302) and encounter a problem downloading it. ```python # This is the official download link from https://www-i6.informatik.rwth-aachen.de/~koller/RWTH-PHOENIX-2014-T/ _URL = "ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz" dl_manager.download_and_extract(_URL) ``` I get an error: > ValueError: unable to parse ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz as a URL or as a local path I checked, and indeed you don't consider `ftp` as a remote file. https://github.com/huggingface/datasets/blob/4c2af707a6955cf4b45f83ac67990395327c5725/src/datasets/utils/file_utils.py#L188 Adding `ftp` to that list does not immediately solve the issue, so there probably needs to be some extra work. @hoanganhpham1006 yes. See pull request https://github.com/huggingface/datasets/pull/722 , it has a loader for this dataset, mostly ready. There's one issue that delays it being merged - https://github.com/huggingface/datasets/issues/741 - regarding memory consumption.
[ -0.2078182995, -0.1362144053, 0.0223398153, 0.3684147, -0.0426030159, 0.0941683054, -0.4160579145, 0.4587391019, 0.246598646, -0.0219785813, -0.1048667505, 0.0549302362, -0.1739568263, 0.0406178199, 0.2238925993, -0.285359174, -0.1095827222, 0.047097154, 0.0764120519, 0.14869304, -0.3671717942, 0.3155606985, 0.1266241074, -0.0520581566, -0.0608695969, 0.0682500303, -0.1144391671, 0.2525814474, -0.3424280286, -0.483261615, 0.1144611835, 0.1468006968, 0.3998347223, 0.2815963924, -0.0001227519, -0.0169629734, 0.3013392985, -0.085462369, -0.2056022584, -0.4361375868, -0.487908572, -0.438160181, 0.2045803368, 0.0155039188, 0.1532445997, -0.2656706274, -0.0692234486, 0.1311786026, 0.1514950693, 0.4167748094, 0.1480705887, 0.3967956901, 0.026126856, -0.2171594948, 0.3806228936, 0.0019359144, -0.0103930375, 0.3392914236, 0.2438278496, -0.1254050732, 0.0567795672, -0.2961391807, -0.0569781139, 0.220780924, 0.3716034591, 0.1333943605, 0.0937365741, -0.401322782, -0.3160228431, 0.1644097418, 0.5963618755, -0.0194317494, -0.2410591096, -0.1115393192, -0.1419954896, -0.0060445475, 0.2234907895, -0.0008246921, -0.4154690802, 0.1532358676, 0.1061657816, -0.3735141456, -0.2633184493, 0.3336531818, -0.1387928426, 0.5295559168, 0.0314595848, -0.1647163182, 0.3249213099, 0.2675720453, -0.3027855754, -0.1141960919, 0.1184461415, 0.0747887343, 0.2175052911, -0.1066056043, 0.0439072736, -0.3347757459, 0.0518931895, 0.308316648, 0.120549649, -0.0901615471, -0.1433765143, 0.2116676271, 0.118340753, 0.3491190076, -0.1774645597, -0.1086020023, 0.3848992586, 0.2491232157, 0.3148801923, 0.0080585461, -0.1638399959, -0.0860050991, -0.5304250121, -0.0754912496, 0.1751977503, -0.1595049948, -0.1715751588, 0.0380556695, -0.1565725356, -0.1459299475, -0.0113843456, 0.245141387, -0.1559433639, 0.2249645889, 0.0938651264, 0.1684685349, 0.0178124532, -0.2756285071, -0.0035254683, -0.0146277705, -0.0804341808, -0.121072717, 0.1708241701, 0.1132584512, 0.0096824141, -0.205760017, 0.1116543263, 0.1157027259, -0.0857893303, 0.021078283, 0.1708335131, 0.405408144, -0.0006323688, 0.1629960984, 0.0858401656, -0.1381656826, -0.1729679108, 0.2869306803, -0.0179807283, -0.4325713515, -0.3796417713, 0.0643771216, -0.3544650078, -0.4458069503, -0.2828679681, 0.2190191597, -0.311722219, -0.2606830597, -0.1746933013, 0.1834023595, -0.2685951889, -0.1940467656, 0.1424165815, 0.4873998165, -0.3776035607, -0.0931538939, -0.281863451, -0.2958834767, 0.4628068209, 0.2431241572, -0.1338122338, 0.3007456064, -0.3882219791, 0.3272663653, 0.7001004219, -0.3470092416, -0.2477439791, 0.6614429355, -0.3661955893, 0.1240253299, 0.2273063064, -0.0370961204, 0.2169184685, -0.2122603655, -0.4664956629, 0.4712204039, -0.0262594093, 0.0468970574, -0.2975869477, -0.2159233689, 0.303047061, 0.0292148776, 0.2969391346, 0.2930314541, 0.3287852407, 0.0340173878, 0.3883120418, 0.3318312168, 0.2062091529, 0.1013032421, 0.3124407232, 0.2461338937, -0.117301926, -0.241079554, -0.3073037565, 0.1516397893, -0.0485243537, 0.2113690525, -0.1167765558, 0.1303160787, -0.2362405509, -0.0487335213, -0.1344467252, -0.0297989286, -0.0940586254, 0.1506468505, 0.2303202748, 0.058866784, -0.1300015897, 0.10755153, 0.1942083389, 0.3531338274, 0.0579889342, 0.2031672299, -0.166595906, 0.0836379454, 0.0449274853, 0.0117373122, 0.1984712332, -0.3616103828, -0.1048684046, 0.1805503964, -0.1400324255, 0.1049055979, 0.3677375317, 0.1984400153, 0.346149534, 0.1714134812, 0.0351372771, 0.4303007126, 0.2232325077, -0.1132473201, 0.008280525, 0.0375887044, 0.2606928349, 0.3046486378, 0.1443363875, 0.1958297789, 0.1838884801, -0.0570909828, 0.061654035, -0.1389455795, 0.2580166459, -0.073547028, -0.1506557614, -0.15468584, -0.1694372743, 0.0279494394, -0.1301024258, -0.0157376379, 0.0681838468, 0.4152185917, 0.0894246548, -0.0254415665, 0.1282017827, 0.7226035595, 0.3775388002, 0.2367205322, 0.2860601544, 0.1250471026, 0.0694649369, -0.248347193, 0.2356324196, 0.174034059, -0.4175151289, 0.4896560609, 0.0088776276, 0.1388648897, -0.0630018041, -0.0210741702, 0.211840719, 0.3253066242, -0.2296218574, -0.1021391004, -0.5599488616, -0.6452051401, -0.2360996455, -0.1311143786, -0.3341293037, -0.5082861185, -0.1180108264, 0.2917007208, -0.0588609427, 0.0850160643, -0.2439477891, 0.1025517955, -0.3336437643, -0.4053459764, -0.2126253396, 0.1854856312, -0.1129263192, 0.0057555367, 0.3847223222, -0.09166421, 0.4335967302, -0.0226498228, 0.1536937654, -0.5495792031, -0.1093696207, 0.2470651567, -0.0960323438, -0.1344266385, 0.087641947, 0.0862905979, 0.3288467526, -0.0766500309, 0.286080718, -0.171705842, -0.1637561619, -0.1800732017, 0.1500084549, -0.0488470718, -0.1547434032, -0.2101557553, -0.3709222376, -0.6213083863, 0.1715506911, 0.1312790811, 0.1069660485, 0.1341510117, -0.2162240893, 0.2566542029, -0.1929638982, -0.1720330566, -0.020436665, -0.1622504294, 0.3975336254, -0.2929756939, -0.4353758395, 0.1951989233, 0.1112824306, -0.070470944, 0.1163329259, -0.3959719837, -0.2423496246, -0.0722929463, 0.2193661332, -0.1033338085, 0.314201355, 0.32552284, -0.0736394897, -0.0287294798, 0.0735493079, -0.048259452, 0.005885195, 0.4612644017, 0.3978134692, 0.2045586407, 0.3464245796, 0.0365736485, 0.7163605094, 0.0475804359, 0.3232113719, 0.6261863708, -0.1124063656, 0.2358406484, 0.1207487062, -0.2355272621, 0.0711993128, -0.1708737761, 0.0622378588, 0.3565027118, 0.0827783272, 0.0082879951, -0.4065493941, -0.0926927701, -0.104622826, -0.1986024529, 0.103384085, 0.0329178199, 0.0569194406, 0.0991130918, -0.1080399379, -0.0872317627, -0.2185586244, 0.2813100219, 0.5460275412, 0.0595102981, 0.1376951933, 0.3997960389, 0.3199520707, -0.6954454184, 0.1886537373, 0.2648614645, 0.1873257756, -0.0747524351, -0.1366335452, 0.163158685, 0.0525816344, 0.7220875025, 0.0064716158, -0.0054474059, -0.0492240079, -0.3526242375, 0.0318040252, -0.0241398904, -0.1140727699, -0.0388218239, 0.0115563413, -0.0579379424, -0.1526671946, -0.3361531496, 0.1889982074, 0.0135108177, -0.1281350255, -0.2438367158, -0.0805293843, -0.1624549776, -0.4324136078, -0.2699875534, -0.0022195217, 0.0509346798, 0.3524845541, 0.1653838903, 0.158551991, -0.0528845489, 0.1838971078, -0.1535263807, -0.0394318961, 0.0589005165, -0.0021916013, 0.2227854431, 0.0150485812, 0.1301360279, 0.5010691881, -0.1754179746, -0.327857852, -0.0153751103, 0.0642706454, 0.4730227888, 0.3958740532, -0.0655123144, -0.140181914, -0.2006432563, 0.2754946053, -0.3726546764, 0.1158776879, 0.4451701641, -0.2512336075, -0.1821680814, -0.2667694986, 0.4942336977, -0.0649408698, -0.0335146785, 0.1643354148, 0.248830229, -0.1114164516, -0.0914454758, -0.24424918, 1.0181764364, -0.031691201, 0.3275600672, 0.3483320773, -0.2674284577, 0.3755922019, -0.339592129, 0.1744766533, -0.1544807106, 0.165966928, -0.2527279258, -0.0472252667, -0.0009163091, 0.0243481454, -0.1145452559, 0.275788933, 0.0258849356, 0.1319818497, 0.1885782182, 0.5427918434, 0.0451934598, -0.2683277726, -0.0698963404, 0.1125917435, -0.191724658, 0.4287311733, -0.205281496, -0.3015991449, -0.1515592188, -0.1510375887, -0.3071918488, 0.0640915856, -0.343328923, 0.1522394866, -0.0954721123, -0.282951653, 0.0741138235, -0.0723655447, -0.4508011341, -0.2348687649, -0.2485982925, -0.166180566, -0.3236627579, -0.103327021, -0.0118675474, 0.154103756, 0.1638714373, -0.2366928011, 0.0903782919, -0.1399106383, -0.068679221, -0.4286664128, 0.2736344635, 0.1849133223, 0.0192768816, -0.0050366251, -0.2380009741, -0.0062386366, -0.1350816339, -0.1940035522, 0.0324501917, 0.0239187796, -0.2946555614, -0.0810281262, 0.0296227466, -0.1089011207, -0.1592520624, 0.446152091, -0.3408082426, -0.0544029064, 0.2034600377, 0.2049855888, -0.2875417173, -0.0615018383, 0.1565034688, -0.2197719365, -0.3023820817, 0.2461258173, -0.0545961857, -0.1475650668, -0.059126623, 0.6080920696, 0.4208745956, -0.1575504541, -0.1964899004, -0.4159406126, -0.1934882551, -0.1089411974, -0.1465706229, 0.0608006045, -0.34273085, 0.1878956705, 0.2939169407, -0.1560546309, -0.195559606, 0.0803404599, 0.0700088814, -0.1715662926, 0.5449560285, 0.141568318, 0.4180002213, 0.0502818003, -0.0912823305, 0.0684878156, -0.279499948, 0.0045607132, -0.2792128921, 0.2280916721, 0.1795907021, -0.2227764577, 0.1254163384, -0.1593244225, -0.2294795364, 0.1573988944, -0.0651029572, 0.1375334859, -0.1063272133, 0.0330741517, 0.3706349134, -0.2928021252, -0.0464773066, 0.4460179508, 0.2914895117, 0.7225210667, -0.1139561981, 0.019274056, -0.1755818576, 0.0347230211, 0.1067772955, 0.0230558496, 0.1457344443, -0.2059276998, 0.5104587674, -0.0693234652, 0.048607748, 0.4199605286, 0.4353286028, 0.4048267603, 0.2504309118, 0.0979635119, 0.4109677672, -0.0126729039, -0.2710824311, -0.234113127, 0.2145988345, 0.1695533544, -0.0466606021, 0.2740050256, 0.0503494963, -0.0358980894, 0.0169581082, -0.0415603407, 0.3557262123, 0.21531111, -0.0440154225, 0.1700405627, -0.0099720052, 0.2208685726, 0.1354674399, 0.3721471727, 0.2672178745, 0.0126922512, -0.2078485787, 0.0160807725, -0.0214949865, 0.1013775244, 0.1229090244, -0.4758789837, 0.0133365877, -0.0129732387, 0.1317628324, 0.0926607549, 0.0999050438, 0.6003856063, -0.3106773496, -0.1090616062, -0.2531541884, 0.3721359074, 0.0499459542, 0.304459393, 0.2552294731, -0.0597640239, -0.4850013852, 0.0903070569, 0.0666397214, -0.3369699419, 0.0156727061, 0.1888316274, 0.1627204567, -0.1406687051, -0.2628443837, -0.2626001537, -0.0054834173, -0.4511937499, -0.034080971, -0.0800018087, -0.2324447781, 0.0859892815, 0.2378677428, 0.3981632292, 0.1851016134, -0.0101095559, -0.1607216448, -0.3526367843, 0.1537136137, -0.1102504283, 0.3452932835, 0.2785932124, 0.2199973464, 0.2887622416, -0.099842526, -0.0763656273, -0.0040915222, -0.0015202503, -0.2752717137, -0.105631493, 0.8151877522, 0.1196412221, 0.0299638137, -0.1736689061, -0.173502177, -0.3805888891, 0.3163440824, 0.0709973872, -0.2252329588, 0.0813224763, -0.0717934743, 0.0010998351, 0.0225621369, 0.4185544252, 0.5415889621, -0.053932555, -0.1978936642, -0.1344046593, -0.8942685127, 0.1354989409, 0.0762990341, -0.0512326322, -0.0535025671, -0.0450739264, 0.0491699129, 0.4020187855, 0.0417294055, 0.203245014, 0.1618689597, -0.2408735603, -0.0749644637, -0.0302264523, -0.1067856327, 0.0741192326, -0.0451445989, 0.0063167592, 0.1536027193, -0.40961954, -0.1287772804, -0.2356545776, -0.1708015501, -0.2563420832, -0.1435927302, 0.5043101311, 0.0902055278, 0.2981434464, 0.0171856135, -0.1771842241, -0.1429007202, 0.1860740632, -0.3783838451, 0.078626059, -0.207483381, 0.0568384826, -0.3484966755, 0.290507853, -0.6230995655, 0.0363788009, -0.1540136784, 0.3330831826, -0.4119400978, -0.0878354758, -0.4065057635, -0.0347215496, 0.4750179648, 0.3073500991, -0.0940458626, 0.0729615241, -0.4795752764, -0.195284158, 0.3577581346, -0.1159282327, -0.0916161388, -0.0322151519, 0.1063019335, -0.1141505018, -0.1664706022, -0.3694660664, -0.2317148298, 0.1074244082, -0.0059918794, -0.0656245798, 0.0099364817, -0.2936110795, -0.2170831859, -0.0365343913, 0.2938863337, 0.0873768479, -0.1876484305, 0.0494080223, 0.0033311213 ]
https://github.com/huggingface/datasets/issues/721
feat(dl_manager): add support for ftp downloads
The problem which I have now is that this dataset seems does not allow to download? Can you share it with me pls
I am working on a new dataset (#302) and encounter a problem downloading it. ```python # This is the official download link from https://www-i6.informatik.rwth-aachen.de/~koller/RWTH-PHOENIX-2014-T/ _URL = "ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz" dl_manager.download_and_extract(_URL) ``` I get an error: > ValueError: unable to parse ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz as a URL or as a local path I checked, and indeed you don't consider `ftp` as a remote file. https://github.com/huggingface/datasets/blob/4c2af707a6955cf4b45f83ac67990395327c5725/src/datasets/utils/file_utils.py#L188 Adding `ftp` to that list does not immediately solve the issue, so there probably needs to be some extra work.
23
feat(dl_manager): add support for ftp downloads I am working on a new dataset (#302) and encounter a problem downloading it. ```python # This is the official download link from https://www-i6.informatik.rwth-aachen.de/~koller/RWTH-PHOENIX-2014-T/ _URL = "ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz" dl_manager.download_and_extract(_URL) ``` I get an error: > ValueError: unable to parse ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz as a URL or as a local path I checked, and indeed you don't consider `ftp` as a remote file. https://github.com/huggingface/datasets/blob/4c2af707a6955cf4b45f83ac67990395327c5725/src/datasets/utils/file_utils.py#L188 Adding `ftp` to that list does not immediately solve the issue, so there probably needs to be some extra work. The problem which I have now is that this dataset seems does not allow to download? Can you share it with me pls
[ -0.2195909321, -0.1120685786, -0.0246193372, 0.3834895194, -0.052603025, 0.1177398562, -0.3828472197, 0.4139447808, 0.2322626114, 0.0223057419, -0.0140954079, 0.0171898641, -0.1022190526, 0.0319084711, 0.2101530731, -0.2765794396, -0.2073132694, 0.0704653487, 0.1246692911, 0.0944501311, -0.3448494375, 0.2155541629, 0.0538636521, -0.01503383, -0.00224454, -0.0836159289, -0.0123813925, 0.1466104388, -0.4219311476, -0.4405504763, 0.0988954529, 0.0674536526, 0.4428100884, 0.228371501, -0.0001201383, -0.0678526759, 0.2262691706, -0.1244198009, -0.1119162217, -0.4976871312, -0.6040622592, -0.4267122447, 0.1677460074, -0.0655231476, 0.100852944, -0.2254551947, -0.0777879432, 0.182806477, 0.1271830946, 0.5547146201, 0.1909678429, 0.2840135396, 0.0148845557, -0.194638297, 0.3984509706, -0.0345650315, -0.0255292542, 0.2603337765, 0.2191053182, -0.039733436, 0.1848991811, -0.3369786739, -0.0732686967, 0.2586836815, 0.2793959379, 0.1339278221, 0.1869357377, -0.5500768423, -0.2737673819, 0.1698969901, 0.7219539285, 0.0584876761, -0.2320968956, 0.0399340093, -0.0457105711, -0.0285100546, 0.1964206547, 0.0886952057, -0.411162436, 0.2304246873, 0.1812593043, -0.2941673994, -0.2398546189, 0.3223290741, -0.2248306423, 0.5259875059, -0.0105328197, -0.153470248, 0.1897880733, 0.2882221937, -0.1858108789, -0.1448327303, 0.1183305755, 0.1023712531, 0.3044010401, -0.0678836554, 0.0628744513, -0.2980291843, -0.0205404982, 0.3111586273, 0.112625435, -0.1349286586, -0.1364928484, 0.2271023542, 0.0349791422, 0.2347702533, -0.1673436016, -0.0229944009, 0.4096490443, 0.258908987, 0.255489409, -0.0043368805, -0.1848018765, -0.0966106653, -0.4551789165, 0.0259515271, 0.2356129587, -0.169694528, -0.1905082911, 0.0792633444, -0.2015102804, -0.1778983176, -0.0338974111, 0.2074546665, -0.1466836333, 0.1321312785, 0.0629355833, 0.2153572589, 0.1690019667, -0.3285965323, -0.0077876239, 0.0101574752, -0.0384748615, -0.1748357564, 0.1545879245, 0.2050779462, -0.0165672842, -0.1299767047, 0.029946724, 0.0974594504, 0.0214400999, -0.0664846152, 0.2248134315, 0.4637011886, 0.070134066, 0.2412341833, 0.0547638796, -0.1556605697, -0.1665830761, 0.3274120688, -0.0776169747, -0.3467560709, -0.3879063427, 0.1058623344, -0.3641716242, -0.4292060435, -0.2181127816, 0.1445101947, -0.319529146, -0.2302259505, -0.0655010715, 0.1692451239, -0.1796378344, -0.2509211898, 0.1736599803, 0.395344615, -0.4349628687, 0.0290006679, -0.3200614154, -0.3286035061, 0.5275196433, 0.1898431927, -0.1224433035, 0.3176208436, -0.3467460573, 0.410236448, 0.8917118907, -0.3346196711, -0.3704230487, 0.624605298, -0.3008841276, 0.0145959258, 0.2337300777, -0.0524068438, 0.317845434, -0.2185452133, -0.5774486065, 0.5390213728, -0.0026434453, -0.0013849605, -0.2533586323, -0.1590517163, 0.3335995078, -0.0122704385, 0.3183053136, 0.3677806854, 0.3756350279, 0.0217858199, 0.3828481734, 0.394122988, 0.228423804, 0.1412106603, 0.3604917228, 0.2412088215, -0.0930868536, -0.2692518532, -0.1937124133, 0.095823504, -0.0300675444, 0.2068408877, -0.1162708029, 0.1539363712, -0.2672059238, -0.0368833207, -0.2007844299, -0.0366819277, -0.0223181359, 0.1322455406, 0.1591795236, 0.0649762228, -0.1109994054, 0.0250937715, 0.2445522696, 0.2543136775, 0.1832395494, 0.2468273491, -0.2353004217, 0.0370692201, -0.0002025673, -0.0345543325, 0.2976437807, -0.3468151391, -0.1460518241, 0.0344426446, -0.1146792769, 0.0226300601, 0.3501189351, 0.2540037632, 0.2828941643, 0.065572679, 0.0102715902, 0.4430167973, 0.2658163011, -0.0549042672, 0.0487808473, -0.0302389823, 0.2986437678, 0.2185719162, 0.0507324561, 0.2505039275, 0.234432295, -0.0882807374, 0.0875612721, -0.1297132969, 0.202467069, -0.0549486354, -0.1953211278, -0.1999288499, -0.1733125895, 0.0314068645, -0.1219295934, -0.0436027683, 0.200967446, 0.3435567319, 0.142868489, -0.0367138945, 0.1076910943, 0.7519915104, 0.2806708217, 0.1639994085, 0.3033871353, 0.0694540143, 0.0829762742, -0.2507297099, 0.2020810097, 0.1029979885, -0.3249642253, 0.5216411352, 0.0256122611, 0.1925145835, 0.0141277947, -0.0935263783, 0.266774416, 0.3767358959, -0.1761632413, -0.0900337473, -0.5962130427, -0.6407170296, -0.1288957, -0.1327850223, -0.3110176623, -0.4138793945, -0.1716989279, 0.2639710903, 0.0401955582, 0.0294970144, -0.2321716845, 0.0237820316, -0.2966635227, -0.3578521609, -0.2559228837, 0.1931164265, -0.1150304824, 0.043351464, 0.3202262521, 0.0060022054, 0.3827810287, -0.0271578692, 0.1109540239, -0.6365137696, 0.0093949651, 0.2352176309, -0.0255296398, -0.0233495589, 0.1280381978, 0.1464677304, 0.3535773158, 0.0205628444, 0.2245685011, -0.0904153436, -0.1382983923, -0.2259081751, 0.05509343, -0.053506624, -0.1188601032, -0.1805923432, -0.4567270875, -0.5308477283, 0.0875443593, 0.1722158194, 0.1441113204, 0.0104326373, -0.2622849345, 0.2387212664, -0.1256550997, -0.1229224652, -0.0297261234, -0.1118735224, 0.4354459345, -0.3324559629, -0.505356133, 0.2403382361, 0.1019918323, -0.1038698554, 0.068441309, -0.3555793166, -0.2570868731, -0.1244012639, 0.3066694736, -0.1409659535, 0.2711115479, 0.3191989064, -0.1667193025, 0.0051958859, -0.0055936268, -0.0693925917, 0.0037142576, 0.5728484392, 0.42268309, 0.1594145894, 0.3276001215, 0.0024068814, 0.6448270679, -0.0095671751, 0.2822213769, 0.6291098595, -0.1618082374, 0.1219544858, 0.117067188, -0.240639776, 0.0876678973, -0.075448364, 0.0392875634, 0.2569901943, -0.0316557288, -0.0045873206, -0.3665597439, -0.1046305895, -0.2244953215, -0.1580659896, -0.0212364066, 0.0689392909, 0.1123703644, 0.0793810859, -0.1203676239, -0.0176582411, -0.2099654078, 0.1976161152, 0.6311352253, 0.0724078938, 0.1644380689, 0.4267174602, 0.2370343208, -0.5568380356, 0.1474597305, 0.2749118805, 0.2561474741, -0.1357024908, -0.0030324832, 0.248801887, 0.0404341854, 0.7217108607, -0.2233358175, 0.1260595769, 0.0106762694, -0.2298771739, 0.1163205206, -0.1070604473, -0.1702571064, -0.0390460528, -0.0372091383, -0.1960917115, -0.03007612, -0.3179141581, 0.1791243702, 0.0211200695, -0.1266051084, -0.2111358941, -0.0882481635, -0.2241411209, -0.3866356909, -0.2749638259, 0.0203403179, 0.0635185391, 0.3686639667, 0.1704253554, 0.1055455804, 0.0657220334, 0.108878985, -0.1017644852, -0.1081664488, 0.0506089628, -0.0923401415, 0.087000981, 0.0051072459, 0.0940074697, 0.4323655665, -0.1201165095, -0.2625788152, 0.0716228411, -0.0070458488, 0.4005000889, 0.3010061681, -0.1169487759, -0.1035786569, -0.2422214001, 0.1936787665, -0.2980009317, 0.0387145057, 0.5218784809, -0.2922295034, -0.1588193029, -0.2169635296, 0.4570279121, -0.0837510228, -0.0735408813, 0.1026760414, 0.1885497123, -0.0562191643, -0.1339757442, -0.184401691, 0.9474816322, 0.0006263597, 0.2272844315, 0.2905671895, -0.2102322876, 0.3450110257, -0.3195680082, 0.1814590245, -0.1474467069, 0.1320082545, -0.312477082, -0.076425083, 0.0163861439, 0.0375519171, -0.1446470618, 0.3108082116, -0.0256563313, 0.0877424031, 0.2116395086, 0.4602811038, 0.1035513878, -0.1053004339, -0.0241234619, 0.147861287, -0.1752701402, 0.5175877213, -0.1765726358, -0.3218093514, -0.1366093159, -0.1697398126, -0.3718520701, 0.0758536234, -0.3833490312, 0.0824169442, -0.1063816845, -0.3292465508, 0.1229935065, -0.0723286569, -0.424279362, -0.2412084192, -0.2548483014, -0.1742915213, -0.2951797843, -0.1632641405, -0.061075341, 0.2246733308, 0.1811348498, -0.2808566988, -0.0130473394, -0.0724506676, -0.0246470962, -0.3059979677, 0.3301271796, 0.2087539136, 0.0457782596, 0.0393143222, -0.2539335489, -0.031226268, -0.1195660979, -0.1648339778, 0.0789916143, 0.0304569378, -0.2807348371, -0.0941656381, 0.011865967, -0.1039211005, -0.1088644117, 0.4157006741, -0.3446667492, 0.0068464288, 0.169771269, 0.1644346565, -0.2480951697, -0.1656561643, 0.2473642528, -0.2960810959, -0.2661185265, 0.1913012713, -0.1005120128, -0.0942675918, -0.0505359471, 0.6551601887, 0.4011157751, -0.1281387061, -0.259178251, -0.484256953, -0.0643111616, -0.2011121511, -0.2008960694, -0.0664836541, -0.4469635487, 0.1706748307, 0.4031451643, -0.250813961, -0.2210260481, 0.123169288, -0.0719737187, -0.127924785, 0.5456640124, 0.1578343362, 0.3221290708, 0.0788177326, -0.0606031902, -0.0121932747, -0.2856481373, -0.0299186707, -0.2306778878, 0.2108377069, 0.2161490321, -0.1658072323, 0.1258392781, -0.2379730642, -0.337280333, 0.2775912583, -0.1696920097, 0.070010744, 0.01199691, 0.1533855498, 0.2888016105, -0.2897824943, -0.18607077, 0.3590415716, 0.1816688627, 0.6558064818, -0.1496988237, 0.0859206393, -0.0532655194, 0.0603953674, -0.0206977408, -0.0771494135, 0.0062193084, -0.2031152546, 0.5135410428, -0.0538603589, 0.1767508686, 0.4479883015, 0.3833979964, 0.3180070817, 0.2119261175, 0.1303647012, 0.4260500968, 0.0462131575, -0.3384755254, -0.2188011855, 0.1932467967, 0.2005939633, -0.0252603274, 0.2288805544, 0.0827229843, -0.0342295058, -0.043755658, -0.072042644, 0.3187460005, 0.1803257912, -0.0536693819, 0.2691362798, -0.0442193747, 0.2605239153, 0.1503637731, 0.3784709871, 0.1672926694, 0.0411245339, -0.2037892789, -0.0412798524, 0.0644504875, 0.0052707153, 0.1637534201, -0.451017797, 0.0703417584, -0.130504474, 0.1743477732, -0.032741908, 0.0706909522, 0.4158802629, -0.3137711585, -0.0369261652, -0.2504669726, 0.3388390541, 0.0419837125, 0.3652964234, 0.1648036838, -0.0635408238, -0.4671596289, -0.0256663505, 0.0354944579, -0.2077417225, -0.0060378253, 0.2209277898, 0.1604884714, -0.1041954085, -0.2530534863, -0.3030157387, -0.037219774, -0.4389595389, -0.0574247763, -0.1826451719, -0.2376430929, 0.0271146726, 0.2644406259, 0.3302520514, 0.2279303372, -0.0377204418, -0.1494460702, -0.3516344428, 0.0696656182, -0.1207114384, 0.3769834042, 0.3315571547, 0.2289933264, 0.3107688129, -0.0615700483, -0.0512909517, 0.0913041756, 0.015280501, -0.2757426798, -0.0464225411, 0.8493894339, 0.1211001351, 0.0498542376, -0.1883589178, -0.1459110379, -0.3266358078, 0.2783895731, 0.1192672998, -0.2139114738, 0.1260948032, -0.1155520082, 0.0180723332, -0.0688822791, 0.3841585815, 0.5230172873, 0.047604043, -0.1605903655, -0.0681994855, -0.8967128992, 0.134683758, 0.083727628, -0.1797690988, 0.0002073762, 0.0201804917, -0.013992954, 0.4384083748, 0.1066240743, 0.2803474367, 0.1367416531, -0.1346463859, -0.0751736537, -0.1375638545, -0.1080865636, 0.1513869017, -0.1366295367, 0.0082221068, 0.195193097, -0.4555907249, -0.0540172867, -0.2818756104, -0.2733703852, -0.2601461411, -0.0401615947, 0.5165086985, 0.1068886295, 0.2701792717, -0.02847494, -0.0465431511, -0.1167981699, 0.2739860415, -0.346981287, 0.0959105566, -0.1564936042, -0.0202715825, -0.2311910242, 0.3776462078, -0.6342603564, -0.0379634239, -0.1673162133, 0.3864785135, -0.4003719091, -0.1372673213, -0.3108044863, -0.086204432, 0.4823462367, 0.1522888988, -0.1266351938, 0.0065474622, -0.4691943824, -0.1850826442, 0.3231467903, -0.1022177935, -0.0873272941, -0.0631033555, 0.2039914727, -0.1114905402, -0.1419042498, -0.2607575059, -0.2664496303, 0.1900373697, -0.0605474338, -0.1300033331, 0.0141061535, -0.2847542763, -0.1756200045, -0.0043700933, 0.2746063471, 0.0575127974, -0.1825052202, -0.0254795644, 0.0080395844 ]
https://github.com/huggingface/datasets/issues/721
feat(dl_manager): add support for ftp downloads
The dataset loader is not yet ready, because of that issue. If you want to just download the dataset the old-fashioned way, just go to: https://www-i6.informatik.rwth-aachen.de/ftp/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz (the ftp link is now broken, and its available over https)
I am working on a new dataset (#302) and encounter a problem downloading it. ```python # This is the official download link from https://www-i6.informatik.rwth-aachen.de/~koller/RWTH-PHOENIX-2014-T/ _URL = "ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz" dl_manager.download_and_extract(_URL) ``` I get an error: > ValueError: unable to parse ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz as a URL or as a local path I checked, and indeed you don't consider `ftp` as a remote file. https://github.com/huggingface/datasets/blob/4c2af707a6955cf4b45f83ac67990395327c5725/src/datasets/utils/file_utils.py#L188 Adding `ftp` to that list does not immediately solve the issue, so there probably needs to be some extra work.
37
feat(dl_manager): add support for ftp downloads I am working on a new dataset (#302) and encounter a problem downloading it. ```python # This is the official download link from https://www-i6.informatik.rwth-aachen.de/~koller/RWTH-PHOENIX-2014-T/ _URL = "ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz" dl_manager.download_and_extract(_URL) ``` I get an error: > ValueError: unable to parse ftp://wasserstoff.informatik.rwth-aachen.de/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz as a URL or as a local path I checked, and indeed you don't consider `ftp` as a remote file. https://github.com/huggingface/datasets/blob/4c2af707a6955cf4b45f83ac67990395327c5725/src/datasets/utils/file_utils.py#L188 Adding `ftp` to that list does not immediately solve the issue, so there probably needs to be some extra work. The dataset loader is not yet ready, because of that issue. If you want to just download the dataset the old-fashioned way, just go to: https://www-i6.informatik.rwth-aachen.de/ftp/pub/rwth-phoenix/2016/phoenix-2014-T.v3.tar.gz (the ftp link is now broken, and its available over https)
[ -0.2821509838, -0.0215411, -0.0087811267, 0.2353302389, -0.0750114471, 0.0881376565, -0.2813770175, 0.4609620869, 0.2376454026, 0.0213105474, 0.0197127182, 0.0793239102, -0.1120399684, 0.0288053975, 0.2074829042, -0.2595874071, -0.1745925397, 0.0500783026, 0.0860737562, 0.139257431, -0.3367647231, 0.2255442888, 0.0933025703, 0.030864412, 0.0250629354, -0.026850706, -0.0471633077, 0.2105635703, -0.3284514546, -0.4584113955, 0.1427454203, 0.0775093734, 0.4306094944, 0.2409660369, -0.0001195454, 0.0194304418, 0.3105321229, -0.0597628243, -0.1921465546, -0.4733144045, -0.5679838061, -0.4453570843, 0.1962509304, -0.0225956813, 0.1427640617, -0.313526392, -0.0587529242, 0.1872794926, 0.101084359, 0.5034629703, 0.182143718, 0.2758151889, 0.0917264745, -0.1938152611, 0.3306167126, -0.0564121902, -0.0530905686, 0.2648172081, 0.2582602501, -0.107968241, 0.0960211232, -0.3503324389, -0.0996440351, 0.2647416592, 0.2908237875, 0.1488872916, 0.1582139283, -0.4356734753, -0.3246854842, 0.2026761919, 0.7000159025, 0.0620676503, -0.2714014053, -0.0443454273, -0.0864067227, -0.0254670065, 0.1995574236, 0.0327342041, -0.3621902168, 0.1935669035, 0.1648829579, -0.3147106171, -0.2591267228, 0.36368981, -0.1913253665, 0.5927682519, 0.0355498716, -0.1313800514, 0.2586608529, 0.2421823889, -0.1367231458, -0.1332245767, 0.1057118475, 0.0702272058, 0.2541285157, -0.0678745583, 0.0353642926, -0.3570438027, -0.0415238738, 0.3222970665, 0.136055693, -0.0897942409, -0.1742825657, 0.2492266744, 0.0741093606, 0.3009944856, -0.179605633, -0.0477749743, 0.4765816033, 0.2672049403, 0.3262307346, 0.0576009117, -0.1351094842, -0.1535451114, -0.4611137509, 0.0714942142, 0.2145243734, -0.1443418711, -0.18934232, 0.0324058272, -0.1543549597, -0.1804031283, -0.076699473, 0.1669010818, -0.1812232435, 0.2234869152, 0.0402882062, 0.1987624615, 0.0476838611, -0.3713331223, 0.0091268141, -0.0419540629, -0.0121167032, -0.1797747314, 0.160494864, 0.1897984147, -0.0275743864, -0.1526710391, -0.0065943957, 0.1284848452, -0.0272579379, -0.0143493069, 0.1219644025, 0.4336200655, 0.0577200241, 0.2097715139, 0.0633029491, -0.1816209704, -0.1494153142, 0.3578700721, -0.1170715913, -0.4218950272, -0.4223870933, 0.0920756832, -0.3440445065, -0.4904935062, -0.3125088215, 0.1632702202, -0.3456210196, -0.2232788056, -0.1560646296, 0.1160737649, -0.225793004, -0.181128934, 0.1352448016, 0.3909863532, -0.4929120243, 0.0246764217, -0.3338529468, -0.2905285656, 0.472633481, 0.1250496358, -0.1509480029, 0.3816463351, -0.3754279613, 0.3525735736, 0.8150745034, -0.3507855833, -0.3017642796, 0.6629593372, -0.3365699053, 0.0677958354, 0.1644970179, -0.0518243946, 0.3105322421, -0.241260156, -0.5735129118, 0.5583114028, -0.0212692264, 0.0276220161, -0.2257875353, -0.1839018464, 0.3385207057, 0.0228705034, 0.2872436941, 0.3535701036, 0.3817756176, -0.0145402513, 0.3758553267, 0.3502211273, 0.1977120787, 0.1511362344, 0.2737631202, 0.2791815102, -0.1216493472, -0.1910121292, -0.3182945848, 0.1219424754, 0.0116817532, 0.1984684765, -0.1835455298, 0.2057805657, -0.2299390435, -0.0293844771, -0.1918580532, -0.0055026761, -0.0523438528, 0.1304649264, 0.1405317932, 0.0675433129, -0.0822009891, 0.0480412431, 0.3051606715, 0.339625448, 0.1168484911, 0.2010662407, -0.2154399306, 0.0572636761, 0.0254719798, -0.0420176052, 0.2511588633, -0.3942452371, -0.159034133, 0.1220748946, -0.0913942456, 0.0655210242, 0.3380198777, 0.2291086316, 0.3188152313, 0.1212421954, 0.0016418245, 0.4901718199, 0.1867330223, -0.0628709123, 0.0488340668, 0.0486765206, 0.2936163843, 0.29263255, 0.0477472097, 0.2395986915, 0.2429679185, -0.0954049826, 0.0971741304, -0.0827441961, 0.1909263879, -0.0649103448, -0.2271271646, -0.2153149992, -0.1315476745, 0.0321929976, -0.1921300441, -0.0864679664, 0.1772976667, 0.354639709, 0.1660158187, -0.0113033745, 0.1358819902, 0.7480927706, 0.3015368581, 0.1720660925, 0.2561054826, 0.0626666024, 0.0420247577, -0.2632792592, 0.2398952395, 0.131750837, -0.3243546486, 0.4762617946, -0.0019005366, 0.1587666273, -0.0111282831, -0.085818775, 0.229482919, 0.3678602576, -0.224629879, -0.0351525731, -0.6205760837, -0.5866051316, -0.1442286074, -0.1357114911, -0.2736100554, -0.5019881129, -0.1304796636, 0.2951660454, -0.0787135065, 0.0650271103, -0.3146879375, 0.0238539167, -0.2574693859, -0.376431793, -0.1914372891, 0.2212374955, -0.1721340865, 0.0412393585, 0.3339523375, -0.0831137151, 0.3308106065, 0.0350064375, 0.151321426, -0.6007015109, -0.0285293031, 0.2332389951, -0.0630538687, -0.0624085777, 0.1022349596, 0.117067121, 0.3741819263, -0.0691221133, 0.2739331722, -0.115862608, -0.1350188553, -0.1439900398, 0.0923310071, -0.0261781458, -0.1369397193, -0.2131227553, -0.4117679596, -0.5828335881, 0.0274784379, 0.1414267421, 0.1413068175, 0.088549152, -0.1958158016, 0.1616010964, -0.0886619985, -0.1554056704, 0.0077402671, -0.1080391034, 0.4505592585, -0.3225882649, -0.4660050869, 0.2123740911, 0.0972796604, -0.1651215106, 0.0707212016, -0.4019480348, -0.319662869, -0.0820868388, 0.293310672, -0.1356043667, 0.2699170411, 0.2686161101, -0.1009518728, -0.0188563988, 0.0767825767, -0.0001746818, -0.0275561009, 0.4820994735, 0.4234928191, 0.20950149, 0.3233125806, 0.0368335992, 0.6444627047, -0.0771290213, 0.2494199276, 0.6027049422, -0.1445821226, 0.1560008079, 0.1535472572, -0.1989412457, 0.0645653978, -0.1352656782, 0.1036541387, 0.2738633156, -0.0293843374, -0.005009348, -0.3752743304, -0.0089603225, -0.1581335813, -0.2018980533, 0.0422366075, -0.0317868888, 0.0560786538, 0.10931281, -0.063311629, -0.0176114943, -0.2139256746, 0.2782016098, 0.5194919109, 0.0708415136, 0.1476032883, 0.4403630495, 0.3020989299, -0.6013342738, 0.2155666351, 0.2751153409, 0.3023557365, -0.0519281067, -0.0765482783, 0.1519102007, 0.0441629328, 0.7506866455, -0.124000527, 0.1207205728, -0.0285312049, -0.2530305982, 0.0801578164, -0.1567011029, -0.1289252341, -0.0478224121, -0.0667261556, -0.1551599503, -0.0501711406, -0.2962910831, 0.1810438186, 0.0144110667, -0.1790701747, -0.1830757558, -0.0868663862, -0.2324104905, -0.371751219, -0.2859154642, -0.0525195897, 0.06262514, 0.3296981156, 0.134036079, 0.1256369948, -0.0214328002, 0.0917511061, -0.1359563023, -0.1142070964, 0.0439661741, -0.0712706372, 0.2089936137, 0.0231880303, 0.0333668776, 0.4457805157, -0.1423973143, -0.3427381516, 0.0388874225, 0.0148114916, 0.4080197215, 0.2724861801, -0.0987556353, -0.1731152087, -0.2164422125, 0.257444948, -0.3312041461, 0.0613606721, 0.4953378141, -0.267308563, -0.1414250731, -0.2788743973, 0.4383151233, -0.1001902893, -0.0560497083, 0.1250709295, 0.1384720653, -0.0760492012, -0.0614437796, -0.2324929535, 0.8629671931, 0.0144220246, 0.2370167524, 0.3038598299, -0.1756244004, 0.3585059047, -0.3500009477, 0.1629864424, -0.136067912, 0.096843943, -0.2991203368, -0.04231425, 0.0123621086, 0.0892770812, -0.0915814191, 0.3780935407, 0.0022058457, 0.0685440749, 0.2407550216, 0.4632817507, 0.1174291298, -0.1882357299, 0.0045810496, 0.1454018205, -0.2447637171, 0.4712465703, -0.2008115947, -0.2791592479, -0.1171380356, -0.2049705833, -0.3058803082, 0.1529554576, -0.3597405851, 0.1835212111, -0.0428468399, -0.2563562989, 0.0438549556, -0.0704387203, -0.4570158422, -0.2150659859, -0.2023922205, -0.1428188235, -0.2738175988, -0.0793440342, -0.0613126308, 0.1927105039, 0.1764437407, -0.2176541984, 0.0413535833, -0.1109789088, -0.050786525, -0.4298631847, 0.3740623593, 0.1834213734, 0.0304620638, 0.0512997583, -0.1973139495, -0.0699129105, -0.0936942324, -0.1903687567, 0.0598284453, 0.0476387776, -0.2772139609, -0.042004291, 0.0035595328, -0.1311459541, -0.0879940391, 0.4120776653, -0.3942354918, -0.0091982568, 0.2196846455, 0.1942668259, -0.2773799896, -0.1044060439, 0.1771955192, -0.2804225087, -0.2604640722, 0.2247440666, -0.1293415129, -0.1274026632, 0.0148799997, 0.6381245255, 0.3654682338, -0.1188964844, -0.2743764818, -0.5013250113, -0.0295179058, -0.1777422577, -0.138068065, -0.028397819, -0.334826529, 0.1493633687, 0.3305063546, -0.2770788074, -0.2031549513, 0.0706725791, 0.0392594002, -0.1099805906, 0.5276740789, 0.1723448187, 0.3745485544, 0.0889012218, -0.0562380031, -0.0257881209, -0.2458658367, -0.0296868216, -0.2784146965, 0.2010082304, 0.224538222, -0.2131718397, 0.0854355097, -0.2243049592, -0.2534431517, 0.2500282824, -0.1331515014, 0.0895387456, -0.0641102716, 0.080528833, 0.306445837, -0.2585799694, -0.0882369429, 0.3885101974, 0.2041370124, 0.7370727658, -0.1020248458, 0.0850821659, -0.1089491174, 0.0646435022, 0.0211404599, -0.0322587863, 0.0539430119, -0.2059777826, 0.5440859199, -0.111662887, 0.1611339599, 0.4218921959, 0.4294242859, 0.3363713324, 0.1875033677, 0.0661525428, 0.4225251675, 0.0326184593, -0.281304419, -0.2828019857, 0.1432807595, 0.2398876101, -0.051054474, 0.2163700759, 0.0733694211, -0.0466284864, -0.0501247905, -0.0949195027, 0.33923769, 0.2038549483, -0.0515510105, 0.2960547507, -0.0968081504, 0.2358941287, 0.1667422056, 0.2681963146, 0.1888981164, 0.0904364809, -0.1493036002, -0.0187352728, 0.1248282492, 0.0542377383, 0.0799061507, -0.493142575, 0.1297038198, -0.1220386997, 0.1883013844, 0.0023201928, 0.1750240922, 0.4326638281, -0.3352252841, -0.0759856626, -0.2435454577, 0.3419326246, 0.0644241869, 0.3038132787, 0.1719254702, -0.0095828827, -0.4720121324, 0.0489578471, 0.0523405559, -0.285513401, -0.0627944395, 0.2283146232, 0.1387496591, -0.1609402001, -0.2634182274, -0.3478034735, -0.055828359, -0.3885509968, -0.0338363349, -0.1174168587, -0.2494976819, 0.0382823832, 0.229758203, 0.3301565647, 0.2160333395, -0.0591861792, -0.1435098648, -0.3559991717, 0.1270051152, -0.1315837055, 0.3504565656, 0.2799949348, 0.2201456726, 0.3328475654, -0.0612770654, -0.0679300427, 0.0908693299, 0.0506150797, -0.2412761599, 0.0170532167, 0.8381703496, 0.1983498633, 0.0631713122, -0.2176032513, -0.1121021882, -0.3152915835, 0.2876061201, 0.148492083, -0.264836967, 0.0957766026, -0.1258526146, 0.0186043773, -0.0145046273, 0.3802064359, 0.5779768229, 0.0022764402, -0.147517398, -0.0319152065, -0.8814560175, 0.1708934754, 0.0187445097, -0.0922378749, -0.0153412772, -0.0211308934, 0.0578300543, 0.4521678388, 0.0934952423, 0.2524433732, 0.1607096195, -0.1544791162, -0.0674721301, -0.1128527522, -0.0911043957, 0.176530838, -0.1561424881, -0.0853340253, 0.1565014571, -0.4184094071, -0.0696820542, -0.2324752212, -0.288392663, -0.2531560957, -0.1012190506, 0.5299975872, 0.1074943244, 0.2558780611, 0.0311714821, -0.0750324428, -0.183995828, 0.2173180878, -0.3720803559, 0.1014648378, -0.1989295483, -0.0357301459, -0.2310820073, 0.4101990163, -0.6611534357, 0.0198222883, -0.1762946993, 0.3600585461, -0.4730423391, -0.0884841084, -0.3927583098, -0.1201887801, 0.4417953789, 0.1423178166, -0.0831569061, 0.0282107331, -0.4381508827, -0.1811888069, 0.2574197352, -0.111069791, -0.0902612433, -0.0728064105, 0.1308192909, -0.1639689505, -0.0821131244, -0.2027186453, -0.2316452265, 0.1264265478, -0.0672128126, -0.0879967734, -0.0319009684, -0.2705280185, -0.1920364797, -0.0220187455, 0.287876755, 0.0903609619, -0.1675286442, -0.0393889435, 0.025584368 ]
https://github.com/huggingface/datasets/issues/720
OSError: Cannot find data file when not using the dummy dataset in RAG
Same issue here. I will be digging further, but it looks like the [script](https://github.com/huggingface/datasets/blob/master/datasets/wiki_dpr/wiki_dpr.py#L132) is attempting to open a file that is not downloaded yet. ``` 99dcbca09109e58502e6b9271d4d3f3791b43f61f3161a76b25d2775ab1a4498.lock ``` ``` --------------------------------------------------------------------------- UnpicklingError Traceback (most recent call last) ~/anaconda3/envs/eqa/lib/python3.7/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding) 446 try: --> 447 return pickle.load(fid, **pickle_kwargs) 448 except Exception: UnpicklingError: pickle data was truncated During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) ~/src/datasets/src/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 559 --> 560 if verify_infos: 561 verify_splits(self.info.splits, split_dict) ~/src/datasets/src/datasets/builder.py in _prepare_split(self, split_generator) 847 writer.write(example) --> 848 finally: 849 num_examples, num_bytes = writer.finalize() ~/anaconda3/envs/eqa/lib/python3.7/site-packages/tqdm/notebook.py in __iter__(self, *args, **kwargs) 227 try: --> 228 for obj in super(tqdm_notebook, self).__iter__(*args, **kwargs): 229 # return super(tqdm...) will not catch exception ~/anaconda3/envs/eqa/lib/python3.7/site-packages/tqdm/std.py in __iter__(self) 1132 try: -> 1133 for obj in iterable: 1134 yield obj /hdd/rag/cache/huggingface/modules/datasets_modules/datasets/wiki_dpr/14b973bf2a456087ff69c0fd34526684eed22e48e0dfce4338f9a22b965ce7c2/wiki_dpr.py in _generate_examples(self, data_file, vectors_files) 131 break --> 132 vecs = np.load(open(vectors_files.pop(0), "rb"), allow_pickle=True) 133 vec_idx = 0 ~/anaconda3/envs/eqa/lib/python3.7/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding) 449 raise IOError( --> 450 "Failed to interpret file %s as a pickle" % repr(file)) 451 OSError: Failed to interpret file <_io.BufferedReader name='/hdd/rag/downloads/99dcbca09109e58502e6b9271d4d3f3791b43f61f3161a76b25d2775ab1a4498'> as a pickle During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) <ipython-input-8-24351ff8ce44> in <module> 4 retriever = RagRetriever.from_pretrained("facebook/rag-sequence-nq", 5 index_name="exact", ----> 6 use_dummy_dataset=False) ~/src/transformers/src/transformers/retrieval_rag.py in from_pretrained(cls, retriever_name_or_path, **kwargs) 321 generator_tokenizer = rag_tokenizer.generator 322 return cls( --> 323 config, question_encoder_tokenizer=question_encoder_tokenizer, generator_tokenizer=generator_tokenizer 324 ) 325 ~/src/transformers/src/transformers/retrieval_rag.py in __init__(self, config, question_encoder_tokenizer, generator_tokenizer) 310 self.config = config 311 if self._init_retrieval: --> 312 self.init_retrieval() 313 314 @classmethod ~/src/transformers/src/transformers/retrieval_rag.py in init_retrieval(self) 338 339 logger.info("initializing retrieval") --> 340 self.index.init_index() 341 342 def postprocess_docs(self, docs, input_strings, prefix, n_docs, return_tensors=None): ~/src/transformers/src/transformers/retrieval_rag.py in init_index(self) 248 split=self.dataset_split, 249 index_name=self.index_name, --> 250 dummy=self.use_dummy_dataset, 251 ) 252 self.dataset.set_format("numpy", columns=["embeddings"], output_all_columns=True) ~/src/datasets/src/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, script_version, **config_kwargs) 615 builder_instance.download_and_prepare( 616 download_config=download_config, --> 617 download_mode=download_mode, 618 ignore_verifications=ignore_verifications, 619 ) ~/src/datasets/src/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 481 # Sync info 482 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values()) --> 483 self.info.download_checksums = dl_manager.get_recorded_sizes_checksums() 484 self.info.size_in_bytes = self.info.dataset_size + self.info.download_size 485 # Save info ~/src/datasets/src/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 560 if verify_infos: 561 verify_splits(self.info.splits, split_dict) --> 562 563 # Update the info object with the splits. 564 self.info.splits = split_dict OSError: Cannot find data file. ``` Thank you.
## Environment info transformers version: 3.3.1 Platform: Linux-4.19 Python version: 3.7.7 PyTorch version (GPU?): 1.6.0 Tensorflow version (GPU?): No Using GPU in script?: Yes Using distributed or parallel set-up in script?: No ## To reproduce Steps to reproduce the behaviour: ``` import os os.environ['HF_DATASETS_CACHE'] = '/workspace/notebooks/POCs/cache' from transformers import RagTokenizer, RagRetriever, RagTokenForGeneration tokenizer = RagTokenizer.from_pretrained("facebook/rag-token-nq") retriever = RagRetriever.from_pretrained("facebook/rag-token-nq", index_name="exact", use_dummy_dataset=False) ``` Plese note that I'm using the whole dataset: **use_dummy_dataset=False** After around 4 hours (downloading and some other things) this is returned: ``` Downloading and preparing dataset wiki_dpr/psgs_w100.nq.exact (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /workspace/notebooks/POCs/cache/wiki_dpr/psgs_w100.nq.exact/0.0.0/14b973bf2a456087ff69c0fd34526684eed22e48e0dfce4338f9a22b965ce7c2... --------------------------------------------------------------------------- UnpicklingError Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding) 459 try: --> 460 return pickle.load(fid, **pickle_kwargs) 461 except Exception: UnpicklingError: pickle data was truncated During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 552 # Prepare split will record examples associated to the split --> 553 self._prepare_split(split_generator, **prepare_split_kwargs) 554 except OSError: /opt/conda/lib/python3.7/site-packages/datasets/builder.py in _prepare_split(self, split_generator) 840 for key, record in utils.tqdm( --> 841 generator, unit=" examples", total=split_info.num_examples, leave=False, disable=not_verbose 842 ): /opt/conda/lib/python3.7/site-packages/tqdm/notebook.py in __iter__(self, *args, **kwargs) 217 try: --> 218 for obj in super(tqdm_notebook, self).__iter__(*args, **kwargs): 219 # return super(tqdm...) will not catch exception /opt/conda/lib/python3.7/site-packages/tqdm/std.py in __iter__(self) 1128 try: -> 1129 for obj in iterable: 1130 yield obj ~/.cache/huggingface/modules/datasets_modules/datasets/wiki_dpr/14b973bf2a456087ff69c0fd34526684eed22e48e0dfce4338f9a22b965ce7c2/wiki_dpr.py in _generate_examples(self, data_file, vectors_files) 131 break --> 132 vecs = np.load(open(vectors_files.pop(0), "rb"), allow_pickle=True) 133 vec_idx = 0 /opt/conda/lib/python3.7/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding) 462 raise IOError( --> 463 "Failed to interpret file %s as a pickle" % repr(file)) 464 finally: OSError: Failed to interpret file <_io.BufferedReader name='/workspace/notebooks/POCs/cache/downloads/f34d5f091294259b4ca90e813631e69a6ded660d71b6cbedf89ddba50df94448'> as a pickle During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) <ipython-input-10-f28df370ac47> in <module> 1 # ln -s /workspace/notebooks/POCs/cache /root/.cache/huggingface/datasets ----> 2 retriever = RagRetriever.from_pretrained("facebook/rag-token-nq", index_name="exact", use_dummy_dataset=False) /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in from_pretrained(cls, retriever_name_or_path, **kwargs) 307 generator_tokenizer = rag_tokenizer.generator 308 return cls( --> 309 config, question_encoder_tokenizer=question_encoder_tokenizer, generator_tokenizer=generator_tokenizer 310 ) 311 /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in __init__(self, config, question_encoder_tokenizer, generator_tokenizer) 298 self.config = config 299 if self._init_retrieval: --> 300 self.init_retrieval() 301 302 @classmethod /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in init_retrieval(self) 324 325 logger.info("initializing retrieval") --> 326 self.index.init_index() 327 328 def postprocess_docs(self, docs, input_strings, prefix, n_docs, return_tensors=None): /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in init_index(self) 238 split=self.dataset_split, 239 index_name=self.index_name, --> 240 dummy=self.use_dummy_dataset, 241 ) 242 self.dataset.set_format("numpy", columns=["embeddings"], output_all_columns=True) /opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, script_version, **config_kwargs) 609 download_config=download_config, 610 download_mode=download_mode, --> 611 ignore_verifications=ignore_verifications, 612 ) 613 /opt/conda/lib/python3.7/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 474 if not downloaded_from_gcs: 475 self._download_and_prepare( --> 476 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 477 ) 478 # Sync info /opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 553 self._prepare_split(split_generator, **prepare_split_kwargs) 554 except OSError: --> 555 raise OSError("Cannot find data file. " + (self.manual_download_instructions or "")) 556 557 if verify_infos: OSError: Cannot find data file. ``` Thanks
387
OSError: Cannot find data file when not using the dummy dataset in RAG ## Environment info transformers version: 3.3.1 Platform: Linux-4.19 Python version: 3.7.7 PyTorch version (GPU?): 1.6.0 Tensorflow version (GPU?): No Using GPU in script?: Yes Using distributed or parallel set-up in script?: No ## To reproduce Steps to reproduce the behaviour: ``` import os os.environ['HF_DATASETS_CACHE'] = '/workspace/notebooks/POCs/cache' from transformers import RagTokenizer, RagRetriever, RagTokenForGeneration tokenizer = RagTokenizer.from_pretrained("facebook/rag-token-nq") retriever = RagRetriever.from_pretrained("facebook/rag-token-nq", index_name="exact", use_dummy_dataset=False) ``` Plese note that I'm using the whole dataset: **use_dummy_dataset=False** After around 4 hours (downloading and some other things) this is returned: ``` Downloading and preparing dataset wiki_dpr/psgs_w100.nq.exact (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /workspace/notebooks/POCs/cache/wiki_dpr/psgs_w100.nq.exact/0.0.0/14b973bf2a456087ff69c0fd34526684eed22e48e0dfce4338f9a22b965ce7c2... --------------------------------------------------------------------------- UnpicklingError Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding) 459 try: --> 460 return pickle.load(fid, **pickle_kwargs) 461 except Exception: UnpicklingError: pickle data was truncated During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 552 # Prepare split will record examples associated to the split --> 553 self._prepare_split(split_generator, **prepare_split_kwargs) 554 except OSError: /opt/conda/lib/python3.7/site-packages/datasets/builder.py in _prepare_split(self, split_generator) 840 for key, record in utils.tqdm( --> 841 generator, unit=" examples", total=split_info.num_examples, leave=False, disable=not_verbose 842 ): /opt/conda/lib/python3.7/site-packages/tqdm/notebook.py in __iter__(self, *args, **kwargs) 217 try: --> 218 for obj in super(tqdm_notebook, self).__iter__(*args, **kwargs): 219 # return super(tqdm...) will not catch exception /opt/conda/lib/python3.7/site-packages/tqdm/std.py in __iter__(self) 1128 try: -> 1129 for obj in iterable: 1130 yield obj ~/.cache/huggingface/modules/datasets_modules/datasets/wiki_dpr/14b973bf2a456087ff69c0fd34526684eed22e48e0dfce4338f9a22b965ce7c2/wiki_dpr.py in _generate_examples(self, data_file, vectors_files) 131 break --> 132 vecs = np.load(open(vectors_files.pop(0), "rb"), allow_pickle=True) 133 vec_idx = 0 /opt/conda/lib/python3.7/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding) 462 raise IOError( --> 463 "Failed to interpret file %s as a pickle" % repr(file)) 464 finally: OSError: Failed to interpret file <_io.BufferedReader name='/workspace/notebooks/POCs/cache/downloads/f34d5f091294259b4ca90e813631e69a6ded660d71b6cbedf89ddba50df94448'> as a pickle During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) <ipython-input-10-f28df370ac47> in <module> 1 # ln -s /workspace/notebooks/POCs/cache /root/.cache/huggingface/datasets ----> 2 retriever = RagRetriever.from_pretrained("facebook/rag-token-nq", index_name="exact", use_dummy_dataset=False) /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in from_pretrained(cls, retriever_name_or_path, **kwargs) 307 generator_tokenizer = rag_tokenizer.generator 308 return cls( --> 309 config, question_encoder_tokenizer=question_encoder_tokenizer, generator_tokenizer=generator_tokenizer 310 ) 311 /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in __init__(self, config, question_encoder_tokenizer, generator_tokenizer) 298 self.config = config 299 if self._init_retrieval: --> 300 self.init_retrieval() 301 302 @classmethod /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in init_retrieval(self) 324 325 logger.info("initializing retrieval") --> 326 self.index.init_index() 327 328 def postprocess_docs(self, docs, input_strings, prefix, n_docs, return_tensors=None): /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in init_index(self) 238 split=self.dataset_split, 239 index_name=self.index_name, --> 240 dummy=self.use_dummy_dataset, 241 ) 242 self.dataset.set_format("numpy", columns=["embeddings"], output_all_columns=True) /opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, script_version, **config_kwargs) 609 download_config=download_config, 610 download_mode=download_mode, --> 611 ignore_verifications=ignore_verifications, 612 ) 613 /opt/conda/lib/python3.7/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 474 if not downloaded_from_gcs: 475 self._download_and_prepare( --> 476 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 477 ) 478 # Sync info /opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 553 self._prepare_split(split_generator, **prepare_split_kwargs) 554 except OSError: --> 555 raise OSError("Cannot find data file. " + (self.manual_download_instructions or "")) 556 557 if verify_infos: OSError: Cannot find data file. ``` Thanks Same issue here. I will be digging further, but it looks like the [script](https://github.com/huggingface/datasets/blob/master/datasets/wiki_dpr/wiki_dpr.py#L132) is attempting to open a file that is not downloaded yet. ``` 99dcbca09109e58502e6b9271d4d3f3791b43f61f3161a76b25d2775ab1a4498.lock ``` ``` --------------------------------------------------------------------------- UnpicklingError Traceback (most recent call last) ~/anaconda3/envs/eqa/lib/python3.7/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding) 446 try: --> 447 return pickle.load(fid, **pickle_kwargs) 448 except Exception: UnpicklingError: pickle data was truncated During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) ~/src/datasets/src/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 559 --> 560 if verify_infos: 561 verify_splits(self.info.splits, split_dict) ~/src/datasets/src/datasets/builder.py in _prepare_split(self, split_generator) 847 writer.write(example) --> 848 finally: 849 num_examples, num_bytes = writer.finalize() ~/anaconda3/envs/eqa/lib/python3.7/site-packages/tqdm/notebook.py in __iter__(self, *args, **kwargs) 227 try: --> 228 for obj in super(tqdm_notebook, self).__iter__(*args, **kwargs): 229 # return super(tqdm...) will not catch exception ~/anaconda3/envs/eqa/lib/python3.7/site-packages/tqdm/std.py in __iter__(self) 1132 try: -> 1133 for obj in iterable: 1134 yield obj /hdd/rag/cache/huggingface/modules/datasets_modules/datasets/wiki_dpr/14b973bf2a456087ff69c0fd34526684eed22e48e0dfce4338f9a22b965ce7c2/wiki_dpr.py in _generate_examples(self, data_file, vectors_files) 131 break --> 132 vecs = np.load(open(vectors_files.pop(0), "rb"), allow_pickle=True) 133 vec_idx = 0 ~/anaconda3/envs/eqa/lib/python3.7/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding) 449 raise IOError( --> 450 "Failed to interpret file %s as a pickle" % repr(file)) 451 OSError: Failed to interpret file <_io.BufferedReader name='/hdd/rag/downloads/99dcbca09109e58502e6b9271d4d3f3791b43f61f3161a76b25d2775ab1a4498'> as a pickle During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) <ipython-input-8-24351ff8ce44> in <module> 4 retriever = RagRetriever.from_pretrained("facebook/rag-sequence-nq", 5 index_name="exact", ----> 6 use_dummy_dataset=False) ~/src/transformers/src/transformers/retrieval_rag.py in from_pretrained(cls, retriever_name_or_path, **kwargs) 321 generator_tokenizer = rag_tokenizer.generator 322 return cls( --> 323 config, question_encoder_tokenizer=question_encoder_tokenizer, generator_tokenizer=generator_tokenizer 324 ) 325 ~/src/transformers/src/transformers/retrieval_rag.py in __init__(self, config, question_encoder_tokenizer, generator_tokenizer) 310 self.config = config 311 if self._init_retrieval: --> 312 self.init_retrieval() 313 314 @classmethod ~/src/transformers/src/transformers/retrieval_rag.py in init_retrieval(self) 338 339 logger.info("initializing retrieval") --> 340 self.index.init_index() 341 342 def postprocess_docs(self, docs, input_strings, prefix, n_docs, return_tensors=None): ~/src/transformers/src/transformers/retrieval_rag.py in init_index(self) 248 split=self.dataset_split, 249 index_name=self.index_name, --> 250 dummy=self.use_dummy_dataset, 251 ) 252 self.dataset.set_format("numpy", columns=["embeddings"], output_all_columns=True) ~/src/datasets/src/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, script_version, **config_kwargs) 615 builder_instance.download_and_prepare( 616 download_config=download_config, --> 617 download_mode=download_mode, 618 ignore_verifications=ignore_verifications, 619 ) ~/src/datasets/src/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 481 # Sync info 482 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values()) --> 483 self.info.download_checksums = dl_manager.get_recorded_sizes_checksums() 484 self.info.size_in_bytes = self.info.dataset_size + self.info.download_size 485 # Save info ~/src/datasets/src/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 560 if verify_infos: 561 verify_splits(self.info.splits, split_dict) --> 562 563 # Update the info object with the splits. 564 self.info.splits = split_dict OSError: Cannot find data file. ``` Thank you.
[ -0.2258687764, -0.0487167984, 0.0123972688, 0.1052549779, 0.3706668019, -0.0698539391, 0.332316637, 0.2692304254, 0.0155125251, 0.325091213, -0.1394265443, 0.2176526636, -0.063734889, -0.3219818175, -0.015681345, 0.0387511514, 0.0088648042, 0.1769445539, -0.2071303129, -0.2274692059, -0.2748767138, 0.0712657496, -0.2206947803, -0.0241294354, -0.6810173988, 0.1146389246, -0.0578162186, 0.3083188236, -0.195423618, -0.2516302764, 0.2026070803, -0.3225419819, 0.2263192385, 0.703583777, -0.0001225423, 0.2990082502, 0.1429332048, -0.2735657692, -0.2608666718, -0.2786888778, 0.4701995552, -0.0021999725, -0.1336365491, -0.2349150777, -0.3879038692, -0.0179221332, 0.1504859775, -0.2608036101, 0.1146475822, 0.4453884959, 0.1201403067, 0.5135039687, -0.078926459, -0.1666063666, 0.4416401982, -0.1321118623, -0.2456285506, 0.2880708873, 0.1355748475, -0.3839827776, -0.2244361043, 0.3043577671, 0.0357951112, 0.2144888937, 0.0499639511, 0.1509965658, -0.331099391, -0.1621897072, 0.2034893483, 0.1592781246, 0.4668169022, -0.1024601087, -0.41012609, 0.1078531072, -0.1492984444, -0.0118920328, 0.30808267, 0.2507409155, -0.2307936251, 0.3093441427, -0.1880169958, 0.1411208361, -0.1838115305, 0.3203995526, -0.1091687903, 0.5142391324, -0.0597858578, 0.1333448142, 0.0515007488, 0.2669829428, -0.1275483221, -0.0532714538, 0.2568568587, 0.1107258052, -0.4334582984, -0.0851476118, -0.1417585313, -0.2281457931, 0.0090547968, 0.2838831842, 0.1190404072, -0.0872801021, -0.0506171547, 0.0559017882, -0.0747929886, 0.0031040474, -0.4398023486, 0.3263715804, 0.1369173378, 0.0633960664, -0.0617392361, -0.255621165, 0.0124683967, -0.0752048418, -0.1377577335, -0.0830673873, 0.295248419, -0.1419145763, -0.3792671263, -0.1376510262, -0.2718304694, 0.0449154079, -0.0649192408, 0.5335166454, -0.1762444973, 0.0942437202, 0.2233513594, 0.2114504725, -0.3598035872, -0.2135164142, -0.189420566, 0.1914025992, -0.2589718997, -0.069558531, 0.3361576498, 0.1515608579, 0.5469791293, -0.042223841, -0.0395791791, 0.0757380053, 0.5255914927, -0.345249474, 0.1852509975, 0.3671408296, -0.095737353, 0.1022147015, 0.3197234869, 0.0107706431, -0.0048439046, 0.1602140218, -0.1347940415, -0.4402830601, -0.0159309059, 0.1230595037, -0.0964481458, -0.0022723719, 0.5216624141, -0.3452539146, 0.0150449807, -0.0186985787, 0.1125786752, -0.0878418684, -0.3588058054, -0.1775870919, 0.1657053381, 0.3699545562, -0.4192666709, -0.0607251376, 0.0974298567, 0.1354824454, 0.272669971, 0.407297343, -0.2612980902, 0.5780159831, -0.3673044145, -0.0979127213, 0.2546081543, -0.3039743304, -0.4831534922, -0.0294233449, -0.2176700234, 0.3169547617, 0.3235011101, 0.1196948364, 0.0952949151, 0.1186118349, 0.060386315, 0.2023347467, -0.0112885302, -0.1898553669, -0.3436117768, -0.360273242, 0.3072981834, 0.3618114293, 0.3364823163, 0.0394935869, -0.0466331616, 0.2522999942, 0.2554250956, -0.1765722781, 0.013517214, 0.3977081478, 0.2658633292, 0.0652287677, 0.1295242608, -0.2036165595, -0.0927457064, 0.2144520283, 0.0100934599, 0.1594749093, 0.0780225098, -0.2786821425, -0.2695263326, -0.1588254273, -0.246627301, -0.4860781729, 0.0125515647, 0.3241277933, 0.2520538867, -0.0928551257, -0.2521234453, 0.4377958477, -0.1952870041, 0.2539069951, -0.3626698554, 0.3693113923, -0.1394771039, -0.1955275685, -0.1041213572, 0.0695497245, 0.0412250087, -0.1709702164, 0.0008805573, 0.3422064781, 0.2573971748, -0.3763898015, 0.2662564814, 0.0578549914, 0.0825238973, -0.1192289889, -0.0103513896, 0.4316681027, 0.2286316305, 0.0311590042, -0.1992192566, 0.2342781872, -0.0837529674, -0.0150447162, -0.063218832, -0.0380302183, 0.2054507434, -0.245583266, 0.0543308482, 0.0540948361, 0.2960954309, 0.0623821355, 0.5005345941, -0.0863631666, -0.1532841921, -0.0471563302, 0.4012604654, -0.043924164, 0.0086468617, 0.1421052963, -0.1760939807, 0.1003632843, -0.0817500502, -0.1644159704, 0.5894432068, 0.1907704622, 0.0153244939, 0.0057597463, 0.0197613277, -0.1352094561, -0.057937935, 0.0057315184, 0.1119224578, 0.2939568758, 0.0104547553, 0.0019572298, -0.2046601921, -0.2126516998, 0.1033593565, 0.2841062248, -0.0861584693, 0.0140034268, -0.229308486, 0.2530737221, -0.110731259, 0.0085564917, -0.2427496761, -0.1266785115, 0.0411274917, 0.2089066356, -0.0423333496, 0.3041034937, 0.0923553705, 0.0221103821, 0.2015033066, -0.1954921037, -0.1071510017, -0.1214263663, -0.2365637273, -0.0093305791, -0.0095359357, -0.0754373893, 0.2127889842, -0.275541991, -0.0830220208, -0.5109937787, -0.2276020795, 0.0538616292, 0.2870909274, 0.2047029287, 0.1335325837, 0.2145301551, -0.0626157671, -0.0509738736, 0.2801601887, -0.2143447995, -0.16846928, 0.0525324792, -0.0789890736, 0.2073692679, 0.0410682298, -0.6410493255, -0.3373050392, -0.2971861959, -0.1248567998, -0.0847930834, -0.0033859792, -0.1192247123, 0.1342246234, 0.2047805637, 0.0360467844, -0.0473384224, -0.1238317564, -0.213477999, 0.503973186, -0.0896634534, -0.2254340947, 0.1115515679, -0.2123594582, 0.0627878085, 0.2687756121, -0.5052883029, -0.5236569643, -0.0911487043, 0.3369217515, -0.1908479184, 0.0894641876, 0.4921668172, -0.3213090003, -0.0286874436, -0.0757977068, -0.048251152, 0.1265073419, -0.1775064915, 0.4617242515, -0.0131950639, 0.2616959214, 0.206970349, 1.1618540287, 0.2212000489, -0.0264964029, 0.0756130666, -0.0601713657, 0.3890320659, -0.220643416, -0.1952375025, 0.1699874699, -0.0849357918, -0.0233409964, 0.1195212677, -0.0171636455, 0.1315138042, -0.0434008986, -0.0431160927, -0.3271125257, -0.0630914941, 0.3613577783, 0.2374396473, 0.1733064055, 0.1608203948, 0.2168279439, -0.1940924227, -0.106320031, 0.1944047064, 0.4131209552, 0.0717763081, 0.1459723264, -0.2727351785, 0.0053168824, -0.2924444079, 0.1266801655, -0.1389421523, 0.2734208703, -0.0478718951, -0.0166706499, 0.0786936134, -0.0301470235, 0.8610992432, -0.2157859206, 0.0723629445, 0.1461740136, -0.4310404658, -0.1535595804, -0.1024156287, -0.2645184994, -0.1194295585, 0.6156064272, 0.5470614433, -0.1647453308, -0.0651735812, 0.4011293054, 0.0672708303, -0.0415488631, -0.0908467397, -0.3198336661, -0.3359073699, -0.2896226048, -0.0756410509, -0.0588875525, 0.1726744026, 0.0725100413, 0.2630054653, -0.3187338412, 0.1581831574, -0.0134523511, -0.1048915535, 0.2868012488, -0.3563991189, 0.2334049791, 0.2810389996, 0.3141557574, 0.1240829527, 0.4758907855, -0.1620748192, -0.5533201098, 0.2848447859, -0.00894171, 0.110037066, 0.3649657965, -0.0149250422, 0.0206317566, -0.0600723326, 0.3059138954, -0.2079597712, 0.1888484806, 0.1273121983, 0.1805801392, -0.0055888477, -0.2922881842, 0.2343427539, -0.0100592552, 0.1217102334, 0.2594496608, -0.1489347517, -0.037146125, 0.8069674373, -0.0851554498, 1.0018047094, -0.0164091364, 0.3242409229, 0.2122616321, -0.1894019395, 0.3186566532, -0.8604213595, 0.3705363274, -0.3098127544, -0.2558270991, -0.2118626684, -0.2688035965, 0.2725955248, 0.5007385612, -0.2377668321, 0.3705540299, 0.1126124188, 0.5121013522, 0.1188102886, 0.3404254615, 0.1157987267, -0.0725708604, 0.1873908192, 0.0555038266, -0.0894560516, 0.5973532796, 0.0034106693, -0.0756132901, -0.3768140972, -0.0559505485, -0.0864164531, 0.1534359157, -0.5980364084, 0.1214438379, 0.4480593801, -0.3019879758, -0.1662078798, 0.2210668921, 0.4297847152, 0.2084309012, -0.1015106887, 0.3052921593, 0.0094820904, -0.1383113116, 0.2651391327, -0.1400010139, 0.1618787795, -0.0763959363, -0.4398625493, 0.2476786673, -0.3299741149, -0.3752298951, 0.2602828443, -0.0489758775, 0.3252381682, -0.312746048, -0.2047451138, -0.0382040888, -0.1589910984, -0.1972967684, 0.0725952536, -0.0142964683, -0.2147476375, -0.0079059005, -0.1116085202, -0.43357867, -0.2141373008, 0.3808214366, 0.0006373319, 0.0819537789, 0.5034265518, -0.171719566, -0.2764571309, -0.1857311726, 0.0238212217, 0.225745365, -0.4661903977, -0.1291016489, 0.0142126437, -0.0213844255, 0.0779137239, -0.3143895566, 0.3677605391, -0.0758166164, -0.5247260928, -0.4727155268, -0.2337950021, -0.0284098461, 0.2426601797, 0.1366358399, 0.0898083523, 0.1172855049, 0.1010093763, 0.0829969049, -0.2611965835, 0.127461791, -0.3284143806, 0.2241390049, -0.0823824853, -0.432854414, 0.1134232208, -0.0398010723, 0.0124955196, 0.1324869841, -0.2328980565, -0.1520703733, -0.0522510223, 0.151051864, 0.0293509755, -0.1678695828, -0.062726967, -0.0445904285, -0.0316796973, -0.1187211573, 0.165716663, 0.2946430445, 0.1132881567, 0.0098576853, -0.073121123, -0.1555408835, -0.1787895113, -0.0207024347, -0.1610880196, 0.2682994008, 0.2411251366, 0.1016140208, -0.0367549509, 0.0535285547, -0.0402751863, -0.0307253767, -0.0901164189, -0.0944979042, 0.3644738495, -0.4622707367, -0.0739852637, -0.1404036134, 0.1395463645, -0.0114121633, -0.3465527296, -0.1271582097, 0.3380663693, 0.1625089943, -0.433301419, -0.0775827691, 0.2363433242, 0.0022680017, 0.2374141067, 0.2966208458, 0.0799448565, 0.0015986802, 0.2902958095, 0.0931020677, 0.3097211123, -0.2249631435, -0.0230651945, -0.0278912932, 0.0482489727, 0.1535487473, 0.1837677062, 0.0473947488, 0.0814309418, 0.4353086948, 0.1530239433, 0.2819972634, -0.0381258875, 0.1200999916, -0.1897053421, -0.4449409842, -0.2815669775, 0.3054927886, -0.235494256, -0.0182446614, -0.3626362383, 0.0558638759, -0.1567470878, -0.1506152302, -0.040276777, -0.118990384, -0.2089491636, 0.1465531588, -0.0952106714, -0.0301973391, -0.1931044757, 0.1028112024, 0.1171645299, -0.1189524159, 0.0187288653, 0.0301827565, -0.282351017, 0.1210343689, -0.113258943, 0.08803574, -0.0462889746, -0.2088494152, 0.187075749, 0.2697920501, 0.0533145405, 0.0685411021, 0.3685553074, 0.4437267482, 0.2311637849, -0.2230362892, 0.1924250722, -0.0318633243, -0.0763218254, -0.030568745, 0.1595977843, -0.1536245644, -0.0688811764, 0.39705351, 0.0480839275, -0.1895269006, -0.3199322522, 0.0274742804, 0.0225165542, -0.4600143135, 0.2075293809, -0.0441923738, -0.0788601786, 0.006566321, -0.0245959125, -0.5514101386, 0.1278147697, 0.380364418, 0.025265513, 0.2749297023, 0.128145203, 0.0078003453, -0.278765589, 0.0311802085, 0.4185278714, -0.0350199677, -0.5950030088, -0.3033542633, -0.4331483245, 0.0840362832, -0.569270134, -0.2926072478, 0.0010129281, 0.2485014647, 0.0891627893, 0.1719408631, 0.3557213247, -0.1054760367, 0.0784785226, 0.4126327038, -0.4025352597, -0.1663887501, -0.3254977167, 0.2052409947, 0.080054231, -0.7052714229, 0.0650315881, 0.3884375691, 0.0101613244, 0.1391600817, -0.0993561745, 0.354144156, 0.0327953584, 0.119463563, -0.1563092023, 0.2681681812, 0.047163751, -0.0312046725, 0.1960100532, 0.0786780268, -0.1172627211, 0.007538348, 0.078615047, 0.5020299554, -0.158609271, -0.1609353721, -0.2771388292, 0.2690274119, 0.1713733077, -0.1698032469, 0.1241606921, 0.2329680473, -0.0899593085, 0.227147758, 0.2715690136, 0.3370777667, -0.0686972141, 0.0453813374, -0.3402681053, -0.0994827524, 0.5833815932, -0.3087987602, -0.2146811485, -0.1653167456, 0.116828233, -0.053247869, 0.2518344522, -0.4316257834, -0.0399833657, 0.3314809203, 0.0645505488, -0.1202180162, -0.0008697988, 0.0577102378, 0.054166805, -0.0688192174, 0.2568714321, -0.0468435958, -0.218679145, -0.1020399183, -0.2438038141 ]
https://github.com/huggingface/datasets/issues/720
OSError: Cannot find data file when not using the dummy dataset in RAG
An update on my end. This seems like a transient issue. Reran the script from scratch overnight with no errors.
## Environment info transformers version: 3.3.1 Platform: Linux-4.19 Python version: 3.7.7 PyTorch version (GPU?): 1.6.0 Tensorflow version (GPU?): No Using GPU in script?: Yes Using distributed or parallel set-up in script?: No ## To reproduce Steps to reproduce the behaviour: ``` import os os.environ['HF_DATASETS_CACHE'] = '/workspace/notebooks/POCs/cache' from transformers import RagTokenizer, RagRetriever, RagTokenForGeneration tokenizer = RagTokenizer.from_pretrained("facebook/rag-token-nq") retriever = RagRetriever.from_pretrained("facebook/rag-token-nq", index_name="exact", use_dummy_dataset=False) ``` Plese note that I'm using the whole dataset: **use_dummy_dataset=False** After around 4 hours (downloading and some other things) this is returned: ``` Downloading and preparing dataset wiki_dpr/psgs_w100.nq.exact (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /workspace/notebooks/POCs/cache/wiki_dpr/psgs_w100.nq.exact/0.0.0/14b973bf2a456087ff69c0fd34526684eed22e48e0dfce4338f9a22b965ce7c2... --------------------------------------------------------------------------- UnpicklingError Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding) 459 try: --> 460 return pickle.load(fid, **pickle_kwargs) 461 except Exception: UnpicklingError: pickle data was truncated During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 552 # Prepare split will record examples associated to the split --> 553 self._prepare_split(split_generator, **prepare_split_kwargs) 554 except OSError: /opt/conda/lib/python3.7/site-packages/datasets/builder.py in _prepare_split(self, split_generator) 840 for key, record in utils.tqdm( --> 841 generator, unit=" examples", total=split_info.num_examples, leave=False, disable=not_verbose 842 ): /opt/conda/lib/python3.7/site-packages/tqdm/notebook.py in __iter__(self, *args, **kwargs) 217 try: --> 218 for obj in super(tqdm_notebook, self).__iter__(*args, **kwargs): 219 # return super(tqdm...) will not catch exception /opt/conda/lib/python3.7/site-packages/tqdm/std.py in __iter__(self) 1128 try: -> 1129 for obj in iterable: 1130 yield obj ~/.cache/huggingface/modules/datasets_modules/datasets/wiki_dpr/14b973bf2a456087ff69c0fd34526684eed22e48e0dfce4338f9a22b965ce7c2/wiki_dpr.py in _generate_examples(self, data_file, vectors_files) 131 break --> 132 vecs = np.load(open(vectors_files.pop(0), "rb"), allow_pickle=True) 133 vec_idx = 0 /opt/conda/lib/python3.7/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding) 462 raise IOError( --> 463 "Failed to interpret file %s as a pickle" % repr(file)) 464 finally: OSError: Failed to interpret file <_io.BufferedReader name='/workspace/notebooks/POCs/cache/downloads/f34d5f091294259b4ca90e813631e69a6ded660d71b6cbedf89ddba50df94448'> as a pickle During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) <ipython-input-10-f28df370ac47> in <module> 1 # ln -s /workspace/notebooks/POCs/cache /root/.cache/huggingface/datasets ----> 2 retriever = RagRetriever.from_pretrained("facebook/rag-token-nq", index_name="exact", use_dummy_dataset=False) /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in from_pretrained(cls, retriever_name_or_path, **kwargs) 307 generator_tokenizer = rag_tokenizer.generator 308 return cls( --> 309 config, question_encoder_tokenizer=question_encoder_tokenizer, generator_tokenizer=generator_tokenizer 310 ) 311 /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in __init__(self, config, question_encoder_tokenizer, generator_tokenizer) 298 self.config = config 299 if self._init_retrieval: --> 300 self.init_retrieval() 301 302 @classmethod /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in init_retrieval(self) 324 325 logger.info("initializing retrieval") --> 326 self.index.init_index() 327 328 def postprocess_docs(self, docs, input_strings, prefix, n_docs, return_tensors=None): /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in init_index(self) 238 split=self.dataset_split, 239 index_name=self.index_name, --> 240 dummy=self.use_dummy_dataset, 241 ) 242 self.dataset.set_format("numpy", columns=["embeddings"], output_all_columns=True) /opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, script_version, **config_kwargs) 609 download_config=download_config, 610 download_mode=download_mode, --> 611 ignore_verifications=ignore_verifications, 612 ) 613 /opt/conda/lib/python3.7/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 474 if not downloaded_from_gcs: 475 self._download_and_prepare( --> 476 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 477 ) 478 # Sync info /opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 553 self._prepare_split(split_generator, **prepare_split_kwargs) 554 except OSError: --> 555 raise OSError("Cannot find data file. " + (self.manual_download_instructions or "")) 556 557 if verify_infos: OSError: Cannot find data file. ``` Thanks
20
OSError: Cannot find data file when not using the dummy dataset in RAG ## Environment info transformers version: 3.3.1 Platform: Linux-4.19 Python version: 3.7.7 PyTorch version (GPU?): 1.6.0 Tensorflow version (GPU?): No Using GPU in script?: Yes Using distributed or parallel set-up in script?: No ## To reproduce Steps to reproduce the behaviour: ``` import os os.environ['HF_DATASETS_CACHE'] = '/workspace/notebooks/POCs/cache' from transformers import RagTokenizer, RagRetriever, RagTokenForGeneration tokenizer = RagTokenizer.from_pretrained("facebook/rag-token-nq") retriever = RagRetriever.from_pretrained("facebook/rag-token-nq", index_name="exact", use_dummy_dataset=False) ``` Plese note that I'm using the whole dataset: **use_dummy_dataset=False** After around 4 hours (downloading and some other things) this is returned: ``` Downloading and preparing dataset wiki_dpr/psgs_w100.nq.exact (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /workspace/notebooks/POCs/cache/wiki_dpr/psgs_w100.nq.exact/0.0.0/14b973bf2a456087ff69c0fd34526684eed22e48e0dfce4338f9a22b965ce7c2... --------------------------------------------------------------------------- UnpicklingError Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding) 459 try: --> 460 return pickle.load(fid, **pickle_kwargs) 461 except Exception: UnpicklingError: pickle data was truncated During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 552 # Prepare split will record examples associated to the split --> 553 self._prepare_split(split_generator, **prepare_split_kwargs) 554 except OSError: /opt/conda/lib/python3.7/site-packages/datasets/builder.py in _prepare_split(self, split_generator) 840 for key, record in utils.tqdm( --> 841 generator, unit=" examples", total=split_info.num_examples, leave=False, disable=not_verbose 842 ): /opt/conda/lib/python3.7/site-packages/tqdm/notebook.py in __iter__(self, *args, **kwargs) 217 try: --> 218 for obj in super(tqdm_notebook, self).__iter__(*args, **kwargs): 219 # return super(tqdm...) will not catch exception /opt/conda/lib/python3.7/site-packages/tqdm/std.py in __iter__(self) 1128 try: -> 1129 for obj in iterable: 1130 yield obj ~/.cache/huggingface/modules/datasets_modules/datasets/wiki_dpr/14b973bf2a456087ff69c0fd34526684eed22e48e0dfce4338f9a22b965ce7c2/wiki_dpr.py in _generate_examples(self, data_file, vectors_files) 131 break --> 132 vecs = np.load(open(vectors_files.pop(0), "rb"), allow_pickle=True) 133 vec_idx = 0 /opt/conda/lib/python3.7/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding) 462 raise IOError( --> 463 "Failed to interpret file %s as a pickle" % repr(file)) 464 finally: OSError: Failed to interpret file <_io.BufferedReader name='/workspace/notebooks/POCs/cache/downloads/f34d5f091294259b4ca90e813631e69a6ded660d71b6cbedf89ddba50df94448'> as a pickle During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) <ipython-input-10-f28df370ac47> in <module> 1 # ln -s /workspace/notebooks/POCs/cache /root/.cache/huggingface/datasets ----> 2 retriever = RagRetriever.from_pretrained("facebook/rag-token-nq", index_name="exact", use_dummy_dataset=False) /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in from_pretrained(cls, retriever_name_or_path, **kwargs) 307 generator_tokenizer = rag_tokenizer.generator 308 return cls( --> 309 config, question_encoder_tokenizer=question_encoder_tokenizer, generator_tokenizer=generator_tokenizer 310 ) 311 /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in __init__(self, config, question_encoder_tokenizer, generator_tokenizer) 298 self.config = config 299 if self._init_retrieval: --> 300 self.init_retrieval() 301 302 @classmethod /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in init_retrieval(self) 324 325 logger.info("initializing retrieval") --> 326 self.index.init_index() 327 328 def postprocess_docs(self, docs, input_strings, prefix, n_docs, return_tensors=None): /opt/conda/lib/python3.7/site-packages/transformers/retrieval_rag.py in init_index(self) 238 split=self.dataset_split, 239 index_name=self.index_name, --> 240 dummy=self.use_dummy_dataset, 241 ) 242 self.dataset.set_format("numpy", columns=["embeddings"], output_all_columns=True) /opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, script_version, **config_kwargs) 609 download_config=download_config, 610 download_mode=download_mode, --> 611 ignore_verifications=ignore_verifications, 612 ) 613 /opt/conda/lib/python3.7/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 474 if not downloaded_from_gcs: 475 self._download_and_prepare( --> 476 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 477 ) 478 # Sync info /opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 553 self._prepare_split(split_generator, **prepare_split_kwargs) 554 except OSError: --> 555 raise OSError("Cannot find data file. " + (self.manual_download_instructions or "")) 556 557 if verify_infos: OSError: Cannot find data file. ``` Thanks An update on my end. This seems like a transient issue. Reran the script from scratch overnight with no errors.
[ -0.2258687764, -0.0487167984, 0.0123972688, 0.1052549779, 0.3706668019, -0.0698539391, 0.332316637, 0.2692304254, 0.0155125251, 0.325091213, -0.1394265443, 0.2176526636, -0.063734889, -0.3219818175, -0.015681345, 0.0387511514, 0.0088648042, 0.1769445539, -0.2071303129, -0.2274692059, -0.2748767138, 0.0712657496, -0.2206947803, -0.0241294354, -0.6810173988, 0.1146389246, -0.0578162186, 0.3083188236, -0.195423618, -0.2516302764, 0.2026070803, -0.3225419819, 0.2263192385, 0.703583777, -0.0001225423, 0.2990082502, 0.1429332048, -0.2735657692, -0.2608666718, -0.2786888778, 0.4701995552, -0.0021999725, -0.1336365491, -0.2349150777, -0.3879038692, -0.0179221332, 0.1504859775, -0.2608036101, 0.1146475822, 0.4453884959, 0.1201403067, 0.5135039687, -0.078926459, -0.1666063666, 0.4416401982, -0.1321118623, -0.2456285506, 0.2880708873, 0.1355748475, -0.3839827776, -0.2244361043, 0.3043577671, 0.0357951112, 0.2144888937, 0.0499639511, 0.1509965658, -0.331099391, -0.1621897072, 0.2034893483, 0.1592781246, 0.4668169022, -0.1024601087, -0.41012609, 0.1078531072, -0.1492984444, -0.0118920328, 0.30808267, 0.2507409155, -0.2307936251, 0.3093441427, -0.1880169958, 0.1411208361, -0.1838115305, 0.3203995526, -0.1091687903, 0.5142391324, -0.0597858578, 0.1333448142, 0.0515007488, 0.2669829428, -0.1275483221, -0.0532714538, 0.2568568587, 0.1107258052, -0.4334582984, -0.0851476118, -0.1417585313, -0.2281457931, 0.0090547968, 0.2838831842, 0.1190404072, -0.0872801021, -0.0506171547, 0.0559017882, -0.0747929886, 0.0031040474, -0.4398023486, 0.3263715804, 0.1369173378, 0.0633960664, -0.0617392361, -0.255621165, 0.0124683967, -0.0752048418, -0.1377577335, -0.0830673873, 0.295248419, -0.1419145763, -0.3792671263, -0.1376510262, -0.2718304694, 0.0449154079, -0.0649192408, 0.5335166454, -0.1762444973, 0.0942437202, 0.2233513594, 0.2114504725, -0.3598035872, -0.2135164142, -0.189420566, 0.1914025992, -0.2589718997, -0.069558531, 0.3361576498, 0.1515608579, 0.5469791293, -0.042223841, -0.0395791791, 0.0757380053, 0.5255914927, -0.345249474, 0.1852509975, 0.3671408296, -0.095737353, 0.1022147015, 0.3197234869, 0.0107706431, -0.0048439046, 0.1602140218, -0.1347940415, -0.4402830601, -0.0159309059, 0.1230595037, -0.0964481458, -0.0022723719, 0.5216624141, -0.3452539146, 0.0150449807, -0.0186985787, 0.1125786752, -0.0878418684, -0.3588058054, -0.1775870919, 0.1657053381, 0.3699545562, -0.4192666709, -0.0607251376, 0.0974298567, 0.1354824454, 0.272669971, 0.407297343, -0.2612980902, 0.5780159831, -0.3673044145, -0.0979127213, 0.2546081543, -0.3039743304, -0.4831534922, -0.0294233449, -0.2176700234, 0.3169547617, 0.3235011101, 0.1196948364, 0.0952949151, 0.1186118349, 0.060386315, 0.2023347467, -0.0112885302, -0.1898553669, -0.3436117768, -0.360273242, 0.3072981834, 0.3618114293, 0.3364823163, 0.0394935869, -0.0466331616, 0.2522999942, 0.2554250956, -0.1765722781, 0.013517214, 0.3977081478, 0.2658633292, 0.0652287677, 0.1295242608, -0.2036165595, -0.0927457064, 0.2144520283, 0.0100934599, 0.1594749093, 0.0780225098, -0.2786821425, -0.2695263326, -0.1588254273, -0.246627301, -0.4860781729, 0.0125515647, 0.3241277933, 0.2520538867, -0.0928551257, -0.2521234453, 0.4377958477, -0.1952870041, 0.2539069951, -0.3626698554, 0.3693113923, -0.1394771039, -0.1955275685, -0.1041213572, 0.0695497245, 0.0412250087, -0.1709702164, 0.0008805573, 0.3422064781, 0.2573971748, -0.3763898015, 0.2662564814, 0.0578549914, 0.0825238973, -0.1192289889, -0.0103513896, 0.4316681027, 0.2286316305, 0.0311590042, -0.1992192566, 0.2342781872, -0.0837529674, -0.0150447162, -0.063218832, -0.0380302183, 0.2054507434, -0.245583266, 0.0543308482, 0.0540948361, 0.2960954309, 0.0623821355, 0.5005345941, -0.0863631666, -0.1532841921, -0.0471563302, 0.4012604654, -0.043924164, 0.0086468617, 0.1421052963, -0.1760939807, 0.1003632843, -0.0817500502, -0.1644159704, 0.5894432068, 0.1907704622, 0.0153244939, 0.0057597463, 0.0197613277, -0.1352094561, -0.057937935, 0.0057315184, 0.1119224578, 0.2939568758, 0.0104547553, 0.0019572298, -0.2046601921, -0.2126516998, 0.1033593565, 0.2841062248, -0.0861584693, 0.0140034268, -0.229308486, 0.2530737221, -0.110731259, 0.0085564917, -0.2427496761, -0.1266785115, 0.0411274917, 0.2089066356, -0.0423333496, 0.3041034937, 0.0923553705, 0.0221103821, 0.2015033066, -0.1954921037, -0.1071510017, -0.1214263663, -0.2365637273, -0.0093305791, -0.0095359357, -0.0754373893, 0.2127889842, -0.275541991, -0.0830220208, -0.5109937787, -0.2276020795, 0.0538616292, 0.2870909274, 0.2047029287, 0.1335325837, 0.2145301551, -0.0626157671, -0.0509738736, 0.2801601887, -0.2143447995, -0.16846928, 0.0525324792, -0.0789890736, 0.2073692679, 0.0410682298, -0.6410493255, -0.3373050392, -0.2971861959, -0.1248567998, -0.0847930834, -0.0033859792, -0.1192247123, 0.1342246234, 0.2047805637, 0.0360467844, -0.0473384224, -0.1238317564, -0.213477999, 0.503973186, -0.0896634534, -0.2254340947, 0.1115515679, -0.2123594582, 0.0627878085, 0.2687756121, -0.5052883029, -0.5236569643, -0.0911487043, 0.3369217515, -0.1908479184, 0.0894641876, 0.4921668172, -0.3213090003, -0.0286874436, -0.0757977068, -0.048251152, 0.1265073419, -0.1775064915, 0.4617242515, -0.0131950639, 0.2616959214, 0.206970349, 1.1618540287, 0.2212000489, -0.0264964029, 0.0756130666, -0.0601713657, 0.3890320659, -0.220643416, -0.1952375025, 0.1699874699, -0.0849357918, -0.0233409964, 0.1195212677, -0.0171636455, 0.1315138042, -0.0434008986, -0.0431160927, -0.3271125257, -0.0630914941, 0.3613577783, 0.2374396473, 0.1733064055, 0.1608203948, 0.2168279439, -0.1940924227, -0.106320031, 0.1944047064, 0.4131209552, 0.0717763081, 0.1459723264, -0.2727351785, 0.0053168824, -0.2924444079, 0.1266801655, -0.1389421523, 0.2734208703, -0.0478718951, -0.0166706499, 0.0786936134, -0.0301470235, 0.8610992432, -0.2157859206, 0.0723629445, 0.1461740136, -0.4310404658, -0.1535595804, -0.1024156287, -0.2645184994, -0.1194295585, 0.6156064272, 0.5470614433, -0.1647453308, -0.0651735812, 0.4011293054, 0.0672708303, -0.0415488631, -0.0908467397, -0.3198336661, -0.3359073699, -0.2896226048, -0.0756410509, -0.0588875525, 0.1726744026, 0.0725100413, 0.2630054653, -0.3187338412, 0.1581831574, -0.0134523511, -0.1048915535, 0.2868012488, -0.3563991189, 0.2334049791, 0.2810389996, 0.3141557574, 0.1240829527, 0.4758907855, -0.1620748192, -0.5533201098, 0.2848447859, -0.00894171, 0.110037066, 0.3649657965, -0.0149250422, 0.0206317566, -0.0600723326, 0.3059138954, -0.2079597712, 0.1888484806, 0.1273121983, 0.1805801392, -0.0055888477, -0.2922881842, 0.2343427539, -0.0100592552, 0.1217102334, 0.2594496608, -0.1489347517, -0.037146125, 0.8069674373, -0.0851554498, 1.0018047094, -0.0164091364, 0.3242409229, 0.2122616321, -0.1894019395, 0.3186566532, -0.8604213595, 0.3705363274, -0.3098127544, -0.2558270991, -0.2118626684, -0.2688035965, 0.2725955248, 0.5007385612, -0.2377668321, 0.3705540299, 0.1126124188, 0.5121013522, 0.1188102886, 0.3404254615, 0.1157987267, -0.0725708604, 0.1873908192, 0.0555038266, -0.0894560516, 0.5973532796, 0.0034106693, -0.0756132901, -0.3768140972, -0.0559505485, -0.0864164531, 0.1534359157, -0.5980364084, 0.1214438379, 0.4480593801, -0.3019879758, -0.1662078798, 0.2210668921, 0.4297847152, 0.2084309012, -0.1015106887, 0.3052921593, 0.0094820904, -0.1383113116, 0.2651391327, -0.1400010139, 0.1618787795, -0.0763959363, -0.4398625493, 0.2476786673, -0.3299741149, -0.3752298951, 0.2602828443, -0.0489758775, 0.3252381682, -0.312746048, -0.2047451138, -0.0382040888, -0.1589910984, -0.1972967684, 0.0725952536, -0.0142964683, -0.2147476375, -0.0079059005, -0.1116085202, -0.43357867, -0.2141373008, 0.3808214366, 0.0006373319, 0.0819537789, 0.5034265518, -0.171719566, -0.2764571309, -0.1857311726, 0.0238212217, 0.225745365, -0.4661903977, -0.1291016489, 0.0142126437, -0.0213844255, 0.0779137239, -0.3143895566, 0.3677605391, -0.0758166164, -0.5247260928, -0.4727155268, -0.2337950021, -0.0284098461, 0.2426601797, 0.1366358399, 0.0898083523, 0.1172855049, 0.1010093763, 0.0829969049, -0.2611965835, 0.127461791, -0.3284143806, 0.2241390049, -0.0823824853, -0.432854414, 0.1134232208, -0.0398010723, 0.0124955196, 0.1324869841, -0.2328980565, -0.1520703733, -0.0522510223, 0.151051864, 0.0293509755, -0.1678695828, -0.062726967, -0.0445904285, -0.0316796973, -0.1187211573, 0.165716663, 0.2946430445, 0.1132881567, 0.0098576853, -0.073121123, -0.1555408835, -0.1787895113, -0.0207024347, -0.1610880196, 0.2682994008, 0.2411251366, 0.1016140208, -0.0367549509, 0.0535285547, -0.0402751863, -0.0307253767, -0.0901164189, -0.0944979042, 0.3644738495, -0.4622707367, -0.0739852637, -0.1404036134, 0.1395463645, -0.0114121633, -0.3465527296, -0.1271582097, 0.3380663693, 0.1625089943, -0.433301419, -0.0775827691, 0.2363433242, 0.0022680017, 0.2374141067, 0.2966208458, 0.0799448565, 0.0015986802, 0.2902958095, 0.0931020677, 0.3097211123, -0.2249631435, -0.0230651945, -0.0278912932, 0.0482489727, 0.1535487473, 0.1837677062, 0.0473947488, 0.0814309418, 0.4353086948, 0.1530239433, 0.2819972634, -0.0381258875, 0.1200999916, -0.1897053421, -0.4449409842, -0.2815669775, 0.3054927886, -0.235494256, -0.0182446614, -0.3626362383, 0.0558638759, -0.1567470878, -0.1506152302, -0.040276777, -0.118990384, -0.2089491636, 0.1465531588, -0.0952106714, -0.0301973391, -0.1931044757, 0.1028112024, 0.1171645299, -0.1189524159, 0.0187288653, 0.0301827565, -0.282351017, 0.1210343689, -0.113258943, 0.08803574, -0.0462889746, -0.2088494152, 0.187075749, 0.2697920501, 0.0533145405, 0.0685411021, 0.3685553074, 0.4437267482, 0.2311637849, -0.2230362892, 0.1924250722, -0.0318633243, -0.0763218254, -0.030568745, 0.1595977843, -0.1536245644, -0.0688811764, 0.39705351, 0.0480839275, -0.1895269006, -0.3199322522, 0.0274742804, 0.0225165542, -0.4600143135, 0.2075293809, -0.0441923738, -0.0788601786, 0.006566321, -0.0245959125, -0.5514101386, 0.1278147697, 0.380364418, 0.025265513, 0.2749297023, 0.128145203, 0.0078003453, -0.278765589, 0.0311802085, 0.4185278714, -0.0350199677, -0.5950030088, -0.3033542633, -0.4331483245, 0.0840362832, -0.569270134, -0.2926072478, 0.0010129281, 0.2485014647, 0.0891627893, 0.1719408631, 0.3557213247, -0.1054760367, 0.0784785226, 0.4126327038, -0.4025352597, -0.1663887501, -0.3254977167, 0.2052409947, 0.080054231, -0.7052714229, 0.0650315881, 0.3884375691, 0.0101613244, 0.1391600817, -0.0993561745, 0.354144156, 0.0327953584, 0.119463563, -0.1563092023, 0.2681681812, 0.047163751, -0.0312046725, 0.1960100532, 0.0786780268, -0.1172627211, 0.007538348, 0.078615047, 0.5020299554, -0.158609271, -0.1609353721, -0.2771388292, 0.2690274119, 0.1713733077, -0.1698032469, 0.1241606921, 0.2329680473, -0.0899593085, 0.227147758, 0.2715690136, 0.3370777667, -0.0686972141, 0.0453813374, -0.3402681053, -0.0994827524, 0.5833815932, -0.3087987602, -0.2146811485, -0.1653167456, 0.116828233, -0.053247869, 0.2518344522, -0.4316257834, -0.0399833657, 0.3314809203, 0.0645505488, -0.1202180162, -0.0008697988, 0.0577102378, 0.054166805, -0.0688192174, 0.2568714321, -0.0468435958, -0.218679145, -0.1020399183, -0.2438038141 ]
https://github.com/huggingface/datasets/issues/709
How to use similarity settings other then "BM25" in Elasticsearch index ?
Datasets does not use elasticsearch API to define custom similarity. If you want to use a custom similarity, the best would be to run a curl request directly to your elasticsearch instance (see sample hereafter, directly from ES documentation), then you should be able to use `my_similarity` in your configuration passed to datasets ``` curl -X PUT "localhost:9200/index?pretty" -H 'Content-Type: application/json' -d' { "settings": { "index": { "similarity": { "my_similarity": { "type": "DFR", "basic_model": "g", "after_effect": "l", "normalization": "h2", "normalization.h2.c": "3.0" } } } } } ' ```
**QUESTION : How should we use other similarity algorithms supported by Elasticsearch other than "BM25" ?** **ES Reference** https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-similarity.html **HF doc reference:** https://huggingface.co/docs/datasets/faiss_and_ea.html **context :** ======== I used the latest Elasticsearch server version 7.9.2 When I set DFR which is one of the other similarity algorithms supported by elasticsearch in the mapping, I get an error For example DFR that I had tried in the first instance in mappings as below., `"mappings": {"properties": {"text": {"type": "text", "analyzer": "standard", "similarity": "DFR"}}},` I get the following error RequestError: RequestError(400, 'mapper_parsing_exception', 'Unknown Similarity type [DFR] for field [text]') The other thing as another option I had tried was to declare "similarity": "my_similarity" within settings and then assigning "my_similarity" inside the mappings as below `es_config = { "settings": { "number_of_shards": 1, **"similarity": "my_similarity"**: { "type": "DFR", "basic_model": "g", "after_effect": "l", "normalization": "h2", "normalization.h2.c": "3.0" } , "analysis": {"analyzer": {"stop_standard": {"type": "standard", " stopwords": "_english_"}}}, }, "mappings": {"properties": {"text": {"type": "text", "analyzer": "standard", "similarity": "my_similarity"}}}, }` For this , I got the following error RequestError: RequestError(400, 'illegal_argument_exception', 'unknown setting [index.similarity] please check that any required plugins are installed, or check the breaking changes documentation for removed settings')
88
How to use similarity settings other then "BM25" in Elasticsearch index ? **QUESTION : How should we use other similarity algorithms supported by Elasticsearch other than "BM25" ?** **ES Reference** https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-similarity.html **HF doc reference:** https://huggingface.co/docs/datasets/faiss_and_ea.html **context :** ======== I used the latest Elasticsearch server version 7.9.2 When I set DFR which is one of the other similarity algorithms supported by elasticsearch in the mapping, I get an error For example DFR that I had tried in the first instance in mappings as below., `"mappings": {"properties": {"text": {"type": "text", "analyzer": "standard", "similarity": "DFR"}}},` I get the following error RequestError: RequestError(400, 'mapper_parsing_exception', 'Unknown Similarity type [DFR] for field [text]') The other thing as another option I had tried was to declare "similarity": "my_similarity" within settings and then assigning "my_similarity" inside the mappings as below `es_config = { "settings": { "number_of_shards": 1, **"similarity": "my_similarity"**: { "type": "DFR", "basic_model": "g", "after_effect": "l", "normalization": "h2", "normalization.h2.c": "3.0" } , "analysis": {"analyzer": {"stop_standard": {"type": "standard", " stopwords": "_english_"}}}, }, "mappings": {"properties": {"text": {"type": "text", "analyzer": "standard", "similarity": "my_similarity"}}}, }` For this , I got the following error RequestError: RequestError(400, 'illegal_argument_exception', 'unknown setting [index.similarity] please check that any required plugins are installed, or check the breaking changes documentation for removed settings') Datasets does not use elasticsearch API to define custom similarity. If you want to use a custom similarity, the best would be to run a curl request directly to your elasticsearch instance (see sample hereafter, directly from ES documentation), then you should be able to use `my_similarity` in your configuration passed to datasets ``` curl -X PUT "localhost:9200/index?pretty" -H 'Content-Type: application/json' -d' { "settings": { "index": { "similarity": { "my_similarity": { "type": "DFR", "basic_model": "g", "after_effect": "l", "normalization": "h2", "normalization.h2.c": "3.0" } } } } } ' ```
[ -0.1099792421, -0.6802698374, -0.0450149886, -0.0399368592, -0.1662630886, 0.0516546145, -0.1838180125, 0.2227956504, 0.4452563226, 0.1382720172, -0.3413906693, -0.1468973309, 0.0635204613, -0.2089973986, -0.359283179, -0.0928409621, 0.0289196763, 0.0444089249, 0.1041621417, 0.108522661, -0.1743732393, 0.1254538447, -0.0000627173, -0.0005489319, -0.1480970085, 0.1876891404, 0.0392792635, -0.2065734863, 0.1528003663, -0.3148994744, 0.1453121006, -0.2109481394, 0.1577215642, 0.0440197214, -0.0001227613, 0.0690058172, 0.369328022, -0.0321300514, 0.425422132, -0.4718562961, -0.060885638, 0.2165195048, 0.1834835261, -0.1776776165, -0.2151821256, -0.369482398, 0.0328343473, -0.4300845861, 0.2202268541, 0.370029062, 0.1151459515, -0.1253225803, 0.1784475297, -0.0453585833, 0.1369123459, 0.0639811009, 0.0044004004, -0.2802919149, 0.3826872408, 0.4209572375, 0.334356904, -0.0454551876, -0.2023601383, 0.3465204239, 0.3322950602, 0.1597772092, 0.3609419465, -0.2127847672, 0.2631378472, 0.1443553567, 0.1755006313, 0.1586991102, 0.1121972874, 0.0569026843, -0.1709519476, -0.0436666422, 0.0706233233, -0.2081923038, 0.1478072554, 0.0993626341, -0.1951646209, -0.17882967, -0.1105851233, 0.2574422956, -0.0947719067, 0.1925845146, -0.0943948179, -0.0603707209, 0.2563094497, -0.4657057226, -0.1320727915, 0.0108754104, 0.1735931486, 0.1292194277, -0.0163316522, -0.2779356837, -0.3406864405, -0.1888898611, 0.3027124107, -0.1236502603, -0.075883463, 0.1966888458, 0.1552660763, 0.2615853548, -0.3191661835, 0.2049429268, 0.0664068237, 0.4087868631, 0.0873083845, -0.2203004062, -0.1675472409, 0.0207607336, 0.4790684581, -0.0699594393, 0.0530890375, -0.4394779503, -0.2394436896, -0.4781886935, 0.1970800608, -0.1506074518, -0.2655495107, -0.2916413546, 0.1298919171, 0.1182671711, 0.0235040803, -0.4387791455, 0.0350995325, 0.0863089338, 0.0781807899, -0.0199933685, -0.044524733, -0.0094924849, 0.0087709334, 0.3264605999, 0.3060794771, -0.435367167, 0.5557738543, 0.1181140095, 0.058161635, 0.3656068444, 0.2970828116, 0.0120172799, 0.3168721199, -0.0040032058, -0.2208719403, 0.0614863597, 0.1817429215, -0.0633635968, -0.3740389943, -0.0667841062, -0.5649573207, -0.2988860905, -0.2933887541, 0.1480260193, -0.3074217439, -0.2548411787, -0.2832581103, 0.273413986, -0.2297461927, -0.1462837309, 0.0989793465, -0.0884415358, -0.2237434834, 0.0443154536, 0.0850663409, -0.1622762978, -0.0286305435, -0.3096386194, -0.0529248305, 0.465236187, 0.1320647299, 0.1934709847, -0.1054061279, -0.6684592962, 0.0378972441, 0.5693461299, 0.5097741485, 0.0055428911, -0.1204316914, 0.1143235862, 0.2543830574, -0.0709597915, 0.2039701939, -0.1388187408, 0.2006195337, 0.1326106042, 0.1450301409, 0.2731206715, 0.2092544585, -0.2835344672, -0.3051759005, -0.2141605467, -0.0925754905, 0.0189208221, -0.0333237536, 0.064743571, 0.3815338314, -0.1603907794, -0.322928071, -0.1779347062, -0.1087431461, 0.0910641626, 0.1773339212, 0.2237419188, 0.2579644322, -0.1902690232, 0.2595606446, 0.1766338199, -0.3559484184, 0.0818275586, 0.235604465, 0.1936781108, -0.0839839131, -0.3139106929, -0.0714866444, -0.0767214969, 0.0441461131, -0.2198112905, -0.1627635062, -0.0379007459, -0.1630102843, -0.2555433512, -0.0120574059, -0.0245707519, -0.175784871, 0.5014539361, -0.2597070336, 0.0320134535, -0.0591114163, -0.1223387644, 0.2278621048, -0.0852187127, -0.1969066858, 0.0806864351, -0.1826835275, 0.3506127298, 0.3075750768, 0.75570786, 0.0849624574, -0.438582629, 0.3527546823, -0.008834322, -0.2499322146, 0.0982047468, 0.0114406198, -0.0386317782, 0.2910941839, 0.3620181084, 0.0191407613, -0.2755415142, -0.091338098, -0.0194802117, 0.2412545383, -0.3768111467, 0.2612398267, -0.3031680286, -0.1589261144, 0.1838586181, 0.1624088734, -0.1617040634, 0.0292066187, 0.1390401274, 0.2721500993, 0.2021352798, 0.022936359, -0.1996163428, -0.0208404027, -0.1506263465, 0.2454145253, 0.1411077231, -0.0746462345, 0.1552447826, -0.1430294067, -0.1715417057, 0.3471215367, 0.129450351, -0.0288443491, -0.0878203139, 0.0389388725, 0.0593524575, 0.0525161512, -0.3871171772, -0.0891270563, -0.1028028652, -0.1088056788, 0.1004480422, -0.5472635627, 0.1111526787, -0.1829550117, 0.4247770309, -0.2955293357, -0.0364863314, 0.0299582444, 0.1797702312, -0.0549660996, 0.1705632061, -0.2438579351, -0.1432880312, -0.1753668338, -0.1681883335, -0.2786497772, 0.2655237913, -0.2386909276, -0.0093541704, 0.026045531, 0.3414479196, 0.0146748591, 0.0368779227, 0.0348651558, -0.3051834404, -0.6715815663, 0.1528567821, 0.379923135, 0.2668417096, 0.2583185732, -0.3530451059, -0.4748590589, -0.2644218802, 0.325628072, -0.2829082906, 0.1872532964, -0.0278584901, -0.3894019723, 0.3343363702, 0.3319968283, -0.2943065763, -0.0959768742, -0.2260111868, -0.1961697787, 0.0739623308, 0.1944967061, 0.3149733543, -0.1686630398, 0.0810835436, 0.0829165429, 0.3201368153, -0.1368821561, 0.1280293912, 0.5260475874, -0.180188328, 0.2626564205, 0.0549674481, -0.0480560623, 0.2496029139, 0.3947457969, -0.0880164653, -0.0321655348, -0.0056754681, -0.4177226424, 0.0833182707, 0.1446458995, -0.146741882, 0.0077059004, -0.0853757858, 0.1881074756, 0.107855171, 0.0606456883, 0.1781774312, 0.3725465238, 0.3807065487, 0.1436384916, -0.0966634005, 0.8414543867, -0.0144095737, 0.065212898, 0.3936394751, 0.1621802002, -0.2119906545, -0.1389677972, -0.1302310228, -0.2188546211, 0.3948902786, 0.1391048133, 0.1219391003, -0.0122674694, -0.3806422651, -0.2291279435, -0.4974329472, 0.0169695523, 0.1065994427, 0.0358185396, 0.2787442207, 0.4080380499, -0.274120003, -0.0735111386, 0.0552526042, -0.369166106, -0.1137169451, 0.0596995167, -0.2399493009, 0.1703724861, -0.023079738, -0.5380222797, -0.3205025196, 0.741445899, 0.0002174623, 0.0987045243, -0.2876695991, 0.143987, 0.0832360461, 0.3491670489, -0.0098142223, -0.2938864231, -0.5016286373, -0.3293355107, -0.427621007, -0.383145988, -0.1308453232, 0.240285784, -0.223284632, -0.3592095673, 0.3704487681, -0.0129620153, -0.1446431577, -0.021570893, -0.203979969, 0.0451559983, -0.2999052107, 0.0072286036, 0.1388060451, -0.1072055548, -0.3052332401, 0.013953832, 0.2452327758, 0.1477886885, -0.0708150193, -0.067677781, -0.038891051, 0.2269309759, 0.0728656575, 0.0179732479, 0.0661873817, 0.0671497509, 0.5369637609, 0.2987405956, 0.2468255162, -0.1220908761, 0.019224165, 0.3615913391, -0.2456899136, 0.1638263911, 0.0432101861, -0.2378495783, 0.061340142, 0.3586057425, 0.1583438516, -0.0166847836, 0.1164002791, -0.3012372255, 0.1999049783, 0.213716805, 0.0041514896, -0.0577541217, 0.6790004969, 0.3671956658, -0.0127790803, -0.0531667843, 0.3667999804, -0.3741473854, 0.3981563151, 0.3430169821, 0.3471115828, 0.4064128399, -0.2098453343, -0.3018675447, 0.1915676445, 0.3319586217, -0.0766075626, 0.1850985438, -0.1821462661, -0.3758678436, -0.0414290577, -0.094248116, 0.339732945, 0.0652395487, -0.1956476867, 0.4940739274, 0.0631530657, -0.2016893178, -0.1147127524, 0.3365668654, -0.0548305139, -0.0579650067, 0.2160900831, 0.0381141156, -0.1906483322, 0.3520362377, 0.3345752358, 0.1518598199, -0.1074482501, -0.0434570797, -0.0971072018, -0.1127913594, -0.0231549442, 0.2266402841, 0.1801398993, 0.2071556747, 0.7799135447, -0.2633682787, 0.3296685815, 0.0258931499, -0.40501526, -0.0541698262, 0.0409360155, -0.1658571661, -0.0369972028, -0.0493084751, 0.1772249341, -0.1595719606, -0.4186330438, 0.1097162217, 0.4122184217, -0.1353843063, -0.6603267789, -0.4940026402, 0.0222963821, 0.1854391992, -0.1221522987, -0.1672212631, -0.1612368375, 0.2374848723, 0.0848483965, -0.2467110604, -0.1824185252, 0.5444492102, 0.2052455544, -0.1745915711, -0.0993677229, 0.5531526208, 0.0559504293, -0.209275797, 0.2950086296, -0.2328968793, -0.2230931222, 0.0890231505, -0.1984615028, 0.4163670838, 0.1171632037, -0.2509322166, -0.0408287048, -0.0475677848, 0.1526893377, 0.5386030078, 0.4139124453, 0.5027275085, -0.2389632612, 0.1192825958, -0.0697954521, 0.3097169995, 0.1394020617, 0.3073012531, -0.5134683847, -0.2494950593, -0.0336470306, -0.0060047586, -0.1531667411, 0.3232014179, 0.049769368, -0.1040932909, -0.1565631032, -0.0293835513, -0.025474688, 0.0322431773, -0.0558072664, 0.0541610792, -0.328884095, 0.0023267707, -0.0626845285, 0.1406769156, 0.0628939644, -0.2919207811, -0.2410841137, -0.4222993255, -0.1617657542, -0.0557123721, -0.22458601, 0.307033062, 0.1734172255, -0.0448970385, -0.0793559253, -0.5070898533, 0.0743330196, 0.068602778, 0.0944650918, 0.0851657614, 0.0325711705, -0.0201978143, -0.0556063205, -0.2246448845, -0.0915172622, 0.1086321324, -0.2324388027, 0.0110348715, 0.1500187963, 0.0877878144, -0.3217265606, 0.7859100699, 0.0040240525, 0.0206360891, -0.0271259844, -0.2612789571, 0.1330944896, 0.1213179901, 0.0456237011, -0.1868679821, 0.4898706973, 0.3075527251, 0.0129378214, 0.2696975172, 0.5250288248, 0.048668392, 0.2212868333, 0.0054955357, 0.3301391006, -0.3393137455, 0.118146129, -0.142361328, 0.0951447114, -0.0422693789, 0.2914742231, 0.2757110596, 0.484264493, 0.0848606601, -0.3516991436, 0.2595894635, -0.2052453011, 0.0762456432, 0.7275319695, 0.0867140442, 0.316849649, 0.3144488931, 0.2281219214, 0.4571486712, 0.0514146723, 0.2946279347, 0.0566791594, -0.1594221145, 0.0405904725, 0.0062793107, 0.1192507967, -0.0850607753, 0.0231248215, -0.315918088, -0.4254608452, -0.1276068687, 0.0082547162, -0.0437548198, -0.175275296, 0.0180728808, -0.1200735047, 0.2199282348, 0.0000327393, 0.1514885426, 0.5412804484, -0.0908546299, 0.0245081335, -0.1568838805, -0.1649007052, 0.4298412502, 0.2256818712, -0.148688823, 0.1915640086, -0.1007811278, -0.080964677, 0.0556519888, -0.1301407367, 0.3380602896, 0.0261418819, 0.1664379686, -0.6764463782, -0.0454051755, -0.0414453894, -0.0645262599, -0.2009964436, -0.3495073318, 0.3897274137, -0.1165069863, -0.2713938057, 0.1432800293, 0.1515004039, 0.351734221, -0.1120202839, -0.3581875563, -0.086229071, 0.0518588386, -0.0809843093, -0.1425343454, 0.265522927, 0.0237308275, -0.2251170129, 0.0217375048, 0.1432460845, -0.0875024647, -0.211269781, 0.0929913223, -0.1047797725, 0.1971468329, 0.0840772316, 0.4553639293, 0.5093329549, 0.0920783207, -0.0255702604, -0.278147608, 0.3214883506, -0.1484739929, -0.3624587953, -0.0977649093, 0.1022541225, -0.1342023462, -0.2379284948, -0.1270837933, 0.0090425648, 0.3054428101, 0.2771745622, -0.283210665, -0.1311530471, -0.6396153569, 0.1917275041, 0.036299929, 0.0382277519, -0.092496261, 0.0709764957, 0.1456524134, 0.048592478, 0.2854751647, 0.4260376394, -0.1719563156, 0.0081041623, 0.2560976446, 0.024818169, 0.1707030833, -0.050307706, -0.5536446571, -0.2471791506, 0.192309171, -0.1681052148, -0.2826261818, -0.1764512658, -0.2089060098, -0.0843345523, -0.2383699566, -0.1878717095, 0.1503478885, 0.1285378784, 0.0168373194, -0.1015241072, -0.1317764074, 0.4407915771, -0.0215050709, 0.1676943153, -0.1945518702, 0.0541254021, 0.6103243828, 0.138913393, -0.1990366429, -0.3519845009, 0.3735139072, 0.0313641392, -0.0052880328, -0.0248318873, 0.3395014703, -0.0619788915, -0.2084069401, -0.1932702065, 0.1773454696, 0.06335181, -0.3400337994, 0.0889997035 ]
https://github.com/huggingface/datasets/issues/708
Datasets performance slow? - 6.4x slower than in memory dataset
Facing a similar issue here. My model using SQuAD dataset takes about 1h to process with in memory data and more than 2h with datasets directly.
I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work.
26
Datasets performance slow? - 6.4x slower than in memory dataset I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work. Facing a similar issue here. My model using SQuAD dataset takes about 1h to process with in memory data and more than 2h with datasets directly.
[ -0.3806663454, -0.0424090587, -0.0314098261, 0.4377959967, 0.1005084068, 0.1263736933, 0.0136549324, 0.3071820438, 0.0914101377, -0.0730988681, -0.0662421212, 0.301128, -0.0139891645, -0.2742892206, -0.0800374225, 0.0623482354, 0.2097817063, 0.0289246328, -0.2366966456, -0.1054769903, -0.2640981972, -0.2973696887, -0.0698854551, -0.2284690291, -0.3223610222, -0.1434254497, 0.0818202794, -0.0005962166, -0.3450991809, -0.4037324786, 0.3832429349, 0.0766954869, 0.0686846003, 0.5503900051, -0.0001125017, -0.0448605455, 0.2153705955, 0.163643837, -0.1740946472, 0.3116470277, -0.0444428772, -0.2415702045, -0.0513391085, -0.1154530719, -0.01321181, -0.1297844201, -0.0774295032, -0.716037333, 0.018146161, 0.1087613255, 0.1370816678, 0.3199506998, -0.387277782, 0.2173005193, 0.142141059, 0.3198286295, -0.4389564395, -0.1034560129, 0.3924713433, -0.1402356178, -0.0548130386, 0.2295681834, -0.1826925427, 0.2396480441, 0.4582101107, -0.0244684815, -0.1892895103, -0.2351150215, 0.0883350298, 0.4672670662, 0.1863692254, -0.1389112771, -0.634291172, -0.3808341324, -0.2253734767, -0.1158318147, -0.006604909, 0.2012720704, -0.1965837181, 0.1110180467, -0.5031596422, 0.0621068589, 0.0210665856, -0.0106446929, -0.159393847, 0.3560096622, 0.1086820439, 0.2212633193, 0.3045377135, 0.1173549592, 0.395116359, -0.3474163115, -0.0426577032, 0.0569681115, -0.672750175, 0.073525995, 0.132234633, 0.1327429712, 0.2916539609, 0.0192394834, 0.1375166923, 0.2773088217, -0.0180945862, -0.1378564686, 0.2188935578, 0.1327666491, -0.3069685102, 0.4844336808, 0.3089221716, -0.2571935356, 0.1131686196, 0.2347925156, -0.0429065637, -0.1230408028, 0.0808738023, -0.2456586063, 0.062857829, -0.2480964065, -0.3668068349, -0.1015461087, -0.128623575, -0.0355536453, -0.0565834977, 0.1639847308, -0.2934107184, 0.2284451276, -0.121053271, 0.0039492184, -0.2586508393, 0.0483609028, -0.0533002652, -0.0860239118, -0.3140702546, 0.3556381762, 0.2916275561, -0.0728288367, 0.1457337439, -0.0316701531, 0.0242216475, 0.2429365516, 0.360352248, -0.383017987, 0.2523584664, 0.1450634748, -0.2260444909, 0.5183618069, 0.101564385, 0.4579476416, -0.2209921479, 0.3493160903, -0.0600940846, -0.2040510923, 0.2610086501, 0.1124158204, -0.2648043633, -0.1167252362, -0.4379532933, 0.281727314, 0.1080345511, -0.0582336299, -0.0100162495, -0.3681589961, -0.1956060976, -0.1200667247, 0.3318264782, 0.3998509943, -0.5381984115, 0.1778304726, 0.0605197474, 0.2114970237, 0.2493433207, 0.6614070535, -0.3634279072, 0.2380727977, -0.1285898834, -0.2693577409, -0.1169595793, -0.1960741878, -0.5835576653, 0.1508799493, 0.0044015655, 0.1377564818, 0.1036623269, 0.4255773127, 0.3806002736, 0.137389034, 0.1205449626, 0.2378032058, 0.0506335422, 0.1219745874, -0.3522132337, -0.26674366, 0.5058071613, 0.2659253478, -0.0184598826, -0.1692707241, -0.1304335296, -0.2034451067, 0.171515435, -0.1723213345, 0.1123999879, 0.2761601806, -0.0154158967, -0.1323156953, 0.1253482103, 0.0962627977, -0.2414121479, 0.4494388103, 0.0475798473, 0.0823375434, -0.072255455, -0.0690128878, 0.234012723, 0.1237764582, -0.2757114172, -0.0913971886, -0.0202736482, -0.124347955, 0.0506434403, -0.2392933667, -0.1698196083, 0.3928051591, -0.2049031258, -0.0397740677, -0.2208189815, 0.0434944667, 0.0289862584, -0.0810196772, -0.0130324941, -0.1096345335, -0.1200396195, -0.0273584798, -0.1362690628, 0.1346833408, 0.2414699048, 0.2601766586, 0.1974774301, 0.3538563848, 0.1384090781, -0.31150195, 0.3684660494, 0.2825622559, 0.1614501476, -0.1878308356, -0.3582593799, 0.5080372691, 0.0408375598, 0.6212488413, 0.1318585128, -0.2736033201, 0.0354719982, 0.1617726237, -0.1527906656, 0.361810714, 0.2422435284, 0.1831345111, 0.599363625, 0.3990742266, -0.2270188779, 0.1293457299, 0.3130761385, 0.0727402344, -0.1557810009, -0.0534358248, -0.2871872485, -0.2821799815, 0.2410205305, -0.0649418756, 0.5271027088, 0.2901993096, 0.1248299703, -0.1665139794, -0.0623957813, -0.0885650888, 0.0004644793, 0.295653969, 0.2021184117, 0.0236078668, 0.1321613491, -0.0330442078, -0.2369346172, -0.1259488314, -0.0136153297, 0.0920880958, -0.1836666018, 0.1966559887, -0.0482412688, 0.0431790166, -0.1185243204, 0.0486887321, -0.1458608657, -0.2508894801, -0.0787201822, -0.1703786254, 0.1408748031, 0.099716492, -0.0557448156, 0.2978174388, -0.0532309823, -0.3437314034, -0.1330958605, -0.1097652093, -0.20562087, 0.0347894542, 0.0790493488, 0.2015626878, 0.3894381225, 0.2333970964, 0.0630549416, -0.250762552, -0.128121376, -0.0811345503, -0.1727129966, 0.2470873743, -0.3129542768, 0.1722495705, 0.0450521447, 0.0761779323, 0.0374998562, -0.3253332675, 0.0282385778, -0.1393776983, -0.1856905222, -0.0956031978, 0.0941677466, -0.2838167846, -0.2353223264, -0.2316648811, 0.1122173369, 0.1856214851, -0.1038914844, -0.077787295, 0.2100544274, 0.1400316656, -0.0230245013, -0.0323165953, 0.001091022, -0.2395756543, 0.5963218212, 0.1307839006, -0.2874100804, -0.1484390646, 0.0325048603, 0.092605032, 0.4593246281, -0.4363916516, 0.3887852132, -0.4268549085, 0.0659124777, -0.0283237118, 0.1497391164, 0.3875692487, -0.0489907525, -0.0553493388, -0.0899967924, -0.2898073792, -0.2084777355, -0.2657874525, 0.1750808507, 0.0703375041, 0.2047269791, 0.1540495306, 0.7702895403, 0.2816255391, -0.1282123327, -0.0700765476, -0.019975936, 0.322150439, -0.3042882681, -0.1336632371, 0.0767841637, -0.2323924303, -0.3620030284, 0.102230072, 0.1592202783, -0.2228558511, 0.0571658164, 0.4334772825, 0.2629045546, 0.0344462208, 0.1643804163, -0.1444603056, 0.1150298566, 0.1291986704, 0.2734665871, -0.2965278029, -0.2377397865, 0.1282242537, -0.1157929227, 0.1971657872, -0.0538892858, -0.584630847, 0.0750429928, -0.731251061, 0.1715987474, -0.0042756028, 0.2625333667, 0.1212928519, 0.0990573466, 0.246076569, 0.0343440473, 0.4295497835, 0.0074470975, -0.1342290789, -0.0209553335, -0.262619853, -0.5181392431, 0.0019415579, -0.1180639565, 0.0979924202, -0.018077286, 0.1409920901, -0.144948855, -0.2084661871, 0.0128050549, 0.2898254395, -0.1102436036, -0.2574890256, -0.307546407, -0.2508769929, 0.0031966998, -0.1106913835, 0.0640593469, -0.2158924043, -0.0053232913, -0.2174376547, -0.1411986947, 0.1710703075, 0.287007004, -0.0199487545, 0.2277722806, 0.0420355201, 0.2784541249, 0.309186548, -0.0779347792, 0.310967803, 0.6148452759, 0.0961862504, -0.0449311174, -0.057990659, -0.0302236136, 0.1740664244, 0.3999010921, -0.1160176694, -0.1174306795, -0.0470448509, -0.0459505469, -0.441670984, 0.0930081829, 0.3606791496, 0.0545085706, -0.4937979281, -0.6961235404, 0.4829237759, 0.3221644759, -0.0029609182, 0.5213713646, 0.1529992074, -0.1188369691, 0.2289225906, 0.3288165927, 0.7686126828, -0.408190906, 0.3427323401, 0.0339297093, -0.0006151214, 0.2862084508, -0.1507108063, 0.0477479026, -0.1387883574, -0.0451610275, 0.0209275931, -0.3210027814, 0.2163615376, 0.0421520658, 0.2567620873, 0.2072266638, 0.1430624872, -0.0285382662, 0.0092823412, 0.3683236241, 0.1415447593, -0.3528418839, 0.0806294009, 0.20608446, -0.0636476204, 0.0266835652, 0.1052984297, 0.0771681517, -0.5997768044, 0.2118578851, -0.2221496105, -0.0983411223, -0.2747582495, 0.2297734916, -0.2467639893, -0.194834128, 0.1204784065, 0.1752456874, -0.0273538828, -0.0050549149, -0.2925044894, 0.2589014769, -0.1889819652, 0.1734660119, 0.4696851075, -0.4210249186, 0.1938284636, 0.0822747201, -0.0500953458, 0.0425285697, -0.2707816362, -0.3727759719, -0.1190481484, -0.0976815224, 0.0462765805, -0.096966289, -0.1774129421, 0.1778090596, -0.115728125, -0.0738805234, 0.1192867458, 0.2847137749, 0.1483693123, 0.5707705021, 0.1340297312, -0.4016315043, -0.1551912725, 0.2970864773, 0.0244420879, 0.0889517516, 0.340357542, 0.1648634225, -0.2617579997, -0.0780199021, 0.3460660875, 0.5033900142, -0.1370909065, -0.0944340825, -0.3355538249, 0.1455241144, 0.1652889252, 0.1014356986, 0.1463969648, -0.4325963259, -0.280382216, -0.1083592847, -0.2876851261, 0.1452465951, -0.1482289582, 0.2979683876, -0.1901216358, -0.317422241, -0.1114947498, 0.0183943603, -0.2807397544, -0.2505931854, -0.0107443286, 0.1090028509, -0.1011219323, 0.2202880681, 0.0244037602, -0.1119342074, 0.000743718, -0.0798368379, -0.1273418963, -0.1610721499, 0.0595522821, 0.1735746711, 0.0525194816, -0.4033673108, -0.0549086668, -0.3336770236, -0.2233923078, -0.3024188578, 0.0491736159, 0.3302562535, -0.1085040867, 0.0007787844, 0.0641421229, -0.0916873962, -0.1112688556, 0.2955054343, -0.1259221137, 0.1686892509, 0.0309229884, 0.1445612609, 0.4665190279, -0.2060362548, -0.1343385726, 0.1394993216, 0.0919982865, 0.2192005962, 0.3119926155, -0.3754244745, 0.3008857071, 0.1782547683, 0.5255873203, 0.5776779652, -0.0864238963, -0.0482990853, -0.1358985752, 0.1196112335, -0.0082849562, -0.2492899895, 0.0623388514, -0.1110693738, 0.150314346, 0.2359207422, 0.3171468377, 0.3776897788, -0.0135364886, -0.1543544084, 0.6034697294, -0.4535905123, -0.0637546927, -0.1066442728, 0.1659358144, 0.1051360741, 0.4445793927, 0.1751126647, 0.150199309, 0.5105740428, 0.0687417239, 0.6162847877, 0.3639472127, 0.3138250113, -0.1088628545, -0.1895516068, -0.0064245709, 0.0830415711, -0.2204788029, -0.0311430469, 0.0744842589, 0.0459094718, -0.3543303609, -0.3149505556, 0.0743725821, -0.2537948787, -0.0074904091, -0.0483671501, -0.0298705958, -0.1297779232, 0.072894834, 0.2107989788, -0.2031930834, -0.1960492134, 0.3447199762, -0.0779254958, -0.0568214059, -0.1621294916, 0.28085199, -0.0214891434, 0.1728646457, -0.1264070868, -0.0823842809, -0.2849642336, 0.0103565045, -0.1397751272, 0.378752172, 0.2705045938, 0.2324058712, -0.1640647948, 0.0503749736, -0.1489006728, -0.1381406784, 0.0803576931, 0.3532443047, -0.2355175912, -0.0428104401, 0.1823548526, 0.103942126, -0.1256212145, -0.0923541337, -0.1883644164, 0.0659576505, -0.4343670905, 0.1180909872, -0.0840082392, -0.2931293845, 0.0669183806, 0.0789841115, -0.2430416793, -0.1107978597, 0.4821844697, -0.4651016891, -0.0238464419, -0.1127798185, 0.0683294311, -0.2132830769, 0.7433562279, 0.3071632981, 0.2977477908, -0.3887543976, 0.1410841346, -0.6297145486, -0.0627762228, -0.3574145436, 0.0241963491, 0.1204941124, 0.2420873344, 0.0829272419, 0.3555292487, 0.1255461574, 0.0015365261, -0.0328144133, -0.0863277614, -0.230920434, -0.0251039676, -0.2001772076, 0.2183195502, -0.1794755608, -0.3345949352, 0.3847668469, -0.1063757986, -0.0434556864, -0.1651987582, -0.0484442078, 0.3652563989, 0.1291301548, 0.3027884662, 0.1771481335, 0.420504272, 0.2366503626, -0.0797343031, -0.3657922447, -0.0532497428, -0.0327490009, 0.0968487188, -0.242823869, 0.2796160281, -0.1563113183, -0.4385990202, -0.157276094, 0.0707316622, -0.0875140205, -0.0967458636, -0.3099516034, 0.0481162444, -0.0935275778, 0.1731004864, 0.052887585, 0.1320953965, 0.0943320319, -0.1697659194, -0.3104424775, 0.0754995644, 0.0954925865, -0.2117907554, -0.1013583243, -0.0900928006, -0.0787791088, 0.4433885813, 0.1187654957, -0.5254153013, -0.0171314999, 0.3214954436, -0.0486115292, -0.1024696231, 0.197234109, -0.0890346617, -0.0165298749, -0.1392823756, 0.2070880532, -0.1946893483, -0.1024892628, -0.0100646252, 0.0016356769 ]
https://github.com/huggingface/datasets/issues/708
Datasets performance slow? - 6.4x slower than in memory dataset
Thanks for the tip @thomwolf ! I did not see that flag in the docs. I'll try with that.
I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work.
19
Datasets performance slow? - 6.4x slower than in memory dataset I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work. Thanks for the tip @thomwolf ! I did not see that flag in the docs. I'll try with that.
[ -0.3806663454, -0.0424090587, -0.0314098261, 0.4377959967, 0.1005084068, 0.1263736933, 0.0136549324, 0.3071820438, 0.0914101377, -0.0730988681, -0.0662421212, 0.301128, -0.0139891645, -0.2742892206, -0.0800374225, 0.0623482354, 0.2097817063, 0.0289246328, -0.2366966456, -0.1054769903, -0.2640981972, -0.2973696887, -0.0698854551, -0.2284690291, -0.3223610222, -0.1434254497, 0.0818202794, -0.0005962166, -0.3450991809, -0.4037324786, 0.3832429349, 0.0766954869, 0.0686846003, 0.5503900051, -0.0001125017, -0.0448605455, 0.2153705955, 0.163643837, -0.1740946472, 0.3116470277, -0.0444428772, -0.2415702045, -0.0513391085, -0.1154530719, -0.01321181, -0.1297844201, -0.0774295032, -0.716037333, 0.018146161, 0.1087613255, 0.1370816678, 0.3199506998, -0.387277782, 0.2173005193, 0.142141059, 0.3198286295, -0.4389564395, -0.1034560129, 0.3924713433, -0.1402356178, -0.0548130386, 0.2295681834, -0.1826925427, 0.2396480441, 0.4582101107, -0.0244684815, -0.1892895103, -0.2351150215, 0.0883350298, 0.4672670662, 0.1863692254, -0.1389112771, -0.634291172, -0.3808341324, -0.2253734767, -0.1158318147, -0.006604909, 0.2012720704, -0.1965837181, 0.1110180467, -0.5031596422, 0.0621068589, 0.0210665856, -0.0106446929, -0.159393847, 0.3560096622, 0.1086820439, 0.2212633193, 0.3045377135, 0.1173549592, 0.395116359, -0.3474163115, -0.0426577032, 0.0569681115, -0.672750175, 0.073525995, 0.132234633, 0.1327429712, 0.2916539609, 0.0192394834, 0.1375166923, 0.2773088217, -0.0180945862, -0.1378564686, 0.2188935578, 0.1327666491, -0.3069685102, 0.4844336808, 0.3089221716, -0.2571935356, 0.1131686196, 0.2347925156, -0.0429065637, -0.1230408028, 0.0808738023, -0.2456586063, 0.062857829, -0.2480964065, -0.3668068349, -0.1015461087, -0.128623575, -0.0355536453, -0.0565834977, 0.1639847308, -0.2934107184, 0.2284451276, -0.121053271, 0.0039492184, -0.2586508393, 0.0483609028, -0.0533002652, -0.0860239118, -0.3140702546, 0.3556381762, 0.2916275561, -0.0728288367, 0.1457337439, -0.0316701531, 0.0242216475, 0.2429365516, 0.360352248, -0.383017987, 0.2523584664, 0.1450634748, -0.2260444909, 0.5183618069, 0.101564385, 0.4579476416, -0.2209921479, 0.3493160903, -0.0600940846, -0.2040510923, 0.2610086501, 0.1124158204, -0.2648043633, -0.1167252362, -0.4379532933, 0.281727314, 0.1080345511, -0.0582336299, -0.0100162495, -0.3681589961, -0.1956060976, -0.1200667247, 0.3318264782, 0.3998509943, -0.5381984115, 0.1778304726, 0.0605197474, 0.2114970237, 0.2493433207, 0.6614070535, -0.3634279072, 0.2380727977, -0.1285898834, -0.2693577409, -0.1169595793, -0.1960741878, -0.5835576653, 0.1508799493, 0.0044015655, 0.1377564818, 0.1036623269, 0.4255773127, 0.3806002736, 0.137389034, 0.1205449626, 0.2378032058, 0.0506335422, 0.1219745874, -0.3522132337, -0.26674366, 0.5058071613, 0.2659253478, -0.0184598826, -0.1692707241, -0.1304335296, -0.2034451067, 0.171515435, -0.1723213345, 0.1123999879, 0.2761601806, -0.0154158967, -0.1323156953, 0.1253482103, 0.0962627977, -0.2414121479, 0.4494388103, 0.0475798473, 0.0823375434, -0.072255455, -0.0690128878, 0.234012723, 0.1237764582, -0.2757114172, -0.0913971886, -0.0202736482, -0.124347955, 0.0506434403, -0.2392933667, -0.1698196083, 0.3928051591, -0.2049031258, -0.0397740677, -0.2208189815, 0.0434944667, 0.0289862584, -0.0810196772, -0.0130324941, -0.1096345335, -0.1200396195, -0.0273584798, -0.1362690628, 0.1346833408, 0.2414699048, 0.2601766586, 0.1974774301, 0.3538563848, 0.1384090781, -0.31150195, 0.3684660494, 0.2825622559, 0.1614501476, -0.1878308356, -0.3582593799, 0.5080372691, 0.0408375598, 0.6212488413, 0.1318585128, -0.2736033201, 0.0354719982, 0.1617726237, -0.1527906656, 0.361810714, 0.2422435284, 0.1831345111, 0.599363625, 0.3990742266, -0.2270188779, 0.1293457299, 0.3130761385, 0.0727402344, -0.1557810009, -0.0534358248, -0.2871872485, -0.2821799815, 0.2410205305, -0.0649418756, 0.5271027088, 0.2901993096, 0.1248299703, -0.1665139794, -0.0623957813, -0.0885650888, 0.0004644793, 0.295653969, 0.2021184117, 0.0236078668, 0.1321613491, -0.0330442078, -0.2369346172, -0.1259488314, -0.0136153297, 0.0920880958, -0.1836666018, 0.1966559887, -0.0482412688, 0.0431790166, -0.1185243204, 0.0486887321, -0.1458608657, -0.2508894801, -0.0787201822, -0.1703786254, 0.1408748031, 0.099716492, -0.0557448156, 0.2978174388, -0.0532309823, -0.3437314034, -0.1330958605, -0.1097652093, -0.20562087, 0.0347894542, 0.0790493488, 0.2015626878, 0.3894381225, 0.2333970964, 0.0630549416, -0.250762552, -0.128121376, -0.0811345503, -0.1727129966, 0.2470873743, -0.3129542768, 0.1722495705, 0.0450521447, 0.0761779323, 0.0374998562, -0.3253332675, 0.0282385778, -0.1393776983, -0.1856905222, -0.0956031978, 0.0941677466, -0.2838167846, -0.2353223264, -0.2316648811, 0.1122173369, 0.1856214851, -0.1038914844, -0.077787295, 0.2100544274, 0.1400316656, -0.0230245013, -0.0323165953, 0.001091022, -0.2395756543, 0.5963218212, 0.1307839006, -0.2874100804, -0.1484390646, 0.0325048603, 0.092605032, 0.4593246281, -0.4363916516, 0.3887852132, -0.4268549085, 0.0659124777, -0.0283237118, 0.1497391164, 0.3875692487, -0.0489907525, -0.0553493388, -0.0899967924, -0.2898073792, -0.2084777355, -0.2657874525, 0.1750808507, 0.0703375041, 0.2047269791, 0.1540495306, 0.7702895403, 0.2816255391, -0.1282123327, -0.0700765476, -0.019975936, 0.322150439, -0.3042882681, -0.1336632371, 0.0767841637, -0.2323924303, -0.3620030284, 0.102230072, 0.1592202783, -0.2228558511, 0.0571658164, 0.4334772825, 0.2629045546, 0.0344462208, 0.1643804163, -0.1444603056, 0.1150298566, 0.1291986704, 0.2734665871, -0.2965278029, -0.2377397865, 0.1282242537, -0.1157929227, 0.1971657872, -0.0538892858, -0.584630847, 0.0750429928, -0.731251061, 0.1715987474, -0.0042756028, 0.2625333667, 0.1212928519, 0.0990573466, 0.246076569, 0.0343440473, 0.4295497835, 0.0074470975, -0.1342290789, -0.0209553335, -0.262619853, -0.5181392431, 0.0019415579, -0.1180639565, 0.0979924202, -0.018077286, 0.1409920901, -0.144948855, -0.2084661871, 0.0128050549, 0.2898254395, -0.1102436036, -0.2574890256, -0.307546407, -0.2508769929, 0.0031966998, -0.1106913835, 0.0640593469, -0.2158924043, -0.0053232913, -0.2174376547, -0.1411986947, 0.1710703075, 0.287007004, -0.0199487545, 0.2277722806, 0.0420355201, 0.2784541249, 0.309186548, -0.0779347792, 0.310967803, 0.6148452759, 0.0961862504, -0.0449311174, -0.057990659, -0.0302236136, 0.1740664244, 0.3999010921, -0.1160176694, -0.1174306795, -0.0470448509, -0.0459505469, -0.441670984, 0.0930081829, 0.3606791496, 0.0545085706, -0.4937979281, -0.6961235404, 0.4829237759, 0.3221644759, -0.0029609182, 0.5213713646, 0.1529992074, -0.1188369691, 0.2289225906, 0.3288165927, 0.7686126828, -0.408190906, 0.3427323401, 0.0339297093, -0.0006151214, 0.2862084508, -0.1507108063, 0.0477479026, -0.1387883574, -0.0451610275, 0.0209275931, -0.3210027814, 0.2163615376, 0.0421520658, 0.2567620873, 0.2072266638, 0.1430624872, -0.0285382662, 0.0092823412, 0.3683236241, 0.1415447593, -0.3528418839, 0.0806294009, 0.20608446, -0.0636476204, 0.0266835652, 0.1052984297, 0.0771681517, -0.5997768044, 0.2118578851, -0.2221496105, -0.0983411223, -0.2747582495, 0.2297734916, -0.2467639893, -0.194834128, 0.1204784065, 0.1752456874, -0.0273538828, -0.0050549149, -0.2925044894, 0.2589014769, -0.1889819652, 0.1734660119, 0.4696851075, -0.4210249186, 0.1938284636, 0.0822747201, -0.0500953458, 0.0425285697, -0.2707816362, -0.3727759719, -0.1190481484, -0.0976815224, 0.0462765805, -0.096966289, -0.1774129421, 0.1778090596, -0.115728125, -0.0738805234, 0.1192867458, 0.2847137749, 0.1483693123, 0.5707705021, 0.1340297312, -0.4016315043, -0.1551912725, 0.2970864773, 0.0244420879, 0.0889517516, 0.340357542, 0.1648634225, -0.2617579997, -0.0780199021, 0.3460660875, 0.5033900142, -0.1370909065, -0.0944340825, -0.3355538249, 0.1455241144, 0.1652889252, 0.1014356986, 0.1463969648, -0.4325963259, -0.280382216, -0.1083592847, -0.2876851261, 0.1452465951, -0.1482289582, 0.2979683876, -0.1901216358, -0.317422241, -0.1114947498, 0.0183943603, -0.2807397544, -0.2505931854, -0.0107443286, 0.1090028509, -0.1011219323, 0.2202880681, 0.0244037602, -0.1119342074, 0.000743718, -0.0798368379, -0.1273418963, -0.1610721499, 0.0595522821, 0.1735746711, 0.0525194816, -0.4033673108, -0.0549086668, -0.3336770236, -0.2233923078, -0.3024188578, 0.0491736159, 0.3302562535, -0.1085040867, 0.0007787844, 0.0641421229, -0.0916873962, -0.1112688556, 0.2955054343, -0.1259221137, 0.1686892509, 0.0309229884, 0.1445612609, 0.4665190279, -0.2060362548, -0.1343385726, 0.1394993216, 0.0919982865, 0.2192005962, 0.3119926155, -0.3754244745, 0.3008857071, 0.1782547683, 0.5255873203, 0.5776779652, -0.0864238963, -0.0482990853, -0.1358985752, 0.1196112335, -0.0082849562, -0.2492899895, 0.0623388514, -0.1110693738, 0.150314346, 0.2359207422, 0.3171468377, 0.3776897788, -0.0135364886, -0.1543544084, 0.6034697294, -0.4535905123, -0.0637546927, -0.1066442728, 0.1659358144, 0.1051360741, 0.4445793927, 0.1751126647, 0.150199309, 0.5105740428, 0.0687417239, 0.6162847877, 0.3639472127, 0.3138250113, -0.1088628545, -0.1895516068, -0.0064245709, 0.0830415711, -0.2204788029, -0.0311430469, 0.0744842589, 0.0459094718, -0.3543303609, -0.3149505556, 0.0743725821, -0.2537948787, -0.0074904091, -0.0483671501, -0.0298705958, -0.1297779232, 0.072894834, 0.2107989788, -0.2031930834, -0.1960492134, 0.3447199762, -0.0779254958, -0.0568214059, -0.1621294916, 0.28085199, -0.0214891434, 0.1728646457, -0.1264070868, -0.0823842809, -0.2849642336, 0.0103565045, -0.1397751272, 0.378752172, 0.2705045938, 0.2324058712, -0.1640647948, 0.0503749736, -0.1489006728, -0.1381406784, 0.0803576931, 0.3532443047, -0.2355175912, -0.0428104401, 0.1823548526, 0.103942126, -0.1256212145, -0.0923541337, -0.1883644164, 0.0659576505, -0.4343670905, 0.1180909872, -0.0840082392, -0.2931293845, 0.0669183806, 0.0789841115, -0.2430416793, -0.1107978597, 0.4821844697, -0.4651016891, -0.0238464419, -0.1127798185, 0.0683294311, -0.2132830769, 0.7433562279, 0.3071632981, 0.2977477908, -0.3887543976, 0.1410841346, -0.6297145486, -0.0627762228, -0.3574145436, 0.0241963491, 0.1204941124, 0.2420873344, 0.0829272419, 0.3555292487, 0.1255461574, 0.0015365261, -0.0328144133, -0.0863277614, -0.230920434, -0.0251039676, -0.2001772076, 0.2183195502, -0.1794755608, -0.3345949352, 0.3847668469, -0.1063757986, -0.0434556864, -0.1651987582, -0.0484442078, 0.3652563989, 0.1291301548, 0.3027884662, 0.1771481335, 0.420504272, 0.2366503626, -0.0797343031, -0.3657922447, -0.0532497428, -0.0327490009, 0.0968487188, -0.242823869, 0.2796160281, -0.1563113183, -0.4385990202, -0.157276094, 0.0707316622, -0.0875140205, -0.0967458636, -0.3099516034, 0.0481162444, -0.0935275778, 0.1731004864, 0.052887585, 0.1320953965, 0.0943320319, -0.1697659194, -0.3104424775, 0.0754995644, 0.0954925865, -0.2117907554, -0.1013583243, -0.0900928006, -0.0787791088, 0.4433885813, 0.1187654957, -0.5254153013, -0.0171314999, 0.3214954436, -0.0486115292, -0.1024696231, 0.197234109, -0.0890346617, -0.0165298749, -0.1392823756, 0.2070880532, -0.1946893483, -0.1024892628, -0.0100646252, 0.0016356769 ]
https://github.com/huggingface/datasets/issues/708
Datasets performance slow? - 6.4x slower than in memory dataset
We should add it indeed and also maybe a specific section with all the tips for maximal speed. What do you think @lhoestq @SBrandeis @yjernite ?
I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work.
26
Datasets performance slow? - 6.4x slower than in memory dataset I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work. We should add it indeed and also maybe a specific section with all the tips for maximal speed. What do you think @lhoestq @SBrandeis @yjernite ?
[ -0.3806663454, -0.0424090587, -0.0314098261, 0.4377959967, 0.1005084068, 0.1263736933, 0.0136549324, 0.3071820438, 0.0914101377, -0.0730988681, -0.0662421212, 0.301128, -0.0139891645, -0.2742892206, -0.0800374225, 0.0623482354, 0.2097817063, 0.0289246328, -0.2366966456, -0.1054769903, -0.2640981972, -0.2973696887, -0.0698854551, -0.2284690291, -0.3223610222, -0.1434254497, 0.0818202794, -0.0005962166, -0.3450991809, -0.4037324786, 0.3832429349, 0.0766954869, 0.0686846003, 0.5503900051, -0.0001125017, -0.0448605455, 0.2153705955, 0.163643837, -0.1740946472, 0.3116470277, -0.0444428772, -0.2415702045, -0.0513391085, -0.1154530719, -0.01321181, -0.1297844201, -0.0774295032, -0.716037333, 0.018146161, 0.1087613255, 0.1370816678, 0.3199506998, -0.387277782, 0.2173005193, 0.142141059, 0.3198286295, -0.4389564395, -0.1034560129, 0.3924713433, -0.1402356178, -0.0548130386, 0.2295681834, -0.1826925427, 0.2396480441, 0.4582101107, -0.0244684815, -0.1892895103, -0.2351150215, 0.0883350298, 0.4672670662, 0.1863692254, -0.1389112771, -0.634291172, -0.3808341324, -0.2253734767, -0.1158318147, -0.006604909, 0.2012720704, -0.1965837181, 0.1110180467, -0.5031596422, 0.0621068589, 0.0210665856, -0.0106446929, -0.159393847, 0.3560096622, 0.1086820439, 0.2212633193, 0.3045377135, 0.1173549592, 0.395116359, -0.3474163115, -0.0426577032, 0.0569681115, -0.672750175, 0.073525995, 0.132234633, 0.1327429712, 0.2916539609, 0.0192394834, 0.1375166923, 0.2773088217, -0.0180945862, -0.1378564686, 0.2188935578, 0.1327666491, -0.3069685102, 0.4844336808, 0.3089221716, -0.2571935356, 0.1131686196, 0.2347925156, -0.0429065637, -0.1230408028, 0.0808738023, -0.2456586063, 0.062857829, -0.2480964065, -0.3668068349, -0.1015461087, -0.128623575, -0.0355536453, -0.0565834977, 0.1639847308, -0.2934107184, 0.2284451276, -0.121053271, 0.0039492184, -0.2586508393, 0.0483609028, -0.0533002652, -0.0860239118, -0.3140702546, 0.3556381762, 0.2916275561, -0.0728288367, 0.1457337439, -0.0316701531, 0.0242216475, 0.2429365516, 0.360352248, -0.383017987, 0.2523584664, 0.1450634748, -0.2260444909, 0.5183618069, 0.101564385, 0.4579476416, -0.2209921479, 0.3493160903, -0.0600940846, -0.2040510923, 0.2610086501, 0.1124158204, -0.2648043633, -0.1167252362, -0.4379532933, 0.281727314, 0.1080345511, -0.0582336299, -0.0100162495, -0.3681589961, -0.1956060976, -0.1200667247, 0.3318264782, 0.3998509943, -0.5381984115, 0.1778304726, 0.0605197474, 0.2114970237, 0.2493433207, 0.6614070535, -0.3634279072, 0.2380727977, -0.1285898834, -0.2693577409, -0.1169595793, -0.1960741878, -0.5835576653, 0.1508799493, 0.0044015655, 0.1377564818, 0.1036623269, 0.4255773127, 0.3806002736, 0.137389034, 0.1205449626, 0.2378032058, 0.0506335422, 0.1219745874, -0.3522132337, -0.26674366, 0.5058071613, 0.2659253478, -0.0184598826, -0.1692707241, -0.1304335296, -0.2034451067, 0.171515435, -0.1723213345, 0.1123999879, 0.2761601806, -0.0154158967, -0.1323156953, 0.1253482103, 0.0962627977, -0.2414121479, 0.4494388103, 0.0475798473, 0.0823375434, -0.072255455, -0.0690128878, 0.234012723, 0.1237764582, -0.2757114172, -0.0913971886, -0.0202736482, -0.124347955, 0.0506434403, -0.2392933667, -0.1698196083, 0.3928051591, -0.2049031258, -0.0397740677, -0.2208189815, 0.0434944667, 0.0289862584, -0.0810196772, -0.0130324941, -0.1096345335, -0.1200396195, -0.0273584798, -0.1362690628, 0.1346833408, 0.2414699048, 0.2601766586, 0.1974774301, 0.3538563848, 0.1384090781, -0.31150195, 0.3684660494, 0.2825622559, 0.1614501476, -0.1878308356, -0.3582593799, 0.5080372691, 0.0408375598, 0.6212488413, 0.1318585128, -0.2736033201, 0.0354719982, 0.1617726237, -0.1527906656, 0.361810714, 0.2422435284, 0.1831345111, 0.599363625, 0.3990742266, -0.2270188779, 0.1293457299, 0.3130761385, 0.0727402344, -0.1557810009, -0.0534358248, -0.2871872485, -0.2821799815, 0.2410205305, -0.0649418756, 0.5271027088, 0.2901993096, 0.1248299703, -0.1665139794, -0.0623957813, -0.0885650888, 0.0004644793, 0.295653969, 0.2021184117, 0.0236078668, 0.1321613491, -0.0330442078, -0.2369346172, -0.1259488314, -0.0136153297, 0.0920880958, -0.1836666018, 0.1966559887, -0.0482412688, 0.0431790166, -0.1185243204, 0.0486887321, -0.1458608657, -0.2508894801, -0.0787201822, -0.1703786254, 0.1408748031, 0.099716492, -0.0557448156, 0.2978174388, -0.0532309823, -0.3437314034, -0.1330958605, -0.1097652093, -0.20562087, 0.0347894542, 0.0790493488, 0.2015626878, 0.3894381225, 0.2333970964, 0.0630549416, -0.250762552, -0.128121376, -0.0811345503, -0.1727129966, 0.2470873743, -0.3129542768, 0.1722495705, 0.0450521447, 0.0761779323, 0.0374998562, -0.3253332675, 0.0282385778, -0.1393776983, -0.1856905222, -0.0956031978, 0.0941677466, -0.2838167846, -0.2353223264, -0.2316648811, 0.1122173369, 0.1856214851, -0.1038914844, -0.077787295, 0.2100544274, 0.1400316656, -0.0230245013, -0.0323165953, 0.001091022, -0.2395756543, 0.5963218212, 0.1307839006, -0.2874100804, -0.1484390646, 0.0325048603, 0.092605032, 0.4593246281, -0.4363916516, 0.3887852132, -0.4268549085, 0.0659124777, -0.0283237118, 0.1497391164, 0.3875692487, -0.0489907525, -0.0553493388, -0.0899967924, -0.2898073792, -0.2084777355, -0.2657874525, 0.1750808507, 0.0703375041, 0.2047269791, 0.1540495306, 0.7702895403, 0.2816255391, -0.1282123327, -0.0700765476, -0.019975936, 0.322150439, -0.3042882681, -0.1336632371, 0.0767841637, -0.2323924303, -0.3620030284, 0.102230072, 0.1592202783, -0.2228558511, 0.0571658164, 0.4334772825, 0.2629045546, 0.0344462208, 0.1643804163, -0.1444603056, 0.1150298566, 0.1291986704, 0.2734665871, -0.2965278029, -0.2377397865, 0.1282242537, -0.1157929227, 0.1971657872, -0.0538892858, -0.584630847, 0.0750429928, -0.731251061, 0.1715987474, -0.0042756028, 0.2625333667, 0.1212928519, 0.0990573466, 0.246076569, 0.0343440473, 0.4295497835, 0.0074470975, -0.1342290789, -0.0209553335, -0.262619853, -0.5181392431, 0.0019415579, -0.1180639565, 0.0979924202, -0.018077286, 0.1409920901, -0.144948855, -0.2084661871, 0.0128050549, 0.2898254395, -0.1102436036, -0.2574890256, -0.307546407, -0.2508769929, 0.0031966998, -0.1106913835, 0.0640593469, -0.2158924043, -0.0053232913, -0.2174376547, -0.1411986947, 0.1710703075, 0.287007004, -0.0199487545, 0.2277722806, 0.0420355201, 0.2784541249, 0.309186548, -0.0779347792, 0.310967803, 0.6148452759, 0.0961862504, -0.0449311174, -0.057990659, -0.0302236136, 0.1740664244, 0.3999010921, -0.1160176694, -0.1174306795, -0.0470448509, -0.0459505469, -0.441670984, 0.0930081829, 0.3606791496, 0.0545085706, -0.4937979281, -0.6961235404, 0.4829237759, 0.3221644759, -0.0029609182, 0.5213713646, 0.1529992074, -0.1188369691, 0.2289225906, 0.3288165927, 0.7686126828, -0.408190906, 0.3427323401, 0.0339297093, -0.0006151214, 0.2862084508, -0.1507108063, 0.0477479026, -0.1387883574, -0.0451610275, 0.0209275931, -0.3210027814, 0.2163615376, 0.0421520658, 0.2567620873, 0.2072266638, 0.1430624872, -0.0285382662, 0.0092823412, 0.3683236241, 0.1415447593, -0.3528418839, 0.0806294009, 0.20608446, -0.0636476204, 0.0266835652, 0.1052984297, 0.0771681517, -0.5997768044, 0.2118578851, -0.2221496105, -0.0983411223, -0.2747582495, 0.2297734916, -0.2467639893, -0.194834128, 0.1204784065, 0.1752456874, -0.0273538828, -0.0050549149, -0.2925044894, 0.2589014769, -0.1889819652, 0.1734660119, 0.4696851075, -0.4210249186, 0.1938284636, 0.0822747201, -0.0500953458, 0.0425285697, -0.2707816362, -0.3727759719, -0.1190481484, -0.0976815224, 0.0462765805, -0.096966289, -0.1774129421, 0.1778090596, -0.115728125, -0.0738805234, 0.1192867458, 0.2847137749, 0.1483693123, 0.5707705021, 0.1340297312, -0.4016315043, -0.1551912725, 0.2970864773, 0.0244420879, 0.0889517516, 0.340357542, 0.1648634225, -0.2617579997, -0.0780199021, 0.3460660875, 0.5033900142, -0.1370909065, -0.0944340825, -0.3355538249, 0.1455241144, 0.1652889252, 0.1014356986, 0.1463969648, -0.4325963259, -0.280382216, -0.1083592847, -0.2876851261, 0.1452465951, -0.1482289582, 0.2979683876, -0.1901216358, -0.317422241, -0.1114947498, 0.0183943603, -0.2807397544, -0.2505931854, -0.0107443286, 0.1090028509, -0.1011219323, 0.2202880681, 0.0244037602, -0.1119342074, 0.000743718, -0.0798368379, -0.1273418963, -0.1610721499, 0.0595522821, 0.1735746711, 0.0525194816, -0.4033673108, -0.0549086668, -0.3336770236, -0.2233923078, -0.3024188578, 0.0491736159, 0.3302562535, -0.1085040867, 0.0007787844, 0.0641421229, -0.0916873962, -0.1112688556, 0.2955054343, -0.1259221137, 0.1686892509, 0.0309229884, 0.1445612609, 0.4665190279, -0.2060362548, -0.1343385726, 0.1394993216, 0.0919982865, 0.2192005962, 0.3119926155, -0.3754244745, 0.3008857071, 0.1782547683, 0.5255873203, 0.5776779652, -0.0864238963, -0.0482990853, -0.1358985752, 0.1196112335, -0.0082849562, -0.2492899895, 0.0623388514, -0.1110693738, 0.150314346, 0.2359207422, 0.3171468377, 0.3776897788, -0.0135364886, -0.1543544084, 0.6034697294, -0.4535905123, -0.0637546927, -0.1066442728, 0.1659358144, 0.1051360741, 0.4445793927, 0.1751126647, 0.150199309, 0.5105740428, 0.0687417239, 0.6162847877, 0.3639472127, 0.3138250113, -0.1088628545, -0.1895516068, -0.0064245709, 0.0830415711, -0.2204788029, -0.0311430469, 0.0744842589, 0.0459094718, -0.3543303609, -0.3149505556, 0.0743725821, -0.2537948787, -0.0074904091, -0.0483671501, -0.0298705958, -0.1297779232, 0.072894834, 0.2107989788, -0.2031930834, -0.1960492134, 0.3447199762, -0.0779254958, -0.0568214059, -0.1621294916, 0.28085199, -0.0214891434, 0.1728646457, -0.1264070868, -0.0823842809, -0.2849642336, 0.0103565045, -0.1397751272, 0.378752172, 0.2705045938, 0.2324058712, -0.1640647948, 0.0503749736, -0.1489006728, -0.1381406784, 0.0803576931, 0.3532443047, -0.2355175912, -0.0428104401, 0.1823548526, 0.103942126, -0.1256212145, -0.0923541337, -0.1883644164, 0.0659576505, -0.4343670905, 0.1180909872, -0.0840082392, -0.2931293845, 0.0669183806, 0.0789841115, -0.2430416793, -0.1107978597, 0.4821844697, -0.4651016891, -0.0238464419, -0.1127798185, 0.0683294311, -0.2132830769, 0.7433562279, 0.3071632981, 0.2977477908, -0.3887543976, 0.1410841346, -0.6297145486, -0.0627762228, -0.3574145436, 0.0241963491, 0.1204941124, 0.2420873344, 0.0829272419, 0.3555292487, 0.1255461574, 0.0015365261, -0.0328144133, -0.0863277614, -0.230920434, -0.0251039676, -0.2001772076, 0.2183195502, -0.1794755608, -0.3345949352, 0.3847668469, -0.1063757986, -0.0434556864, -0.1651987582, -0.0484442078, 0.3652563989, 0.1291301548, 0.3027884662, 0.1771481335, 0.420504272, 0.2366503626, -0.0797343031, -0.3657922447, -0.0532497428, -0.0327490009, 0.0968487188, -0.242823869, 0.2796160281, -0.1563113183, -0.4385990202, -0.157276094, 0.0707316622, -0.0875140205, -0.0967458636, -0.3099516034, 0.0481162444, -0.0935275778, 0.1731004864, 0.052887585, 0.1320953965, 0.0943320319, -0.1697659194, -0.3104424775, 0.0754995644, 0.0954925865, -0.2117907554, -0.1013583243, -0.0900928006, -0.0787791088, 0.4433885813, 0.1187654957, -0.5254153013, -0.0171314999, 0.3214954436, -0.0486115292, -0.1024696231, 0.197234109, -0.0890346617, -0.0165298749, -0.1392823756, 0.2070880532, -0.1946893483, -0.1024892628, -0.0100646252, 0.0016356769 ]
https://github.com/huggingface/datasets/issues/708
Datasets performance slow? - 6.4x slower than in memory dataset
By default the datasets loaded with `load_dataset` live on disk. It's possible to load them in memory by using some transforms like `.map(..., keep_in_memory=True)`. Small correction to @thomwolf 's comment above: currently we don't have the `keep_in_memory` parameter for `load_dataset` AFAIK but it would be nice to add it indeed :)
I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work.
51
Datasets performance slow? - 6.4x slower than in memory dataset I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work. By default the datasets loaded with `load_dataset` live on disk. It's possible to load them in memory by using some transforms like `.map(..., keep_in_memory=True)`. Small correction to @thomwolf 's comment above: currently we don't have the `keep_in_memory` parameter for `load_dataset` AFAIK but it would be nice to add it indeed :)
[ -0.3806663454, -0.0424090587, -0.0314098261, 0.4377959967, 0.1005084068, 0.1263736933, 0.0136549324, 0.3071820438, 0.0914101377, -0.0730988681, -0.0662421212, 0.301128, -0.0139891645, -0.2742892206, -0.0800374225, 0.0623482354, 0.2097817063, 0.0289246328, -0.2366966456, -0.1054769903, -0.2640981972, -0.2973696887, -0.0698854551, -0.2284690291, -0.3223610222, -0.1434254497, 0.0818202794, -0.0005962166, -0.3450991809, -0.4037324786, 0.3832429349, 0.0766954869, 0.0686846003, 0.5503900051, -0.0001125017, -0.0448605455, 0.2153705955, 0.163643837, -0.1740946472, 0.3116470277, -0.0444428772, -0.2415702045, -0.0513391085, -0.1154530719, -0.01321181, -0.1297844201, -0.0774295032, -0.716037333, 0.018146161, 0.1087613255, 0.1370816678, 0.3199506998, -0.387277782, 0.2173005193, 0.142141059, 0.3198286295, -0.4389564395, -0.1034560129, 0.3924713433, -0.1402356178, -0.0548130386, 0.2295681834, -0.1826925427, 0.2396480441, 0.4582101107, -0.0244684815, -0.1892895103, -0.2351150215, 0.0883350298, 0.4672670662, 0.1863692254, -0.1389112771, -0.634291172, -0.3808341324, -0.2253734767, -0.1158318147, -0.006604909, 0.2012720704, -0.1965837181, 0.1110180467, -0.5031596422, 0.0621068589, 0.0210665856, -0.0106446929, -0.159393847, 0.3560096622, 0.1086820439, 0.2212633193, 0.3045377135, 0.1173549592, 0.395116359, -0.3474163115, -0.0426577032, 0.0569681115, -0.672750175, 0.073525995, 0.132234633, 0.1327429712, 0.2916539609, 0.0192394834, 0.1375166923, 0.2773088217, -0.0180945862, -0.1378564686, 0.2188935578, 0.1327666491, -0.3069685102, 0.4844336808, 0.3089221716, -0.2571935356, 0.1131686196, 0.2347925156, -0.0429065637, -0.1230408028, 0.0808738023, -0.2456586063, 0.062857829, -0.2480964065, -0.3668068349, -0.1015461087, -0.128623575, -0.0355536453, -0.0565834977, 0.1639847308, -0.2934107184, 0.2284451276, -0.121053271, 0.0039492184, -0.2586508393, 0.0483609028, -0.0533002652, -0.0860239118, -0.3140702546, 0.3556381762, 0.2916275561, -0.0728288367, 0.1457337439, -0.0316701531, 0.0242216475, 0.2429365516, 0.360352248, -0.383017987, 0.2523584664, 0.1450634748, -0.2260444909, 0.5183618069, 0.101564385, 0.4579476416, -0.2209921479, 0.3493160903, -0.0600940846, -0.2040510923, 0.2610086501, 0.1124158204, -0.2648043633, -0.1167252362, -0.4379532933, 0.281727314, 0.1080345511, -0.0582336299, -0.0100162495, -0.3681589961, -0.1956060976, -0.1200667247, 0.3318264782, 0.3998509943, -0.5381984115, 0.1778304726, 0.0605197474, 0.2114970237, 0.2493433207, 0.6614070535, -0.3634279072, 0.2380727977, -0.1285898834, -0.2693577409, -0.1169595793, -0.1960741878, -0.5835576653, 0.1508799493, 0.0044015655, 0.1377564818, 0.1036623269, 0.4255773127, 0.3806002736, 0.137389034, 0.1205449626, 0.2378032058, 0.0506335422, 0.1219745874, -0.3522132337, -0.26674366, 0.5058071613, 0.2659253478, -0.0184598826, -0.1692707241, -0.1304335296, -0.2034451067, 0.171515435, -0.1723213345, 0.1123999879, 0.2761601806, -0.0154158967, -0.1323156953, 0.1253482103, 0.0962627977, -0.2414121479, 0.4494388103, 0.0475798473, 0.0823375434, -0.072255455, -0.0690128878, 0.234012723, 0.1237764582, -0.2757114172, -0.0913971886, -0.0202736482, -0.124347955, 0.0506434403, -0.2392933667, -0.1698196083, 0.3928051591, -0.2049031258, -0.0397740677, -0.2208189815, 0.0434944667, 0.0289862584, -0.0810196772, -0.0130324941, -0.1096345335, -0.1200396195, -0.0273584798, -0.1362690628, 0.1346833408, 0.2414699048, 0.2601766586, 0.1974774301, 0.3538563848, 0.1384090781, -0.31150195, 0.3684660494, 0.2825622559, 0.1614501476, -0.1878308356, -0.3582593799, 0.5080372691, 0.0408375598, 0.6212488413, 0.1318585128, -0.2736033201, 0.0354719982, 0.1617726237, -0.1527906656, 0.361810714, 0.2422435284, 0.1831345111, 0.599363625, 0.3990742266, -0.2270188779, 0.1293457299, 0.3130761385, 0.0727402344, -0.1557810009, -0.0534358248, -0.2871872485, -0.2821799815, 0.2410205305, -0.0649418756, 0.5271027088, 0.2901993096, 0.1248299703, -0.1665139794, -0.0623957813, -0.0885650888, 0.0004644793, 0.295653969, 0.2021184117, 0.0236078668, 0.1321613491, -0.0330442078, -0.2369346172, -0.1259488314, -0.0136153297, 0.0920880958, -0.1836666018, 0.1966559887, -0.0482412688, 0.0431790166, -0.1185243204, 0.0486887321, -0.1458608657, -0.2508894801, -0.0787201822, -0.1703786254, 0.1408748031, 0.099716492, -0.0557448156, 0.2978174388, -0.0532309823, -0.3437314034, -0.1330958605, -0.1097652093, -0.20562087, 0.0347894542, 0.0790493488, 0.2015626878, 0.3894381225, 0.2333970964, 0.0630549416, -0.250762552, -0.128121376, -0.0811345503, -0.1727129966, 0.2470873743, -0.3129542768, 0.1722495705, 0.0450521447, 0.0761779323, 0.0374998562, -0.3253332675, 0.0282385778, -0.1393776983, -0.1856905222, -0.0956031978, 0.0941677466, -0.2838167846, -0.2353223264, -0.2316648811, 0.1122173369, 0.1856214851, -0.1038914844, -0.077787295, 0.2100544274, 0.1400316656, -0.0230245013, -0.0323165953, 0.001091022, -0.2395756543, 0.5963218212, 0.1307839006, -0.2874100804, -0.1484390646, 0.0325048603, 0.092605032, 0.4593246281, -0.4363916516, 0.3887852132, -0.4268549085, 0.0659124777, -0.0283237118, 0.1497391164, 0.3875692487, -0.0489907525, -0.0553493388, -0.0899967924, -0.2898073792, -0.2084777355, -0.2657874525, 0.1750808507, 0.0703375041, 0.2047269791, 0.1540495306, 0.7702895403, 0.2816255391, -0.1282123327, -0.0700765476, -0.019975936, 0.322150439, -0.3042882681, -0.1336632371, 0.0767841637, -0.2323924303, -0.3620030284, 0.102230072, 0.1592202783, -0.2228558511, 0.0571658164, 0.4334772825, 0.2629045546, 0.0344462208, 0.1643804163, -0.1444603056, 0.1150298566, 0.1291986704, 0.2734665871, -0.2965278029, -0.2377397865, 0.1282242537, -0.1157929227, 0.1971657872, -0.0538892858, -0.584630847, 0.0750429928, -0.731251061, 0.1715987474, -0.0042756028, 0.2625333667, 0.1212928519, 0.0990573466, 0.246076569, 0.0343440473, 0.4295497835, 0.0074470975, -0.1342290789, -0.0209553335, -0.262619853, -0.5181392431, 0.0019415579, -0.1180639565, 0.0979924202, -0.018077286, 0.1409920901, -0.144948855, -0.2084661871, 0.0128050549, 0.2898254395, -0.1102436036, -0.2574890256, -0.307546407, -0.2508769929, 0.0031966998, -0.1106913835, 0.0640593469, -0.2158924043, -0.0053232913, -0.2174376547, -0.1411986947, 0.1710703075, 0.287007004, -0.0199487545, 0.2277722806, 0.0420355201, 0.2784541249, 0.309186548, -0.0779347792, 0.310967803, 0.6148452759, 0.0961862504, -0.0449311174, -0.057990659, -0.0302236136, 0.1740664244, 0.3999010921, -0.1160176694, -0.1174306795, -0.0470448509, -0.0459505469, -0.441670984, 0.0930081829, 0.3606791496, 0.0545085706, -0.4937979281, -0.6961235404, 0.4829237759, 0.3221644759, -0.0029609182, 0.5213713646, 0.1529992074, -0.1188369691, 0.2289225906, 0.3288165927, 0.7686126828, -0.408190906, 0.3427323401, 0.0339297093, -0.0006151214, 0.2862084508, -0.1507108063, 0.0477479026, -0.1387883574, -0.0451610275, 0.0209275931, -0.3210027814, 0.2163615376, 0.0421520658, 0.2567620873, 0.2072266638, 0.1430624872, -0.0285382662, 0.0092823412, 0.3683236241, 0.1415447593, -0.3528418839, 0.0806294009, 0.20608446, -0.0636476204, 0.0266835652, 0.1052984297, 0.0771681517, -0.5997768044, 0.2118578851, -0.2221496105, -0.0983411223, -0.2747582495, 0.2297734916, -0.2467639893, -0.194834128, 0.1204784065, 0.1752456874, -0.0273538828, -0.0050549149, -0.2925044894, 0.2589014769, -0.1889819652, 0.1734660119, 0.4696851075, -0.4210249186, 0.1938284636, 0.0822747201, -0.0500953458, 0.0425285697, -0.2707816362, -0.3727759719, -0.1190481484, -0.0976815224, 0.0462765805, -0.096966289, -0.1774129421, 0.1778090596, -0.115728125, -0.0738805234, 0.1192867458, 0.2847137749, 0.1483693123, 0.5707705021, 0.1340297312, -0.4016315043, -0.1551912725, 0.2970864773, 0.0244420879, 0.0889517516, 0.340357542, 0.1648634225, -0.2617579997, -0.0780199021, 0.3460660875, 0.5033900142, -0.1370909065, -0.0944340825, -0.3355538249, 0.1455241144, 0.1652889252, 0.1014356986, 0.1463969648, -0.4325963259, -0.280382216, -0.1083592847, -0.2876851261, 0.1452465951, -0.1482289582, 0.2979683876, -0.1901216358, -0.317422241, -0.1114947498, 0.0183943603, -0.2807397544, -0.2505931854, -0.0107443286, 0.1090028509, -0.1011219323, 0.2202880681, 0.0244037602, -0.1119342074, 0.000743718, -0.0798368379, -0.1273418963, -0.1610721499, 0.0595522821, 0.1735746711, 0.0525194816, -0.4033673108, -0.0549086668, -0.3336770236, -0.2233923078, -0.3024188578, 0.0491736159, 0.3302562535, -0.1085040867, 0.0007787844, 0.0641421229, -0.0916873962, -0.1112688556, 0.2955054343, -0.1259221137, 0.1686892509, 0.0309229884, 0.1445612609, 0.4665190279, -0.2060362548, -0.1343385726, 0.1394993216, 0.0919982865, 0.2192005962, 0.3119926155, -0.3754244745, 0.3008857071, 0.1782547683, 0.5255873203, 0.5776779652, -0.0864238963, -0.0482990853, -0.1358985752, 0.1196112335, -0.0082849562, -0.2492899895, 0.0623388514, -0.1110693738, 0.150314346, 0.2359207422, 0.3171468377, 0.3776897788, -0.0135364886, -0.1543544084, 0.6034697294, -0.4535905123, -0.0637546927, -0.1066442728, 0.1659358144, 0.1051360741, 0.4445793927, 0.1751126647, 0.150199309, 0.5105740428, 0.0687417239, 0.6162847877, 0.3639472127, 0.3138250113, -0.1088628545, -0.1895516068, -0.0064245709, 0.0830415711, -0.2204788029, -0.0311430469, 0.0744842589, 0.0459094718, -0.3543303609, -0.3149505556, 0.0743725821, -0.2537948787, -0.0074904091, -0.0483671501, -0.0298705958, -0.1297779232, 0.072894834, 0.2107989788, -0.2031930834, -0.1960492134, 0.3447199762, -0.0779254958, -0.0568214059, -0.1621294916, 0.28085199, -0.0214891434, 0.1728646457, -0.1264070868, -0.0823842809, -0.2849642336, 0.0103565045, -0.1397751272, 0.378752172, 0.2705045938, 0.2324058712, -0.1640647948, 0.0503749736, -0.1489006728, -0.1381406784, 0.0803576931, 0.3532443047, -0.2355175912, -0.0428104401, 0.1823548526, 0.103942126, -0.1256212145, -0.0923541337, -0.1883644164, 0.0659576505, -0.4343670905, 0.1180909872, -0.0840082392, -0.2931293845, 0.0669183806, 0.0789841115, -0.2430416793, -0.1107978597, 0.4821844697, -0.4651016891, -0.0238464419, -0.1127798185, 0.0683294311, -0.2132830769, 0.7433562279, 0.3071632981, 0.2977477908, -0.3887543976, 0.1410841346, -0.6297145486, -0.0627762228, -0.3574145436, 0.0241963491, 0.1204941124, 0.2420873344, 0.0829272419, 0.3555292487, 0.1255461574, 0.0015365261, -0.0328144133, -0.0863277614, -0.230920434, -0.0251039676, -0.2001772076, 0.2183195502, -0.1794755608, -0.3345949352, 0.3847668469, -0.1063757986, -0.0434556864, -0.1651987582, -0.0484442078, 0.3652563989, 0.1291301548, 0.3027884662, 0.1771481335, 0.420504272, 0.2366503626, -0.0797343031, -0.3657922447, -0.0532497428, -0.0327490009, 0.0968487188, -0.242823869, 0.2796160281, -0.1563113183, -0.4385990202, -0.157276094, 0.0707316622, -0.0875140205, -0.0967458636, -0.3099516034, 0.0481162444, -0.0935275778, 0.1731004864, 0.052887585, 0.1320953965, 0.0943320319, -0.1697659194, -0.3104424775, 0.0754995644, 0.0954925865, -0.2117907554, -0.1013583243, -0.0900928006, -0.0787791088, 0.4433885813, 0.1187654957, -0.5254153013, -0.0171314999, 0.3214954436, -0.0486115292, -0.1024696231, 0.197234109, -0.0890346617, -0.0165298749, -0.1392823756, 0.2070880532, -0.1946893483, -0.1024892628, -0.0100646252, 0.0016356769 ]
https://github.com/huggingface/datasets/issues/708
Datasets performance slow? - 6.4x slower than in memory dataset
Great! Thanks a lot. I did a test using `map(..., keep_in_memory=True)` and also a test using in-memory only data. ```python features = dataset.map(tokenize, batched=True, remove_columns=dataset['train'].column_names) features.set_format(type='torch', columns=['input_ids', 'token_type_ids', 'attention_mask']) features_in_memory = dataset.map(tokenize, batched=True, keep_in_memory=True, remove_columns=dataset['train'].column_names) features_in_memory.set_format(type='torch', columns=['input_ids', 'token_type_ids', 'attention_mask']) in_memory = [features['train'][i] for i in range(len(features['train']))] ``` For using the features without any tweak, I got **1min17s** for copying the entire DataLoader to CUDA: ``` %%time for i, batch in enumerate(DataLoader(features['train'], batch_size=16, num_workers=4)): batch['input_ids'].to(device) ``` For using the features mapped with `keep_in_memory=True`, I also got **1min17s** for copying the entire DataLoader to CUDA: ``` %%time for i, batch in enumerate(DataLoader(features_in_memory['train'], batch_size=16, num_workers=4)): batch['input_ids'].to(device) ``` And for the case using every element in memory, converted from the original dataset, I got **12.5s**: ``` %%time for i, batch in enumerate(DataLoader(in_memory, batch_size=16, num_workers=4)): batch['input_ids'].to(device) ``` Taking a closer look in my SQuAD code, using a profiler, I see a lot of calls to `posix read` api. It seems that it is really reliying on disk, which results in a very high train time.
I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work.
170
Datasets performance slow? - 6.4x slower than in memory dataset I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work. Great! Thanks a lot. I did a test using `map(..., keep_in_memory=True)` and also a test using in-memory only data. ```python features = dataset.map(tokenize, batched=True, remove_columns=dataset['train'].column_names) features.set_format(type='torch', columns=['input_ids', 'token_type_ids', 'attention_mask']) features_in_memory = dataset.map(tokenize, batched=True, keep_in_memory=True, remove_columns=dataset['train'].column_names) features_in_memory.set_format(type='torch', columns=['input_ids', 'token_type_ids', 'attention_mask']) in_memory = [features['train'][i] for i in range(len(features['train']))] ``` For using the features without any tweak, I got **1min17s** for copying the entire DataLoader to CUDA: ``` %%time for i, batch in enumerate(DataLoader(features['train'], batch_size=16, num_workers=4)): batch['input_ids'].to(device) ``` For using the features mapped with `keep_in_memory=True`, I also got **1min17s** for copying the entire DataLoader to CUDA: ``` %%time for i, batch in enumerate(DataLoader(features_in_memory['train'], batch_size=16, num_workers=4)): batch['input_ids'].to(device) ``` And for the case using every element in memory, converted from the original dataset, I got **12.5s**: ``` %%time for i, batch in enumerate(DataLoader(in_memory, batch_size=16, num_workers=4)): batch['input_ids'].to(device) ``` Taking a closer look in my SQuAD code, using a profiler, I see a lot of calls to `posix read` api. It seems that it is really reliying on disk, which results in a very high train time.
[ -0.3806663454, -0.0424090587, -0.0314098261, 0.4377959967, 0.1005084068, 0.1263736933, 0.0136549324, 0.3071820438, 0.0914101377, -0.0730988681, -0.0662421212, 0.301128, -0.0139891645, -0.2742892206, -0.0800374225, 0.0623482354, 0.2097817063, 0.0289246328, -0.2366966456, -0.1054769903, -0.2640981972, -0.2973696887, -0.0698854551, -0.2284690291, -0.3223610222, -0.1434254497, 0.0818202794, -0.0005962166, -0.3450991809, -0.4037324786, 0.3832429349, 0.0766954869, 0.0686846003, 0.5503900051, -0.0001125017, -0.0448605455, 0.2153705955, 0.163643837, -0.1740946472, 0.3116470277, -0.0444428772, -0.2415702045, -0.0513391085, -0.1154530719, -0.01321181, -0.1297844201, -0.0774295032, -0.716037333, 0.018146161, 0.1087613255, 0.1370816678, 0.3199506998, -0.387277782, 0.2173005193, 0.142141059, 0.3198286295, -0.4389564395, -0.1034560129, 0.3924713433, -0.1402356178, -0.0548130386, 0.2295681834, -0.1826925427, 0.2396480441, 0.4582101107, -0.0244684815, -0.1892895103, -0.2351150215, 0.0883350298, 0.4672670662, 0.1863692254, -0.1389112771, -0.634291172, -0.3808341324, -0.2253734767, -0.1158318147, -0.006604909, 0.2012720704, -0.1965837181, 0.1110180467, -0.5031596422, 0.0621068589, 0.0210665856, -0.0106446929, -0.159393847, 0.3560096622, 0.1086820439, 0.2212633193, 0.3045377135, 0.1173549592, 0.395116359, -0.3474163115, -0.0426577032, 0.0569681115, -0.672750175, 0.073525995, 0.132234633, 0.1327429712, 0.2916539609, 0.0192394834, 0.1375166923, 0.2773088217, -0.0180945862, -0.1378564686, 0.2188935578, 0.1327666491, -0.3069685102, 0.4844336808, 0.3089221716, -0.2571935356, 0.1131686196, 0.2347925156, -0.0429065637, -0.1230408028, 0.0808738023, -0.2456586063, 0.062857829, -0.2480964065, -0.3668068349, -0.1015461087, -0.128623575, -0.0355536453, -0.0565834977, 0.1639847308, -0.2934107184, 0.2284451276, -0.121053271, 0.0039492184, -0.2586508393, 0.0483609028, -0.0533002652, -0.0860239118, -0.3140702546, 0.3556381762, 0.2916275561, -0.0728288367, 0.1457337439, -0.0316701531, 0.0242216475, 0.2429365516, 0.360352248, -0.383017987, 0.2523584664, 0.1450634748, -0.2260444909, 0.5183618069, 0.101564385, 0.4579476416, -0.2209921479, 0.3493160903, -0.0600940846, -0.2040510923, 0.2610086501, 0.1124158204, -0.2648043633, -0.1167252362, -0.4379532933, 0.281727314, 0.1080345511, -0.0582336299, -0.0100162495, -0.3681589961, -0.1956060976, -0.1200667247, 0.3318264782, 0.3998509943, -0.5381984115, 0.1778304726, 0.0605197474, 0.2114970237, 0.2493433207, 0.6614070535, -0.3634279072, 0.2380727977, -0.1285898834, -0.2693577409, -0.1169595793, -0.1960741878, -0.5835576653, 0.1508799493, 0.0044015655, 0.1377564818, 0.1036623269, 0.4255773127, 0.3806002736, 0.137389034, 0.1205449626, 0.2378032058, 0.0506335422, 0.1219745874, -0.3522132337, -0.26674366, 0.5058071613, 0.2659253478, -0.0184598826, -0.1692707241, -0.1304335296, -0.2034451067, 0.171515435, -0.1723213345, 0.1123999879, 0.2761601806, -0.0154158967, -0.1323156953, 0.1253482103, 0.0962627977, -0.2414121479, 0.4494388103, 0.0475798473, 0.0823375434, -0.072255455, -0.0690128878, 0.234012723, 0.1237764582, -0.2757114172, -0.0913971886, -0.0202736482, -0.124347955, 0.0506434403, -0.2392933667, -0.1698196083, 0.3928051591, -0.2049031258, -0.0397740677, -0.2208189815, 0.0434944667, 0.0289862584, -0.0810196772, -0.0130324941, -0.1096345335, -0.1200396195, -0.0273584798, -0.1362690628, 0.1346833408, 0.2414699048, 0.2601766586, 0.1974774301, 0.3538563848, 0.1384090781, -0.31150195, 0.3684660494, 0.2825622559, 0.1614501476, -0.1878308356, -0.3582593799, 0.5080372691, 0.0408375598, 0.6212488413, 0.1318585128, -0.2736033201, 0.0354719982, 0.1617726237, -0.1527906656, 0.361810714, 0.2422435284, 0.1831345111, 0.599363625, 0.3990742266, -0.2270188779, 0.1293457299, 0.3130761385, 0.0727402344, -0.1557810009, -0.0534358248, -0.2871872485, -0.2821799815, 0.2410205305, -0.0649418756, 0.5271027088, 0.2901993096, 0.1248299703, -0.1665139794, -0.0623957813, -0.0885650888, 0.0004644793, 0.295653969, 0.2021184117, 0.0236078668, 0.1321613491, -0.0330442078, -0.2369346172, -0.1259488314, -0.0136153297, 0.0920880958, -0.1836666018, 0.1966559887, -0.0482412688, 0.0431790166, -0.1185243204, 0.0486887321, -0.1458608657, -0.2508894801, -0.0787201822, -0.1703786254, 0.1408748031, 0.099716492, -0.0557448156, 0.2978174388, -0.0532309823, -0.3437314034, -0.1330958605, -0.1097652093, -0.20562087, 0.0347894542, 0.0790493488, 0.2015626878, 0.3894381225, 0.2333970964, 0.0630549416, -0.250762552, -0.128121376, -0.0811345503, -0.1727129966, 0.2470873743, -0.3129542768, 0.1722495705, 0.0450521447, 0.0761779323, 0.0374998562, -0.3253332675, 0.0282385778, -0.1393776983, -0.1856905222, -0.0956031978, 0.0941677466, -0.2838167846, -0.2353223264, -0.2316648811, 0.1122173369, 0.1856214851, -0.1038914844, -0.077787295, 0.2100544274, 0.1400316656, -0.0230245013, -0.0323165953, 0.001091022, -0.2395756543, 0.5963218212, 0.1307839006, -0.2874100804, -0.1484390646, 0.0325048603, 0.092605032, 0.4593246281, -0.4363916516, 0.3887852132, -0.4268549085, 0.0659124777, -0.0283237118, 0.1497391164, 0.3875692487, -0.0489907525, -0.0553493388, -0.0899967924, -0.2898073792, -0.2084777355, -0.2657874525, 0.1750808507, 0.0703375041, 0.2047269791, 0.1540495306, 0.7702895403, 0.2816255391, -0.1282123327, -0.0700765476, -0.019975936, 0.322150439, -0.3042882681, -0.1336632371, 0.0767841637, -0.2323924303, -0.3620030284, 0.102230072, 0.1592202783, -0.2228558511, 0.0571658164, 0.4334772825, 0.2629045546, 0.0344462208, 0.1643804163, -0.1444603056, 0.1150298566, 0.1291986704, 0.2734665871, -0.2965278029, -0.2377397865, 0.1282242537, -0.1157929227, 0.1971657872, -0.0538892858, -0.584630847, 0.0750429928, -0.731251061, 0.1715987474, -0.0042756028, 0.2625333667, 0.1212928519, 0.0990573466, 0.246076569, 0.0343440473, 0.4295497835, 0.0074470975, -0.1342290789, -0.0209553335, -0.262619853, -0.5181392431, 0.0019415579, -0.1180639565, 0.0979924202, -0.018077286, 0.1409920901, -0.144948855, -0.2084661871, 0.0128050549, 0.2898254395, -0.1102436036, -0.2574890256, -0.307546407, -0.2508769929, 0.0031966998, -0.1106913835, 0.0640593469, -0.2158924043, -0.0053232913, -0.2174376547, -0.1411986947, 0.1710703075, 0.287007004, -0.0199487545, 0.2277722806, 0.0420355201, 0.2784541249, 0.309186548, -0.0779347792, 0.310967803, 0.6148452759, 0.0961862504, -0.0449311174, -0.057990659, -0.0302236136, 0.1740664244, 0.3999010921, -0.1160176694, -0.1174306795, -0.0470448509, -0.0459505469, -0.441670984, 0.0930081829, 0.3606791496, 0.0545085706, -0.4937979281, -0.6961235404, 0.4829237759, 0.3221644759, -0.0029609182, 0.5213713646, 0.1529992074, -0.1188369691, 0.2289225906, 0.3288165927, 0.7686126828, -0.408190906, 0.3427323401, 0.0339297093, -0.0006151214, 0.2862084508, -0.1507108063, 0.0477479026, -0.1387883574, -0.0451610275, 0.0209275931, -0.3210027814, 0.2163615376, 0.0421520658, 0.2567620873, 0.2072266638, 0.1430624872, -0.0285382662, 0.0092823412, 0.3683236241, 0.1415447593, -0.3528418839, 0.0806294009, 0.20608446, -0.0636476204, 0.0266835652, 0.1052984297, 0.0771681517, -0.5997768044, 0.2118578851, -0.2221496105, -0.0983411223, -0.2747582495, 0.2297734916, -0.2467639893, -0.194834128, 0.1204784065, 0.1752456874, -0.0273538828, -0.0050549149, -0.2925044894, 0.2589014769, -0.1889819652, 0.1734660119, 0.4696851075, -0.4210249186, 0.1938284636, 0.0822747201, -0.0500953458, 0.0425285697, -0.2707816362, -0.3727759719, -0.1190481484, -0.0976815224, 0.0462765805, -0.096966289, -0.1774129421, 0.1778090596, -0.115728125, -0.0738805234, 0.1192867458, 0.2847137749, 0.1483693123, 0.5707705021, 0.1340297312, -0.4016315043, -0.1551912725, 0.2970864773, 0.0244420879, 0.0889517516, 0.340357542, 0.1648634225, -0.2617579997, -0.0780199021, 0.3460660875, 0.5033900142, -0.1370909065, -0.0944340825, -0.3355538249, 0.1455241144, 0.1652889252, 0.1014356986, 0.1463969648, -0.4325963259, -0.280382216, -0.1083592847, -0.2876851261, 0.1452465951, -0.1482289582, 0.2979683876, -0.1901216358, -0.317422241, -0.1114947498, 0.0183943603, -0.2807397544, -0.2505931854, -0.0107443286, 0.1090028509, -0.1011219323, 0.2202880681, 0.0244037602, -0.1119342074, 0.000743718, -0.0798368379, -0.1273418963, -0.1610721499, 0.0595522821, 0.1735746711, 0.0525194816, -0.4033673108, -0.0549086668, -0.3336770236, -0.2233923078, -0.3024188578, 0.0491736159, 0.3302562535, -0.1085040867, 0.0007787844, 0.0641421229, -0.0916873962, -0.1112688556, 0.2955054343, -0.1259221137, 0.1686892509, 0.0309229884, 0.1445612609, 0.4665190279, -0.2060362548, -0.1343385726, 0.1394993216, 0.0919982865, 0.2192005962, 0.3119926155, -0.3754244745, 0.3008857071, 0.1782547683, 0.5255873203, 0.5776779652, -0.0864238963, -0.0482990853, -0.1358985752, 0.1196112335, -0.0082849562, -0.2492899895, 0.0623388514, -0.1110693738, 0.150314346, 0.2359207422, 0.3171468377, 0.3776897788, -0.0135364886, -0.1543544084, 0.6034697294, -0.4535905123, -0.0637546927, -0.1066442728, 0.1659358144, 0.1051360741, 0.4445793927, 0.1751126647, 0.150199309, 0.5105740428, 0.0687417239, 0.6162847877, 0.3639472127, 0.3138250113, -0.1088628545, -0.1895516068, -0.0064245709, 0.0830415711, -0.2204788029, -0.0311430469, 0.0744842589, 0.0459094718, -0.3543303609, -0.3149505556, 0.0743725821, -0.2537948787, -0.0074904091, -0.0483671501, -0.0298705958, -0.1297779232, 0.072894834, 0.2107989788, -0.2031930834, -0.1960492134, 0.3447199762, -0.0779254958, -0.0568214059, -0.1621294916, 0.28085199, -0.0214891434, 0.1728646457, -0.1264070868, -0.0823842809, -0.2849642336, 0.0103565045, -0.1397751272, 0.378752172, 0.2705045938, 0.2324058712, -0.1640647948, 0.0503749736, -0.1489006728, -0.1381406784, 0.0803576931, 0.3532443047, -0.2355175912, -0.0428104401, 0.1823548526, 0.103942126, -0.1256212145, -0.0923541337, -0.1883644164, 0.0659576505, -0.4343670905, 0.1180909872, -0.0840082392, -0.2931293845, 0.0669183806, 0.0789841115, -0.2430416793, -0.1107978597, 0.4821844697, -0.4651016891, -0.0238464419, -0.1127798185, 0.0683294311, -0.2132830769, 0.7433562279, 0.3071632981, 0.2977477908, -0.3887543976, 0.1410841346, -0.6297145486, -0.0627762228, -0.3574145436, 0.0241963491, 0.1204941124, 0.2420873344, 0.0829272419, 0.3555292487, 0.1255461574, 0.0015365261, -0.0328144133, -0.0863277614, -0.230920434, -0.0251039676, -0.2001772076, 0.2183195502, -0.1794755608, -0.3345949352, 0.3847668469, -0.1063757986, -0.0434556864, -0.1651987582, -0.0484442078, 0.3652563989, 0.1291301548, 0.3027884662, 0.1771481335, 0.420504272, 0.2366503626, -0.0797343031, -0.3657922447, -0.0532497428, -0.0327490009, 0.0968487188, -0.242823869, 0.2796160281, -0.1563113183, -0.4385990202, -0.157276094, 0.0707316622, -0.0875140205, -0.0967458636, -0.3099516034, 0.0481162444, -0.0935275778, 0.1731004864, 0.052887585, 0.1320953965, 0.0943320319, -0.1697659194, -0.3104424775, 0.0754995644, 0.0954925865, -0.2117907554, -0.1013583243, -0.0900928006, -0.0787791088, 0.4433885813, 0.1187654957, -0.5254153013, -0.0171314999, 0.3214954436, -0.0486115292, -0.1024696231, 0.197234109, -0.0890346617, -0.0165298749, -0.1392823756, 0.2070880532, -0.1946893483, -0.1024892628, -0.0100646252, 0.0016356769 ]
https://github.com/huggingface/datasets/issues/708
Datasets performance slow? - 6.4x slower than in memory dataset
I am having the same issue here. When loading from memory I can get the GPU up to 70% util but when loading after mapping I can only get 40%. In disk: ``` book_corpus = load_dataset('bookcorpus', 'plain_text', cache_dir='/home/ad/Desktop/bookcorpus', split='train[:20%]') book_corpus = book_corpus.map(encode, batched=True, num_proc=20, load_from_cache_file=True, batch_size=2500) book_corpus.set_format(type='torch', columns=['text', "input_ids", "attention_mask", "token_type_ids"]) training_args = TrainingArguments( output_dir="./mobile_bert_big", overwrite_output_dir=True, num_train_epochs=1, per_device_train_batch_size=32, per_device_eval_batch_size=16, save_steps=50, save_total_limit=2, logging_first_step=True, warmup_steps=100, logging_steps=50, eval_steps=100, no_cuda=False, gradient_accumulation_steps=16, fp16=True) trainer = Trainer( model=model, args=training_args, data_collator=data_collator, train_dataset=book_corpus, tokenizer=tokenizer) ``` In disk I can only get 0,17 it/s: `[ 13/28907 01:03 < 46:03:27, 0.17 it/s, Epoch 0.00/1] ` If I load it with torch.utils.data.Dataset() ``` class BCorpusDataset(torch.utils.data.Dataset): def __init__(self, encodings): self.encodings = encodings def __getitem__(self, idx): item = [torch.tensor(val[idx]) for key, val in self.encodings.items()][0] return item def __len__(self): length = [len(val) for key, val in self.encodings.items()][0] return length **book_corpus = book_corpus.select([i for i in range(16*2000)])** # filtering to not have 20% of BC in memory... book_corpus = book_corpus(book_corpus) ``` I can get: ` [ 5/62 00:09 < 03:03, 0.31 it/s, Epoch 0.06/1]` But obviously I can not get BookCorpus in memory xD EDIT: it is something weird. If i load in disk 1% of bookcorpus: ``` book_corpus = load_dataset('bookcorpus', 'plain_text', cache_dir='/home/ad/Desktop/bookcorpus', split='train[:1%]') ``` I can get 0.28 it/s, (the same that in memory) but if I load 20% of bookcorpus: ``` book_corpus = load_dataset('bookcorpus', 'plain_text', cache_dir='/home/ad/Desktop/bookcorpus', split='train[:20%]') ``` I get again 0.17 it/s. I am missing something? I think it is something related to size, and not disk or in-memory.
I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work.
247
Datasets performance slow? - 6.4x slower than in memory dataset I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work. I am having the same issue here. When loading from memory I can get the GPU up to 70% util but when loading after mapping I can only get 40%. In disk: ``` book_corpus = load_dataset('bookcorpus', 'plain_text', cache_dir='/home/ad/Desktop/bookcorpus', split='train[:20%]') book_corpus = book_corpus.map(encode, batched=True, num_proc=20, load_from_cache_file=True, batch_size=2500) book_corpus.set_format(type='torch', columns=['text', "input_ids", "attention_mask", "token_type_ids"]) training_args = TrainingArguments( output_dir="./mobile_bert_big", overwrite_output_dir=True, num_train_epochs=1, per_device_train_batch_size=32, per_device_eval_batch_size=16, save_steps=50, save_total_limit=2, logging_first_step=True, warmup_steps=100, logging_steps=50, eval_steps=100, no_cuda=False, gradient_accumulation_steps=16, fp16=True) trainer = Trainer( model=model, args=training_args, data_collator=data_collator, train_dataset=book_corpus, tokenizer=tokenizer) ``` In disk I can only get 0,17 it/s: `[ 13/28907 01:03 < 46:03:27, 0.17 it/s, Epoch 0.00/1] ` If I load it with torch.utils.data.Dataset() ``` class BCorpusDataset(torch.utils.data.Dataset): def __init__(self, encodings): self.encodings = encodings def __getitem__(self, idx): item = [torch.tensor(val[idx]) for key, val in self.encodings.items()][0] return item def __len__(self): length = [len(val) for key, val in self.encodings.items()][0] return length **book_corpus = book_corpus.select([i for i in range(16*2000)])** # filtering to not have 20% of BC in memory... book_corpus = book_corpus(book_corpus) ``` I can get: ` [ 5/62 00:09 < 03:03, 0.31 it/s, Epoch 0.06/1]` But obviously I can not get BookCorpus in memory xD EDIT: it is something weird. If i load in disk 1% of bookcorpus: ``` book_corpus = load_dataset('bookcorpus', 'plain_text', cache_dir='/home/ad/Desktop/bookcorpus', split='train[:1%]') ``` I can get 0.28 it/s, (the same that in memory) but if I load 20% of bookcorpus: ``` book_corpus = load_dataset('bookcorpus', 'plain_text', cache_dir='/home/ad/Desktop/bookcorpus', split='train[:20%]') ``` I get again 0.17 it/s. I am missing something? I think it is something related to size, and not disk or in-memory.
[ -0.3806663454, -0.0424090587, -0.0314098261, 0.4377959967, 0.1005084068, 0.1263736933, 0.0136549324, 0.3071820438, 0.0914101377, -0.0730988681, -0.0662421212, 0.301128, -0.0139891645, -0.2742892206, -0.0800374225, 0.0623482354, 0.2097817063, 0.0289246328, -0.2366966456, -0.1054769903, -0.2640981972, -0.2973696887, -0.0698854551, -0.2284690291, -0.3223610222, -0.1434254497, 0.0818202794, -0.0005962166, -0.3450991809, -0.4037324786, 0.3832429349, 0.0766954869, 0.0686846003, 0.5503900051, -0.0001125017, -0.0448605455, 0.2153705955, 0.163643837, -0.1740946472, 0.3116470277, -0.0444428772, -0.2415702045, -0.0513391085, -0.1154530719, -0.01321181, -0.1297844201, -0.0774295032, -0.716037333, 0.018146161, 0.1087613255, 0.1370816678, 0.3199506998, -0.387277782, 0.2173005193, 0.142141059, 0.3198286295, -0.4389564395, -0.1034560129, 0.3924713433, -0.1402356178, -0.0548130386, 0.2295681834, -0.1826925427, 0.2396480441, 0.4582101107, -0.0244684815, -0.1892895103, -0.2351150215, 0.0883350298, 0.4672670662, 0.1863692254, -0.1389112771, -0.634291172, -0.3808341324, -0.2253734767, -0.1158318147, -0.006604909, 0.2012720704, -0.1965837181, 0.1110180467, -0.5031596422, 0.0621068589, 0.0210665856, -0.0106446929, -0.159393847, 0.3560096622, 0.1086820439, 0.2212633193, 0.3045377135, 0.1173549592, 0.395116359, -0.3474163115, -0.0426577032, 0.0569681115, -0.672750175, 0.073525995, 0.132234633, 0.1327429712, 0.2916539609, 0.0192394834, 0.1375166923, 0.2773088217, -0.0180945862, -0.1378564686, 0.2188935578, 0.1327666491, -0.3069685102, 0.4844336808, 0.3089221716, -0.2571935356, 0.1131686196, 0.2347925156, -0.0429065637, -0.1230408028, 0.0808738023, -0.2456586063, 0.062857829, -0.2480964065, -0.3668068349, -0.1015461087, -0.128623575, -0.0355536453, -0.0565834977, 0.1639847308, -0.2934107184, 0.2284451276, -0.121053271, 0.0039492184, -0.2586508393, 0.0483609028, -0.0533002652, -0.0860239118, -0.3140702546, 0.3556381762, 0.2916275561, -0.0728288367, 0.1457337439, -0.0316701531, 0.0242216475, 0.2429365516, 0.360352248, -0.383017987, 0.2523584664, 0.1450634748, -0.2260444909, 0.5183618069, 0.101564385, 0.4579476416, -0.2209921479, 0.3493160903, -0.0600940846, -0.2040510923, 0.2610086501, 0.1124158204, -0.2648043633, -0.1167252362, -0.4379532933, 0.281727314, 0.1080345511, -0.0582336299, -0.0100162495, -0.3681589961, -0.1956060976, -0.1200667247, 0.3318264782, 0.3998509943, -0.5381984115, 0.1778304726, 0.0605197474, 0.2114970237, 0.2493433207, 0.6614070535, -0.3634279072, 0.2380727977, -0.1285898834, -0.2693577409, -0.1169595793, -0.1960741878, -0.5835576653, 0.1508799493, 0.0044015655, 0.1377564818, 0.1036623269, 0.4255773127, 0.3806002736, 0.137389034, 0.1205449626, 0.2378032058, 0.0506335422, 0.1219745874, -0.3522132337, -0.26674366, 0.5058071613, 0.2659253478, -0.0184598826, -0.1692707241, -0.1304335296, -0.2034451067, 0.171515435, -0.1723213345, 0.1123999879, 0.2761601806, -0.0154158967, -0.1323156953, 0.1253482103, 0.0962627977, -0.2414121479, 0.4494388103, 0.0475798473, 0.0823375434, -0.072255455, -0.0690128878, 0.234012723, 0.1237764582, -0.2757114172, -0.0913971886, -0.0202736482, -0.124347955, 0.0506434403, -0.2392933667, -0.1698196083, 0.3928051591, -0.2049031258, -0.0397740677, -0.2208189815, 0.0434944667, 0.0289862584, -0.0810196772, -0.0130324941, -0.1096345335, -0.1200396195, -0.0273584798, -0.1362690628, 0.1346833408, 0.2414699048, 0.2601766586, 0.1974774301, 0.3538563848, 0.1384090781, -0.31150195, 0.3684660494, 0.2825622559, 0.1614501476, -0.1878308356, -0.3582593799, 0.5080372691, 0.0408375598, 0.6212488413, 0.1318585128, -0.2736033201, 0.0354719982, 0.1617726237, -0.1527906656, 0.361810714, 0.2422435284, 0.1831345111, 0.599363625, 0.3990742266, -0.2270188779, 0.1293457299, 0.3130761385, 0.0727402344, -0.1557810009, -0.0534358248, -0.2871872485, -0.2821799815, 0.2410205305, -0.0649418756, 0.5271027088, 0.2901993096, 0.1248299703, -0.1665139794, -0.0623957813, -0.0885650888, 0.0004644793, 0.295653969, 0.2021184117, 0.0236078668, 0.1321613491, -0.0330442078, -0.2369346172, -0.1259488314, -0.0136153297, 0.0920880958, -0.1836666018, 0.1966559887, -0.0482412688, 0.0431790166, -0.1185243204, 0.0486887321, -0.1458608657, -0.2508894801, -0.0787201822, -0.1703786254, 0.1408748031, 0.099716492, -0.0557448156, 0.2978174388, -0.0532309823, -0.3437314034, -0.1330958605, -0.1097652093, -0.20562087, 0.0347894542, 0.0790493488, 0.2015626878, 0.3894381225, 0.2333970964, 0.0630549416, -0.250762552, -0.128121376, -0.0811345503, -0.1727129966, 0.2470873743, -0.3129542768, 0.1722495705, 0.0450521447, 0.0761779323, 0.0374998562, -0.3253332675, 0.0282385778, -0.1393776983, -0.1856905222, -0.0956031978, 0.0941677466, -0.2838167846, -0.2353223264, -0.2316648811, 0.1122173369, 0.1856214851, -0.1038914844, -0.077787295, 0.2100544274, 0.1400316656, -0.0230245013, -0.0323165953, 0.001091022, -0.2395756543, 0.5963218212, 0.1307839006, -0.2874100804, -0.1484390646, 0.0325048603, 0.092605032, 0.4593246281, -0.4363916516, 0.3887852132, -0.4268549085, 0.0659124777, -0.0283237118, 0.1497391164, 0.3875692487, -0.0489907525, -0.0553493388, -0.0899967924, -0.2898073792, -0.2084777355, -0.2657874525, 0.1750808507, 0.0703375041, 0.2047269791, 0.1540495306, 0.7702895403, 0.2816255391, -0.1282123327, -0.0700765476, -0.019975936, 0.322150439, -0.3042882681, -0.1336632371, 0.0767841637, -0.2323924303, -0.3620030284, 0.102230072, 0.1592202783, -0.2228558511, 0.0571658164, 0.4334772825, 0.2629045546, 0.0344462208, 0.1643804163, -0.1444603056, 0.1150298566, 0.1291986704, 0.2734665871, -0.2965278029, -0.2377397865, 0.1282242537, -0.1157929227, 0.1971657872, -0.0538892858, -0.584630847, 0.0750429928, -0.731251061, 0.1715987474, -0.0042756028, 0.2625333667, 0.1212928519, 0.0990573466, 0.246076569, 0.0343440473, 0.4295497835, 0.0074470975, -0.1342290789, -0.0209553335, -0.262619853, -0.5181392431, 0.0019415579, -0.1180639565, 0.0979924202, -0.018077286, 0.1409920901, -0.144948855, -0.2084661871, 0.0128050549, 0.2898254395, -0.1102436036, -0.2574890256, -0.307546407, -0.2508769929, 0.0031966998, -0.1106913835, 0.0640593469, -0.2158924043, -0.0053232913, -0.2174376547, -0.1411986947, 0.1710703075, 0.287007004, -0.0199487545, 0.2277722806, 0.0420355201, 0.2784541249, 0.309186548, -0.0779347792, 0.310967803, 0.6148452759, 0.0961862504, -0.0449311174, -0.057990659, -0.0302236136, 0.1740664244, 0.3999010921, -0.1160176694, -0.1174306795, -0.0470448509, -0.0459505469, -0.441670984, 0.0930081829, 0.3606791496, 0.0545085706, -0.4937979281, -0.6961235404, 0.4829237759, 0.3221644759, -0.0029609182, 0.5213713646, 0.1529992074, -0.1188369691, 0.2289225906, 0.3288165927, 0.7686126828, -0.408190906, 0.3427323401, 0.0339297093, -0.0006151214, 0.2862084508, -0.1507108063, 0.0477479026, -0.1387883574, -0.0451610275, 0.0209275931, -0.3210027814, 0.2163615376, 0.0421520658, 0.2567620873, 0.2072266638, 0.1430624872, -0.0285382662, 0.0092823412, 0.3683236241, 0.1415447593, -0.3528418839, 0.0806294009, 0.20608446, -0.0636476204, 0.0266835652, 0.1052984297, 0.0771681517, -0.5997768044, 0.2118578851, -0.2221496105, -0.0983411223, -0.2747582495, 0.2297734916, -0.2467639893, -0.194834128, 0.1204784065, 0.1752456874, -0.0273538828, -0.0050549149, -0.2925044894, 0.2589014769, -0.1889819652, 0.1734660119, 0.4696851075, -0.4210249186, 0.1938284636, 0.0822747201, -0.0500953458, 0.0425285697, -0.2707816362, -0.3727759719, -0.1190481484, -0.0976815224, 0.0462765805, -0.096966289, -0.1774129421, 0.1778090596, -0.115728125, -0.0738805234, 0.1192867458, 0.2847137749, 0.1483693123, 0.5707705021, 0.1340297312, -0.4016315043, -0.1551912725, 0.2970864773, 0.0244420879, 0.0889517516, 0.340357542, 0.1648634225, -0.2617579997, -0.0780199021, 0.3460660875, 0.5033900142, -0.1370909065, -0.0944340825, -0.3355538249, 0.1455241144, 0.1652889252, 0.1014356986, 0.1463969648, -0.4325963259, -0.280382216, -0.1083592847, -0.2876851261, 0.1452465951, -0.1482289582, 0.2979683876, -0.1901216358, -0.317422241, -0.1114947498, 0.0183943603, -0.2807397544, -0.2505931854, -0.0107443286, 0.1090028509, -0.1011219323, 0.2202880681, 0.0244037602, -0.1119342074, 0.000743718, -0.0798368379, -0.1273418963, -0.1610721499, 0.0595522821, 0.1735746711, 0.0525194816, -0.4033673108, -0.0549086668, -0.3336770236, -0.2233923078, -0.3024188578, 0.0491736159, 0.3302562535, -0.1085040867, 0.0007787844, 0.0641421229, -0.0916873962, -0.1112688556, 0.2955054343, -0.1259221137, 0.1686892509, 0.0309229884, 0.1445612609, 0.4665190279, -0.2060362548, -0.1343385726, 0.1394993216, 0.0919982865, 0.2192005962, 0.3119926155, -0.3754244745, 0.3008857071, 0.1782547683, 0.5255873203, 0.5776779652, -0.0864238963, -0.0482990853, -0.1358985752, 0.1196112335, -0.0082849562, -0.2492899895, 0.0623388514, -0.1110693738, 0.150314346, 0.2359207422, 0.3171468377, 0.3776897788, -0.0135364886, -0.1543544084, 0.6034697294, -0.4535905123, -0.0637546927, -0.1066442728, 0.1659358144, 0.1051360741, 0.4445793927, 0.1751126647, 0.150199309, 0.5105740428, 0.0687417239, 0.6162847877, 0.3639472127, 0.3138250113, -0.1088628545, -0.1895516068, -0.0064245709, 0.0830415711, -0.2204788029, -0.0311430469, 0.0744842589, 0.0459094718, -0.3543303609, -0.3149505556, 0.0743725821, -0.2537948787, -0.0074904091, -0.0483671501, -0.0298705958, -0.1297779232, 0.072894834, 0.2107989788, -0.2031930834, -0.1960492134, 0.3447199762, -0.0779254958, -0.0568214059, -0.1621294916, 0.28085199, -0.0214891434, 0.1728646457, -0.1264070868, -0.0823842809, -0.2849642336, 0.0103565045, -0.1397751272, 0.378752172, 0.2705045938, 0.2324058712, -0.1640647948, 0.0503749736, -0.1489006728, -0.1381406784, 0.0803576931, 0.3532443047, -0.2355175912, -0.0428104401, 0.1823548526, 0.103942126, -0.1256212145, -0.0923541337, -0.1883644164, 0.0659576505, -0.4343670905, 0.1180909872, -0.0840082392, -0.2931293845, 0.0669183806, 0.0789841115, -0.2430416793, -0.1107978597, 0.4821844697, -0.4651016891, -0.0238464419, -0.1127798185, 0.0683294311, -0.2132830769, 0.7433562279, 0.3071632981, 0.2977477908, -0.3887543976, 0.1410841346, -0.6297145486, -0.0627762228, -0.3574145436, 0.0241963491, 0.1204941124, 0.2420873344, 0.0829272419, 0.3555292487, 0.1255461574, 0.0015365261, -0.0328144133, -0.0863277614, -0.230920434, -0.0251039676, -0.2001772076, 0.2183195502, -0.1794755608, -0.3345949352, 0.3847668469, -0.1063757986, -0.0434556864, -0.1651987582, -0.0484442078, 0.3652563989, 0.1291301548, 0.3027884662, 0.1771481335, 0.420504272, 0.2366503626, -0.0797343031, -0.3657922447, -0.0532497428, -0.0327490009, 0.0968487188, -0.242823869, 0.2796160281, -0.1563113183, -0.4385990202, -0.157276094, 0.0707316622, -0.0875140205, -0.0967458636, -0.3099516034, 0.0481162444, -0.0935275778, 0.1731004864, 0.052887585, 0.1320953965, 0.0943320319, -0.1697659194, -0.3104424775, 0.0754995644, 0.0954925865, -0.2117907554, -0.1013583243, -0.0900928006, -0.0787791088, 0.4433885813, 0.1187654957, -0.5254153013, -0.0171314999, 0.3214954436, -0.0486115292, -0.1024696231, 0.197234109, -0.0890346617, -0.0165298749, -0.1392823756, 0.2070880532, -0.1946893483, -0.1024892628, -0.0100646252, 0.0016356769 ]
https://github.com/huggingface/datasets/issues/708
Datasets performance slow? - 6.4x slower than in memory dataset
There is a way to increase the batches read from memory? or multiprocessed it? I think that one of two or it is reading with just 1 core o it is reading very small chunks from disk and left my GPU at 0 between batches
I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work.
45
Datasets performance slow? - 6.4x slower than in memory dataset I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work. There is a way to increase the batches read from memory? or multiprocessed it? I think that one of two or it is reading with just 1 core o it is reading very small chunks from disk and left my GPU at 0 between batches
[ -0.3806663454, -0.0424090587, -0.0314098261, 0.4377959967, 0.1005084068, 0.1263736933, 0.0136549324, 0.3071820438, 0.0914101377, -0.0730988681, -0.0662421212, 0.301128, -0.0139891645, -0.2742892206, -0.0800374225, 0.0623482354, 0.2097817063, 0.0289246328, -0.2366966456, -0.1054769903, -0.2640981972, -0.2973696887, -0.0698854551, -0.2284690291, -0.3223610222, -0.1434254497, 0.0818202794, -0.0005962166, -0.3450991809, -0.4037324786, 0.3832429349, 0.0766954869, 0.0686846003, 0.5503900051, -0.0001125017, -0.0448605455, 0.2153705955, 0.163643837, -0.1740946472, 0.3116470277, -0.0444428772, -0.2415702045, -0.0513391085, -0.1154530719, -0.01321181, -0.1297844201, -0.0774295032, -0.716037333, 0.018146161, 0.1087613255, 0.1370816678, 0.3199506998, -0.387277782, 0.2173005193, 0.142141059, 0.3198286295, -0.4389564395, -0.1034560129, 0.3924713433, -0.1402356178, -0.0548130386, 0.2295681834, -0.1826925427, 0.2396480441, 0.4582101107, -0.0244684815, -0.1892895103, -0.2351150215, 0.0883350298, 0.4672670662, 0.1863692254, -0.1389112771, -0.634291172, -0.3808341324, -0.2253734767, -0.1158318147, -0.006604909, 0.2012720704, -0.1965837181, 0.1110180467, -0.5031596422, 0.0621068589, 0.0210665856, -0.0106446929, -0.159393847, 0.3560096622, 0.1086820439, 0.2212633193, 0.3045377135, 0.1173549592, 0.395116359, -0.3474163115, -0.0426577032, 0.0569681115, -0.672750175, 0.073525995, 0.132234633, 0.1327429712, 0.2916539609, 0.0192394834, 0.1375166923, 0.2773088217, -0.0180945862, -0.1378564686, 0.2188935578, 0.1327666491, -0.3069685102, 0.4844336808, 0.3089221716, -0.2571935356, 0.1131686196, 0.2347925156, -0.0429065637, -0.1230408028, 0.0808738023, -0.2456586063, 0.062857829, -0.2480964065, -0.3668068349, -0.1015461087, -0.128623575, -0.0355536453, -0.0565834977, 0.1639847308, -0.2934107184, 0.2284451276, -0.121053271, 0.0039492184, -0.2586508393, 0.0483609028, -0.0533002652, -0.0860239118, -0.3140702546, 0.3556381762, 0.2916275561, -0.0728288367, 0.1457337439, -0.0316701531, 0.0242216475, 0.2429365516, 0.360352248, -0.383017987, 0.2523584664, 0.1450634748, -0.2260444909, 0.5183618069, 0.101564385, 0.4579476416, -0.2209921479, 0.3493160903, -0.0600940846, -0.2040510923, 0.2610086501, 0.1124158204, -0.2648043633, -0.1167252362, -0.4379532933, 0.281727314, 0.1080345511, -0.0582336299, -0.0100162495, -0.3681589961, -0.1956060976, -0.1200667247, 0.3318264782, 0.3998509943, -0.5381984115, 0.1778304726, 0.0605197474, 0.2114970237, 0.2493433207, 0.6614070535, -0.3634279072, 0.2380727977, -0.1285898834, -0.2693577409, -0.1169595793, -0.1960741878, -0.5835576653, 0.1508799493, 0.0044015655, 0.1377564818, 0.1036623269, 0.4255773127, 0.3806002736, 0.137389034, 0.1205449626, 0.2378032058, 0.0506335422, 0.1219745874, -0.3522132337, -0.26674366, 0.5058071613, 0.2659253478, -0.0184598826, -0.1692707241, -0.1304335296, -0.2034451067, 0.171515435, -0.1723213345, 0.1123999879, 0.2761601806, -0.0154158967, -0.1323156953, 0.1253482103, 0.0962627977, -0.2414121479, 0.4494388103, 0.0475798473, 0.0823375434, -0.072255455, -0.0690128878, 0.234012723, 0.1237764582, -0.2757114172, -0.0913971886, -0.0202736482, -0.124347955, 0.0506434403, -0.2392933667, -0.1698196083, 0.3928051591, -0.2049031258, -0.0397740677, -0.2208189815, 0.0434944667, 0.0289862584, -0.0810196772, -0.0130324941, -0.1096345335, -0.1200396195, -0.0273584798, -0.1362690628, 0.1346833408, 0.2414699048, 0.2601766586, 0.1974774301, 0.3538563848, 0.1384090781, -0.31150195, 0.3684660494, 0.2825622559, 0.1614501476, -0.1878308356, -0.3582593799, 0.5080372691, 0.0408375598, 0.6212488413, 0.1318585128, -0.2736033201, 0.0354719982, 0.1617726237, -0.1527906656, 0.361810714, 0.2422435284, 0.1831345111, 0.599363625, 0.3990742266, -0.2270188779, 0.1293457299, 0.3130761385, 0.0727402344, -0.1557810009, -0.0534358248, -0.2871872485, -0.2821799815, 0.2410205305, -0.0649418756, 0.5271027088, 0.2901993096, 0.1248299703, -0.1665139794, -0.0623957813, -0.0885650888, 0.0004644793, 0.295653969, 0.2021184117, 0.0236078668, 0.1321613491, -0.0330442078, -0.2369346172, -0.1259488314, -0.0136153297, 0.0920880958, -0.1836666018, 0.1966559887, -0.0482412688, 0.0431790166, -0.1185243204, 0.0486887321, -0.1458608657, -0.2508894801, -0.0787201822, -0.1703786254, 0.1408748031, 0.099716492, -0.0557448156, 0.2978174388, -0.0532309823, -0.3437314034, -0.1330958605, -0.1097652093, -0.20562087, 0.0347894542, 0.0790493488, 0.2015626878, 0.3894381225, 0.2333970964, 0.0630549416, -0.250762552, -0.128121376, -0.0811345503, -0.1727129966, 0.2470873743, -0.3129542768, 0.1722495705, 0.0450521447, 0.0761779323, 0.0374998562, -0.3253332675, 0.0282385778, -0.1393776983, -0.1856905222, -0.0956031978, 0.0941677466, -0.2838167846, -0.2353223264, -0.2316648811, 0.1122173369, 0.1856214851, -0.1038914844, -0.077787295, 0.2100544274, 0.1400316656, -0.0230245013, -0.0323165953, 0.001091022, -0.2395756543, 0.5963218212, 0.1307839006, -0.2874100804, -0.1484390646, 0.0325048603, 0.092605032, 0.4593246281, -0.4363916516, 0.3887852132, -0.4268549085, 0.0659124777, -0.0283237118, 0.1497391164, 0.3875692487, -0.0489907525, -0.0553493388, -0.0899967924, -0.2898073792, -0.2084777355, -0.2657874525, 0.1750808507, 0.0703375041, 0.2047269791, 0.1540495306, 0.7702895403, 0.2816255391, -0.1282123327, -0.0700765476, -0.019975936, 0.322150439, -0.3042882681, -0.1336632371, 0.0767841637, -0.2323924303, -0.3620030284, 0.102230072, 0.1592202783, -0.2228558511, 0.0571658164, 0.4334772825, 0.2629045546, 0.0344462208, 0.1643804163, -0.1444603056, 0.1150298566, 0.1291986704, 0.2734665871, -0.2965278029, -0.2377397865, 0.1282242537, -0.1157929227, 0.1971657872, -0.0538892858, -0.584630847, 0.0750429928, -0.731251061, 0.1715987474, -0.0042756028, 0.2625333667, 0.1212928519, 0.0990573466, 0.246076569, 0.0343440473, 0.4295497835, 0.0074470975, -0.1342290789, -0.0209553335, -0.262619853, -0.5181392431, 0.0019415579, -0.1180639565, 0.0979924202, -0.018077286, 0.1409920901, -0.144948855, -0.2084661871, 0.0128050549, 0.2898254395, -0.1102436036, -0.2574890256, -0.307546407, -0.2508769929, 0.0031966998, -0.1106913835, 0.0640593469, -0.2158924043, -0.0053232913, -0.2174376547, -0.1411986947, 0.1710703075, 0.287007004, -0.0199487545, 0.2277722806, 0.0420355201, 0.2784541249, 0.309186548, -0.0779347792, 0.310967803, 0.6148452759, 0.0961862504, -0.0449311174, -0.057990659, -0.0302236136, 0.1740664244, 0.3999010921, -0.1160176694, -0.1174306795, -0.0470448509, -0.0459505469, -0.441670984, 0.0930081829, 0.3606791496, 0.0545085706, -0.4937979281, -0.6961235404, 0.4829237759, 0.3221644759, -0.0029609182, 0.5213713646, 0.1529992074, -0.1188369691, 0.2289225906, 0.3288165927, 0.7686126828, -0.408190906, 0.3427323401, 0.0339297093, -0.0006151214, 0.2862084508, -0.1507108063, 0.0477479026, -0.1387883574, -0.0451610275, 0.0209275931, -0.3210027814, 0.2163615376, 0.0421520658, 0.2567620873, 0.2072266638, 0.1430624872, -0.0285382662, 0.0092823412, 0.3683236241, 0.1415447593, -0.3528418839, 0.0806294009, 0.20608446, -0.0636476204, 0.0266835652, 0.1052984297, 0.0771681517, -0.5997768044, 0.2118578851, -0.2221496105, -0.0983411223, -0.2747582495, 0.2297734916, -0.2467639893, -0.194834128, 0.1204784065, 0.1752456874, -0.0273538828, -0.0050549149, -0.2925044894, 0.2589014769, -0.1889819652, 0.1734660119, 0.4696851075, -0.4210249186, 0.1938284636, 0.0822747201, -0.0500953458, 0.0425285697, -0.2707816362, -0.3727759719, -0.1190481484, -0.0976815224, 0.0462765805, -0.096966289, -0.1774129421, 0.1778090596, -0.115728125, -0.0738805234, 0.1192867458, 0.2847137749, 0.1483693123, 0.5707705021, 0.1340297312, -0.4016315043, -0.1551912725, 0.2970864773, 0.0244420879, 0.0889517516, 0.340357542, 0.1648634225, -0.2617579997, -0.0780199021, 0.3460660875, 0.5033900142, -0.1370909065, -0.0944340825, -0.3355538249, 0.1455241144, 0.1652889252, 0.1014356986, 0.1463969648, -0.4325963259, -0.280382216, -0.1083592847, -0.2876851261, 0.1452465951, -0.1482289582, 0.2979683876, -0.1901216358, -0.317422241, -0.1114947498, 0.0183943603, -0.2807397544, -0.2505931854, -0.0107443286, 0.1090028509, -0.1011219323, 0.2202880681, 0.0244037602, -0.1119342074, 0.000743718, -0.0798368379, -0.1273418963, -0.1610721499, 0.0595522821, 0.1735746711, 0.0525194816, -0.4033673108, -0.0549086668, -0.3336770236, -0.2233923078, -0.3024188578, 0.0491736159, 0.3302562535, -0.1085040867, 0.0007787844, 0.0641421229, -0.0916873962, -0.1112688556, 0.2955054343, -0.1259221137, 0.1686892509, 0.0309229884, 0.1445612609, 0.4665190279, -0.2060362548, -0.1343385726, 0.1394993216, 0.0919982865, 0.2192005962, 0.3119926155, -0.3754244745, 0.3008857071, 0.1782547683, 0.5255873203, 0.5776779652, -0.0864238963, -0.0482990853, -0.1358985752, 0.1196112335, -0.0082849562, -0.2492899895, 0.0623388514, -0.1110693738, 0.150314346, 0.2359207422, 0.3171468377, 0.3776897788, -0.0135364886, -0.1543544084, 0.6034697294, -0.4535905123, -0.0637546927, -0.1066442728, 0.1659358144, 0.1051360741, 0.4445793927, 0.1751126647, 0.150199309, 0.5105740428, 0.0687417239, 0.6162847877, 0.3639472127, 0.3138250113, -0.1088628545, -0.1895516068, -0.0064245709, 0.0830415711, -0.2204788029, -0.0311430469, 0.0744842589, 0.0459094718, -0.3543303609, -0.3149505556, 0.0743725821, -0.2537948787, -0.0074904091, -0.0483671501, -0.0298705958, -0.1297779232, 0.072894834, 0.2107989788, -0.2031930834, -0.1960492134, 0.3447199762, -0.0779254958, -0.0568214059, -0.1621294916, 0.28085199, -0.0214891434, 0.1728646457, -0.1264070868, -0.0823842809, -0.2849642336, 0.0103565045, -0.1397751272, 0.378752172, 0.2705045938, 0.2324058712, -0.1640647948, 0.0503749736, -0.1489006728, -0.1381406784, 0.0803576931, 0.3532443047, -0.2355175912, -0.0428104401, 0.1823548526, 0.103942126, -0.1256212145, -0.0923541337, -0.1883644164, 0.0659576505, -0.4343670905, 0.1180909872, -0.0840082392, -0.2931293845, 0.0669183806, 0.0789841115, -0.2430416793, -0.1107978597, 0.4821844697, -0.4651016891, -0.0238464419, -0.1127798185, 0.0683294311, -0.2132830769, 0.7433562279, 0.3071632981, 0.2977477908, -0.3887543976, 0.1410841346, -0.6297145486, -0.0627762228, -0.3574145436, 0.0241963491, 0.1204941124, 0.2420873344, 0.0829272419, 0.3555292487, 0.1255461574, 0.0015365261, -0.0328144133, -0.0863277614, -0.230920434, -0.0251039676, -0.2001772076, 0.2183195502, -0.1794755608, -0.3345949352, 0.3847668469, -0.1063757986, -0.0434556864, -0.1651987582, -0.0484442078, 0.3652563989, 0.1291301548, 0.3027884662, 0.1771481335, 0.420504272, 0.2366503626, -0.0797343031, -0.3657922447, -0.0532497428, -0.0327490009, 0.0968487188, -0.242823869, 0.2796160281, -0.1563113183, -0.4385990202, -0.157276094, 0.0707316622, -0.0875140205, -0.0967458636, -0.3099516034, 0.0481162444, -0.0935275778, 0.1731004864, 0.052887585, 0.1320953965, 0.0943320319, -0.1697659194, -0.3104424775, 0.0754995644, 0.0954925865, -0.2117907554, -0.1013583243, -0.0900928006, -0.0787791088, 0.4433885813, 0.1187654957, -0.5254153013, -0.0171314999, 0.3214954436, -0.0486115292, -0.1024696231, 0.197234109, -0.0890346617, -0.0165298749, -0.1392823756, 0.2070880532, -0.1946893483, -0.1024892628, -0.0100646252, 0.0016356769 ]
https://github.com/huggingface/datasets/issues/708
Datasets performance slow? - 6.4x slower than in memory dataset
My fault! I had not seen the `dataloader_num_workers` in `TrainingArguments` ! Now I can parallelize and go fast! Sorry, and thanks.
I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work.
21
Datasets performance slow? - 6.4x slower than in memory dataset I've been very excited about this amazing datasets project. However, I've noticed that the performance can be substantially slower than using an in-memory dataset. Now, this is expected I guess, due to memory mapping data using arrow files, and you don't get anything for free. But I was surprised at how much slower. For example, in the `yelp_polarity` dataset (560000 datapoints, or 17500 batches of 32), it was taking me 3:31 to just get process the data and get it on the GPU (no model involved). Whereas, the equivalent in-memory dataset would finish in just 0:33. Is this expected? Given that one of the goals of this project is also accelerate dataset processing, this seems a bit slower than I would expect. I understand the advantages of being able to work on datasets that exceed memory, and that's very exciting to me, but thought I'd open this issue to discuss. For reference I'm running a AMD Ryzen Threadripper 1900X 8-Core Processor CPU, with 128 GB of RAM and an NVME SSD Samsung 960 EVO. I'm running with an RTX Titan 24GB GPU. I can see with `iotop` that the dataset gets quickly loaded into the system read buffers, and thus doesn't incur any additional IO reads. Thus in theory, all the data *should* be in RAM, but in my benchmark code below it's still 6.4 times slower. What am I doing wrong? And is there a way to force the datasets to completely load into memory instead of being memory mapped in cases where you want maximum performance? At 3:31 for 17500 batches, that's 12ms per batch. Does this 12ms just become insignificant as a proportion of forward and backward passes in practice, and thus it's not worth worrying about this in practice? In any case, here's my code `benchmark.py`. If you run it with an argument of `memory` it will copy the data into memory before executing the same test. ``` py import sys from datasets import load_dataset from transformers import DataCollatorWithPadding, BertTokenizerFast from torch.utils.data import DataLoader from tqdm import tqdm if __name__ == '__main__': tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') collate_fn = DataCollatorWithPadding(tokenizer, padding=True) ds = load_dataset('yelp_polarity') def do_tokenize(x): return tokenizer(x['text'], truncation=True) ds = ds.map(do_tokenize, batched=True) ds.set_format('torch', ['input_ids', 'token_type_ids', 'attention_mask']) if len(sys.argv) == 2 and sys.argv[1] == 'memory': # copy to memory - probably a faster way to do this - but demonstrates the point # approximately 530 batches per second - 17500 batches in 0:33 print('using memory') _ds = [data for data in tqdm(ds['train'])] else: # approximately 83 batches per second - 17500 batches in 3:31 print('using datasets') _ds = ds['train'] dl = DataLoader(_ds, shuffle=True, collate_fn=collate_fn, batch_size=32, num_workers=4) for data in tqdm(dl): for k, v in data.items(): data[k] = v.to('cuda') ``` For reference, my conda environment is [here](https://gist.github.com/05b6101518ff70ed42a858b302a0405d) Once again, I'm very excited about this library, and how easy it is to load datasets, and to do so without worrying about system memory constraints. Thanks for all your great work. My fault! I had not seen the `dataloader_num_workers` in `TrainingArguments` ! Now I can parallelize and go fast! Sorry, and thanks.
[ -0.3806663454, -0.0424090587, -0.0314098261, 0.4377959967, 0.1005084068, 0.1263736933, 0.0136549324, 0.3071820438, 0.0914101377, -0.0730988681, -0.0662421212, 0.301128, -0.0139891645, -0.2742892206, -0.0800374225, 0.0623482354, 0.2097817063, 0.0289246328, -0.2366966456, -0.1054769903, -0.2640981972, -0.2973696887, -0.0698854551, -0.2284690291, -0.3223610222, -0.1434254497, 0.0818202794, -0.0005962166, -0.3450991809, -0.4037324786, 0.3832429349, 0.0766954869, 0.0686846003, 0.5503900051, -0.0001125017, -0.0448605455, 0.2153705955, 0.163643837, -0.1740946472, 0.3116470277, -0.0444428772, -0.2415702045, -0.0513391085, -0.1154530719, -0.01321181, -0.1297844201, -0.0774295032, -0.716037333, 0.018146161, 0.1087613255, 0.1370816678, 0.3199506998, -0.387277782, 0.2173005193, 0.142141059, 0.3198286295, -0.4389564395, -0.1034560129, 0.3924713433, -0.1402356178, -0.0548130386, 0.2295681834, -0.1826925427, 0.2396480441, 0.4582101107, -0.0244684815, -0.1892895103, -0.2351150215, 0.0883350298, 0.4672670662, 0.1863692254, -0.1389112771, -0.634291172, -0.3808341324, -0.2253734767, -0.1158318147, -0.006604909, 0.2012720704, -0.1965837181, 0.1110180467, -0.5031596422, 0.0621068589, 0.0210665856, -0.0106446929, -0.159393847, 0.3560096622, 0.1086820439, 0.2212633193, 0.3045377135, 0.1173549592, 0.395116359, -0.3474163115, -0.0426577032, 0.0569681115, -0.672750175, 0.073525995, 0.132234633, 0.1327429712, 0.2916539609, 0.0192394834, 0.1375166923, 0.2773088217, -0.0180945862, -0.1378564686, 0.2188935578, 0.1327666491, -0.3069685102, 0.4844336808, 0.3089221716, -0.2571935356, 0.1131686196, 0.2347925156, -0.0429065637, -0.1230408028, 0.0808738023, -0.2456586063, 0.062857829, -0.2480964065, -0.3668068349, -0.1015461087, -0.128623575, -0.0355536453, -0.0565834977, 0.1639847308, -0.2934107184, 0.2284451276, -0.121053271, 0.0039492184, -0.2586508393, 0.0483609028, -0.0533002652, -0.0860239118, -0.3140702546, 0.3556381762, 0.2916275561, -0.0728288367, 0.1457337439, -0.0316701531, 0.0242216475, 0.2429365516, 0.360352248, -0.383017987, 0.2523584664, 0.1450634748, -0.2260444909, 0.5183618069, 0.101564385, 0.4579476416, -0.2209921479, 0.3493160903, -0.0600940846, -0.2040510923, 0.2610086501, 0.1124158204, -0.2648043633, -0.1167252362, -0.4379532933, 0.281727314, 0.1080345511, -0.0582336299, -0.0100162495, -0.3681589961, -0.1956060976, -0.1200667247, 0.3318264782, 0.3998509943, -0.5381984115, 0.1778304726, 0.0605197474, 0.2114970237, 0.2493433207, 0.6614070535, -0.3634279072, 0.2380727977, -0.1285898834, -0.2693577409, -0.1169595793, -0.1960741878, -0.5835576653, 0.1508799493, 0.0044015655, 0.1377564818, 0.1036623269, 0.4255773127, 0.3806002736, 0.137389034, 0.1205449626, 0.2378032058, 0.0506335422, 0.1219745874, -0.3522132337, -0.26674366, 0.5058071613, 0.2659253478, -0.0184598826, -0.1692707241, -0.1304335296, -0.2034451067, 0.171515435, -0.1723213345, 0.1123999879, 0.2761601806, -0.0154158967, -0.1323156953, 0.1253482103, 0.0962627977, -0.2414121479, 0.4494388103, 0.0475798473, 0.0823375434, -0.072255455, -0.0690128878, 0.234012723, 0.1237764582, -0.2757114172, -0.0913971886, -0.0202736482, -0.124347955, 0.0506434403, -0.2392933667, -0.1698196083, 0.3928051591, -0.2049031258, -0.0397740677, -0.2208189815, 0.0434944667, 0.0289862584, -0.0810196772, -0.0130324941, -0.1096345335, -0.1200396195, -0.0273584798, -0.1362690628, 0.1346833408, 0.2414699048, 0.2601766586, 0.1974774301, 0.3538563848, 0.1384090781, -0.31150195, 0.3684660494, 0.2825622559, 0.1614501476, -0.1878308356, -0.3582593799, 0.5080372691, 0.0408375598, 0.6212488413, 0.1318585128, -0.2736033201, 0.0354719982, 0.1617726237, -0.1527906656, 0.361810714, 0.2422435284, 0.1831345111, 0.599363625, 0.3990742266, -0.2270188779, 0.1293457299, 0.3130761385, 0.0727402344, -0.1557810009, -0.0534358248, -0.2871872485, -0.2821799815, 0.2410205305, -0.0649418756, 0.5271027088, 0.2901993096, 0.1248299703, -0.1665139794, -0.0623957813, -0.0885650888, 0.0004644793, 0.295653969, 0.2021184117, 0.0236078668, 0.1321613491, -0.0330442078, -0.2369346172, -0.1259488314, -0.0136153297, 0.0920880958, -0.1836666018, 0.1966559887, -0.0482412688, 0.0431790166, -0.1185243204, 0.0486887321, -0.1458608657, -0.2508894801, -0.0787201822, -0.1703786254, 0.1408748031, 0.099716492, -0.0557448156, 0.2978174388, -0.0532309823, -0.3437314034, -0.1330958605, -0.1097652093, -0.20562087, 0.0347894542, 0.0790493488, 0.2015626878, 0.3894381225, 0.2333970964, 0.0630549416, -0.250762552, -0.128121376, -0.0811345503, -0.1727129966, 0.2470873743, -0.3129542768, 0.1722495705, 0.0450521447, 0.0761779323, 0.0374998562, -0.3253332675, 0.0282385778, -0.1393776983, -0.1856905222, -0.0956031978, 0.0941677466, -0.2838167846, -0.2353223264, -0.2316648811, 0.1122173369, 0.1856214851, -0.1038914844, -0.077787295, 0.2100544274, 0.1400316656, -0.0230245013, -0.0323165953, 0.001091022, -0.2395756543, 0.5963218212, 0.1307839006, -0.2874100804, -0.1484390646, 0.0325048603, 0.092605032, 0.4593246281, -0.4363916516, 0.3887852132, -0.4268549085, 0.0659124777, -0.0283237118, 0.1497391164, 0.3875692487, -0.0489907525, -0.0553493388, -0.0899967924, -0.2898073792, -0.2084777355, -0.2657874525, 0.1750808507, 0.0703375041, 0.2047269791, 0.1540495306, 0.7702895403, 0.2816255391, -0.1282123327, -0.0700765476, -0.019975936, 0.322150439, -0.3042882681, -0.1336632371, 0.0767841637, -0.2323924303, -0.3620030284, 0.102230072, 0.1592202783, -0.2228558511, 0.0571658164, 0.4334772825, 0.2629045546, 0.0344462208, 0.1643804163, -0.1444603056, 0.1150298566, 0.1291986704, 0.2734665871, -0.2965278029, -0.2377397865, 0.1282242537, -0.1157929227, 0.1971657872, -0.0538892858, -0.584630847, 0.0750429928, -0.731251061, 0.1715987474, -0.0042756028, 0.2625333667, 0.1212928519, 0.0990573466, 0.246076569, 0.0343440473, 0.4295497835, 0.0074470975, -0.1342290789, -0.0209553335, -0.262619853, -0.5181392431, 0.0019415579, -0.1180639565, 0.0979924202, -0.018077286, 0.1409920901, -0.144948855, -0.2084661871, 0.0128050549, 0.2898254395, -0.1102436036, -0.2574890256, -0.307546407, -0.2508769929, 0.0031966998, -0.1106913835, 0.0640593469, -0.2158924043, -0.0053232913, -0.2174376547, -0.1411986947, 0.1710703075, 0.287007004, -0.0199487545, 0.2277722806, 0.0420355201, 0.2784541249, 0.309186548, -0.0779347792, 0.310967803, 0.6148452759, 0.0961862504, -0.0449311174, -0.057990659, -0.0302236136, 0.1740664244, 0.3999010921, -0.1160176694, -0.1174306795, -0.0470448509, -0.0459505469, -0.441670984, 0.0930081829, 0.3606791496, 0.0545085706, -0.4937979281, -0.6961235404, 0.4829237759, 0.3221644759, -0.0029609182, 0.5213713646, 0.1529992074, -0.1188369691, 0.2289225906, 0.3288165927, 0.7686126828, -0.408190906, 0.3427323401, 0.0339297093, -0.0006151214, 0.2862084508, -0.1507108063, 0.0477479026, -0.1387883574, -0.0451610275, 0.0209275931, -0.3210027814, 0.2163615376, 0.0421520658, 0.2567620873, 0.2072266638, 0.1430624872, -0.0285382662, 0.0092823412, 0.3683236241, 0.1415447593, -0.3528418839, 0.0806294009, 0.20608446, -0.0636476204, 0.0266835652, 0.1052984297, 0.0771681517, -0.5997768044, 0.2118578851, -0.2221496105, -0.0983411223, -0.2747582495, 0.2297734916, -0.2467639893, -0.194834128, 0.1204784065, 0.1752456874, -0.0273538828, -0.0050549149, -0.2925044894, 0.2589014769, -0.1889819652, 0.1734660119, 0.4696851075, -0.4210249186, 0.1938284636, 0.0822747201, -0.0500953458, 0.0425285697, -0.2707816362, -0.3727759719, -0.1190481484, -0.0976815224, 0.0462765805, -0.096966289, -0.1774129421, 0.1778090596, -0.115728125, -0.0738805234, 0.1192867458, 0.2847137749, 0.1483693123, 0.5707705021, 0.1340297312, -0.4016315043, -0.1551912725, 0.2970864773, 0.0244420879, 0.0889517516, 0.340357542, 0.1648634225, -0.2617579997, -0.0780199021, 0.3460660875, 0.5033900142, -0.1370909065, -0.0944340825, -0.3355538249, 0.1455241144, 0.1652889252, 0.1014356986, 0.1463969648, -0.4325963259, -0.280382216, -0.1083592847, -0.2876851261, 0.1452465951, -0.1482289582, 0.2979683876, -0.1901216358, -0.317422241, -0.1114947498, 0.0183943603, -0.2807397544, -0.2505931854, -0.0107443286, 0.1090028509, -0.1011219323, 0.2202880681, 0.0244037602, -0.1119342074, 0.000743718, -0.0798368379, -0.1273418963, -0.1610721499, 0.0595522821, 0.1735746711, 0.0525194816, -0.4033673108, -0.0549086668, -0.3336770236, -0.2233923078, -0.3024188578, 0.0491736159, 0.3302562535, -0.1085040867, 0.0007787844, 0.0641421229, -0.0916873962, -0.1112688556, 0.2955054343, -0.1259221137, 0.1686892509, 0.0309229884, 0.1445612609, 0.4665190279, -0.2060362548, -0.1343385726, 0.1394993216, 0.0919982865, 0.2192005962, 0.3119926155, -0.3754244745, 0.3008857071, 0.1782547683, 0.5255873203, 0.5776779652, -0.0864238963, -0.0482990853, -0.1358985752, 0.1196112335, -0.0082849562, -0.2492899895, 0.0623388514, -0.1110693738, 0.150314346, 0.2359207422, 0.3171468377, 0.3776897788, -0.0135364886, -0.1543544084, 0.6034697294, -0.4535905123, -0.0637546927, -0.1066442728, 0.1659358144, 0.1051360741, 0.4445793927, 0.1751126647, 0.150199309, 0.5105740428, 0.0687417239, 0.6162847877, 0.3639472127, 0.3138250113, -0.1088628545, -0.1895516068, -0.0064245709, 0.0830415711, -0.2204788029, -0.0311430469, 0.0744842589, 0.0459094718, -0.3543303609, -0.3149505556, 0.0743725821, -0.2537948787, -0.0074904091, -0.0483671501, -0.0298705958, -0.1297779232, 0.072894834, 0.2107989788, -0.2031930834, -0.1960492134, 0.3447199762, -0.0779254958, -0.0568214059, -0.1621294916, 0.28085199, -0.0214891434, 0.1728646457, -0.1264070868, -0.0823842809, -0.2849642336, 0.0103565045, -0.1397751272, 0.378752172, 0.2705045938, 0.2324058712, -0.1640647948, 0.0503749736, -0.1489006728, -0.1381406784, 0.0803576931, 0.3532443047, -0.2355175912, -0.0428104401, 0.1823548526, 0.103942126, -0.1256212145, -0.0923541337, -0.1883644164, 0.0659576505, -0.4343670905, 0.1180909872, -0.0840082392, -0.2931293845, 0.0669183806, 0.0789841115, -0.2430416793, -0.1107978597, 0.4821844697, -0.4651016891, -0.0238464419, -0.1127798185, 0.0683294311, -0.2132830769, 0.7433562279, 0.3071632981, 0.2977477908, -0.3887543976, 0.1410841346, -0.6297145486, -0.0627762228, -0.3574145436, 0.0241963491, 0.1204941124, 0.2420873344, 0.0829272419, 0.3555292487, 0.1255461574, 0.0015365261, -0.0328144133, -0.0863277614, -0.230920434, -0.0251039676, -0.2001772076, 0.2183195502, -0.1794755608, -0.3345949352, 0.3847668469, -0.1063757986, -0.0434556864, -0.1651987582, -0.0484442078, 0.3652563989, 0.1291301548, 0.3027884662, 0.1771481335, 0.420504272, 0.2366503626, -0.0797343031, -0.3657922447, -0.0532497428, -0.0327490009, 0.0968487188, -0.242823869, 0.2796160281, -0.1563113183, -0.4385990202, -0.157276094, 0.0707316622, -0.0875140205, -0.0967458636, -0.3099516034, 0.0481162444, -0.0935275778, 0.1731004864, 0.052887585, 0.1320953965, 0.0943320319, -0.1697659194, -0.3104424775, 0.0754995644, 0.0954925865, -0.2117907554, -0.1013583243, -0.0900928006, -0.0787791088, 0.4433885813, 0.1187654957, -0.5254153013, -0.0171314999, 0.3214954436, -0.0486115292, -0.1024696231, 0.197234109, -0.0890346617, -0.0165298749, -0.1392823756, 0.2070880532, -0.1946893483, -0.1024892628, -0.0100646252, 0.0016356769 ]
https://github.com/huggingface/datasets/issues/707
Requirements should specify pyarrow<1
@punitaojha, certainly. Feel free to work on this. Let me know if you need any help or clarity.
I was looking at the docs on [Perplexity](https://huggingface.co/transformers/perplexity.html) via GPT2. When you load datasets and try to load Wikitext, you get the error, ``` module 'pyarrow' has no attribute 'PyExtensionType' ``` I traced it back to datasets having installed PyArrow 1.0.1 but there's not pinning in the setup file. https://github.com/huggingface/datasets/blob/e86a2a8f869b91654e782c9133d810bb82783200/setup.py#L68 Downgrading by installing `pip install "pyarrow<1"` resolved the issue.
18
Requirements should specify pyarrow<1 I was looking at the docs on [Perplexity](https://huggingface.co/transformers/perplexity.html) via GPT2. When you load datasets and try to load Wikitext, you get the error, ``` module 'pyarrow' has no attribute 'PyExtensionType' ``` I traced it back to datasets having installed PyArrow 1.0.1 but there's not pinning in the setup file. https://github.com/huggingface/datasets/blob/e86a2a8f869b91654e782c9133d810bb82783200/setup.py#L68 Downgrading by installing `pip install "pyarrow<1"` resolved the issue. @punitaojha, certainly. Feel free to work on this. Let me know if you need any help or clarity.
[ -0.2744112611, -0.2090409994, 0.0152530558, 0.1800350249, 0.0473459177, -0.0619746558, 0.0390898995, 0.1851370782, -0.0446798131, 0.0569028407, -0.0508330464, 0.2923358381, -0.005038945, 0.0731779039, 0.1184345409, -0.3647959232, 0.2140393406, 0.5875737071, -0.383457005, -0.0399198011, -0.0928858295, 0.2630639374, -0.2957940102, 0.272637248, -0.371905297, 0.1225015894, 0.0235201903, -0.008475245, -0.1621867269, -0.5378569365, 0.4328962862, 0.2639687061, 0.0280799866, 0.5115489364, -0.0001171745, 0.07941892, 0.1408238858, -0.0046917768, -0.0439400338, -0.0354698598, -0.030491326, -0.0833087042, 0.3720037937, -0.092743285, -0.2928209603, -0.0792524666, 0.0061560189, 0.2068329602, 0.4049653113, 0.1370559484, 0.1354582459, 0.4140483439, 0.6308284998, -0.0483632684, 0.51682657, -0.2037339658, -0.2146049589, 0.1246314794, 0.2182045728, -0.2637346089, 0.0977444798, -0.0559177734, 0.2176227719, 0.0844789594, 0.1007050946, 0.0064793946, 0.2837665677, -0.2852359116, -0.0767899677, 0.3960491419, 0.3805248439, -0.2011321783, -0.3604101837, -0.1703667939, -0.2085843384, 0.059783645, 0.2075708061, -0.2323998064, -0.3061919808, 0.3499825299, -0.0237948671, -0.1572734714, -0.2329319417, 0.0398118682, -0.3779923618, 0.6186766028, 0.1304641664, 0.2004019171, 0.0787135959, -0.1388925463, -0.2523773611, 0.258526355, -0.0129787065, 0.063607119, -0.2934583426, -0.1428921372, 0.2488573194, 0.2419500947, 0.2727939487, 0.0403144658, -0.1411073059, 0.1671094745, 0.198168084, 0.2720074654, 0.1446547061, 0.0335152671, -0.2245224267, 0.1350045055, 0.3313993216, -0.0000969323, 0.1322932243, 0.0535428226, -0.0543982163, -0.2799725533, 0.0378354341, -0.3460947275, 0.2894435525, -0.1931290329, -0.3421812057, -0.1763546914, -0.116622515, 0.146671176, -0.0318937488, 0.1282466799, 0.0388667397, 0.3341373205, 0.0885851756, 0.1577053517, -0.2806060016, -0.0087908795, -0.1320134997, -0.1841313392, -0.0091544911, 0.0849367902, 0.3447554708, 0.0505148992, 0.3323369324, 0.197570771, 0.0680753216, 0.4564490318, -0.0531210043, 0.1364159137, -0.3700832725, 0.4508807063, -0.3323380351, 0.1976621896, -0.058138404, 0.0628102049, -0.1915750951, 0.1300497502, -0.1899696589, 0.0482476763, -0.1915133297, 0.1574581563, -0.3573659658, -0.0826642513, -0.1527119428, 0.070202373, -0.0288151857, -0.43668589, -0.0195417069, -0.250221163, -0.0132399686, -0.0616674796, 0.26464203, 0.0713777393, -0.3628188074, -0.0274631958, 0.1427611113, -0.6227783561, -0.1789806485, 0.239354983, -0.2394667119, 0.2606441081, -0.1663726419, 0.3105500638, 0.1664201617, -0.269310981, -0.4029175341, -0.130852893, -0.2516515255, 0.4186943173, -0.0464102104, -0.1123275533, 0.0676419884, -0.0331609435, -0.0478268117, 0.1581589878, 0.1312135607, 0.2168275267, -0.300775826, -0.3674803376, 0.5387311578, 0.2180076689, 0.0704711229, -0.0844727084, -0.1506543458, -0.0735870302, 0.2024607956, -0.2686370611, 0.133695513, 0.0354770869, 0.4232333601, -0.0971347839, 0.2044667304, -0.248816967, -0.5351420641, 0.3190749884, -0.0942599103, 0.2063256055, -0.1566704363, 0.0384791493, -0.0378693677, -0.0542148016, -0.3329944313, -0.2113435119, 0.1806448549, -0.2434689403, 0.1964031309, 0.12061847, -0.1091237888, 0.0806273967, 0.4492129385, 0.1215975285, 0.0134599721, 0.3498784006, -0.1768245548, -0.3050770164, 0.2239730358, 0.0812373087, 0.0774510726, -0.0824309662, -0.0425243936, 0.2866799831, 0.1643120646, 0.3654067516, -0.1780031323, 0.3176197708, 0.1306518763, -0.5406617522, -0.0758884698, 0.4269063473, 0.1035571247, -0.1261871457, 0.1132319868, 0.14256078, 0.2797721326, 0.0193210077, 0.151939109, -0.1222834513, 0.133161515, 0.0406502225, 0.0729068741, -0.0568342283, 0.0058676922, 0.1114467606, 0.137149021, 0.0175449457, -0.0516747423, 0.2303843498, 0.3417685926, 0.0505567342, 0.3291548491, 0.1389819235, -0.2897286117, -0.1328886747, 0.0805215016, -0.5257542133, 0.2791214287, 0.236982882, -0.0444275029, 0.1000378653, -0.2512210608, -0.1261417568, 0.1744198799, -0.08043769, 0.1782449633, 0.3231776655, 0.0959308669, -0.0637741983, -0.3817213178, -0.1507435292, -0.0748543367, 0.3306752443, -0.3862913847, -0.2413173169, -0.1049690917, 0.3216769993, 0.2725955546, -0.0808427855, -0.3064686954, -0.2201132923, 0.2603960037, 0.4772411585, 0.1165538132, 0.1628493518, -0.0737930983, 0.0380959772, 0.1398374289, -0.2964509428, -0.3593038917, -0.274743557, -0.4682714939, 0.1212390289, 0.0316689312, 0.0594273694, 0.2674308121, 0.0404026806, 0.0869704485, -0.2797508538, -0.5713725686, 0.0258006975, -0.2757350206, 0.296580255, 0.2656935155, 0.3712022007, 0.0146418223, -0.1520949751, 0.3342801034, -0.5331458449, -0.2797224224, 0.0561480336, -0.1597092599, -0.018837586, -0.2276718915, -0.2005416155, 0.0545631684, -0.2094623148, 0.48730582, 0.0893598422, -0.0777638555, -0.0578466021, 0.2512843907, 0.1818450093, -0.1000182405, 0.0056197383, -0.1132391393, -0.2412527949, 0.4282822609, -0.1403420269, -0.3727828562, -0.0131192403, 0.0482393391, 0.3445111215, 0.2113745362, -0.2584076822, -0.2144913673, -0.1600622237, 0.4973121881, 0.1709285975, 0.2897217572, 0.5415074825, 0.0972691849, -0.0025501761, -0.2357561737, -0.2569275796, 0.2003497481, 0.0552069508, 0.0855822638, -0.1022005901, 0.0219613463, -0.0871280879, 0.7050465345, 0.2103541642, 0.1172730997, 0.2652162015, -0.1464132667, 0.0713078678, -0.2871908247, -0.0204008911, 0.1816252172, 0.126580283, 0.1141965613, 0.4659209847, 0.0153718218, -0.2948924005, -0.3402733505, -0.0141838267, -0.2656383514, -0.3895334005, -0.1034845039, 0.3594270647, 0.1929799914, -0.043474894, -0.0052692145, -0.1688801646, -0.1890221983, 0.2966148853, -0.0397455283, -0.0240895636, 0.0552967042, -0.157943368, -0.2891510427, -0.3336389363, 0.0818578899, 0.1664176881, 0.1847864836, -0.0680764988, -0.1340448856, 0.2387774289, -0.2572526634, 0.5482111573, -0.2503589988, 0.0644776151, 0.0740984306, 0.0079347789, -0.5168674588, -0.2064507902, -0.2619245946, -0.2034543306, -0.005172302, 0.1305758506, -0.8042139411, -0.1416987926, -0.0203214064, 0.0543861352, -0.0029820853, -0.0186940413, -0.3273306787, -0.3300192952, -0.1926889271, -0.2540757954, 0.029383339, 0.1346323341, -0.2136128247, 0.0616570227, -0.1377570033, -0.0156033281, -0.0004650841, 0.5012168884, 0.0365820341, -0.2493595332, 0.0479818992, 0.2962443829, -0.2872929871, 0.2205217183, 0.4225323498, 0.3253389299, -0.372533828, 0.0434294902, 0.091584444, 0.2149435282, 0.2550441921, -0.112782903, 0.1612327695, -0.2287414223, 0.1712810993, -0.2005304247, -0.0550191477, 0.6458352208, -0.1297023296, -0.4264846444, 0.1230622232, 0.4306231737, 0.0931050256, -0.0858477801, -0.0152057586, 0.5795425773, -0.4121975005, 0.043237105, 0.0606308915, 0.9315184951, -0.0630199239, 0.2635146677, 0.6802079082, -0.1823333651, 0.4589172602, -0.1581914127, 0.0483357571, -0.5087718964, 0.1453892291, -0.0921901837, 0.0200425945, 0.3349592984, -0.0943757072, -0.4093670249, 0.1114813909, 0.0546158217, 0.3981404305, 0.2363918722, 0.3883897066, 0.0551471114, -0.0701503381, -0.0819077417, 0.1282797158, -0.1015639901, 0.2616384923, -0.1411422342, -0.278042376, -0.1079303771, -0.400436461, -0.4374126196, 0.0159222186, -0.5444216132, 0.2426147312, 0.1901869327, -0.1010000557, 0.4206790328, -0.0795523375, 0.0983963385, -0.0371327884, -0.5875918865, 0.2600962818, -0.3174577355, -0.3028065264, -0.0156445075, 0.0216643959, 0.1476691216, -0.2335634828, -0.482355684, 0.1443569511, -0.0612178668, -0.2304865271, -0.2473808378, -0.2755085528, -0.1288024932, -0.1659004539, 0.1807352751, -0.0787778571, 0.0377133042, -0.1690507829, 0.0951924995, -0.0664824322, -0.1401761919, 0.1735391319, 0.1389174908, 0.0415223613, -0.0753182396, 0.3403993249, -0.1505475491, -0.0002166706, 0.4557002187, 0.1844142526, -0.2143872678, -0.3254325986, -0.1513900012, 0.1860682219, -0.2213612348, -0.090141207, 0.4567633271, -0.0418892577, 0.1108157337, 0.6615353823, 0.1306933314, -0.140413329, 0.0508985482, -0.153906405, -0.0674636438, 0.3901174366, 0.027862085, 0.3385825455, -0.0731707066, 0.365308851, 0.2052225322, 0.0990209058, -0.3016480803, 0.1949869692, 0.1255560368, 0.0547829866, -0.0497934669, -0.2189922184, 0.1979608983, 0.1060337722, 0.1444691122, -0.0088695996, -0.2713909447, -0.189064309, -0.0270051267, 0.1344126165, 0.2101171166, -0.2043050677, 0.1009772494, -0.0373050608, -0.0319799408, -0.0614558905, 0.3890509903, 0.0531608239, -0.1427125186, 0.1534892768, 0.1570971459, 0.0543240272, -0.2639512122, -0.0870099217, -0.0941800922, 0.000409505, 0.1391077936, 0.0980046168, -0.2191277742, -0.1056189016, 0.2948782742, 0.5046457052, 0.0544735827, 0.064353697, 0.2324193716, -0.3727884889, -0.160553202, -0.1102434322, 0.2846662998, 0.3755250275, -0.0397625826, -0.054656934, 0.2846018374, 0.1878601462, -0.2341835201, -0.0106673744, 0.6830040812, 0.0071559758, 0.1552574486, 0.1619550288, 0.152860865, -0.3002584279, -0.2156458497, 0.0755800977, 0.2629770339, 0.0707811415, 0.0582781248, 0.4259403646, -0.0978896245, -0.0580636263, 0.1368256211, 0.1183040068, 0.1697499901, 0.2068118751, -0.3776712418, 0.0475408249, -0.2825200856, 0.2500363886, 0.3207113445, 0.1081866473, -0.2281577289, -0.0382329263, 0.0943586454, -0.209009394, 0.0108344564, 0.4563934207, 0.1838446259, 0.0454131179, -0.490598917, 0.2197510749, -0.1127000898, -0.1174173206, -0.0129562821, -0.248607263, -0.0332056284, -0.1253830642, -0.1384201348, -0.3741064668, 0.4117641747, 0.1140369028, 0.0056987205, -0.4141675532, 0.1806012988, 0.0854026675, 0.3866273165, 0.1436974406, 0.2506823242, 0.2383490354, -0.3593239486, -0.1553425491, 0.5158732533, 0.3609434366, 0.2361157089, -0.4983871877, 0.0330158062, -0.1927715689, -0.0972191989, -0.0738480538, 0.2962005436, 0.0832712799, 0.1003080904, 0.0081481524, 0.0812422112, -0.1380746961, -0.3515099287, -0.1028729156, -0.0035799202, -0.2982717752, 0.054476589, -0.2025985867, -0.0291762799, 0.0609574616, -0.1285894066, -0.170361042, 0.0027336574, 0.0466497466, 0.1201152653, 0.0524000861, -0.178275764, 0.0606785007, 0.08816351, 0.5512146354, 0.2267615944, 0.2592989206, -0.1696712077, -0.1509066075, -0.312669307, 0.2088227272, -0.2903216183, -0.053837534, -0.0067357863, 0.210671708, -0.154105261, 0.3410602212, 0.1830133647, 0.2890582085, -0.0141773457, 0.221100688, -0.2086699754, 0.1971780807, -0.1781778485, -0.1649372876, -0.0768916085, -0.2805627286, 0.2442214638, -0.3426179588, 0.053752102, -0.1285859346, 0.4614968598, 0.0093116239, -0.3884456456, 0.3599073291, 0.4141123593, 0.4446304739, 0.0833813995, 0.0008540782, -0.4352277219, -0.2522574663, -0.3233964443, 0.0065198122, -0.130068779, 0.3493010402, 0.0371884704, -0.327290386, -0.0716944709, 0.1934988052, 0.1795127392, 0.1985128522, -0.0171338376, 0.092724666, 0.0163969081, 0.0711499006, -0.2019703537, 0.1262806058, -0.0323906131, -0.2043990493, -0.3565768301, -0.6132529974, 0.3638982177, -0.6347134709, -0.2741698325, -0.2015027851, 0.2138897926, 0.1161632463, -0.2915632129, -0.509083271, 0.1441641003, 0.1522791684, 0.1124381125, -0.37411201, 0.3102250695, 0.0858425573, -0.1579926014, -0.0411101878, 0.3362417817, 0.0036745281, 0.0551082976, -0.0840281993, -0.1470240951 ]
https://github.com/huggingface/datasets/issues/707
Requirements should specify pyarrow<1
Hello @mathcass 1. I did fork the repository and clone the same on my local system. 2. Then learnt about how we can publish our package on pypi.org. Also, found some instructions on same in setup.py documentation. 3. Then I Perplexity document link that you shared above. I created a colab link from there keep both tensorflow and pytorch means a mixed option and tried to run it in colab but I encountered no errors at a point where you mentioned. Can you help me to figure out the issue. 4.Here is the link of the colab file with my saved responses. https://colab.research.google.com/drive/1hfYz8Ira39FnREbxgwa_goZWpOojp2NH?usp=sharing
I was looking at the docs on [Perplexity](https://huggingface.co/transformers/perplexity.html) via GPT2. When you load datasets and try to load Wikitext, you get the error, ``` module 'pyarrow' has no attribute 'PyExtensionType' ``` I traced it back to datasets having installed PyArrow 1.0.1 but there's not pinning in the setup file. https://github.com/huggingface/datasets/blob/e86a2a8f869b91654e782c9133d810bb82783200/setup.py#L68 Downgrading by installing `pip install "pyarrow<1"` resolved the issue.
103
Requirements should specify pyarrow<1 I was looking at the docs on [Perplexity](https://huggingface.co/transformers/perplexity.html) via GPT2. When you load datasets and try to load Wikitext, you get the error, ``` module 'pyarrow' has no attribute 'PyExtensionType' ``` I traced it back to datasets having installed PyArrow 1.0.1 but there's not pinning in the setup file. https://github.com/huggingface/datasets/blob/e86a2a8f869b91654e782c9133d810bb82783200/setup.py#L68 Downgrading by installing `pip install "pyarrow<1"` resolved the issue. Hello @mathcass 1. I did fork the repository and clone the same on my local system. 2. Then learnt about how we can publish our package on pypi.org. Also, found some instructions on same in setup.py documentation. 3. Then I Perplexity document link that you shared above. I created a colab link from there keep both tensorflow and pytorch means a mixed option and tried to run it in colab but I encountered no errors at a point where you mentioned. Can you help me to figure out the issue. 4.Here is the link of the colab file with my saved responses. https://colab.research.google.com/drive/1hfYz8Ira39FnREbxgwa_goZWpOojp2NH?usp=sharing
[ -0.2086723149, -0.2492388636, 0.0104707647, 0.1431630552, -0.1351187378, -0.1367650032, 0.0601092987, 0.1777838618, -0.0722261295, 0.187683776, -0.1349501312, 0.3921404183, -0.0105914706, 0.2025153935, 0.0202153791, -0.3189197183, 0.1558382511, 0.6317853928, -0.2972457409, -0.0332889967, -0.0148537504, 0.2716950774, -0.3856917024, 0.1468180716, -0.4066582024, -0.0718951002, 0.0602017902, -0.1913315207, -0.1789081395, -0.4104485214, 0.5019394159, 0.2933354676, 0.0380193479, 0.538669467, -0.0001246494, 0.0441621132, 0.0715483874, -0.0582216606, -0.0730771199, -0.4739513993, -0.0124221761, 0.0288729109, 0.5552845597, -0.1167390496, -0.2710618675, 0.1298569292, 0.0246240422, 0.3614777625, 0.4647698998, 0.2240046412, 0.0246862844, 0.3220963776, 0.5196750164, 0.0276101232, 0.4959204495, -0.1979997754, -0.2250535935, 0.4007033706, 0.2845154107, -0.2938594818, 0.2136533409, 0.0722618774, 0.1143924743, 0.2241770923, 0.0857389644, -0.0296407323, 0.3064200878, -0.5438731909, -0.0512407757, 0.4704498053, 0.1956391037, -0.2339907587, -0.2855395675, -0.1750821918, -0.0760565922, -0.0668526664, 0.3151906431, -0.1906866729, -0.4019596279, 0.2506096959, 0.0359968841, -0.0399616249, -0.3839386106, 0.1969910711, -0.5321897268, 0.745795846, 0.0781327412, 0.1403680146, 0.128755495, -0.0064597642, 0.015341945, 0.1976995766, 0.2052422762, -0.0080036456, -0.2740122974, -0.1842935383, 0.0807475224, -0.0599369556, 0.186904937, -0.1586041003, -0.1703173667, 0.1618903875, 0.0550831258, 0.3274675608, 0.0876164958, 0.1712817103, -0.2255453765, 0.1574649662, 0.3345222175, 0.1078224108, 0.0957441181, 0.1650239229, -0.0801131949, -0.2739414573, -0.2060222179, -0.326811254, 0.3248878717, -0.1852011532, -0.5430249572, -0.2471684366, -0.3868258297, 0.1440586448, 0.0075723999, 0.1935206056, -0.168186754, 0.2706873119, 0.1613991112, 0.1995218098, -0.2905426919, 0.1262450218, -0.0097410334, -0.0157326031, 0.0473037884, 0.1668774784, 0.3879337609, 0.059851218, 0.3442662358, 0.2795541286, 0.2312613577, 0.1923202276, 0.1490723491, -0.0685159564, -0.1666154414, 0.5420350432, -0.2384157479, 0.1536211371, -0.0455888174, 0.1128445864, -0.1617375016, 0.2223211527, -0.3807042837, 0.0063015129, -0.2397684753, 0.0668681115, -0.4700931609, -0.0116190603, -0.2089210898, 0.2450741678, -0.0518172979, -0.2779944241, -0.0258287862, -0.411703974, -0.2063217163, -0.0955633223, 0.3335034847, -0.1586709917, -0.4914384484, -0.0222057402, 0.1562984437, -0.3432884812, -0.0639649183, 0.218338877, -0.3571611047, 0.3569907248, -0.1360033303, 0.2632780373, 0.1253130287, -0.2123101652, -0.444507122, -0.2307711691, -0.1657955199, 0.4377111793, -0.0319374166, -0.1881284863, 0.2705562711, -0.0057023, 0.3001308441, 0.0910481811, 0.0968550369, 0.1326061189, -0.2460104972, -0.4140641093, 0.640218854, 0.1166729853, 0.3057157397, -0.1149230152, -0.2733580172, -0.0769002363, 0.229558304, -0.3223404586, -0.0021765879, -0.0269892327, 0.44261989, 0.0258701313, 0.0911421999, -0.3212688267, -0.5001302361, 0.2173959464, -0.0801017433, 0.3355020583, -0.1914378703, 0.0605212003, -0.0343135148, -0.1909962744, -0.3320443928, -0.293102771, 0.1080882177, -0.3093078434, 0.022657143, 0.1018400863, -0.1950884461, 0.1308247149, 0.2655105591, 0.0207536854, 0.2158549577, 0.4626185894, -0.1991202384, -0.4572331309, 0.2032586783, 0.1807989329, 0.0625622198, -0.05911256, -0.1452131122, 0.0933494642, -0.0193587132, 0.1822321862, -0.2986147702, 0.2605121732, 0.2605969906, -0.4232659638, -0.1955487579, 0.3503353, -0.0008108751, -0.0930693448, 0.2096852511, 0.327460587, 0.2745113969, 0.0170801207, 0.0372878164, -0.22704117, 0.1220124438, -0.0016370378, -0.0083610797, 0.0001991351, 0.0653396472, 0.1265782714, -0.0049332911, 0.0802944303, -0.1801211685, 0.2274038494, 0.4201956391, 0.0835635737, 0.413382262, 0.0551387146, -0.2376073897, -0.1505481899, 0.1739172041, -0.3802371025, 0.2892012298, 0.1841975003, -0.077699855, 0.0568745397, -0.3004881442, -0.1140456125, 0.1123889387, -0.025332449, 0.4185264111, 0.2763242126, 0.1527324766, -0.0249465536, -0.2231227309, -0.1890083849, 0.0537127666, 0.253418833, -0.3964975476, -0.2453545779, -0.1942082644, 0.134581089, 0.1920175105, 0.0723449364, -0.1970224679, -0.0486668944, 0.2232683003, 0.6532787085, 0.2154000252, 0.2832365334, 0.0743165836, -0.0514435731, 0.033561524, -0.3396542668, -0.2768452466, -0.207562983, -0.3671345115, 0.044184871, 0.0132678086, 0.133673355, 0.2305512875, -0.0909764245, -0.1738572121, -0.1247093976, -0.5882373452, 0.1316968501, -0.3359528482, 0.3475393355, 0.0953311622, 0.3303360045, -0.2024289519, -0.2611167729, 0.2653264701, -0.3258784711, -0.2533765733, -0.0841301605, -0.2031656653, 0.1257282495, -0.1894627512, -0.3544023037, -0.0188000165, -0.1409429312, 0.2841361165, -0.1004939824, 0.0101526165, 0.0029495975, 0.313996017, 0.2860014439, 0.0444625802, 0.0526338108, -0.1595651209, -0.1258472651, 0.4896462262, -0.1127679422, -0.3425050676, 0.1377506256, -0.0884389058, 0.4012727737, 0.2340293825, -0.3173577785, -0.3688833117, -0.0117835486, 0.4804005921, 0.1285285354, 0.0694002286, 0.5525757074, 0.0312732644, 0.1009884179, -0.1931357831, -0.2890686989, 0.2264042795, 0.1350498497, 0.133422941, -0.0029782825, -0.0167334173, 0.0700282604, 0.7714207172, 0.0803978071, 0.0786433816, 0.1744904816, -0.0797609985, -0.018849453, -0.1822080165, -0.0707813576, 0.1368533075, 0.0644053966, 0.102936618, 0.3807845116, -0.1876033098, -0.3487030268, -0.3500250578, -0.0201875735, -0.3264288902, -0.4082988799, 0.1243106872, 0.2795993984, 0.2563572526, -0.0651810467, -0.0377916917, -0.0926643834, -0.1655882001, 0.2151120901, 0.2523820996, -0.1616761237, 0.0830576345, -0.062232215, -0.4791889489, -0.2220382988, 0.0489146821, 0.2555776834, 0.2051363736, -0.0589682683, 0.1463350356, 0.298148483, -0.1116931438, 0.5202948451, -0.0870404169, 0.0110758981, 0.0811135396, -0.1729032099, -0.2840286195, -0.3062785566, -0.4232669771, -0.2646530867, 0.1585465074, 0.1654623002, -0.7676323652, -0.2575203478, 0.050574962, -0.0228640642, 0.0322508216, -0.0421994776, -0.3416552842, -0.4767368138, -0.2516467571, -0.2090091407, 0.1732096076, 0.1290229559, -0.3761098087, -0.0231264383, -0.0450557321, 0.0272253808, 0.0778525919, 0.4401804507, 0.0053053359, -0.046998769, -0.0451440029, 0.2295737416, -0.2422757447, 0.4745722413, 0.1285248697, 0.3248036802, -0.4303437471, 0.203956157, 0.2204694003, 0.130878672, 0.3809556663, -0.1939184219, 0.2553451359, -0.212774843, 0.0657228306, 0.0090949098, 0.1710775346, 0.6335738897, 0.0473975614, -0.3903396428, -0.0285552181, 0.3548620641, 0.1598045677, -0.1670045108, -0.0544483028, 0.375536561, -0.3867869675, -0.0233919881, 0.1086356342, 1.012088418, -0.0974001586, 0.201610446, 0.7103582621, -0.1251993924, 0.6407561302, -0.1507133991, 0.2180499434, -0.3029669225, 0.1637694389, -0.1251390874, -0.1464378834, 0.3246547282, -0.2493910342, -0.5173293948, 0.1654730886, 0.1835632175, 0.2719474137, 0.3307576478, 0.3664638996, 0.0562734902, -0.1726073772, -0.0661863163, -0.0214585792, -0.1906190813, 0.3654988408, -0.1437009275, -0.2710831761, -0.1689602882, -0.1311111748, -0.3711028397, -0.0510371551, -0.8643134832, 0.2675008774, 0.1508103013, -0.24017106, 0.4472083449, -0.0309452023, 0.1376141161, -0.1097686812, -0.4689811766, 0.1472122073, -0.2493480742, -0.3123395741, 0.0910325572, -0.1419104934, 0.3792167902, -0.3129010797, -0.5409114361, 0.1033018306, -0.0511760116, -0.1094790921, -0.1680267304, -0.2288941294, -0.1445111334, -0.0526682176, 0.2425123751, 0.0594202243, 0.144121632, -0.2034573108, 0.0338383317, -0.0299208332, -0.1953059137, 0.1536720693, 0.1596407145, -0.1387041956, -0.0109999599, 0.2203336954, 0.049572397, 0.0212058052, 0.5640973449, 0.0790097192, -0.1335626841, -0.1652043611, -0.2041962594, -0.0878232047, -0.0198422577, -0.0097454339, 0.4078782201, -0.2062468529, -0.0879685059, 0.8415579796, 0.2351238132, 0.0826877728, -0.0706821233, -0.1525164694, -0.0312064532, 0.3379787207, 0.0881565735, 0.364815414, -0.0028079657, 0.5681378245, 0.2385707498, -0.0400062725, -0.198576346, 0.1549592912, 0.0803832337, 0.127105847, -0.219150871, -0.1455726624, 0.1834775507, 0.1521439403, -0.0072623221, 0.0748370588, -0.202943027, -0.0928240865, -0.0556375645, 0.1708943099, 0.1209279522, -0.1932411641, -0.0316784009, -0.1339412928, 0.0819303393, -0.0132941436, 0.3547129035, 0.1251431406, -0.1496165246, 0.0882558748, -0.0083849672, 0.1833599657, -0.2099686563, 0.0715832263, -0.1528004408, 0.0815199688, 0.1265183836, 0.0473818034, -0.1234631836, -0.008373294, 0.2713012099, 0.2433032095, -0.1756448001, 0.1151926666, 0.0139483372, -0.3107476532, -0.0969541147, -0.2689754665, 0.153301388, 0.3499801159, 0.0143594965, -0.0810012817, 0.3281117082, 0.0702684969, -0.1180959642, 0.2799512148, 0.5855954289, -0.0165172685, 0.1711310148, 0.2889330685, 0.159201622, -0.0347111374, -0.1282279789, 0.0942136496, 0.1177584529, 0.1074802503, 0.1329018027, 0.0949658006, -0.184354648, 0.0916815624, 0.1803431511, 0.0330011323, 0.1357513815, 0.0499201305, -0.1537525654, 0.0347512774, -0.2302165031, 0.2335729897, 0.4710672498, 0.2559518814, -0.2555862963, 0.0093816984, -0.0461415984, -0.1743954867, 0.0023053586, 0.3529134691, 0.0215683989, -0.1229897588, -0.3077790141, 0.191938445, -0.192598626, -0.0194743238, -0.1789567024, -0.2740043402, 0.0337450765, -0.1235166043, 0.0066534658, -0.3109353781, 0.3535001576, 0.2466621548, -0.1854858696, -0.2436198443, 0.1156518981, 0.1982558966, 0.3388853073, 0.1959417462, 0.3653030992, 0.080452688, -0.273224473, -0.2526739836, 0.5344125032, 0.310062021, 0.3571823239, -0.5270895362, -0.1186391786, 0.0508375503, -0.0382346809, -0.0993921831, 0.0742178261, 0.3719755113, 0.1159043983, -0.0343118012, 0.0166896693, -0.1020943299, -0.1851176471, -0.1621141583, -0.1160403416, -0.3301353753, 0.0211434755, -0.1357686818, 0.0005406182, 0.1968806833, -0.174835965, -0.1484431475, 0.1207370386, 0.101377137, -0.0851650909, 0.0744905621, -0.0127588371, 0.0261574388, 0.1295503825, 0.4061412215, 0.072121799, 0.3320484757, -0.2823966444, -0.0656898171, -0.2463536412, 0.2152019143, -0.1876380146, 0.0049149687, -0.0860484093, 0.218867287, -0.1591215283, 0.3309310377, 0.2342503965, 0.0933299586, 0.2342053652, 0.1184997261, -0.3123104572, 0.1131904274, -0.1605766267, -0.1127085015, 0.0392216891, -0.211178422, 0.172505334, -0.4397734702, -0.0324786939, -0.0812578872, 0.4167865217, 0.1804926246, -0.2006969303, 0.3395542502, 0.3661826849, 0.6058908105, 0.0794834942, 0.0877500921, -0.0646254495, -0.1996699572, -0.348049134, 0.0865995139, -0.0641781762, 0.3849515617, -0.0420470722, -0.3016376197, -0.0782692283, 0.278701812, 0.1799228787, -0.1153788567, -0.0422517955, 0.0655876324, 0.0778086483, 0.1526703835, -0.1873805523, 0.2286454141, -0.0583110191, -0.1775379777, -0.4938704967, -0.5086949468, 0.386379391, -0.7380793691, -0.3214211464, -0.271899581, 0.1684071124, 0.1280063838, -0.0242553726, -0.5557006598, -0.0519461222, 0.1206487045, 0.2506854534, -0.4771205783, 0.269864738, 0.1755544543, -0.0765636563, -0.0590751544, 0.3788483739, -0.0047914409, -0.153725788, -0.2274895608, -0.1956427842 ]
https://github.com/huggingface/datasets/issues/707
Requirements should specify pyarrow<1
Thanks for looking at this @punitaojha and thanks for sharing the notebook. I just tried to reproduce this on my own (based on the environment where I had this issue) and I can't reproduce it somehow. If I run into this again, I'll include some steps to reproduce it. I'll close this as invalid. Thanks again.
I was looking at the docs on [Perplexity](https://huggingface.co/transformers/perplexity.html) via GPT2. When you load datasets and try to load Wikitext, you get the error, ``` module 'pyarrow' has no attribute 'PyExtensionType' ``` I traced it back to datasets having installed PyArrow 1.0.1 but there's not pinning in the setup file. https://github.com/huggingface/datasets/blob/e86a2a8f869b91654e782c9133d810bb82783200/setup.py#L68 Downgrading by installing `pip install "pyarrow<1"` resolved the issue.
56
Requirements should specify pyarrow<1 I was looking at the docs on [Perplexity](https://huggingface.co/transformers/perplexity.html) via GPT2. When you load datasets and try to load Wikitext, you get the error, ``` module 'pyarrow' has no attribute 'PyExtensionType' ``` I traced it back to datasets having installed PyArrow 1.0.1 but there's not pinning in the setup file. https://github.com/huggingface/datasets/blob/e86a2a8f869b91654e782c9133d810bb82783200/setup.py#L68 Downgrading by installing `pip install "pyarrow<1"` resolved the issue. Thanks for looking at this @punitaojha and thanks for sharing the notebook. I just tried to reproduce this on my own (based on the environment where I had this issue) and I can't reproduce it somehow. If I run into this again, I'll include some steps to reproduce it. I'll close this as invalid. Thanks again.
[ -0.2600724101, -0.2294464558, 0.0445462242, 0.2166787535, 0.074973233, -0.0639310405, -0.0022502295, 0.1691178232, -0.0127057796, 0.0657430515, 0.020896988, 0.2901550233, -0.0119957691, 0.0165848266, 0.1564210057, -0.3912961185, 0.2354255319, 0.5927875638, -0.3565094471, -0.0511189215, -0.0974968523, 0.2818729877, -0.3155817389, 0.2457959503, -0.4022748172, 0.1330782026, 0.0570966676, -0.0212262627, -0.1788372546, -0.5676389337, 0.4604246318, 0.1918254495, -0.0006514216, 0.4826523364, -0.0001226648, 0.0562134869, 0.1434757262, -0.0056538722, -0.0374002382, -0.0778043866, -0.055167716, -0.122515291, 0.4323882461, -0.0663314536, -0.23511976, -0.0617912225, 0.0275407843, 0.2068420649, 0.3814498186, 0.1206036955, 0.0818247125, 0.3831522465, 0.6507724524, -0.0118112145, 0.5365056396, -0.1792542636, -0.2274964303, 0.1885092109, 0.2283305377, -0.2860313654, 0.0947203264, -0.1229191497, 0.1636890024, 0.1266192645, 0.1389255971, -0.0354293846, 0.3300077319, -0.3048426211, -0.0674956441, 0.4033077061, 0.3782412112, -0.1925994903, -0.3459407389, -0.133590281, -0.1589214206, 0.0724676326, 0.2532919049, -0.19488208, -0.2869556844, 0.362552762, 0.0005613301, -0.1138790175, -0.2268298715, 0.1020550132, -0.4096747339, 0.5994551778, 0.1086410508, 0.2016239613, 0.0570892245, -0.1125902086, -0.2647916079, 0.2614647746, -0.0001152444, 0.088318333, -0.3127446473, -0.0596964508, 0.2298753262, 0.2597004175, 0.2728827894, 0.0418968908, -0.1688742191, 0.1038946956, 0.2539031804, 0.2548690736, 0.1296691298, 0.0837189332, -0.224515155, 0.1010372937, 0.2753296793, 0.0285474826, 0.1286762208, 0.1025178134, -0.0497895367, -0.2957266271, 0.0719254762, -0.3837423623, 0.3628817201, -0.2149198949, -0.3580613732, -0.1517544687, -0.1998104453, 0.1401495486, -0.0616699196, 0.124072291, 0.0389086269, 0.3743240237, 0.0674457848, 0.16584903, -0.2863717079, -0.0123568885, -0.0845563188, -0.1550296843, -0.0043631522, 0.0966148823, 0.3515403271, 0.0227618739, 0.3478552997, 0.2659066021, 0.0562613681, 0.3823367655, -0.0564061813, 0.1206506863, -0.3797762096, 0.5211027861, -0.3667626679, 0.2458286434, -0.0599481985, 0.0836733356, -0.2162291408, 0.1611864716, -0.2448178381, 0.068152979, -0.2135564834, 0.1039169282, -0.3787121177, -0.074673228, -0.1572636515, 0.0571047105, -0.0352058001, -0.408364743, 0.0018550128, -0.3095982373, -0.0211993326, -0.0501912534, 0.265784651, 0.0732725337, -0.4110651016, -0.0553534031, 0.1464300901, -0.6278677583, -0.0937168822, 0.2602691948, -0.2143107802, 0.2615128756, -0.1712920815, 0.3319957852, 0.1254918426, -0.2687303126, -0.4613823593, -0.0979484096, -0.2837938666, 0.4334028065, 0.0229179338, -0.1663633287, 0.0577698797, 0.0078360559, -0.0059623159, 0.1268906742, 0.1804096699, 0.2102525532, -0.2970999777, -0.390498966, 0.565913558, 0.2077563107, 0.0773198009, -0.056430202, -0.1226680353, -0.0641806349, 0.1925195158, -0.2520044744, 0.1266435087, 0.0647217333, 0.4038167894, -0.1244880483, 0.158615306, -0.2392109632, -0.5577841997, 0.3368270397, -0.1081316099, 0.1521909237, -0.152861014, 0.0712803006, -0.0938851386, -0.0258186013, -0.3526059985, -0.205610916, 0.1142315194, -0.2597649992, 0.146853447, 0.1433567405, -0.09954191, 0.0853917003, 0.4340466559, 0.1081717834, 0.0264095943, 0.3328437507, -0.1912789047, -0.3221775889, 0.232642293, 0.0861701146, 0.1178947166, -0.0763147175, -0.0634008795, 0.2662024498, 0.1697749794, 0.3685861528, -0.2167715579, 0.3443761468, 0.1450624615, -0.5561096668, -0.0559159815, 0.4561322927, 0.1285794824, -0.1256190091, 0.188030526, 0.1342557967, 0.3463534415, 0.0614614002, 0.10906896, -0.101929225, 0.0950393677, 0.0584768094, 0.0756845325, -0.065019533, 0.0488048159, 0.1172885075, 0.1151426658, 0.0534860902, -0.021010723, 0.1688490361, 0.3366051316, 0.0282273926, 0.3812071681, 0.1301887333, -0.3002988398, -0.1400309652, 0.1055178568, -0.5438466668, 0.2666545212, 0.1710638702, -0.1121412069, 0.0792611316, -0.2599851787, -0.1251827925, 0.174273029, -0.0578920916, 0.2054309845, 0.3278050125, 0.0803241432, -0.0520258471, -0.3668711185, -0.1731808484, -0.0534409545, 0.3192166388, -0.4489131272, -0.2553729117, -0.1153846681, 0.4096750915, 0.2679758072, -0.0832599476, -0.3234752119, -0.1515717208, 0.19071953, 0.4871036708, 0.173206538, 0.1628541946, -0.0860741809, 0.0134214703, 0.1226312667, -0.3300584853, -0.3696286082, -0.2419107705, -0.461972177, 0.0492065027, -0.0058047213, 0.1037279293, 0.1937630028, 0.0053324159, 0.0835205764, -0.2515047193, -0.5143215656, 0.0052006398, -0.2900401652, 0.3554944992, 0.2452578396, 0.4037768543, -0.0252845529, -0.1328046173, 0.3036795259, -0.4741432071, -0.2775180638, 0.0788417682, -0.2127459645, 0.0036965513, -0.2109629959, -0.1804168373, 0.1119270176, -0.1781094521, 0.4739203453, 0.0716433898, -0.0863904729, -0.0142511465, 0.2749122679, 0.224967286, -0.1203624606, 0.054545138, -0.1089288145, -0.2190488726, 0.447555244, -0.0897276327, -0.3637834489, -0.0060734204, 0.0331214257, 0.3714802265, 0.2010561377, -0.3030137122, -0.1785421222, -0.1841653138, 0.5038667321, 0.1345977932, 0.269472003, 0.5878298283, 0.0813112929, 0.0553362109, -0.2243195623, -0.2839875221, 0.1419706047, 0.0696283504, 0.0827932879, -0.0956301838, 0.0275059622, -0.0847215876, 0.71926862, 0.2014348656, 0.1683653295, 0.2772156, -0.1349282712, 0.0249311794, -0.26097247, -0.0178889297, 0.1611093581, 0.1278340966, 0.1197074354, 0.449344337, -0.0099445395, -0.2933174074, -0.3085644543, -0.0194659121, -0.2585768998, -0.3600151539, -0.1014121175, 0.3348828852, 0.249585405, -0.0422807075, 0.0532909371, -0.1134442985, -0.1968871057, 0.3039843738, 0.022385288, -0.0011476541, 0.0949147493, -0.1835046709, -0.3080987632, -0.2945219576, 0.0470188037, 0.1664323509, 0.2763676941, -0.0939330906, -0.0692145228, 0.2698099017, -0.2304876298, 0.5348499417, -0.2213626504, 0.1032873616, 0.0726951286, 0.0049908939, -0.5632779598, -0.2405843437, -0.265191853, -0.2444622368, -0.0285275094, 0.0840948001, -0.7947930694, -0.1616080254, -0.0031483083, 0.0745919719, 0.0348152295, -0.0079377014, -0.381062448, -0.3311388791, -0.1961112022, -0.2764703631, 0.0251088198, 0.1427243054, -0.1972418875, 0.1291229576, -0.1272188127, -0.036442928, -0.0063954042, 0.4384378195, 0.0167679898, -0.1937925816, 0.0190711264, 0.295950532, -0.2938382924, 0.2168512642, 0.3549227715, 0.3580702543, -0.3900271952, 0.0701684207, 0.1502633095, 0.257931143, 0.2847652137, -0.1211138666, 0.1475897878, -0.2307739556, 0.097884573, -0.1897481233, -0.1056677029, 0.7092195153, -0.1743066758, -0.4266007841, 0.1528982371, 0.4809176624, 0.126493305, -0.0636677667, -0.0694280267, 0.6567611694, -0.3557114601, 0.0084245997, 0.0415331349, 0.9474657178, -0.0492687635, 0.2523491085, 0.7000193, -0.1713727862, 0.4334256351, -0.1260406077, 0.0683533177, -0.4909997582, 0.1541275531, -0.1144988015, -0.02479803, 0.397518605, -0.0940968394, -0.3963698745, 0.1129442304, -0.0252530929, 0.4111180902, 0.2764182985, 0.3371881247, 0.0277617443, -0.0784790367, -0.0978198498, 0.064256072, -0.1611087322, 0.3095938861, -0.1548897475, -0.2225810438, -0.0984714702, -0.3774929643, -0.4782422185, 0.0154626993, -0.5383329988, 0.2571949363, 0.2164737135, -0.1365375817, 0.4455130696, -0.0758889094, 0.0518837944, -0.0593144111, -0.6055544615, 0.2674524784, -0.3270071745, -0.3188633025, 0.0530106835, 0.0074723591, 0.1546267271, -0.2245292515, -0.4871279895, 0.1202142686, -0.1397124678, -0.1552682072, -0.2389632314, -0.2483065575, -0.153474167, -0.1854627877, 0.1674661934, -0.1240851805, 0.1325311065, -0.1715200096, 0.0447929911, -0.0898994282, -0.1219869852, 0.1516408771, 0.1526879072, -0.0129656596, -0.0802378729, 0.3831327558, -0.1722148657, 0.0095834984, 0.4769024849, 0.1530896276, -0.1831882298, -0.2931613028, -0.1196409538, 0.1579948217, -0.2488397658, -0.1189776361, 0.4333808124, -0.0437364541, 0.0681125894, 0.7004839182, 0.1763395816, -0.1456467807, 0.0540271029, -0.204121232, -0.054898642, 0.3778787255, 0.0031667964, 0.3128389418, -0.0913686231, 0.3753882647, 0.19954364, 0.065178588, -0.2247830927, 0.2147882432, 0.1590882838, 0.0638611689, -0.0293735061, -0.1718459576, 0.1907856464, 0.1145641133, 0.1144405752, -0.0069733313, -0.2571873367, -0.1317490786, -0.0618791468, 0.1686325669, 0.2130320966, -0.1596170366, 0.1198856235, -0.042266503, -0.004332839, -0.0849362165, 0.3771916926, 0.0965897813, -0.1567595154, 0.1390300989, 0.1304196566, 0.0886540338, -0.3128325939, -0.0523616225, -0.1344357729, 0.0260587819, 0.1303711683, 0.0753606334, -0.2008760571, -0.0683855787, 0.2166529, 0.498085022, 0.0106345508, 0.0860232562, 0.2288601696, -0.409414649, -0.1212667897, -0.1192338318, 0.1960594356, 0.3971195519, -0.0784615651, -0.0645661056, 0.2181538641, 0.1423021555, -0.1961404532, 0.0011725018, 0.6975146532, 0.0314340517, 0.1126796529, 0.1705730557, 0.182759285, -0.3354979455, -0.2131246924, 0.0825450122, 0.2384023368, 0.0979659408, 0.0413380377, 0.4126858711, -0.0530698076, -0.036905013, 0.1738543808, 0.0716800243, 0.172483772, 0.1892308742, -0.3467921317, 0.0061215046, -0.2893972695, 0.315336585, 0.3084584475, 0.0791494846, -0.2358138561, -0.0338425115, 0.0548740551, -0.1931437999, 0.0286296997, 0.4667814374, 0.201178357, 0.0236375928, -0.5152416229, 0.1780369431, -0.1269298792, -0.1181454882, -0.003799449, -0.2237559259, -0.025353726, -0.1171617061, -0.1390085667, -0.34703511, 0.4516317546, 0.1168602854, -0.0679069087, -0.4596053064, 0.197496742, 0.1343004405, 0.4040619433, 0.1194643602, 0.2511402667, 0.1893765777, -0.383701086, -0.195384562, 0.5415598154, 0.3914600611, 0.2434295416, -0.4737424552, -0.0138558652, -0.1702406257, -0.1012053043, -0.0652635992, 0.2659266591, 0.1034445763, 0.1449323297, 0.0002278954, 0.0285555944, -0.0796171725, -0.3607685268, -0.0961582437, 0.0007538088, -0.3436563909, 0.0800771862, -0.249508515, -0.0392745174, 0.0575808994, -0.0598283075, -0.1600273401, 0.0024758796, 0.0466146022, 0.1515882462, 0.0417585038, -0.1684442908, 0.0292738248, 0.0942954496, 0.5413833261, 0.2419520617, 0.2027943283, -0.2083524466, -0.1428868324, -0.2838063836, 0.2257682979, -0.2848081291, -0.0250266604, 0.0288368855, 0.2524176538, -0.2243114263, 0.3560341895, 0.1580044031, 0.297983855, -0.0117508071, 0.2616172433, -0.2010524273, 0.1591653675, -0.1653671116, -0.1854949296, -0.0884959474, -0.2935527861, 0.2803273499, -0.4329350591, 0.0006530722, -0.1449589431, 0.4242348373, 0.0093398578, -0.373690486, 0.3833175898, 0.4528142512, 0.4767916799, 0.1089385748, -0.0122995898, -0.4657028913, -0.2472917438, -0.2630335391, 0.0687009022, -0.1872003525, 0.3646781743, 0.0250797793, -0.3029356897, -0.0547209308, 0.2389769852, 0.1853816956, 0.2155535817, -0.0721762851, 0.1199944615, -0.0422300883, 0.1143094152, -0.2109837979, 0.0943511277, -0.018997483, -0.1899802238, -0.3945066929, -0.6121429205, 0.3251287341, -0.6871474981, -0.286302954, -0.2247802615, 0.2356779426, 0.0586216822, -0.2666994929, -0.4676541686, 0.0777353719, 0.1692684442, 0.1357899904, -0.399482131, 0.2756605148, 0.0832403526, -0.1162423417, -0.0143995369, 0.3591379821, -0.0228889342, 0.0447547585, -0.0628572777, -0.1172901466 ]
https://github.com/huggingface/datasets/issues/707
Requirements should specify pyarrow<1
I am sorry for hijacking this closed issue, but I believe I was able to reproduce this very issue. Strangely enough, it also turned out that running `pip install "pyarrow<1" --upgrade` did indeed fix the issue (PyArrow was installed in version `0.14.1` in my case). Please see the Colab below: https://colab.research.google.com/drive/15QQS3xWjlKW2aK0J74eEcRFuhXUddUST Thanks!
I was looking at the docs on [Perplexity](https://huggingface.co/transformers/perplexity.html) via GPT2. When you load datasets and try to load Wikitext, you get the error, ``` module 'pyarrow' has no attribute 'PyExtensionType' ``` I traced it back to datasets having installed PyArrow 1.0.1 but there's not pinning in the setup file. https://github.com/huggingface/datasets/blob/e86a2a8f869b91654e782c9133d810bb82783200/setup.py#L68 Downgrading by installing `pip install "pyarrow<1"` resolved the issue.
52
Requirements should specify pyarrow<1 I was looking at the docs on [Perplexity](https://huggingface.co/transformers/perplexity.html) via GPT2. When you load datasets and try to load Wikitext, you get the error, ``` module 'pyarrow' has no attribute 'PyExtensionType' ``` I traced it back to datasets having installed PyArrow 1.0.1 but there's not pinning in the setup file. https://github.com/huggingface/datasets/blob/e86a2a8f869b91654e782c9133d810bb82783200/setup.py#L68 Downgrading by installing `pip install "pyarrow<1"` resolved the issue. I am sorry for hijacking this closed issue, but I believe I was able to reproduce this very issue. Strangely enough, it also turned out that running `pip install "pyarrow<1" --upgrade` did indeed fix the issue (PyArrow was installed in version `0.14.1` in my case). Please see the Colab below: https://colab.research.google.com/drive/15QQS3xWjlKW2aK0J74eEcRFuhXUddUST Thanks!
[ -0.2761949301, -0.14012447, 0.0347476006, 0.160385251, 0.0485610552, -0.042708829, 0.0266226567, 0.1984370947, -0.0582812279, 0.060050305, 0.0015629289, 0.2838503718, -0.0044424045, 0.0376972072, 0.1520176828, -0.3687957823, 0.2303958833, 0.5788679719, -0.3444223106, -0.0225952733, -0.1056377143, 0.2532050312, -0.3011269569, 0.2348774374, -0.3952793181, 0.1669677198, 0.0467279367, -0.021139672, -0.1742844284, -0.5824115872, 0.4924414754, 0.252129674, 0.0277055576, 0.4566903114, -0.0001201363, 0.090988487, 0.1616442949, -0.0273131449, -0.0626678616, -0.0653419942, -0.0663690865, -0.1003901288, 0.4112481177, -0.0659434795, -0.2583895624, -0.056933254, 0.0501447544, 0.1991280019, 0.3331049085, 0.1226726174, 0.1010973752, 0.3785634935, 0.65432024, -0.027497774, 0.5464004874, -0.1852427572, -0.2104419619, 0.150159657, 0.2215284556, -0.2979410589, 0.0968256816, -0.0911414847, 0.1513129175, 0.1252649128, 0.1298454106, -0.0355436727, 0.3226666152, -0.3071688712, -0.0943658501, 0.3945661187, 0.3904875815, -0.1932223588, -0.3653138876, -0.1660096645, -0.1780640334, 0.0701816231, 0.2186298221, -0.2005635351, -0.2938901186, 0.3531871438, 0.0228027608, -0.1070260331, -0.2230656892, 0.0897028893, -0.4169588983, 0.611536622, 0.1379714161, 0.2251071632, 0.0881055072, -0.11686524, -0.2416557372, 0.2601368725, -0.0086092995, 0.0636654347, -0.3093868196, -0.0776960403, 0.2582891881, 0.2512826622, 0.2540598214, 0.0727150664, -0.1410648078, 0.14505364, 0.2471521795, 0.289820224, 0.1449887007, 0.0582229197, -0.2342853546, 0.1094238162, 0.3053760827, -0.0057280478, 0.1311250031, 0.0875021219, -0.0547011346, -0.2781456113, 0.0926289111, -0.3468330503, 0.3232019842, -0.1806135774, -0.3758251071, -0.1754789948, -0.1947013289, 0.1470199525, -0.0443432368, 0.1393224299, 0.056813255, 0.3803687394, 0.0832966343, 0.1703188121, -0.2854255736, -0.017673593, -0.0979577079, -0.1771341115, 0.043486461, 0.0586857013, 0.384806931, 0.0592873096, 0.3191576898, 0.2018922269, 0.0387463756, 0.4158569276, -0.0089398036, 0.1414913386, -0.3730437458, 0.511695981, -0.3510391414, 0.2050296962, -0.0354541726, 0.0312406719, -0.243134886, 0.1497157365, -0.2207832485, 0.0337289646, -0.202280879, 0.1343832761, -0.4136123955, -0.1025791243, -0.1556589305, 0.0494393297, -0.0739991739, -0.4285878837, -0.048700314, -0.336917609, -0.0042495942, -0.0796427578, 0.2585653663, 0.0653278232, -0.4140259326, -0.0424388386, 0.0710195601, -0.6321162581, -0.1191632152, 0.2066755891, -0.2231914848, 0.2573308945, -0.1579538584, 0.325378418, 0.1259883344, -0.2814041078, -0.4366952181, -0.1255474389, -0.2708388865, 0.4315643013, -0.0321910977, -0.1144107133, 0.095752418, 0.0036062924, -0.0575911514, 0.147273615, 0.1389974058, 0.2289623171, -0.255620718, -0.3824256063, 0.5881329775, 0.2423675656, 0.0550812483, -0.083409667, -0.149246335, -0.0362354927, 0.1523855776, -0.243511498, 0.1465933174, 0.0390841588, 0.4210371971, -0.0975353345, 0.1797186136, -0.2006238401, -0.5595870614, 0.323648721, -0.0932348818, 0.1747029573, -0.1643199176, 0.0497595258, -0.0593130365, -0.0135821719, -0.3554160893, -0.1940593272, 0.1503903717, -0.2420452237, 0.1908441782, 0.1120263487, -0.0961318836, 0.0760719553, 0.4792807698, 0.1153137237, 0.0438904427, 0.3394734859, -0.1945206672, -0.3024531305, 0.2515615821, 0.0911318287, 0.1114839688, -0.0667081773, -0.0520863868, 0.284763813, 0.1765259504, 0.3445156217, -0.1805081666, 0.3716149628, 0.1172272712, -0.562741518, -0.0811432078, 0.4557856917, 0.1287182122, -0.1143585518, 0.1628382057, 0.1477029026, 0.3197206855, 0.0652773455, 0.1070591062, -0.0887625441, 0.1299800575, 0.0553452335, 0.0559811778, -0.0689041466, -0.002261318, 0.1314429939, 0.1101044267, 0.0435634889, -0.0192334745, 0.2190403491, 0.3266855776, 0.0325318761, 0.3579239845, 0.1216076687, -0.3350594938, -0.1262317002, 0.1116463989, -0.5079219341, 0.2845574319, 0.2100426555, -0.0693622008, 0.0497771949, -0.2698377073, -0.10881681, 0.1571920812, -0.0635255799, 0.2181335837, 0.2919233739, 0.1006836668, -0.0767321065, -0.3659602404, -0.2055689692, -0.0774676502, 0.3404679894, -0.4137085974, -0.2654785514, -0.1380372196, 0.3818379343, 0.251383245, -0.1123962626, -0.3306831121, -0.2146790028, 0.2353894711, 0.4945226908, 0.117196463, 0.1509264708, -0.1158697009, -0.001326426, 0.1205762774, -0.3492173553, -0.3686798811, -0.2633908391, -0.4776785672, 0.0790007263, -0.0042073908, 0.0857131332, 0.2334497571, 0.0129471188, 0.0899724737, -0.2458566129, -0.5565886497, -0.0041593094, -0.2848062217, 0.3493064642, 0.2681626976, 0.3941203058, -0.017751174, -0.1600651145, 0.3386488557, -0.4612849653, -0.245010525, 0.0826767609, -0.1957322806, 0.0095526632, -0.2275137454, -0.1870779395, 0.0804666802, -0.1823904663, 0.4641315937, 0.0746581703, -0.0986429378, -0.039105773, 0.2710893154, 0.1867851615, -0.0900552124, 0.0501330532, -0.1244104132, -0.2010655403, 0.4448418915, -0.1024018005, -0.346372962, 0.0103550376, 0.0043825917, 0.343703866, 0.2179703414, -0.2875933945, -0.1910872608, -0.1717972606, 0.4668476284, 0.1740092486, 0.2660770714, 0.5662257075, 0.1160820127, 0.0288579557, -0.2397855669, -0.269836694, 0.1398890465, 0.0620219037, 0.123361133, -0.1146315858, -0.0202976093, -0.060094174, 0.7015290856, 0.2194091082, 0.143310979, 0.2458658665, -0.1431446522, 0.040262159, -0.2635709047, -0.0018194596, 0.1594166607, 0.1043256149, 0.1012838557, 0.4308772385, -0.0101439944, -0.3055628836, -0.3132548034, 0.0514970608, -0.2744364142, -0.3873587549, -0.0785483196, 0.3216456175, 0.2337644845, -0.042273961, 0.020792136, -0.1473667026, -0.1888926625, 0.2636075914, 0.0485063195, -0.0017893012, 0.103202045, -0.173525691, -0.3677692115, -0.316965282, 0.0823123008, 0.1721155196, 0.2570377588, -0.0665051267, -0.1105390191, 0.231348291, -0.2317667156, 0.5387544036, -0.2662322819, 0.0727586299, 0.0955237523, 0.0072518326, -0.5380721092, -0.2452507764, -0.2579599917, -0.2703018785, -0.0064095478, 0.0428119749, -0.8047872186, -0.1370549649, 0.0025427742, 0.0652824044, 0.022476349, 0.0021821281, -0.3476671576, -0.3513226807, -0.2089855075, -0.3042516112, 0.0158095639, 0.1620872468, -0.2289927453, 0.0841264129, -0.1313246936, -0.0271122809, 0.0254173484, 0.4670745432, 0.0367713124, -0.1930949092, 0.0135712996, 0.2992077172, -0.3078334332, 0.2499616146, 0.3812300861, 0.3898446262, -0.3924273252, 0.075130038, 0.1768061668, 0.2352266163, 0.2457046658, -0.1128676459, 0.1488084495, -0.2493563145, 0.1089377254, -0.23147811, -0.0435923822, 0.6460391879, -0.1837124974, -0.4247301221, 0.1305992305, 0.4675742686, 0.1244365796, -0.0668820217, -0.084619619, 0.5950852633, -0.3703898191, 0.0306382682, 0.069213897, 0.8994731903, -0.08037626, 0.2363680452, 0.6777765751, -0.1762774438, 0.4314589798, -0.1319672167, 0.0896904469, -0.5020121932, 0.167998895, -0.1159753501, -0.020578498, 0.3543123305, -0.0853119791, -0.4229283035, 0.1149852425, 0.0423138961, 0.4126974344, 0.2536416352, 0.3395939469, 0.0222539697, -0.0871965736, -0.0327683389, 0.103479892, -0.1468590051, 0.3239007294, -0.1414455175, -0.2067803442, -0.1191478372, -0.39214167, -0.4757880569, -0.0012193569, -0.5666530132, 0.2706696391, 0.1667612344, -0.1066926643, 0.4281306565, -0.0930187628, 0.0278597828, -0.024059739, -0.5778465867, 0.2720611989, -0.2703413665, -0.3054290116, 0.0382399112, 0.0015377791, 0.1709764749, -0.2011301219, -0.4782135785, 0.1206075996, -0.1202966422, -0.1980055571, -0.2413235754, -0.2334801406, -0.1403303891, -0.1656486541, 0.2048703581, -0.0889703929, 0.1008685082, -0.164320752, 0.0706041008, -0.0845052078, -0.1225195453, 0.1858413219, 0.1371438652, 0.0163504332, -0.0627229437, 0.3350047767, -0.1525662094, 0.0187819302, 0.478348583, 0.1441949904, -0.1743830591, -0.3062950969, -0.127380833, 0.1637389809, -0.1946123689, -0.0876761973, 0.4245509207, -0.0416405462, 0.0999381691, 0.6526225805, 0.1358080506, -0.156856209, 0.029003093, -0.2108031958, -0.072233744, 0.4104577601, 0.0001245122, 0.3364675045, -0.1000610813, 0.3942659795, 0.1756132692, 0.0507488139, -0.2581933737, 0.1766732633, 0.1273926944, 0.0723767206, -0.028181009, -0.1699814647, 0.1859835684, 0.122822091, 0.1235014871, -0.023615595, -0.2789953947, -0.152510047, -0.0532414652, 0.1535166353, 0.2072380781, -0.1573554724, 0.1092612445, -0.0439140461, -0.004767199, -0.0857672468, 0.3785858452, 0.0532587953, -0.1712068766, 0.1584715694, 0.124528788, 0.0749544278, -0.2570695877, -0.0818344057, -0.1065371111, 0.0422274619, 0.1521184742, 0.1105316058, -0.2425278723, -0.069658123, 0.2371830642, 0.5027613044, -0.0046942253, 0.069708094, 0.241659686, -0.3728253543, -0.1401909888, -0.1293215901, 0.2363271117, 0.4021981359, -0.0301400498, -0.0339139029, 0.2486860752, 0.159804225, -0.1791618615, 0.0249482598, 0.7095754147, 0.0255399216, 0.1441785097, 0.1672735959, 0.1907718778, -0.2652098835, -0.2495255917, 0.0724358857, 0.2639097273, 0.1051284075, 0.0782728791, 0.4552576244, -0.0888003781, -0.0570246018, 0.1600899398, 0.0752013475, 0.1843456179, 0.2008950859, -0.3341519237, 0.0326518938, -0.2809028029, 0.2793219984, 0.3199022114, 0.1067883447, -0.2530280352, -0.0313563459, 0.0981714949, -0.1619110703, 0.0430847332, 0.4668076634, 0.1513280869, 0.0635984093, -0.4788582921, 0.1876887083, -0.1072025225, -0.1117437854, -0.0460620113, -0.2203000784, -0.0647181943, -0.1144329831, -0.1065221056, -0.3939555585, 0.4086519778, 0.1249429584, -0.0485959724, -0.440416187, 0.1932901293, 0.1125086993, 0.3823840916, 0.0976766944, 0.1988637745, 0.2222636193, -0.3799969554, -0.1416543126, 0.5052874088, 0.4059633613, 0.2238577455, -0.5180214643, -0.0117543172, -0.2111394256, -0.09813869, -0.1031869873, 0.256129235, 0.0835579783, 0.1160430536, 0.0260429531, 0.0627269596, -0.0898389667, -0.4097584784, -0.1104365885, 0.0061267288, -0.3029188216, 0.0790452212, -0.2354574203, -0.0238409936, 0.0639063343, -0.0892145708, -0.1156923324, -0.0091181248, 0.0319980495, 0.143607825, 0.0451711975, -0.163679406, 0.0443827324, 0.0875865817, 0.533072114, 0.2499722093, 0.2016885877, -0.1850212961, -0.1509504616, -0.2981626391, 0.1833938658, -0.3003625274, -0.0558604151, 0.0372361653, 0.2560043633, -0.186350897, 0.3407574594, 0.146100387, 0.2600636184, 0.0267323926, 0.2587116361, -0.1819265485, 0.1599327624, -0.17760171, -0.1843749285, -0.0919501856, -0.3208380938, 0.222916767, -0.3668421805, 0.0208827052, -0.1403075606, 0.4087250233, 0.0492092893, -0.4200239182, 0.4051319957, 0.4248368144, 0.4987820983, 0.0859794095, 0.0233916435, -0.4624235928, -0.2273350656, -0.3084006011, 0.0380229317, -0.1979132444, 0.4011147916, 0.0511555113, -0.2752498984, -0.0668680742, 0.2068608403, 0.1771451682, 0.1820496321, -0.0784901753, 0.1207777262, -0.050749857, 0.1081957892, -0.2183268666, 0.0959958509, -0.0026975384, -0.1745441109, -0.3816217184, -0.6334145069, 0.3339704275, -0.6409381628, -0.287540555, -0.1929619163, 0.1954268068, 0.0420683511, -0.2452953905, -0.4759140313, 0.1125754118, 0.1582615823, 0.1307858527, -0.3932455778, 0.2494202405, 0.1017887741, -0.1549134701, -0.0295702685, 0.3505801857, -0.0256109182, 0.0519903824, -0.092941314, -0.1061918586 ]
https://github.com/huggingface/datasets/issues/705
TypeError: '<' not supported between instances of 'NamedSplit' and 'NamedSplit'
Hi ! Thanks for reporting :) Indeed this is an issue on the `datasets` side. I'm creating a PR
## Environment info <!-- You can run the command `transformers-cli env` and copy-and-paste its output below. Don't forget to fill out the missing fields in that output! --> - `transformers` version: 3.3.1 (installed from master) - `datasets` version: 1.0.2 (installed as a dependency from transformers) - Platform: Linux-4.15.0-118-generic-x86_64-with-debian-stretch-sid - Python version: 3.7.9 I'm testing my own text classification dataset using [this example](https://github.com/huggingface/transformers/tree/master/examples/text-classification#run-generic-text-classification-script-in-tensorflow) from transformers. The dataset is split into train / dev / test, and in csv format, containing just a text and a label columns, using comma as sep. Here's a sample: ``` text,label "Registra-se a presença do acadêmico <name> . <REL_SEP> Ao me deparar com a descrição de dois autores no polo ativo da ação junto ao PJe , margem esquerda foi informado pela procuradora do reclamante que se trata de uma reclamação trabalhista individual . <REL_SEP> Diante disso , face a ausência injustificada do autor <name> , determina-se o ARQUIVAMENTO do presente processo , com relação a este , nos termos do [[ art . 844 da CLT ]] . <REL_SEP> CUSTAS AUTOR - DISPENSADO <REL_SEP> Custas pelo autor no importe de R $326,82 , calculadas sobre R $16.341,03 , dispensadas na forma da lei , em virtude da concessão dos benefícios da Justiça Gratuita , ora deferida . <REL_SEP> Cientes os presentes . <REL_SEP> Audiência encerrada às 8h42min . <REL_SEP> <name> <REL_SEP> Juíza do Trabalho <REL_SEP> Ata redigida por << <name> >> , Secretário de Audiência .",NO_RELATION ``` However, @Santosh-Gupta reported in #7351 that he had the exact same problem using the ChemProt dataset. His colab notebook is referenced in the following section. ## To reproduce Steps to reproduce the behavior: 1. Created a new conda environment using conda env -n transformers python=3.7 2. Cloned transformers master, `cd` into it and installed using pip install --editable . -r examples/requirements.txt 3. Installed tensorflow with `pip install tensorflow` 3. Ran `run_tf_text_classification.py` with the following parameters: ``` --train_file <DATASET_PATH>/train.csv \ --dev_file <DATASET_PATH>/dev.csv \ --test_file <DATASET_PATH>/test.csv \ --label_column_id 1 \ --model_name_or_path neuralmind/bert-base-portuguese-cased \ --output_dir <OUTPUT_PATH> \ --num_train_epochs 4 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --do_train \ --do_eval \ --do_predict \ --logging_steps 1000 \ --evaluate_during_training \ --save_steps 1000 \ --overwrite_output_dir \ --overwrite_cache ``` I have also copied [@Santosh-Gupta 's colab notebook](https://colab.research.google.com/drive/11APei6GjphCZbH5wD9yVlfGvpIkh8pwr?usp=sharing) as a reference. <!-- If you have code snippets, error messages, stack traces please provide them here as well. Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.--> Here is the stack trace: ``` 2020-10-02 07:33:41.622011: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1 /media/discoD/repositorios/transformers_pedro/src/transformers/training_args.py:333: FutureWarning: The `evaluate_during_training` argument is deprecated in favor of `evaluation_strategy` (which has more options) FutureWarning, 2020-10-02 07:33:43.471648: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcuda.so.1 2020-10-02 07:33:43.471791: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:43.472664: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties: pciBusID: 0000:01:00.0 name: GeForce GTX 1070 computeCapability: 6.1 coreClock: 1.7085GHz coreCount: 15 deviceMemorySize: 7.92GiB deviceMemoryBandwidth: 238.66GiB/s 2020-10-02 07:33:43.472684: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1 2020-10-02 07:33:43.472765: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10 2020-10-02 07:33:43.472809: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcufft.so.10 2020-10-02 07:33:43.472848: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcurand.so.10 2020-10-02 07:33:43.474209: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusolver.so.10 2020-10-02 07:33:43.474276: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusparse.so.10 2020-10-02 07:33:43.561219: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7 2020-10-02 07:33:43.561397: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:43.562345: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:43.563219: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0 2020-10-02 07:33:43.563595: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2020-10-02 07:33:43.570091: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 3591830000 Hz 2020-10-02 07:33:43.570494: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x560842432400 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-10-02 07:33:43.570511: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version 2020-10-02 07:33:43.570702: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:43.571599: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties: pciBusID: 0000:01:00.0 name: GeForce GTX 1070 computeCapability: 6.1 coreClock: 1.7085GHz coreCount: 15 deviceMemorySize: 7.92GiB deviceMemoryBandwidth: 238.66GiB/s 2020-10-02 07:33:43.571633: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1 2020-10-02 07:33:43.571645: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10 2020-10-02 07:33:43.571654: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcufft.so.10 2020-10-02 07:33:43.571664: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcurand.so.10 2020-10-02 07:33:43.571691: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusolver.so.10 2020-10-02 07:33:43.571704: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusparse.so.10 2020-10-02 07:33:43.571718: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7 2020-10-02 07:33:43.571770: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:43.572641: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:43.573475: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0 2020-10-02 07:33:47.139227: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix: 2020-10-02 07:33:47.139265: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263] 0 2020-10-02 07:33:47.139272: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0: N 2020-10-02 07:33:47.140323: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:47.141248: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:47.142085: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:47.142854: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5371 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1070, pci bus id: 0000:01:00.0, compute capability: 6.1) 2020-10-02 07:33:47.146317: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5608b95dc5c0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices: 2020-10-02 07:33:47.146336: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce GTX 1070, Compute Capability 6.1 10/02/2020 07:33:47 - INFO - __main__ - n_replicas: 1, distributed training: False, 16-bits training: False 10/02/2020 07:33:47 - INFO - __main__ - Training/evaluation parameters TFTrainingArguments(output_dir='/media/discoD/models/datalawyer/pedidos/transformers_tf', overwrite_output_dir=True, do_train=True, do_eval=True, do_predict=True, evaluate_during_training=True, evaluation_strategy=<EvaluationStrategy.STEPS: 'steps'>, prediction_loss_only=False, per_device_train_batch_size=4, per_device_eval_batch_size=4, per_gpu_train_batch_size=None, per_gpu_eval_batch_size=None, gradient_accumulation_steps=1, learning_rate=5e-05, weight_decay=0.0, adam_beta1=0.9, adam_beta2=0.999, adam_epsilon=1e-08, max_grad_norm=1.0, num_train_epochs=4.0, max_steps=-1, warmup_steps=0, logging_dir='runs/Oct02_07-33-43_user-XPS-8700', logging_first_step=False, logging_steps=1000, save_steps=1000, save_total_limit=None, no_cuda=False, seed=42, fp16=False, fp16_opt_level='O1', local_rank=-1, tpu_num_cores=None, tpu_metrics_debug=False, debug=False, dataloader_drop_last=False, eval_steps=1000, dataloader_num_workers=0, past_index=-1, run_name='/media/discoD/models/datalawyer/pedidos/transformers_tf', disable_tqdm=False, remove_unused_columns=True, label_names=None, load_best_model_at_end=False, metric_for_best_model=None, greater_is_better=False, tpu_name=None, xla=False) 10/02/2020 07:33:53 - INFO - filelock - Lock 140407857405776 acquired on /home/user/.cache/huggingface/datasets/e0f1e9ed46db1e2429189f06b479cbd4075c0976104c1aacf8f77d9a53d2ad87.03756fef6da334f50a7ff73608e21b5018229944ca250416ce7352e25d84a552.py.lock 10/02/2020 07:33:53 - INFO - filelock - Lock 140407857405776 released on /home/user/.cache/huggingface/datasets/e0f1e9ed46db1e2429189f06b479cbd4075c0976104c1aacf8f77d9a53d2ad87.03756fef6da334f50a7ff73608e21b5018229944ca250416ce7352e25d84a552.py.lock Using custom data configuration default Traceback (most recent call last): File "run_tf_text_classification.py", line 283, in <module> main() File "run_tf_text_classification.py", line 222, in main max_seq_length=data_args.max_seq_length, File "run_tf_text_classification.py", line 43, in get_tfds ds = datasets.load_dataset("csv", data_files=files) File "/media/discoD/anaconda3/envs/transformers/lib/python3.7/site-packages/datasets/load.py", line 604, in load_dataset **config_kwargs, File "/media/discoD/anaconda3/envs/transformers/lib/python3.7/site-packages/datasets/builder.py", line 158, in __init__ **config_kwargs, File "/media/discoD/anaconda3/envs/transformers/lib/python3.7/site-packages/datasets/builder.py", line 269, in _create_builder_config for key in sorted(data_files.keys()): TypeError: '<' not supported between instances of 'NamedSplit' and 'NamedSplit' ``` ## Expected behavior Should be able to run the text-classification example as described in [https://github.com/huggingface/transformers/tree/master/examples/text-classification#run-generic-text-classification-script-in-tensorflow](https://github.com/huggingface/transformers/tree/master/examples/text-classification#run-generic-text-classification-script-in-tensorflow) Originally opened this issue at transformers' repository: [https://github.com/huggingface/transformers/issues/7535](https://github.com/huggingface/transformers/issues/7535). @jplu instructed me to open here, since according to [this](https://github.com/huggingface/transformers/issues/7535#issuecomment-702778885) evidence, the problem is from datasets. Thanks!
19
TypeError: '<' not supported between instances of 'NamedSplit' and 'NamedSplit' ## Environment info <!-- You can run the command `transformers-cli env` and copy-and-paste its output below. Don't forget to fill out the missing fields in that output! --> - `transformers` version: 3.3.1 (installed from master) - `datasets` version: 1.0.2 (installed as a dependency from transformers) - Platform: Linux-4.15.0-118-generic-x86_64-with-debian-stretch-sid - Python version: 3.7.9 I'm testing my own text classification dataset using [this example](https://github.com/huggingface/transformers/tree/master/examples/text-classification#run-generic-text-classification-script-in-tensorflow) from transformers. The dataset is split into train / dev / test, and in csv format, containing just a text and a label columns, using comma as sep. Here's a sample: ``` text,label "Registra-se a presença do acadêmico <name> . <REL_SEP> Ao me deparar com a descrição de dois autores no polo ativo da ação junto ao PJe , margem esquerda foi informado pela procuradora do reclamante que se trata de uma reclamação trabalhista individual . <REL_SEP> Diante disso , face a ausência injustificada do autor <name> , determina-se o ARQUIVAMENTO do presente processo , com relação a este , nos termos do [[ art . 844 da CLT ]] . <REL_SEP> CUSTAS AUTOR - DISPENSADO <REL_SEP> Custas pelo autor no importe de R $326,82 , calculadas sobre R $16.341,03 , dispensadas na forma da lei , em virtude da concessão dos benefícios da Justiça Gratuita , ora deferida . <REL_SEP> Cientes os presentes . <REL_SEP> Audiência encerrada às 8h42min . <REL_SEP> <name> <REL_SEP> Juíza do Trabalho <REL_SEP> Ata redigida por << <name> >> , Secretário de Audiência .",NO_RELATION ``` However, @Santosh-Gupta reported in #7351 that he had the exact same problem using the ChemProt dataset. His colab notebook is referenced in the following section. ## To reproduce Steps to reproduce the behavior: 1. Created a new conda environment using conda env -n transformers python=3.7 2. Cloned transformers master, `cd` into it and installed using pip install --editable . -r examples/requirements.txt 3. Installed tensorflow with `pip install tensorflow` 3. Ran `run_tf_text_classification.py` with the following parameters: ``` --train_file <DATASET_PATH>/train.csv \ --dev_file <DATASET_PATH>/dev.csv \ --test_file <DATASET_PATH>/test.csv \ --label_column_id 1 \ --model_name_or_path neuralmind/bert-base-portuguese-cased \ --output_dir <OUTPUT_PATH> \ --num_train_epochs 4 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --do_train \ --do_eval \ --do_predict \ --logging_steps 1000 \ --evaluate_during_training \ --save_steps 1000 \ --overwrite_output_dir \ --overwrite_cache ``` I have also copied [@Santosh-Gupta 's colab notebook](https://colab.research.google.com/drive/11APei6GjphCZbH5wD9yVlfGvpIkh8pwr?usp=sharing) as a reference. <!-- If you have code snippets, error messages, stack traces please provide them here as well. Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.--> Here is the stack trace: ``` 2020-10-02 07:33:41.622011: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1 /media/discoD/repositorios/transformers_pedro/src/transformers/training_args.py:333: FutureWarning: The `evaluate_during_training` argument is deprecated in favor of `evaluation_strategy` (which has more options) FutureWarning, 2020-10-02 07:33:43.471648: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcuda.so.1 2020-10-02 07:33:43.471791: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:43.472664: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties: pciBusID: 0000:01:00.0 name: GeForce GTX 1070 computeCapability: 6.1 coreClock: 1.7085GHz coreCount: 15 deviceMemorySize: 7.92GiB deviceMemoryBandwidth: 238.66GiB/s 2020-10-02 07:33:43.472684: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1 2020-10-02 07:33:43.472765: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10 2020-10-02 07:33:43.472809: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcufft.so.10 2020-10-02 07:33:43.472848: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcurand.so.10 2020-10-02 07:33:43.474209: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusolver.so.10 2020-10-02 07:33:43.474276: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusparse.so.10 2020-10-02 07:33:43.561219: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7 2020-10-02 07:33:43.561397: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:43.562345: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:43.563219: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0 2020-10-02 07:33:43.563595: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2020-10-02 07:33:43.570091: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 3591830000 Hz 2020-10-02 07:33:43.570494: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x560842432400 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-10-02 07:33:43.570511: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version 2020-10-02 07:33:43.570702: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:43.571599: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties: pciBusID: 0000:01:00.0 name: GeForce GTX 1070 computeCapability: 6.1 coreClock: 1.7085GHz coreCount: 15 deviceMemorySize: 7.92GiB deviceMemoryBandwidth: 238.66GiB/s 2020-10-02 07:33:43.571633: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1 2020-10-02 07:33:43.571645: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10 2020-10-02 07:33:43.571654: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcufft.so.10 2020-10-02 07:33:43.571664: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcurand.so.10 2020-10-02 07:33:43.571691: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusolver.so.10 2020-10-02 07:33:43.571704: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusparse.so.10 2020-10-02 07:33:43.571718: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7 2020-10-02 07:33:43.571770: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:43.572641: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:43.573475: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0 2020-10-02 07:33:47.139227: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix: 2020-10-02 07:33:47.139265: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263] 0 2020-10-02 07:33:47.139272: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0: N 2020-10-02 07:33:47.140323: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:47.141248: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:47.142085: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-10-02 07:33:47.142854: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5371 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1070, pci bus id: 0000:01:00.0, compute capability: 6.1) 2020-10-02 07:33:47.146317: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5608b95dc5c0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices: 2020-10-02 07:33:47.146336: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce GTX 1070, Compute Capability 6.1 10/02/2020 07:33:47 - INFO - __main__ - n_replicas: 1, distributed training: False, 16-bits training: False 10/02/2020 07:33:47 - INFO - __main__ - Training/evaluation parameters TFTrainingArguments(output_dir='/media/discoD/models/datalawyer/pedidos/transformers_tf', overwrite_output_dir=True, do_train=True, do_eval=True, do_predict=True, evaluate_during_training=True, evaluation_strategy=<EvaluationStrategy.STEPS: 'steps'>, prediction_loss_only=False, per_device_train_batch_size=4, per_device_eval_batch_size=4, per_gpu_train_batch_size=None, per_gpu_eval_batch_size=None, gradient_accumulation_steps=1, learning_rate=5e-05, weight_decay=0.0, adam_beta1=0.9, adam_beta2=0.999, adam_epsilon=1e-08, max_grad_norm=1.0, num_train_epochs=4.0, max_steps=-1, warmup_steps=0, logging_dir='runs/Oct02_07-33-43_user-XPS-8700', logging_first_step=False, logging_steps=1000, save_steps=1000, save_total_limit=None, no_cuda=False, seed=42, fp16=False, fp16_opt_level='O1', local_rank=-1, tpu_num_cores=None, tpu_metrics_debug=False, debug=False, dataloader_drop_last=False, eval_steps=1000, dataloader_num_workers=0, past_index=-1, run_name='/media/discoD/models/datalawyer/pedidos/transformers_tf', disable_tqdm=False, remove_unused_columns=True, label_names=None, load_best_model_at_end=False, metric_for_best_model=None, greater_is_better=False, tpu_name=None, xla=False) 10/02/2020 07:33:53 - INFO - filelock - Lock 140407857405776 acquired on /home/user/.cache/huggingface/datasets/e0f1e9ed46db1e2429189f06b479cbd4075c0976104c1aacf8f77d9a53d2ad87.03756fef6da334f50a7ff73608e21b5018229944ca250416ce7352e25d84a552.py.lock 10/02/2020 07:33:53 - INFO - filelock - Lock 140407857405776 released on /home/user/.cache/huggingface/datasets/e0f1e9ed46db1e2429189f06b479cbd4075c0976104c1aacf8f77d9a53d2ad87.03756fef6da334f50a7ff73608e21b5018229944ca250416ce7352e25d84a552.py.lock Using custom data configuration default Traceback (most recent call last): File "run_tf_text_classification.py", line 283, in <module> main() File "run_tf_text_classification.py", line 222, in main max_seq_length=data_args.max_seq_length, File "run_tf_text_classification.py", line 43, in get_tfds ds = datasets.load_dataset("csv", data_files=files) File "/media/discoD/anaconda3/envs/transformers/lib/python3.7/site-packages/datasets/load.py", line 604, in load_dataset **config_kwargs, File "/media/discoD/anaconda3/envs/transformers/lib/python3.7/site-packages/datasets/builder.py", line 158, in __init__ **config_kwargs, File "/media/discoD/anaconda3/envs/transformers/lib/python3.7/site-packages/datasets/builder.py", line 269, in _create_builder_config for key in sorted(data_files.keys()): TypeError: '<' not supported between instances of 'NamedSplit' and 'NamedSplit' ``` ## Expected behavior Should be able to run the text-classification example as described in [https://github.com/huggingface/transformers/tree/master/examples/text-classification#run-generic-text-classification-script-in-tensorflow](https://github.com/huggingface/transformers/tree/master/examples/text-classification#run-generic-text-classification-script-in-tensorflow) Originally opened this issue at transformers' repository: [https://github.com/huggingface/transformers/issues/7535](https://github.com/huggingface/transformers/issues/7535). @jplu instructed me to open here, since according to [this](https://github.com/huggingface/transformers/issues/7535#issuecomment-702778885) evidence, the problem is from datasets. Thanks! Hi ! Thanks for reporting :) Indeed this is an issue on the `datasets` side. I'm creating a PR
[ -0.2919270992, -0.6131456494, -0.0538777038, 0.0724286214, 0.53585428, 0.0512855202, 0.5790147185, 0.3014276326, 0.2885265648, 0.1793081611, -0.0349087976, 0.1695186496, -0.0423111692, -0.1191876456, -0.1670348197, -0.2730586529, -0.1069537178, 0.1412786543, -0.4372421205, -0.0667977035, 0.0061710826, 0.1115164831, -0.3358642459, 0.0874109566, -0.3546171784, -0.1470187902, 0.1937070787, 0.0334142968, 0.1056335419, -0.3845273554, 0.3663170934, -0.0270780586, 0.171062842, 0.4915068746, -0.0001042778, 0.0813111663, 0.4950876236, -0.1381200105, -0.0701588541, -0.3430441916, -0.4419640303, 0.0307983682, 0.0160503052, -0.3915827572, -0.2448374778, -0.011036125, -0.1189133301, -0.0461346246, 0.6161754727, 0.278801918, 0.239765048, 0.2381774932, -0.1034502164, -0.3372360468, -0.1007004231, 0.3406430483, -0.1360170394, -0.1092183143, 0.1256229728, -0.2894224823, -0.0251129773, 0.2308778614, 0.0032399022, -0.0891660824, 0.3362297714, 0.1266873181, -0.1719469279, 0.0904839039, 0.0127496617, 0.2484526932, 0.3977200091, -0.191259101, -0.201420784, -0.1912941337, -0.4447489977, -0.3844890296, 0.0586855114, 0.040577773, 0.0833992958, 0.2616134584, -0.0061037284, 0.4328716397, -0.2141650468, -0.1010655239, 0.0205577463, 0.5832353234, -0.1706665307, 0.0971069857, 0.0810637102, -0.0337574407, 0.1662236601, -0.1250211149, 0.2540242374, 0.0342851132, -0.2468907386, -0.0123800384, -0.0421413593, -0.4438534677, -0.2144874185, -0.12169303, 0.2729996741, -0.0499449447, 0.0718224645, 0.2486000061, 0.1498120725, 0.2958031595, 0.091167897, 0.5375276208, 0.2819210589, 0.3849363625, -0.0427864008, -0.1365969032, -0.1424743831, -0.1585972458, -0.0144827329, 0.4171224236, 0.0576644428, -0.1039040759, -0.3025502861, -0.2212818265, 0.030903643, -0.0660281181, -0.0246453881, 0.4157521725, -0.0416243784, 0.3547723293, 0.2065986991, 0.0611957833, -0.0000108489, -0.1164430678, -0.1507170498, 0.1743427813, -0.3866128027, -0.2293416858, -0.0172502417, 0.260692209, 0.0060740476, -0.1308668107, -0.0839578807, -0.0662649125, -0.0675454214, 0.0104777003, 0.038608212, 0.2141882926, -0.1814565659, 0.1716784835, 0.1413981318, -0.1428926587, -0.0168801732, 0.2545796037, -0.0376724154, -0.2689931095, 0.0494650193, 0.1983074993, 0.0924027115, 0.0822202787, 0.0646614879, 0.1997675747, 0.2888108194, -0.0023920978, 0.0389886498, 0.0640593097, -0.1613369584, 0.1434037834, 0.0981706753, 0.3937545717, -0.7670516372, -0.2362778038, -0.0231546964, 0.0841977596, -0.0441102199, 0.4377834499, -0.3081967533, 0.254884392, 0.1809001863, 0.2804787755, 0.1315831989, -0.4054881632, -0.2366539836, -0.0511297099, 0.062355984, -0.1371806264, 0.1976589859, -0.1599786729, -0.0393889993, -0.2148528546, -0.273199439, 0.1258900315, -0.0372626632, 0.0372505225, -0.3978557587, -0.0586486869, 0.1387394071, 0.0166067723, 0.090849258, -0.0245048814, -0.006774643, 0.5229412913, 0.1247484758, -0.3379054964, 0.1744472235, 0.2543299198, 0.062606737, 0.2155822664, 0.0188986845, -0.2434891313, -0.2023968101, 0.1049193442, -0.026095422, 0.3419175446, -0.2349474728, -0.1734547466, -0.4128477573, 0.0400042534, 0.0303187203, -0.1581600308, 0.181701228, 0.0163612925, 0.056210313, -0.1548791379, 0.0504411049, 0.085031651, -0.0169341732, 0.1152147129, -0.3652016222, 0.205052197, -0.2516759932, -0.0821668059, -0.1260560155, 0.2088721246, 0.2595393956, -0.2008835226, -0.1568626165, 0.3399887383, -0.2882198393, 0.1538384855, -0.3089925647, -0.0751827657, 0.2699450254, -0.4763705432, 0.0024341817, 0.1310061514, 0.0902319625, -0.0006721361, -0.4511059523, 0.1370696425, 0.0112842452, 0.1648833007, 0.1284328252, 0.0007872548, 0.1388460398, -0.183219865, -0.0573630072, -0.107290782, -0.0001400013, 0.1755350381, -0.2161806673, 0.063744247, -0.1466741711, -0.1216331348, 0.4897303581, -0.0830697715, 0.2121409029, -0.0066709113, -0.2014054209, 0.1740380973, 0.0147639001, 0.2376895696, 0.1019209996, 0.1063607559, -0.1818088144, 0.1594490558, -0.1297111511, -0.1348221302, 0.1366054118, 0.1401499957, 0.1842845976, 0.0474024229, -0.0023742516, 0.0637104884, 0.000199183, -0.3237719536, 0.0035915922, 0.0375335477, -0.2615194619, 0.1092323437, -0.2121474743, -0.1581650972, -0.2769758403, 0.2413601875, 0.1923744082, -0.0711505711, -0.0779946223, 0.0264963694, -0.2088046074, 0.3075108528, 0.1213720664, 0.2280255556, 0.2589329481, -0.1669288874, -0.1522791237, -0.3805862665, -0.1148756891, 0.1299656928, 0.1442117393, 0.1163033992, -0.0103832306, 0.081119597, 0.0132964151, 0.4569862783, -0.5159243345, 0.0750538483, -0.3149310946, -0.2156138271, -0.000807885, -0.0266429931, 0.0513777472, -0.1849368215, 0.336188674, -0.1817682385, 0.0587969795, -0.0685047582, 0.1174617037, -0.2828928232, -0.1832378954, -0.6926161647, -0.2156875581, -0.4069217741, 0.2902896404, -0.1129136607, -0.1000651047, 0.4519681931, -0.0414589569, -0.1367301792, 0.2323184162, -0.0375303403, 0.0842412934, 0.2739645541, 0.3995572031, -0.1479193717, -0.3361205459, -0.037800964, -0.163522765, 0.0331598371, -0.2620621622, -0.1347198635, -0.0583054572, -0.2712891102, -0.1474149078, 0.151256904, -0.1404375285, 0.61179775, 0.1744675189, -0.1556133777, -0.1580144614, -0.4322291017, 0.214977771, 0.0620989278, 0.0518931262, -0.0564926416, 0.5008734465, 0.1867363304, 0.6495125294, 0.0560511947, -0.1962002665, -0.0095484592, 0.153027907, 0.0647750497, -0.0284664501, -0.2616335452, 0.0940554589, -0.1156797409, -0.1356903166, 0.1677750796, -0.1896721125, -0.1575723439, -0.1722390801, 0.1542974263, -0.077299282, -0.0894061998, 0.1257667542, 0.1191694736, 0.2297198921, 0.142050758, -0.0787233487, -0.1065653116, -0.1022994891, 0.0964337662, -0.0871651396, -0.1488742083, -0.0652408376, -0.3501499891, 0.2422759682, -0.1469797492, 0.2825858891, 0.2371598035, 0.1074168757, -0.2071239501, -0.1536873877, -0.2497840375, 0.0146522243, 0.1408587992, -0.311014533, 0.1866849959, 0.1122650877, -0.0809813216, -0.1901673973, -0.2099331319, -0.3738396764, -0.2987177074, 0.4538381994, 0.2226491123, -0.1857834607, -0.1639237255, 0.2885844409, -0.1199198589, -0.0421013087, -0.0668200925, -0.0768559352, 0.0182460211, -0.2515263557, -0.0107609397, 0.5364024639, 0.2025129646, -0.2095841467, -0.044420898, 0.0943265781, -0.2034687102, 0.0882901773, 0.2573610246, 0.136169225, -0.1558402032, -0.0760446042, 0.1248811558, 0.2837220132, -0.3310799897, 0.5674954653, -0.0255847275, -0.4515458643, 0.0420375206, -0.0200553332, 0.1364636421, 0.1572535336, -0.0916862711, -0.0461932383, 0.1043341979, 0.0756741911, -0.324071914, 0.118002668, 0.1891413927, 0.3833043873, -0.4595751464, -0.2022819966, 0.1838430166, 0.0292728599, -0.0668436885, -0.0761145875, -0.1605713218, -0.4441315234, 0.3648701906, 0.046194829, 0.8255495429, -0.1720341146, -0.0274052508, -0.2060128599, 0.1214446798, 0.540117979, -0.4126564264, 0.2696085274, -0.2367253751, -0.3283508122, -0.1095914543, -0.0516981706, 0.3606873155, 0.4803794324, -0.3971681893, 0.2573061883, 0.1032195687, 0.5092790127, 0.0648843497, 0.1364058554, 0.4459849894, -0.3245067596, -0.2694646418, 0.1508012116, 0.0748466328, 0.0509602688, 0.0084982058, -0.2146800458, -0.2909614146, -0.1904338747, -0.3185828626, 0.3504787087, -0.2043993026, 0.0957832709, 0.2979165018, 0.0655588359, 0.4973451495, 0.3372201025, 0.3578669727, 0.2304676175, -0.2153192163, 0.2350308001, -0.4642544389, -0.0610617436, 0.0088660708, 0.2516066432, 0.2278990895, 0.0168936066, -0.1576445699, 0.1514526606, -0.0659208447, -0.2392917871, -0.0809609815, 0.0206164513, 0.2474822849, -0.5286827683, 0.0103747565, 0.1242394596, -0.2633695304, -0.2806584835, 0.2036950439, -0.3791151643, -0.1899058223, 0.1543290317, 0.1162809134, -0.2372895777, 0.0348869376, 0.3466537297, 0.0076456438, 0.2065517902, 0.2748654485, 0.1189157069, -0.1234723181, -0.2976979017, -0.1585626155, 0.217670396, -0.5927740335, 0.0982700437, -0.2696889937, -0.4663752913, 0.1216227636, 0.4874916673, 0.321831733, 0.1377171725, -0.1893444657, -0.4025090337, -0.2644131482, 0.0103747277, 0.1245826334, 0.2435662448, 0.1476765871, 0.6597265005, 0.0173823293, 0.0904993564, -0.3986142874, -0.2800247967, -0.14788118, 0.2958531082, 0.3108176589, -0.3957283497, 0.3502091467, -0.0701563358, 0.1842742413, 0.4157313704, -0.2173073441, -0.2901489139, -0.0977177992, 0.0736078247, 0.1292787045, -0.2479224652, -0.2928442061, 0.070548445, 0.073815316, -0.3057260215, 0.0603410937, 0.0323535651, -0.0002617271, 0.3716010153, -0.2391617, 0.1032217965, -0.1942330599, -0.1802101433, -0.1308958977, 0.2095949203, 0.0564003326, 0.081795983, 0.2029104382, -0.0294599421, -0.4282604456, 0.0897557661, 0.2320590317, 0.2600226998, 0.3225410879, -0.3676285446, -0.0552807376, 0.172619015, 0.562605679, 0.0809191167, -0.1066216379, 0.0329809785, -0.0473478697, 0.2685661018, -0.3096593022, 0.2288382202, -0.0930915847, 0.0677611083, 0.2696630061, 0.2911012769, 0.2975103855, -0.0638442636, 0.4036652446, 0.267765969, 0.5184588432, -0.4800507724, 0.3569116294, 0.5745406747, 0.1697938144, 0.1794570386, 0.3768186867, -0.0295522679, 0.3553951383, 0.5121094584, 0.205448404, 0.1787362546, 0.0035346271, 0.1895808578, 0.0774412677, -0.1531181931, 0.091053836, 0.0856942534, -0.1319064349, 0.0842483938, -0.2042767256, 0.3030062914, -0.3348994553, -0.0643553436, -0.1378065497, 0.0549415685, -0.2147031277, -0.2030393034, 0.1460201144, 0.0916061178, -0.0967575163, -0.1491555572, 0.1459881961, 0.2719102502, 0.3311922848, -0.2415809184, 0.0113694193, -0.1865368038, -0.1872024983, -0.0229184348, 0.3771428764, -0.2421435714, 0.3255567551, 0.1919578761, -0.2189379483, -0.0256017447, 0.3311003745, 0.3879541159, 0.34621346, -0.0973592922, -0.0188500397, -0.1468134373, -0.2428475171, 0.1603182852, 0.2904382944, 0.1453941166, 0.1796868593, 0.2034575194, 0.1824687272, -0.2012609988, 0.2441808432, -0.0453377254, 0.0992115363, 0.0013041678, 0.0638234839, 0.0748212636, -0.0474864542, -0.0048635458, 0.040755678, -0.3722771704, -0.0838894621, 0.3647337556, -0.277628094, 0.4735962749, -0.0817337036, 0.1044070199, 0.0357250534, 0.3190371394, -0.0509205647, -0.2098563612, -0.2205787748, 0.0366849154, -0.2461580783, -0.0787132755, 0.087147221, -0.2164679319, -0.2482388616, 0.0417578891, 0.1564619541, 0.0311662201, -0.1432106048, -0.3156920075, 0.0100357635, -0.0800713077, -0.1900778562, -0.112389639, 0.0135461008, 0.0193591602, 0.2289907187, -0.2942387462, -0.0722256675, 0.4261686802, 0.0742082596, -0.4140973091, -0.0033795724, -0.0250944067, 0.2368593663, 0.1539557576, 0.0973190442, 0.5690985322, -0.222318247, 0.1948464811, -0.0771341026, -0.3015598655, -0.1696512997, 0.2426598519, 0.3290063739, 0.3649007976, -0.1513297558, 0.1434555054, -0.2218806148, -0.1535742134, 0.0497781895, -0.2138113976, -0.2299727052, -0.0495053604, -0.2060346901, -0.061499387, 0.1562587768, 0.2371855974, 0.0235219523, -0.0085254814, -0.1814302206, -0.5764251947, 0.4325291812, -0.3074938655, -0.4217504263, 0.1196534187, -0.0462137274, 0.2443117946, 0.0112835644, -0.4401857853, 0.0656879693, 0.2044554204, -0.026073968, -0.2218870074, 0.058609698, 0.1953355074, -0.0228521004, -0.0969519541, 0.2508561015, 0.1856727451, -0.079318516, -0.0641223341, -0.195084855 ]
https://github.com/huggingface/datasets/issues/699
XNLI dataset is not loading
also i tried below code to solve checksum error `datasets-cli test ./datasets/xnli --save_infos --all_configs` and it shows ``` 2020-10-02 07:06:16.588760: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1 Traceback (most recent call last): File "/opt/conda/lib/python3.7/site-packages/datasets/load.py", line 268, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 308, in cached_path use_etag=download_config.use_etag, File "/opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 474, in get_from_cache raise FileNotFoundError("Couldn't find file at {}".format(url)) FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/./datasets/xnli/xnli.py During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/conda/lib/python3.7/site-packages/datasets/load.py", line 279, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 308, in cached_path use_etag=download_config.use_etag, File "/opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 474, in get_from_cache raise FileNotFoundError("Couldn't find file at {}".format(url)) FileNotFoundError: Couldn't find file at https://s3.amazonaws.com/datasets.huggingface.co/datasets/datasets/./datasets/xnli/xnli.py During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/conda/bin/datasets-cli", line 36, in <module> service.run() File "/opt/conda/lib/python3.7/site-packages/datasets/commands/test.py", line 76, in run module_path, hash = prepare_module(path) File "/opt/conda/lib/python3.7/site-packages/datasets/load.py", line 283, in prepare_module combined_path, github_file_path, file_path FileNotFoundError: Couldn't find file locally at ./datasets/xnli/xnli.py, or remotely at https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/./datasets/xnli/xnli.py or https://s3.amazonaws.com/datasets.huggingface.co/datasets/datasets/./datasets/xnli/xnli.py ```
`dataset = datasets.load_dataset(path='xnli')` showing below error ``` /opt/conda/lib/python3.7/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: ['https://www.nyu.edu/projects/bowman/xnli/XNLI-1.0.zip'] ``` I think URL is now changed to "https://cims.nyu.edu/~sbowman/xnli/XNLI-MT-1.0.zip"
170
XNLI dataset is not loading `dataset = datasets.load_dataset(path='xnli')` showing below error ``` /opt/conda/lib/python3.7/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: ['https://www.nyu.edu/projects/bowman/xnli/XNLI-1.0.zip'] ``` I think URL is now changed to "https://cims.nyu.edu/~sbowman/xnli/XNLI-MT-1.0.zip" also i tried below code to solve checksum error `datasets-cli test ./datasets/xnli --save_infos --all_configs` and it shows ``` 2020-10-02 07:06:16.588760: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1 Traceback (most recent call last): File "/opt/conda/lib/python3.7/site-packages/datasets/load.py", line 268, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 308, in cached_path use_etag=download_config.use_etag, File "/opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 474, in get_from_cache raise FileNotFoundError("Couldn't find file at {}".format(url)) FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/./datasets/xnli/xnli.py During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/conda/lib/python3.7/site-packages/datasets/load.py", line 279, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 308, in cached_path use_etag=download_config.use_etag, File "/opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 474, in get_from_cache raise FileNotFoundError("Couldn't find file at {}".format(url)) FileNotFoundError: Couldn't find file at https://s3.amazonaws.com/datasets.huggingface.co/datasets/datasets/./datasets/xnli/xnli.py During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/conda/bin/datasets-cli", line 36, in <module> service.run() File "/opt/conda/lib/python3.7/site-packages/datasets/commands/test.py", line 76, in run module_path, hash = prepare_module(path) File "/opt/conda/lib/python3.7/site-packages/datasets/load.py", line 283, in prepare_module combined_path, github_file_path, file_path FileNotFoundError: Couldn't find file locally at ./datasets/xnli/xnli.py, or remotely at https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/./datasets/xnli/xnli.py or https://s3.amazonaws.com/datasets.huggingface.co/datasets/datasets/./datasets/xnli/xnli.py ```
[ -0.2810516655, 0.1401007622, -0.0911716521, 0.1260451227, 0.2266674936, -0.2409972101, 0.3072920442, 0.4281841815, 0.0896518901, -0.0614525452, -0.0190946534, 0.4737130702, 0.1864164472, 0.1176806763, 0.1495383084, 0.2195383608, 0.0383551307, 0.0943840072, -0.0668893307, -0.1008861437, -0.2314462364, 0.0685328245, -0.2965810299, -0.1154324189, -0.083784245, 0.1186984554, 0.2151539922, 0.2002559304, -0.0664989725, -0.2786805928, 0.3651866019, -0.0079630846, 0.2631488144, 0.2762708962, -0.0001126595, 0.2332448214, 0.3754191399, -0.1614188701, -0.4101258218, -0.0952014998, -0.4924983084, -0.1245006099, -0.1306751966, -0.260287106, 0.1164862067, 0.0614712834, -0.0578306243, -0.1681257486, -0.0545165315, 0.4935921133, 0.1621233374, 0.5488840938, 0.2709942758, 0.2150414586, -0.06741561, -0.301749438, 0.0076500201, 0.4067319632, 0.3300506175, 0.0149237886, 0.0557067022, 0.1214364022, -0.0206640754, 0.0008890303, 0.1580748707, -0.1624352336, 0.2153963745, -0.0836898834, 0.0030177319, 0.204847157, 0.3979780078, -0.1201245859, -0.415107429, 0.1187438667, 0.06175033, -0.1697448939, 0.4212928414, 0.1787168235, -0.315842241, -0.1220313907, -0.3779916465, -0.0248489436, -0.1757711768, 0.3431749642, -0.0073399837, 0.4367715716, -0.0140382852, 0.0259259697, 0.0205366444, -0.0988187939, 0.2914392948, -0.0606682077, 0.0233035702, 0.1861114204, -0.698697865, 0.0651395544, -0.0342230573, -0.0879540741, 0.1597486436, 0.3959400952, 0.3262368441, 0.0806984976, -0.2925150394, 0.1523523182, -0.1719447225, 0.3871064782, 0.1406882554, 0.0790465698, 0.2752796113, 0.2361997664, -0.0131361214, 0.0545629226, -0.3000188172, -0.1971393973, -0.0815355703, 0.038895756, 0.140114665, -0.2044802606, -0.2629956901, 0.0759373903, -0.0784604773, -0.1383799165, 0.4358339906, 0.469456315, -0.3208738863, 0.2498870343, 0.0098448489, 0.0181954615, -0.0383258536, -0.1316920221, -0.149362728, 0.0716691539, -0.2305676937, -0.0721811727, 0.2829674482, -0.3151512742, 0.4981710613, -0.1555375904, -0.1146095321, -0.3088401556, 0.0614725575, 0.0018760065, -0.040458329, 0.242890209, -0.0249700341, -0.0332091115, 0.0729535371, -0.0030838458, -0.0557515137, 0.1683818102, -0.3589117229, -0.2988476753, -0.054513447, 0.207337752, -0.1995876431, -0.191633001, -0.0024798941, -0.4883226752, 0.0660806745, -0.0477589779, -0.1237209663, -0.2153944224, -0.0667612776, -0.2090399414, 0.5407056212, 0.1293573827, -0.3490070105, 0.051649332, -0.1369035244, -0.0557791851, 0.096406281, 0.2605537772, -0.1590192914, 0.3728074729, -0.340356797, -0.1178917438, 0.5776913762, -0.4762928784, -0.4399244785, 0.2114344686, -0.1018753722, 0.0079041868, -0.1255787164, 0.2523785233, -0.1356549859, -0.0352004059, 0.0137478299, 0.2980306745, 0.1415855736, 0.1215580851, -0.2224129587, -0.2473592609, 0.1558613926, 0.3051368594, 0.0188245736, 0.1345295459, -0.0449266247, 0.0668575987, 0.3322266042, -0.0833624527, -0.0464373827, 0.2214964032, 0.4732955396, -0.0393513143, 0.0370530151, -0.0048491992, -0.4131314456, 0.3650055826, -0.0015585826, -0.0114365136, -0.0650833175, 0.1789067239, -0.3976845145, -0.0245589782, -0.3283422291, -0.106268391, 0.0848120898, 0.2809493244, 0.137761727, 0.0063051688, -0.3725923896, 0.2817599773, -0.8748971224, 0.0456381291, -0.4280192256, 0.4332664609, 0.0865833387, -0.0375142656, 0.0658050105, 0.2386030555, -0.1012095064, -0.2264588177, -0.3001841307, 0.3219578266, -0.0343309492, -0.0100149494, 0.2217052579, 0.1605622172, 0.0023728739, -0.3698914647, 0.0630576089, 0.1883188933, 0.0396236144, -0.0004496721, -0.0576060265, 0.2553060055, -0.1893203259, -0.0278980359, 0.1662322432, 0.0318160839, 0.4790482521, -0.3187071383, -0.0347365215, -0.1404662728, 0.2331357598, 0.3000882566, 0.6040130258, 0.1275440305, -0.0661314279, -0.227305606, 0.3051784337, 0.0821916312, -0.101603888, 0.1684036106, 0.0007086686, 0.006123574, 0.0291467328, 0.3065378666, 0.3231015205, -0.0140057802, -0.1969233751, 0.0177567638, -0.156566605, -0.1717173308, 0.0702449754, -0.1741175652, 0.2569724619, 0.2882354856, -0.0568802468, -0.0213245917, -0.2173705399, -0.3831168413, 0.2945071161, 0.3578614593, -0.3981685936, -0.2213177979, -0.2262429297, -0.41422382, -0.3695698082, -0.1048755944, -0.2279292792, -0.2551908195, -0.2312046587, 0.3115469813, 0.1833657771, 0.2592554092, -0.1243881881, 0.1447739899, 0.2544367909, -0.4136665463, 0.0239862688, -0.0903485268, -0.1083463728, 0.0917412564, 0.5014838576, 0.1665125191, 0.1969743073, -0.2534523606, 0.0452199616, -0.5949462652, -0.2944060862, -0.0161858611, 0.037135046, 0.0740416199, -0.0744830221, 0.3668267727, 0.1976653785, -0.3344924748, 0.3055464029, 0.0922011361, -0.1450959146, 0.1104359999, -0.126227051, -0.1606795937, 0.0007933849, -0.3663276434, -0.1312316209, -0.2736055553, -0.1452495158, -0.1186463609, 0.2453986108, 0.2374482006, 0.0201195478, 0.1560905427, 0.1087508425, 0.0869796127, 0.0980708897, -0.5159550309, 0.3297223151, 0.0439851731, -0.406932801, 0.005501179, -0.0666837841, 0.5552335978, 0.2053048164, -0.4230064154, -0.0054278728, -0.1825606376, 0.2202458829, 0.2052994221, -0.1584537327, 0.0227845758, -0.2259040624, -0.0106737902, -0.1840022504, -0.0045016306, 0.2184029222, 0.1114478037, 0.6592661142, 0.3477965593, 0.2220595181, -0.0564368106, 0.1166493818, 0.5052438974, -0.3023964763, 0.2608958483, -0.0986780226, 0.1178185716, 0.0728702396, -0.2802752554, 0.1006158441, 0.026476847, -0.0702264681, -0.0979864746, -0.0083870152, 0.1362028867, -0.1991449296, 0.1025646999, -0.2736385465, -0.2417385429, 0.0471468456, -0.360360086, 0.3171440959, -0.0406245701, -0.0160370432, -0.1175241619, -0.2542999089, 0.0467980504, 0.5146540999, -0.0103426948, -0.160994485, -0.4704330564, -0.168560192, -0.1489560455, 0.0452453941, 0.0624946691, 0.7762840986, -0.0286618304, 0.0278050434, -0.0215605274, -0.0729918033, 0.3670110106, -0.2659904659, 0.3630942106, 0.1105110943, 0.0825685784, -0.1649065316, -0.0846158862, 0.0318951979, -0.3541187346, 0.6948399544, 0.3220116496, 0.1106783673, -0.0690886751, 0.0601818897, 0.2269335985, -0.2035051733, -0.2965390384, -0.3927066028, -0.2024309635, -0.315354228, -0.2363516092, -0.413921237, 0.2197581232, -0.0074459449, -0.2050042003, 0.0748778209, -0.2676090598, 0.1376388818, 0.1148418859, 0.1625652313, 0.1734162271, 0.1625544578, -0.2402065098, 0.2352826893, 0.172513485, 0.3183294535, -0.1475912482, -0.2885354459, -0.0038333004, -0.1359513253, 0.0959354639, -0.035090521, -0.1532970369, -0.0839425847, 0.0986497104, 0.0651264861, 0.0621593669, 0.2465732098, 0.1049913093, 0.2300984263, -0.3477572799, -0.3568047881, 0.2147632241, 0.0604007617, 0.1153792366, 0.7290046811, -0.2933379412, -0.1288176775, -0.0421996303, 0.1484813392, 0.5102239847, -0.0432356521, -0.2476461381, 0.3940465152, 0.1369661391, 0.2234208733, -0.1048371866, 0.0619107224, -0.3449874818, -0.2537988722, -0.0249620359, -0.3489007056, 0.0853082165, -0.0101926411, 0.0259408746, 0.2195087373, 0.0459112898, 0.2277481854, 0.3119933605, 0.5255160332, -0.0172784347, -0.1265283078, -0.3445286751, 0.0857932493, -0.0783056989, 0.372810632, -0.0303586982, -0.0005271938, -0.1853590012, 0.0276623219, -0.2067965418, 0.4837396443, 0.0697027892, 0.4298188388, 0.0664981753, -0.0753151625, -0.0795531571, 0.5727032423, 0.5105194449, 0.0839168727, -0.2235286683, 0.2138013393, 0.1702679098, 0.1728147268, 0.0185812954, -0.0168044772, 0.3583164215, -0.2600169778, -0.2901146412, 0.1926202923, -0.1042215303, -0.421574235, 0.0394272767, -0.0934734717, -0.1304832101, -0.0870987996, 0.0148839392, 0.0587168634, -0.1404228806, -0.0161370784, 0.1427765489, 0.137182638, 0.0019292677, 0.1217522547, 0.1317557395, -0.3497811258, 0.0614109002, 0.2858655155, -0.0064142141, -0.0014053755, 0.5304967761, -0.0700175017, 0.1519466639, -0.2194432765, -0.0852403417, 0.0494385399, -0.2212424725, -0.1986135393, -0.0840746835, 0.1187091544, 0.0725148842, 0.4365158379, 0.2535584271, 0.3030757606, -0.0325135998, -0.6876357794, -0.3423905075, 0.0568888523, -0.1715883762, 0.1885706037, -0.3885001242, 0.3960306942, 0.0748400986, -0.1774810553, -0.2731969357, -0.0326642394, -0.4017137289, -0.0267321635, 0.0280216858, -0.0176643059, 0.1672485918, -0.0709343925, 0.1682515442, -0.10400071, -0.2033441514, -0.1754016578, -0.0935203806, 0.1171931475, 0.1630306393, -0.2208753824, -0.20471178, -0.2599682212, -0.0981272608, -0.0686720535, -0.1285520643, -0.1266000271, -0.0201882832, 0.1087885424, -0.0913864598, 0.0690632761, -0.1085218936, 0.0635517016, -0.3368261456, 0.0841600299, 0.0912642702, 0.1832917184, -0.0921069384, 0.0800885484, -0.4293677509, -0.0950772688, -0.1050022319, -0.1158125997, 0.2806725502, -0.1528832912, 0.0681755021, -0.0840161145, 0.1499194503, 0.360047102, -0.3264264464, -0.0737648159, 0.2524220049, 0.211197719, -0.232397899, 0.0079621682, 0.0975193977, -0.0128282569, -0.0809162557, -0.0202715993, 0.1736264527, -0.3428406119, 0.3833287358, -0.0789627209, 0.2867293358, -0.2502050698, 0.1364783198, 0.271020174, 0.0146727767, 0.0450893231, 0.005629377, -0.0391099863, -0.2255386263, 0.1958478987, -0.0857736617, 0.2376942337, -0.164283216, 0.5021861196, -0.1042354703, -0.3124945164, -0.0067889029, 0.1271679103, -0.4421221614, -0.0838352144, 0.0046897298, 0.3522084355, -0.1192334369, 0.2068726569, -0.2747468352, 0.1378641874, -0.1530069262, 0.1626488417, -0.6818794012, -0.2202686518, 0.1333303303, 0.0085039819, 0.1705939472, -0.0937689841, -0.2688525915, 0.3143112063, -0.3887186348, -0.3878402114, 0.0650334954, 0.3368550539, -0.0120466668, -0.2356075495, 0.360429585, 0.1550466716, -0.0725587159, 0.0559230186, 0.0326234922, 0.2792871296, 0.5495954156, 0.5028503537, 0.1417158395, 0.290543288, 0.0051553338, 0.0096758613, 0.2727638781, 0.2030747235, 0.1011424661, 0.3449246585, 0.2064351737, -0.0650845766, -0.1087738276, -0.2298967689, 0.2433486581, 0.0245737284, 0.5131154656, 0.1457115412, 0.1192423999, -0.230407089, 0.0868739933, -0.2940407097, 0.0426468924, 0.3270272613, 0.0896346644, 0.123476252, 0.0342260152, 0.0581901781, -0.3124853075, 0.36519292, 0.3919509351, 0.1219501272, -0.2810328603, -0.7514005303, -0.7856203318, 0.0812712237, 0.1031554341, -0.2206646651, 0.1371860504, 0.1202623844, -0.2577445209, -0.1677395105, 0.054569535, -0.2219516486, 0.0527152419, -0.019331662, -0.3758400381, -0.0948535353, -0.3110667765, 0.1669647098, -0.2070862204, -0.2815288901, 0.0894434676, 0.0347795784, 0.0689686462, 0.0055832015, 0.0771619305, 0.1766040772, 0.2179134339, 0.2082778215, -0.0733691901, 0.6868262887, 0.0379900523, -0.1654132754, -0.2968121767, -0.0329286791, -0.0112936869, 0.1104077399, 0.1009301469, 0.2435999513, 0.1682621539, 0.2485688031, -0.4946319759, 0.4898336828, 0.0473818071, -0.5125207305, -0.1670877635, -0.0022592628, 0.0885946974, 0.0051779808, 0.270446986, 0.1382777244, 0.0334279314, 0.2477684766, -0.1295215338, -0.1329999566, 0.3874618411, -0.1668901742, 0.0412996858, -0.0317717716, 0.1995332539, -0.3064462543, 0.1330665052, -0.5193885565, 0.0498285964, 0.4189537466, -0.0191898067, -0.0867765173, 0.1279960573, 0.1789079458, 0.3869440258, -0.0762612522, -0.1062066704, 0.0338067599, -0.2182242721, -0.0525417067, -0.1444689333 ]
https://github.com/huggingface/datasets/issues/699
XNLI dataset is not loading
Hi ! Yes the download url changed. It's updated on the master branch. I'm doing a release today to fix that :)
`dataset = datasets.load_dataset(path='xnli')` showing below error ``` /opt/conda/lib/python3.7/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: ['https://www.nyu.edu/projects/bowman/xnli/XNLI-1.0.zip'] ``` I think URL is now changed to "https://cims.nyu.edu/~sbowman/xnli/XNLI-MT-1.0.zip"
22
XNLI dataset is not loading `dataset = datasets.load_dataset(path='xnli')` showing below error ``` /opt/conda/lib/python3.7/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: ['https://www.nyu.edu/projects/bowman/xnli/XNLI-1.0.zip'] ``` I think URL is now changed to "https://cims.nyu.edu/~sbowman/xnli/XNLI-MT-1.0.zip" Hi ! Yes the download url changed. It's updated on the master branch. I'm doing a release today to fix that :)
[ -0.1545364559, 0.328220129, -0.0674622878, 0.1016500518, 0.1184460819, -0.0849033818, 0.1139142886, 0.351785779, -0.0838161334, -0.1345045716, -0.0737447068, 0.3510937095, 0.2048694789, 0.0506397896, 0.1383060217, 0.3167422414, 0.1006804481, 0.0527608395, -0.1457015574, -0.1142645106, -0.3562243581, 0.2969622314, -0.3298875093, 0.0699841976, -0.1616191566, 0.1915489733, -0.0262832604, 0.2155113816, -0.2241703123, -0.5219002962, 0.4650444388, -0.0289614685, 0.3153361976, 0.0534082912, -0.0001107943, 0.0133207226, 0.4856797457, -0.0701199323, -0.4200720787, 0.0991580561, -0.5813624859, -0.3688767254, -0.040726915, -0.2189435065, 0.1747737974, -0.0294564441, 0.0603698976, 0.008795171, -0.0555601232, 0.4349472821, 0.2022580057, 0.3315927386, 0.2125157267, 0.1041499749, -0.1241296083, -0.1358565688, 0.2027838081, 0.4185235798, 0.2098928392, 0.0184141882, 0.0820093304, 0.0695743412, -0.1658984125, -0.1311555803, 0.0142948106, -0.0650996491, 0.183260411, -0.0951684117, -0.023273563, 0.1045117304, 0.4157613218, -0.0431303531, -0.4142583907, 0.0711863115, 0.1402253211, -0.1816169769, 0.2897530794, 0.1656955779, -0.3068471253, -0.0380344987, -0.342302084, -0.2752625048, -0.0843000114, 0.3529602885, 0.0052466635, 0.5990457535, -0.0411308259, 0.0551667102, 0.009063134, -0.0800498724, 0.2823025286, -0.0525371507, -0.1047087908, 0.1626808792, -0.5495140553, 0.0248671789, -0.0059832907, 0.183404088, 0.265507549, 0.4027746022, 0.0387197062, -0.1163019761, -0.2263503969, -0.009401584, -0.00390707, 0.3008686304, 0.1394990534, 0.1594566703, 0.2239142358, 0.1344496757, 0.0951103047, 0.0431366153, -0.1842562854, -0.1783157289, -0.0636250824, 0.0801094174, 0.168234393, -0.2972937822, -0.1405251026, -0.0837189853, -0.0799831375, -0.1666854471, 0.1681001484, 0.2521232367, -0.2229516357, 0.3373002708, 0.0686312318, 0.1112288684, 0.0157313757, -0.2440186292, -0.1695141345, -0.1212179586, -0.285492599, -0.0604429916, 0.2744225264, -0.2481133342, 0.4631313682, -0.092131488, -0.1814788282, -0.1822264344, -0.1476955712, 0.1697591543, -0.0256858468, 0.1520394683, -0.0257620197, 0.0911135823, 0.140344277, -0.0117276227, -0.1172376871, 0.2947634757, -0.3946953416, -0.2646886408, -0.0457640663, 0.1853072345, -0.1605918705, -0.3530969918, 0.0199411102, -0.390782088, -0.0066498825, -0.1254161, -0.0672849864, -0.2273852229, 0.0255347155, -0.2347317785, 0.4058352411, 0.3372838199, -0.1800178438, -0.0504510105, -0.2473850399, -0.1954921484, 0.0923828259, 0.2312326431, -0.1536957026, 0.1757416874, -0.4672145247, -0.0179846641, 0.6156253219, -0.505479157, -0.4822388589, 0.3668368161, -0.1643921882, -0.0939214826, -0.0435518175, 0.2854285538, -0.0775716007, 0.0263479166, 0.061194852, 0.3515804708, 0.1483878791, 0.134703204, -0.2264339924, -0.312089622, 0.0775292367, 0.2374333888, -0.1020627916, 0.2401534915, -0.0833321363, -0.096425578, 0.6564125419, -0.003344768, -0.0390242487, 0.1771041304, 0.34961918, 0.0461644977, -0.0561559089, 0.132139653, -0.2743854225, 0.2317928523, -0.0811060295, 0.0774698481, -0.136914134, 0.1522575021, -0.4671766758, -0.0133985961, -0.3502941728, -0.2138039172, 0.0977899209, 0.3238503933, 0.2103267312, 0.1386875361, -0.1924282461, 0.4510430694, -0.5149964094, 0.0892235413, -0.4599663913, 0.3872055113, 0.0511924885, 0.0269245431, 0.1402986497, 0.2226242274, 0.0464308411, -0.0905626491, -0.2875970304, 0.4172311723, -0.0751661137, -0.1176201701, 0.3687199056, -0.0515871458, 0.0299849156, -0.4615374506, 0.2841532826, 0.4072537124, -0.0159508251, 0.0830564573, 0.0404779054, 0.1762771606, -0.2168432176, -0.0306024272, 0.0199309103, 0.2044684142, 0.4493321478, -0.2942862213, -0.1360213906, -0.1536150128, 0.1517792642, 0.3045045137, 0.5157183409, 0.0725357607, -0.0740448982, -0.1381263584, 0.3581751883, -0.0692820922, -0.1495410055, 0.3571568131, -0.1663307548, -0.0016490418, -0.0482870303, 0.5162201524, 0.3303978145, 0.0800943077, -0.1672213227, 0.0157244336, -0.0763310492, -0.231653586, 0.1646535099, -0.1718084365, 0.1088638306, 0.186858207, -0.0693935826, -0.1027749181, -0.2119053453, -0.2347469032, 0.0774969161, 0.3297290206, -0.36398983, -0.2274918556, -0.2603931725, -0.6383988261, -0.486920625, -0.1401944607, -0.2508094311, -0.470528543, -0.2021905184, 0.0587802902, 0.2062984258, 0.315323025, -0.3141492307, 0.0116964309, 0.0457246117, -0.3295635283, 0.1589161009, -0.1446892321, -0.27135095, 0.1072729528, 0.3671360612, 0.1439753473, 0.1006247029, -0.4280474484, 0.2426964045, -0.6304473281, -0.2325655371, -0.0655870885, -0.0149606997, 0.1261074394, 0.027094245, 0.2817871869, 0.2949372828, -0.1686243862, 0.2453975528, -0.0050112368, -0.1012964919, 0.1765968651, -0.0970522016, -0.1183389053, 0.1169449091, -0.407330066, -0.2895723879, -0.2114051431, -0.0537786484, -0.0920135155, 0.1696117073, 0.1500196755, 0.1081297472, 0.0406977087, -0.046092391, -0.0529095903, 0.0463920236, -0.5149424076, 0.346663028, 0.0684273317, -0.3327197731, -0.0270357952, 0.0320865884, 0.3410558701, -0.0058481121, -0.5295610428, 0.073816888, -0.1447529942, 0.3154474795, 0.2459882498, -0.0960094333, 0.1120346934, -0.1378752887, -0.064281553, -0.0147828683, -0.1439595371, 0.0396764539, 0.0106238257, 0.6999564767, 0.2855211198, 0.2176014483, -0.1492906213, 0.0831897333, 0.5553335547, -0.0592048019, 0.2632456422, -0.0163614023, 0.1333654821, 0.1375614852, -0.3414491117, 0.0171847157, -0.0367081165, -0.1097876504, -0.0237466935, 0.1147012785, 0.0748706087, -0.1925241649, 0.0020038693, -0.2976506352, -0.2230401784, -0.0241421442, -0.2135827988, 0.282389164, 0.0843418837, -0.0323964059, -0.1558048874, -0.2728619874, -0.0168794971, 0.4304163754, 0.0510934666, -0.0669245496, -0.4378409684, -0.150381133, -0.2656533718, 0.1857947856, 0.0449980386, 0.7549545765, 0.067974031, -0.0616987757, 0.0239416901, -0.0362793431, 0.4664523602, -0.1932815164, 0.2973352671, 0.1407939941, 0.3209068775, -0.2331843674, -0.0348827504, 0.0646291077, -0.1848778725, 0.7279905677, 0.2987175882, 0.0721631125, -0.1937951893, 0.0732215643, 0.2993066907, -0.2575793862, -0.2874573171, -0.4475960135, -0.2088446617, -0.2936890721, -0.1837624758, -0.3898382485, 0.1613376886, -0.1003875434, -0.0517884605, 0.1099181846, -0.2723606229, -0.0352506228, 0.0367548019, 0.2607635856, 0.1131936535, 0.0107169477, -0.1164236516, 0.2308258116, -0.0326761603, 0.5089077353, -0.1746755391, -0.2450767756, -0.013689083, -0.1131557375, 0.1418548971, 0.018582942, -0.0477692932, -0.1855543554, 0.1721392274, -0.0042624194, 0.0221609697, -0.0433779769, 0.2097511142, 0.089753665, -0.3601861596, -0.2822359204, 0.4302027822, 0.1393754929, -0.0578980856, 0.5784240365, -0.1171740666, -0.0944813415, -0.07840316, 0.0654615834, 0.6112677455, 0.0496001132, -0.0541409962, 0.3504298329, -0.1887285113, 0.3375972509, 0.1458971649, 0.0347134881, -0.4030075371, -0.0592873953, 0.0196088329, -0.2003259808, 0.0101813739, 0.0027693887, -0.035646461, 0.2889030874, -0.0840275586, -0.0155216642, 0.3707635999, 0.5017660856, 0.0225255322, 0.0111109316, -0.3719961941, 0.1639681458, -0.0784759372, 0.3671860397, -0.0763883293, -0.083833687, -0.2551733255, 0.0709594339, -0.2950750291, 0.5404980183, 0.2757501006, 0.3389622569, 0.0648259521, -0.1280147433, -0.2496616989, 0.38788867, 0.4305009544, 0.0638910234, -0.275644213, 0.2003504783, 0.0786879435, 0.1224247888, 0.0892089009, 0.122487247, 0.2299337089, -0.1404501051, -0.4328584969, 0.2280066162, -0.0215890799, -0.5032142997, -0.0519706383, -0.155373469, -0.2494817972, -0.2342970073, -0.0343458131, 0.0702425689, 0.0576721057, -0.1293158084, 0.1366470903, 0.2121317387, 0.0934363306, 0.0752329379, 0.1593123972, -0.2969797254, 0.0624211505, 0.319342494, -0.0685607046, 0.0689794421, 0.4445509911, 0.0333650298, 0.1569444388, -0.1756384373, 0.0826242045, -0.1344573498, -0.3435790837, -0.2444277108, -0.0872380212, 0.332641989, 0.0885282904, 0.2776813805, 0.2276194394, 0.3206562996, -0.0000832947, -0.6334676147, -0.3039220572, 0.098550804, -0.2064146996, 0.0633977652, -0.3180435598, 0.3124541342, 0.2417284101, -0.2426434606, -0.29668203, 0.0722852275, -0.3123776615, -0.0717406049, 0.2395822406, 0.0292006899, 0.0903969333, -0.0425592698, 0.200701952, -0.2257983536, -0.125700146, -0.1602731943, -0.0246866681, 0.0996062011, 0.1776625067, -0.2029819191, -0.1229584515, -0.2508125603, -0.0240061991, 0.0717608109, -0.3325244486, -0.1658545732, -0.0307431538, 0.2758229673, -0.1615844369, -0.0562863834, -0.0383758433, 0.1534136683, -0.1991806924, 0.0390925594, 0.1552167833, 0.281016916, -0.0904584005, 0.0632272214, -0.477396518, 0.0386107937, -0.1450753808, 0.0427150987, 0.2743890584, -0.2584926188, 0.157784313, 0.082070291, 0.1168670803, 0.4848004878, -0.1882727891, -0.1262040287, 0.2777556479, 0.20499295, -0.2251924276, -0.0539961979, 0.0980125219, 0.085703887, -0.250456363, -0.0555797368, 0.0586952157, -0.3978052139, 0.4871252179, -0.0234777611, 0.369474858, -0.1294141114, 0.1393543184, 0.5224537253, 0.093540594, 0.0208097659, 0.1553805172, 0.0035150188, -0.1617503315, 0.2503548861, -0.1632587165, 0.1540080458, -0.1727182567, 0.4835168719, -0.1974906176, -0.1726992279, 0.0231971797, 0.044912409, -0.3199958205, -0.216070652, 0.0066728992, 0.3999449015, -0.1598158032, 0.118489787, -0.2759809792, 0.2097930759, -0.1217808276, -0.0070003187, -0.5526404381, -0.2350110263, 0.1237570569, 0.0368723311, -0.0431374945, -0.2234439701, -0.0480023809, 0.1611392796, -0.3857377768, -0.7578918338, 0.071307376, 0.2273161709, -0.0725757629, -0.1632794887, 0.2439633906, 0.1988022625, 0.0104246773, 0.2831303775, 0.17870377, 0.4121367931, 0.5009098649, 0.3841793835, 0.0317536891, 0.1298058778, -0.0685226545, 0.0512295403, 0.2722652853, 0.2894986868, 0.0480666831, 0.3093038797, 0.2313954234, -0.0603741035, 0.0422834083, -0.1409116387, 0.2453175485, 0.072713092, 0.6251953244, 0.0614114404, 0.0537470356, -0.2286474407, 0.1315888911, -0.3768250048, 0.1797703654, 0.3087481558, 0.0949522331, 0.0438651741, -0.0172965005, 0.0809464604, -0.2652844489, 0.391402632, 0.5102474689, 0.1521368921, -0.2963317931, -0.7047799826, -0.9020800591, 0.0867723376, 0.0547010787, -0.3410697579, 0.0464089625, 0.0831417665, -0.2063590437, -0.0568964593, 0.0139275575, 0.0702678636, 0.0295172334, -0.0250445474, -0.266558975, -0.0999607444, -0.1046749502, 0.2980389595, -0.2714781463, -0.1906728148, 0.0879941285, -0.1157110184, 0.0625948384, 0.0176292937, -0.0932017192, 0.1104451492, 0.3106446862, 0.2195037305, 0.167866379, 0.5355523229, 0.0561117344, -0.2521294057, -0.4081024528, -0.1263269335, -0.0985520482, 0.1180328876, -0.0269519985, 0.2019403726, 0.0512724109, 0.3044298887, -0.4236250222, 0.330532372, 0.0209779907, -0.3489249647, -0.2254321128, 0.0212249923, 0.1123479381, -0.1054459363, 0.1905829459, 0.1687428206, -0.0324883498, 0.2855882347, -0.0658099428, -0.0228893571, 0.3058545291, -0.0856070891, 0.0935540646, -0.016885763, 0.1959044486, -0.3091351092, 0.0666456074, -0.4109695256, 0.1463024616, 0.4854401946, 0.1082174256, -0.0762619898, 0.2233991474, 0.0738199353, 0.2739033699, -0.0148149459, -0.0121201826, 0.1058721915, -0.3055033982, 0.0107611082, -0.130161345 ]
https://github.com/huggingface/datasets/issues/690
XNLI dataset: NonMatchingChecksumError
Thanks for reporting. The data file must have been updated by the host. I'll update the checksum with the new one.
Hi, I tried to download "xnli" dataset in colab using `xnli = load_dataset(path='xnli')` but got 'NonMatchingChecksumError' error `NonMatchingChecksumError Traceback (most recent call last) <ipython-input-27-a87bedc82eeb> in <module>() ----> 1 xnli = load_dataset(path='xnli') 3 frames /usr/local/lib/python3.6/dist-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 37 if len(bad_urls) > 0: 38 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 39 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 40 logger.info("All the checksums matched successfully" + for_verification_name) 41 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://www.nyu.edu/projects/bowman/xnli/XNLI-1.0.zip']` The same code worked well several days ago in colab but stopped working now. Thanks!
21
XNLI dataset: NonMatchingChecksumError Hi, I tried to download "xnli" dataset in colab using `xnli = load_dataset(path='xnli')` but got 'NonMatchingChecksumError' error `NonMatchingChecksumError Traceback (most recent call last) <ipython-input-27-a87bedc82eeb> in <module>() ----> 1 xnli = load_dataset(path='xnli') 3 frames /usr/local/lib/python3.6/dist-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 37 if len(bad_urls) > 0: 38 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 39 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 40 logger.info("All the checksums matched successfully" + for_verification_name) 41 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://www.nyu.edu/projects/bowman/xnli/XNLI-1.0.zip']` The same code worked well several days ago in colab but stopped working now. Thanks! Thanks for reporting. The data file must have been updated by the host. I'll update the checksum with the new one.
[ -0.2586138844, 0.2562110424, 0.0357761532, 0.1724496037, -0.0067086695, -0.0366750695, 0.0808680505, 0.4067071378, 0.1755132377, 0.2336781472, -0.2135458887, 0.3052040637, -0.0187663715, -0.0720470697, -0.2150233388, 0.5297763944, 0.0938085616, 0.2160158902, 0.007998012, 0.0222379789, -0.2151080668, 0.1584312469, -0.2035467625, -0.3193615377, -0.245849371, 0.1520856768, 0.1421749592, -0.0535494275, -0.2479523867, -0.2221306413, 0.6901741028, 0.1887722909, 0.258135885, 0.046286419, -0.0001240973, 0.0080533298, 0.2406713963, -0.1988252103, -0.4517175853, -0.1169147789, -0.8176319003, -0.3818688989, 0.0475631207, -0.2078410834, 0.1094299778, 0.4795919359, 0.2667316496, 0.1372766495, 0.1055043712, 0.2807791233, 0.1115439758, 0.420984, 0.1347885728, 0.1434359401, 0.2464423031, -0.0521558821, -0.1362707764, 0.4895197749, 0.423052907, 0.32035321, 0.0393182859, 0.1135349795, -0.3680999875, 0.3269027472, -0.0359627791, -0.0250636507, 0.0205161106, -0.2464185208, 0.2830494344, 0.4693902731, 0.226194188, -0.2822741866, -0.2415451705, -0.0743846893, 0.0434021577, -0.2809100449, 0.2798110843, 0.0836087614, -0.3455018103, -0.1063983962, -0.327850908, -0.0058590295, -0.0017170386, 0.1073264778, 0.1493444592, 0.5423238277, -0.047706008, -0.0237833876, 0.0697466731, -0.1552947462, 0.6281565428, -0.268009305, -0.1252767444, 0.1798193902, -0.4900616705, -0.0731540471, -0.206471771, 0.5996744037, 0.4066445827, 0.2380989045, 0.2245098352, 0.0259252414, -0.3553997576, 0.1254947186, -0.2012142241, 0.2479911745, 0.099644579, 0.0318745263, 0.2320787162, 0.3483144641, -0.0973198786, 0.1221056506, -0.2033594698, 0.0350356214, 0.2290038466, 0.2580450475, 0.3275789917, -0.5910428762, -0.3378918171, 0.0049089617, -0.260346055, -0.1746100038, 0.1753951162, 0.1753491312, -0.1699450761, 0.1092461944, -0.1756638885, -0.1288087815, -0.0445125625, -0.3918736875, -0.0676399842, -0.0543277822, -0.0956369936, 0.1412098557, 0.3571411669, -0.2953671515, 0.3991786838, -0.2256497294, 0.1817744076, 0.0179107971, 0.0576206073, -0.111603938, -0.0308816805, 0.2910015285, -0.0173147954, 0.0595716462, -0.0529282466, -0.1409934312, -0.1972708404, 0.2363902628, -0.3122949004, -0.2167450488, 0.0996263549, 0.040057864, -0.5102123618, -0.3753415942, 0.0736735761, -0.4655601382, 0.1015563607, -0.3904393315, -0.0073962864, -0.3887446821, -0.0695823506, -0.1876175106, 0.1607967019, 0.3164151907, -0.2147255242, 0.0343072079, -0.1672416627, 0.0257880222, 0.4009526968, 0.3156619966, 0.0544873327, -0.1665252894, -0.29500705, -0.216116488, 0.3075034916, -0.2204371393, -0.725530386, 0.1216122359, 0.0719886199, 0.3229760826, 0.1239926741, 0.2812176645, 0.2119196504, -0.0167510621, -0.0355765596, 0.087299265, -0.0745189339, -0.0421464369, -0.2804174125, -0.3618974686, 0.120460555, 0.1418691874, 0.1601863056, 0.1856271774, -0.0315920152, -0.0567069687, 0.4973295033, -0.1714525223, 0.0485827662, -0.0227915403, 0.6201294065, -0.1340785921, -0.1849185228, -0.0258624572, -0.3418604136, 0.3134124279, 0.1858928055, 0.0887587219, -0.1150417253, 0.0676703155, -0.2243724167, -0.155541122, -0.237049222, 0.0643190816, -0.0242087673, 0.3354492188, 0.2417683005, 0.1224176213, -0.0075557795, 0.4944451153, -0.3668858111, 0.0924632326, -0.3867907524, 0.3697481155, 0.0600518957, -0.0740132332, 0.0644226894, 0.0925177634, -0.0817724988, -0.0969617292, -0.290985167, 0.1332340539, 0.1913933307, -0.2294040322, 0.0671630576, 0.2875172496, 0.0111960322, -0.1594457924, 0.1004251242, 0.5777593255, 0.1238050535, 0.0808634534, -0.0785016418, 0.4863090515, -0.1833892465, -0.0225315969, -0.133287847, 0.1746009439, 0.3575407267, -0.2149173915, -0.1466770917, -0.1746447086, 0.3238839507, 0.0543514378, 0.1948828101, 0.1111027449, -0.2262814045, 0.0082301646, 0.3536308408, 0.0136984494, -0.1000855342, 0.1387245953, -0.0055581862, -0.0261581838, 0.2044363469, 0.6320060492, 0.380002737, 0.0317564234, -0.0440923981, 0.0113439364, -0.138448149, -0.253264308, -0.0992303118, -0.1576068997, 0.2100731581, 0.2351069748, 0.1551222652, -0.1404780298, -0.3958389461, -0.401274085, -0.0733326823, 0.4360641539, -0.2105490863, -0.1275677085, -0.3166088462, -0.5170450211, -0.4883892238, -0.211607933, -0.2422731817, -0.3460928202, -0.1825850308, 0.3951964378, 0.2581496835, 0.2322383672, -0.3695221543, 0.0123255383, -0.0546116829, -0.3932117522, 0.1058225781, -0.1551293731, -0.2283207476, -0.0100653842, 0.3551742733, 0.0392791219, 0.2531676888, -0.4118208587, 0.1813423932, -0.4413233995, -0.1746169478, 0.0173401721, -0.1531534493, -0.0411746986, 0.0783497468, 0.2060882747, -0.2134459019, -0.3065013885, 0.0666824281, -0.0729198754, -0.1403523237, 0.1195373535, -0.2479638308, -0.079216063, 0.1542877108, 0.0388556682, -0.2466491461, -0.0903131962, -0.1552612782, 0.0761151463, 0.2206129432, 0.2278154343, -0.0476892442, 0.0238217283, 0.0273992959, 0.0180003941, 0.0116398558, -0.6506966352, 0.4857341051, 0.1974256933, -0.2535623312, 0.1648093164, -0.1050903127, 0.2708635926, 0.2326164544, -0.4453785121, -0.113672927, -0.2259539068, 0.3107629418, 0.4475624263, -0.202242434, 0.0723847672, -0.094951354, 0.1288633496, -0.0753970519, -0.3394463956, 0.0084449239, 0.0520523675, 0.7311502099, 0.149995178, 0.1265171766, -0.1364469528, 0.2031769454, 0.4175197482, -0.1546085626, 0.2104761451, 0.011174581, 0.1802267283, 0.0195405241, -0.3583568037, 0.144038558, 0.0228396989, -0.3536071479, -0.0504717939, -0.0518313646, -0.0014007018, -0.2670249641, -0.0106402235, -0.1293983608, -0.3412100971, -0.0794880316, -0.0831221119, 0.2536194623, 0.2116158456, 0.1231752932, -0.2357361168, -0.6318888664, -0.1708338261, 0.4474799037, -0.1235523894, -0.058641687, 0.052707579, -0.1895701587, -0.3307124078, 0.447455883, 0.298019737, 0.6073160172, 0.1178281829, 0.0389347337, 0.0599628799, -0.0782376528, 0.0700906888, -0.0893064067, 0.2266211063, 0.0762589648, 0.0211506709, -0.1093896478, -0.1656816602, -0.1647017449, -0.1745554954, 0.5659579635, 0.0911585391, -0.0176948998, 0.118915759, 0.2135758847, 0.4204085171, -0.235903576, -0.0628217086, -0.3771163523, -0.207280755, -0.3647630513, -0.1180632859, -0.4754370451, 0.0615997501, -0.0455350801, 0.0295052454, 0.147949636, -0.0657040775, 0.3446292281, 0.2249272764, 0.1544179767, 0.4531782568, 0.2331412137, -0.1674917191, 0.1083008125, 0.2188343108, 0.5179355145, -0.1935895532, -0.360380441, -0.1526427716, -0.1453346759, -0.1083896458, 0.1207607239, 0.0186495613, -0.0829491094, 0.1656394601, -0.1359837204, 0.2692394257, 0.0904407278, -0.0642678365, 0.1900078952, -0.5104942322, -0.1850133091, 0.1662016809, 0.1732836217, -0.0686924458, 0.3116129041, -0.1918078512, 0.0097127482, 0.038213443, 0.3153884709, 0.8688945174, -0.0218937565, -0.0354279727, 0.2181991041, -0.1299483329, 0.5052809119, 0.2657545209, 0.2102145255, -0.3559128344, -0.396174401, -0.1350576133, -0.1732968241, 0.0568501242, -0.1710413098, -0.2292764932, 0.3527692556, 0.2268238962, 0.1746857166, 0.225675106, -0.0252703354, -0.2586164474, -0.0162422583, -0.2293197215, 0.1181693971, -0.3430685699, 0.4754452407, -0.1209283993, -0.1049935371, -0.2857401371, 0.0672020093, -0.3832433224, 0.3143423498, 0.0966799334, 0.173221454, 0.2541340888, -0.2059419006, -0.2779699862, 0.0363748334, 0.4871709049, 0.0131751848, -0.3220874965, -0.023294257, 0.3273391128, 0.0417023711, 0.0133997984, -0.1327215284, 0.2953261733, -0.0555993319, -0.1177690178, 0.1068492979, 0.1666831672, -0.4556830525, 0.125038147, -0.1773842871, -0.1821446419, -0.0818685889, -0.0712004304, 0.0713322908, 0.157772392, -0.1774204969, 0.0476816855, 0.2079448402, 0.0523540489, 0.2391224504, 0.12688981, -0.3064702153, -0.1135164201, 0.4045443833, 0.1057963297, -0.0367848948, 0.3865576684, -0.1316717267, -0.0423777588, -0.0913608223, 0.1321872175, -0.354329288, -0.4095629156, -0.0604037642, -0.2701901793, 0.4153301716, 0.0231585447, 0.6284527779, 0.4644915164, 0.1783499718, 0.0964621976, -0.5210328102, -0.3888105154, 0.0315413363, 0.0129361488, 0.2870260775, -0.375836432, 0.2927760184, 0.1397349387, -0.3371576369, -0.1680605412, 0.0850645378, -0.3066515923, -0.0509790443, 0.095396921, 0.1309383959, 0.0691091642, 0.0625509694, 0.0046246853, 0.0459245965, -0.2008612454, -0.0415531322, -0.1022264734, 0.1907495707, 0.2005021423, -0.1846124977, -0.2284703255, -0.1442886889, -0.1481513232, -0.1284847856, -0.1365037113, 0.1499313116, -0.1924204081, 0.1312948614, -0.0278373286, -0.0140906237, 0.025085507, 0.112984255, -0.1522169262, 0.1837061495, 0.2570560873, 0.2861248553, 0.0253345706, 0.0861968398, 0.1437250674, 0.0571355335, -0.1019798741, -0.2410798669, 0.3060298562, -0.2665881217, 0.1472245008, 0.1099903509, 0.0491778702, 0.4875946939, 0.0205438547, -0.2028517574, 0.352579385, 0.0845165923, -0.3221231997, 0.0614541844, 0.5308297276, 0.2454989552, -0.087418057, 0.2134350836, 0.0358163044, -0.3072911203, 0.6014169455, -0.0430191047, 0.1474885941, 0.0138231833, -0.0004380989, 0.4038958251, 0.0626995042, 0.1253692806, 0.0189433601, -0.1403688192, 0.0287217796, 0.0626485944, -0.2316168398, 0.3849838972, -0.1694201827, 0.2810201347, -0.1107491851, -0.4324721694, 0.2339345962, -0.0175395608, -0.2075413316, -0.0420890078, 0.2931671441, 0.3398030996, -0.2007789463, 0.1734029651, -0.5587027073, 0.1731671691, -0.1941282451, 0.0291711111, -0.252918005, -0.3007824421, -0.0168840494, 0.3131951094, 0.0395063721, 0.1465027481, 0.1700263619, 0.207642898, -0.3036564589, -0.4746926725, -0.0965435058, 0.2057172358, -0.0628151819, -0.1299207062, 0.1693889797, 0.027424451, -0.0219150037, 0.0453215018, 0.2925060093, 0.3776884079, 0.4168750644, 0.2413639277, -0.0295946654, 0.0176217221, 0.0726837292, 0.0233118162, 0.4255528748, 0.29023844, 0.0710027218, 0.3429037631, 0.0622063503, -0.010872419, 0.202294156, -0.3271125257, -0.1813565791, 0.0961442515, 0.3088454008, 0.1859770566, 0.318351239, -0.2038238794, 0.0416995846, -0.3885011971, 0.1510499269, 0.0275717285, -0.0624470823, 0.1061574444, 0.103153348, 0.0027693138, -0.3692872524, 0.2995939255, 0.4130440354, 0.1857758313, -0.2702028751, -0.5286297798, -0.7571750283, 0.2116254568, -0.110047102, -0.1597784758, -0.2165713757, -0.0024011561, -0.1215696856, 0.0625086203, -0.013688813, -0.0481504351, -0.0637752935, -0.0609192513, -0.2312756926, -0.2271116972, 0.1864971668, -0.245463863, -0.1708977968, -0.2581580281, 0.2013617009, -0.1007340401, -0.0210811943, 0.0165490564, -0.2557745278, -0.0119885392, 0.2333960682, 0.1644081473, 0.2768932879, 0.6607116461, 0.0985969901, -0.1049929112, -0.2200140953, -0.0525943451, 0.0062346463, 0.1635093689, 0.1268313676, 0.4762102067, 0.0781693012, 0.374635607, -0.2713707089, 0.496083349, 0.1778516918, -0.3425254524, -0.2108487487, -0.019095201, -0.3737196028, 0.1639873981, -0.0608189739, 0.127909869, 0.0173606593, 0.377989769, -0.2351926863, 0.1121448949, 0.5374975801, -0.1511538625, -0.0808382928, -0.3420776129, 0.1271232963, -0.1766867936, -0.3017486334, -0.563514173, 0.1713234037, 0.2985348403, -0.0366920531, -0.2237526029, 0.2323484123, -0.0314043686, 0.2705061734, -0.0579744019, 0.2570028901, 0.1416119039, -0.3666127622, -0.127190724, -0.0590838678 ]
https://github.com/huggingface/datasets/issues/690
XNLI dataset: NonMatchingChecksumError
I'll do a release in the next few days to make the fix available for everyone. In the meantime you can load `xnli` with ``` xnli = load_dataset('xnli', script_version="master") ``` This will use the latest version of the xnli script (available on master branch), instead of the old one.
Hi, I tried to download "xnli" dataset in colab using `xnli = load_dataset(path='xnli')` but got 'NonMatchingChecksumError' error `NonMatchingChecksumError Traceback (most recent call last) <ipython-input-27-a87bedc82eeb> in <module>() ----> 1 xnli = load_dataset(path='xnli') 3 frames /usr/local/lib/python3.6/dist-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 37 if len(bad_urls) > 0: 38 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 39 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 40 logger.info("All the checksums matched successfully" + for_verification_name) 41 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://www.nyu.edu/projects/bowman/xnli/XNLI-1.0.zip']` The same code worked well several days ago in colab but stopped working now. Thanks!
49
XNLI dataset: NonMatchingChecksumError Hi, I tried to download "xnli" dataset in colab using `xnli = load_dataset(path='xnli')` but got 'NonMatchingChecksumError' error `NonMatchingChecksumError Traceback (most recent call last) <ipython-input-27-a87bedc82eeb> in <module>() ----> 1 xnli = load_dataset(path='xnli') 3 frames /usr/local/lib/python3.6/dist-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 37 if len(bad_urls) > 0: 38 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 39 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 40 logger.info("All the checksums matched successfully" + for_verification_name) 41 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://www.nyu.edu/projects/bowman/xnli/XNLI-1.0.zip']` The same code worked well several days ago in colab but stopped working now. Thanks! I'll do a release in the next few days to make the fix available for everyone. In the meantime you can load `xnli` with ``` xnli = load_dataset('xnli', script_version="master") ``` This will use the latest version of the xnli script (available on master branch), instead of the old one.
[ -0.3440381885, 0.293183893, -0.0001978044, 0.147711575, 0.0428990014, -0.0164932441, 0.0669284239, 0.4335775673, 0.1969802827, 0.2615414858, -0.1929386258, 0.3978195488, -0.0380583405, -0.0033610892, -0.2366970479, 0.4933423996, 0.0317254178, 0.2110861838, -0.0416039228, 0.0739369988, -0.2827178538, 0.1787006706, -0.1861886233, -0.317799896, -0.2123044878, 0.1219338775, 0.1847492307, 0.0075172712, -0.2586037219, -0.2615925074, 0.6109445691, 0.2217766047, 0.2797488868, 0.0617807545, -0.0001173359, 0.0237155799, 0.2804251015, -0.1893087476, -0.4183904231, -0.1919609308, -0.8016712666, -0.347548455, 0.0605277419, -0.240259096, 0.0747940689, 0.5231491327, 0.2952470183, 0.044248756, 0.0799890235, 0.2395125031, 0.1787979156, 0.4278893173, 0.0840492547, 0.0535925776, 0.2339525372, -0.0877394974, -0.1639369577, 0.4085545838, 0.3534652293, 0.292239219, 0.0033404315, 0.1321728826, -0.2840925455, 0.3042035401, -0.0183514506, -0.0000575545, 0.0221793819, -0.2624892294, 0.2590137124, 0.4535429478, 0.2009487599, -0.3335734904, -0.2044587731, -0.0561784804, 0.0789381638, -0.3034094274, 0.2755575478, 0.085033983, -0.3896922469, -0.1392332315, -0.3486256599, 0.0117966048, -0.0150102898, 0.1248634607, 0.1671701968, 0.5360559225, -0.0082518021, -0.0296938363, 0.1839884222, -0.1859428287, 0.5659554601, -0.1626444906, -0.1520640403, 0.1428891718, -0.4413084984, -0.0617950894, -0.1626290679, 0.5207802057, 0.4231539667, 0.2548364699, 0.1699786782, 0.0411417559, -0.2934743464, 0.152320832, -0.1858281642, 0.2886753082, 0.1287662387, 0.0313783698, 0.2930387855, 0.3644461334, -0.038698975, 0.1364924908, -0.199270159, -0.0421609506, 0.2076931894, 0.290587604, 0.2817009091, -0.5635092854, -0.3809595406, -0.0410362147, -0.2130837291, -0.1139887869, 0.1676991731, 0.2496079803, -0.1615521461, 0.1476878524, -0.1371197402, -0.1192397699, -0.0691370368, -0.2893769145, -0.095134899, 0.0040903743, -0.1191837043, 0.1341280341, 0.3768647015, -0.2947877944, 0.4392277598, -0.2404562533, 0.1950039566, 0.1250961125, 0.0708588809, -0.0914163589, -0.0768908188, 0.3040604889, 0.0895578861, 0.0418243259, -0.0311249569, -0.1528535634, -0.2102232724, 0.2301732749, -0.2099948823, -0.2321100682, 0.0797880888, 0.1087791398, -0.5416494608, -0.377497077, 0.0189008228, -0.4489600956, 0.1088398695, -0.3180782199, -0.0343199521, -0.3917694092, -0.106701687, -0.2412904799, 0.1894364208, 0.3107248545, -0.2163631469, 0.0360517278, -0.2468756735, -0.0264518503, 0.3716177344, 0.2849501073, 0.0138591668, -0.1486023515, -0.2733634412, -0.1364934146, 0.2888858914, -0.278493464, -0.6970903873, 0.1289832592, 0.0430604331, 0.3183748722, 0.1046933085, 0.298399955, 0.2461852729, -0.0161691904, -0.0438210852, 0.1752975136, -0.0970219821, -0.0069655199, -0.2635578811, -0.3880696595, 0.1158209443, 0.1368905753, 0.1502612531, 0.1209082901, -0.0502933636, -0.0395642929, 0.4690090716, -0.1905783713, 0.0268351808, -0.0521965958, 0.6033701897, -0.1217801943, -0.2028290182, -0.0414077863, -0.4090159237, 0.3111777604, 0.1476169229, 0.1218375266, -0.1686829776, -0.0094158193, -0.2805188298, -0.1390559524, -0.2671611309, 0.0837762728, 0.0549876429, 0.3394344449, 0.2582282424, 0.0887850821, -0.0038402225, 0.43651703, -0.3119865954, 0.072690174, -0.436504215, 0.3094474077, 0.0062045194, -0.0633647591, 0.0675514266, 0.110878095, -0.1225926206, -0.1070817485, -0.2557763159, 0.2078648061, 0.1960379481, -0.2338296622, 0.0494603366, 0.339702785, 0.0056554796, -0.1557007581, 0.0675100014, 0.6223809719, 0.0914901868, 0.1029839292, -0.1324330866, 0.5266985893, -0.1924360543, 0.020005621, -0.0674267784, 0.1960759759, 0.4001259506, -0.1682978272, -0.1617601067, -0.2088330239, 0.2940330803, 0.0468100794, 0.1933830827, 0.0589752346, -0.2583683729, 0.0743768588, 0.3327548802, 0.0074452837, -0.033687409, 0.0930742174, 0.0040552737, 0.0113948975, 0.1987381727, 0.5975401998, 0.3432099521, 0.0955271572, -0.0616085455, -0.0286784731, -0.1906539202, -0.2502812743, -0.0580551922, -0.1220417991, 0.2735542059, 0.1527736038, 0.1312633753, -0.1834200472, -0.3542270362, -0.3979009688, -0.094503887, 0.4105626345, -0.2074860483, -0.1465305686, -0.3155779839, -0.5586177111, -0.4476634264, -0.219895035, -0.1585789472, -0.3854696155, -0.1467303783, 0.4163065851, 0.1678804904, 0.2521423101, -0.375821203, 0.0352791399, -0.046805311, -0.3844073713, 0.1503748, -0.2083701491, -0.1908458322, 0.0462136865, 0.3689053357, 0.0867270306, 0.2980213165, -0.4031928778, 0.1827480644, -0.4075941145, -0.198123619, 0.0023815313, -0.1348771006, -0.0719990209, 0.1256299019, 0.1721434593, -0.2058404982, -0.3575614691, 0.0803219453, -0.1493180394, -0.1881507486, 0.1096832454, -0.2746919096, -0.1528237909, 0.0912579149, -0.0726805031, -0.2556607723, -0.2009693235, -0.0976832733, 0.1144785509, 0.2240276039, 0.2649914026, -0.0191738196, 0.0423419513, 0.1130244285, 0.040063709, -0.0267870575, -0.6075459719, 0.4921411276, 0.0947328508, -0.2937289178, 0.1848199815, -0.1470677704, 0.2552670836, 0.2104956359, -0.4421551228, -0.1724348962, -0.2389872521, 0.3733915091, 0.4332042038, -0.1727673262, 0.0812961832, -0.0512845293, 0.0780456215, -0.0847654566, -0.2738974094, 0.0359925553, -0.0335582867, 0.702434957, 0.1258620471, 0.1708857268, -0.0635145605, 0.2098975927, 0.3908779919, -0.1221814007, 0.1051868275, -0.0278416853, 0.2351703197, -0.0090698116, -0.3265691102, 0.1183071136, -0.0165591929, -0.3186413646, -0.0053002373, -0.0556296185, -0.039262034, -0.2463174015, 0.1020682678, -0.0881520435, -0.3926938176, -0.0291870069, -0.0793788955, 0.191177994, 0.2054200023, 0.193778187, -0.2194744945, -0.5721917152, -0.0995534956, 0.3870617449, -0.1190760508, -0.0579634197, 0.0472559333, -0.1828982681, -0.4157755673, 0.4237548411, 0.3293734193, 0.5484648347, 0.1366920024, -0.0116103888, 0.0345032103, -0.0985603258, 0.0837161466, -0.0597549118, 0.1749058217, 0.1334546655, -0.0519235544, -0.184439823, -0.1501600742, -0.1745019704, -0.155225575, 0.5905587673, 0.0591123067, -0.07765802, 0.1408090144, 0.2333714515, 0.3763692081, -0.2462836355, -0.0807744265, -0.3972806334, -0.2627042234, -0.4146534801, -0.1544629037, -0.3829424679, 0.1329503953, -0.1005196422, 0.0448331721, 0.1235404462, -0.1154029667, 0.3189049959, 0.3315774202, 0.228211686, 0.4145645499, 0.2811504602, -0.136364311, 0.0512513071, 0.2107322812, 0.5573123693, -0.1722422838, -0.4031034112, -0.1164150536, -0.1506759971, -0.1288353205, 0.0716029406, -0.0065049487, -0.1395280659, 0.1229690462, -0.1664729416, 0.2401520163, 0.1917053312, -0.1167015657, 0.1203276739, -0.4312662184, -0.2116881758, 0.2073088586, 0.2092951238, -0.0363910496, 0.271517247, -0.2344307154, -0.0248651374, 0.0846184865, 0.3442431688, 0.8187867999, -0.0619056635, -0.0139195248, 0.289616704, -0.0557262078, 0.4866744876, 0.2484872788, 0.2380779833, -0.4096165001, -0.396299392, -0.0390984043, -0.1366095394, -0.0193003714, -0.1677212417, -0.2541607916, 0.3362495005, 0.1775852889, 0.1237634718, 0.2067863047, 0.0409848988, -0.2272509933, -0.1268279701, -0.1875160486, 0.1844404936, -0.2838768065, 0.4083457291, -0.1444780976, -0.0671346784, -0.2317019999, 0.0616199113, -0.3937954307, 0.3232373595, 0.0329274647, 0.2542944849, 0.1914369166, -0.1826345325, -0.2856238782, 0.0671773255, 0.4448698759, 0.038873639, -0.3048976064, -0.0049494533, 0.3574894667, -0.0184871405, 0.0408534482, -0.0647563189, 0.3254225552, -0.0900866911, -0.0873249471, 0.0833620355, 0.1733260006, -0.4621197283, 0.108262293, -0.1714570969, -0.2083177716, -0.0360816754, -0.0317527391, 0.0669074953, 0.1646898389, -0.156726703, 0.1015163884, 0.2169138938, -0.0008434803, 0.2573365569, 0.1036613658, -0.3198426962, -0.101166904, 0.3443154395, 0.0908372104, -0.0055111763, 0.3339011073, -0.0703472048, -0.0624953657, -0.1247320026, 0.1068127453, -0.2791676819, -0.3632579744, -0.0075326236, -0.2389727235, 0.3001516461, 0.0185422078, 0.6877381206, 0.4473280013, 0.1496278197, 0.085990712, -0.5489454865, -0.4318610728, 0.0741934553, 0.0474211983, 0.3095943332, -0.3513424098, 0.2906152904, 0.04461734, -0.3251024485, -0.2508602142, -0.0226756614, -0.3561302722, -0.0524397083, 0.1040025726, 0.0975901037, 0.1359904259, 0.0881352499, 0.0636295155, 0.0629811734, -0.2140291333, -0.117070742, -0.086167872, 0.1459875107, 0.1236996651, -0.2211589962, -0.161310032, -0.1197183505, -0.1620863974, -0.1573923826, -0.0734207705, 0.1817918271, -0.21015957, 0.1287514567, -0.0647252798, 0.0010960634, 0.0696658418, 0.1311083287, -0.1214488223, 0.2450137585, 0.213800177, 0.3322273791, -0.0241162628, 0.073971048, 0.1956085116, 0.004383367, -0.0255717281, -0.1465317905, 0.23870565, -0.2423230261, 0.1400311887, 0.1473294348, 0.0703819767, 0.4781847596, 0.0161630567, -0.1533747017, 0.3481905162, 0.1562800854, -0.3181655109, 0.0861119926, 0.3944348991, 0.2042916864, -0.017499553, 0.2422491163, 0.0090041654, -0.2437969148, 0.5908530951, -0.0485163368, 0.1849912107, -0.0333948731, 0.041318275, 0.3584524095, -0.0264854766, 0.0386487879, -0.0225576647, -0.1022629738, 0.0775157288, 0.0320202708, -0.2205407917, 0.3828902245, -0.1937124282, 0.2351671159, -0.0764028355, -0.3828200102, 0.1927021891, 0.0023950669, -0.19180426, -0.0293088946, 0.3255550563, 0.3256495297, -0.246595636, 0.1597205698, -0.5443404317, 0.131401509, -0.1738944054, -0.0069846334, -0.2848837674, -0.2271636873, -0.0260508992, 0.3117634654, 0.043747887, 0.0755051523, 0.1772057414, 0.1944647133, -0.3063090742, -0.4392054677, -0.0449708477, 0.2036381215, -0.076150246, -0.135276258, 0.1637633145, 0.0486330464, -0.0134405931, -0.0013748422, 0.2801888585, 0.4108682573, 0.4273438752, 0.1495099962, -0.0487959199, -0.0148146488, 0.069564566, -0.0541241467, 0.3933203816, 0.2981081605, 0.1234129369, 0.3966400623, 0.1295002848, -0.069794178, 0.1862989962, -0.2708439231, -0.1804252118, 0.2033932954, 0.3322364688, 0.1945763975, 0.3319145441, -0.1734600365, 0.0504391529, -0.3767873645, 0.0688006654, -0.0245940853, -0.0797671154, 0.1014869064, 0.075271152, 0.0506348871, -0.3402002156, 0.3276659548, 0.3530294895, 0.2047849298, -0.246063903, -0.4818522036, -0.7534543872, 0.251100719, -0.1440830082, -0.1838151515, -0.2389980257, 0.1205140054, -0.1504049599, 0.1064957231, -0.0394605324, -0.0312227048, -0.0206559729, -0.0829693004, -0.2197117656, -0.2052150518, 0.2064461708, -0.3215514123, -0.111676015, -0.3138566017, 0.1072220877, -0.1370763928, 0.0497749262, -0.0054870085, -0.2207740992, 0.0075331726, 0.2135257274, 0.180208236, 0.2631946504, 0.6508321166, 0.030620696, -0.1217553765, -0.2570911348, -0.1069286987, -0.0540276021, 0.1279270947, 0.1681352258, 0.4546608925, 0.082213603, 0.3446867168, -0.3246958852, 0.4766313732, 0.1532453597, -0.3483617902, -0.2064536065, 0.0085851494, -0.4279060364, 0.1680550128, -0.0878249854, 0.1111261919, -0.0251438133, 0.3450974822, -0.2159134597, 0.0450778753, 0.5796917677, -0.16427131, -0.0891052857, -0.3459124863, 0.1120371297, -0.1620555818, -0.264787972, -0.5371891856, 0.196902886, 0.2010464817, -0.0259511601, -0.2404851466, 0.2116145194, -0.0444228277, 0.2430716306, -0.0714147463, 0.2557101548, 0.140187338, -0.3658739626, -0.1365927011, -0.0890743881 ]
https://github.com/huggingface/datasets/issues/687
`ArrowInvalid` occurs while running `Dataset.map()` function
Hi ! This is because `encode` expects one single text as input (str), or one tokenized text (List[str]). I believe that you actually wanted to use `encode_batch` which expects a batch of texts. However this method is only available for our "fast" tokenizers (ex: BertTokenizerFast). BertJapanese is not one of them unfortunately and I don't think it will be added for now (see https://github.com/huggingface/transformers/pull/7141)... cc @thomwolf for confirmation. Therefore what I'd suggest for now is disable batching and process one text at a time using `encode`. Note that you can make it faster by using multiprocessing: ```python num_proc = None # Specify here the number of processes if you want to use multiprocessing. ex: num_proc = 4 encoded = train_ds.map( lambda example: {'tokens': t.encode(example['title'], max_length=1000)}, num_proc=num_proc ) ```
It seems to fail to process the final batch. This [colab](https://colab.research.google.com/drive/1_byLZRHwGP13PHMkJWo62Wp50S_Z2HMD?usp=sharing) can reproduce the error. Code: ```python # train_ds = Dataset(features: { # 'title': Value(dtype='string', id=None), # 'score': Value(dtype='float64', id=None) # }, num_rows: 99999) # suggested in #665 class PicklableTokenizer(BertJapaneseTokenizer): def __getstate__(self): state = dict(self.__dict__) state['do_lower_case'] = self.word_tokenizer.do_lower_case state['never_split'] = self.word_tokenizer.never_split del state['word_tokenizer'] return state def __setstate(self): do_lower_case = state.pop('do_lower_case') never_split = state.pop('never_split') self.__dict__ = state self.word_tokenizer = MecabTokenizer( do_lower_case=do_lower_case, never_split=never_split ) t = PicklableTokenizer.from_pretrained('bert-base-japanese-whole-word-masking') encoded = train_ds.map( lambda examples: {'tokens': t.encode(examples['title'], max_length=1000)}, batched=True, batch_size=1000 ) ``` Error Message: ``` 99% 99/100 [00:22<00:00, 39.07ba/s] --------------------------------------------------------------------------- ArrowInvalid Traceback (most recent call last) <timed exec> in <module> /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /usr/local/lib/python3.6/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 161 # Call actual function 162 --> 163 out = func(self, *args, **kwargs) 164 165 # Update fingerprint of in-place transforms + update in-place history of transforms /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, update_data) 1496 if update_data: 1497 batch = cast_to_python_objects(batch) -> 1498 writer.write_batch(batch) 1499 if update_data: 1500 writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file /usr/local/lib/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size) 271 typed_sequence = TypedSequence(batch_examples[col], type=col_type, try_type=col_try_type) 272 typed_sequence_examples[col] = typed_sequence --> 273 pa_table = pa.Table.from_pydict(typed_sequence_examples) 274 self.write_table(pa_table) 275 /usr/local/lib/python3.6/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_pydict() /usr/local/lib/python3.6/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_arrays() /usr/local/lib/python3.6/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.validate() /usr/local/lib/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowInvalid: Column 4 named tokens expected length 999 but got length 1000 ```
128
`ArrowInvalid` occurs while running `Dataset.map()` function It seems to fail to process the final batch. This [colab](https://colab.research.google.com/drive/1_byLZRHwGP13PHMkJWo62Wp50S_Z2HMD?usp=sharing) can reproduce the error. Code: ```python # train_ds = Dataset(features: { # 'title': Value(dtype='string', id=None), # 'score': Value(dtype='float64', id=None) # }, num_rows: 99999) # suggested in #665 class PicklableTokenizer(BertJapaneseTokenizer): def __getstate__(self): state = dict(self.__dict__) state['do_lower_case'] = self.word_tokenizer.do_lower_case state['never_split'] = self.word_tokenizer.never_split del state['word_tokenizer'] return state def __setstate(self): do_lower_case = state.pop('do_lower_case') never_split = state.pop('never_split') self.__dict__ = state self.word_tokenizer = MecabTokenizer( do_lower_case=do_lower_case, never_split=never_split ) t = PicklableTokenizer.from_pretrained('bert-base-japanese-whole-word-masking') encoded = train_ds.map( lambda examples: {'tokens': t.encode(examples['title'], max_length=1000)}, batched=True, batch_size=1000 ) ``` Error Message: ``` 99% 99/100 [00:22<00:00, 39.07ba/s] --------------------------------------------------------------------------- ArrowInvalid Traceback (most recent call last) <timed exec> in <module> /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /usr/local/lib/python3.6/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 161 # Call actual function 162 --> 163 out = func(self, *args, **kwargs) 164 165 # Update fingerprint of in-place transforms + update in-place history of transforms /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, update_data) 1496 if update_data: 1497 batch = cast_to_python_objects(batch) -> 1498 writer.write_batch(batch) 1499 if update_data: 1500 writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file /usr/local/lib/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size) 271 typed_sequence = TypedSequence(batch_examples[col], type=col_type, try_type=col_try_type) 272 typed_sequence_examples[col] = typed_sequence --> 273 pa_table = pa.Table.from_pydict(typed_sequence_examples) 274 self.write_table(pa_table) 275 /usr/local/lib/python3.6/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_pydict() /usr/local/lib/python3.6/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_arrays() /usr/local/lib/python3.6/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.validate() /usr/local/lib/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowInvalid: Column 4 named tokens expected length 999 but got length 1000 ``` Hi ! This is because `encode` expects one single text as input (str), or one tokenized text (List[str]). I believe that you actually wanted to use `encode_batch` which expects a batch of texts. However this method is only available for our "fast" tokenizers (ex: BertTokenizerFast). BertJapanese is not one of them unfortunately and I don't think it will be added for now (see https://github.com/huggingface/transformers/pull/7141)... cc @thomwolf for confirmation. Therefore what I'd suggest for now is disable batching and process one text at a time using `encode`. Note that you can make it faster by using multiprocessing: ```python num_proc = None # Specify here the number of processes if you want to use multiprocessing. ex: num_proc = 4 encoded = train_ds.map( lambda example: {'tokens': t.encode(example['title'], max_length=1000)}, num_proc=num_proc ) ```
[ -0.3730497658, 0.0209991802, -0.1026320085, -0.0166303106, 0.1107027456, 0.1678619534, 0.1268473864, 0.3861753047, -0.1962422282, 0.1160630137, 0.2094027996, 0.6037948728, -0.116786696, 0.0404954478, -0.3405692577, 0.0122456159, -0.0138799874, 0.2132772505, 0.0759288073, -0.2047145516, -0.4590320587, 0.0273314491, -0.3769527674, 0.2137222588, -0.2793798149, -0.4628056884, 0.27936849, -0.1693805307, -0.223879844, -0.7463966012, 0.2083990723, -0.3749464452, -0.0207391661, 0.3278742433, -0.0001172259, 0.042348288, 0.4025926292, 0.0688234344, -0.2501145303, -0.0585928112, -0.4430458248, 0.0925631449, -0.0866484493, -0.1329720318, 0.277874589, -0.0361050367, 0.0314679667, -0.4573633671, 0.3919551671, 0.2821493745, 0.1263703555, 0.2222544402, 0.1442391872, 0.0323249586, 0.1279152036, -0.1200695112, -0.0969363302, 0.1047373936, 0.0181519203, -0.2857321799, -0.0512989536, 0.515401721, 0.1809651852, 0.0922659412, -0.1417552233, -0.1290375739, 0.1971553266, -0.4126629531, 0.303137064, -0.0948617533, 0.0813262984, -0.1926682144, -0.4155084193, -0.0138595626, 0.1312632412, -0.1198016331, 0.0628941879, 0.0746488273, -0.092872493, 0.0599400364, -0.0519256964, 0.1670060009, -0.2132056653, 0.0801584944, 0.1788283288, 0.4855771065, 0.0136156585, 0.4012264311, 0.2158064097, -0.1161202788, 0.0043543312, 0.0970331579, 0.0199737325, 0.2417353839, -0.2374131531, -0.1274250001, -0.2640081942, -0.1885886788, 0.104825601, -0.3353905678, 0.1042772606, 0.007284292, 0.1545801461, 0.1884319633, 0.3311054111, 0.0799311399, 0.1156909987, 0.6522186399, -0.1187431514, -0.4918247461, -0.028596282, 0.098501198, -0.070180364, -0.4311810136, 0.2728591859, 0.3366881609, 0.1505463719, 0.1117760614, -0.386421591, 0.187138781, -0.5893790126, -0.0437153615, -0.0479698479, 0.1943124235, 0.1245249435, 0.0586616732, -0.0686170235, -0.053404253, -0.0046591698, -0.1363478899, -0.0411162488, 0.1084088981, -0.467828244, -0.0251714792, 0.0634238645, -0.0948989913, 0.3233497739, -0.0266726371, 0.1230677292, 0.0514649935, 0.3144243062, -0.296829313, 0.4440646172, 0.0961865783, -0.0872930363, 0.3249672949, 0.12958318, 0.1602934152, -0.0586594567, 0.1287120432, -0.1173378453, -0.230542317, 0.0751926824, 0.1038942859, 0.3227934241, -0.0253575314, -0.1583414972, -0.0692774877, 0.4308268726, -0.05578712, 0.178976655, -0.3901211023, 0.108979702, -0.2312532365, -0.0915206298, 0.2688696682, -0.5863619447, 0.1150185093, 0.0958044901, 0.2284137011, 0.2394200712, 0.251142025, -0.3237176538, 0.2681292295, -0.0672967508, 0.7344174981, 0.0913238898, -0.4536603689, -0.5696930885, 0.1651966423, -0.0714175776, -0.2872889936, -0.163580358, -0.0753734782, 0.1052657738, -0.0703788102, 0.2810492218, 0.1559284031, -0.2066259682, 0.0811993107, -0.0850825086, -0.1805369854, 0.1134612411, 0.0650475323, 0.1270642579, -0.2152685076, 0.041660592, -0.212101534, -0.0126661547, -0.0910452157, 0.3163723946, 0.1728591323, 0.1968009919, -0.0793103054, 0.1716613173, 0.0586775765, -0.0976554155, 0.1258587688, 0.0379588716, -0.1189674884, -0.4610621333, -0.2379848659, -0.3678558767, 0.3181091845, -0.4086676538, -0.022438392, 0.1247888282, 0.1545646191, -0.0500558056, -0.1316201836, -0.2792710066, -0.2015076727, 0.0223133881, -0.0179372635, -0.144354403, -0.0236085821, -0.1345304102, -0.3064616024, 0.1208037585, -0.0018814115, 0.1851110458, -0.0172277652, -0.2361747622, 0.4019811153, 0.1110517606, -0.1824734956, 0.265112251, -0.2703410685, 0.0067323283, -0.2617126405, -0.1663634181, 0.1191149354, 0.2205316722, 0.1281047314, 0.2508358955, 0.3558339477, 0.152208969, 0.1357201636, -0.1720412821, 0.0719727054, 0.1325083077, 0.1398833692, -0.1958691627, -0.2773179114, -0.2591813207, -0.1319920421, 0.5122653842, -0.1623487771, -0.11648608, 0.0374570675, 0.3888112009, 0.057344377, 0.0788704306, -0.046481099, -0.2116912007, 0.1952368766, 0.1356427222, 0.2061404586, 0.0987047777, 0.0820550397, 0.0950868055, -0.0831237212, 0.0089302948, 0.0431403592, 0.0941934064, 0.1881882995, 0.317827493, 0.2141553164, -0.0749312267, 0.054354392, -0.2489286959, -0.1475629508, 0.1688108891, 0.2606539726, -0.1852555126, 0.1725291163, -0.1887760609, -0.0659475848, -0.0683831573, -0.447170645, 0.1708283722, -0.2091739029, -0.0630616099, -0.0351294279, -0.1834741831, 0.4110240042, 0.0006334885, 0.1164893284, 0.4737395346, -0.015469241, -0.0733825341, -0.2766616344, -0.1933733672, -0.0152657619, 0.22835581, -0.1102729365, 0.2966180444, 0.2208100706, 0.0844047815, -0.2958570123, -0.0957250148, 0.2139254808, -0.1807052493, -0.0076029678, 0.2341922075, 0.0471360758, -0.5811721683, -0.3872245252, 0.1693432629, -0.0757255852, -0.2313340902, -0.1508605182, -0.0024692737, -0.2634735405, 0.0694962963, -0.3197093904, -0.2123730928, -0.2388970852, 0.1862350106, -0.2556760311, -0.0316172503, 0.0654446632, 0.2022592127, 0.3322202265, -0.0815655291, -0.3609609902, -0.1151164845, 0.016595915, 0.3085129857, -0.2723377943, 0.0018400288, 0.0299601592, -0.1951614767, 0.2619602084, 0.2316200286, -0.1621741354, 0.1872947067, -0.1391091198, 0.230462268, -0.3229134083, 0.2915930152, 0.3173619509, 0.2290570289, -0.1079700589, -0.2228883505, 0.0057420805, 0.1587740779, -0.1930841506, 0.0635002851, 0.0404600389, 0.4070855975, 0.0578367412, 0.9904158115, 0.3290009201, -0.1843484193, 0.1601356566, 0.0439406708, -0.1309335679, -0.1031862646, -0.2093011439, -0.1285343915, -0.2524229586, -0.0792857334, 0.1366005391, -0.1981547177, -0.3025013804, 0.2497550398, 0.0105879726, -0.5632715225, -0.2375912815, 0.2543940842, -0.2797157466, 0.2588543296, -0.0024122845, 0.0555761419, -0.2642836273, 0.2071426511, 0.0718878582, -0.3598583937, 0.3196206689, -0.1441476047, 0.0894445702, -0.2419470698, -0.3778178692, 0.3687333465, 0.3592779636, 0.6092719436, 0.0377678722, -0.007376004, -0.0294805877, 0.0970075205, 0.418197602, -0.3694484234, 0.081459932, -0.0399213992, -0.123145014, -0.0497128814, 0.0469381697, -0.2737922668, 0.5196661949, 0.3642603457, 0.2670815885, -0.2750949264, 0.002698699, 0.2009454221, -0.1017454043, 0.059040349, -0.0111810239, -0.1706310511, -0.0688262582, -0.5586472154, 0.1786674708, 0.4432713985, -0.1226820648, 0.2515911758, -0.1211954206, -0.2557684183, -0.1973855793, -0.0335434563, 0.1136313751, 0.3274050951, 0.2703151107, 0.0766887963, 0.162463367, 0.2545146346, 0.4407132268, 0.2038448751, -0.1080110744, -0.4675176442, 0.1281767339, -0.1398988515, 0.2996690571, 0.3086305261, -0.1780781746, 0.0501082167, 0.08818838, 0.0509531647, 0.2329250127, 0.2421566695, 0.2835569382, 0.2226179391, -0.4396376908, -0.2767534554, 0.4049758315, -0.0138686653, -0.0912982374, 0.6421586871, 0.3474166393, -0.1849975139, 0.3692865074, 0.4013646841, 0.7862713933, 0.2532506883, -0.0124247149, 0.1248402148, 0.2170797139, -0.1023469195, 0.4299083054, 0.1834251583, -0.3477331996, 0.2617436647, 0.0012241931, -0.0906034783, 0.0341692045, 0.1903271228, -0.2757632434, -0.0677875727, -0.1211130694, 0.0702949837, 0.0555841029, -0.001687078, -0.0833589807, -0.3312817216, 0.1922796816, 0.0611589924, 0.0844455436, -0.0350098759, -0.1506825984, -0.2564361691, -0.1501163095, -0.1496677548, -0.1197079197, 0.0060360343, -0.6829078197, 0.5650308728, -0.0459310897, -0.0839270875, 0.150969401, -0.0842972472, 0.3340730369, 0.0255803932, -0.0353463404, 0.1205935404, 0.4888460636, -0.1497038603, -0.1564608216, -0.2073268443, 0.3092965782, -0.0101798391, -0.1845763326, 0.1222865731, -0.1697841436, -0.3743090332, -0.0325556286, 0.0764171854, 0.1754270792, -0.3503100872, -0.22720851, -0.0709935799, -0.3393777311, -0.1550417393, 0.0502095595, -0.1336154938, -0.173111707, 0.2058070153, 0.0522393808, -0.3172766268, 0.2279915959, 0.1361303926, -0.0892232507, 0.0557558946, 0.8029522896, -0.1772934943, -0.2020334303, -0.2253222317, 0.1978301257, 0.5487525463, -0.3811811209, 0.1656247526, -0.3322673738, 0.0752160028, 0.1803030521, 0.3500504792, 0.1772226393, 0.1831655204, -0.1500355154, -0.3336005807, -0.3557192981, 0.1322588176, -0.1198242307, 0.3273668289, 0.0387879983, 0.3118834198, -0.0322746374, 0.0812253207, -0.2580688596, -0.157223627, -0.223839134, 0.2041136622, 0.0935176536, 0.1801962703, -0.0656201914, 0.1206874028, 0.0327499434, 0.5000813007, -0.1537913978, -0.1777280867, 0.0156329609, 0.1212536916, 0.1292292029, -0.0560175143, -0.0715842396, -0.1047160029, -0.2849642336, -0.044643309, -0.1142786816, -0.1097288504, 0.0111784637, 0.2695168555, 0.1076425835, 0.0190409459, 0.0980494842, -0.0959708989, -0.003266352, 0.0494811498, -0.0821528584, 0.3108961582, 0.1330128014, -0.0022525317, -0.0481838211, -0.1015684679, 0.0886421278, 0.192650646, 0.0492646955, -0.5152288079, -0.0905362889, 0.0867753625, 0.1024259627, 0.2516391575, -0.303319037, -0.2979983687, 0.3304133415, 0.1884913892, -0.2688322365, -0.0114830425, 0.1021455824, -0.0675078109, 0.1170437336, 0.0695644543, -0.1452986449, 0.0703053176, -0.250669241, 0.1509168446, -0.0121548008, -0.2579901814, 0.1355051994, 0.4885169268, -0.0827947184, 0.072535947, 0.2948013246, 0.2546040416, 0.4049092829, 0.5791915059, -0.1654969156, 0.618457675, 0.2191296071, 0.0881405175, -0.0633769631, -0.1177316606, 0.0770789832, 0.2516072094, -0.0624552667, 0.2434406877, 0.4535254538, 0.4902362823, -0.2501932979, -0.4952513874, 0.1045918539, 0.0324255452, -0.3045407236, -0.0541483164, -0.6603555083, -0.1197682619, -0.0567465276, 0.0155297955, -0.1565536261, 0.316272974, 0.4219380915, 0.1472986341, -0.0421626382, -0.1396860927, -0.2276958972, 0.2237730473, 0.2358185351, -0.3784120977, 0.0090176994, -0.0332622379, 0.010948495, -0.2814302146, 0.4175462127, 0.4623648822, 0.3912785649, -0.311211139, -0.0724626631, -0.056184005, -0.0738908723, 0.0694636628, 0.1608724296, 0.3394021392, -0.0586865395, 0.3028183281, 0.0987349302, -0.1526953429, -0.0308850557, 0.199658528, 0.222964853, 0.235916853, -0.2860496342, -0.0518290699, -0.1972735077, -0.0275576152, 0.0090580247, -0.3988694549, 0.3152640462, 0.3137667477, -0.113028802, 0.0687767789, -0.1158984527, 0.0592511259, -0.0700497404, 0.5608128309, 0.4262844324, -0.0452024043, -0.3998955488, -0.1887740046, -0.3950438499, 0.1455416828, -0.2550317347, -0.0440197662, 0.058186993, 0.0753253549, 0.1059388742, 0.3091359735, 0.3110458255, -0.055692587, -0.2100164592, 0.4253174961, -0.1567311734, -0.0507001318, 0.05985469, -0.0091931019, 0.1691810489, -0.4654399157, 0.0733948275, 0.1306339651, 0.0990782604, -0.1603720039, -0.4318062663, 0.0909193158, -0.1860196292, 0.5836700201, 0.2212093621, 0.1505900621, -0.2123440504, -0.0772730336, -0.1093368605, -0.2141530812, -0.126741901, 0.0200577304, 0.3289567232, 0.5786898136, -0.075355947, 0.0539231338, -0.2971650958, -0.1712230444, 0.0016310005, -0.0309429597, -0.2057599127, 0.1793767661, -0.1247465834, 0.0558501333, -0.265297085, 0.2664734125, 0.0658194497, 0.1168127581, -0.398246944, -0.347959131, 0.5152160525, -0.6306794286, -0.6763504148, 0.0664056838, -0.1369708329, 0.333130002, -0.0322295614, -0.4938648045, -0.0091206096, 0.1045908481, 0.049335897, -0.4475871921, -0.0207460038, 0.0198747646, 0.1007239297, 0.0060972637, 0.663965404, 0.1340134889, -0.1051305905, -0.0541319065, -0.3198483586 ]
https://github.com/huggingface/datasets/issues/687
`ArrowInvalid` occurs while running `Dataset.map()` function
Thank you very much for the kind and precise suggestion! I'm looking forward to seeing BertJapaneseTokenizer built into the "fast" tokenizers. I tried `map` with multiprocessing as follows, and it worked! ```python # There was a Pickle problem if I use `lambda` for multiprocessing def encode(examples): return {'tokens': t.encode(examples['title'], max_length=1000)} num_proc = 8 encoded = train_ds.map(encode, num_proc=num_proc) ``` Thank you again!
It seems to fail to process the final batch. This [colab](https://colab.research.google.com/drive/1_byLZRHwGP13PHMkJWo62Wp50S_Z2HMD?usp=sharing) can reproduce the error. Code: ```python # train_ds = Dataset(features: { # 'title': Value(dtype='string', id=None), # 'score': Value(dtype='float64', id=None) # }, num_rows: 99999) # suggested in #665 class PicklableTokenizer(BertJapaneseTokenizer): def __getstate__(self): state = dict(self.__dict__) state['do_lower_case'] = self.word_tokenizer.do_lower_case state['never_split'] = self.word_tokenizer.never_split del state['word_tokenizer'] return state def __setstate(self): do_lower_case = state.pop('do_lower_case') never_split = state.pop('never_split') self.__dict__ = state self.word_tokenizer = MecabTokenizer( do_lower_case=do_lower_case, never_split=never_split ) t = PicklableTokenizer.from_pretrained('bert-base-japanese-whole-word-masking') encoded = train_ds.map( lambda examples: {'tokens': t.encode(examples['title'], max_length=1000)}, batched=True, batch_size=1000 ) ``` Error Message: ``` 99% 99/100 [00:22<00:00, 39.07ba/s] --------------------------------------------------------------------------- ArrowInvalid Traceback (most recent call last) <timed exec> in <module> /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /usr/local/lib/python3.6/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 161 # Call actual function 162 --> 163 out = func(self, *args, **kwargs) 164 165 # Update fingerprint of in-place transforms + update in-place history of transforms /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, update_data) 1496 if update_data: 1497 batch = cast_to_python_objects(batch) -> 1498 writer.write_batch(batch) 1499 if update_data: 1500 writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file /usr/local/lib/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size) 271 typed_sequence = TypedSequence(batch_examples[col], type=col_type, try_type=col_try_type) 272 typed_sequence_examples[col] = typed_sequence --> 273 pa_table = pa.Table.from_pydict(typed_sequence_examples) 274 self.write_table(pa_table) 275 /usr/local/lib/python3.6/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_pydict() /usr/local/lib/python3.6/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_arrays() /usr/local/lib/python3.6/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.validate() /usr/local/lib/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowInvalid: Column 4 named tokens expected length 999 but got length 1000 ```
61
`ArrowInvalid` occurs while running `Dataset.map()` function It seems to fail to process the final batch. This [colab](https://colab.research.google.com/drive/1_byLZRHwGP13PHMkJWo62Wp50S_Z2HMD?usp=sharing) can reproduce the error. Code: ```python # train_ds = Dataset(features: { # 'title': Value(dtype='string', id=None), # 'score': Value(dtype='float64', id=None) # }, num_rows: 99999) # suggested in #665 class PicklableTokenizer(BertJapaneseTokenizer): def __getstate__(self): state = dict(self.__dict__) state['do_lower_case'] = self.word_tokenizer.do_lower_case state['never_split'] = self.word_tokenizer.never_split del state['word_tokenizer'] return state def __setstate(self): do_lower_case = state.pop('do_lower_case') never_split = state.pop('never_split') self.__dict__ = state self.word_tokenizer = MecabTokenizer( do_lower_case=do_lower_case, never_split=never_split ) t = PicklableTokenizer.from_pretrained('bert-base-japanese-whole-word-masking') encoded = train_ds.map( lambda examples: {'tokens': t.encode(examples['title'], max_length=1000)}, batched=True, batch_size=1000 ) ``` Error Message: ``` 99% 99/100 [00:22<00:00, 39.07ba/s] --------------------------------------------------------------------------- ArrowInvalid Traceback (most recent call last) <timed exec> in <module> /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /usr/local/lib/python3.6/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 161 # Call actual function 162 --> 163 out = func(self, *args, **kwargs) 164 165 # Update fingerprint of in-place transforms + update in-place history of transforms /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, update_data) 1496 if update_data: 1497 batch = cast_to_python_objects(batch) -> 1498 writer.write_batch(batch) 1499 if update_data: 1500 writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file /usr/local/lib/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size) 271 typed_sequence = TypedSequence(batch_examples[col], type=col_type, try_type=col_try_type) 272 typed_sequence_examples[col] = typed_sequence --> 273 pa_table = pa.Table.from_pydict(typed_sequence_examples) 274 self.write_table(pa_table) 275 /usr/local/lib/python3.6/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_pydict() /usr/local/lib/python3.6/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_arrays() /usr/local/lib/python3.6/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.validate() /usr/local/lib/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowInvalid: Column 4 named tokens expected length 999 but got length 1000 ``` Thank you very much for the kind and precise suggestion! I'm looking forward to seeing BertJapaneseTokenizer built into the "fast" tokenizers. I tried `map` with multiprocessing as follows, and it worked! ```python # There was a Pickle problem if I use `lambda` for multiprocessing def encode(examples): return {'tokens': t.encode(examples['title'], max_length=1000)} num_proc = 8 encoded = train_ds.map(encode, num_proc=num_proc) ``` Thank you again!
[ -0.3730497658, 0.0209991802, -0.1026320085, -0.0166303106, 0.1107027456, 0.1678619534, 0.1268473864, 0.3861753047, -0.1962422282, 0.1160630137, 0.2094027996, 0.6037948728, -0.116786696, 0.0404954478, -0.3405692577, 0.0122456159, -0.0138799874, 0.2132772505, 0.0759288073, -0.2047145516, -0.4590320587, 0.0273314491, -0.3769527674, 0.2137222588, -0.2793798149, -0.4628056884, 0.27936849, -0.1693805307, -0.223879844, -0.7463966012, 0.2083990723, -0.3749464452, -0.0207391661, 0.3278742433, -0.0001172259, 0.042348288, 0.4025926292, 0.0688234344, -0.2501145303, -0.0585928112, -0.4430458248, 0.0925631449, -0.0866484493, -0.1329720318, 0.277874589, -0.0361050367, 0.0314679667, -0.4573633671, 0.3919551671, 0.2821493745, 0.1263703555, 0.2222544402, 0.1442391872, 0.0323249586, 0.1279152036, -0.1200695112, -0.0969363302, 0.1047373936, 0.0181519203, -0.2857321799, -0.0512989536, 0.515401721, 0.1809651852, 0.0922659412, -0.1417552233, -0.1290375739, 0.1971553266, -0.4126629531, 0.303137064, -0.0948617533, 0.0813262984, -0.1926682144, -0.4155084193, -0.0138595626, 0.1312632412, -0.1198016331, 0.0628941879, 0.0746488273, -0.092872493, 0.0599400364, -0.0519256964, 0.1670060009, -0.2132056653, 0.0801584944, 0.1788283288, 0.4855771065, 0.0136156585, 0.4012264311, 0.2158064097, -0.1161202788, 0.0043543312, 0.0970331579, 0.0199737325, 0.2417353839, -0.2374131531, -0.1274250001, -0.2640081942, -0.1885886788, 0.104825601, -0.3353905678, 0.1042772606, 0.007284292, 0.1545801461, 0.1884319633, 0.3311054111, 0.0799311399, 0.1156909987, 0.6522186399, -0.1187431514, -0.4918247461, -0.028596282, 0.098501198, -0.070180364, -0.4311810136, 0.2728591859, 0.3366881609, 0.1505463719, 0.1117760614, -0.386421591, 0.187138781, -0.5893790126, -0.0437153615, -0.0479698479, 0.1943124235, 0.1245249435, 0.0586616732, -0.0686170235, -0.053404253, -0.0046591698, -0.1363478899, -0.0411162488, 0.1084088981, -0.467828244, -0.0251714792, 0.0634238645, -0.0948989913, 0.3233497739, -0.0266726371, 0.1230677292, 0.0514649935, 0.3144243062, -0.296829313, 0.4440646172, 0.0961865783, -0.0872930363, 0.3249672949, 0.12958318, 0.1602934152, -0.0586594567, 0.1287120432, -0.1173378453, -0.230542317, 0.0751926824, 0.1038942859, 0.3227934241, -0.0253575314, -0.1583414972, -0.0692774877, 0.4308268726, -0.05578712, 0.178976655, -0.3901211023, 0.108979702, -0.2312532365, -0.0915206298, 0.2688696682, -0.5863619447, 0.1150185093, 0.0958044901, 0.2284137011, 0.2394200712, 0.251142025, -0.3237176538, 0.2681292295, -0.0672967508, 0.7344174981, 0.0913238898, -0.4536603689, -0.5696930885, 0.1651966423, -0.0714175776, -0.2872889936, -0.163580358, -0.0753734782, 0.1052657738, -0.0703788102, 0.2810492218, 0.1559284031, -0.2066259682, 0.0811993107, -0.0850825086, -0.1805369854, 0.1134612411, 0.0650475323, 0.1270642579, -0.2152685076, 0.041660592, -0.212101534, -0.0126661547, -0.0910452157, 0.3163723946, 0.1728591323, 0.1968009919, -0.0793103054, 0.1716613173, 0.0586775765, -0.0976554155, 0.1258587688, 0.0379588716, -0.1189674884, -0.4610621333, -0.2379848659, -0.3678558767, 0.3181091845, -0.4086676538, -0.022438392, 0.1247888282, 0.1545646191, -0.0500558056, -0.1316201836, -0.2792710066, -0.2015076727, 0.0223133881, -0.0179372635, -0.144354403, -0.0236085821, -0.1345304102, -0.3064616024, 0.1208037585, -0.0018814115, 0.1851110458, -0.0172277652, -0.2361747622, 0.4019811153, 0.1110517606, -0.1824734956, 0.265112251, -0.2703410685, 0.0067323283, -0.2617126405, -0.1663634181, 0.1191149354, 0.2205316722, 0.1281047314, 0.2508358955, 0.3558339477, 0.152208969, 0.1357201636, -0.1720412821, 0.0719727054, 0.1325083077, 0.1398833692, -0.1958691627, -0.2773179114, -0.2591813207, -0.1319920421, 0.5122653842, -0.1623487771, -0.11648608, 0.0374570675, 0.3888112009, 0.057344377, 0.0788704306, -0.046481099, -0.2116912007, 0.1952368766, 0.1356427222, 0.2061404586, 0.0987047777, 0.0820550397, 0.0950868055, -0.0831237212, 0.0089302948, 0.0431403592, 0.0941934064, 0.1881882995, 0.317827493, 0.2141553164, -0.0749312267, 0.054354392, -0.2489286959, -0.1475629508, 0.1688108891, 0.2606539726, -0.1852555126, 0.1725291163, -0.1887760609, -0.0659475848, -0.0683831573, -0.447170645, 0.1708283722, -0.2091739029, -0.0630616099, -0.0351294279, -0.1834741831, 0.4110240042, 0.0006334885, 0.1164893284, 0.4737395346, -0.015469241, -0.0733825341, -0.2766616344, -0.1933733672, -0.0152657619, 0.22835581, -0.1102729365, 0.2966180444, 0.2208100706, 0.0844047815, -0.2958570123, -0.0957250148, 0.2139254808, -0.1807052493, -0.0076029678, 0.2341922075, 0.0471360758, -0.5811721683, -0.3872245252, 0.1693432629, -0.0757255852, -0.2313340902, -0.1508605182, -0.0024692737, -0.2634735405, 0.0694962963, -0.3197093904, -0.2123730928, -0.2388970852, 0.1862350106, -0.2556760311, -0.0316172503, 0.0654446632, 0.2022592127, 0.3322202265, -0.0815655291, -0.3609609902, -0.1151164845, 0.016595915, 0.3085129857, -0.2723377943, 0.0018400288, 0.0299601592, -0.1951614767, 0.2619602084, 0.2316200286, -0.1621741354, 0.1872947067, -0.1391091198, 0.230462268, -0.3229134083, 0.2915930152, 0.3173619509, 0.2290570289, -0.1079700589, -0.2228883505, 0.0057420805, 0.1587740779, -0.1930841506, 0.0635002851, 0.0404600389, 0.4070855975, 0.0578367412, 0.9904158115, 0.3290009201, -0.1843484193, 0.1601356566, 0.0439406708, -0.1309335679, -0.1031862646, -0.2093011439, -0.1285343915, -0.2524229586, -0.0792857334, 0.1366005391, -0.1981547177, -0.3025013804, 0.2497550398, 0.0105879726, -0.5632715225, -0.2375912815, 0.2543940842, -0.2797157466, 0.2588543296, -0.0024122845, 0.0555761419, -0.2642836273, 0.2071426511, 0.0718878582, -0.3598583937, 0.3196206689, -0.1441476047, 0.0894445702, -0.2419470698, -0.3778178692, 0.3687333465, 0.3592779636, 0.6092719436, 0.0377678722, -0.007376004, -0.0294805877, 0.0970075205, 0.418197602, -0.3694484234, 0.081459932, -0.0399213992, -0.123145014, -0.0497128814, 0.0469381697, -0.2737922668, 0.5196661949, 0.3642603457, 0.2670815885, -0.2750949264, 0.002698699, 0.2009454221, -0.1017454043, 0.059040349, -0.0111810239, -0.1706310511, -0.0688262582, -0.5586472154, 0.1786674708, 0.4432713985, -0.1226820648, 0.2515911758, -0.1211954206, -0.2557684183, -0.1973855793, -0.0335434563, 0.1136313751, 0.3274050951, 0.2703151107, 0.0766887963, 0.162463367, 0.2545146346, 0.4407132268, 0.2038448751, -0.1080110744, -0.4675176442, 0.1281767339, -0.1398988515, 0.2996690571, 0.3086305261, -0.1780781746, 0.0501082167, 0.08818838, 0.0509531647, 0.2329250127, 0.2421566695, 0.2835569382, 0.2226179391, -0.4396376908, -0.2767534554, 0.4049758315, -0.0138686653, -0.0912982374, 0.6421586871, 0.3474166393, -0.1849975139, 0.3692865074, 0.4013646841, 0.7862713933, 0.2532506883, -0.0124247149, 0.1248402148, 0.2170797139, -0.1023469195, 0.4299083054, 0.1834251583, -0.3477331996, 0.2617436647, 0.0012241931, -0.0906034783, 0.0341692045, 0.1903271228, -0.2757632434, -0.0677875727, -0.1211130694, 0.0702949837, 0.0555841029, -0.001687078, -0.0833589807, -0.3312817216, 0.1922796816, 0.0611589924, 0.0844455436, -0.0350098759, -0.1506825984, -0.2564361691, -0.1501163095, -0.1496677548, -0.1197079197, 0.0060360343, -0.6829078197, 0.5650308728, -0.0459310897, -0.0839270875, 0.150969401, -0.0842972472, 0.3340730369, 0.0255803932, -0.0353463404, 0.1205935404, 0.4888460636, -0.1497038603, -0.1564608216, -0.2073268443, 0.3092965782, -0.0101798391, -0.1845763326, 0.1222865731, -0.1697841436, -0.3743090332, -0.0325556286, 0.0764171854, 0.1754270792, -0.3503100872, -0.22720851, -0.0709935799, -0.3393777311, -0.1550417393, 0.0502095595, -0.1336154938, -0.173111707, 0.2058070153, 0.0522393808, -0.3172766268, 0.2279915959, 0.1361303926, -0.0892232507, 0.0557558946, 0.8029522896, -0.1772934943, -0.2020334303, -0.2253222317, 0.1978301257, 0.5487525463, -0.3811811209, 0.1656247526, -0.3322673738, 0.0752160028, 0.1803030521, 0.3500504792, 0.1772226393, 0.1831655204, -0.1500355154, -0.3336005807, -0.3557192981, 0.1322588176, -0.1198242307, 0.3273668289, 0.0387879983, 0.3118834198, -0.0322746374, 0.0812253207, -0.2580688596, -0.157223627, -0.223839134, 0.2041136622, 0.0935176536, 0.1801962703, -0.0656201914, 0.1206874028, 0.0327499434, 0.5000813007, -0.1537913978, -0.1777280867, 0.0156329609, 0.1212536916, 0.1292292029, -0.0560175143, -0.0715842396, -0.1047160029, -0.2849642336, -0.044643309, -0.1142786816, -0.1097288504, 0.0111784637, 0.2695168555, 0.1076425835, 0.0190409459, 0.0980494842, -0.0959708989, -0.003266352, 0.0494811498, -0.0821528584, 0.3108961582, 0.1330128014, -0.0022525317, -0.0481838211, -0.1015684679, 0.0886421278, 0.192650646, 0.0492646955, -0.5152288079, -0.0905362889, 0.0867753625, 0.1024259627, 0.2516391575, -0.303319037, -0.2979983687, 0.3304133415, 0.1884913892, -0.2688322365, -0.0114830425, 0.1021455824, -0.0675078109, 0.1170437336, 0.0695644543, -0.1452986449, 0.0703053176, -0.250669241, 0.1509168446, -0.0121548008, -0.2579901814, 0.1355051994, 0.4885169268, -0.0827947184, 0.072535947, 0.2948013246, 0.2546040416, 0.4049092829, 0.5791915059, -0.1654969156, 0.618457675, 0.2191296071, 0.0881405175, -0.0633769631, -0.1177316606, 0.0770789832, 0.2516072094, -0.0624552667, 0.2434406877, 0.4535254538, 0.4902362823, -0.2501932979, -0.4952513874, 0.1045918539, 0.0324255452, -0.3045407236, -0.0541483164, -0.6603555083, -0.1197682619, -0.0567465276, 0.0155297955, -0.1565536261, 0.316272974, 0.4219380915, 0.1472986341, -0.0421626382, -0.1396860927, -0.2276958972, 0.2237730473, 0.2358185351, -0.3784120977, 0.0090176994, -0.0332622379, 0.010948495, -0.2814302146, 0.4175462127, 0.4623648822, 0.3912785649, -0.311211139, -0.0724626631, -0.056184005, -0.0738908723, 0.0694636628, 0.1608724296, 0.3394021392, -0.0586865395, 0.3028183281, 0.0987349302, -0.1526953429, -0.0308850557, 0.199658528, 0.222964853, 0.235916853, -0.2860496342, -0.0518290699, -0.1972735077, -0.0275576152, 0.0090580247, -0.3988694549, 0.3152640462, 0.3137667477, -0.113028802, 0.0687767789, -0.1158984527, 0.0592511259, -0.0700497404, 0.5608128309, 0.4262844324, -0.0452024043, -0.3998955488, -0.1887740046, -0.3950438499, 0.1455416828, -0.2550317347, -0.0440197662, 0.058186993, 0.0753253549, 0.1059388742, 0.3091359735, 0.3110458255, -0.055692587, -0.2100164592, 0.4253174961, -0.1567311734, -0.0507001318, 0.05985469, -0.0091931019, 0.1691810489, -0.4654399157, 0.0733948275, 0.1306339651, 0.0990782604, -0.1603720039, -0.4318062663, 0.0909193158, -0.1860196292, 0.5836700201, 0.2212093621, 0.1505900621, -0.2123440504, -0.0772730336, -0.1093368605, -0.2141530812, -0.126741901, 0.0200577304, 0.3289567232, 0.5786898136, -0.075355947, 0.0539231338, -0.2971650958, -0.1712230444, 0.0016310005, -0.0309429597, -0.2057599127, 0.1793767661, -0.1247465834, 0.0558501333, -0.265297085, 0.2664734125, 0.0658194497, 0.1168127581, -0.398246944, -0.347959131, 0.5152160525, -0.6306794286, -0.6763504148, 0.0664056838, -0.1369708329, 0.333130002, -0.0322295614, -0.4938648045, -0.0091206096, 0.1045908481, 0.049335897, -0.4475871921, -0.0207460038, 0.0198747646, 0.1007239297, 0.0060972637, 0.663965404, 0.1340134889, -0.1051305905, -0.0541319065, -0.3198483586 ]
https://github.com/huggingface/datasets/issues/686
Dataset browser url is still https://huggingface.co/nlp/viewer/
Yes! might do it with @srush one of these days. Hopefully it won't break too many links (we can always redirect from old url to new)
Might be worth updating to https://huggingface.co/datasets/viewer/
26
Dataset browser url is still https://huggingface.co/nlp/viewer/ Might be worth updating to https://huggingface.co/datasets/viewer/ Yes! might do it with @srush one of these days. Hopefully it won't break too many links (we can always redirect from old url to new)
[ -0.15292494, 0.2032144666, -0.0998434499, -0.1728724688, 0.1061698943, 0.0467372984, 0.1794256717, 0.2390704155, -0.050067164, -0.0185794104, -0.1565577686, 0.3058709502, 0.1280385703, 0.1724736243, 0.3105864823, 0.0242812522, 0.0012545042, -0.0140794292, -0.1639333069, -0.0225633122, -0.1863491684, 0.0512108468, -0.1951391995, 0.1806411743, -0.0065673068, 0.0746076033, -0.0707539544, 0.2305045873, -0.1770766824, -0.398958683, 0.1384261847, 0.168006137, -0.0488180406, 0.2282090634, -0.0000960609, 0.0672142133, 0.4233933985, 0.2476761043, -0.344664067, -0.0000747268, -0.3106378913, -0.0652956516, 0.1053101495, -0.1298186183, -0.1422041804, -0.2468429804, 0.3551160395, -0.0652977675, 0.073693864, 0.2408899665, 0.3633950651, 0.3327020407, -0.1858961433, -0.089773491, -0.0542070381, 0.1208047867, -0.0696512908, 0.0434557348, -0.0182179268, 0.066160202, -0.2392884195, 0.5611267686, 0.2315682918, -0.0279474594, 0.2009711713, -0.0143024959, -0.3537662923, 0.0535261817, 0.0790434182, 0.0550479107, 0.6027997732, -0.1018183529, -0.1742537171, -0.0268565454, -0.0725952238, 0.0548229814, 0.263886869, 0.1445003003, 0.0604989305, 0.2288692743, -0.2419082671, -0.50084728, -0.1607080698, 0.1459703743, -0.1318549812, 0.3666666448, -0.095579505, -0.0348553658, 0.1961886138, -0.1912984699, 0.2546563745, 0.1204182431, -0.0303971823, -0.2633925676, 0.1133595929, -0.0686039254, 0.2350058109, 0.4213660657, 0.0431768261, 0.2189742029, 0.1547899395, 0.14856866, -0.188445732, -0.0044194167, 0.0471916534, -0.0387112834, 0.0920071006, -0.0088651115, 0.6043274999, 0.2491926849, 0.2259242386, -0.0179777239, 0.1733006686, -0.3365873694, -0.3934386671, -0.3392243385, 0.2704303563, -0.1058421806, -0.162116915, -0.1167056561, 0.1140188351, -0.0489498079, -0.0150494557, 0.3982776105, -0.1377292871, -0.0157084446, -0.0406847857, -0.1462122798, -0.2074070722, -0.2186150253, -0.3124216795, 0.0294861775, -0.3069174886, -0.0521593988, 0.2305072397, -0.0377480909, 0.1992869377, -0.1417883039, -0.1505472213, 0.0472170748, -0.263504535, 0.2486745417, 0.0366091281, 0.1801089346, 0.0523632392, 0.0448476635, 0.020916963, -0.2001551539, 0.0460466333, 0.0541518852, -0.2276468128, -0.1882443428, -0.1267293692, 0.2991304398, -0.1316421181, -0.3244578838, 0.0465981252, 0.2064769715, -0.252592504, -0.1256888807, -0.0884675458, 0.2324636579, -0.1503421217, 0.0034821017, 0.07616961, 0.2025158405, -0.1588961333, -0.2690928876, 0.0305514522, -0.2208426446, -0.2299479991, 0.2701798975, -0.2201054692, -0.2789734304, -0.3101258278, 0.2633774281, 0.6101360917, -0.1696667522, -0.3256675303, 0.1079002544, -0.2597178817, -0.2637860477, -0.0873491168, 0.1183228418, -0.0149702309, -0.0187621173, -0.0144958496, 0.1476343572, 0.1448701322, 0.2199283242, -0.2966607213, -0.2687578201, 0.0122952377, 0.0855506137, 0.0404119194, -0.0115384059, 0.1467531919, -0.1777267754, 0.4457989931, -0.0647555292, -0.0068595642, 0.1231624186, 0.3145542145, 0.097489439, -0.0806365758, -0.0708973929, -0.2656245828, -0.1158179045, 0.0696804672, 0.1581615359, 0.0177503489, -0.2546257675, -0.3468809426, 0.0013947517, -0.1944440305, -0.1649835855, 0.2775954306, 0.2337371707, -0.2706081867, 0.2563651204, -0.242731303, 0.0653674826, 0.1290628612, 0.234382987, -0.35971573, 0.3342649937, -0.1244113892, 0.1992956251, 0.1714465618, -0.0682585612, 0.2153655589, -0.0765553489, 0.0236229673, 0.3552126884, -0.1429526806, 0.3339487314, 0.4800485075, -0.0572705865, 0.3015576005, -0.4770200253, 0.1557275206, 0.1190633103, -0.1607521176, 0.3650278747, -0.2998687923, 0.0101010408, -0.068044655, 0.0613685548, 0.1825458258, 0.2595224977, 0.3625398278, -0.3248932958, -0.203279689, -0.2347911447, -0.0175854657, 0.1589594036, 0.1128978953, 0.0513963439, -0.4989532828, 0.3118695021, 0.1154958755, -0.0290466007, -0.0476505421, 0.3867291808, -0.2414717525, -0.3074485958, 0.2407454401, 0.280131489, -0.0437579341, 0.3403137326, 0.2554677725, 0.1932933033, -0.0012780806, -0.3980716467, 0.1768646091, 0.1721524447, 0.0027356721, 0.008860277, 0.1737408489, -0.2945384979, -0.6536638141, -0.005875648, -0.0075586922, 0.0107462639, -0.3394153118, 0.0236081779, -0.4454857111, -0.6335577369, -0.266954869, -0.1445800811, -0.3213297725, -0.537121892, 0.1742299795, 0.1724798381, -0.3501806855, 0.3709135652, -0.3496398926, 0.3366973102, -0.1685070395, 0.2599728405, -0.2313672304, -0.1633766443, -0.228446126, 0.2568376362, 0.0770872459, 0.174969703, 0.3014184535, -0.0565682724, 0.1974834055, -0.6858537197, -0.4707407653, 0.1699633747, 0.2959241867, 0.1817479283, 0.1927588284, 0.1188540831, 0.0080202445, -0.064292863, 0.2318262309, 0.0027227751, 0.035466399, -0.2211147249, -0.0204487592, 0.1329498291, 0.0118380524, -0.3134477437, -0.168644309, -0.2678631544, 0.0422298945, -0.1890999675, 0.129580617, 0.1280422062, -0.03402289, -0.1728271991, -0.1392837167, -0.0964621678, -0.2624017894, -0.3715261817, 0.2499986589, -0.4449138045, -0.3064362109, 0.0055770697, 0.1480793655, 0.1420972347, -0.0593502149, -0.5062496662, -0.2804403901, -0.1307620406, 0.0351853892, 0.2475958467, 0.0029959697, 0.1048960537, 0.1557348967, -0.3758841455, 0.0317995697, -0.3364631534, -0.0537688509, -0.0949010104, 0.280649215, 0.0083976658, 0.2198596597, 0.2289398462, 0.3426801562, 0.1634792387, 0.0199130923, 0.2377624363, -0.1535304189, 0.4485101402, 0.1821882278, -0.1965881437, 0.2710145116, 0.0751451477, 0.0043193214, 0.3426810205, 0.2689027786, 0.0984882489, -0.2077538669, -0.1613914371, -0.271985352, -0.4872806668, -0.0833560079, 0.0242726412, 0.1197449267, 0.3425943851, 0.0877240598, -0.2497603297, -0.2247463614, 0.1520170122, 0.3736484945, 0.0169870332, -0.04950599, -0.269638449, 0.2313541472, -0.6547810435, 0.2687750757, -0.1115645841, 0.1053989828, 0.0420822613, -0.147343114, 0.144411698, -0.0495909266, 0.620221138, -0.0586730205, 0.1136015356, -0.0650485903, 0.0678820163, -0.2452939004, 0.2540537417, 0.1758589447, 0.1474566609, 0.1789119691, 0.1102557108, -0.1125405356, -0.2522717416, 0.3403681517, -0.2710325718, -0.1940621883, -0.101626344, -0.0210624728, -0.2907533348, 0.0051703253, -0.0885717422, -0.204238534, -0.0454114527, 0.0387418568, -0.0686731115, 0.0498041585, -0.3015014827, -0.0142156091, 0.1484458148, 0.1374401599, 0.2187380493, -0.1437192559, 0.308555603, 0.43032974, 0.0874607041, 0.4343457222, -0.1887727529, -0.3583959341, 0.0380583145, 0.1178709418, 0.2680726945, 0.4299914837, 0.0566064082, 0.049639497, 0.3776903749, 0.2128891647, -0.1849479675, 0.1865597814, 0.1830232143, 0.0021555827, -0.2337555736, -0.2346226871, 0.3446407318, -0.0576435216, -0.1991615742, 0.0754684657, 0.4092163444, -0.1977350116, -0.2255457938, -0.0405852981, 0.7620613575, -0.0155288689, 0.1551638544, 0.3432326019, -0.3480367959, 0.4521663785, -0.0392811261, 0.2377867997, -0.308750242, -0.204277873, -0.0663168952, 0.0424937457, 0.0276051648, -0.1109651625, 0.1298295856, 0.3003413975, 0.2962691486, 0.1463960558, 0.2190438658, 0.3614357114, 0.0448447876, -0.1108950302, -0.3656881154, 0.2949450016, -0.2370054573, 0.2156790048, -0.0922103375, -0.1252148002, 0.1617491245, -0.0149426525, 0.0792639405, 0.244204089, 0.0020675568, 0.0953831524, -0.0571516566, -0.2528469861, -0.0088851489, 0.2713749111, 0.1386503875, 0.1052317023, -0.2749757767, 0.5181617141, -0.2161431909, 0.057376422, -0.0757092386, 0.1377533227, 0.0910494402, -0.1569633633, -0.1286019534, -0.0081180725, 0.2216851264, -0.2824502289, -0.0727409273, -0.05289004, 0.0015453328, -0.226184532, 0.1129769683, 0.0444749817, 0.0497734733, -0.3487952352, 0.2110319734, -0.0957794264, 0.2648499906, -0.057753928, 0.3419024944, -0.0532673299, -0.1077440083, 0.4212607741, -0.1554350704, -0.1962437332, 0.1823094338, 0.1184656769, -0.2897751927, -0.2650916278, -0.0043524881, -0.0290477742, -0.133482486, 0.1474138647, -0.0611420758, 0.0675657392, -0.0918385759, 0.0226209406, -0.0831924081, 0.1102432534, -0.1281267256, -0.0382153392, -0.1458686143, 0.2807450891, -0.0058234255, 0.1213966608, 0.0242967624, 0.352473855, 0.1620061249, -0.3383159637, -0.4731091857, 0.1348266751, 0.0254056081, -0.2022316456, -0.1570261717, -0.0140348347, 0.1987928301, -0.0477127321, 0.2098971456, -0.213122651, -0.2175657898, -0.3029686213, -0.168534711, 0.0437041968, 0.0954748839, -0.1264081597, -0.0680840239, -0.092008315, -0.0225773454, 0.039991539, -0.0653441027, 0.2169626802, 0.0521012172, -0.0644427463, -0.1221574917, -0.3451392651, 0.2292209119, 0.1107682809, 0.1380630136, 0.3652171791, -0.028162092, 0.0966596603, -0.2874961793, -0.1066646352, 0.0659699813, 0.1543348283, 0.1804785728, 0.2186164707, 0.0171653032, -0.2897581756, -0.0631613731, 0.2186055183, 0.4709537029, 0.138335973, -0.1754732132, -0.1330548674, 0.2779675424, 0.3232358098, -0.3519645333, 0.0392630622, 0.1405554414, -0.0650248975, 0.148774147, -0.15747343, -0.0791424438, 0.1033756509, 0.020699976, 0.1116338596, 0.2700257897, -0.1199917644, 0.1802065074, 0.008527684, -0.3254860044, 0.0766147077, 0.3500167727, 0.2305960953, 0.1211259812, 0.3390008211, -0.0367268547, 0.1108642444, 0.0562503114, 0.2756708562, 0.1108814254, -0.0648858845, -0.1411030143, 0.0755088851, 0.0908266231, 0.0157677308, 0.1869297028, 0.497964859, -0.0143692484, -0.1983140111, -0.1723341793, 0.4549845457, -0.0198513214, -0.147964254, -0.2496729195, -0.1424886584, -0.0439990982, 0.2142242342, -0.2048421651, -0.2597122788, -0.0717699006, -0.1286171526, -0.047847759, -0.5942416191, 0.0456655882, -0.0341341645, 0.2094422579, 0.1238218918, 0.1417790651, 0.0351218693, 0.0110918665, 0.2486814708, 0.378673315, 0.0604697168, -0.16547212, 0.2508488297, -0.1877602935, -0.0965403095, -0.1948825121, -0.2138698101, -0.0835694745, 0.3052231967, 0.0201801341, 0.4068004489, 0.3149118423, -0.2492128015, 0.323319912, -0.0130926557, 0.2501016557, -0.0206804238, 0.1084684283, -0.0117507605, -0.1663473994, -0.2375216782, -0.313667953, -0.3691690564, 0.0267786216, 0.1721661687, -0.2847142816, 0.0880480409, -0.3673914373, 0.1497754604, 0.2927183807, 0.50620538, 0.1465207338, 0.0858289003, 0.0920261666, -0.515545249, -0.6560676098, 0.1436702162, 0.0882200226, -0.0828439146, -0.0681075677, -0.0966337621, -0.0902025029, -0.0261958092, 0.0687406957, 0.1095625535, -0.0556529872, -0.1158262938, -0.186962381, 0.1624892056, -0.0758870244, 0.3305951059, 0.0751514211, -0.0843869895, 0.2293514609, -0.1216669455, 0.115518488, 0.0726578385, 0.3220480978, -0.2915938199, -0.3225941956, 0.3025617003, 0.0703659505, 0.1032536626, -0.0950526074, -0.1500782371, -0.3113044798, -0.4981367886, -0.3935404122, 0.1178115755, 0.1152291298, 0.2336042821, 0.1006618291, 0.0067485305, 0.0358722843, 0.2105550915, 0.1440187544, 0.356143415, -0.1577117145, 0.1570135057, 0.2726442218, -0.0135750743, 0.0609436743, 0.1928554624, -0.0912661552, -0.0285571516, -0.119818911, -0.569375515, 0.5659233928, -0.3538652658, -0.0813191906, -0.0747722462, 0.2972432375, 0.2303743213, -0.0636411607, -0.2993019521, 0.0576484911, 0.1360187829, 0.0436313674, 0.0388638936, 0.2311002612, -0.2023027241, -0.0671902895, -0.1442136467, 0.389094919, 0.4058896303, -0.3612392247, -0.0093421927, 0.0128212152 ]
https://github.com/huggingface/datasets/issues/678
The download instructions for c4 datasets are not contained in the error message
Also not that C4 is a dataset that needs an Apache Beam runtime to be generated. For example Dataflow, Spark, Flink etc. Usually we generate the dataset on our side once and for all, but we haven't done it for C4 yet. More info about beam datasets [here](https://huggingface.co/docs/datasets/beam_dataset.html) Let me know if you have any questions
The manual download instructions are not clear ```The dataset c4 with config en requires manual data. Please follow the manual download instructions: <bound method C4.manual_download_instructions of <datasets_modules.datasets.c4.830b0c218bd41fed439812c8dd19dbd4767d2a3faa385eb695cf8666c982b1b3.c4.C4 object at 0x7ff8c5969760>>. Manual data can be loaded with `datasets.load_dataset(c4, data_dir='<path/to/manual/data>') ``` Either `@property` could be added to C4.manual_download_instrcutions (or make it a real property), or the manual_download_instructions function needs to be called I think. Let me know if you want a PR for this, but I'm not sure which possible fix is the correct one.
56
The download instructions for c4 datasets are not contained in the error message The manual download instructions are not clear ```The dataset c4 with config en requires manual data. Please follow the manual download instructions: <bound method C4.manual_download_instructions of <datasets_modules.datasets.c4.830b0c218bd41fed439812c8dd19dbd4767d2a3faa385eb695cf8666c982b1b3.c4.C4 object at 0x7ff8c5969760>>. Manual data can be loaded with `datasets.load_dataset(c4, data_dir='<path/to/manual/data>') ``` Either `@property` could be added to C4.manual_download_instrcutions (or make it a real property), or the manual_download_instructions function needs to be called I think. Let me know if you want a PR for this, but I'm not sure which possible fix is the correct one. Also not that C4 is a dataset that needs an Apache Beam runtime to be generated. For example Dataflow, Spark, Flink etc. Usually we generate the dataset on our side once and for all, but we haven't done it for C4 yet. More info about beam datasets [here](https://huggingface.co/docs/datasets/beam_dataset.html) Let me know if you have any questions
[ -0.1576074511, -0.2520469725, -0.044344265, 0.2419734597, 0.3052388132, -0.0173062216, 0.0462005809, 0.1740140915, -0.0926162973, 0.1525099427, 0.011207982, -0.0311052985, -0.12809892, 0.5797958374, -0.0943659618, -0.2361066341, -0.1385878921, 0.1183630899, -0.21952793, -0.0132200336, -0.0061014974, 0.2214007676, -0.195691973, -0.022042606, -0.2092389017, -0.1372853369, 0.0151897352, 0.1767094135, -0.2551712394, -0.3560911119, 0.3604576588, 0.1128406823, 0.2981439829, 0.1601436138, -0.0000945143, 0.0746880397, 0.2518623769, -0.3023439646, -0.2845503092, 0.1466870159, -0.0307055954, -0.0956449807, 0.0670617372, -0.196844399, -0.2997149229, -0.1451850235, 0.1192829758, -0.1014602557, 0.3640058935, 0.2599667311, 0.3722583652, 0.4407117665, 0.1957721114, -0.2333815992, 0.09535373, -0.1508591622, -0.1420058459, 0.1691171974, -0.0406181552, 0.2747167051, 0.0004315661, 0.272805512, 0.1778380722, 0.0580457263, 0.4070054889, -0.2139705867, -0.1956555694, -0.2863411009, 0.121468775, 0.0440185815, 0.7800214887, -0.1754938811, -0.0318889245, 0.0684108734, 0.3036721349, -0.0913943872, 0.2903750837, 0.2816478908, -0.1135264188, 0.1321049929, -0.2517782748, -0.1577828676, -0.2102700323, -0.0275428239, 0.1293175071, -0.2587459981, -0.1821367294, 0.1505683213, 0.1448349953, -0.0655170307, -0.0370307714, 0.0024910043, -0.2538121343, 0.1177523583, -0.2260057479, -0.1340096593, -0.1367891729, 0.5243660212, 0.1480008811, 0.0493390933, 0.0552520528, 0.0395032428, -0.0958475843, 0.024608152, -0.0875780061, 0.1341894716, 0.1416074932, -0.0273238737, 0.2056233883, 0.0090815509, 0.1363283843, -0.1324750483, -0.0923998356, -0.322009027, -0.4273110032, 0.1215066612, -0.1025411338, -0.1251257509, -0.2567411959, -0.0216876175, -0.1581318825, 0.1170152053, -0.1226817444, 0.5028874278, 0.0319796875, 0.0357805155, 0.311011523, 0.1301048398, -0.1264160722, -0.4252969027, -0.1609554291, 0.0885234922, -0.3406011462, 0.1032322422, 0.2031142563, -0.0858149603, 0.3210024834, -0.010548356, 0.2039183229, 0.2336813956, 0.0437083468, 0.1382243186, -0.32994771, 0.2939605117, 0.089260757, 0.1966168582, 0.0503920875, 0.0992408767, 0.0147277974, -0.2428950071, -0.1383900046, -0.388897419, -0.0293126795, 0.2899579108, -0.0359728336, 0.0604547411, -0.3929699659, -0.1538802236, -0.077954866, 0.008578605, -0.0185337253, -0.1841293871, 0.1792026609, -0.3099901676, 0.1034425721, 0.5316655636, -0.19394584, 0.0594610423, 0.1071918011, -0.3290978074, 0.093971625, 0.1096452996, -0.1983128041, 0.1528693587, -0.3218123317, -0.0717164278, 0.0001484078, -0.2997230887, -0.0671715587, 0.2491941899, 0.076370053, -0.1028422937, -0.0841955841, 0.045796901, 0.0344795026, 0.047141891, -0.1555431336, 0.0964355916, 0.0459185578, 0.0953812674, -0.2365959436, -0.2664738894, -0.0504301041, -0.0170551818, 0.0486118719, 0.0009505615, 0.1752432287, -0.0223731752, 0.2334789783, -0.1215636432, 0.2053255737, 0.3341154158, 0.0897390321, 0.0726903304, -0.0986365229, 0.2705858946, -0.4880264997, 0.1984878629, -0.0233177152, 0.2936453223, 0.2374485284, -0.0921920091, -0.2881413996, -0.1170641407, -0.1954953372, -0.3928444386, 0.2333162576, 0.0638064295, 0.0160966124, -0.1424280703, -0.0551148206, 0.6949415207, -0.4194719791, 0.1360836774, -0.1755589843, 0.2874916792, -0.2992300093, -0.0015133638, 0.2668253481, -0.1448066384, 0.2442114204, -0.1558156013, -0.1182780117, 0.5188825727, -0.0700509697, 0.1831251681, -0.0156595539, 0.1024992093, 0.1684033871, -0.4067898691, 0.2226452082, 0.0969814137, 0.0564254448, 0.0465726182, 0.1368780434, 0.0277529079, 0.0609660335, -0.0385044366, 0.13757658, 0.2114505917, 0.3035191596, 0.090356648, -0.0515104607, -0.0084399069, 0.0460292213, 0.0381698906, 0.3691144586, -0.1547345966, -0.2686448097, -0.0204409026, 0.3724583983, 0.1492621899, -0.213438347, -0.0039704647, -0.2015948743, 0.0182547607, 0.4242035151, 0.0845955238, 0.1815247238, 0.3259017467, -0.2572721839, 0.1394946128, 0.0787113234, -0.1675015837, 0.2197906822, -0.2067821324, 0.1735728383, -0.0765306652, -0.0619712397, 0.0288039874, -0.285405606, -0.1263667494, -0.0495842211, 0.0670865178, -0.4333349466, -0.187449187, -0.071510613, -0.1334763914, -0.2219570875, 0.1057160646, -0.2684015334, -0.2493632883, 0.0531169176, 0.0519356839, -0.2146595269, 0.2211510986, -0.0773784295, 0.2021473944, 0.187024042, 0.0604866482, -0.2790495753, 0.0561808348, -0.3365761638, 0.1974058151, 0.0763334557, 0.1776465029, 0.3503881693, -0.2926579118, 0.1538707763, -0.4253619909, -0.2524706721, 0.2706110477, -0.1242209896, 0.034145087, 0.2647263408, 0.4457346201, -0.0405969955, -0.197802335, 0.1048384234, -0.2580123842, -0.2056209892, -0.05647102, -0.0314119346, -0.1052623168, -0.2328075022, -0.4738241434, -0.2691171765, -0.50129354, 0.0616646148, 0.0238952301, -0.017963361, 0.3495785296, 0.1636544317, 0.0834820047, 0.1862340271, -0.132587865, -0.1996643394, -0.2576180696, 0.2411108762, -0.4244993925, -0.4918942451, 0.2326402664, 0.0886926278, 0.1810020953, 0.1364174485, -0.2883038223, 0.1077367365, -0.1272396147, 0.2177414149, 0.0037630019, 0.0890457109, 0.4727256298, -0.1059820578, -0.0791261494, -0.271283567, -0.0139192259, 0.1867628843, -0.1283688098, 0.4082901776, -0.1415540427, 0.0922088251, 0.0083458284, 0.6587257385, 0.0684499294, -0.2738854885, 0.3950155675, -0.0245227236, 0.5483446717, -0.1196089908, -0.0483416058, 0.278337419, -0.1303411871, 0.1182846874, 0.2561877966, -0.0717041492, 0.0530203953, -0.293082118, 0.1332415491, -0.3371208608, -0.2032506019, -0.0752010867, 0.1337705255, 0.2385992557, 0.1224340945, 0.2099100798, 0.0756298229, -0.0600333214, 0.220085144, 0.3244322538, 0.0945594087, 0.0862483233, -0.0977261513, -0.0006390859, -0.4687552154, 0.458525151, -0.0882849842, 0.0121184429, -0.0354764499, -0.0484405197, 0.0560804158, -0.0770028085, 0.3993711472, -0.3509089351, -0.0245682355, 0.0671607256, 0.315297246, -0.3512363434, -0.1357649416, -0.1474636495, 0.0266344827, 0.353695333, 0.1129956767, -0.3503395617, -0.1448242813, 0.0505701378, 0.0257964507, -0.1164406016, -0.0779692307, -0.1261964589, -0.0568872876, -0.3180395365, -0.0524923764, -0.0564876944, 0.0643649176, -0.1918079108, -0.0424599238, 0.0684953257, -0.0226401258, 0.0273677129, 0.1267915666, 0.316454798, 0.0824906901, 0.1086835787, 0.1601504833, 0.186872378, 0.3519444764, 0.2604803443, -0.0664427206, 0.1868504435, 0.1660542637, -0.052963011, 0.0243409611, 0.22119537, -0.0637336224, -0.0417151973, -0.1308409125, 0.1976636052, -0.1552976221, 0.3797975779, 0.1449737549, -0.1973752975, -0.2799603641, -0.3411349654, 0.3049994409, -0.3228603005, -0.0193391405, 0.2203382701, 0.5354673862, -0.2219849974, 0.1750553548, 0.1773683429, 0.8056124449, -0.1524399817, -0.0300408509, 0.2842768729, -0.1223613471, 0.2576763034, -0.6670982242, 0.02838609, -0.2446986288, 0.0566469915, 0.018988952, -0.0293507446, 0.0844151229, 0.134178564, -0.2023183554, 0.2052096575, 0.1579805464, 0.2810953259, -0.0964582041, 0.231220454, -0.2328834534, -0.1702730358, -0.2303197384, 0.3361828625, -0.102824457, 0.3644040823, -0.3169814944, -0.2264075875, 0.0476952344, -0.4318673313, -0.1580606103, 0.1578134447, -0.3295033276, 0.0506705083, -0.0793560743, -0.0533053055, 0.3071300983, 0.1460717022, 0.306178689, 0.297239989, -0.3830921054, 0.2250583917, -0.0498411208, -0.3608678281, -0.1509023309, 0.1439298242, 0.1543417424, -0.216337651, -0.1585421264, 0.1210777685, -0.1123432294, -0.263370961, 0.1389358193, -0.2251028419, 0.0310816187, -0.1937533617, 0.1080031842, 0.1789444089, -0.0672993287, -0.080859147, 0.2495895177, -0.2174936235, -0.0877193511, -0.0223434716, 0.2772182822, -0.0715373605, -0.1196029782, 0.2357802242, -0.0965787098, -0.1894821227, 0.2412616462, 0.0918242037, -0.2193151116, -0.3616682887, 0.0277369078, 0.1239843145, -0.4700002968, -0.0984591022, 0.0730651841, 0.0260898005, 0.0441494286, 0.4836726487, 0.1310721636, -0.0179124866, 0.296415627, -0.194136098, -0.5111048222, 0.172272563, -0.3063954711, 0.222418651, 0.0716703534, 0.4083388448, 0.2780315578, 0.021252403, -0.4761144519, -0.0957310796, -0.2024462521, 0.0086191474, 0.4760987163, -0.0535307154, 0.2613421679, -0.0498857684, 0.195308432, 0.2604643106, -0.4230807424, -0.2319355309, 0.0407512747, 0.0788130835, -0.0188504383, -0.0326269455, 0.1591197699, -0.1057990566, -0.3744732738, -0.0514990911, 0.2088692933, 0.1218389496, -0.0660387278, 0.0244684443, 0.1511494815, 0.1876416802, -0.225843668, 0.0167259835, 0.2588255107, 0.3196471035, -0.0280861035, -0.0400206037, -0.1756953895, -0.1103272289, 0.1341463327, 0.1591483653, 0.1411133111, 0.1615344733, 0.1578662097, -0.1192468628, -0.0192980114, -0.0792007148, 0.27991575, -0.1003038585, -0.0936972871, 0.0063017341, 0.2586108148, 0.3450059295, -0.3602779806, 0.2975353301, -0.1334538013, 0.0064385873, -0.068862088, -0.0125062549, 0.2499469221, -0.1528662294, 0.1491672993, 0.2357266396, 0.1898101866, 0.034888804, 0.0292284694, 0.009628186, -0.07785476, -0.0010326755, 0.2097522467, -0.1130981445, 0.1647656113, 0.3772321939, -0.3160646558, 0.0949927941, 0.0621368736, 0.0615480691, 0.1109166443, -0.50088346, -0.024506269, 0.1988552064, 0.0723049492, 0.0479236208, -0.0159573294, 0.1939799935, 0.0329560302, -0.3138834536, -0.4437048137, 0.11584609, -0.1720167547, 0.2750702202, -0.1679456532, -0.2745357752, -0.1335869581, 0.1127258539, -0.0335199088, -0.2113982737, 0.3847881556, 0.0726078227, -0.0404765867, -0.279791832, 0.0317024738, 0.0953294039, 0.1308010519, -0.1873329431, 0.2822520733, 0.0710875541, -0.0393346548, 0.0987018198, 0.0260616317, 0.3179254234, 0.2258337289, 0.1370505244, 0.1507963389, 0.209198907, 0.0792204887, 0.0103415204, 0.0865750462, 0.1785832793, 0.1475900561, 0.3340990245, 0.2623828053, -0.2869747579, -0.2721341252, -0.0941690132, 0.2695444226, -0.3533780873, -0.0039259656, -0.0860683471, -0.0313970856, -0.2981731594, 0.017097272, -0.4201547503, 0.2572528124, 0.0354239419, -0.0297200028, 0.0713374838, -0.2428656816, 0.1755140722, -0.1715016812, 0.5958701372, 0.1973862201, 0.3026837707, -0.3092734814, -0.5232943892, -0.5052441955, 0.0167876165, -0.0965641737, 0.1665876955, -0.2559702098, 0.1326681823, 0.3628242016, 0.0504736267, 0.1659996808, 0.2906828523, 0.2242632359, 0.0743628666, -0.1941462904, -0.071864672, -0.0854613408, -0.178362608, 0.0745043084, -0.337236166, -0.0929617882, 0.0976880118, 0.1946700066, -0.0879534632, 0.0600924864, 0.237842381, -0.2843070328, 0.5308741331, 0.0084488383, 0.5093174577, -0.0833964944, -0.1735005677, -0.2166520208, -0.2197475284, -0.053623464, -0.2374125868, 0.0840963274, 0.2714071572, 0.0634321868, 0.0207258128, -0.5036240816, 0.3893964589, 0.2477639019, 0.3329302371, -0.2883209884, 0.1675180048, -0.4077230692, -0.0201235488, -0.0112999417, 0.1014735922, -0.0199633501, -0.1913531423, -0.3272972703, -0.3006256223, 0.5939642191, -0.5361889601, -0.0412926301, 0.1515976191, 0.2181706429, 0.0904022828, -0.1211093664, -0.4905552864, 0.3521919847, 0.1682991087, -0.0789180547, -0.1132168323, 0.0657816008, -0.1576029062, -0.1189124063, -0.0759415105, 0.3231968284, 0.0979941413, -0.1713924408, -0.128694132, -0.3984097838 ]
https://github.com/huggingface/datasets/issues/676
train_test_split returns empty dataset item
Can you reproduce this example in a Colab so we can investigate? (or give more information on your software/hardware config)
I try to split my dataset by `train_test_split`, but after that the item in `train` and `test` `Dataset` is empty. The codes: ``` yelp_data = datasets.load_from_disk('/home/ssd4/huanglianzhe/test_yelp') print(yelp_data[0]) yelp_data = yelp_data.train_test_split(test_size=0.1) print(yelp_data) print(yelp_data['test']) print(yelp_data['test'][0]) ``` The outputs: ``` {'stars': 2.0, 'text': 'xxxx'} Loading cached split indices for dataset at /home/ssd4/huanglianzhe/test_yelp/cache-f9b22d8b9d5a7346.arrow and /home/ssd4/huanglianzhe/test_yelp/cache-4aa26fa4005059d1.arrow DatasetDict({'train': Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 7219009), 'test': Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 802113)}) Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 802113) {} # yelp_data['test'][0] is empty ```
20
train_test_split returns empty dataset item I try to split my dataset by `train_test_split`, but after that the item in `train` and `test` `Dataset` is empty. The codes: ``` yelp_data = datasets.load_from_disk('/home/ssd4/huanglianzhe/test_yelp') print(yelp_data[0]) yelp_data = yelp_data.train_test_split(test_size=0.1) print(yelp_data) print(yelp_data['test']) print(yelp_data['test'][0]) ``` The outputs: ``` {'stars': 2.0, 'text': 'xxxx'} Loading cached split indices for dataset at /home/ssd4/huanglianzhe/test_yelp/cache-f9b22d8b9d5a7346.arrow and /home/ssd4/huanglianzhe/test_yelp/cache-4aa26fa4005059d1.arrow DatasetDict({'train': Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 7219009), 'test': Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 802113)}) Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 802113) {} # yelp_data['test'][0] is empty ``` Can you reproduce this example in a Colab so we can investigate? (or give more information on your software/hardware config)
[ -0.1150354072, -0.0503817424, -0.0381935276, 0.3756464422, -0.00808792, 0.2310484946, 0.6476926208, 0.2886785269, -0.0222677104, 0.1684439778, -0.0831826702, 0.4956980944, -0.1554623693, 0.2236278206, -0.1473043114, -0.0612273812, 0.0395234972, 0.4169758856, -0.0837049633, -0.1733159423, -0.157584846, 0.326407373, -0.5189428329, -0.2928177416, -0.7594943643, -0.2361607254, -0.3129857183, -0.0154717555, -0.110786356, -0.016503077, 0.5567770004, -0.0819948539, -0.1336541176, 0.5849177837, -0.0001244457, 0.098133862, 0.3251816332, -0.1256596893, -0.4603219032, -0.450106889, -0.5075222254, -0.0494796596, 0.3426326513, -0.2649561465, -0.2269913703, -0.0226695891, -0.2063621879, -0.2614694536, 0.2259002626, 0.2926191986, 0.0635270849, 0.041476164, -0.2472749799, -0.124246031, 0.2525103092, 0.1699926406, -0.3104468584, -0.1098315343, -0.084317632, 0.1739827543, 0.1159843132, 0.2465373278, 0.0693301558, 0.3401451111, -0.0977294967, 0.2747439742, -0.4429561794, -0.3045040071, 0.3036517799, 0.2749737799, 0.3398500383, -0.0917442665, -0.1515468359, -0.3225496709, 0.0415978804, -0.401160568, 0.0713355467, 0.3876688778, -0.090194352, 0.1396920085, -0.2474465221, 0.0599142946, 0.0849869624, 0.0673935264, -0.3435751498, 0.6945250034, -0.1937273592, 0.2074731141, 0.0974513739, 0.2137622386, 0.5437456369, -0.2621798515, -0.2669441998, 0.0290779434, -0.3628296554, -0.1718168557, -0.1199134365, 0.0886112675, -0.0517790653, 0.1024864987, 0.1963125318, 0.0715746954, -0.0790910423, 0.1310104132, 0.2958046496, 0.2741383016, 0.3077516854, 0.4119048715, -0.0986465067, 0.0760249197, -0.3278724253, -0.0480284207, -0.0015702158, 0.0881478861, 0.0448614322, -0.0580453165, 0.1930094063, -0.1583076566, -0.3444066644, -0.1840534359, -0.5183022022, -0.0567980632, 0.1866763383, 0.3126018941, -0.0572757982, -0.0559266545, -0.3544780016, 0.1348291785, -0.095505476, -0.0661770701, -0.2749396265, 0.0778159425, -0.2299034595, 0.1631308645, 0.2406242937, 0.0799833536, 0.3387074471, -0.1525915116, -0.0916992277, -0.2025914788, 0.2280799598, -0.5900958776, 0.459118247, 0.3485631943, 0.3222778141, 0.1912998557, 0.0980787054, -0.0664388388, -0.1165147424, 0.4029571712, -0.2699321806, -0.3050503433, 0.1691552699, 0.0849727169, -0.3663967848, 0.0794187859, -0.2584613264, 0.26869151, 0.22663638, 0.0961478502, 0.1163987666, -0.0441446267, -0.4369969368, -0.0590524711, 0.3124624193, 0.294828862, -0.4084181786, -0.1554809064, -0.1902665794, 0.2188360542, 0.2140796036, 0.039862778, -0.2395052463, 0.1319137067, -0.3153764904, 0.3399744034, 0.3605463505, -0.087142989, -0.2835252881, 0.2771762311, 0.021571124, 0.0513593554, 0.0451859832, 0.0018942039, 0.4075788558, 0.1792589724, 0.3288894296, 0.1144288108, -0.2773240805, -0.1597405076, -0.2146873325, -0.230006367, 0.1433477998, 0.0812678486, 0.3348297477, 0.0198041759, -0.066432409, -0.0552025922, 0.3579740524, 0.0629950613, 0.2749548256, 0.2020433992, 0.3893927634, -0.1076148525, 0.009854679, -0.1398952603, -0.2623068392, 0.1802487075, 0.1984189302, 0.0323018655, -0.094640933, -0.2139586955, -0.2769688666, -0.0646539032, -0.3802940845, -0.3407128155, -0.0074102017, 0.0401032716, 0.1436059624, 0.0353600197, -0.1622666568, 0.5844067335, 0.0103580188, 0.2315689772, -0.0459004417, 0.527276516, 0.1391590089, -0.1883158237, -0.2542990446, 0.2448891997, 0.1367236227, -0.2267309427, -0.0985793397, 0.3551600873, 0.1909110248, -0.107701458, -0.0189544465, -0.3879110813, 0.3679307103, -0.1755171567, -0.0699601024, 0.0392055847, 0.3265375793, -0.2248436064, -0.1471384168, 0.5041164756, -0.2933381796, 0.3285700977, -0.0480019562, -0.06021991, 0.0336067379, -0.1547932327, -0.0144887967, -0.2078596205, -0.3048747778, -0.472594887, 0.3259236813, 0.1150535941, -0.2302746475, 0.3069021702, 0.450127542, 0.1878954023, 0.0188093353, -0.2738699615, -0.3083897233, -0.0857903883, 0.3047046363, 0.5613516569, 0.5491406918, 0.1559779346, 0.3771391213, -0.1911429763, 0.2594593763, -0.1260148138, 0.2184945643, 0.0867773443, 0.4505962729, 0.1112088934, 0.0040063248, -0.1120927408, -0.0821982771, -0.0164334811, 0.2886072695, 0.0569797345, -0.0253690723, -0.0290942788, -0.3493953347, -0.1848790646, -0.2290425599, -0.3024778068, 0.2572636902, -0.3693211377, -0.1748352498, 0.0454847403, 0.0536179543, 0.06456393, -0.1782747656, -0.000412412, 0.1094597876, -0.0240359213, 0.0801911205, -0.0892356336, -0.2991432846, 0.0594421253, -0.1319158971, 0.2729618549, -0.0352634713, 0.017951712, -0.1311779022, 0.0478451699, -0.088417165, 0.3439833522, -0.3098193407, 0.23396945, 0.0029200385, 0.004765952, -0.3975251615, -0.1547765732, 0.1998278797, 0.0130152479, -0.1557433158, -0.1387894005, 0.2697176635, 0.0144820409, -0.3401609659, -0.3421725631, -0.1796092242, -0.1125279516, -0.1947136372, -0.2104950845, 0.0175593607, -0.0279236324, 0.0646664649, 0.2902248204, 0.3815030754, -0.4983844459, -0.0954138041, -0.2046269774, 0.4170757532, -0.248655051, -0.1407398582, 0.2069019675, -0.2243053466, 0.1000042111, 0.1204110086, -0.3114475906, 0.0275153499, -0.1803902537, 0.0984069034, -0.0162199903, -0.2345980257, 0.2713418901, -0.0120161967, 0.0414471664, -0.1543295085, -0.2120655626, 0.0987327695, -0.0192154404, 0.3380066454, -0.0995227247, 0.0485849641, 0.0872997493, 0.7695267797, 0.1302621365, -0.0590400696, 0.1856834441, -0.0803643167, 0.29443416, -0.2148570716, -0.330684036, 0.0852351189, 0.0504689738, -0.2484664768, 0.3751798272, 0.0260967501, -0.2959825993, -0.0662689283, 0.0787968338, -0.3488970995, -0.4114093482, 0.0844874531, -0.3040919602, 0.0734923482, 0.1738434732, 0.2460618317, 0.1376635283, -0.0574315824, -0.3457048833, 0.0935204849, -0.0477152728, -0.0272555947, -0.1181517169, -0.1120562479, -0.2812516391, 0.1049774438, 0.2453666776, 0.1161456704, 0.0674713105, -0.1029444858, 0.0977059677, 0.0931062326, 0.8047711849, 0.0951169282, 0.0255577061, 0.1512764692, -0.0543948524, 0.0289503373, -0.1543099135, -0.2661251724, 0.5942175388, 0.0351537541, 0.1079621613, -0.1630772501, -0.075757809, 0.278252393, -0.07358744, -0.0777217448, 0.0452037528, -0.0972708464, -0.2069827914, 0.2816327512, 0.0695412904, 0.0513365231, 0.2702440619, -0.2625230551, -0.4213935137, -0.2210747004, -0.3221942186, 0.3461488485, 0.1722908318, 0.4645677805, 0.0360240191, 0.2999584079, -0.1496406794, 0.0685373098, 0.3058342934, 0.5060024261, -0.1083004549, -0.0132050905, 0.1994807422, -0.438229382, 0.3078835309, 0.3851034343, -0.0773701891, 0.1544530243, -0.3961910605, 0.1084640026, 0.30414626, 0.2651832104, -0.1541536599, 0.0501258336, -0.4672729075, -0.3593155146, 0.1445117742, 0.0673301071, 0.0478447042, 0.1550253779, 0.1660831124, -0.3851068616, 0.4025820792, -0.1388579607, 0.6618782282, 0.1113435999, 0.0216268655, 0.1709938347, 0.0542530827, 0.3996328712, -0.0652923957, 0.357218951, -0.1694016457, -0.2335507423, -0.1278268546, 0.027086053, 0.0771727562, 0.2690829933, -0.3201325238, 0.2286085188, 0.0635437295, 0.1925321668, -0.0743437111, -0.2257069796, -0.0816243514, -0.0338220075, -0.1214180142, 0.0666674376, -0.1046584249, 0.1696462929, -0.0640848204, -0.1659597754, -0.347073555, -0.1202436239, -0.1196526513, 0.0415383801, -0.4431505203, 0.1055005416, 0.1274348199, -0.6294224858, -0.0395516865, 0.1533181965, 0.1393234581, 0.0197386499, 0.017457081, 0.2915141284, 0.0716114715, 0.0380920805, -0.2708716989, -0.2328441739, 0.341642648, 0.1064350754, -0.2811036706, -0.1011909023, -0.37898615, -0.1036457717, 0.3149291873, 0.408146739, 0.0745372772, -0.3411484361, -0.3092533946, 0.2713320553, 0.1163845509, -0.2194039971, 0.02847155, -0.0930438712, -0.339601934, 0.189222008, 0.2131698132, -0.350084275, -0.1038265228, 0.0506325886, 0.215887785, 0.3880850673, 0.5702497959, -0.1257464141, 0.1827216893, -0.2740948498, 0.2483840287, 0.3024665713, -0.1216392219, 0.2211585492, -0.2184769511, 0.0917791724, 0.2944122553, 0.2036751807, 0.1276055574, 0.4597967565, -0.3011161685, -0.3193522096, 0.0755890533, 0.1595556438, -0.0148541415, 0.3178522289, -0.0485182516, 0.2364334762, 0.1221809983, 0.04928606, -0.1707866043, 0.3363770843, -0.2865243256, 0.2914344072, -0.1016727462, -0.0084251482, 0.3236614764, -0.1891305149, -0.0468916111, 0.1872662157, 0.0975887105, -0.1881626248, -0.1224062145, 0.1336726695, 0.0153453248, 0.1390741765, -0.3899890482, 0.095761165, -0.1807763577, -0.2337371558, 0.3308992088, 0.0481335521, 0.0454878546, 0.1050185934, 0.4617646933, 0.3260040283, -0.569065094, 0.1453596801, 0.0805113241, 0.2416456044, 0.0284035783, 0.1527655125, 0.1809978932, 0.2765833139, 0.2391926646, -0.242414847, -0.0734809637, -0.3484889865, 0.2455792874, -0.271938175, 0.2261508554, -0.1522750556, 0.2825801373, 0.2128133774, 0.1177981198, -0.0052536824, -0.0358104631, 0.0897980034, -0.0477614217, 0.3134739697, 0.1652405709, 0.2337401658, 0.1872958243, 0.5071594119, 0.1327543706, 0.2762695849, -0.1346286833, 0.132692948, 0.387270838, 0.1447560936, 0.4235888422, 0.253110826, -0.20266518, 0.2513692677, 0.157318607, -0.224624902, 0.0482556112, 0.4973721802, -0.010917671, 0.8306029439, 0.2314440906, 0.1009556055, 0.1960764974, -0.358245343, -0.0870557353, 0.1386698186, -0.1664342284, -0.0359755345, 0.0435006432, 0.6147770882, -0.5687759519, -0.3220710456, 0.0339767039, -0.0765151903, -0.232779175, -0.0246979296, 0.1492418945, -0.2099412531, -0.4154747128, -0.0766517445, 0.2104127407, -0.2003393322, 0.177340582, -0.0404496938, -0.1598808467, -0.0455556698, 0.0901637375, 0.4565047622, 0.036322102, -0.0983397141, 0.2844130993, -0.1642324924, -0.1471320689, -0.0068012062, 0.0563073233, 0.1897609234, 0.0989155397, -0.2804594636, -0.0977751017, 0.2884265482, -0.3211736977, -0.0576598197, 0.0006043309, 0.0949137509, -0.2591908872, 0.211106807, 0.1038461551, -0.1199933961, 0.3641738892, 0.2107376158, 0.1787308455, -0.384468466, 0.2586522698, -0.1900772303, -0.1395040601, -0.1266790777, -0.1292675883, -0.4150034785, 0.0217046607, 0.1124087498, -0.3707099259, 0.0645273104, 0.1396983415, -0.0088709844, -0.1747843623, 0.3111531138, 0.1171787232, -0.0375646092, -0.2863928378, -0.2873167694, -0.4279898703, -0.04481389, -0.1681405455, -0.0244646464, -0.2829694748, 0.4049315453, -0.0274442993, -0.0090825642, -0.0340905748, 0.097025685, 0.3957845271, 0.0310718436, -0.5145776272, -0.2315473109, -0.2865191102, -0.2351804823, 0.0116836708, -0.380479157, -0.0994126946, 0.0194522087, -0.2052189559, 0.0983180702, -0.4067667425, 0.1684652418, -0.0391407944, 0.1293118596, 0.1172949597, 0.4498716593, 0.1242431179, 0.3546869755, -0.003443487, -0.1645331383, -0.0591488034, 0.1902572364, 0.2555550635, 0.4428931773, -0.105539687, 0.2147506773, 0.1136973053, 0.0909379497, 0.2821519673, 0.0163341854, -0.0582648888, 0.1255050004, -0.5242886543, 0.147585988, 0.3340400755, 0.4287835956, -0.2159582824, -0.1925846189, -0.0772520602, -0.2364570647, 0.1647447646, -0.2881678641, -0.2600950599, -0.3044412136, 0.0644333139, 0.5333270431, -0.3095363379, -0.6090131998, -0.3760147691, 0.2566223145, -0.3416649103, -0.0502404757, 0.068371281, 0.2078635246, 0.0642895922, -0.189022392, 0.2928661704, 0.127647534, -0.1594105065, -0.0744988248, -0.2763885558 ]
https://github.com/huggingface/datasets/issues/676
train_test_split returns empty dataset item
We'll do a release pretty soon to include the fix :) In the meantime you can install the lib from source if you want to
I try to split my dataset by `train_test_split`, but after that the item in `train` and `test` `Dataset` is empty. The codes: ``` yelp_data = datasets.load_from_disk('/home/ssd4/huanglianzhe/test_yelp') print(yelp_data[0]) yelp_data = yelp_data.train_test_split(test_size=0.1) print(yelp_data) print(yelp_data['test']) print(yelp_data['test'][0]) ``` The outputs: ``` {'stars': 2.0, 'text': 'xxxx'} Loading cached split indices for dataset at /home/ssd4/huanglianzhe/test_yelp/cache-f9b22d8b9d5a7346.arrow and /home/ssd4/huanglianzhe/test_yelp/cache-4aa26fa4005059d1.arrow DatasetDict({'train': Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 7219009), 'test': Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 802113)}) Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 802113) {} # yelp_data['test'][0] is empty ```
25
train_test_split returns empty dataset item I try to split my dataset by `train_test_split`, but after that the item in `train` and `test` `Dataset` is empty. The codes: ``` yelp_data = datasets.load_from_disk('/home/ssd4/huanglianzhe/test_yelp') print(yelp_data[0]) yelp_data = yelp_data.train_test_split(test_size=0.1) print(yelp_data) print(yelp_data['test']) print(yelp_data['test'][0]) ``` The outputs: ``` {'stars': 2.0, 'text': 'xxxx'} Loading cached split indices for dataset at /home/ssd4/huanglianzhe/test_yelp/cache-f9b22d8b9d5a7346.arrow and /home/ssd4/huanglianzhe/test_yelp/cache-4aa26fa4005059d1.arrow DatasetDict({'train': Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 7219009), 'test': Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 802113)}) Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 802113) {} # yelp_data['test'][0] is empty ``` We'll do a release pretty soon to include the fix :) In the meantime you can install the lib from source if you want to
[ -0.1176418215, -0.0009290294, -0.1334937215, 0.2837673128, 0.0316413939, 0.2487454414, 0.5152359605, 0.5261705518, 0.0605892166, 0.0824789479, 0.0223489348, 0.3803646564, -0.1783174574, 0.1184178889, -0.0266840905, -0.1455713063, 0.0281708278, 0.3949722648, -0.06274046, -0.1058098376, -0.1067900807, 0.3772622645, -0.3872471154, -0.1233005375, -0.5268980861, -0.2172544003, -0.1449891627, 0.0612096712, -0.1148218811, -0.2209564894, 0.5441964865, -0.1443571001, -0.1798073351, 0.4662795365, -0.0001174493, 0.1740999073, 0.3488705754, -0.0959641486, -0.2131628245, -0.5335097909, -0.1603128761, -0.1066493541, 0.2592993677, -0.2085116208, -0.2019207627, -0.3470431566, -0.3203686178, -0.5306895971, 0.1431892514, 0.3292075694, 0.0906263068, 0.0888480693, 0.0527685285, -0.0330178514, 0.4277411997, 0.0449320003, -0.2140248269, -0.2842196524, -0.0964195654, 0.1749911159, 0.1409325898, 0.2496439517, 0.0374676064, 0.1979114264, 0.0635090321, 0.2312936634, -0.3535772264, -0.2968398929, 0.0674433559, 0.3545724154, 0.3835058212, -0.1285977215, -0.2091629654, -0.2360118926, -0.0195489116, -0.2849740386, 0.0304180197, 0.3383015394, -0.0515985638, 0.1450699568, -0.1933149397, -0.1244630739, -0.0433209129, 0.1351355761, -0.1743125319, 0.6467146277, -0.1317276508, 0.2141456753, 0.2832024395, 0.219005093, 0.152659148, -0.1540829986, -0.3844636381, 0.0220118333, -0.363078028, -0.183071658, -0.0904449746, -0.2417930216, -0.0404363051, 0.4139632583, 0.0901595131, 0.154797554, -0.0677709058, 0.0515003204, 0.3399352431, 0.2884175181, 0.3791084886, 0.5538806915, -0.0362382047, -0.0221393146, -0.0798985809, -0.0783457458, 0.07994432, -0.1314549595, -0.0016993537, 0.0321708694, 0.130623728, -0.1279751956, -0.2455851734, -0.1167566478, -0.3425419033, -0.1276846677, 0.1007220671, 0.3022543192, -0.0558883138, 0.2449733615, -0.2102755755, 0.1757252365, -0.1284888834, -0.0782686844, -0.2893946171, 0.2224496752, -0.1635093838, -0.0577655248, 0.2249542326, 0.0333972909, 0.3561097383, -0.1195594668, -0.0293494221, -0.1698009521, 0.3367892206, -0.3161753118, 0.3781972826, 0.3954264224, 0.1683808267, 0.2080934048, 0.1540406793, 0.2103332728, -0.1806226671, 0.3590171337, -0.2874221802, -0.4169856012, 0.0133521501, 0.1523925662, -0.2529551983, 0.0737891644, -0.1068571284, 0.1531224102, 0.2022401839, 0.0466021188, 0.1070306823, -0.0253007002, -0.1190389991, -0.1371486187, 0.4137601554, 0.1770737618, -0.4947098494, -0.1679687947, -0.2387644798, 0.0077859871, 0.0688478053, 0.0316146947, -0.2810126841, 0.1752460003, -0.184093073, 0.5340541005, 0.4903398752, -0.1969678551, -0.2827196121, 0.40555197, 0.0146207921, -0.0382339805, 0.0570967719, 0.113790296, 0.3004011512, 0.2838885188, -0.0063301953, 0.2280913144, -0.1854338497, -0.275822252, -0.1109344438, -0.252099365, 0.2852465808, 0.0868116096, 0.4078783691, -0.1718382984, -0.074890241, 0.0638749599, 0.3752988875, 0.0428891331, 0.3869075179, 0.3386223614, 0.3746705949, 0.13015908, 0.0755099654, -0.2861390114, -0.2770723999, 0.1796782464, -0.0227098148, -0.1048069447, -0.1208273172, -0.2206863016, -0.2114477605, -0.0344586596, -0.4424874187, -0.4250473976, 0.0233587455, -0.0592853837, 0.1825019866, -0.0041590007, -0.3373209238, 0.248887524, 0.0244199242, 0.3148395419, -0.2052738219, 0.4214245677, 0.0370678678, -0.1337925047, -0.2961595953, 0.2590879202, 0.0629138723, -0.3750787377, -0.0266383383, 0.6311461926, 0.0772384182, -0.0642367229, -0.0526464134, -0.4810121953, 0.3369107544, -0.295501411, -0.0480408147, 0.2148435265, 0.2424691617, -0.2903488278, -0.192726776, 0.4654702544, -0.2564731836, 0.4291006029, -0.0569614172, 0.0397225693, -0.0286906771, -0.1467877775, -0.0515801013, -0.2208295017, -0.2495584041, -0.7266794443, 0.3887431324, 0.0322174691, -0.0984668359, 0.0736334398, 0.4730113745, 0.1401786357, 0.0240963567, -0.2417280078, -0.2793952823, -0.1014121324, 0.126188755, 0.4395978451, 0.4393753707, 0.1826652735, 0.330413878, -0.2930178046, 0.205416292, -0.1125600338, 0.2705598772, 0.1046369672, 0.2017991394, 0.1577465832, -0.293438226, -0.1967666894, -0.0721432045, 0.052973602, 0.2197586298, 0.066693455, -0.0715605617, -0.1514618993, -0.3876056969, 0.071520254, -0.1323042959, -0.4492851496, 0.0836417079, -0.3369778097, -0.1412806362, -0.151993975, -0.0507247746, 0.1981329918, -0.2802024484, -0.164775759, 0.1501646787, -0.17267479, 0.0782486349, -0.0823542029, -0.2641965449, 0.1076270565, -0.1039232835, 0.1638181359, 0.0216653794, 0.0750714988, -0.1681147665, -0.0679951906, -0.1577573121, 0.1224757805, -0.2915969789, 0.0457188673, 0.2256564647, 0.0956453606, -0.0532497689, -0.0517572053, 0.2858193815, -0.1603219807, -0.1362541765, 0.0089374315, 0.2589616776, 0.0162855387, -0.4951087832, -0.6609781981, -0.1393255442, -0.2159168571, -0.0639086887, -0.167710945, 0.0056940266, -0.1805396229, 0.1855225861, 0.3342963159, 0.2362161726, -0.3171779215, 0.0476164035, -0.1519609988, 0.4656969011, -0.2278464139, -0.1176771, 0.2646726966, -0.0819378421, 0.1152108684, 0.0929076597, -0.408846736, 0.2679080963, -0.1481288075, 0.1757386923, -0.0095773032, -0.076979354, 0.2821512222, -0.0093661835, -0.034419015, -0.2035982162, -0.0834067762, 0.2235188484, -0.1755423993, 0.2848983407, 0.0168078393, 0.2470327616, 0.1583527029, 0.7831037045, 0.1292255074, 0.0327875353, 0.2175579667, 0.0052599297, 0.3514153957, -0.1918497682, -0.2853288054, -0.0229539517, -0.0158404317, 0.013161853, 0.2241442055, 0.0619856603, -0.1975039244, -0.0958134383, 0.1189190224, -0.2726308703, -0.2277781069, 0.1294082999, -0.490745306, 0.0027031621, -0.031334471, 0.2232805789, 0.1610919237, -0.010503198, -0.0947623849, 0.0539052188, -0.0218640361, 0.0488251671, -0.4401239157, -0.0720635206, -0.1526598781, 0.170481205, 0.0650076717, 0.1534886658, -0.0169308148, -0.1147248819, 0.1063383669, -0.0172791984, 0.8683212399, 0.03263909, -0.0398173891, 0.1215233058, 0.0219677594, -0.0544049814, -0.0775591582, -0.1911670715, 0.4157629013, 0.0789689422, 0.1187902093, -0.3246719241, -0.0966300443, 0.3375360668, -0.0949484557, -0.0662096143, 0.0525595844, -0.0984243453, -0.1475110501, 0.1238877624, -0.0377121009, 0.08679232, 0.3334334791, -0.1576210409, -0.3991945982, -0.1103442088, -0.453697294, 0.3376244009, -0.0919185206, 0.6031651497, -0.2223278731, 0.2215553373, 0.0338771939, 0.0620378852, 0.1631194949, 0.6068787575, -0.2022868991, -0.052922383, 0.1267639399, -0.4122451246, 0.3593852222, 0.2898721099, -0.1225196868, 0.2348028719, -0.110287413, 0.1477228999, 0.2332478762, 0.1892338991, -0.016731726, -0.0478884131, -0.2788282931, -0.6171292067, 0.1384762228, 0.0598717295, 0.1884882599, 0.3024022579, 0.2127145529, -0.3137113452, 0.3486144841, -0.2725936174, 0.592176199, 0.227991879, 0.0438750125, 0.0887680352, -0.0557850152, 0.2563146651, -0.2995694578, 0.2728046179, -0.1660834402, 0.1047543511, -0.1470032185, 0.0285781641, 0.1856598854, 0.4128018022, -0.2262184918, 0.2714932561, -0.0224590916, 0.1870787591, -0.2246892601, 0.0352173746, -0.1360757351, -0.0008033424, 0.1077116355, 0.1070403308, -0.1398873031, 0.1070434824, 0.0506391078, -0.1895369291, -0.2601566017, -0.219078213, -0.1861040443, 0.1215513796, -0.2075138688, 0.3387216032, 0.0884596109, -0.5442289114, -0.0861146525, 0.037627127, 0.1340204179, 0.0693050474, 0.0416765176, 0.3390549123, 0.0296718273, -0.0141508207, -0.2532436848, 0.0125057735, 0.3496005535, 0.0754995495, -0.3910664916, 0.0725514963, -0.4722876251, -0.347245574, 0.187555328, 0.3271019161, 0.2945358455, -0.2646554708, -0.3012764454, 0.2109838426, 0.077639468, -0.2029531449, 0.0860262215, 0.0515346155, -0.3947245777, 0.1002960503, 0.0873530954, -0.3391227424, -0.1544996947, -0.0792509764, 0.2447081357, 0.2802986503, 0.5937027335, 0.0568266138, 0.1011832803, -0.3393918574, 0.1853222102, 0.5490466356, -0.261441201, 0.2128616124, -0.0905138627, -0.0102980938, 0.1903692335, -0.0247825105, 0.1151785702, 0.5119805932, -0.316973418, -0.3421566784, 0.0863105133, 0.2374941558, -0.033224687, 0.5423039794, -0.1008198485, 0.1273094714, 0.0738786906, 0.1382213384, -0.1998395324, 0.2956890166, -0.1303070337, 0.2745503783, -0.1511127353, -0.0046648197, 0.301702112, -0.140711695, 0.024849603, 0.0927413031, 0.0546852164, -0.192847997, -0.1149362698, 0.1451314241, -0.1180894375, 0.1305855662, -0.3208777308, -0.0045680869, -0.2357293218, -0.1790530086, 0.275293231, -0.0488188304, 0.0758125335, 0.3523579538, 0.5218026638, 0.181195721, -0.4933083653, 0.1370327026, 0.0181100983, 0.174311623, -0.1067427024, 0.1228645965, 0.1876123548, 0.1868084371, 0.0154258683, -0.1866955906, -0.0376756601, -0.2877112329, 0.2938874662, -0.2934230566, 0.1822535843, -0.0972166955, 0.4907478392, 0.249720037, 0.0945034772, 0.1780167967, -0.0638182312, 0.1687702537, -0.0699116364, 0.2082055509, 0.0441997759, 0.2500330508, 0.0892051458, 0.2784091532, 0.1207122132, 0.2616214752, -0.1054041684, 0.2577393949, 0.3951513469, -0.1394705921, 0.5480865836, 0.378035754, -0.2128003389, 0.0298309382, 0.1767873466, -0.1068787947, 0.0498503782, 0.5641692281, -0.0350949876, 0.7496697903, 0.3097232878, 0.1178717911, 0.0220391862, -0.2546598911, -0.264249295, 0.0667231232, -0.1393630952, -0.0128743937, 0.1237913296, 0.7728568912, -0.5248377323, -0.4285676777, 0.055076737, -0.130867213, -0.215927884, -0.0293585602, 0.0361302868, -0.1824019551, -0.3617468178, -0.161584422, 0.361284256, -0.2226100862, 0.2184950262, -0.0202758946, -0.1748887002, -0.2373882383, 0.1977123916, 0.2362218201, -0.022026455, -0.1897070855, 0.1611781269, 0.0687881783, -0.2228155434, 0.1481445432, -0.0129224807, 0.1751765907, 0.1693329066, -0.25503847, -0.0734553561, 0.1955967247, -0.3825570345, -0.0258779582, 0.1070543975, 0.0610244945, -0.2499839216, 0.1637919098, 0.1491634101, -0.1430626363, 0.2668723464, 0.1677126884, 0.4939668477, -0.4116889834, 0.5075232387, -0.2429691255, -0.3146923184, -0.1424963921, -0.1737228632, -0.507858634, -0.1696649641, 0.1771787405, -0.2113062888, -0.0921534002, -0.1402796507, 0.0238409024, -0.0835377723, 0.2316113859, 0.0506572612, -0.1956671178, -0.2434003204, -0.172627911, -0.5613915324, -0.0489401743, -0.1307417005, 0.0438065305, -0.1113968566, 0.4335914552, 0.0071663694, -0.0571627207, 0.2473386526, 0.0503174514, 0.2724486589, -0.0084220897, -0.4493446648, -0.0424111374, -0.1891454607, 0.0121548297, 0.0634557977, -0.3176319897, -0.1126364619, -0.0041288268, -0.1844096482, 0.0583115444, -0.394680202, 0.3809706271, 0.0556887351, 0.1241072193, 0.0109634493, 0.3038928509, 0.1361057758, 0.2473122329, -0.1419975311, -0.1855761409, -0.0968348235, 0.1947022825, 0.1502644718, 0.5261269212, -0.1752499938, -0.0080485959, -0.1147479638, 0.0516406111, 0.1026536971, -0.009281138, -0.0756680891, 0.162640959, -0.4066334367, 0.0679244027, 0.3518166244, 0.3614502251, -0.1492455155, -0.2877286375, -0.0849030912, -0.3186245263, 0.1644227952, -0.2044496983, -0.2382300645, -0.1468767077, -0.0104745263, 0.5484175682, -0.2199757993, -0.7831655741, -0.2817840278, 0.2548733354, -0.1522163302, 0.0057904269, -0.0795537531, 0.1520288289, 0.1231081113, -0.1109393165, 0.1992074102, 0.1201087013, -0.0776762143, 0.1051459685, -0.389803648 ]
https://github.com/huggingface/datasets/issues/674
load_dataset() won't download in Windows
I have the same issue. Tried to download a few of them and not a single one is downloaded successfully. This is the output: ``` >>> dataset = load_dataset('blended_skill_talk', split='train') Using custom data configuration default <-- This step never ends ```
I don't know if this is just me or Windows. Maybe other Windows users can chime in if they don't have this problem. I've been trying to get some of the tutorials working on Windows, but when I use the load_dataset() function, it just stalls and the script keeps running indefinitely without downloading anything. I've waited upwards of 18 hours to download the 'multi-news' dataset (which isn't very big), and still nothing. I've tried running it through different IDE's and the command line, but it had the same behavior. I've also tried it with all virus and malware protection turned off. I've made sure python and all IDE's are exceptions to the firewall and all the requisite permissions are enabled. Additionally, I checked to see if other packages could download content such as an nltk corpus, and they could. I've also run the same script using Ubuntu and it downloaded fine (and quickly). When I copied the downloaded datasets from my Ubuntu drive to my Windows .cache folder it worked fine by reusing the already-downloaded dataset, but it's cumbersome to do that for every dataset I want to try in my Windows environment. Could this be a bug, or is there something I'm doing wrong or not thinking of? Thanks.
41
load_dataset() won't download in Windows I don't know if this is just me or Windows. Maybe other Windows users can chime in if they don't have this problem. I've been trying to get some of the tutorials working on Windows, but when I use the load_dataset() function, it just stalls and the script keeps running indefinitely without downloading anything. I've waited upwards of 18 hours to download the 'multi-news' dataset (which isn't very big), and still nothing. I've tried running it through different IDE's and the command line, but it had the same behavior. I've also tried it with all virus and malware protection turned off. I've made sure python and all IDE's are exceptions to the firewall and all the requisite permissions are enabled. Additionally, I checked to see if other packages could download content such as an nltk corpus, and they could. I've also run the same script using Ubuntu and it downloaded fine (and quickly). When I copied the downloaded datasets from my Ubuntu drive to my Windows .cache folder it worked fine by reusing the already-downloaded dataset, but it's cumbersome to do that for every dataset I want to try in my Windows environment. Could this be a bug, or is there something I'm doing wrong or not thinking of? Thanks. I have the same issue. Tried to download a few of them and not a single one is downloaded successfully. This is the output: ``` >>> dataset = load_dataset('blended_skill_talk', split='train') Using custom data configuration default <-- This step never ends ```
[ -0.4348372221, 0.2638885677, -0.0968251005, 0.3132837117, 0.2672561705, 0.3075503707, 0.3540581763, 0.1106310412, 0.4425590038, -0.0165285002, 0.1196889356, -0.1064616963, -0.0671281219, 0.2139158845, 0.1405705661, -0.1002632976, 0.0185639635, -0.0331001766, 0.0595742464, -0.1480204612, -0.2890072465, 0.1217578128, -0.4512642026, -0.1942238808, -0.1455355734, 0.1002144888, -0.1550095975, 0.0938184559, -0.1285326481, -0.2223111987, 0.4647400379, 0.16812554, 0.223354429, 0.5532974601, -0.0001173148, -0.1689024717, 0.4234569073, -0.0814605504, -0.2416768521, -0.222142607, 0.0686220303, -0.2787033617, 0.038405437, -0.0433931947, 0.0327525698, 0.3367927372, 0.0414205156, -0.2054825574, -0.0061554047, 0.3664603531, 0.1425715834, 0.0846242532, 0.0911353156, 0.0108171897, 0.0476457141, 0.107876122, -0.1996512711, 0.4818444252, 0.1704380661, -0.4610634148, 0.2528343797, -0.0523951501, -0.2002898306, 0.125317961, 0.0094171818, 0.0281772763, -0.0543066896, -0.5504906774, 0.1858800799, 0.3046259582, 0.6023476124, 0.0177000593, -0.1578363478, -0.1204512194, 0.2528924942, -0.0260485299, 0.2037480623, 0.5220000148, -0.4007900059, -0.0259111971, -0.3000248969, -0.1521256119, -0.0877067819, 0.3059647679, -0.0330719948, 0.0428850986, 0.0164354332, 0.2268964797, 0.2488449365, 0.0721494555, 0.1917525679, -0.1281945556, 0.0682791173, 0.0279030148, -0.1809325814, 0.3298543692, -0.0504388437, 0.2989700437, -0.0418127924, 0.1580295563, -0.0601912774, 0.1740887761, 0.3321508765, 0.0459655412, 0.2691088915, -0.0994421765, 0.2820906639, -0.0252828579, 0.3245891035, 0.1211048141, -0.0828594267, 0.066749461, -0.5012171268, -0.1945681721, 0.0523749851, -0.086985983, 0.1955151409, -0.3377199173, -0.2771074176, 0.0688083544, 0.1445809752, -0.1822151989, -0.050096564, 0.2808072567, -0.1014574021, 0.4788323641, 0.1540381908, 0.2452643514, -0.2062828243, -0.1190851629, 0.1272699088, -0.0692252815, -0.3084921539, 0.1779513359, 0.7094911337, -0.0529173166, 0.0663965121, -0.1264295876, 0.1003020108, -0.0624420494, 0.0906467587, -0.2585458457, -0.02277207, 0.1866898835, 0.1599063873, 0.4259395897, 0.0041600144, -0.0352450833, -0.1602683365, 0.2484574318, -0.169622764, -0.0448932797, 0.2376054078, 0.0982198566, -0.1863000244, -0.2393063903, -0.1790405512, 0.1990800351, -0.0354627036, -0.0408195183, -0.0609381907, -0.2394403219, -0.2222972661, -0.2471052408, 0.2509648502, 0.6065971851, -0.4733546972, 0.133477509, -0.0128209805, -0.0194939096, -0.018959187, 0.1573493183, -0.2292905599, 0.2850935757, -0.3361420333, -0.0334926546, 0.0889087543, -0.279666245, -0.3336099386, 0.4279619455, -0.038976267, 0.126047343, -0.0503799878, 0.1954922974, 0.1609427333, -0.0208938587, 0.1018465981, 0.4022237957, -0.0085757365, -0.1034731269, -0.1004041806, -0.1858471185, 0.3791283071, 0.4151973128, -0.0585369356, 0.1164777428, -0.0023767781, 0.1477487832, 0.2085295916, 0.2583524883, 0.1554791331, 0.3921536505, -0.1004338339, 0.1940472126, 0.0573908463, -0.004081862, -0.5138212442, 0.2298602909, 0.3814338148, -0.1514694095, 0.1052555814, -0.0277959649, -0.2260427475, 0.0215199552, -0.0843480155, -0.2146156281, -0.0222898964, 0.0955004394, 0.3066944182, 0.034220688, -0.0121402461, 0.4903284311, -0.166546613, 0.0066173607, -0.2134784758, 0.2366083413, 0.0909736827, -0.2106551528, 0.2085708976, -0.0699844509, 0.1091531739, -0.0718647093, -0.1570319086, 0.250048548, -0.0906807482, 0.0076134964, 0.0512501001, 0.0115296915, 0.0814983919, -0.3572995365, 0.2050651908, 0.3924577534, 0.2962708473, -0.3245433867, -0.2591127753, 0.0580983087, -0.2606727183, 0.3367080092, -0.0053315093, 0.0617842302, -0.0374516547, -0.0032219863, -0.1617287993, 0.2174919397, 0.5736041069, -0.1049074903, 0.0363553762, -0.1144828945, -0.1393822581, 0.1269523203, 0.4384436011, -0.1317356676, -0.0689159334, 0.1883347332, -0.2489184886, 0.1089595184, -0.0910280123, -0.0266571157, 0.6324256659, 0.1077283993, 0.3119977713, 0.0097935488, -0.1067501754, -0.3897904754, 0.0751158819, 0.0054402822, -0.1285199672, 0.2242885977, -0.2907730341, -0.0353042632, -0.15672414, -0.0604767203, 0.2551259398, 0.1556314528, -0.254458636, 0.1504668593, -0.1579030752, 0.0311155636, -0.1553644985, -0.154865101, -0.2051061243, -0.160292387, -0.3846488893, 0.412201643, 0.2328327745, -0.1524042189, -0.5157054067, 0.1887483448, 0.1120760143, -0.3764175475, -0.0860776529, -0.0969320908, -0.3495424986, -0.0422154292, 0.3689548671, 0.166079551, 0.1740033925, -0.2884269357, -0.0160384886, -0.1641295999, 0.1684149057, -0.1408006996, -0.0490463898, 0.212425679, -0.1679718047, 0.5251678824, -0.0327253565, -0.0148315607, 0.1639983207, -0.3974748254, 0.1488026679, 0.1389055848, 0.2736146152, -0.1533205509, -0.0900415108, -0.3636282086, -0.2869466841, -0.3258349001, 0.1719225496, -0.051675234, -0.013603542, -0.0170348622, 0.1706237197, 0.0451982766, 0.0707798004, 0.0161171369, -0.1132757962, -0.193020314, 0.6751167774, -0.1407326907, -0.6298113465, 0.4133816063, 0.1727470905, -0.112663649, 0.2265710086, -0.5824320316, 0.4229877293, -0.1837517172, 0.1028689891, 0.1750197113, 0.1629974544, 0.0262149647, -0.4262454808, 0.1226004064, -0.0099766525, -0.3352339864, -0.1860523224, 0.0036447276, 0.3259530067, 0.1315895468, 0.1866595894, -0.1926448196, 0.26498276, 0.122291714, 0.1034579501, 0.1160207763, -0.091000244, 0.4476818144, 0.0732973441, -0.3743329048, 0.3017479181, -0.4511121511, 0.0208772756, 0.2434289306, 0.0960290805, -0.3561885953, -0.4275498986, 0.2047990113, -0.0676823258, -0.2523796558, 0.3047455251, -0.2845537961, 0.0341995582, 0.0155001814, 0.3321448863, 0.2220670432, -0.3462549448, 0.1259206384, 0.3952536583, -0.1381321698, 0.110162437, -0.3709643781, -0.1167593822, -0.3521861732, 0.0027280347, -0.2510639429, 0.50773561, -0.2720741034, -0.0153364986, 0.0953401551, -0.0960849002, 0.6394124031, -0.293366462, -0.0067246011, 0.2766591311, 0.2527191937, -0.4101145267, -0.2863558829, -0.32170403, 0.1813435704, -0.0756402463, -0.0983817801, -0.0939830393, -0.0081346044, -0.0319497548, 0.325868398, -0.0518059134, -0.1561313421, -0.368689239, -0.4120834172, -0.2425464094, -0.0851673633, 0.0589063168, -0.0259563643, -0.4836911857, 0.0609273128, 0.0045129987, 0.1262077987, 0.181800127, -0.2490930855, 0.1585993767, 0.2035542876, 0.3336894512, 0.2094848752, 0.1814171374, -0.0510994941, 0.6126553416, 0.0319112428, -0.0074444665, 0.356310606, -0.3362621069, 0.1000965089, 0.42063573, -0.001622263, -0.297308594, 0.103074275, 0.0874823108, -0.3481109142, 0.1405720115, 0.3611351252, -0.0728055686, -0.317098856, -0.5456187725, 0.2885626554, -0.0102032283, 0.0821491852, 0.2355407476, -0.2802588344, -0.0697859153, -0.1636259705, -0.2875610292, 0.7914930582, -0.1276798099, 0.3157044947, -0.0315799043, -0.0601147935, 0.0311627556, -0.1487030536, 0.0579587668, 0.0718752071, 0.0076465355, -0.1388119608, -0.1117237136, 0.173965618, 0.449495405, -0.2361569405, 0.3529337943, -0.0425167754, 0.1688435525, -0.08212962, 0.258441627, -0.2362319827, -0.3395774066, -0.0656649396, 0.0950023681, 0.1114197895, 0.5089246035, -0.1955383718, 0.062819466, -0.0094825523, -0.0354004428, -0.4129704535, 0.4149439633, -0.1061965227, -0.0348649956, -0.3620474339, -0.2052254826, 0.0847452953, 0.1291710734, 0.1205320954, 0.0469692647, -0.35603863, 0.2466619164, -0.0813161954, -0.2004199028, 0.0379845612, -0.2179815918, 0.0581300892, 0.0361328572, -0.3643951714, 0.1239511296, -0.140641436, -0.0554503426, -0.2276135087, 0.0271033589, 0.1607457548, -0.1537748426, -0.195122391, -0.013088828, 0.0929645896, 0.0349458866, 0.0534504503, 0.2012621015, 0.0458815061, 0.403392911, -0.0145656234, -0.135323748, -0.1503636241, 0.5252749324, -0.2151465714, -0.4387829304, 0.3159077764, 0.5385574102, -0.2298119366, -0.2972064316, 0.0839206502, 0.0740601644, -0.2920137942, -0.1127803028, 0.1028121784, 0.3448619246, 0.0863603503, -0.046895016, -0.0064446796, -0.4304705858, 0.1015973315, -0.5667568445, 0.0215956103, 0.0665640384, 0.3942691088, 0.0972845703, -0.167626366, -0.4079506397, 0.6250302792, -0.1190572456, -0.1907655299, 0.0888018161, -0.0049995398, -0.0484074131, 0.4071672559, 0.1431885511, 0.1961260736, -0.0266032461, -0.0463296734, -0.0587073378, 0.186600849, -0.0785975382, -0.0118764369, 0.1934808344, -0.1028182358, 0.0462878123, 0.0989586413, -0.6630382538, -0.2647504508, 0.0398308188, 0.2257120311, 0.1203352138, -0.1630225927, 0.0966384932, -0.1720336676, 0.3454069793, -0.199025616, 0.2333975285, -0.3064646423, 0.6293853521, 0.070385024, 0.0528669246, 0.3849900663, 0.1681176275, -0.3313408494, -0.0132240504, -0.0591457225, -0.0936454833, 0.3078833222, -0.42581743, 0.3199906051, -0.1857283413, 0.2074411511, 0.8582132459, -0.265853703, 0.0478885248, 0.3950189054, 0.0771473274, -0.0644951239, 0.0234608259, 0.0666036159, -0.1402134746, -0.0744289681, 0.1523783803, 0.0200661216, -0.3098985851, -0.2634476721, 0.0498908199, 0.4344173074, 0.2207411677, -0.1367767155, 0.472174257, 0.1196811199, 0.052789107, -0.0661486536, 0.2855158746, -0.1107039824, 0.4060111046, 0.0934903994, 0.201470688, -0.0194687471, 0.4325454831, -0.2531365752, -0.2909343243, -0.0486959778, 0.0934746042, 0.0326186195, 0.2133300453, -0.2366553992, 0.33402282, -0.4563483298, -0.245688498, -0.4532687664, -0.0144099388, 0.1548988819, -0.0124606593, -0.1058921367, -0.1668462157, -0.1983266473, 0.173877731, 0.1210281998, -0.3409789205, 0.4674226046, 0.1777602285, 0.0178959444, -0.4753955305, 0.0249210466, -0.0788091794, -0.0989107937, -0.1948540807, 0.1853651553, -0.1579914391, 0.0507142469, 0.1232791394, 0.0551743247, 0.2349169552, 0.3727571666, -0.283659935, 0.3019389212, 0.0694617629, -0.058919955, -0.0072926739, 0.5686399341, 0.1995876431, 0.0661859736, 0.2364203036, 0.0451254398, -0.0677761659, -0.0304135047, 0.0695495605, -0.1441614926, -0.2572301924, 0.0617367215, -0.080319725, 0.1083727106, -0.2424016893, -0.1758413911, -0.4169381857, -0.3438285589, 0.3497319221, -0.1343277842, 0.0909502432, -0.2353839427, 0.0050637308, 0.0340484791, 0.6027308702, 0.2792075276, 0.5272399783, -0.1141361073, -0.1882113218, -0.9585390091, 0.023473369, -0.2382193506, -0.2091089487, 0.019271763, 0.2229426354, 0.0303675197, 0.4572851062, 0.0115601979, 0.0761601254, 0.1781711131, 0.382165283, -0.3112038374, -0.1928502023, 0.0062751984, 0.4389105141, -0.1827263087, -0.4216965735, 0.2759922743, -0.1390032917, -0.1636613309, -0.0513792671, -0.1799183041, 0.0934568942, 0.1399805397, 0.4547463655, -0.1862625927, 0.5130956173, 0.1956935972, -0.0569444746, -0.4508399069, 0.0985105634, 0.1623166502, 0.1784577519, -0.0569323897, -0.2573364377, -0.4159772098, 0.1761965752, -0.0633939579, -0.065420717, 0.0987295061, 0.1002527177, -0.1380513906, -0.2078805119, 0.0800417438, 0.2679155767, 0.1112221181, 0.2325891107, -0.2463712543, -0.1765276492, -0.2108064443, 0.0051758662, 0.2323578447, -0.2249078602, -0.3384415209, -0.1001188755, 0.1650858521, -0.3213374317, 0.2227679938, -0.3573562503, 0.1331173778, 0.1265267283, -0.0716709867, -0.3002353013, 0.3131254315, -0.3208004832, 0.0173222832, -0.0236265045, 0.2866985798, -0.0939517394, -0.1967639327, 0.0633408949, -0.1457563639 ]
https://github.com/huggingface/datasets/issues/674
load_dataset() won't download in Windows
This was fixed in #644 I'll do a new release soon :) In the meantime you can run it by installing from source
I don't know if this is just me or Windows. Maybe other Windows users can chime in if they don't have this problem. I've been trying to get some of the tutorials working on Windows, but when I use the load_dataset() function, it just stalls and the script keeps running indefinitely without downloading anything. I've waited upwards of 18 hours to download the 'multi-news' dataset (which isn't very big), and still nothing. I've tried running it through different IDE's and the command line, but it had the same behavior. I've also tried it with all virus and malware protection turned off. I've made sure python and all IDE's are exceptions to the firewall and all the requisite permissions are enabled. Additionally, I checked to see if other packages could download content such as an nltk corpus, and they could. I've also run the same script using Ubuntu and it downloaded fine (and quickly). When I copied the downloaded datasets from my Ubuntu drive to my Windows .cache folder it worked fine by reusing the already-downloaded dataset, but it's cumbersome to do that for every dataset I want to try in my Windows environment. Could this be a bug, or is there something I'm doing wrong or not thinking of? Thanks.
23
load_dataset() won't download in Windows I don't know if this is just me or Windows. Maybe other Windows users can chime in if they don't have this problem. I've been trying to get some of the tutorials working on Windows, but when I use the load_dataset() function, it just stalls and the script keeps running indefinitely without downloading anything. I've waited upwards of 18 hours to download the 'multi-news' dataset (which isn't very big), and still nothing. I've tried running it through different IDE's and the command line, but it had the same behavior. I've also tried it with all virus and malware protection turned off. I've made sure python and all IDE's are exceptions to the firewall and all the requisite permissions are enabled. Additionally, I checked to see if other packages could download content such as an nltk corpus, and they could. I've also run the same script using Ubuntu and it downloaded fine (and quickly). When I copied the downloaded datasets from my Ubuntu drive to my Windows .cache folder it worked fine by reusing the already-downloaded dataset, but it's cumbersome to do that for every dataset I want to try in my Windows environment. Could this be a bug, or is there something I'm doing wrong or not thinking of? Thanks. This was fixed in #644 I'll do a new release soon :) In the meantime you can run it by installing from source
[ -0.5447332263, 0.2937762439, -0.0705708414, 0.2974266708, 0.1420514435, 0.3211803734, 0.2740901411, 0.2108799368, 0.3762369454, -0.0303393342, 0.1460883468, -0.0534872822, -0.0536377765, 0.099380888, 0.1741899997, -0.0783414915, 0.0386147685, 0.0273938328, 0.0398453474, -0.1172636598, -0.3460811675, 0.1343622804, -0.5268457532, -0.2473072112, -0.1183368862, 0.1657861769, -0.1818950027, 0.1549069881, -0.1827932, -0.3171298802, 0.4274266958, 0.2730979919, 0.2871668041, 0.5432709455, -0.000117681, -0.2694991827, 0.4458220303, -0.084096022, -0.0909614116, -0.1485744268, 0.0208318494, -0.3754149675, 0.0824156329, -0.0847016647, 0.0044254726, 0.2943903804, 0.106600523, -0.2247384042, -0.0714634284, 0.303438127, 0.1490246803, 0.05838231, 0.186641261, -0.0182453394, 0.0309292004, 0.082287766, -0.2140996754, 0.3726806045, 0.1696051657, -0.3838157058, 0.1925891936, 0.0155724036, -0.2315173894, 0.1429764479, 0.0123976208, -0.0477100462, -0.0509744436, -0.4643264413, 0.1777079701, 0.2681755126, 0.7157570124, -0.0258966479, -0.1523783952, 0.0638919398, 0.170057103, 0.0090478053, 0.2117129564, 0.4464978874, -0.300486356, -0.0090609007, -0.320135355, -0.202188164, -0.1552505344, 0.3006734848, -0.0191624016, 0.172332868, 0.0151739754, 0.2417907119, 0.2533402443, 0.1294083297, 0.2495852858, -0.0842914581, -0.0199931599, 0.0875170082, -0.120290041, 0.3168124855, -0.0019656448, 0.4192124307, -0.0137596251, 0.1223873943, -0.0840526074, 0.2061975896, 0.3144580722, 0.0479618944, 0.3432308435, -0.1232666969, 0.2831479907, 0.0193242412, 0.4794271886, 0.1123723164, -0.0280560739, 0.0329987928, -0.4569460452, -0.1710482985, 0.042713616, -0.077058889, 0.300737828, -0.4118877947, -0.1713653058, 0.0112372078, 0.1327827126, -0.2327602804, -0.0835275576, 0.2520167828, -0.0977336094, 0.5410684347, 0.1398293674, 0.2110763937, -0.2146804929, -0.0960876793, 0.1337648183, -0.0282489844, -0.3755551875, 0.1607368141, 0.6784367561, -0.0189377293, 0.0583458729, -0.1191412136, 0.0624017306, 0.0006960462, 0.0645576715, -0.2367899269, -0.0150658004, 0.2297654748, 0.139935568, 0.4387680292, -0.0286704134, -0.0200702175, -0.2278594971, 0.2863511443, 0.0123347854, -0.0508151278, 0.1796676815, 0.0697397888, -0.1441722959, -0.1259816736, -0.126490131, 0.2690013647, -0.0426498652, -0.1282821, 0.017034959, -0.2095020413, -0.2395154089, -0.2717231512, 0.2266687304, 0.646456778, -0.5141645074, 0.2695252895, -0.0941731557, -0.0030311183, 0.0137255955, 0.0930573046, -0.1872511506, 0.2323407233, -0.2925848663, -0.0279399548, 0.0329585075, -0.3341712654, -0.3295567334, 0.4202955067, 0.0340786986, 0.1563070863, -0.0726222768, 0.2671049237, 0.0862024128, -0.0714237615, -0.0056535429, 0.4295674264, -0.0183061007, -0.0602427386, -0.1239617318, -0.1605127007, 0.3207066655, 0.3485831022, -0.0397549868, 0.1262581199, 0.0998114273, 0.1640675664, 0.2192299068, 0.2019404173, 0.0795271471, 0.3887036145, -0.0824792758, 0.1266226619, 0.116750665, 0.0072806347, -0.6006154418, 0.1996981353, 0.4054842591, -0.0834776312, 0.1673304141, -0.0395289697, -0.2067570537, -0.0293624271, -0.0387590677, -0.2925134897, -0.0106430436, 0.1620914042, 0.3040173054, 0.0198230427, -0.0307583194, 0.4781758785, -0.0493636727, 0.0320865549, -0.2876859009, 0.1284186989, 0.0026966247, -0.1307896525, 0.1691423059, -0.1523956805, 0.1291793585, -0.117284663, -0.1496608555, 0.3383614719, -0.0526154526, 0.0253006853, 0.0424154103, 0.0579258204, 0.0808427408, -0.4428676069, 0.284203738, 0.4864922762, 0.2960573137, -0.3706299663, -0.3011003435, 0.0170020498, -0.3206237555, 0.2708460689, -0.0036833801, 0.0178483073, 0.0608161725, -0.0296877697, -0.1301566362, 0.1781574786, 0.5836647153, -0.1008610949, 0.0228965748, -0.1700229049, -0.1543066204, 0.1075340956, 0.3203770518, -0.091645278, -0.0287028179, 0.1544532329, -0.2725630105, 0.0527823754, -0.0886599943, -0.039687112, 0.6740581393, 0.1207210273, 0.3030721247, 0.014198428, -0.0475736409, -0.3879135847, 0.1116901189, -0.0549834631, -0.1497772932, 0.1657144427, -0.3047571182, -0.1206817403, -0.2102823108, -0.017445188, 0.2316933423, 0.177131027, -0.2004680037, 0.0942751318, -0.044428546, 0.0238132831, -0.0655736849, -0.238458693, -0.1516899168, -0.2049008012, -0.330704093, 0.4893770516, 0.215212211, -0.1464355886, -0.5216552019, 0.1931724846, 0.1326215714, -0.2481978834, -0.1966028661, -0.1243069768, -0.3068209887, -0.0133874947, 0.3423081934, 0.1893699467, 0.1501082033, -0.2650110126, 0.0399424583, -0.2486814409, 0.0475107431, -0.1428273469, -0.0254677664, 0.2613438666, -0.0454117209, 0.4417714179, -0.0693360195, -0.0001037398, 0.1407705098, -0.4553453326, 0.1400993019, 0.1691413224, 0.2193461508, -0.2320089191, -0.0794263035, -0.3101460636, -0.225071311, -0.342876792, 0.2097819149, -0.0245215371, 0.0428836569, -0.0143598523, 0.1111811697, 0.0196625572, 0.1156874225, -0.0526176877, -0.1598748565, -0.1181112379, 0.660984993, -0.2714058757, -0.6282074451, 0.3548401892, 0.291549772, -0.105273068, 0.1916490346, -0.583519578, 0.3744537234, -0.1928443909, 0.0926940218, 0.1994615197, 0.1941562891, -0.016679531, -0.3557738066, 0.1009249315, -0.0099810055, -0.1868427098, -0.2314059138, -0.0458581895, 0.2779679596, 0.1946285367, 0.1056091264, -0.2316226065, 0.2021383643, 0.1312457323, 0.1842388362, 0.2269839197, -0.0310878418, 0.508689642, 0.0304643307, -0.3904337287, 0.254180789, -0.408033818, -0.0001527847, 0.297804147, 0.1291253567, -0.4621705711, -0.4852897823, 0.1718788594, -0.0858809277, -0.2213991582, 0.2845761776, -0.2263181955, -0.019510081, 0.0193995852, 0.2586950064, 0.2411652207, -0.4452515543, 0.1517035365, 0.4347313046, -0.139911443, 0.0723232627, -0.3505475819, -0.0789590701, -0.4334243834, 0.1168989316, -0.2370971739, 0.4480697215, -0.1931824833, -0.0272671599, 0.1092575565, -0.1246505454, 0.6732805967, -0.3448230922, 0.003315238, 0.3158024251, 0.1881671101, -0.3902435303, -0.23044236, -0.3901024163, 0.335569948, -0.0902062878, -0.1591768712, -0.114489004, 0.005000107, 0.018363731, 0.2352610677, -0.0144215375, -0.1628564596, -0.3745217621, -0.4569237828, -0.2227561623, -0.0896037892, 0.0780537575, -0.0599670038, -0.428076148, 0.124917984, -0.0234536733, 0.107083939, 0.1048134714, -0.1557908505, 0.1851317137, 0.1956193894, 0.2743835449, 0.2562502921, 0.1056018323, -0.0424188301, 0.5449218154, -0.0249645934, 0.0179826319, 0.3539718688, -0.3520488143, 0.085355185, 0.3696375489, 0.008487463, -0.345415473, 0.0923865587, 0.058331091, -0.3786526322, -0.0176140219, 0.3195759952, -0.0532701649, -0.2735888064, -0.5353895426, 0.3098927736, -0.0057080141, 0.0565164946, 0.3623388708, -0.2526047528, -0.0515090041, -0.1430330724, -0.2395104021, 0.8468364477, -0.1075579152, 0.2447050214, -0.0618476011, -0.0157157611, 0.0893334821, -0.193618536, 0.0676237121, -0.0049970271, -0.0329640545, -0.1138349995, -0.1157872975, 0.2238120735, 0.417250067, -0.4091871679, 0.2944082916, -0.059264604, 0.1347717792, -0.1224903688, 0.306883961, -0.2343120426, -0.2817794383, -0.1004640833, 0.0891600624, 0.1238323078, 0.4508270621, -0.2824507654, 0.1202137098, 0.069091849, -0.1100991294, -0.4286581278, 0.4342186451, -0.0060542496, 0.0589018464, -0.416652143, -0.0702736527, 0.0664738715, 0.1753122211, 0.1721328944, 0.0660055652, -0.3955236077, 0.2719851732, -0.0355881117, -0.3001210392, 0.0164691061, -0.1969322711, 0.0407424048, 0.0036632807, -0.3454322517, 0.1249592826, -0.1769383848, -0.2024338841, -0.1881969869, 0.0765613839, 0.1863642484, -0.1148936376, -0.1953827739, 0.0253344644, 0.0366907306, -0.011333474, 0.0588607043, 0.2570265532, -0.0104695, 0.4543804228, 0.0297166258, -0.1582190692, -0.1085016429, 0.5431082845, -0.0927427337, -0.4721798003, 0.1921754479, 0.714869082, -0.2609759271, -0.2856500745, 0.0789523348, 0.1166237146, -0.2896576524, -0.0812636688, 0.100352861, 0.3360961974, 0.1872029155, 0.0144001916, -0.078841798, -0.3600306213, 0.0363111831, -0.5694881678, 0.0812424198, 0.0486536361, 0.3408636153, 0.0979806632, -0.1303730458, -0.5350731611, 0.6288611293, 0.0665249452, -0.2064330578, 0.0589353889, -0.0528290197, -0.0000533331, 0.3957708776, 0.1604871154, 0.246085301, -0.0190909263, -0.0477108732, -0.0280647893, 0.1173536927, -0.0809960738, -0.02946347, 0.221372202, -0.1012444943, 0.019801503, 0.1108258516, -0.6536312103, -0.3515217304, 0.0445243083, 0.194799602, 0.1392393708, -0.1913039386, 0.0843777061, -0.0571951792, 0.3019419611, -0.1776508838, 0.2432240695, -0.2800219357, 0.6548910141, 0.0084428666, 0.1106429845, 0.29200086, 0.0861853287, -0.2077653408, -0.003836469, 0.0258450471, -0.0390642509, 0.2755316198, -0.2831004858, 0.2741781473, -0.1997776628, 0.2218068242, 0.8365334868, -0.2370651364, 0.0382379144, 0.3122193813, 0.0683991238, -0.1233077794, -0.0589577593, 0.0357363075, -0.1718782037, -0.0692727417, 0.1240698695, -0.0218726601, -0.36596784, -0.2176697552, 0.0453305058, 0.512740314, 0.1894972473, -0.1903727949, 0.4263849556, -0.0427493043, 0.0131009752, -0.0716625303, 0.3250522614, -0.1172902286, 0.4445210397, 0.1096292734, 0.170662269, 0.0574070774, 0.4089532793, -0.2246468365, -0.2308944613, 0.0619934909, 0.1573180407, 0.0614791438, 0.193294391, -0.19536677, 0.2428783178, -0.4373215735, -0.1304505616, -0.4729942977, 0.0679322332, 0.2066802979, -0.0204454772, -0.1333405823, -0.1568821967, -0.1622098833, 0.2003724575, 0.0817893445, -0.2086398602, 0.5919042826, 0.2108471543, 0.0559960566, -0.4479520321, 0.1479145586, -0.1466021091, -0.0857847407, -0.2470909804, 0.198336646, -0.072239086, 0.133290872, 0.0773827434, 0.1716845185, 0.2039045244, 0.4424134195, -0.1939237267, 0.3094864786, -0.0019639388, -0.1057757735, -0.0110082049, 0.5946025252, 0.2005304694, 0.0328151844, 0.1848656982, 0.0196750518, -0.0471919551, 0.0039446913, 0.0807812586, -0.1181070134, -0.119259201, 0.0060736262, -0.0527143739, 0.0527913719, -0.1306185573, -0.1308090687, -0.4362172782, -0.3978841305, 0.3375805616, -0.2368496507, 0.0197786838, -0.2708039582, 0.0072685187, 0.0866930187, 0.6320140958, 0.338993907, 0.5349498987, -0.1189101189, -0.2785027325, -1.0058070421, 0.1198853701, -0.1991843283, -0.1983905435, 0.0246274527, 0.2282788008, 0.0540425852, 0.5228113532, 0.0532017797, 0.0760000944, 0.2053550482, 0.3606359959, -0.2714616954, -0.0808674097, 0.1189028844, 0.4150774181, -0.2541853786, -0.4474765658, 0.3048178852, -0.1501555294, -0.1415578425, -0.1338583976, -0.2137737125, 0.1502433717, 0.1927307695, 0.4347639382, -0.1761738956, 0.4640432596, 0.0954777896, -0.1309529543, -0.4059809446, 0.0921002328, 0.1357537806, 0.1186203063, -0.0427123979, -0.256197989, -0.4338245094, 0.0624664389, -0.0503888763, -0.0436753929, 0.0386259817, 0.146269083, -0.1939916164, -0.230573982, -0.0851171613, 0.2610265315, 0.0376042426, 0.2082824409, -0.2089046836, -0.1773204207, -0.2015266865, -0.0190659501, 0.2685918808, -0.3023802042, -0.3177042007, -0.1464695781, 0.0872826427, -0.4101587534, 0.1301523447, -0.4316548705, 0.1105722934, 0.056214489, 0.0241494104, -0.2906050682, 0.2589585185, -0.3456105888, -0.0299872793, -0.0750536919, 0.2575956583, -0.0224146377, -0.2148823589, -0.0522240512, -0.1409000605 ]
https://github.com/huggingface/datasets/issues/674
load_dataset() won't download in Windows
Closing since version 1.1.0 got released with Windows support :) Let me know if it works for you now
I don't know if this is just me or Windows. Maybe other Windows users can chime in if they don't have this problem. I've been trying to get some of the tutorials working on Windows, but when I use the load_dataset() function, it just stalls and the script keeps running indefinitely without downloading anything. I've waited upwards of 18 hours to download the 'multi-news' dataset (which isn't very big), and still nothing. I've tried running it through different IDE's and the command line, but it had the same behavior. I've also tried it with all virus and malware protection turned off. I've made sure python and all IDE's are exceptions to the firewall and all the requisite permissions are enabled. Additionally, I checked to see if other packages could download content such as an nltk corpus, and they could. I've also run the same script using Ubuntu and it downloaded fine (and quickly). When I copied the downloaded datasets from my Ubuntu drive to my Windows .cache folder it worked fine by reusing the already-downloaded dataset, but it's cumbersome to do that for every dataset I want to try in my Windows environment. Could this be a bug, or is there something I'm doing wrong or not thinking of? Thanks.
19
load_dataset() won't download in Windows I don't know if this is just me or Windows. Maybe other Windows users can chime in if they don't have this problem. I've been trying to get some of the tutorials working on Windows, but when I use the load_dataset() function, it just stalls and the script keeps running indefinitely without downloading anything. I've waited upwards of 18 hours to download the 'multi-news' dataset (which isn't very big), and still nothing. I've tried running it through different IDE's and the command line, but it had the same behavior. I've also tried it with all virus and malware protection turned off. I've made sure python and all IDE's are exceptions to the firewall and all the requisite permissions are enabled. Additionally, I checked to see if other packages could download content such as an nltk corpus, and they could. I've also run the same script using Ubuntu and it downloaded fine (and quickly). When I copied the downloaded datasets from my Ubuntu drive to my Windows .cache folder it worked fine by reusing the already-downloaded dataset, but it's cumbersome to do that for every dataset I want to try in my Windows environment. Could this be a bug, or is there something I'm doing wrong or not thinking of? Thanks. Closing since version 1.1.0 got released with Windows support :) Let me know if it works for you now
[ -0.5312045217, 0.2285065204, -0.0575986058, 0.266649574, 0.1350666732, 0.323918432, 0.2561956048, 0.2198930681, 0.3572814763, 0.0436171703, 0.1882217377, -0.0625391826, -0.0545897298, 0.1764082611, 0.1357097328, -0.08165925, 0.0941099674, 0.0226967838, 0.0226594284, -0.1013216153, -0.3583258688, 0.1709133685, -0.4910070598, -0.1853562891, -0.1204137579, 0.2017239034, -0.218099311, 0.1222667918, -0.1995780766, -0.3122927845, 0.4654702544, 0.3261950016, 0.3328742087, 0.4956375957, -0.0001170868, -0.2315742821, 0.4839546382, -0.0690701157, -0.1345817596, -0.2716265619, -0.0077641648, -0.3620640337, 0.0949624553, -0.0017415415, 0.0109472144, 0.3178225756, 0.1540233046, -0.2169944346, -0.1187461168, 0.3016263545, 0.1500113606, 0.065098837, 0.2076624781, -0.0231750272, 0.1106365919, 0.0990931466, -0.2376213968, 0.365401119, 0.1448056549, -0.3507416546, 0.1638029218, 0.0025702815, -0.1906080842, 0.0756300315, 0.099175401, -0.0257794112, 0.0206769593, -0.4977040887, 0.1921180487, 0.2145079821, 0.7776691914, -0.0320853107, -0.1946039349, 0.0488457829, 0.1430143267, -0.0328601599, 0.240440622, 0.4651774764, -0.3127718866, 0.0017899356, -0.3549052775, -0.1745452732, -0.214707166, 0.3462232649, -0.0036782941, 0.1802300364, 0.0305234883, 0.2561664581, 0.2806200385, 0.1594637334, 0.2893836498, -0.1119093448, -0.0438717119, 0.1055942252, -0.1552413702, 0.299774617, 0.0266167484, 0.4183346927, 0.0175083, 0.1570258588, -0.0587566681, 0.1947078109, 0.3071298599, 0.0666198805, 0.4180445671, -0.060703706, 0.3588199914, -0.0342602544, 0.4944935739, 0.0960693881, 0.0118603576, 0.0071075624, -0.4333918393, -0.1531756371, 0.0900340676, -0.0854355618, 0.2950433493, -0.4243563414, -0.1556747556, 0.0356019251, 0.1440683007, -0.2066548169, -0.1208040491, 0.2567281723, -0.0902356952, 0.5926254988, 0.1480209827, 0.1692720056, -0.2379566878, -0.0793556497, 0.1535153538, -0.0292147789, -0.3896257281, 0.1484382451, 0.6411632895, -0.0656775981, 0.025834186, -0.1347649097, 0.0625347048, -0.0405454487, 0.0859264657, -0.2406891137, -0.0449582525, 0.2409295738, 0.1386255324, 0.4186852276, -0.061776679, 0.0067274952, -0.2271533012, 0.2992712557, -0.0781945065, -0.0815832689, 0.126463145, 0.0773236081, -0.1531827897, -0.1732040495, -0.1545853019, 0.2747508585, -0.1034758985, -0.1443245411, -0.0104166362, -0.1774778962, -0.3123806715, -0.2741759419, 0.1735447645, 0.6089101434, -0.5470991731, 0.2760284245, -0.0341996662, -0.0876645222, -0.0104916161, 0.0894185677, -0.1416235119, 0.1639376432, -0.2924815714, -0.021529533, 0.0259429663, -0.3787800074, -0.3475463986, 0.4641361833, 0.0749899223, 0.0911943018, -0.0299301855, 0.2377230525, 0.1555583477, -0.0865237042, -0.0461792536, 0.404977411, -0.0507778935, -0.0866376981, -0.148677066, -0.1572993696, 0.2671690285, 0.3516069353, -0.0558427647, 0.1907022893, 0.0927741528, 0.0783789977, 0.2400557548, 0.2020247877, 0.1472162604, 0.4037682116, -0.1247167364, 0.0438926145, 0.1558069736, -0.0253992714, -0.6035883427, 0.2067325413, 0.3425559103, -0.0317384712, 0.1866751015, -0.0706362948, -0.2475806922, -0.0217131972, -0.0718119368, -0.2302505225, -0.0182546731, 0.1467156112, 0.2857325375, -0.0163862742, -0.0573724248, 0.4816450179, 0.0001619571, 0.0678999797, -0.3044672012, 0.1455875337, -0.0020917589, -0.1764754802, 0.1640511751, -0.1513475925, 0.1204150692, -0.109336853, -0.1514502615, 0.3896582127, -0.0368118845, 0.0581553355, 0.0491904207, 0.0184191801, 0.0687950924, -0.3777016699, 0.2146209925, 0.4776513577, 0.2862361372, -0.3557851911, -0.3085818589, 0.1224040687, -0.2928327024, 0.2688407302, 0.0279134754, 0.042954497, 0.0413199365, -0.0010228322, -0.1258667856, 0.2151593417, 0.5775263309, -0.092922017, -0.0020060453, -0.1643344015, -0.1167261675, 0.0748737082, 0.2431918085, -0.1832415611, -0.0991429538, 0.1818742007, -0.2656548321, 0.0465275198, -0.0512062609, -0.0279064197, 0.6937488914, 0.1468280256, 0.2767843604, 0.0139103746, -0.0489187837, -0.346419245, 0.1142465398, -0.0273887254, -0.1994450539, 0.1210507974, -0.2485821992, -0.1819970012, -0.2715472579, -0.0218852237, 0.1723166108, 0.2161436826, -0.2237138897, 0.106453836, -0.0458940342, 0.0451418869, -0.041859407, -0.2032458484, -0.2282697707, -0.2365656942, -0.3288747668, 0.5409024954, 0.2697990239, -0.1737598777, -0.4869422615, 0.2375600189, 0.0965303928, -0.1562858522, -0.2288697213, -0.131717205, -0.3606882989, -0.0115166344, 0.3313678503, 0.1251849234, 0.171201095, -0.2329802066, 0.0551181287, -0.1988320947, 0.1272967756, -0.126177296, -0.0057975678, 0.2244525254, -0.0427630581, 0.4186484814, -0.1009569764, 0.0202354267, 0.1198295802, -0.4642217755, 0.0796953291, 0.2274574935, 0.1727817953, -0.218969211, -0.1373375356, -0.2433602512, -0.2774142921, -0.2721555531, 0.2006097734, 0.0106297387, 0.0735636801, 0.0224575214, 0.1143830046, 0.005369362, 0.0750945061, -0.0262676626, -0.1641980708, -0.2334052324, 0.6322650313, -0.2217447311, -0.6599829793, 0.4075289071, 0.2974896729, -0.1475100219, 0.2126587778, -0.5720701218, 0.3467955291, -0.1019633114, 0.0610634089, 0.2333486527, 0.1665355861, -0.0139729604, -0.3323438764, 0.1042614207, -0.0081535121, -0.2222928405, -0.2352989614, -0.0378950872, 0.2994039655, 0.1876714081, 0.1272700131, -0.1850461066, 0.2182713002, 0.1114651412, 0.2113911062, 0.2606626749, -0.0783335641, 0.4497875869, -0.0028932593, -0.3595741391, 0.2079335898, -0.453053385, -0.0218362752, 0.241074428, 0.1938198507, -0.4492456317, -0.5416460633, 0.1022523269, -0.0325710736, -0.2288876921, 0.2101326138, -0.2281317413, 0.0144009255, -0.0066876863, 0.308188498, 0.2055812329, -0.4835150838, 0.1495596468, 0.5113054514, -0.1142197251, 0.0346213728, -0.2572854459, -0.0452081338, -0.5120877624, 0.1543218046, -0.241256848, 0.468208462, -0.1624614149, 0.0226239283, 0.1476807147, -0.1611584872, 0.7127901912, -0.334844768, 0.0090464195, 0.2911954224, 0.1778964698, -0.3477018178, -0.2521777451, -0.3208562732, 0.2707756758, -0.1333313435, -0.1066119894, -0.0513594076, -0.0276868492, 0.0194044858, 0.2085132301, -0.0282631945, -0.2030302882, -0.387596935, -0.4489170313, -0.2161348164, -0.1169514731, 0.0080401953, -0.0554373078, -0.3381243348, 0.0704430118, -0.038957566, 0.0448575094, 0.1545577049, -0.1704308838, 0.1566195786, 0.117769897, 0.2518831193, 0.2605077326, 0.1264921278, -0.044479534, 0.535225749, -0.0068988046, -0.0584066734, 0.3456350267, -0.3245079219, 0.0659537986, 0.379437536, -0.0373905711, -0.3221268952, 0.0372583382, 0.0385673717, -0.3754248619, -0.0805503055, 0.3639704287, -0.1234167591, -0.2981170714, -0.5118230581, 0.3101021051, -0.0069005159, 0.0436957516, 0.3944942653, -0.2841476202, -0.0619636811, -0.0923060626, -0.289914608, 0.9123580456, -0.1042078063, 0.2789793611, -0.0560504682, -0.0926121622, 0.0602322519, -0.059732724, 0.070108965, 0.0114504956, -0.0106591387, -0.1747798771, -0.091247268, 0.224644497, 0.4207730889, -0.4020050466, 0.3291707337, -0.0444841646, 0.1301694959, -0.1456131041, 0.3398074508, -0.2560741901, -0.2890047729, -0.1004841179, 0.1076412424, 0.1147080958, 0.4825769961, -0.2655574679, 0.0962701738, 0.1247294396, -0.0826990455, -0.4117217958, 0.3731673062, 0.021927774, -0.0088621425, -0.3657300174, -0.0865779594, 0.0371257439, 0.0833037272, 0.1346683651, 0.0007063674, -0.4090569019, 0.2347531617, -0.0154676167, -0.2087962776, 0.0245861504, -0.2035184056, 0.0525615327, -0.0225746837, -0.3193158805, 0.1353248656, -0.1560496092, -0.1914234757, -0.1911018491, 0.0524756461, 0.1565386057, -0.0776952803, -0.163013503, -0.0364583619, -0.0055670645, -0.0188113581, 0.0700895488, 0.2706729472, 0.0310921501, 0.3902578354, 0.0121837491, -0.1944543272, -0.110698998, 0.6057684422, -0.0806569904, -0.5021284223, 0.1530233026, 0.6260691881, -0.2508815229, -0.243290633, 0.1853442192, 0.1611516327, -0.2851474881, -0.0198678039, 0.1127229854, 0.3741264939, 0.139812544, 0.0936656967, -0.0518895425, -0.3265526593, 0.0399390943, -0.562319994, 0.003001963, 0.0282321069, 0.3559063375, 0.1410150081, -0.1761779189, -0.5053318143, 0.6522714496, 0.0118456166, -0.2051388472, 0.0404378697, 0.0438742638, -0.0516298935, 0.3406749368, 0.1937028915, 0.2160095274, -0.075050272, -0.0469053388, -0.0835295245, 0.0763613284, -0.0669474527, -0.0165357664, 0.2285728753, -0.0713758841, 0.0152987372, 0.1097325012, -0.6655231714, -0.3301803172, 0.0519565269, 0.2147805542, 0.1841877848, -0.2401820123, 0.0629859641, -0.0378192961, 0.3294990361, -0.140905112, 0.2073756009, -0.2496888191, 0.6787935495, 0.0323356427, 0.1153360158, 0.2936726511, 0.0756283924, -0.1755986661, -0.0027930588, -0.0256995335, -0.05522082, 0.2679035366, -0.2902219594, 0.2437648475, -0.1873649508, 0.2755455375, 0.8399636745, -0.2070833147, 0.0871812701, 0.2832947075, 0.0746316835, -0.0726211667, -0.0405225642, 0.0131940134, -0.1571922749, -0.0853196532, 0.0677446499, -0.0451033711, -0.366861701, -0.2151037306, 0.0573218614, 0.4865673482, 0.1241236627, -0.1937590837, 0.4410760999, 0.0168464985, 0.0754280239, -0.0500853769, 0.284111619, -0.1606817394, 0.44080621, 0.1419351995, 0.1854073852, 0.0982331559, 0.4767301381, -0.2801033854, -0.2568105161, 0.0381130613, 0.1330263317, 0.0329110622, 0.173766613, -0.1635854393, 0.2226180583, -0.4554187953, -0.100529626, -0.4397478104, 0.0793715194, 0.2263459414, -0.0563457534, -0.2158165723, -0.1652945429, -0.1753158271, 0.1932718009, 0.0722957924, -0.2186769843, 0.5698969364, 0.2334740162, 0.0850052238, -0.390422523, 0.1136044264, -0.1412290335, -0.0061676083, -0.2205159813, 0.1858051717, -0.1524084061, 0.2062792778, 0.1133081019, 0.1342743784, 0.2519591749, 0.5287399292, -0.2413774431, 0.2972760797, -0.032413438, -0.1212810576, 0.0077467142, 0.586579442, 0.240414843, 0.1050584912, 0.2001647949, 0.0082780691, -0.0164263342, 0.0515775196, 0.0666476637, -0.1798184067, -0.1858167201, 0.0692103431, -0.0355624668, 0.0360708982, -0.1252233684, -0.1398775131, -0.3972564042, -0.424310118, 0.3482152224, -0.2158013433, 0.0149442982, -0.279414326, 0.0117861433, 0.111822553, 0.5671471357, 0.332228303, 0.5297788382, -0.1620535254, -0.2303098142, -0.9565059543, 0.1080505103, -0.1685983092, -0.1755847633, 0.0098841479, 0.192317903, 0.0025185274, 0.4843907058, 0.0235464014, 0.0809896365, 0.2134414017, 0.3761447072, -0.2119743526, -0.0689432546, 0.1132203341, 0.3849098086, -0.2799791098, -0.4363291264, 0.3204381764, -0.1441283673, -0.1724737585, -0.051752653, -0.1804919839, 0.1560872048, 0.1969274282, 0.4207724929, -0.2091133744, 0.4729419351, 0.1104512513, -0.0546743311, -0.444727689, 0.0897134691, 0.0714222342, 0.0718476847, -0.0723684207, -0.2931542695, -0.3677375913, 0.0291808378, -0.0544561408, -0.0275194198, -0.0003349809, 0.1716923714, -0.196629256, -0.1751502603, -0.0856799632, 0.2230073959, 0.0221844744, 0.1691587865, -0.1965217739, -0.1537230015, -0.2684344053, -0.0431597568, 0.2580581903, -0.2556963861, -0.3342412412, -0.1974041909, 0.0821194798, -0.4035398364, 0.1280595213, -0.4431245625, 0.0934143737, 0.0588151179, 0.0057147131, -0.265450865, 0.2720971704, -0.2873012722, 0.0370800272, -0.059197586, 0.2502171695, 0.0090839192, -0.2215784043, -0.0548283048, -0.1950524151 ]
https://github.com/huggingface/datasets/issues/672
Questions about XSUM
We should try to regenerate the data using the official script. But iirc that's what we used in the first place, so not sure why it didn't match in the first place. I'll let you know when the dataset is updated
Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg
41
Questions about XSUM Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg We should try to regenerate the data using the official script. But iirc that's what we used in the first place, so not sure why it didn't match in the first place. I'll let you know when the dataset is updated
[ -0.0942949355, -0.3681171536, -0.1456751525, 0.4842416942, 0.3399179578, -0.0058331238, 0.1115036681, -0.0186547711, 0.213875398, 0.260037303, -0.2300762087, 0.2279763073, 0.1195970848, 0.4290391803, 0.1250694543, 0.115834102, -0.0148444213, -0.097562708, -0.3769930303, -0.2929212153, 0.0028307599, 0.0524277799, -0.0749753267, -0.1406484097, -0.6725172997, 0.0625344515, -0.1325014681, 0.2614851892, -0.0806932598, -0.2141222209, 0.2379072309, -0.0045654564, 0.0516930707, 0.5184448361, -0.0001057436, 0.0076496513, 0.1227379367, -0.0369253978, -0.1100253537, 0.2392048091, -0.1737131327, -0.0169157684, -0.0144083509, -0.3685779572, -0.0910531804, 0.0295115821, -0.1441587508, -0.3795345724, 0.2213728428, 0.0326643884, 0.2159141749, 0.1681645215, 0.1285506785, -0.0342707075, -0.0895382836, -0.0963414535, 0.1405212134, 0.2543076575, 0.3807453215, 0.2769885063, 0.0853179321, 0.1232879162, 0.0821799487, -0.1980161667, 0.2630245984, 0.0695983171, 0.3349298239, -0.1842191964, -0.304740876, 0.281172514, 0.8441705704, -0.060647402, -0.2785620987, -0.0036501691, 0.0082518822, -0.1532489657, 0.1460048407, 0.0381585248, 0.394221127, -0.023648059, -0.2479046136, 0.4130248129, -0.2279996574, 0.030081138, -0.1365813017, -0.0956765711, -0.0382305384, 0.0148487827, -0.2771069407, -0.036251545, 0.0802995712, -0.0657887533, 0.1476400048, 0.1785173714, -0.2882027328, -0.1103014648, -0.0465075001, -0.0006228869, 0.22708565, 0.1416062713, 0.2942691743, 0.0741878748, -0.3836722672, 0.0214590374, 0.1987365931, 0.2798702419, 0.4257885814, -0.5590228438, 0.00558148, -0.089739494, -0.1473904848, 0.0754270703, -0.345387578, -0.0143104652, 0.0497555472, 0.0657478794, -0.1653846204, -0.3561192453, -0.2374672145, 0.2784877121, 0.038900055, -0.11220029, 0.157184273, -0.1443991065, 0.0373630524, 0.4274276197, 0.0311980583, 0.0123144872, -0.5540839434, -0.3021520078, -0.3512795568, 0.0989583358, -0.0861771256, -0.0159051102, 0.0856984779, -0.1169759482, 0.3941987455, -0.0891079977, 0.2661682963, -0.072129406, 0.0343526304, 0.1208451614, -0.3228804469, 0.2343470901, 0.016474355, -0.0114154099, -0.0378507636, 0.029664861, 0.0094078248, 0.0093310261, -0.2003113627, -0.2132352591, -0.0303957053, 0.3145390749, -0.3848195672, -0.2735407054, -0.1783147752, -0.0391140804, 0.1934794933, 0.1733623296, -0.207888633, -0.1749670953, 0.1106303781, -0.1387369633, 0.1916006058, -0.0392937325, -0.6223724484, 0.0300169382, -0.0219871029, -0.2789637148, 0.0815731063, 0.0211857222, -0.006952147, 0.279992342, 0.098944515, 0.1685312688, -0.5400198698, -0.4732561409, -0.1522232294, -0.4094890654, -0.1714004129, -0.0841520652, 0.1183670834, 0.1125241369, 0.0399887934, -0.0885647461, 0.1391785443, 0.0093498025, 0.1051329225, -0.1891811341, -0.4143067002, -0.058236286, -0.0200297106, 0.1597853303, -0.0693600103, -0.2733853459, -0.0541005172, 0.3515398502, 0.2060988843, -0.0352558605, -0.0954379886, 0.0557038151, 0.2956843674, -0.1416187286, 0.1109534055, -0.2052734345, -0.0060439468, 0.3039956391, 0.0715232119, 0.1947305351, 0.7513717413, -0.0283604898, -0.4254819453, -0.2496137172, 0.0078301942, -0.1656123102, 0.2040339261, -0.1758872569, -0.021142235, -0.2244167179, -0.1832625419, 0.1512977481, -0.5768195987, 0.0455923229, -0.5188598037, 0.3624450266, 0.0184894595, -0.0043064142, 0.0763604268, 0.30578655, -0.0273873713, -0.2645692825, -0.024875138, 0.56318295, 0.1721720099, 0.0439502187, 0.1727521569, 0.1609471589, 0.3768126667, -0.1657699496, 0.1663337797, -0.2367454022, -0.0379574895, -0.196003601, -0.3365102112, 0.2413692027, -0.1057439148, -0.0122436229, -0.091083318, 0.0083982069, 0.0046786703, -0.1697973609, -0.0002174068, -0.0025254225, 0.1883713305, 0.1760818064, -0.2403234094, 0.0694508031, 0.0188233089, 0.3829338551, -0.3535941541, -0.1978470683, -0.1869012564, -0.3545961976, -0.2246404141, 0.1534087062, 0.0963024348, -0.0267745331, 0.4845174253, 0.2857276797, 0.0391669236, -0.0199095123, -0.0704266801, -0.1554501802, 0.0199631732, 0.0216200426, -0.0475658439, -0.0285645574, -0.0430547968, 0.0126294848, -0.1905241311, 0.118952468, 0.1140753329, 0.159589231, -0.4636817873, -0.3495987654, -0.2548792362, -0.0802590176, 0.1686791033, 0.1879433095, 0.1514120698, -0.2807495892, 0.1435343027, 0.0700477362, -0.0269463174, 0.0233167522, -0.3429913223, 0.2449802756, 0.033423502, 0.111063011, 0.0909132361, -0.1800020337, -0.1640716344, 0.2022573203, -0.0004146003, 0.3297638595, 0.3800825179, -0.1204204485, -0.0575457104, 0.1134604067, -0.4225591123, 0.0218226947, -0.1813897789, 0.2847690284, -0.1475832015, 0.0460559465, 0.0708929226, -0.0048530456, 0.2478776425, -0.0120959319, -0.2618587017, -0.0627105609, 0.1765854806, -0.2563497126, -0.0823204219, -0.573877573, -0.1079507843, -0.0594265833, -0.0769383535, 0.4750974178, 0.1832700372, 0.0703491643, -0.1054376066, 0.1666536927, 0.2087129653, -0.1877800673, -0.3936909735, -0.8022001386, 0.3011882007, -0.1008122265, -0.5333340764, 0.0156143513, -0.0288898647, 0.3304853439, 0.0999972001, -0.3712182641, -0.3593393266, 0.0408108123, -0.137111038, 0.4858475626, 0.238698259, 0.1938266605, -0.1422719359, -0.1716768593, -0.2504088283, -0.0610036962, 0.2543099225, 0.3238005936, 0.4589900672, -0.3080552816, -0.3199734092, -0.2250136733, 0.0377583988, 0.2135538757, -0.1853588372, 0.006289178, -0.0813467652, -0.0969930291, 0.053460639, -0.1199842691, 0.6289490461, -0.1266480535, -0.068537049, 0.1195928901, 0.1906864941, 0.2550228238, -0.0025165388, 0.0918789208, -0.2440905124, -0.1512140632, -0.2004414499, -0.0462501384, 0.0248741359, -0.003786979, -0.0744260773, -0.1132845953, -0.1046458855, -0.0798513591, -0.0138375675, 0.1383139044, -0.0518494584, -1.0071555376, 0.2406786829, 0.0479068235, 0.3997607827, -0.2963575721, 0.0098661231, 0.0599971786, -0.1204703003, 0.0912828818, 0.2207181305, 0.1551353335, -0.2316031456, -0.2294848412, 0.3070247173, -0.0623217635, -0.2843465805, -0.0945147425, -0.1433058381, 0.06108189, 0.2233982384, 0.0505929403, -0.2597230375, -0.007992682, 0.1925088465, 0.300855279, -0.3191564977, -0.169300586, -0.0708155334, -0.0546882972, 0.0299622957, -0.1493467689, -0.1430878192, 0.2711492181, -0.2524774671, -0.1067785844, -0.1950680465, -0.1309176832, 0.5445531011, 0.0330548584, 0.4635471106, 0.0222121608, 0.3310344219, 0.3319661319, 0.100060612, 0.2157465518, 0.4837756157, -0.1562196314, 0.2593024373, 0.1151089594, -0.3584938347, 0.3762132525, 0.1389822066, 0.1031428501, -0.491718322, -0.2125290781, 0.0972296596, -0.1845371127, 0.2611609995, 0.0735680684, 0.1788423806, -0.0851310715, -0.2825028002, 0.5260210633, 0.1357907504, -0.0083500622, 0.37811023, 0.3599122465, -0.1380319595, -0.1896421909, 0.5227789283, 0.8718801737, 0.0974757895, -0.1980102956, 0.2827390134, 0.3868585229, 0.3328578174, -0.4695439339, 0.0674932748, -0.2265430093, -0.3147282302, 0.0406503491, -0.1031451672, 0.1411350965, 0.2470819801, 0.1490347683, 0.0992128029, -0.1775528342, -0.2722308934, -0.1862837523, 0.196059376, -0.2520702183, -0.1280095279, 0.3076057136, 0.2597720325, 0.0755258054, 0.1924238354, -0.0095112966, 0.0551904216, -0.3189357519, 0.0040243287, -0.0877750069, -0.0496272929, -0.0976948515, 0.0431806855, 0.0473411866, -0.3594699204, -0.0802834332, 0.3594200313, 0.2364552319, -0.0355738178, -0.0733910054, 0.1690243781, -0.346152842, 0.0824350789, 0.3339086771, -0.0104909567, 0.3831383288, -0.1655250639, -0.2113126963, -0.0618127845, 0.0983554646, 0.2385095954, -0.3904210329, -0.0386753455, -0.0042903544, -0.4929552078, -0.0564683154, 0.1873192191, -0.0617164671, -0.0932326615, 0.189946726, 0.2423668653, -0.0621953048, 0.4939068854, -0.1194912419, 0.0269075353, -0.1081114784, 0.2109412253, 0.4708755016, -0.1838504672, 0.2785854042, 0.0169368312, 0.0392063446, -0.1465881914, 0.0336620584, 0.4933126569, -0.1134641543, -0.081281215, -0.2681725621, -0.2203371972, -0.0074139177, 0.2259830981, 0.2839488089, -0.0028003559, 0.0831825882, -0.350822717, -0.485093981, 0.315991044, 0.1556034386, 0.4166256189, -0.2392245084, 0.2694609165, -0.0715034306, 0.0385217853, -0.3680201769, 0.0264104027, -0.0815890729, 0.1011915132, 0.0922041982, -0.0736327618, 0.2503100038, -0.3807269931, 0.2025810033, 0.0263751466, -0.1334952563, -0.243571043, -0.096925661, 0.0897025988, 0.1515427679, -0.0670351759, 0.2224103808, -0.0237273276, -0.0340131149, -0.0770206377, 0.0594954379, -0.1047697589, 0.072010316, 0.3274497688, 0.0525662005, 0.1143009439, -0.0189368874, 0.1280947477, 0.1096405983, 0.2754952013, 0.1357038915, -0.2312702984, 0.0451418236, -0.2054261714, -0.3339156806, 0.0152442912, -0.0526530854, 0.1637730449, 0.2915729284, -0.0418313891, 0.1261018515, 0.1449689269, 0.3656478226, 0.4139698744, -0.1543256193, 0.1058543622, -0.0190597381, 0.3068211675, -0.3131522238, -0.0106049487, 0.0555681325, 0.3534425795, -0.0921317488, 0.0831030086, 0.1575088948, -0.0645068064, -0.1458213776, 0.1595379114, 0.2425074428, -0.0942251384, 0.1137004122, 0.1915372461, -0.1950540394, -0.0373637937, 0.1334227622, -0.0793754905, -0.0682391673, 0.233297959, 0.0459244326, 0.5049701929, 0.1906120777, 0.1884464473, -0.0002466508, 0.0380431414, -0.0544335991, 0.3526473343, 0.166267097, 0.1667619348, 0.0506560802, 0.5731657743, -0.1700558215, -0.0390254445, -0.3009100258, -0.001390241, 0.0906204283, 0.1567979604, -0.2475579232, -0.120509766, 0.0795771927, -0.1994357109, -0.1233732849, -0.2324358076, 0.1365017444, -0.0118772071, -0.3977279365, -0.7796939611, -0.134133935, 0.1816384494, 0.2501069307, -0.1011049524, 0.1526044607, 0.5754840374, -0.0296985414, 0.0908439159, 0.5537942052, 0.1427662969, 0.1652052552, 0.0234526433, 0.0788348541, 0.2297348529, -0.0456621721, 0.1259017438, 0.1113647819, -0.0031881768, -0.1627573073, 0.2816797495, 0.2152388394, -0.1006896272, -0.1492404938, 0.0540590435, 0.003776883, -0.1000728682, 0.0883459896, 0.058053501, -0.1477190703, -0.1118037403, -0.2121132165, -0.3597826362, -0.0281043202, -0.1232801378, 0.1838154644, 0.1735623926, 0.011604052, 0.1354414374, -0.3553144336, 0.2740552723, 0.0691394135, -0.1476636231, -0.295116663, -0.1201752052, -0.6131007671, 0.026710622, -0.0536689349, -0.5478022099, 0.1653173119, 0.3015883863, 0.1290454715, 0.0344832726, 0.0680995435, -0.4246810079, -0.1527599245, 0.2639066875, -0.5903574228, 0.0653876588, -0.2221125066, 0.1572607458, -0.0014694246, 0.2976365089, 0.2323393673, 0.2318879664, 0.0173670296, 0.1468280256, 0.151024729, 0.1870526075, 0.2307743877, 0.0274241008, -0.0097886389, 0.4499776065, 0.1563044041, 0.2933294773, -0.3235433996, -0.2240900099, -0.2034772784, 0.3270484507, 0.1905538142, 0.1206231043, -0.0125324549, 0.0145753454, 0.0647433698, 0.2950314581, 0.0132934758, -0.4298284948, -0.513484478, -0.0048792018, 0.0143990703, 0.0360003896, 0.2718860805, 0.5303263068, -0.003895859, 0.1137370616, -0.2014436424, -0.3758949339, 0.4186393321, -0.1064852402, 0.1832008958, -0.0508392714, 0.2534045279, 0.4186257422, -0.0405696332, -0.3476037681, 0.0056090839, 0.4202427268, -0.2656205893, -0.1188364774, 0.250929594, 0.3692400455, -0.1447821409, -0.0115944082, -0.042435918, -0.0008028429, 0.0327931643, 0.169410795, -0.0311149415 ]
https://github.com/huggingface/datasets/issues/672
Questions about XSUM
Thanks, looking forward to hearing your update on this thread. This is a blocking issue for us; would appreciate any progress on this front. We can also help with the fix, if you deem it appropriately.
Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg
36
Questions about XSUM Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg Thanks, looking forward to hearing your update on this thread. This is a blocking issue for us; would appreciate any progress on this front. We can also help with the fix, if you deem it appropriately.
[ -0.0870945379, -0.3768456876, -0.1521639675, 0.4688610733, 0.3402539194, -0.0078840116, 0.1615424156, -0.0307646319, 0.2476973534, 0.2832652032, -0.2237007916, 0.2499283403, 0.1018444449, 0.4539227188, 0.0879230499, 0.10070052, -0.035286475, -0.1102674082, -0.3657332957, -0.2921965122, 0.0072300108, 0.0780228302, -0.0672305822, -0.1452373862, -0.6695824862, -0.0038880215, -0.1209946871, 0.2803736329, -0.1042963415, -0.2146043777, 0.2357610315, 0.0386945084, 0.0067211753, 0.5801952481, -0.0001046302, 0.0152194127, 0.1473648101, -0.0074841655, -0.1374786198, 0.228070125, -0.1725152433, -0.0180963315, 0.0208946355, -0.3256731033, -0.1103190556, 0.0440424457, -0.1437744647, -0.3669281602, 0.2572005689, -0.0139506776, 0.2280744314, 0.1909845471, 0.1549108028, -0.0496398211, -0.0950621814, -0.1173703372, 0.0789833888, 0.2292117029, 0.4040429294, 0.2403364182, 0.0380712412, 0.1594724804, 0.0983694941, -0.1966066211, 0.2801487148, 0.0289579351, 0.3426021636, -0.227454111, -0.2999531329, 0.2939436436, 0.8475381136, -0.0466867834, -0.2914671302, -0.0303705297, 0.00877563, -0.1420633197, 0.1820063442, 0.0597103201, 0.3434989452, -0.0311716329, -0.2439131737, 0.4149993956, -0.2541272342, 0.04375365, -0.1570800394, -0.1155485883, -0.0435796082, -0.0082373768, -0.238937676, -0.0282257833, 0.0495098606, -0.0512786359, 0.1646591872, 0.1823990047, -0.3299439549, -0.1318351775, 0.0134278936, -0.0122939935, 0.1998293698, 0.158960551, 0.26493752, 0.1013580039, -0.3621608019, 0.0698371008, 0.2414421588, 0.2587035596, 0.4240953028, -0.5478389859, 0.0477881208, -0.0696192309, -0.1134542376, 0.0816056132, -0.3491239846, -0.0449134186, -0.0354397148, 0.033246126, -0.1748823524, -0.3821946084, -0.2380208671, 0.2585429251, 0.0388883799, -0.0881351233, 0.1911209226, -0.0995258689, 0.0611416101, 0.3915011883, 0.0341392085, 0.0414289646, -0.5715643167, -0.2726367116, -0.3504097164, 0.0863759667, -0.0972442701, -0.0213424191, 0.1139402241, -0.1042931601, 0.3827910721, -0.0802482814, 0.2764770389, -0.0013618363, 0.0811329708, 0.1100356281, -0.3522945642, 0.2302156538, 0.0268045366, -0.0126437247, -0.0359075256, 0.0272927303, -0.0133333579, -0.0298456866, -0.1658156961, -0.2073694766, -0.0207645297, 0.3233804703, -0.3328656852, -0.2567098141, -0.1558973044, 0.0178248864, 0.1853136271, 0.180281058, -0.2122167498, -0.1361183673, 0.0601909794, -0.1134831011, 0.1756137013, -0.0649839342, -0.5895949602, 0.003892669, -0.0142194703, -0.2840308547, 0.0348298177, 0.0177169759, -0.0126620885, 0.2226733565, 0.1310676187, 0.1747599542, -0.5439711213, -0.4694369137, -0.1393548846, -0.3584820032, -0.2200028002, -0.1051341966, 0.1227107346, 0.0784527585, 0.0269544553, -0.1187635139, 0.1633794755, 0.0666820928, 0.1071554944, -0.1604182273, -0.4459181726, -0.0681828856, -0.0322970822, 0.2091258615, -0.0600986071, -0.3040696084, -0.0659139752, 0.3356046677, 0.1652619094, -0.031072706, -0.078364782, 0.080535464, 0.3151932359, -0.1335746944, 0.1055010334, -0.2058995515, -0.0157992262, 0.302241683, 0.0759719089, 0.2600725889, 0.7314267159, -0.0348708369, -0.3778421879, -0.2253965437, 0.0159747005, -0.1700487882, 0.2046741396, -0.2249571085, -0.0247680042, -0.20334059, -0.1770484447, 0.147564292, -0.5767456889, 0.0628689528, -0.497893095, 0.3528924882, 0.0002693313, -0.0101232911, 0.0724391192, 0.3005823791, -0.0322301015, -0.256103456, -0.0397771522, 0.5321788788, 0.1301267445, 0.048532024, 0.2044239938, 0.1736721247, 0.3856614232, -0.1463343799, 0.155440852, -0.2496361285, -0.0562156774, -0.2027369589, -0.3685395718, 0.2604891062, -0.1404677331, 0.0063304878, -0.0556863323, 0.0379641242, 0.0084256949, -0.1628029495, 0.0039467965, 0.0247975923, 0.2130026817, 0.1512256265, -0.2448851466, 0.0545097366, 0.0214266106, 0.3962308466, -0.3434987664, -0.1455952823, -0.2073076516, -0.3295725286, -0.1979646832, 0.1728599966, 0.1191327274, -0.0176170561, 0.4575639367, 0.3126805127, 0.0690463111, -0.0542527065, -0.090424709, -0.1600152254, 0.0215938222, 0.0304688551, -0.073081553, -0.0313940793, -0.0046663922, -0.0337766297, -0.176855579, 0.0974949822, 0.1154667214, 0.1296597421, -0.4367829263, -0.3674216866, -0.2122877985, -0.0988149717, 0.2028765231, 0.1948628277, 0.1293787062, -0.2920308709, 0.1910259277, 0.1212311685, -0.0716171712, 0.0392535664, -0.3408941329, 0.2852011323, 0.0318592489, 0.1425777376, 0.0811294615, -0.1916878521, -0.1584848762, 0.2094803452, 0.0349606872, 0.338401705, 0.3835899234, -0.0523933098, -0.0822841376, 0.1518284827, -0.4507328272, 0.0218732134, -0.1935036927, 0.2933571041, -0.162569806, 0.0462266468, 0.0689680055, -0.0419376418, 0.2706370652, -0.0292680878, -0.2540873885, -0.0879603401, 0.2068856508, -0.2462817729, -0.1089707464, -0.5483404398, -0.0975333676, -0.1158168688, -0.0183373019, 0.4435316622, 0.1893788874, 0.0688930377, -0.1006863862, 0.1724815965, 0.2226365805, -0.1803923696, -0.3716887832, -0.8080676198, 0.2895074785, -0.1316986978, -0.5295534134, 0.0163207743, -0.0122794947, 0.3129900098, 0.0978409126, -0.3896394968, -0.3701249063, 0.0081393644, -0.0939100981, 0.4827440679, 0.1899993569, 0.2229121625, -0.1478609592, -0.1982778609, -0.264646858, -0.0628997386, 0.2635391951, 0.2962848842, 0.4528549314, -0.3367643356, -0.2986634374, -0.178929314, 0.0699740127, 0.2015922517, -0.1326642931, 0.0119042108, -0.0227625854, -0.0965106264, 0.033849705, -0.1430671513, 0.610381484, -0.1313683838, -0.0790322348, 0.1713486612, 0.2282407135, 0.2096859515, -0.03914693, 0.0601383969, -0.179092899, -0.1589295864, -0.1995087266, -0.0256969519, 0.0269991085, -0.022831412, -0.0663128793, -0.1054536253, -0.0996059701, -0.0844944045, -0.0198749136, 0.1182790846, -0.055926729, -1.0049800873, 0.259108454, 0.0375462696, 0.3526400328, -0.3005059958, -0.028819479, -0.0260787178, -0.1135907769, 0.1070968732, 0.2032565773, 0.199032262, -0.2164062113, -0.2058829963, 0.309019953, -0.0924057066, -0.2754473984, -0.0688432381, -0.1381198019, 0.0797670931, 0.2177276313, 0.0466140918, -0.2844490111, -0.0444500968, 0.1784990579, 0.212295711, -0.2845433056, -0.1637996137, -0.0753100291, -0.0201927722, 0.0189944245, -0.0912535191, -0.1106499732, 0.2644149959, -0.2887610495, -0.1394645721, -0.1535239965, -0.1281750202, 0.5450178981, 0.0543303229, 0.4168040454, 0.0122891134, 0.348840028, 0.3579328656, 0.0919462368, 0.2410312891, 0.488781482, -0.1336216778, 0.2437860221, 0.1442536563, -0.4045613706, 0.373237431, 0.2094114423, 0.1001692489, -0.4752339125, -0.2483515739, 0.0873067677, -0.1790091097, 0.2362402976, 0.0920020789, 0.1887355, -0.0409709848, -0.2470600605, 0.5007680655, 0.1151904017, -0.0015586134, 0.4271884561, 0.3791876137, -0.1314915568, -0.1562878788, 0.5083361864, 0.8966678381, 0.0828286782, -0.1813946068, 0.2619684637, 0.3698828816, 0.3061385751, -0.4772640467, 0.0974357203, -0.1830947101, -0.3640807271, 0.0547017604, -0.1012043655, 0.132071048, 0.2592509687, 0.1441240013, 0.0532430485, -0.1616884023, -0.2868404686, -0.1962386966, 0.1959652752, -0.2668994665, -0.1652958542, 0.272905916, 0.2745413184, 0.1123937592, 0.1550144404, -0.0224238653, 0.0194456019, -0.3178413808, 0.0096406601, -0.0767843798, -0.0440927409, -0.0591485277, 0.0513106659, 0.0463695228, -0.3314213157, -0.0261587724, 0.3168108761, 0.2304237932, -0.0533088371, -0.1130510047, 0.190242514, -0.3336274028, 0.0785721242, 0.3283727765, -0.0032495456, 0.4269937873, -0.1823471636, -0.1872065067, -0.0605522729, 0.092094034, 0.2167870551, -0.3755589426, -0.0423263758, -0.0067095067, -0.4976555705, -0.0271980967, 0.1701218486, -0.0803688988, -0.1118328944, 0.2077973336, 0.2082477361, -0.0794620737, 0.4497679472, -0.0659514144, 0.0382528715, -0.0877889991, 0.2386270463, 0.4173069596, -0.1835377514, 0.3220867217, 0.0525721833, -0.014854975, -0.1745232344, -0.0034504707, 0.4825314581, -0.1126063019, -0.0369282998, -0.2350034416, -0.2543019354, -0.0097734211, 0.2487631142, 0.2622334957, -0.0032236485, 0.0863074586, -0.3580667078, -0.4583059549, 0.3008619547, 0.0951448008, 0.4245127439, -0.277236104, 0.2854065299, -0.0411142819, 0.0664206743, -0.3865274489, 0.0025519175, -0.1480124742, 0.0805463493, 0.0871702358, -0.0949061513, 0.2682087421, -0.3732398152, 0.1924357861, -0.0109024048, -0.1877460331, -0.2438081503, -0.0898051038, 0.0889480859, 0.1451300979, -0.0835331455, 0.2687238753, -0.0355799571, -0.0553220548, -0.0533557907, 0.0692585483, -0.1181077361, 0.043764621, 0.3051763475, 0.0440096967, 0.1408575028, -0.013688026, 0.1271903217, 0.1204280183, 0.2415245622, 0.1501478553, -0.2719296217, 0.0273836982, -0.220330894, -0.2931701839, 0.0165196825, -0.0626758635, 0.1528557837, 0.2784413099, -0.061511185, 0.1116773039, 0.1647974253, 0.3731773496, 0.3808888197, -0.1324038506, 0.12076547, -0.0105666053, 0.3303654492, -0.287855804, 0.0007567254, 0.0790151879, 0.3087945879, -0.0843269974, 0.0466645584, 0.1687321961, -0.0542567521, -0.118732214, 0.1909871548, 0.2143381387, -0.1191219166, 0.1166094393, 0.1912382394, -0.2486337423, -0.0254880618, 0.1562619507, -0.0701544061, -0.0570085756, 0.2388651669, 0.0308845304, 0.4838151634, 0.1535270959, 0.1727790684, 0.0172189437, 0.0146201411, -0.0558260866, 0.3371432424, 0.1983417869, 0.1350703686, 0.0260548033, 0.6015377641, -0.1991494894, -0.0517542437, -0.3056696057, 0.0035076197, 0.0700093657, 0.1575065255, -0.2648791373, -0.1183076203, 0.050700251, -0.1897432655, -0.1171696484, -0.2110819221, 0.1835687459, -0.0126266247, -0.336202234, -0.8137515187, -0.1469640732, 0.1683220863, 0.2980804145, -0.102944456, 0.1609454155, 0.5675946474, -0.0264650509, 0.0921069831, 0.5185127854, 0.1119831279, 0.1577609628, -0.0201044455, 0.0527730659, 0.210860461, -0.0534414425, 0.1048461422, 0.1572992802, 0.0018038377, -0.1253675073, 0.294542104, 0.2084715068, -0.1260442734, -0.1433204412, 0.0451992005, 0.0007639576, -0.0977524668, 0.093725279, 0.0713274255, -0.1590176672, -0.0981147811, -0.2561179996, -0.3406970501, -0.0280124582, -0.1255318224, 0.1458768696, 0.1647306234, -0.0061446214, 0.1409906298, -0.3291235864, 0.3090840578, 0.0549983606, -0.1328853518, -0.2961924672, -0.1193377003, -0.5893235207, 0.0456674062, -0.0611138903, -0.5289900303, 0.1521454751, 0.3244358301, 0.1560741514, 0.0205802768, 0.0339943096, -0.457960695, -0.1055277959, 0.2652138174, -0.6133134365, 0.1041929051, -0.1988892704, 0.149916932, 0.0008537676, 0.2935957015, 0.2201201916, 0.2370467335, 0.0215034708, 0.1590387225, 0.1622430086, 0.1419455409, 0.2237859368, -0.0166988056, -0.0228507947, 0.4889420271, 0.1733775884, 0.2755284905, -0.3339514136, -0.232457608, -0.2272504419, 0.2942467332, 0.2213604897, 0.1555452347, -0.0377790108, 0.00299901, 0.0663448423, 0.3365393579, 0.002802717, -0.4147551358, -0.4890246689, 0.0098870844, 0.0536732189, 0.0490891039, 0.2479673922, 0.5102534294, 0.0132309543, 0.0540299341, -0.239969179, -0.4003309011, 0.434949398, -0.1649877727, 0.1486085802, -0.0401162319, 0.2681304812, 0.4486644268, -0.0784518644, -0.3514889479, -0.0192532763, 0.3600774705, -0.2413727492, -0.1331912577, 0.2997153401, 0.3858634233, -0.1430396289, -0.0351728536, -0.0849709436, 0.0144365467, 0.0524506643, 0.1392468065, -0.0340136737 ]
https://github.com/huggingface/datasets/issues/672
Questions about XSUM
I just started the generation on my side, I'll let you know how it goes :)
Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg
16
Questions about XSUM Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg I just started the generation on my side, I'll let you know how it goes :)
[ -0.0991991088, -0.3942703009, -0.1512492001, 0.49925071, 0.3250366747, 0.0082150158, 0.1899513602, -0.0334034264, 0.2197479904, 0.2975789309, -0.1856801957, 0.2214598805, 0.0975367725, 0.4401782453, 0.1296775937, 0.150860399, -0.0050971294, -0.0683596134, -0.3730555475, -0.3198924959, -0.0501618274, 0.0540431961, -0.0487869382, -0.1231351495, -0.678825438, 0.0470919088, -0.1302305311, 0.2782610655, -0.1247743145, -0.1770289987, 0.2357266098, 0.057286609, 0.0347148627, 0.5405403972, -0.0001053364, -0.0207368508, 0.1016166806, -0.030688094, -0.084942922, 0.2506740689, -0.1658848673, -0.011623132, -0.0331670158, -0.3924216032, -0.0799613222, 0.0515268557, -0.1315435469, -0.3820244074, 0.2257563025, -0.0086585507, 0.2169919163, 0.1548503488, 0.1296728104, -0.056498114, -0.0447451957, -0.0705571398, 0.0807388723, 0.2239103317, 0.3608612716, 0.2562361658, 0.0727660209, 0.1726237983, 0.076217927, -0.187281549, 0.327593267, 0.0638963059, 0.3388046622, -0.2582987547, -0.2919933498, 0.298853308, 0.8362563848, -0.0605641529, -0.2856417894, -0.0132326158, -0.015501867, -0.1369317025, 0.1729129106, 0.0779176876, 0.3255275488, -0.0402638018, -0.2604095042, 0.3819591701, -0.259534806, 0.0025319001, -0.0883048028, -0.1223709285, -0.0531104282, -0.0039930246, -0.2595851719, -0.0402736031, 0.1087625399, -0.0885709375, 0.1688389629, 0.2063997388, -0.2878933847, -0.117923595, -0.0223940127, -0.0198954791, 0.2344019413, 0.1514640599, 0.2566111982, 0.022856595, -0.3486998975, 0.0581925139, 0.1865371317, 0.2489240766, 0.4371141195, -0.5546722412, -0.0060972651, -0.1186809689, -0.1225380972, 0.079836376, -0.3836109936, -0.0266294908, 0.0392576493, 0.0167450607, -0.1728738993, -0.3478004336, -0.2349815965, 0.2712554038, 0.0184829477, -0.0921448022, 0.1589309573, -0.1319567114, 0.0435964875, 0.4083960354, 0.0277196858, 0.0327500999, -0.5587657094, -0.3067185283, -0.3500447273, 0.1029694006, -0.0693069994, 0.0127625139, 0.0917774811, -0.0723093152, 0.3852658868, -0.0754472539, 0.243871212, -0.0177500769, 0.0654633716, 0.1145850793, -0.3395026922, 0.219076708, 0.0418366194, -0.0216601398, -0.072551325, 0.0082331458, 0.0082005244, -0.0185363758, -0.1398712695, -0.2128384709, 0.0050693876, 0.3254513741, -0.3557156324, -0.2653189003, -0.1458192468, 0.0076628067, 0.2324599475, 0.212688759, -0.2090701908, -0.1102746278, 0.0803070664, -0.132411465, 0.1687545925, -0.0175944194, -0.6140213013, 0.0293742362, -0.0249339994, -0.2568974793, 0.0873261169, -0.0196029041, 0.0156846512, 0.2600534856, 0.1147684604, 0.1682212502, -0.5175308585, -0.444133848, -0.104427062, -0.334978193, -0.1746029407, -0.0914482772, 0.1713096797, 0.1171152964, 0.0173606612, -0.1336981058, 0.15482454, 0.0379908532, 0.0789758489, -0.1654699594, -0.4269625545, -0.0553447306, -0.0285568684, 0.1714438349, -0.0690061823, -0.2467221767, -0.106026724, 0.327565372, 0.1769464016, -0.0419159606, -0.0768794939, 0.0513750352, 0.3236052692, -0.1554245055, 0.0769402683, -0.1586393565, -0.0301631838, 0.301019311, 0.0683937073, 0.258122772, 0.7335657477, -0.0615016371, -0.394277215, -0.2083215714, 0.0027544023, -0.1839935482, 0.192990616, -0.1989009827, 0.0005777535, -0.2506177127, -0.1730111092, 0.1371756345, -0.5779196024, 0.0343148261, -0.5610535145, 0.325096041, 0.0066307848, 0.0315567628, 0.0762806013, 0.2840644121, -0.033601556, -0.2483558059, -0.0288121514, 0.5453807712, 0.1616099924, 0.0535064079, 0.1831552535, 0.1931937933, 0.3812390268, -0.1889410466, 0.1518517137, -0.2646037936, -0.0439030044, -0.2053334713, -0.3492259681, 0.2360475063, -0.114371933, 0.0102001773, -0.0759774223, 0.0012269495, 0.0084398193, -0.135506928, 0.0344250277, 0.0099608852, 0.1653894782, 0.1845078617, -0.2131853998, 0.0737973675, 0.0260262862, 0.4362432957, -0.3370134234, -0.1559632868, -0.2162284702, -0.3423807621, -0.1967811733, 0.1316416562, 0.0940621868, 0.013656198, 0.5156719089, 0.2999622822, 0.0722165853, -0.042290993, -0.0838761106, -0.1740972847, 0.0369107462, 0.004692975, -0.0680330396, -0.0423624814, -0.0661309287, -0.0061191088, -0.1768151373, 0.1134701446, 0.1010457203, 0.187312752, -0.4435325265, -0.3401428759, -0.1408766955, -0.070716165, 0.2071116716, 0.1828162223, 0.1401575506, -0.2619084716, 0.1876972169, 0.0738059133, -0.0470516235, -0.0165373702, -0.3119048178, 0.2846859097, 0.0427173711, 0.1291549951, 0.0659965053, -0.1681565493, -0.1526058763, 0.2071588188, 0.0039648814, 0.363414973, 0.4104008079, -0.104776971, -0.0356320776, 0.1301191747, -0.4129677415, 0.0156607516, -0.2075361907, 0.3164817989, -0.1310061663, 0.0450777337, 0.0733691454, -0.0389073752, 0.2737810612, -0.0187505428, -0.2886247635, -0.1020702049, 0.1580855399, -0.2652378082, -0.1001155898, -0.5698411465, -0.0769092217, -0.0694273859, -0.0577169918, 0.478798002, 0.2264364809, 0.0852655247, -0.0846294165, 0.1478219181, 0.2793619931, -0.1870379895, -0.4015794098, -0.8443461061, 0.3063878417, -0.1574646235, -0.5241184235, 0.0214164648, -0.0598471127, 0.3482741416, 0.1301286519, -0.3654979169, -0.325777173, -0.0152120907, -0.1198373288, 0.5110428929, 0.2357800305, 0.1952352077, -0.1350650191, -0.1865761131, -0.2790880501, -0.0319166817, 0.2907136679, 0.2476890832, 0.4593496621, -0.2880561948, -0.2950654328, -0.2588365376, 0.0697333068, 0.2178664505, -0.1610461622, -0.0074187624, -0.0547261611, -0.0970286131, 0.0554267466, -0.151769042, 0.6240483522, -0.0967048928, -0.0854155496, 0.1625872999, 0.221875757, 0.2558009326, -0.0541105047, 0.1269093007, -0.2075283229, -0.1293876916, -0.2394887656, -0.0475310981, 0.03724261, -0.0244952999, -0.0653476343, -0.1325957477, -0.0933662578, -0.1098585129, -0.0593822934, 0.1681643575, -0.0372898094, -0.9834532738, 0.2603169382, 0.0349397399, 0.3408540785, -0.266849041, -0.0271404181, 0.0263141431, -0.1147089526, 0.0955429226, 0.2108890116, 0.197761789, -0.2447779477, -0.2083047032, 0.2636695206, -0.0613513216, -0.2832501233, -0.0488571078, -0.1174366623, 0.0494404025, 0.1923974007, 0.0555344149, -0.3075264394, -0.0462106541, 0.1702315807, 0.2238609195, -0.3208248019, -0.1889399439, -0.0829789788, -0.0303323474, 0.0447135158, -0.1673035473, -0.1453816295, 0.3055656254, -0.3080765903, -0.1369552612, -0.1649609208, -0.0949141234, 0.5748013258, 0.0809489563, 0.415492475, -0.0184975751, 0.3374982476, 0.3749868274, 0.0860505402, 0.2072854191, 0.4864049256, -0.163487494, 0.2526752353, 0.132646814, -0.3736194372, 0.3611027002, 0.141307652, 0.0928630307, -0.5118597746, -0.240358904, 0.0719365031, -0.1828966886, 0.2479795367, 0.1052110642, 0.1559087485, -0.0717958212, -0.3228156865, 0.5426490307, 0.1231089681, 0.0081224097, 0.3860912025, 0.3564713597, -0.1340127587, -0.2051943392, 0.5239411592, 0.8795146346, 0.0875160545, -0.1918260902, 0.2991400361, 0.4096214771, 0.3452934325, -0.4674293995, 0.0430300795, -0.2355514765, -0.3408917189, 0.0505555719, -0.1015464142, 0.1307527423, 0.3114386499, 0.1271600574, 0.0346693844, -0.1633207053, -0.2763167918, -0.185714528, 0.1975483894, -0.2770600021, -0.1748846471, 0.278439045, 0.2749240994, 0.1019850373, 0.1665978581, -0.0270528961, 0.0397352129, -0.3167529404, -0.0052993083, -0.0553641319, -0.0299165808, -0.0715083629, 0.0308823232, 0.050112471, -0.3300330341, -0.0463313013, 0.3366264105, 0.2604947686, -0.0603241883, -0.0944986194, 0.1569069475, -0.3263680935, 0.0590720363, 0.3139475882, -0.015651295, 0.3823676109, -0.1759955436, -0.1963544488, -0.0452414565, 0.0787413418, 0.2471215576, -0.381867826, -0.0753501505, -0.0234805327, -0.4934105575, -0.0453870781, 0.1884386837, -0.0848585442, -0.1015378907, 0.1960271448, 0.2374440432, -0.1112999767, 0.4571845233, -0.1239637211, 0.0385816209, -0.114834331, 0.1939301342, 0.4598156512, -0.1795016229, 0.2613759041, 0.0343136229, 0.0038186971, -0.1796965003, 0.0693928003, 0.4981956482, -0.1235937849, -0.0410483591, -0.2215931416, -0.2235256881, 0.0073042787, 0.2483253628, 0.2811188996, 0.0048838709, 0.13701877, -0.3441735208, -0.4759085476, 0.2609249353, 0.1104765907, 0.4316187799, -0.2707899809, 0.2353208214, -0.0358552001, 0.0875996277, -0.3749723136, -0.0241379682, -0.0902674347, 0.07378681, 0.0886547491, -0.0670769885, 0.2347093821, -0.3692096472, 0.1837601066, -0.0140695991, -0.1792765409, -0.2388861775, -0.1359960586, 0.0926149115, 0.1513488591, -0.0998277962, 0.264274627, 0.0025742995, -0.0953658372, -0.0564984567, 0.0855172276, -0.1130072549, 0.0363931172, 0.3185965121, 0.0443995222, 0.1525775343, -0.0902125016, 0.1271756589, 0.1196649522, 0.285410136, 0.143460989, -0.2454916984, 0.035558071, -0.2511769533, -0.2950548828, 0.0342084803, -0.0594222285, 0.1259424835, 0.2847483754, -0.0941464603, 0.1497997493, 0.1781169772, 0.3441836536, 0.3828386068, -0.1077489182, 0.1276451647, -0.0130427936, 0.3241317868, -0.3050275445, -0.0148578277, 0.043212682, 0.295838356, -0.0976333097, 0.0905088931, 0.1272355169, -0.0715457499, -0.1671733111, 0.1673765033, 0.1937971115, -0.0980525762, 0.1217835844, 0.2365943938, -0.2271395624, 0.0157357156, 0.1643597782, -0.0426672027, -0.0649329871, 0.2640990317, 0.0276953336, 0.4860457182, 0.1873307228, 0.1617646664, 0.0328325592, 0.0120534711, -0.0843959376, 0.3501392901, 0.1519102901, 0.1584687382, 0.0076012141, 0.5896821022, -0.221950829, -0.0162747074, -0.3264860213, -0.0000326898, 0.1012422815, 0.1574638784, -0.2557417452, -0.132526353, 0.0417881049, -0.2113122195, -0.1075142846, -0.2485519201, 0.1659446508, -0.0226363316, -0.3308965862, -0.767983973, -0.1013108566, 0.1610026509, 0.2555581033, -0.0982127488, 0.144251883, 0.569427669, -0.0578345805, 0.0739405528, 0.5254845619, 0.1098725423, 0.2007329762, 0.0134932054, 0.0366667807, 0.2117242217, -0.0628804043, 0.0946505442, 0.1388876438, -0.0252646711, -0.1828076094, 0.2713633776, 0.2025994211, -0.1187584624, -0.1726142764, 0.1031564698, 0.0065846033, -0.0567354374, 0.0905831978, 0.0345116146, -0.1706053019, -0.0913106054, -0.193530947, -0.372780174, -0.0227534063, -0.0996095017, 0.1810113043, 0.1765190363, -0.0164286103, 0.134905085, -0.3623852432, 0.3160422444, 0.0677886829, -0.1362582594, -0.3066981733, -0.1303231716, -0.5872719288, 0.0199030899, -0.0568402857, -0.5123308301, 0.1407915205, 0.3428823054, 0.1273252517, 0.0376045033, 0.0000412265, -0.4160142839, -0.1572109312, 0.302084446, -0.5865225792, 0.0664895549, -0.2207362801, 0.1653906554, -0.0105118463, 0.2680389583, 0.2200220376, 0.2306524068, 0.0275041703, 0.1574286371, 0.2008645236, 0.1931498796, 0.2320535183, -0.0202825256, -0.0036084293, 0.4715546072, 0.1600961387, 0.2669733167, -0.291259259, -0.209398061, -0.2012652606, 0.3093334138, 0.2263797224, 0.1445261389, -0.0006397472, 0.0483769849, 0.0573553666, 0.3266702294, 0.0598766059, -0.4564240575, -0.4984983206, 0.0336639769, 0.007140073, 0.0170115586, 0.2858606875, 0.4912388027, -0.0170575194, 0.0980668589, -0.2187520266, -0.3829307854, 0.4389586747, -0.1473553479, 0.1580481529, -0.0535890982, 0.2750996351, 0.4618852139, -0.0758126825, -0.3238132596, 0.0202647764, 0.4070435464, -0.2786366343, -0.1159611493, 0.2650029063, 0.3794353604, -0.1333649904, -0.0222675558, -0.0395551994, -0.0174359195, 0.041203171, 0.1854810566, -0.0360982232 ]
https://github.com/huggingface/datasets/issues/672
Questions about XSUM
Hmm after a first run I'm still missing 136668/226711 urls. I'll relaunch it tomorrow to try to get the remaining ones.
Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg
21
Questions about XSUM Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg Hmm after a first run I'm still missing 136668/226711 urls. I'll relaunch it tomorrow to try to get the remaining ones.
[ -0.0192337073, -0.2787490785, -0.1315879077, 0.4514375329, 0.3294107318, 0.013247543, 0.0834716111, -0.0324112363, 0.1632883251, 0.2532369494, -0.2140218616, 0.18124111, 0.1041177064, 0.343321234, 0.1806179285, 0.1001858488, -0.0398059823, -0.1415239125, -0.4157708585, -0.3789446354, -0.1317089349, 0.1342010051, -0.1089952588, -0.1242687181, -0.6119698286, 0.078397654, -0.2388476729, 0.337880522, -0.0854114443, -0.222267732, 0.2241359055, 0.0637295172, 0.0893680379, 0.5341081023, -0.0001078297, -0.0220553782, 0.1424759924, -0.0170414057, -0.1624373049, 0.2538863719, -0.2311664969, 0.0268422514, 0.0482004061, -0.405474782, -0.026364129, 0.1173035949, -0.0946480408, -0.3096883893, 0.1580785066, 0.0959425718, 0.1845943183, 0.1571915448, 0.0893574283, -0.0256532319, 0.005186256, -0.0828038752, 0.144616589, 0.2197122723, 0.3912558854, 0.303229481, 0.0680396333, 0.1804810762, 0.0612240508, -0.2153702527, 0.2798310518, 0.0981281102, 0.2757807076, -0.2437677383, -0.3017998338, 0.2616387904, 0.7973627448, -0.0047415257, -0.2618874609, -0.0269741435, -0.0765680075, -0.1153858602, 0.201867044, 0.0557036176, 0.3726735413, 0.0041701836, -0.3282064497, 0.3529004455, -0.2558207512, 0.1323099583, -0.1288593709, -0.0443034247, 0.0117963152, 0.0079703378, -0.2504272759, 0.042773515, 0.1230292022, -0.1049914956, 0.2351703048, 0.2270647287, -0.2158427238, -0.1437882781, 0.0609844327, 0.0052845692, 0.2470931262, 0.2200072855, 0.2636893392, 0.0973218754, -0.4094592333, 0.0266530477, 0.2186472416, 0.2032872885, 0.3677202761, -0.5091802478, 0.0934059247, -0.0424154997, -0.0867898837, 0.0701019987, -0.3361895382, 0.0212910436, -0.0937167779, 0.0889074281, -0.194308728, -0.3586163223, -0.1624152511, 0.2117016912, 0.0353167951, -0.1366458982, 0.2173825055, -0.1654898971, -0.0143267568, 0.4042074084, 0.0237146318, 0.0212499965, -0.5393810868, -0.2602353096, -0.3475569487, 0.1182181314, -0.0596301854, -0.0100992536, 0.125677675, -0.0402505361, 0.4135730863, -0.1710355878, 0.2352254093, 0.0067360806, 0.0788009912, 0.1520160586, -0.3228065372, 0.231133312, 0.0889694989, 0.0422683768, -0.0792252943, -0.0212150179, -0.0260821208, -0.0076277987, -0.2080206573, -0.2832221091, 0.0483164005, 0.3052492142, -0.395311445, -0.2976079583, -0.1643511802, -0.0514991544, 0.0617098287, 0.212786898, -0.2347179949, -0.0692884922, 0.1486747861, -0.1236331537, 0.2656906843, 0.0006675519, -0.4929635227, -0.0078992192, 0.0381508917, -0.2442604899, 0.1114942729, 0.0165499691, -0.0232427586, 0.2643287778, 0.0746216178, 0.1598434597, -0.4744035602, -0.4691449106, -0.0426466726, -0.3227774799, -0.1889181733, -0.1445512921, 0.0905965194, 0.0971468613, 0.0018749476, -0.1155166924, 0.2047924846, 0.0755231231, 0.0930426195, -0.2053315789, -0.4654322863, -0.1000908464, -0.0738270432, 0.3007147908, 0.0293435808, -0.299973309, -0.1004414633, 0.3271587193, 0.2232564241, -0.0668677613, -0.0878525749, 0.1660561413, 0.278827548, -0.082377471, 0.1109276935, -0.1868293583, 0.0414258279, 0.3109138012, 0.075092271, 0.2592255771, 0.6795742512, -0.0216840915, -0.3754805624, -0.2413870543, 0.0568289421, -0.1928551644, 0.1584154963, -0.1534620076, -0.0133113405, -0.111803934, -0.2205300331, 0.0573066212, -0.5747526884, 0.1063458547, -0.525418818, 0.3792725503, -0.0178779233, 0.0787573829, 0.1651779413, 0.3252892792, 0.0451644473, -0.3062185347, 0.0017511566, 0.5623007417, 0.1607254893, 0.0131052304, 0.3588775694, 0.1996975392, 0.4656709731, -0.2428459525, 0.0950105563, -0.1435526013, -0.031496603, -0.2036190033, -0.3394323885, 0.2086919993, -0.1423112899, 0.0569089651, 0.0482511185, 0.0840907395, 0.0055024941, -0.1831811965, -0.0478081256, 0.0529187806, 0.239546001, 0.1336749792, -0.3054102659, 0.098175399, 0.0219698381, 0.3735607266, -0.3904989362, -0.2474122196, -0.2403516173, -0.2415395826, -0.2217555195, 0.1088664681, 0.0645260811, 0.0066632219, 0.4553330541, 0.2985196412, 0.1484999657, -0.0245345924, -0.1464134008, -0.1921245009, 0.0765454993, 0.1265973449, -0.1374519616, -0.1376806945, -0.0914114118, 0.0538808666, -0.2065614313, -0.0373751782, 0.1147438139, 0.1024578214, -0.4339112043, -0.3744902313, -0.2469696254, -0.1158343554, 0.2495815158, 0.1147520244, 0.1498490125, -0.386102736, 0.1743735075, -0.0147844385, -0.1148669794, 0.0133326417, -0.4554792941, 0.2821137607, 0.0333302952, 0.0956922621, 0.0830490366, -0.2291259021, -0.1364936829, 0.1868574172, -0.0149910152, 0.3306306601, 0.309594214, -0.14268215, -0.0014285287, 0.0614825562, -0.4463157356, 0.0334604271, -0.1677661985, 0.2153144032, -0.0946197137, 0.036054492, 0.0441388898, -0.0399485938, 0.281069845, 0.0453819782, -0.1328374147, -0.0603456944, 0.1951059252, -0.3132756054, -0.0596584789, -0.5780407786, -0.0770904571, -0.0302525964, -0.0871214494, 0.4910754263, 0.2203984559, 0.0963186622, -0.1681658924, 0.1959905028, 0.244337827, -0.2565476894, -0.3770160675, -0.8533002138, 0.3729168773, -0.1395111233, -0.5446469784, 0.0230579302, -0.0514399968, 0.2916251719, 0.1466271728, -0.4675158858, -0.3342881799, 0.0168567337, -0.1670075953, 0.4653494954, 0.2231470197, 0.2102836072, -0.1181843728, -0.2060257196, -0.2494836152, -0.0421270095, 0.2474308461, 0.3107559085, 0.5551186204, -0.3252280653, -0.3398383856, -0.2012264132, 0.144545719, 0.1646936536, -0.0298971366, 0.0222611334, -0.0806640536, -0.104871504, 0.138902694, -0.080960311, 0.6621097326, -0.1253647804, -0.0696088299, 0.2355697155, 0.2911699116, 0.2255481035, -0.1471757591, 0.0858622715, -0.2458416373, -0.2381783575, -0.1877157092, -0.0227725059, 0.0519186035, 0.0170336775, -0.100694418, -0.1145726442, -0.0720120892, 0.0026857539, -0.0267570242, 0.196001485, -0.061893221, -1.0400999784, 0.2407353967, 0.0374266058, 0.3676605523, -0.3005235195, -0.0151077798, 0.0171063915, -0.1203268692, 0.0688889101, 0.2533520758, 0.1982685179, -0.2970383465, -0.1915174425, 0.3072462976, -0.0602129176, -0.3816343844, -0.015660217, -0.1553150117, 0.0423860364, 0.2700274289, 0.046518974, -0.2352751344, 0.0022845855, 0.201271981, 0.2129916698, -0.3095553815, -0.0849089175, -0.0463384278, -0.200848192, 0.1059703976, -0.1783400774, -0.1248126626, 0.2661641538, -0.2717263401, -0.1976006776, -0.1404853165, -0.1948445141, 0.5508689284, 0.0251921844, 0.4383125603, 0.0092951106, 0.3014675975, 0.4104402065, 0.0952396989, 0.1888517588, 0.493324697, -0.1635040641, 0.2424920946, 0.1802615076, -0.4166297913, 0.4104346633, 0.2077488154, 0.0506313741, -0.5396620035, -0.1687221229, 0.1276027858, -0.1933010519, 0.308647722, 0.0555601195, 0.1529190391, -0.1129278392, -0.2701955438, 0.53354913, 0.0959653258, -0.0635619611, 0.4199512601, 0.4356452525, -0.1722259074, -0.1856304109, 0.5252238512, 0.9401890039, 0.1180116311, -0.2010305822, 0.2859894335, 0.3628592193, 0.3200500607, -0.4389865696, 0.107674621, -0.0909884349, -0.3176472783, -0.0173184667, -0.0978894457, 0.1144261509, 0.2762750387, 0.1894147694, 0.127425313, -0.104810223, -0.208397001, -0.0775123388, 0.1711340249, -0.2112066895, -0.1323253065, 0.3128093183, 0.2388980985, 0.1537727565, 0.1969725043, -0.0188218858, 0.0476466268, -0.3277887106, -0.0218332205, -0.0232867803, -0.0518539362, -0.1385187209, 0.1136184186, -0.0270623751, -0.3384094238, -0.1717929542, 0.3910569847, 0.2524847984, -0.0504941233, -0.1955041885, 0.2480485439, -0.4263960719, 0.0497893468, 0.3418869674, 0.0250158682, 0.3480610251, -0.2133068591, -0.1571351886, -0.0502765849, 0.0463953875, 0.1945434064, -0.3856783211, -0.0647616908, -0.0856953189, -0.3978680372, -0.0388686284, 0.1745575368, -0.1564906389, -0.1440476626, 0.1651884764, 0.2185401469, -0.0178682674, 0.4426909983, -0.074772954, 0.0288320463, -0.1470030844, 0.2139880657, 0.4390411079, -0.2144440114, 0.2931470275, 0.0334878936, 0.0004919857, -0.1198279187, 0.0970493555, 0.3956152797, -0.0324403271, -0.0934054926, -0.3001126051, -0.1183768511, -0.0597370192, 0.2215804011, 0.2761350274, -0.0285184998, 0.0946875736, -0.388875246, -0.4292517602, 0.3315662444, 0.13178505, 0.3345541954, -0.3417190015, 0.2434819639, 0.0145245316, -0.0421477482, -0.3486152887, 0.0767510235, -0.1979303509, 0.0903017297, 0.0428446978, -0.0503342785, 0.3161008358, -0.3747344613, 0.164462015, -0.0852759629, -0.0834216997, -0.1887989044, -0.1612738073, 0.1184466034, 0.1784987897, -0.0808966905, 0.2584475279, 0.0195212606, -0.0407920294, -0.0206229538, -0.0118815387, -0.1061227471, 0.0719916821, 0.3074943423, 0.0319888666, 0.0527555868, -0.0597159564, 0.1610735655, 0.1112453192, 0.3838047385, 0.2101000696, -0.283937335, 0.0337957591, -0.2956760824, -0.2647458315, 0.0088827973, -0.0692959949, 0.0919454917, 0.3294751048, -0.0432854891, 0.1233956441, 0.2155060768, 0.3226026297, 0.4006247818, -0.2067875564, 0.1559050977, -0.0439033955, 0.2910839319, -0.2614023089, -0.0116660902, 0.0309895445, 0.3084945679, -0.1409592777, 0.0164673161, 0.1240910739, -0.1446178108, -0.114621006, 0.1645525843, 0.3177486956, -0.018169716, 0.1336689889, 0.1239912882, -0.2424307913, -0.0135057457, 0.0597877651, -0.0122246603, -0.0660735294, 0.1807798743, 0.0019393328, 0.5119623542, 0.1870923936, 0.1697478592, -0.0036405283, -0.0299676452, -0.1239292771, 0.285831362, 0.1655505151, 0.1494067907, -0.0646285415, 0.5828598738, -0.2291431427, 0.0227331221, -0.2644194067, 0.0174929686, 0.1737523526, 0.1246513575, -0.2637864649, -0.1605685204, 0.0370359048, -0.2200582623, -0.0629189983, -0.3337856531, 0.1164909452, 0.0125797139, -0.3229829073, -0.8925776482, -0.0908259153, 0.1098228395, 0.275461942, -0.1272934973, 0.1047694087, 0.5926685333, -0.0426864997, 0.1159245521, 0.423253268, 0.1104502752, 0.1399973184, -0.1032321453, 0.07575766, 0.2145927548, -0.0386862531, 0.1354571283, 0.1552173942, 0.0579459108, -0.1702953875, 0.3381465673, 0.1881193221, -0.0985919535, -0.1025125608, 0.0549403876, 0.0699450672, -0.061227046, 0.1678125709, 0.0603995696, -0.1503455043, -0.0869882405, -0.2606002688, -0.4143603742, -0.0776020736, -0.1462461948, 0.1356303245, 0.1808061302, 0.0280123278, 0.1186302453, -0.3475380838, 0.3643345535, 0.1019618958, -0.1094222814, -0.3326220512, -0.2414317131, -0.6039546132, -0.0895561948, -0.035471715, -0.5677001476, 0.190537855, 0.2993083298, 0.1537583917, 0.0626475289, -0.042608168, -0.3574110568, -0.1242508516, 0.1969060749, -0.606582582, 0.0870380849, -0.2483507544, 0.2716669142, -0.0730122253, 0.3079238236, 0.2601551414, 0.1919995248, -0.0033499082, 0.1946380436, 0.1530907899, 0.1256478429, 0.2274768949, 0.0218570922, 0.0238591246, 0.4491071403, 0.1651575863, 0.2428271472, -0.299759388, -0.276638031, -0.0712352619, 0.2449836731, 0.1859592646, 0.0427285656, -0.0514218323, -0.0374949388, 0.0562918633, 0.3808865845, 0.042799741, -0.4350442886, -0.4997076094, -0.0145091387, 0.0461160876, 0.0758597478, 0.316654712, 0.4712298214, -0.0947266892, 0.0466995277, -0.1350197345, -0.3913336396, 0.4939976037, -0.1814225018, 0.1789797246, -0.0617737286, 0.285549134, 0.4516839981, 0.0753908381, -0.3038819432, -0.0554283001, 0.4447306395, -0.2247905731, -0.1983685642, 0.2394728214, 0.3810156584, -0.1366303414, -0.0138139641, -0.096999906, 0.0049943179, 0.0067370813, 0.1402164251, -0.0109382458 ]
https://github.com/huggingface/datasets/issues/672
Questions about XSUM
So I managed to download them all but when parsing only 226,181/226,711 worked. Not sure if it's worth digging and debugging parsing at this point :/
Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg
26
Questions about XSUM Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg So I managed to download them all but when parsing only 226,181/226,711 worked. Not sure if it's worth digging and debugging parsing at this point :/
[ -0.084402971, -0.3709561527, -0.1518213004, 0.551538825, 0.359436661, 0.0405240841, 0.0683162957, 0.0596997701, 0.134743318, 0.2831320167, -0.2639549971, 0.2220128179, 0.1665135473, 0.3795986474, -0.0097541111, 0.0870641917, -0.0458379686, -0.0495312363, -0.3420444429, -0.2743536532, -0.1129429638, 0.1672510356, -0.0640181899, -0.0931084454, -0.6161140203, 0.0304495227, -0.150606513, 0.2275841534, -0.1146603301, -0.1896906644, 0.2454413176, -0.0064760465, 0.0730718151, 0.5845305324, -0.0001072108, 0.0421478003, 0.1385874748, -0.0378098972, -0.1016077846, 0.1958062649, -0.1344315857, 0.0074812607, 0.0375896953, -0.4290549159, -0.1038443819, 0.0078647081, -0.1288388968, -0.4139161706, 0.2797065973, 0.0508436151, 0.2060117722, 0.1301409751, 0.122047767, -0.0610722825, -0.0414986201, -0.1653327495, 0.1135954335, 0.1681453139, 0.4286617339, 0.3330431879, 0.1132158116, 0.1378390789, 0.062735185, -0.0928761512, 0.2489815801, 0.0891236216, 0.3963850737, -0.2542512417, -0.2236060202, 0.3075284362, 0.7909539938, -0.0128415646, -0.2719565332, -0.0801350102, -0.1137402877, -0.1378804147, 0.1684875935, 0.0955296531, 0.3050040603, 0.0173784737, -0.2742906511, 0.4346570671, -0.2719220817, 0.0431273989, -0.1886090487, -0.0193977617, -0.0990475267, 0.0135308756, -0.2441747934, -0.0699343532, 0.0598459914, -0.1378887296, 0.1849858761, 0.1969775409, -0.268783778, -0.0865289941, 0.022501016, -0.0889225006, 0.207547158, 0.1495759338, 0.2924565077, 0.1740621179, -0.3884455264, 0.0360539965, 0.2837073803, 0.1982511729, 0.4640649259, -0.5234388113, -0.0598215982, -0.0946587175, -0.0922634378, 0.0891621783, -0.3523962498, 0.0325110219, -0.174333185, 0.0682127923, -0.1539724022, -0.3955870867, -0.2191727161, 0.2432526946, 0.0437815413, -0.0528689548, 0.1824024022, -0.0723195225, 0.079428643, 0.4509503245, 0.044928167, 0.0883207992, -0.5913876891, -0.3623244762, -0.3410969079, 0.0768075064, -0.0388301574, -0.1517430246, 0.0976496264, -0.0679078624, 0.3594029546, -0.1681586951, 0.2341184914, -0.0889774635, 0.0521356463, 0.0420722961, -0.2788226604, 0.180766508, 0.1090999842, 0.0562918, -0.0498099104, 0.0215037186, -0.035966251, 0.0135746431, -0.2149072587, -0.2208456695, 0.0673826188, 0.3082096875, -0.400360465, -0.1919498891, -0.2521120608, 0.0484698676, 0.1929274499, 0.1856545359, -0.2762891054, -0.1987268031, 0.0695118606, -0.1438952535, 0.2400277704, -0.0621404499, -0.6286694407, 0.0207068566, -0.0551140271, -0.3237281144, 0.159466967, 0.0425659455, 0.0001080155, 0.179601565, 0.0852623284, 0.3123664558, -0.544895947, -0.4406231642, -0.1038653404, -0.302167207, -0.1983386725, -0.0888617337, 0.0656144619, 0.0577716641, 0.1162545606, -0.1171017215, 0.1266622394, 0.0903062075, 0.1143719852, -0.1681383103, -0.3830770552, -0.0592862368, -0.0361176915, 0.2105554938, -0.0382765308, -0.356995225, -0.0710631087, 0.3697215617, 0.2348646224, -0.0128278444, -0.0519179739, 0.0767107233, 0.2566023767, -0.1620864272, 0.1281024069, -0.2024352849, -0.0674668401, 0.3197567165, 0.148252219, 0.1308017969, 0.6472722292, 0.0174675528, -0.3737600148, -0.2013432384, -0.0036844872, -0.1563883275, 0.1798098385, -0.1540352553, 0.016963562, -0.1929000318, -0.1964883655, 0.1467989832, -0.5844188333, 0.0877540633, -0.4837874174, 0.307949245, 0.0356465653, -0.0554786026, 0.1046853364, 0.2320111692, 0.0160831064, -0.3351311982, -0.0028698866, 0.5101035833, 0.2191061825, 0.0154447155, 0.0722847581, 0.07858181, 0.3620749712, -0.1975265741, 0.0968506187, -0.2044920325, -0.0145206051, -0.2000109702, -0.407615006, 0.2604998946, -0.117358692, 0.0784931928, -0.0264967494, 0.0118697928, 0.0656035766, -0.1671250463, 0.0782165229, -0.0068108467, 0.2217554897, 0.136330381, -0.2356703877, 0.0294544753, -0.0234071035, 0.4073217511, -0.3067412674, -0.1834522486, -0.2272913903, -0.376477927, -0.2248347998, 0.2087491453, 0.0891347602, 0.0061401026, 0.3895542324, 0.2478597462, 0.1647430956, -0.0026287704, -0.0421475992, -0.1760358214, 0.0573836491, 0.1193654388, -0.0931032524, -0.0215960164, -0.0650560856, 0.0102846511, -0.1624885798, 0.0591239072, 0.1499176472, 0.1706701666, -0.4749033749, -0.3363263905, -0.2788442373, -0.1544816494, 0.2290476263, 0.2144042104, 0.1654615104, -0.3635773361, 0.1188497096, 0.065546602, -0.0984495282, -0.0696899369, -0.4235265255, 0.2534595132, 0.0416911133, 0.0493308678, 0.0934924483, -0.1450417191, -0.2133836597, 0.2005329132, 0.1096161455, 0.2957604825, 0.2793510258, -0.0827665776, -0.0675937831, 0.1530394703, -0.4200551808, 0.0808796138, -0.2090595067, 0.2647401094, -0.1809298694, 0.0637804419, 0.07588806, -0.0583417863, 0.2622321844, -0.0175452344, -0.3150865138, -0.0072275237, 0.2789835632, -0.2849285603, -0.1204457358, -0.620398581, -0.0950755104, -0.1197581366, 0.0135914916, 0.4494407475, 0.2404862791, 0.0030262382, -0.1237987727, 0.1671098322, 0.1330026388, -0.1980488449, -0.3257891834, -0.7631095052, 0.3649157286, -0.1054658443, -0.5235013962, 0.0694446266, 0.0365558006, 0.3319697082, 0.2015596181, -0.3550730944, -0.2631837726, 0.0283334497, -0.138043493, 0.5030135512, 0.1878079027, 0.1311600208, -0.1825518608, -0.1283177882, -0.2406113744, -0.0633852109, 0.2212836742, 0.286742121, 0.4415380061, -0.2504806519, -0.2394238263, -0.1297157407, 0.1067301184, 0.2224222124, -0.1233519316, 0.0197560973, -0.0243242141, -0.1388291121, 0.0865027159, -0.0701705441, 0.6146478057, -0.1002107486, -0.0766834989, 0.2349847108, 0.2012979537, 0.1896941811, -0.108024247, 0.0543919429, -0.3126688302, -0.198042497, -0.2103840858, 0.0207387954, -0.0154816033, -0.0241568107, 0.0033169505, -0.0880532116, -0.0707056522, -0.1224523112, -0.0944800526, 0.086298503, 0.0019937758, -0.9377423525, 0.2583683729, 0.0919097736, 0.4281425476, -0.3496419787, 0.027894441, 0.0480786636, -0.1031294167, 0.1625870913, 0.1365581602, 0.1698755175, -0.2361751646, -0.1420075446, 0.3406641781, -0.1795446724, -0.3259530365, -0.0398753099, -0.2304541916, 0.0668516606, 0.26930812, 0.0082560666, -0.3681924939, -0.0841491669, 0.1560111195, 0.1928170472, -0.2522938848, -0.0934553742, 0.0209811907, -0.0953885317, 0.0589123145, -0.1013500243, -0.1001865342, 0.2969883978, -0.2014067024, -0.109172903, -0.2192254663, -0.157183513, 0.6077882648, 0.0983486548, 0.4593626559, -0.0179451574, 0.3484977782, 0.3587203026, 0.0554525331, 0.309482336, 0.5613520741, -0.0473900028, 0.1406848282, 0.2311219871, -0.4103593826, 0.3843430579, 0.2076776326, 0.0509201773, -0.5400859714, -0.2392209917, 0.1230285093, -0.1230431274, 0.3074818552, 0.0821118802, 0.1137972996, -0.1260644794, -0.2406030595, 0.5399980545, 0.2011414617, -0.0039306008, 0.3453179896, 0.3633012772, -0.1422877461, -0.1741362363, 0.4850198627, 0.8846731782, 0.0581081659, -0.2450194061, 0.2336232215, 0.3626751006, 0.392279923, -0.5971927047, 0.0725343823, -0.1595448256, -0.2600104511, 0.0047876569, -0.1000371203, 0.1541110128, 0.3621689975, 0.2189939171, 0.119118236, -0.1705765426, -0.2454869598, -0.0999178812, 0.1773551702, -0.3138260245, -0.1143448278, 0.278029114, 0.2623188198, 0.0470492765, 0.1821984947, 0.0251905639, -0.0102489945, -0.3843561411, -0.0390351228, -0.0858820081, 0.0581315011, -0.1295069158, 0.0087876124, 0.0130772246, -0.355740279, -0.0024176533, 0.3001091182, 0.1371398121, -0.0598602444, -0.1386629939, 0.1516336799, -0.3667663038, 0.0080355462, 0.3414291739, -0.054977335, 0.3626561761, -0.1882982254, -0.0685662851, -0.0483332574, 0.0838889852, 0.2143615782, -0.3564112186, 0.0453657061, -0.0632295683, -0.4032189846, -0.1070723459, 0.197660476, -0.0609893054, -0.0711485595, 0.1763243079, 0.2075741738, -0.1406906247, 0.4731568396, -0.1147415414, -0.0000974317, -0.0891010985, 0.1888038516, 0.4392288029, -0.2343625277, 0.3456519842, 0.1064259484, -0.0194111448, -0.1558786184, -0.0648856163, 0.487993598, -0.0728851035, -0.053364832, -0.3302254379, -0.1810842901, 0.0378357358, 0.2344366461, 0.2910998762, -0.0568904206, 0.085924305, -0.3747248352, -0.3915477097, 0.3048353791, 0.0615767911, 0.3998575211, -0.2707558572, 0.300916642, -0.0394116454, 0.0134665994, -0.3510237038, 0.081444867, -0.1134230122, 0.0863944218, 0.0758702159, -0.0173683688, 0.1995368451, -0.376380682, 0.1671516001, 0.0994851515, -0.1877501309, -0.2005377114, -0.1248667389, 0.1078129783, 0.1627763063, -0.0914479196, 0.2315329015, -0.0609392598, -0.0687170327, -0.0724650696, 0.0416357666, -0.0996675491, 0.103763856, 0.2707601786, 0.1801617742, 0.1299979389, -0.0851483345, 0.1632079929, 0.1201812103, 0.3497530222, 0.1439628601, -0.2291558385, 0.0017927131, -0.1992861629, -0.2425180227, -0.0323251188, -0.0972898453, 0.0550504066, 0.3261317611, -0.0826270953, 0.1812699586, 0.2118545622, 0.3575923443, 0.5210458636, -0.11733073, 0.0779543445, -0.0002386386, 0.2967443764, -0.2638826072, -0.0054879291, 0.1626419425, 0.4330529869, -0.1679997146, 0.1031335071, 0.122740671, -0.0439867862, -0.1741835177, 0.168915391, 0.332144171, -0.0323142111, 0.17984052, 0.2388120741, -0.1941302419, -0.0192906484, 0.0813130438, 0.0125189265, -0.0040596602, 0.2605921626, -0.045690123, 0.4583985209, 0.2378917187, 0.1593588591, -0.0153164044, -0.0878005475, -0.1395557523, 0.3989133239, 0.1636965722, 0.1770864427, -0.0047664628, 0.5884444714, -0.1515662223, -0.0095633594, -0.3527896702, 0.1206697971, 0.0668217838, 0.1578652561, -0.2908959687, -0.1604319513, -0.0153113576, -0.1504227221, -0.1391028911, -0.2644782066, 0.1907554567, -0.0136044575, -0.3546860218, -0.8215942979, -0.126582399, 0.1065372452, 0.2467354089, -0.1747161597, 0.1872713268, 0.554186523, -0.073823005, 0.1061169133, 0.4661082327, 0.1588304341, 0.1761286706, -0.0514698066, -0.0143454811, 0.180493474, -0.030007178, 0.0893066823, 0.1932424307, -0.022059856, -0.1006876305, 0.3865223229, 0.2039575428, -0.1132389009, -0.1893345714, 0.0490954667, 0.0537513457, -0.0886316076, 0.0892834589, -0.015844183, -0.077937752, -0.0738947913, -0.3469388783, -0.3450101912, -0.0823853835, -0.1266109645, 0.2088726461, 0.19706209, 0.0725054741, 0.1151137054, -0.3228031099, 0.2175071836, 0.1203016043, -0.1338186413, -0.336774081, -0.1647318602, -0.5921187401, 0.0133011928, -0.1393099725, -0.6057729721, 0.1874081492, 0.3719217479, 0.2124896646, 0.0715407282, 0.0168447271, -0.3277925849, -0.1417148709, 0.3222788572, -0.5912342668, 0.075055562, -0.2451958507, 0.1103659943, 0.0302406922, 0.2611944079, 0.2501965761, 0.2228233516, -0.0242264327, 0.1672597528, 0.1731892824, 0.158140406, 0.1526832134, 0.007670484, -0.0108490577, 0.4436743259, 0.2360302061, 0.3360919058, -0.3565453887, -0.1521240473, -0.1615942419, 0.3721128106, 0.1744450331, 0.1416355371, -0.0451193005, 0.0576927476, 0.0519836619, 0.1859647781, -0.0437357984, -0.3975057006, -0.4537164271, 0.0076168613, -0.0223282035, 0.0739166811, 0.293350786, 0.4988901317, -0.0320866145, 0.0997443721, -0.2534348965, -0.4610157907, 0.3716872931, -0.1335279644, 0.0866396725, -0.0287306085, 0.2500467896, 0.4638035893, 0.0116084069, -0.3417442143, -0.026474053, 0.4352744818, -0.3208560348, -0.1928695887, 0.1822360605, 0.333380729, -0.2583929002, -0.0364943668, -0.0554953329, 0.0673058406, -0.0355636254, 0.1169178486, -0.0384218208 ]
https://github.com/huggingface/datasets/issues/672
Questions about XSUM
Thanks @lhoestq It would be great to improve coverage, but IDs are the really crucial part for us. We'd really appreciate an update to the dataset with IDs either way!
Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg
30
Questions about XSUM Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg Thanks @lhoestq It would be great to improve coverage, but IDs are the really crucial part for us. We'd really appreciate an update to the dataset with IDs either way!
[ -0.1205384582, -0.3434901834, -0.1572830677, 0.4010955989, 0.3150457144, 0.0539409965, 0.1680676788, 0.0182595812, 0.2290301174, 0.2051196396, -0.1785498708, 0.2475749552, 0.1144535094, 0.4436739683, 0.098384738, 0.1101117283, -0.006561589, -0.1371245682, -0.3460201621, -0.2986063361, -0.0433962643, 0.0572820231, -0.1505292803, -0.174475953, -0.6682880521, 0.0145026939, -0.1977972388, 0.254042685, -0.1082972288, -0.2513684332, 0.3075425923, 0.0355965309, 0.0455215126, 0.4934388399, -0.0001066689, -0.0335242301, 0.1318748146, -0.0461245365, -0.0730435699, 0.2865337729, -0.1540058404, -0.0908152461, 0.0087959245, -0.3714570701, -0.0635809079, 0.0710184723, -0.1505089402, -0.3604392111, 0.1319085509, 0.026103761, 0.2053842843, 0.1816889197, 0.1772072762, 0.0034409289, -0.0710886642, -0.1299711764, 0.0547026135, 0.2795855105, 0.4867466986, 0.223367855, 0.0364004299, 0.223572284, 0.0667105839, -0.2351703346, 0.2473032176, 0.0893048197, 0.3610635698, -0.1546257138, -0.3263548315, 0.2234195322, 0.814868629, -0.0138421906, -0.3631147742, -0.0914176702, -0.01413537, -0.1905053705, 0.1663066745, 0.0231584236, 0.4013921618, -0.0192246493, -0.3194676936, 0.3984608054, -0.2611433268, 0.021119833, -0.1350148022, -0.1003200933, -0.0169937499, -0.0170951691, -0.2322697043, -0.0396251269, 0.0964689255, -0.0244269148, 0.1179356501, 0.1987859309, -0.3089931309, -0.204852581, -0.0104516353, 0.0081871655, 0.2604075372, 0.177193135, 0.2447292954, 0.0415657945, -0.4094985127, 0.0169902388, 0.2245203555, 0.2314256728, 0.4467464685, -0.4870940447, 0.0470451638, -0.0431571268, -0.1261608154, 0.0585928485, -0.3492001295, 0.0123143476, 0.0359339491, 0.1200716421, -0.1307220459, -0.3616784811, -0.1987830549, 0.2999649942, 0.0037910822, -0.1758428216, 0.1398108155, -0.1497579068, 0.0295126531, 0.4021391571, 0.0162871033, 0.0602588132, -0.5490458608, -0.3304895461, -0.3623380661, 0.0852195099, -0.0705258623, -0.0179138537, 0.1263845712, -0.1132444218, 0.3872211576, -0.1766902953, 0.2488538176, 0.0368415713, 0.089751929, 0.1391470432, -0.3680391014, 0.2284669876, 0.0240021944, 0.0156879053, -0.0285932925, 0.0518154986, 0.0010556736, -0.0023568412, -0.192172274, -0.2217102945, -0.0001561858, 0.2905133963, -0.3537013829, -0.3277321756, -0.0906434059, 0.0307500735, 0.1729969233, 0.165386349, -0.1721051037, -0.0541455634, 0.0885854289, -0.1038441211, 0.1517872661, 0.0132697774, -0.5510631204, -0.0082752705, -0.0016376924, -0.2535507381, 0.133164376, -0.028040519, 0.0421096683, 0.2410803437, 0.1172038391, 0.1348563433, -0.5617377162, -0.4743941128, -0.1683335155, -0.3735474944, -0.162011385, -0.1173288524, 0.1920337826, 0.0643854514, 0.0327113457, -0.1309924126, 0.1321862638, -0.0206762403, 0.0525832176, -0.1722005755, -0.45446527, -0.0696141347, -0.0106009115, 0.2401328236, -0.0399661884, -0.3308127522, -0.1268027127, 0.3707155883, 0.157927081, 0.007608349, -0.1216364056, 0.0300811734, 0.3287632763, -0.1603640616, 0.0529126637, -0.1468401551, -0.0415223315, 0.3014721274, 0.1175610274, 0.2241446972, 0.7303124666, -0.0659258366, -0.3103892803, -0.1799811721, 0.0191870667, -0.2510038614, 0.1881149858, -0.18729873, -0.0368539393, -0.2384051532, -0.1892733425, 0.1357984692, -0.6147505045, 0.0889655128, -0.4941740036, 0.3555938303, -0.0201430507, -0.0115463585, 0.0635660961, 0.2999171913, -0.0188036971, -0.3205813468, -0.0646444038, 0.5364032984, 0.1481602341, 0.0586814806, 0.2148330957, 0.2414092422, 0.4149379432, -0.1923777014, 0.1212523058, -0.2626795769, -0.0870191604, -0.1991875023, -0.4233084023, 0.2120582312, -0.129801482, 0.0258161779, -0.107819587, 0.0357512906, -0.0327578299, -0.1688143611, 0.0306373145, 0.0417338386, 0.1496233046, 0.1417601407, -0.2297071218, 0.0775303394, 0.0226606242, 0.419498533, -0.3977730274, -0.1804338098, -0.2100395262, -0.3189485669, -0.1661613435, 0.1576019228, 0.1537569314, -0.0587062202, 0.4931568801, 0.321742475, 0.0985389352, -0.0338732488, -0.0395654403, -0.1556172371, 0.0235521086, 0.0013055757, -0.1736928821, -0.0394245386, -0.0639208108, 0.0033621844, -0.1511524767, 0.0975713804, 0.1108915806, 0.1865144074, -0.4474342167, -0.4137153625, -0.213912338, -0.1277545393, 0.2385015637, 0.1950373352, 0.1759382188, -0.298545301, 0.1582860053, 0.0456120744, -0.0374017581, 0.0498326346, -0.4003777802, 0.2830517888, 0.0254462827, 0.0708900765, 0.073801212, -0.1696784496, -0.1166361421, 0.2136630714, 0.0037981002, 0.2504512072, 0.3692831397, -0.0844295844, -0.0666721612, 0.1225023866, -0.4055015445, -0.0075854119, -0.1713563949, 0.2512725294, -0.1238032132, 0.0624053963, 0.0091359112, -0.0322459824, 0.2944408655, -0.0420788527, -0.2515261769, -0.1448776573, 0.1808840185, -0.1780131608, -0.0485051088, -0.5882418156, -0.1118779331, -0.1036613733, -0.0437037088, 0.4338702857, 0.15621759, 0.0717754811, -0.1139171869, 0.150525108, 0.2319959402, -0.2218731493, -0.3314308524, -0.8559190631, 0.3598410785, -0.0937614441, -0.4732735455, -0.0068538645, -0.0225820579, 0.3321777284, 0.1283276677, -0.3856081069, -0.3623091877, 0.0941487774, -0.0910066739, 0.5071299076, 0.2270728201, 0.2142199278, -0.16955401, -0.1697410494, -0.2687191665, -0.0707302243, 0.2278572023, 0.26539886, 0.4700399339, -0.3075747788, -0.330424726, -0.2363012284, 0.0882741287, 0.2966340184, -0.116736874, 0.067981571, -0.0080631571, -0.1070006266, 0.0694276094, -0.2100120932, 0.6536989808, -0.0930675343, -0.0585267954, 0.1649473906, 0.2104712725, 0.1872383505, -0.0612775907, -0.0215397943, -0.218507424, -0.1561474055, -0.1904437244, -0.031715963, 0.1063783318, -0.0354219042, -0.0511397794, -0.1161284223, -0.0987933502, -0.0448369384, -0.0475973301, 0.1295495629, -0.068951726, -0.9873173833, 0.1482983828, 0.0614226721, 0.3500620425, -0.2704576552, 0.0611165613, 0.0373715796, -0.100926213, 0.0586140454, 0.239067018, 0.1709831655, -0.31812644, -0.2277027667, 0.320356518, -0.0780300051, -0.2289003432, -0.0751323178, -0.1517712176, 0.1124700233, 0.2031223029, 0.0463269688, -0.2426430136, -0.0057295132, 0.244661361, 0.1740337014, -0.2819227278, -0.1150529683, -0.0262231622, 0.036914777, 0.0816228166, -0.066437304, -0.1242513433, 0.237652868, -0.2308772355, -0.1715971529, -0.1750876456, -0.1097576395, 0.4990906715, 0.0253516082, 0.4236935377, 0.0014485694, 0.3811962903, 0.3656775653, -0.0023783282, 0.2452309877, 0.5255577564, -0.2379059643, 0.2452267408, 0.162116304, -0.3930387497, 0.4691257179, 0.1861155182, 0.085519217, -0.5343075991, -0.3154668212, 0.0659410655, -0.224277854, 0.2662933171, 0.096879527, 0.1935727894, 0.0061811102, -0.2685910761, 0.4813044965, 0.1461719424, -0.0028586267, 0.4337334037, 0.3625034392, -0.1001506001, -0.1965574473, 0.5348649025, 0.8573752046, 0.1341350377, -0.2769602835, 0.1873970926, 0.398976028, 0.2924270034, -0.4698540866, 0.0309969448, -0.1797637939, -0.3730555773, 0.0669314861, -0.066115424, 0.1716617346, 0.2435254902, 0.1326759905, 0.1424652487, -0.1018327326, -0.3105868399, -0.1415358931, 0.1586580724, -0.2393762767, -0.1737303436, 0.3241583109, 0.2493676543, 0.1057078913, 0.1377294213, -0.0025494315, 0.0902037248, -0.2908139229, -0.0636132285, -0.137607649, -0.0866236687, -0.1024518982, -0.0253316611, 0.1007552743, -0.3295691311, -0.0205368157, 0.3093982041, 0.2168636918, -0.0141018704, -0.1341948956, 0.1402646005, -0.3714331388, 0.0706171095, 0.3393005133, 0.0430370942, 0.3660301566, -0.1421200633, -0.1790258139, -0.0798793361, 0.0444958992, 0.2592799366, -0.3610318899, -0.0524774641, 0.001244431, -0.4801270366, 0.00594232, 0.1389620751, -0.0478829928, -0.1669546366, 0.1891179383, 0.2385031581, -0.0703894347, 0.4668536484, -0.0985428989, 0.0819875374, -0.1123835891, 0.2597108483, 0.4520571828, -0.1689190716, 0.271569252, 0.0058894847, 0.0190445986, -0.1723522991, 0.1103766039, 0.5367070436, -0.0884714127, -0.0832175463, -0.2841583788, -0.2118473947, 0.0026131165, 0.248256281, 0.2747526765, 0.011558882, 0.1169231534, -0.3189617395, -0.4721282423, 0.3399026692, 0.1061608568, 0.3993189335, -0.2627229989, 0.2220872641, -0.0375856683, 0.0843353122, -0.3584275544, -0.052286841, -0.1350087374, 0.0268152133, 0.1082240641, -0.0482635759, 0.2857340872, -0.355471909, 0.1944626421, 0.0014775997, -0.1028863415, -0.2374936789, -0.0796810538, 0.1035741046, 0.168161571, -0.0202260986, 0.2944042981, 0.00795474, -0.0590883009, -0.0811659694, -0.0051047709, -0.192794323, 0.0886520743, 0.3592903018, 0.0931338817, 0.0844178051, -0.0601135753, 0.1306255758, 0.112558566, 0.2832224667, 0.0832647681, -0.2470524311, 0.0801811516, -0.2404568642, -0.1764964908, 0.0024413536, -0.0544300526, 0.1487931907, 0.2819154561, 0.0178397559, 0.1254841834, 0.2038832307, 0.3088871539, 0.3877470493, -0.1485747397, 0.1263664514, 0.0175468046, 0.2953407168, -0.2960580885, -0.069529891, 0.0591546409, 0.3725501895, -0.0748169422, 0.0944055244, 0.1876341403, -0.110206686, -0.1191944703, 0.1681519002, 0.2572804391, -0.0466940403, 0.0978735685, 0.2053416073, -0.198102951, -0.0566765256, 0.1275028735, -0.0845115781, 0.0223542713, 0.1790508032, 0.0296543781, 0.482833147, 0.1684747934, 0.1510418206, -0.0394966789, 0.0128697818, -0.0632432625, 0.3031079173, 0.1901876628, 0.1405858546, 0.0364694223, 0.6264359951, -0.1472073942, -0.0713053048, -0.248266533, -0.0444765761, 0.1188215166, 0.1468962878, -0.2875573933, -0.0665118918, 0.018064836, -0.204282701, -0.1263272911, -0.2352711409, 0.2165550292, -0.0306692198, -0.3188950419, -0.8173328638, -0.11210531, 0.1354613602, 0.328166455, -0.1114769056, 0.1377735436, 0.6112167239, -0.0511415154, 0.0817143023, 0.591232419, 0.1228114739, 0.065384157, 0.0319042131, 0.0496207587, 0.2083980441, -0.0744643137, 0.1448264867, 0.1422780156, -0.0415839441, -0.1758448184, 0.2718536854, 0.1791798621, -0.0965659097, -0.1126216948, 0.0980194509, -0.064307794, -0.0560762584, 0.0713277012, 0.0975247398, -0.1953417361, -0.0374280587, -0.2533316016, -0.3634218276, -0.0417783521, -0.1204867959, 0.1425013542, 0.1355957687, 0.0111643327, 0.1273573935, -0.2924353182, 0.3528837264, 0.071425736, -0.0985989198, -0.2925545275, -0.1884860843, -0.5612858534, 0.0191083532, -0.0751691759, -0.5208985806, 0.2102711201, 0.2816258371, 0.1408775449, 0.0216734111, 0.0330646895, -0.4064507782, -0.0632038787, 0.3153189123, -0.6724223495, 0.018029213, -0.177789256, 0.1920738965, 0.0134410532, 0.30050686, 0.2789628804, 0.2261445671, -0.0230141114, 0.1866994351, 0.1346618086, 0.151771605, 0.2687850296, 0.0206961073, -0.0172373056, 0.4619520605, 0.1609884948, 0.3414976597, -0.3036716878, -0.2003555894, -0.1873812675, 0.2807470858, 0.1854949743, 0.1262613088, -0.0563761853, -0.0309700351, 0.1362662315, 0.3118081391, 0.0273436103, -0.4815065563, -0.542869091, 0.0589118637, 0.0760930404, 0.0016455576, 0.1991197318, 0.4701712728, -0.0038903635, 0.0714808702, -0.2085635066, -0.3970820308, 0.4352812469, -0.1364440322, 0.2403232604, -0.0660246685, 0.2361036092, 0.4462290406, 0.023361275, -0.3581889868, -0.0511542708, 0.4260797799, -0.1957482845, -0.1757145971, 0.2586028278, 0.4284219146, -0.1749580204, -0.0401436016, -0.0537575111, 0.0108098323, 0.0529568531, 0.2350609004, -0.0215721447 ]
https://github.com/huggingface/datasets/issues/672
Questions about XSUM
I gave up at an even earlier point. The dataset I use has 204,017 train examples.
Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg
16
Questions about XSUM Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg I gave up at an even earlier point. The dataset I use has 204,017 train examples.
[ -0.0992735326, -0.3724808991, -0.1397750378, 0.4924609363, 0.3237832189, -0.0019077146, 0.1788343042, -0.0305927861, 0.226830259, 0.2765002847, -0.195772931, 0.2362506986, 0.0817245767, 0.416251868, 0.1343757659, 0.0998579785, -0.0211556088, -0.119515337, -0.3618007898, -0.2939092815, -0.0009093834, 0.059832871, -0.0843997523, -0.129555136, -0.6914079189, 0.0213112365, -0.1459833086, 0.2635232508, -0.0787920505, -0.1954723895, 0.2472312152, 0.0306974798, 0.0586972572, 0.5738731027, -0.0001047336, -0.002384943, 0.1076082587, -0.0218013842, -0.101714991, 0.2196225077, -0.1683494002, -0.0203227494, 0.0056743124, -0.3873437643, -0.0865237713, 0.0476221852, -0.1387610435, -0.3502878249, 0.2238691151, 0.0132080596, 0.2210145146, 0.1479528844, 0.1104969978, -0.056956958, -0.0520520806, -0.107522361, 0.0981686264, 0.2489618361, 0.405405134, 0.2546092272, 0.0566351451, 0.1681375057, 0.0725834072, -0.2038875669, 0.2872775495, 0.066479452, 0.3404061198, -0.1934158206, -0.3072767556, 0.3304913342, 0.8445413709, -0.0371896923, -0.2612979412, -0.0371642783, -0.0114017269, -0.1463238895, 0.1685737371, 0.0669239908, 0.3521563113, -0.0419835784, -0.2714675069, 0.4366954863, -0.2350868434, 0.0346356928, -0.1616156101, -0.0856524184, -0.0703879595, 0.016269166, -0.2013381422, -0.0584480688, 0.0550669283, -0.0501669794, 0.1705985516, 0.1830288321, -0.2987988889, -0.1156958938, -0.0200140178, -0.028623851, 0.2357102334, 0.1532755345, 0.2867732942, 0.0642204657, -0.3826186359, 0.0466697887, 0.2231808603, 0.2809687555, 0.4171875119, -0.5452025533, -0.0015246755, -0.1041456461, -0.1251527667, 0.0936613679, -0.3935851455, -0.0319755301, 0.0116166631, -0.0072852219, -0.1651062816, -0.347494632, -0.221812278, 0.2655236125, 0.0236570649, -0.0896358564, 0.1897134185, -0.129857257, 0.0461675785, 0.3801032305, -0.0006399726, 0.0334397368, -0.5421857238, -0.2864270806, -0.3575431108, 0.1192150638, -0.0814282894, -0.0300748851, 0.1057597399, -0.0802364275, 0.3754306138, -0.0953307673, 0.260786891, -0.0121269384, 0.0667468682, 0.0848381668, -0.3233207464, 0.218636319, 0.0322241038, 0.0163808502, -0.0498161502, 0.0311084352, -0.0335649177, -0.0112236002, -0.1946563572, -0.225624159, 0.0123134432, 0.3181310892, -0.3618127108, -0.2805409431, -0.1812170893, 0.0062773046, 0.1754128337, 0.2128991336, -0.194057554, -0.1520866305, 0.0713580623, -0.1175184697, 0.1709078848, -0.0380267873, -0.5679004788, 0.0302610137, 0.0239041392, -0.2643794119, 0.0763848126, 0.0145942336, -0.0121543994, 0.24252294, 0.1205774695, 0.1891643107, -0.538662076, -0.476538837, -0.1282004267, -0.3288972378, -0.1726728529, -0.0970213115, 0.1299282461, 0.1182870269, 0.0263424907, -0.1328428984, 0.1855415553, 0.0189909209, 0.1131549254, -0.1729654372, -0.424064666, -0.0728574395, -0.0183060542, 0.2005009502, -0.08610937, -0.3178795278, -0.1180911213, 0.3464240432, 0.1670279354, 0.0066569704, -0.1042169109, 0.0776907057, 0.3016306758, -0.1446901709, 0.0841596797, -0.197345674, 0.0233380143, 0.3096410036, 0.128574416, 0.2264476717, 0.7804635763, -0.0542838015, -0.3663803637, -0.2252174765, 0.0094813323, -0.1826500297, 0.2018442154, -0.2278421521, -0.0043879622, -0.2264473289, -0.1856213659, 0.1292774677, -0.5900853276, 0.0397551656, -0.4913721383, 0.3026930094, 0.0295923911, 0.0148400171, 0.0524941199, 0.2697272599, -0.0397589616, -0.2674592137, -0.0272118673, 0.5520482659, 0.1712251753, 0.0097713834, 0.1811790913, 0.1955790818, 0.3629963696, -0.1806838065, 0.1403544247, -0.2309367359, -0.0687369704, -0.1801775843, -0.39733693, 0.2244197428, -0.1129114106, 0.0193620455, -0.0542981327, 0.0144108906, 0.0128693134, -0.1489402056, -0.0007944905, 0.0223873761, 0.2171735913, 0.139406234, -0.2246801555, 0.0960169211, 0.0005259658, 0.3793877363, -0.3613013327, -0.1710775495, -0.1926084608, -0.3339501321, -0.2287156135, 0.1707284003, 0.1128912866, -0.0203486681, 0.4611945152, 0.3074296117, 0.0879983529, -0.0402851738, -0.0910277441, -0.1547590345, 0.0054162908, 0.0353737101, -0.0759335384, -0.070503816, -0.0524720699, 0.0217554141, -0.1583796889, 0.0778038204, 0.0994938016, 0.1443369985, -0.4329530001, -0.3254624605, -0.2261653841, -0.1014578715, 0.1962683499, 0.1690275669, 0.1492387205, -0.2707685232, 0.168547228, 0.0528134555, -0.043252483, 0.0122002978, -0.3721601367, 0.2992724478, 0.0463093184, 0.1064095199, 0.1071184576, -0.1652508825, -0.1766562909, 0.2086236775, 0.0322134309, 0.3394015133, 0.3760536015, -0.0735378116, -0.0521858893, 0.1309557259, -0.423075527, 0.0316202827, -0.2039084584, 0.2718335092, -0.1448123008, 0.024117237, 0.0496201068, -0.010407201, 0.2507303953, -0.0399125032, -0.2387537062, -0.0692076981, 0.1907084286, -0.2634195983, -0.0955591798, -0.547224164, -0.0945073441, -0.0876358449, -0.0245300196, 0.4820388258, 0.2032702565, 0.0930779278, -0.0946999192, 0.1994304806, 0.2466466427, -0.1848700643, -0.375430733, -0.8140149117, 0.3188571632, -0.1111660078, -0.5230093002, 0.0298814047, -0.0341504887, 0.2833776772, 0.1337904781, -0.3918619156, -0.3439759612, 0.0009986687, -0.117322661, 0.5061706305, 0.2171714306, 0.206512168, -0.1710244119, -0.1827393025, -0.2552517653, -0.0513572246, 0.3030755818, 0.297409445, 0.4628180563, -0.3247472942, -0.3170229793, -0.2085954845, 0.0620309487, 0.2097073942, -0.1498317271, -0.0147465551, -0.0671079829, -0.1116593555, 0.0421479158, -0.1151775941, 0.6210405827, -0.1083308458, -0.0778181851, 0.1630093306, 0.2271413207, 0.2326096892, -0.045935683, 0.0751870498, -0.1875703186, -0.1476859152, -0.1704905927, -0.0469827726, 0.0304857008, -0.0582416393, -0.0764017999, -0.100333862, -0.1045023724, -0.1077797487, -0.0384339839, 0.1093311682, -0.0412417762, -0.9979837537, 0.2905907929, 0.0495602563, 0.3575127423, -0.2970936, -0.0282555707, 0.0079544783, -0.1286726743, 0.0868090764, 0.215158388, 0.2042944431, -0.2144070715, -0.2301448882, 0.3166199028, -0.0985534862, -0.313830018, -0.0879617259, -0.1631443202, 0.0783090815, 0.2113244832, 0.0470898971, -0.2636472881, -0.026439067, 0.2030965984, 0.2186728865, -0.2879210711, -0.1855091453, -0.0728501454, -0.0394719616, 0.0451778509, -0.1197460741, -0.1093573123, 0.2601594031, -0.270839572, -0.1437161565, -0.1985711157, -0.1354957968, 0.5682415366, 0.0463845395, 0.4107860327, 0.0025730387, 0.3345633447, 0.3583500981, 0.1150296256, 0.2347040027, 0.4786401987, -0.1482518315, 0.253682822, 0.159155637, -0.3659279943, 0.3642495573, 0.1660321057, 0.0849330947, -0.4914812148, -0.2385422885, 0.0891464651, -0.1952745616, 0.2906859517, 0.0943459421, 0.1904982924, -0.0780879036, -0.274883002, 0.5450213552, 0.138710469, -0.0097050089, 0.380435884, 0.3659905195, -0.1164857224, -0.1873205304, 0.5151321292, 0.8932387829, 0.0769283772, -0.1938196123, 0.2794931531, 0.4090279043, 0.3263079226, -0.4818763137, 0.0356591456, -0.1621780843, -0.3530299067, 0.0403984636, -0.0972942412, 0.1294896156, 0.2668581009, 0.1436258107, 0.0591250993, -0.1650304049, -0.2733375132, -0.194634676, 0.1724720448, -0.2729213536, -0.1535345167, 0.2773350179, 0.2721075416, 0.1305440515, 0.1499996483, -0.0093121752, 0.0358891562, -0.3253677785, 0.0026429251, -0.0561355166, -0.0674718022, -0.0896209329, 0.0504176542, 0.0495832488, -0.3257538378, -0.0444528237, 0.332870096, 0.2143800855, -0.0634537116, -0.1007061377, 0.1711913496, -0.3458361924, 0.0560584068, 0.3358948827, -0.0251433235, 0.4243965745, -0.1699173898, -0.1809006184, -0.0374359861, 0.1033856496, 0.231121853, -0.3712256253, -0.0264384337, -0.007929109, -0.4698672593, -0.0746536553, 0.1806063354, -0.0982646942, -0.0830182955, 0.202178672, 0.2307328433, -0.0614760295, 0.449937731, -0.1099565253, 0.0509467497, -0.1047707349, 0.1902830154, 0.4379961193, -0.1938695163, 0.2532497048, 0.0169407669, 0.0171229225, -0.1588536501, 0.0500548705, 0.5058929324, -0.0729455277, -0.0720378831, -0.2528296113, -0.1984862238, -0.0053444137, 0.244203642, 0.2831347287, -0.0258464906, 0.1003977805, -0.3302685022, -0.4769796729, 0.2921724319, 0.1310622096, 0.4174724817, -0.2587912381, 0.2389147878, -0.0494061336, 0.0539343283, -0.378236711, 0.017713014, -0.1212550402, 0.0698164627, 0.0807665065, -0.0584797114, 0.2591820061, -0.3779757619, 0.1792133451, -0.0013166687, -0.1657773852, -0.2515691817, -0.1176220998, 0.0890248045, 0.1660424471, -0.1049300283, 0.2745770514, -0.0240847189, -0.0576295964, -0.0724285394, 0.0604633428, -0.1173610464, 0.0302804001, 0.3011862338, 0.0174229983, 0.1451926827, -0.0611409619, 0.1379965246, 0.1187239885, 0.2595631778, 0.1873347014, -0.2682831585, 0.0385159887, -0.229455933, -0.2966989875, 0.0164700057, -0.048753757, 0.1081340909, 0.2654644549, -0.0660139471, 0.1556815952, 0.1725359857, 0.3515241146, 0.3776393831, -0.1848826855, 0.1109502316, 0.0053145019, 0.3281938732, -0.2923993766, -0.0011996602, 0.0496313572, 0.3295216858, -0.078883104, 0.089839451, 0.1686358452, -0.0530001298, -0.1599925309, 0.1708454192, 0.2100813836, -0.0832964405, 0.1048953831, 0.2073545903, -0.2455841154, -0.0101328194, 0.1504189968, -0.0316481665, -0.0314688571, 0.2588605285, 0.0131109906, 0.5113002658, 0.1838928908, 0.1635545343, 0.017018266, -0.000141447, -0.0695837662, 0.3481968939, 0.1504068226, 0.1592494845, -0.026223911, 0.5760987997, -0.2066615224, -0.0005730516, -0.3108674884, -0.0289761554, 0.096247457, 0.1491609514, -0.2483234406, -0.1039679796, 0.048124481, -0.1860792935, -0.1290516704, -0.2516667247, 0.1477456242, -0.0205546282, -0.3541607857, -0.8141180873, -0.1085594371, 0.151753813, 0.276369065, -0.0995305777, 0.1424705237, 0.5436643958, -0.0344087854, 0.0800302699, 0.5004680157, 0.1134974286, 0.197387144, 0.0002370215, 0.0506471582, 0.2266127318, -0.0268161818, 0.1014482155, 0.1067323536, 0.0004926932, -0.150410369, 0.297478199, 0.1995946616, -0.1207931042, -0.1327407658, 0.0375786349, 0.0263078399, -0.1072418913, 0.0461629517, 0.0525137596, -0.154801324, -0.0805145353, -0.2089971155, -0.3566538692, -0.0255053714, -0.0997857079, 0.2013783902, 0.1901115924, 0.0169144589, 0.1408593506, -0.3599379957, 0.3116769195, 0.03826176, -0.1093352512, -0.2739180923, -0.1286857575, -0.6168878078, 0.0133418292, -0.084992677, -0.5377328992, 0.1699635237, 0.3220705986, 0.1508050114, 0.0472333767, 0.0081665358, -0.4305222929, -0.1222293824, 0.2721709907, -0.597617507, 0.0793446302, -0.2225140929, 0.1740791053, 0.0195114315, 0.2972216606, 0.2198364437, 0.2128148228, 0.0154559119, 0.1554939002, 0.1872500181, 0.1560055315, 0.2486760765, 0.0088378033, -0.0409699455, 0.4796516001, 0.1974694878, 0.3138943911, -0.3052360117, -0.1834243685, -0.192308411, 0.2781382501, 0.2050177306, 0.0816334933, -0.0333200991, 0.0215791836, 0.0972589701, 0.3132696748, 0.0403322615, -0.4563272893, -0.4822051227, -0.0240228809, 0.0480608083, 0.0503490232, 0.276417166, 0.5173119307, -0.0225044955, 0.0461859293, -0.2039902806, -0.3806152642, 0.4077628553, -0.1462410688, 0.1850557625, -0.0652314574, 0.259922713, 0.4546601474, -0.0201598536, -0.3533844352, -0.0126579264, 0.4080741107, -0.2572015822, -0.1338899583, 0.2706456482, 0.3691135645, -0.1420965195, -0.0221816152, -0.0474337563, -0.0362768956, 0.056528043, 0.1706420928, -0.0557023399 ]
https://github.com/huggingface/datasets/issues/672
Questions about XSUM
@lhoestq @sshleifer like @jbragg said earlier, the main issue for us is that the current XSUM dataset (in your package) does not have IDs suggested by the original dataset ([here is the file](https://raw.githubusercontent.com/EdinburghNLP/XSum/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json).) Would appreciate if you update the XSUM dataset to include the instance IDs. The missing instances is also a problem, but likely not worth pursuing given its relatively small scale.
Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg
63
Questions about XSUM Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg @lhoestq @sshleifer like @jbragg said earlier, the main issue for us is that the current XSUM dataset (in your package) does not have IDs suggested by the original dataset ([here is the file](https://raw.githubusercontent.com/EdinburghNLP/XSum/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json).) Would appreciate if you update the XSUM dataset to include the instance IDs. The missing instances is also a problem, but likely not worth pursuing given its relatively small scale.
[ -0.1664320827, -0.3865370452, -0.1475522071, 0.4103154838, 0.3375099301, -0.0053341058, 0.1342152804, 0.0427216701, 0.2139724493, 0.290692389, -0.2072105855, 0.3043750226, 0.0520258397, 0.3954084814, 0.110866949, 0.1289569736, -0.0369180366, -0.0796163753, -0.3687427342, -0.278110981, 0.0103581818, 0.0866705105, -0.0639786273, -0.1064026058, -0.6257084608, -0.0011953154, -0.0703787282, 0.2886463106, -0.1242312491, -0.2318080813, 0.267405957, 0.0330968574, 0.0323781781, 0.5344514847, -0.0001019957, 0.0556661636, 0.171778664, -0.0185712744, -0.1103477404, 0.2229580283, -0.1202736571, -0.0083080223, -0.021420436, -0.3645848334, -0.1546658427, 0.0537903681, -0.1565699726, -0.3595401943, 0.2612187564, 0.0356132388, 0.2618618906, 0.1737308651, 0.1423489153, -0.1017599702, -0.0694580376, -0.2182798088, 0.0572396368, 0.2420997769, 0.3895657063, 0.2819085419, 0.0757031813, 0.1821228713, 0.075041905, -0.1728700101, 0.2609303296, 0.0817815363, 0.3629449308, -0.1643871069, -0.3031725883, 0.2791018784, 0.778316319, -0.049619779, -0.2809360027, 0.0017531215, 0.0423493125, -0.180580005, 0.158373028, -0.0204361062, 0.3124707937, 0.0166945662, -0.1730662435, 0.3848588169, -0.2288933396, 0.0324794203, -0.143560186, -0.044080317, -0.0700867251, -0.0146877253, -0.1825107783, -0.0477215014, 0.0089456365, 0.0036322465, 0.1416556984, 0.1554020643, -0.3144336939, -0.1411519051, 0.0203162134, -0.0635996163, 0.1922925413, 0.125543192, 0.2808846831, 0.1205656305, -0.3568880856, 0.0459335037, 0.1722763181, 0.2889681458, 0.3624550402, -0.5636853576, 0.0376867987, -0.0363249592, -0.074879244, 0.092070967, -0.3312950134, -0.0388789251, -0.0027432165, 0.0162024777, -0.1309364587, -0.3646146357, -0.3093114495, 0.239858076, 0.0613964126, -0.0323375203, 0.136377722, -0.0783260986, 0.0352190472, 0.3873425722, 0.0540403649, 0.0547508448, -0.5485547781, -0.2514091134, -0.3607020378, 0.1081755385, -0.0969992951, -0.0304281991, 0.091769658, -0.0993936062, 0.3530324996, -0.0829656422, 0.2678604424, -0.0113609293, 0.0562428348, 0.1415772587, -0.3755876124, 0.1932749748, 0.0244415216, -0.0080439216, -0.0267245788, 0.0531738438, -0.0133818081, -0.0639153346, -0.2145489454, -0.2001979798, -0.0062236218, 0.3539360166, -0.3119357228, -0.2647693753, -0.1378630102, -0.0376397781, 0.1369856, 0.1669011116, -0.2109553069, -0.1167254895, 0.0583697893, -0.1073395908, 0.1650801599, -0.0286728796, -0.5455511212, 0.0090005593, -0.0160474963, -0.2775518596, 0.0649722144, -0.0520805195, -0.013139708, 0.242410332, 0.1349171549, 0.1709460169, -0.4772085249, -0.5170895457, -0.1987744868, -0.2960908413, -0.2253488451, -0.1023814976, 0.115372695, 0.0857766271, -0.0046228701, -0.0884748027, 0.187254861, 0.0400169753, 0.1452699006, -0.1639280915, -0.4526291192, -0.0969946012, -0.0505807362, 0.2002421916, -0.0409608819, -0.3017988205, -0.1011527926, 0.3752577901, 0.1631083786, -0.0287365913, -0.0725139901, 0.1020362005, 0.3146268725, -0.1599341631, 0.0529155508, -0.2208847404, 0.0057635917, 0.2957918048, 0.0420862399, 0.2648531795, 0.6834334135, -0.0381436348, -0.3916223645, -0.2167741507, -0.0180664938, -0.1970997751, 0.2453011125, -0.1623889655, -0.0210767686, -0.1782016754, -0.1712000072, 0.1778254956, -0.5446187854, 0.0424661934, -0.4682895839, 0.3180691004, -0.0250312388, -0.0367774554, 0.0903848112, 0.267564714, -0.0208951402, -0.2781309187, -0.024045879, 0.5908071995, 0.1188964322, -0.0138600571, 0.1396991313, 0.1338035911, 0.3510759771, -0.1848496795, 0.1054528579, -0.212326616, -0.0840019211, -0.1372521669, -0.3525789976, 0.2411814332, -0.1131721213, -0.0369873978, -0.051810734, 0.0354193971, 0.0609064586, -0.1979055554, 0.0302653536, -0.0250804406, 0.1439372152, 0.1197232455, -0.2250250876, 0.0177499857, 0.0416907482, 0.3525956869, -0.2550524771, -0.1235863343, -0.1564977914, -0.3450437188, -0.1798162907, 0.1364570707, 0.1099743322, 0.0011711246, 0.4829594493, 0.3248572052, 0.0352757461, -0.0094199609, -0.1424569041, -0.1150500476, 0.0122486008, -0.0189622231, -0.0676122978, -0.0167821534, -0.0689264238, 0.0121766208, -0.1636829823, 0.0999634936, 0.1242446601, 0.1916475296, -0.3735172153, -0.3346711099, -0.2764018178, -0.0854920447, 0.1280034482, 0.1754531115, 0.1941688806, -0.2772438824, 0.1896550506, 0.0737728551, -0.0582992397, 0.0637772381, -0.3311453462, 0.2439832985, 0.062469691, 0.0461515486, 0.0960208476, -0.1329866797, -0.1988456845, 0.2283079922, 0.0257771015, 0.3428411782, 0.3706848621, -0.0861970559, -0.0631763265, 0.0952487662, -0.4376235306, 0.0577854961, -0.1971285641, 0.2600507438, -0.1256955266, 0.0024522662, 0.10206981, -0.058481086, 0.2918133438, -0.1022218093, -0.2722830176, -0.0577915162, 0.1697316915, -0.2628476918, -0.1111091599, -0.6046501398, -0.0556149967, -0.1341214776, -0.1060397029, 0.4435880482, 0.1438320875, 0.0852440223, -0.055611439, 0.2129313499, 0.2396075577, -0.1701510549, -0.3796665668, -0.730668962, 0.2577498853, -0.1202304363, -0.5162162781, 0.0051536723, 0.0044582617, 0.378773421, 0.1294917464, -0.3869506717, -0.3610761166, 0.0458291508, -0.0663787127, 0.4467764497, 0.1637559533, 0.2984251976, -0.1350426376, -0.2306150496, -0.2731473446, -0.0580932237, 0.261922121, 0.2238493413, 0.4402633309, -0.3096805513, -0.2505702674, -0.1828400791, 0.0408148803, 0.1465579718, -0.167984277, 0.0533488542, -0.0699994788, -0.0172504801, 0.0149595132, -0.1258848161, 0.5826583505, -0.0808415264, -0.0290866047, 0.1526951045, 0.1758558005, 0.194248125, -0.0500302427, 0.0634543151, -0.1752150357, -0.1591150463, -0.2025383711, -0.0330816396, 0.0478352606, -0.0329141021, -0.0225090589, -0.0822559819, -0.0675198361, -0.0543326735, -0.014601008, 0.0958461314, -0.0414926521, -0.9815754294, 0.2990346551, 0.0618139803, 0.3727128506, -0.271043241, 0.0291365553, -0.0083191972, -0.1483341157, 0.1056240723, 0.1202370822, 0.1292060614, -0.2489224821, -0.1767418832, 0.3190034032, -0.0830743015, -0.301625818, -0.0921344757, -0.1500036567, 0.0891540647, 0.2397743165, 0.0828034878, -0.3069484532, -0.0860882103, 0.2430821806, 0.1935516149, -0.2661919892, -0.1325030029, -0.131456688, -0.0764249116, -0.0045663128, -0.1026515067, -0.1512291729, 0.2996349037, -0.2088683397, -0.1363312453, -0.1865471005, -0.1697448045, 0.5243930817, 0.0616226755, 0.438652426, -0.0094691748, 0.3387268186, 0.3222386539, 0.1136417612, 0.2265522182, 0.4560768902, -0.1674666256, 0.2600370944, 0.1371494383, -0.3577574193, 0.3021460474, 0.1612362713, 0.0334420279, -0.4339480102, -0.2414715439, 0.0657945499, -0.18725501, 0.2881974876, 0.1533886641, 0.1901845187, -0.0713487044, -0.2333771139, 0.5094255805, 0.1026640087, -0.0210987013, 0.39918378, 0.334364295, -0.1494822204, -0.1722919494, 0.5163657665, 0.8613099456, 0.0960144997, -0.1809176505, 0.2801845968, 0.3966983259, 0.3063431084, -0.4772426188, 0.0945080593, -0.1617206484, -0.3101738393, 0.0645947009, -0.0380322523, 0.1542024463, 0.2285584062, 0.0645369962, 0.0379700474, -0.1021008715, -0.2273488492, -0.1729260981, 0.2186796516, -0.250202477, -0.1699632853, 0.25279966, 0.3129732907, 0.0823612884, 0.1384132504, -0.0397848487, -0.0000196193, -0.2951776683, -0.0319175497, -0.0516386777, -0.002218049, -0.0219540931, 0.0386339985, 0.0431753136, -0.3069759607, -0.0473717377, 0.2716630697, 0.2296621352, 0.0116522154, -0.1372307688, 0.1732469052, -0.3802208006, 0.0350507013, 0.3145691156, -0.0146712279, 0.4454981089, -0.2222692072, -0.2039477378, -0.0054137264, 0.1337213367, 0.1284478754, -0.3104579449, -0.0512508899, 0.0256211013, -0.4915601313, -0.054077737, 0.2348547727, -0.0531950593, -0.1147260442, 0.2400818914, 0.1850807667, -0.1270148903, 0.422976613, -0.0621419139, 0.0092253657, -0.0947503597, 0.2264068723, 0.4063760936, -0.1673385501, 0.2598180175, -0.06425111, 0.0166765582, -0.2114752829, -0.0516391322, 0.500936985, -0.1143606231, -0.0955844298, -0.2136883289, -0.2379796356, 0.0407908633, 0.2407120913, 0.2750688493, 0.0099792406, 0.0775905475, -0.3289134204, -0.4556132555, 0.2503008544, 0.1304806024, 0.4150584042, -0.2764042318, 0.3125866055, -0.0520961247, 0.0643853098, -0.4254910946, -0.0106896991, -0.1455169469, 0.0274055302, 0.1003265604, -0.084194757, 0.278396666, -0.3419241607, 0.2316701412, 0.0478707924, -0.1745816022, -0.2762836814, -0.1365553737, 0.0704332516, 0.1491743624, -0.0776642933, 0.2476331443, -0.0257333424, -0.0924857408, -0.0506548509, 0.0938662961, -0.139367193, 0.0368535779, 0.29819116, 0.0663710311, 0.1586546451, -0.0354911797, 0.0781943202, 0.1130145937, 0.2729157805, 0.1305638403, -0.2734085023, 0.0325727724, -0.212026298, -0.3130914867, 0.0232550241, -0.0222610421, 0.1726323515, 0.2782166302, -0.122295253, 0.1062287316, 0.1534733474, 0.354139924, 0.3513803482, -0.1526020467, 0.0475027338, 0.0252230559, 0.3683804274, -0.3287712038, -0.0222938042, 0.0255029425, 0.2614388764, -0.0551192574, 0.0587953627, 0.1816556603, -0.0232636929, -0.0433845893, 0.2002996355, 0.2268704623, -0.100538753, 0.0965425, 0.2139597386, -0.2077323049, -0.0051935841, 0.1913172305, -0.0972518027, -0.0754691884, 0.2856113017, 0.0165810063, 0.5100926161, 0.1186037064, 0.1476451606, -0.0365235023, 0.032065779, -0.0653873682, 0.348210156, 0.1848556846, 0.1558436155, -0.0111769401, 0.5806466341, -0.2293239236, -0.0498245843, -0.3147738874, 0.0028495458, 0.043912828, 0.1555721909, -0.241877079, -0.0944522694, 0.0503271371, -0.1549910605, -0.1050305739, -0.1727744639, 0.1736909896, -0.0314559191, -0.3885216117, -0.7518591285, -0.149035126, 0.1357878, 0.2569055259, -0.0935983583, 0.2078542262, 0.5303715467, -0.0068031503, 0.0690200031, 0.4900555015, 0.1336440742, 0.1916837543, 0.042159725, 0.014690578, 0.1988671124, -0.028066488, 0.0569914654, 0.1483778954, 0.0388246737, -0.1054348201, 0.2769367099, 0.246049732, -0.1808098108, -0.0960544199, 0.0311531499, 0.0110997735, -0.0720743313, 0.1268102974, 0.1246972978, -0.118827939, -0.1453618407, -0.1919303536, -0.3672337234, 0.0163551625, -0.1210338548, 0.1684664935, 0.1589729786, -0.040636003, 0.1584185213, -0.2721067369, 0.3382394314, 0.0010285863, -0.1129211858, -0.2934086919, -0.1318314075, -0.6782487631, 0.0744255707, -0.0800591037, -0.5033020973, 0.1502723396, 0.2766646743, 0.1483569294, 0.073567085, 0.0705633163, -0.4583144188, -0.1197027341, 0.2027542442, -0.6247525811, 0.0986146778, -0.159192875, 0.1226183325, 0.0265944395, 0.1965225935, 0.1745741814, 0.2322181314, 0.0766951144, 0.1357709616, 0.1327914596, 0.0952914208, 0.1927197129, 0.0488427468, -0.0298955981, 0.4581677914, 0.139188692, 0.2371514142, -0.3483581543, -0.1973426938, -0.2617530227, 0.2313993573, 0.2493050843, 0.1476468444, 0.0219679754, 0.0007608302, -0.0060907016, 0.3671993017, 0.0588131174, -0.4401394129, -0.4696764052, 0.0203338861, 0.0525896288, 0.0278286077, 0.2831588984, 0.5465502143, 0.010519159, 0.086393185, -0.3044320941, -0.3901851773, 0.4265871346, -0.1244325638, 0.1285263896, -0.0073514711, 0.2603490055, 0.4360621572, -0.0897240415, -0.3726534843, 0.0235142168, 0.3749046028, -0.1784072518, -0.1523081958, 0.3035390377, 0.3506135345, -0.1332811713, 0.0069049583, -0.0433247872, 0.0085624633, 0.0376282968, 0.1732896119, -0.0825776756 ]
https://github.com/huggingface/datasets/issues/672
Questions about XSUM
>So I managed to download them all but when parsing only 226,181/226,711 worked. @lhoestq any chance we could update the HF-hosted dataset with the IDs in your new version? Happy to help if there's something I can do.
Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg
38
Questions about XSUM Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg >So I managed to download them all but when parsing only 226,181/226,711 worked. @lhoestq any chance we could update the HF-hosted dataset with the IDs in your new version? Happy to help if there's something I can do.
[ -0.1108687446, -0.2911380529, -0.1378348768, 0.4550744891, 0.2817801535, 0.0728298053, 0.0544090122, 0.0913589597, 0.2821642458, 0.2655706406, -0.4389285147, 0.0682013407, 0.2014297843, 0.3437100053, 0.0978379771, 0.0983608738, 0.0280663017, -0.0688480064, -0.39984712, -0.3520360589, -0.0486404039, 0.0790458098, -0.0701804236, -0.1254000515, -0.6150899529, -0.0004532128, -0.252283603, 0.3219082654, -0.0684699714, -0.2613792717, 0.2724300623, 0.1768981516, 0.1588338464, 0.5855625868, -0.0001079536, -0.0021305881, 0.0701950863, -0.0362243205, -0.2027474046, 0.2457124293, -0.1254193187, -0.0502533019, -0.1046411768, -0.3473928273, -0.0412899181, -0.0858427659, -0.1789297611, -0.2968727946, 0.2022092789, 0.0117185209, 0.1903333068, 0.1982565671, 0.1489179879, -0.0657884628, 0.0004690879, -0.0772711486, 0.1758521795, 0.2949227691, 0.3840343952, 0.2338935882, 0.0522159413, 0.203696996, 0.0793882981, -0.1030988246, 0.2630741894, 0.0071054506, 0.2479680032, -0.1099334806, -0.2626762092, 0.3442574441, 0.7662883997, -0.0087370938, -0.3143165112, -0.0585712679, -0.0513017811, -0.1753986329, 0.182364136, 0.0166406985, 0.3686720133, -0.0167589169, -0.1219326705, 0.2837218344, -0.2416824549, 0.0839617029, -0.1171377972, -0.0086125154, -0.0405669324, 0.0076601687, -0.2974538505, -0.0240413714, 0.1238146722, -0.1366883665, 0.1175003573, 0.1794933677, -0.319786638, -0.0899892673, -0.0294947866, -0.0761650503, 0.2779524028, 0.0087844329, 0.1777740866, 0.1494704634, -0.4885766208, -0.0050448054, 0.2457177788, 0.1824132949, 0.4060855806, -0.5367920995, 0.0424552187, 0.0243293643, -0.0892693847, 0.0768096745, -0.3691338301, 0.0522823557, -0.1361780614, 0.0634150803, -0.2079422325, -0.4489312768, -0.2432709634, 0.2925204635, 0.0687271431, -0.1113881618, 0.1092169657, -0.0368535668, 0.0220869165, 0.4510502815, 0.0275413655, 0.0607272647, -0.5903295279, -0.4203081727, -0.3149057925, 0.1223100424, 0.0103719048, -0.0122707002, 0.066329062, -0.1219096631, 0.3088375628, -0.1253538281, 0.3376321495, -0.0142568331, -0.0368473269, 0.0412789099, -0.3466892838, 0.2455324084, 0.0649796054, 0.0139359897, -0.0470762178, 0.0491433069, -0.0200304128, -0.0273540504, -0.2576952577, -0.1876060367, -0.0546093807, 0.2807950974, -0.2417282015, -0.2601537108, -0.2303067595, 0.0229587108, 0.0973039046, 0.1958484799, -0.230762288, -0.1498785317, 0.1026846319, -0.0829288065, 0.1686293185, 0.0426318385, -0.6364936829, 0.0590566434, 0.0792020261, -0.2454478592, 0.0443412848, 0.0417249091, -0.0496390499, 0.229372263, 0.0753990784, 0.1855360717, -0.5582083464, -0.5333786607, -0.1740591228, -0.3230131865, -0.0884201676, -0.0928151235, 0.0452461839, 0.0335599743, 0.0858177692, -0.1337659508, 0.0952778757, 0.0028811416, 0.1338363439, -0.225970462, -0.4646395147, -0.0772184357, -0.1532884985, 0.2203846723, 0.064057976, -0.260900259, -0.0373653322, 0.4446004033, 0.3015836179, -0.0276406165, -0.0262199845, 0.1332652718, 0.2527402341, -0.0071261157, 0.1067679152, -0.1595184356, -0.0529887602, 0.2997509241, 0.0269465651, 0.1723459959, 0.7534603477, -0.0607869104, -0.411950618, -0.2014401406, 0.0471294895, -0.1689956039, 0.1534009874, -0.1586528271, -0.052526854, -0.2474774122, -0.1893188953, 0.295280844, -0.5699023604, 0.0937048122, -0.4114118516, 0.4359883964, 0.031588804, 0.0111056631, 0.1427347511, 0.2196140438, 0.0349663906, -0.3012126386, -0.1030708328, 0.5682688951, 0.0972988456, -0.0176484715, 0.2086600214, 0.1073382571, 0.4287081957, -0.149413377, 0.2242483795, -0.2733377516, -0.034047775, -0.1739273369, -0.3439348936, 0.2497535348, -0.0589425564, 0.0061064283, -0.06931144, -0.025198767, -0.0190035943, -0.1324998289, 0.1328187436, -0.0106652044, 0.1425019354, 0.139212504, -0.2239282876, -0.0485860631, -0.0573377497, 0.4266648591, -0.2708814442, -0.1722156405, -0.2802177072, -0.2724072635, -0.2439088672, 0.140364185, 0.1972509027, -0.1188448817, 0.3779394329, 0.2638702989, 0.0522032753, 0.0659704432, -0.0586500689, -0.1196560934, -0.0230519157, 0.0211807117, -0.0362943262, -0.0213887487, -0.0011305923, 0.038212873, -0.2089093924, 0.0571319871, 0.1290063113, 0.1677093357, -0.4405561984, -0.3460098207, -0.2939579189, -0.1069727018, 0.2392282933, 0.2096288204, 0.0524935573, -0.3409096599, 0.1800815165, 0.1349405944, -0.0414220802, -0.0222296976, -0.4305756092, 0.2545244992, -0.0061297356, 0.0610920042, 0.0682208389, -0.08656618, -0.2389594764, 0.162675783, 0.0419396609, 0.3007408679, 0.3395788074, -0.0517321341, -0.083390139, 0.033234518, -0.3909248114, 0.0608563721, -0.1610300094, 0.229268536, -0.1898725629, 0.0489439033, 0.0256059784, 0.0482384488, 0.2835532427, -0.0057839891, -0.1941836923, -0.0817638189, 0.1162675768, -0.1925489306, 0.0099137593, -0.5236012936, -0.1250428557, -0.1238110438, -0.1371331215, 0.411853224, 0.2634224892, 0.0554479547, -0.1676878333, 0.1139133498, 0.150420934, -0.3045864701, -0.3980053663, -0.8720006943, 0.3317908645, -0.1492509246, -0.5336843729, 0.0280000158, -0.0066597797, 0.3115900755, 0.0910401344, -0.4845394492, -0.3018910885, 0.0788629651, -0.0095078861, 0.4274983108, 0.1915902048, 0.1494913101, -0.244628489, -0.1636425555, -0.2711958885, -0.0776798427, 0.2578826845, 0.3769550323, 0.4586262405, -0.234127, -0.269828707, -0.1781572849, 0.142458722, 0.1821482033, -0.0459703729, 0.1569337547, 0.0226602517, -0.0574576817, -0.0008396208, -0.1019756645, 0.6396289468, -0.1003962457, 0.0041128006, 0.1743920445, 0.1856538355, 0.291965872, -0.0159219261, -0.0278749578, -0.2039083093, -0.1663276702, -0.1827445775, -0.0467879549, 0.0416119285, 0.0592497326, -0.0809399039, -0.1593843102, -0.1267842203, 0.0207483936, -0.0255056098, 0.1540533155, 0.0580775887, -0.9112796783, 0.3003272116, 0.0890225694, 0.5070568323, -0.3329074681, 0.0954497382, 0.0104671819, -0.0329252407, 0.1351577193, 0.1240376905, 0.165802896, -0.2133813202, -0.1904778481, 0.3586418331, -0.1311806291, -0.2136929333, -0.1286638379, -0.144305408, -0.0218651202, 0.1743834168, 0.0759188607, -0.3373079002, -0.1821484864, 0.2263558954, 0.182408914, -0.3305496275, -0.1166628897, 0.0041447962, -0.1211458296, 0.0137828039, -0.1486118138, -0.1618930399, 0.282369107, -0.1857761592, -0.0846295059, -0.1780437827, -0.0911256149, 0.5624822378, 0.0079934178, 0.3686126471, 0.1240237802, 0.3375980556, 0.350835681, 0.1489099562, 0.3623152673, 0.541423738, -0.1191595197, 0.2617900074, 0.1720622629, -0.3114443421, 0.3362178802, 0.2280522734, 0.104574196, -0.41909042, -0.1923220903, 0.1610761583, -0.2195260227, 0.2987405658, 0.0780678093, 0.1364774406, -0.1735474616, -0.2240863591, 0.5829630494, 0.1190797836, 0.0010875013, 0.3726540506, 0.4998397827, -0.0982335359, -0.1306686103, 0.5110324025, 0.8817676902, 0.0613003224, -0.2270233333, 0.2880906761, 0.2239577621, 0.2927207947, -0.6754896641, 0.0215901118, -0.199511975, -0.3058545589, -0.0150679024, -0.035409268, 0.2169418484, 0.2565378547, 0.2613108456, 0.1693216562, -0.137396574, -0.2695969045, -0.1536490172, 0.2181300372, -0.3133372366, -0.1865031123, 0.2252572924, 0.2843098938, 0.0592006147, 0.2716246247, -0.0343551375, 0.0325584933, -0.3010590374, -0.0350144133, -0.0757527649, -0.048868414, -0.0545130335, -0.0395404026, 0.0539733395, -0.2819886804, -0.000939203, 0.1233885512, 0.2557565272, -0.0555338413, -0.0932700187, 0.1878999323, -0.3696556985, 0.0409897156, 0.29190889, 0.010539812, 0.417527914, -0.2100786716, -0.2193886638, -0.0190251824, 0.0579994395, 0.1530616581, -0.3923739791, -0.0931578353, -0.0376601256, -0.4144991338, 0.0088058878, 0.182711646, -0.0068091266, -0.113668859, 0.1709910035, 0.1509604007, -0.0611261427, 0.4131098986, -0.0612228997, 0.0377646349, -0.1916013062, 0.2504792511, 0.4290552437, -0.1598007083, 0.3576132357, 0.0856817961, -0.0061300802, -0.1509613395, -0.0412525125, 0.511054635, -0.0978396907, -0.1124760136, -0.2973005176, -0.2116980404, -0.0785574019, 0.2177188098, 0.3156518936, -0.1096271798, 0.1273468137, -0.3649719954, -0.4957454801, 0.3224774897, 0.0346126333, 0.3332665861, -0.2135459185, 0.3155976534, -0.0896364674, 0.0993163437, -0.3504062593, 0.0299434699, -0.0594398715, 0.0497793108, -0.0519681647, 0.0121134855, 0.2587278485, -0.3422489762, 0.1581290811, -0.0003126756, -0.200673148, -0.2028681934, -0.1906136423, 0.1195232496, 0.1737851351, -0.0475798659, 0.2446399629, -0.084999539, -0.074936673, -0.0495310277, 0.089578867, -0.0978588015, 0.0650573075, 0.3306814432, 0.1396197379, 0.0582728721, -0.0491176508, 0.2019159347, 0.3131590188, 0.3580683768, 0.0482148081, -0.2427487075, -0.0168035328, -0.225228548, -0.368182838, 0.0697310716, -0.0707810223, 0.0378901251, 0.3394380212, -0.088316977, 0.2087966651, 0.1925111562, 0.3460716307, 0.4225374758, -0.0929505974, 0.0592904091, 0.0492133945, 0.2705640495, -0.3063867688, 0.0095024146, 0.0382752344, 0.3211840093, -0.1325516254, 0.0830758959, 0.3004556, -0.0230056364, -0.0921785161, 0.1748434007, 0.2036074251, -0.0020417813, 0.051360447, 0.2435946167, -0.1754586399, 0.057929121, 0.1570552737, -0.0379497707, -0.083326593, 0.228458032, 0.033720497, 0.4363600016, 0.2827655375, 0.161890313, -0.0215221234, -0.1516976655, -0.1129185185, 0.3693396449, 0.2641837001, 0.1251040846, -0.0507915094, 0.5699240565, -0.126684159, -0.17552194, -0.280910641, 0.0863990486, 0.1022397652, 0.1649276018, -0.2020112276, -0.1113703921, -0.0892660096, -0.1540822536, -0.1447120458, -0.3010968566, 0.2157070637, -0.0265371744, -0.3665006459, -0.9039995074, -0.1263139844, 0.1512477696, 0.2594665289, -0.0811887905, 0.212418437, 0.5510979295, -0.0092027131, 0.1270493269, 0.5412904024, 0.0754255727, 0.1766182929, -0.0222539026, -0.0107162613, 0.2173733115, 0.0039795293, 0.2070178986, 0.0969842225, -0.0436600223, -0.1632844657, 0.3286494613, 0.1683014333, -0.08720842, -0.1600660235, 0.0027586599, 0.0158847533, -0.0849430114, 0.1660188735, 0.0624355674, -0.0548018254, -0.0661267489, -0.3546638191, -0.3029307723, -0.0409936272, -0.0520970598, 0.1444078684, 0.2146544307, 0.0307001658, 0.1190431342, -0.4020768106, 0.2650515139, 0.112296626, -0.1587994397, -0.3119351566, -0.1485044211, -0.605278194, -0.0056089242, -0.1523032039, -0.5811649561, 0.2310090959, 0.2647855878, 0.2139344513, -0.0295128487, 0.1296831667, -0.5206018686, -0.0689321458, 0.30806005, -0.6280506253, 0.1261767447, -0.2924520969, 0.2437843978, -0.0257225111, 0.2229898721, 0.3024653196, 0.3627901375, -0.0518987514, 0.1664221287, 0.1808858067, 0.2209709287, 0.0157558285, 0.0665929019, -0.0450078398, 0.4081070423, 0.1880105585, 0.2256183475, -0.3655067384, -0.2210376561, -0.2046411484, 0.2702040672, 0.104010433, 0.1995002031, 0.0319411345, -0.0354035236, 0.0717182681, 0.3342590332, -0.0194073934, -0.3952453136, -0.5124579072, 0.100085184, -0.0262606535, 0.0636976883, 0.3593019545, 0.5226395726, 0.065719232, 0.1233021468, -0.3297066092, -0.3902287185, 0.4470279813, -0.099378489, 0.0889888331, -0.0112837097, 0.2847457528, 0.4946368933, -0.1168804392, -0.3762239814, 0.011623797, 0.4244051576, -0.2406955063, -0.1203697026, 0.2497927547, 0.3464860916, -0.1600553244, -0.0128241098, 0.0151669597, -0.012552456, -0.0326250084, 0.1349398941, 0.024730118 ]
https://github.com/huggingface/datasets/issues/672
Questions about XSUM
Well I couldn't parse what I downloaded. Unfortunately I think I won't be able to take a look at it this week. I can try to send you what I got if you want to give it a shot @jbragg Otherwise feel free to re-run the xsum download script, maybe you'll be luckier than me
Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg
55
Questions about XSUM Hi there ✋ I'm looking into your `xsum` dataset and I have several questions on that. So here is how I loaded the data: ``` >>> data = datasets.load_dataset('xsum', version='1.0.1') >>> data['train'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 204017) >>> data['test'] Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, num_rows: 11333) ``` The first issue is, the instance counts don’t match what I see on [the dataset's website](https://github.com/EdinburghNLP/XSum/tree/master/XSum-Dataset#what-builds-the-xsum-dataset) (11,333 vs 11,334 for test set; 204,017 vs 204,045 for training set) ``` … training (90%, 204,045), validation (5%, 11,332), and test (5%, 11,334) set. ``` Any thoughts why? Perhaps @mariamabarham could help here, since she recently had a PR on this dataaset https://github.com/huggingface/datasets/pull/289 (reviewed by @patrickvonplaten) Another issue is that the instances don't seem to have IDs. The original datasets provides IDs for the instances: https://github.com/EdinburghNLP/XSum/blob/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json but to be able to use them, the dataset sizes need to match. CC @jbragg Well I couldn't parse what I downloaded. Unfortunately I think I won't be able to take a look at it this week. I can try to send you what I got if you want to give it a shot @jbragg Otherwise feel free to re-run the xsum download script, maybe you'll be luckier than me
[ -0.0726335645, -0.4036209881, -0.1623656303, 0.5180847049, 0.3325615823, 0.0285639632, 0.1227810383, -0.0330050103, 0.2053791583, 0.2613715231, -0.2468281239, 0.2338204086, 0.0877350271, 0.4263717532, 0.1107674986, 0.0942092165, -0.0165949259, -0.1213089749, -0.3660369217, -0.309211731, -0.0072384947, 0.0955580994, -0.0635271072, -0.1014963686, -0.6309726834, -0.0100495191, -0.1623433381, 0.2903316021, -0.1275836676, -0.2089566588, 0.2380589843, 0.0156025952, 0.0412374549, 0.5506979823, -0.0001053002, -0.0060283318, 0.1273684353, -0.0236889403, -0.0839769468, 0.256491363, -0.1792496592, -0.0246550143, 0.0088918153, -0.4071148336, -0.0485543013, 0.027806269, -0.1476608962, -0.3758970499, 0.2245386839, 0.0081968568, 0.2218517512, 0.1583905369, 0.1022253931, -0.0368439741, -0.0639062226, -0.1222759336, 0.1160333678, 0.2276520431, 0.4027493, 0.3057996929, 0.072945632, 0.1370127201, 0.0607238449, -0.1835124642, 0.2962156534, 0.0647668168, 0.3481563032, -0.242754072, -0.3049996495, 0.3073095083, 0.8674845099, -0.0344169475, -0.2513760626, -0.0144357169, -0.016768543, -0.1252636611, 0.165230304, 0.0843342692, 0.3414099216, -0.0318599641, -0.2515140176, 0.418639034, -0.2792620063, 0.0277598388, -0.18175973, -0.0714390129, -0.0967196003, 0.0065124664, -0.2285341173, -0.0505386144, 0.0692123026, -0.1019141003, 0.1559631526, 0.2080773115, -0.277017951, -0.1285909116, -0.0161555242, 0.0022371875, 0.206608668, 0.145534724, 0.2617546618, 0.0636102185, -0.4012528956, 0.0281393807, 0.2450590432, 0.2434323281, 0.4585992396, -0.5399460793, -0.0215717088, -0.1049817801, -0.0611164384, 0.0925375894, -0.3793507218, -0.0102073019, -0.0399883091, 0.0393611528, -0.169216767, -0.3824185133, -0.2278564572, 0.2536816597, 0.0415283106, -0.1091381982, 0.1842542142, -0.1190406755, 0.0361398272, 0.39369753, 0.0177477524, 0.0284671616, -0.5414432287, -0.3072096705, -0.3471832275, 0.1222481504, -0.0597675815, -0.0438296311, 0.089729622, -0.0929656625, 0.3672472239, -0.1047382429, 0.2594781816, -0.0157940257, 0.049546387, 0.0980075821, -0.3226241171, 0.2149651051, 0.0601880886, 0.0014477271, -0.067422308, 0.0415633246, -0.0277156718, 0.0168903191, -0.1902836859, -0.2040956765, -0.0045192651, 0.3222166002, -0.3959133625, -0.2772590816, -0.1900501847, 0.0054746382, 0.1448355317, 0.2303761393, -0.1911047399, -0.1483586431, 0.0973167717, -0.1408892125, 0.1688584089, -0.0693916678, -0.6325304508, 0.0084553789, -0.0131406384, -0.3519763052, 0.0666961893, -0.0030397177, 0.0073680808, 0.2608050108, 0.1243237108, 0.2177851945, -0.5206574202, -0.4857225716, -0.1147993058, -0.3428824544, -0.1811397374, -0.1095324233, 0.1012081802, 0.1172323227, 0.0287327506, -0.1006722525, 0.1512283981, 0.0304639079, 0.1303052753, -0.2050457299, -0.4009780288, -0.0654450729, -0.039054174, 0.1878518313, -0.075581342, -0.3016087115, -0.0906673223, 0.3413060904, 0.2055912763, 0.0135358097, -0.1134442836, 0.0760913566, 0.2956165373, -0.1378965527, 0.0739980415, -0.1905765831, -0.0058534467, 0.309169203, 0.1006016955, 0.2124834955, 0.7265696526, -0.0317329541, -0.3925468326, -0.2147994936, 0.0045553227, -0.1560646296, 0.2015377879, -0.2022473514, -0.0298810694, -0.2052899897, -0.185212791, 0.1675911546, -0.5990707278, 0.0399206132, -0.4966746867, 0.3045561314, 0.0330083109, 0.0258519612, 0.0667310879, 0.2611111701, -0.0271314885, -0.2616861165, -0.0266548451, 0.5314069986, 0.1615615487, 0.0253941305, 0.2021258324, 0.1782302111, 0.3647679389, -0.1731300801, 0.1725413799, -0.2544903755, -0.0349750742, -0.1862796992, -0.4021556377, 0.2673925459, -0.1242141351, 0.0038792901, -0.0670675114, 0.0252663735, 0.0050550397, -0.153759867, 0.0060085319, 0.0304664839, 0.2154409587, 0.1709762216, -0.2440111786, 0.0506174453, 0.022738874, 0.3933662772, -0.3404998183, -0.2269741744, -0.232380107, -0.3499915004, -0.2318677008, 0.1900976002, 0.1133131981, 0.0082025621, 0.4606725276, 0.2917125225, 0.0924159065, -0.0096250456, -0.0577665642, -0.1442686468, 0.0375588723, 0.0757214352, -0.0849121436, -0.0752280802, -0.075023219, 0.0251601823, -0.1450255066, 0.0872808173, 0.0913450494, 0.1519299299, -0.4459272325, -0.3298212588, -0.2245244831, -0.1108566299, 0.2284858227, 0.1782715768, 0.1340694278, -0.3090158701, 0.1391239762, 0.035780862, -0.0282407086, -0.029434083, -0.3591502011, 0.3002124429, 0.0597740747, 0.1229235828, 0.1016184613, -0.1588441879, -0.167549029, 0.2136397809, 0.0532519966, 0.3412389755, 0.3781740963, -0.0943847746, -0.0506142266, 0.1354378164, -0.4069739282, 0.0473474897, -0.2130525857, 0.274053961, -0.1605814099, 0.0470892414, 0.049077455, -0.000705299, 0.2382683158, -0.0045109014, -0.2650097311, -0.0866272002, 0.204310745, -0.2747789621, -0.0735615715, -0.5671488047, -0.1443152875, -0.0556057617, -0.0253852159, 0.4845308959, 0.2149478197, 0.0677580684, -0.132711947, 0.2286451906, 0.2270269841, -0.1904089153, -0.369502455, -0.8211240768, 0.3219831884, -0.1093274951, -0.5275313854, 0.0443152077, 0.0050816266, 0.3266917467, 0.098662287, -0.3984341025, -0.3188939691, 0.0212341473, -0.1178078577, 0.4910204113, 0.2024040818, 0.1742159873, -0.1624935865, -0.1692873538, -0.2453817725, -0.0643383861, 0.2330093086, 0.2933532298, 0.443831861, -0.3135500848, -0.3200971484, -0.2105184793, 0.0678217486, 0.1921273023, -0.1336702555, -0.0430316329, -0.0406821072, -0.1121808887, 0.1019943655, -0.118985571, 0.6109253168, -0.1167220175, -0.0699786097, 0.1742069274, 0.2060506642, 0.2247807682, -0.0549101792, 0.0715910047, -0.2151780725, -0.1094952971, -0.1889105886, -0.0313989595, -0.0109470719, -0.0619199164, -0.0724668205, -0.107360743, -0.1065223664, -0.1027113125, -0.012942438, 0.0882942453, -0.0355589129, -0.9891731143, 0.2564763725, 0.0638810843, 0.3727456629, -0.31786713, -0.0409985483, 0.0148172304, -0.1117412969, 0.1306125075, 0.198173508, 0.1457037777, -0.2057921588, -0.2063261569, 0.3384167552, -0.0943584517, -0.296141237, -0.0803387016, -0.2180743366, 0.0845303684, 0.2185199708, 0.0147243645, -0.2438407987, -0.0472690202, 0.1853291839, 0.2361968756, -0.3090727329, -0.167938605, -0.0584990717, -0.0413378179, 0.0609285533, -0.1247932315, -0.1112174839, 0.2661822736, -0.2729487419, -0.1262555569, -0.1669054925, -0.09674301, 0.5697979331, 0.0501595736, 0.4110447168, 0.0066460678, 0.3036607504, 0.3648833334, 0.0813460425, 0.2145934403, 0.493766129, -0.1207818314, 0.2570343316, 0.1627687961, -0.4090266824, 0.3568689823, 0.1817959845, 0.0687774718, -0.505053401, -0.2423401773, 0.0817164332, -0.1969737113, 0.266908139, 0.1065096259, 0.1764204055, -0.0745199099, -0.2677347064, 0.5765459538, 0.1530432999, -0.0216934178, 0.3967195451, 0.3892160952, -0.1153720468, -0.2252325863, 0.5142549872, 0.9024683237, 0.07556431, -0.209879294, 0.2915862799, 0.3819597661, 0.3366693556, -0.5109515786, 0.0388087071, -0.1483865976, -0.3224580288, 0.0181175992, -0.093154192, 0.1443809867, 0.2909352183, 0.1441841274, 0.0548480228, -0.1882930845, -0.2920116782, -0.1559664905, 0.1759004295, -0.252307862, -0.1252843291, 0.2800356448, 0.2756407857, 0.0939146951, 0.1585778743, -0.0221128576, 0.0242549274, -0.3450348079, 0.0137955351, -0.0757807791, -0.0314136371, -0.0659126639, 0.036640428, 0.0075082197, -0.3132866025, -0.0257364325, 0.3328455985, 0.2072345465, -0.0685253739, -0.107203953, 0.1550855488, -0.3515684307, 0.0511079803, 0.3374177217, -0.0118402848, 0.4049900472, -0.2082606852, -0.1850055605, -0.0316703916, 0.0945554078, 0.2242091596, -0.3591556847, -0.0039966754, 0.0034983356, -0.4560909569, -0.0679764003, 0.1836200655, -0.0690047517, -0.0592006668, 0.1960068941, 0.2452934682, -0.0893049762, 0.4629482329, -0.0940146521, 0.0361170843, -0.0933117345, 0.1915056407, 0.447683692, -0.2230202556, 0.2656007409, 0.0410861187, -0.0035452347, -0.1695643514, 0.0310570449, 0.4695279896, -0.0643553659, -0.0931394622, -0.2682438195, -0.1900696605, -0.0251844451, 0.2308849841, 0.2963247895, -0.0065970337, 0.0869634598, -0.3571561277, -0.4566164017, 0.2972083688, 0.1031292453, 0.4142375886, -0.2592293918, 0.2355197072, -0.0219563879, 0.0483901985, -0.3753139377, 0.0327717513, -0.1171204597, 0.0454247966, 0.1052994877, -0.0350342058, 0.232179299, -0.3884831369, 0.1845384836, -0.0055949036, -0.173010096, -0.2342030555, -0.1040062085, 0.0975869969, 0.160851106, -0.0949797705, 0.2690057158, -0.0395558253, -0.0355684049, -0.0280997176, 0.0543984212, -0.1058268994, 0.0968757719, 0.3189455867, 0.0706672817, 0.1440328807, -0.0952517763, 0.1414893866, 0.1393976063, 0.2810755372, 0.1553093046, -0.2444821894, 0.0287766773, -0.2200667411, -0.2927648723, 0.0283168033, -0.0672237128, 0.1389173716, 0.2825184762, -0.0517784245, 0.1805141121, 0.1599925011, 0.3281487226, 0.4037592411, -0.1820910126, 0.1095532328, -0.0228263792, 0.321721524, -0.286996752, -0.0101621374, 0.0545899458, 0.3586605489, -0.131958425, 0.0748678297, 0.1458768994, -0.0303300451, -0.1269544065, 0.1584051549, 0.2493476719, -0.0657369643, 0.1471384317, 0.2147453725, -0.2435145676, -0.0072114929, 0.1375523061, -0.0283732861, -0.0748246759, 0.2515577078, 0.0104171094, 0.4689598978, 0.1743611246, 0.1666101664, 0.0173717029, 0.0009583794, -0.0749312043, 0.3695008755, 0.1639108658, 0.1488025039, 0.0254854038, 0.5885557532, -0.1843402535, -0.0380441733, -0.3076460958, 0.0172275212, 0.1117453501, 0.1733884066, -0.257401824, -0.1250402182, 0.0255654976, -0.179691419, -0.1197370738, -0.2582989931, 0.1674253643, -0.0204453226, -0.3602644801, -0.7811259627, -0.1246844083, 0.169530198, 0.2597131431, -0.1041670144, 0.1274808645, 0.5653452873, -0.0026227962, 0.075714983, 0.5093675852, 0.1179082766, 0.1717960089, -0.0091009522, 0.052323617, 0.2157283574, -0.0404578298, 0.1399721652, 0.120016396, -0.0173581447, -0.154612422, 0.2904562354, 0.2103879005, -0.1007844359, -0.1195347011, 0.0577826239, 0.0160559714, -0.0858532339, 0.0848625228, 0.0565753728, -0.132159844, -0.0987649858, -0.2414765656, -0.3680667281, -0.0201380942, -0.1222254708, 0.1972980499, 0.1806606501, 0.0501589105, 0.1360907108, -0.347369194, 0.2889631689, 0.0706474036, -0.1028146073, -0.2903156281, -0.1219722852, -0.6011988521, 0.0086711803, -0.0545977019, -0.577377677, 0.1665004492, 0.3022069931, 0.1711473465, 0.0595952868, 0.0451817364, -0.430256933, -0.1458765715, 0.2319047898, -0.6059360504, 0.0783952624, -0.1940297782, 0.172917068, -0.0103038941, 0.3178609908, 0.2231744379, 0.2317782789, 0.0007138791, 0.1533497274, 0.1520462483, 0.1564124376, 0.2293557823, -0.0070349108, -0.0431758426, 0.480537802, 0.1899568886, 0.2845980227, -0.2929409742, -0.1684208214, -0.1762913764, 0.3193458021, 0.2029723972, 0.0850902945, -0.0320546627, 0.0369668379, 0.0861714184, 0.3020073771, 0.0019281255, -0.4383200705, -0.5029204488, -0.0046231793, 0.0276863407, 0.0620463416, 0.2641742527, 0.4826035798, -0.0204422493, 0.0856806338, -0.2352217287, -0.3571698666, 0.4272537231, -0.1245931461, 0.1778803766, -0.0091727003, 0.253338784, 0.4557926357, -0.0013345331, -0.352602452, -0.0086941915, 0.4174800217, -0.2817871273, -0.1516849697, 0.2618076503, 0.3729297221, -0.1710087955, -0.0333489254, -0.0474457629, -0.007762487, 0.0264333189, 0.1544996351, -0.0589767247 ]
https://github.com/huggingface/datasets/issues/669
How to skip a example when running dataset.map
Hi @xixiaoyao, Depending on what you want to do you can: - use a first step of `filter` to filter out the invalid examples: https://huggingface.co/docs/datasets/processing.html#filtering-rows-select-and-filter - or directly detect the invalid examples inside the callable used with `map` and return them unchanged or even remove them at the same time if you are using `map` in batched mode. Here is an example where we use `map` in batched mode to add new rows on the fly but you can also use it to remove examples on the fly (that's what `filter` actually do under-the-hood): https://huggingface.co/docs/datasets/processing.html#augmenting-the-dataset
in processing func, I process examples and detect some invalid examples, which I did not want it to be added into train dataset. However I did not find how to skip this recognized invalid example when doing dataset.map.
95
How to skip a example when running dataset.map in processing func, I process examples and detect some invalid examples, which I did not want it to be added into train dataset. However I did not find how to skip this recognized invalid example when doing dataset.map. Hi @xixiaoyao, Depending on what you want to do you can: - use a first step of `filter` to filter out the invalid examples: https://huggingface.co/docs/datasets/processing.html#filtering-rows-select-and-filter - or directly detect the invalid examples inside the callable used with `map` and return them unchanged or even remove them at the same time if you are using `map` in batched mode. Here is an example where we use `map` in batched mode to add new rows on the fly but you can also use it to remove examples on the fly (that's what `filter` actually do under-the-hood): https://huggingface.co/docs/datasets/processing.html#augmenting-the-dataset
[ -0.3242636323, -0.2246202826, 0.0313537568, 0.0002580616, 0.0896153748, 0.3332220912, 0.030069964, 0.1055710539, 0.1422978342, 0.2520426214, 0.6323099732, 0.4480102062, -0.2600846589, 0.4908131361, 0.0828726962, -0.0856684074, -0.0504851453, 0.0724820793, 0.1984964162, 0.177938953, -0.3641429245, -0.0961725116, -0.4977023005, 0.04964149, -0.3158499599, -0.2935383618, -0.0769766644, 0.1408017278, -0.0265656188, -0.2878863215, 0.096021302, -0.0466132239, 0.098266758, 0.504730165, -0.0001258959, 0.119655177, 0.3082423806, -0.0945359319, 0.1854922771, -0.3107351065, -0.3292456865, 0.1670229286, -0.1726571321, -0.2398433685, -0.0762516707, -0.0612979122, 0.0840198249, -0.0997305587, 0.4658529162, 0.0540932268, 0.052971594, 0.2320327312, -0.318695426, 0.0486837886, -0.1116904691, 0.4092167616, 0.0898966268, 0.2354432195, 0.1143720448, -0.0532129854, 0.067504257, 0.2311798632, -0.1761512309, -0.0097622108, 0.1850003153, -0.1228412241, 0.1621084064, -0.3764846623, 0.0962039232, 0.4493288696, 0.2245713472, -0.1264569461, -0.2365827858, -0.3658843637, -0.0463604107, -0.2754535377, -0.0161191653, -0.1472745985, -0.0153074861, 0.4170873761, -0.6674240828, -0.1911609322, -0.103727296, 0.0612026937, 0.2733070552, -0.1795965135, -0.0818135291, 0.2964393795, 0.3297205269, 0.1335156858, -0.2808512151, -0.0747993439, 0.3179300725, 0.3472800553, 0.0003409761, -0.3308741748, 0.0062255836, 0.1976258457, 0.0249318331, -0.3257898092, 0.0555800758, 0.1102719605, 0.1363181919, 0.5397348404, 0.0191036705, -0.282309413, 0.0233991481, 0.3064346015, 0.2565124035, 0.1218457222, -0.0133251669, 0.1166886166, -0.2119527012, -0.1256946623, -0.22690171, 0.2246919423, 0.0821374208, -0.1516428292, -0.1834158301, -0.002640245, -0.4451542497, -0.0977711901, 0.1742838025, 0.4919383824, 0.0618026033, -0.2413506508, -0.3540640175, 0.1922270805, -0.0949270651, -0.1513016522, -0.0967250839, 0.0498009361, -0.1144312546, 0.179089576, 0.1596907973, -0.0792611092, 0.4232960939, 0.0680154562, -0.2709646523, 0.1603313982, 0.6897125244, -0.1699368358, 0.1788068861, 0.3412056863, -0.0605328977, -0.0577551126, 0.2295359075, 0.3670892119, -0.004791291, 0.3568366766, -0.3024684787, -0.430985719, 0.3180299997, -0.0142081166, -0.0673332661, 0.2039248198, -0.5382909179, 0.346475035, 0.2190380991, -0.4069851935, -0.0032903645, 0.1302211583, -0.5322642922, -0.1984509975, 0.1176694855, 0.165093109, -0.3112283647, -0.2914986014, -0.2650073767, 0.0359469764, 0.103358075, -0.0010721844, -0.3380069733, 0.4800394773, -0.3783352077, 0.1835428923, 0.249792546, -0.2121670991, 0.0564302877, 0.0568870679, -0.1763328016, 0.0893618092, -0.3198421299, -0.1334591806, 0.3183124959, -0.1414414346, -0.0459737927, 0.1065727025, -0.390183419, -0.0897284225, 0.0181749053, -0.0168862417, 0.5136339664, -0.2013853341, -0.2183640599, 0.1387317479, -0.2506179512, -0.3810960054, 0.2124199569, -0.1381442547, -0.1039968655, 0.1810709983, 0.3804060817, -0.3077710867, 0.1553097963, -0.3345045745, -0.0102510378, 0.176361233, 0.0401226692, -0.3803937435, 0.2575182021, -0.5252301693, -0.1265998632, -0.187349394, -0.0143148471, -0.0288681034, -0.0561558791, -0.3807052672, 0.0973712578, -0.1782940179, -0.3164161742, 0.043250978, -0.2925288975, 0.3105836213, -0.1860635132, -0.0258665849, 0.2752488554, -0.0649268776, 0.0075348383, -0.0372885577, 0.2593931854, -0.4081424773, 0.0443688631, 0.3251227438, 0.4812692702, 0.1775560975, -0.079017289, 0.0932366475, 0.1937621236, -0.3268750906, -0.2090981007, 0.0282359347, -0.0245819893, 0.0280553363, -0.2407764196, 0.3548719585, 0.1204800457, 0.1251227856, 0.1026159525, 0.1530057192, 0.0357431285, -0.1511326581, 0.091380626, -0.1911783218, 0.0256276187, 0.058819022, 0.1974119842, 0.1561803818, -0.1957835406, -0.1475311518, 0.4238241911, 0.0040209894, -0.1040823907, 0.2210840732, 0.0002529401, -0.0520118847, 0.5704846382, 0.0326652117, 0.0618725754, 0.1499920785, 0.0290907081, 0.0220052395, -0.3287628591, 0.2473179102, 0.0675084516, 0.198827222, 0.4481800199, -0.3352952302, 0.0095950449, 0.1830748022, -0.145172447, -0.0579967424, 0.3105288148, 0.0239242055, -0.3376733363, 0.1957656294, -0.2525345981, -0.1397381574, 0.1195071787, 0.0803662166, -0.1787721068, -0.1134717688, 0.0619540289, 0.4838312268, -0.2872806787, 0.2964296937, 0.0118210036, 0.1241297051, -0.183332786, -0.2632944882, -0.0218226276, 0.1122781709, -0.2322316319, 0.0610675178, 0.1845854819, 0.4620584846, 0.513746202, -0.0903165042, -0.1922498345, 0.0471111424, -0.5107017159, 0.1798777431, -0.0647184178, 0.2261238247, 0.2627537549, 0.2396682203, -0.5291048884, 0.0256423801, -0.1005803421, -0.2393882424, -0.1765174419, -0.1198155284, 0.0259139352, 0.3449902534, -0.229861185, -0.2000430226, -0.0995237306, -0.0450548716, 0.1051682606, -0.220874995, 0.1166531816, -0.1009433493, 0.0337651223, 0.2192162275, -0.0252638571, -0.3246285617, -0.0130740469, -0.3057717383, -0.020605823, -0.2947101891, 0.0485653877, 0.204891488, -0.3035928309, 0.069524236, 0.3210884035, -0.1748850346, -0.4121910632, -0.1730241925, 0.0444510505, -0.1805033684, -0.3683568537, 0.5422810912, 0.025719, 0.0732864439, -0.3101596832, -0.3047012985, 0.2872392535, 0.2302467674, 0.07908988, 0.4050250053, 0.5862448812, 0.1559973657, 0.6632351875, 0.3587722778, -0.0044964827, 0.2946739495, -0.0173923112, 0.1108126864, 0.0867998078, 0.2357931584, 0.006035333, 0.0331211053, -0.3669233024, -0.0593146905, 0.017405536, -0.0560547486, 0.1778513044, -0.1333880723, -0.3015756905, -0.2497921586, -0.0237089097, -0.1485793889, 0.4746418297, 0.1500703543, 0.0345520675, -0.2720658183, 0.0499044433, 0.1825569719, 0.1444784999, 0.8970304132, 0.1220850125, -0.3651361763, -0.2002618611, -0.3813797832, 0.216100499, 0.2633255422, 0.0306874402, -0.1829452664, 0.1107098088, -0.1326040477, 0.0719924122, 0.8909834027, -0.4783501625, 0.0679053068, -0.0793974698, -0.04255661, -0.2251234651, 0.1874657124, -0.0673202649, 0.620562613, 0.3868526518, 0.4097590744, -0.0332396254, -0.1684534401, 0.2244220227, 0.4525851607, 0.0039338646, -0.1690650731, -0.1096532345, -0.0586697459, -0.615962863, 0.2032067776, 0.6330301166, -0.2209206074, -0.2785766125, -0.3541158736, 0.0799758434, 0.0908181593, 0.2393752038, 0.3062519431, 0.2124631554, -0.145229429, 0.1064714417, 0.478096962, 0.0251863245, 0.2462863624, 0.5393099785, -0.0041548344, -0.6362017989, -0.1552199721, -0.0606455654, 0.4769302905, -0.0617459305, 0.017622523, 0.1434136927, 0.2348607332, 0.0230430309, -0.0582348593, 0.3424859047, 0.17581819, 0.045239903, -0.4140233994, -0.0500904396, 0.0790923759, 0.2493259013, -0.1851273328, 0.6250058413, -0.1639320999, -0.1471606642, 0.3089537919, -0.0112282513, 0.6379777789, 0.0749554709, -0.247468695, 0.078931421, 0.0372068919, 0.1938006133, 0.0915263817, -0.020881379, -0.0204039384, -0.3294069171, -0.1144295335, -0.1585921645, 0.3285665214, 0.5887830257, -0.2945951521, 0.2747735977, -0.10220588, 0.2315360755, -0.007836611, -0.0948730707, 0.3148839176, -0.1144779623, -0.2315276265, -0.0201951023, 0.3014897406, -0.0872592255, 0.0357923247, -0.1560101509, 0.2789091468, -0.4633372426, -0.1052747816, -0.2805892229, -0.6895772219, -0.1791908294, 0.1165174171, 0.2751365006, 0.2830936015, 0.3188085556, 0.1778906137, 0.0506369732, -0.230264172, 0.0631315336, 0.0429807641, 0.2077718228, -0.3268728852, -0.1661537588, 0.2756370008, 0.0375215001, -0.164946571, 0.3764307201, -0.2958546281, -0.1479962319, 0.2756735981, -0.2241287529, 0.0484436937, 0.0225729812, -0.1549542248, -0.1398321986, 0.0068105492, -0.209911108, -0.0316439383, -0.0245205294, -0.0333434008, 0.0926187411, -0.1169909164, -0.1770899743, -0.0702324137, 0.0840759799, -0.2639918923, -0.1625940204, 0.1618477404, -0.0930476561, -0.0219862759, -0.129112944, -0.0113205994, 0.2623627186, -0.1325612515, 0.0652214512, 0.3482711911, 0.0519443229, 0.1709774882, -0.0543499738, -0.0329395235, -0.0735223219, -0.2989518642, -0.206605792, -0.5582764149, 0.1039377898, 0.0480969846, 0.1627388746, -0.009717376, 0.4578390718, -0.0320749655, -0.0337236077, -0.1493137032, 0.1816615462, -0.1403561085, 0.1874863803, 0.1428204179, 0.5469577909, -0.0235606134, -0.1670019478, -0.1679524779, 0.3657298386, -0.0339383706, -0.0519330204, -0.1060867161, 0.1871074587, -0.0148706781, -0.182589218, 0.2769850194, 0.1012555957, -0.0096929036, -0.1023053452, 0.2399619222, -0.0956842229, 0.0613520928, 0.1268479377, 0.0009977416, 0.0823119879, -0.1285840273, -0.1799130887, -0.1966049224, 0.0378271267, -0.1578033715, 0.0638717264, 0.109037593, -0.0243340377, 0.2529959977, -0.419449985, 0.1464193016, -0.2020231485, -0.1831783205, 0.029582791, 0.0717012137, 0.1250089109, 0.0034414013, -0.0368723758, -0.1992927194, 0.1470135599, 0.4785041213, 0.1193075478, -0.3371194303, 0.0830578282, 0.6689921021, -0.0708640143, -0.0182054546, 0.1826015562, 0.0799476802, 0.2994882464, -0.0443315916, 0.1571815163, 0.0131452559, -0.2660858035, 0.4661114514, 0.2899319828, -0.454511404, 0.1229568273, -0.014161516, 0.1543001682, 0.3856579959, 0.101634033, 0.1284422427, 0.4472119808, -0.0749503598, 0.1344839931, 0.2135424614, -0.725826025, -0.0063069509, 0.4943152964, -0.0596667007, 0.1720002592, 0.2485913485, 0.0685110539, -0.099790208, -0.4781292975, -0.2441490144, 0.0232260674, -0.0691380352, 0.0846319646, -0.0030518635, 0.1252713203, -0.0031252601, -0.0998124704, 0.2085619867, 0.037007723, 0.5780152678, -0.1765359342, -0.16051884, -0.2785674036, -0.2988341153, -0.0485997275, 0.1928241253, 0.1450666189, -0.0741178393, -0.0620706752, -0.1806125492, 0.0076460289, 0.1089213639, 0.0184160676, -0.1273632944, -0.1469280571, 0.126546517, -0.2374815345, 0.1259738207, -0.0354829021, 0.3049453497, -0.2280292809, -0.1189912036, 0.2185147554, -0.0575867742, 0.0158193372, -0.013955228, -0.0117213912, 0.3811345398, -0.3684954643, 0.2288070768, -0.1111716405, 0.0909272656, 0.0603189878, 0.0110908272, 0.0346964821, 0.03868955, 0.4817610383, -0.4550878406, 0.0002899323, 0.0687901899, 0.0042935163, -0.3503248692, 0.0151159456, 0.3317011893, 0.1513873488, -0.3204599619, -0.1301912665, -0.4943647683, -0.0342449844, -0.3479118049, 0.1900552511, 0.3387841582, -0.3117102385, -0.1235566065, 0.172545597, 0.1584009528, -0.1614840925, -0.0366933234, 0.2663264275, -0.1398996413, -0.2497848123, -0.364463836, 0.1490167528, 0.1726313978, -0.4584941566, 0.2356076837, -0.1520157456, -0.1531414539, -0.2025349587, 0.0590689369, 0.1058138832, -0.0214645229, 0.3100110292, 0.301040858, 0.2420400232, -0.2407737523, 0.243301779, 0.3386472166, 0.2236689478, -0.2236421257, 0.1351250708, -0.1482827663, 0.3675680161, -0.2840276659, 0.0636142716, -0.0427501425, -0.1796211302, 0.3713645935, 0.0970498174, -0.3833545446, 0.2957879305, -0.2796860337, 0.1975484341, 0.1138489321, 0.0459220596, -0.0012818106, 0.0344121307, -0.0164142884, -0.0105189066, 0.583653748, -0.6836977005, -0.0483500436, -0.3533826172, 0.1826316118, 0.1267496645, -0.4262392819, -0.6577038765, -0.3809610009, 0.3768140078, 0.0052215452, 0.1006294414, 0.358682394, -0.0389040262, -0.1048535332, 0.0579776466, 0.3994215131, -0.0799557567, -0.0925766006, 0.3459761143, -0.1557781249 ]
https://github.com/huggingface/datasets/issues/667
Loss not decrease with Datasets and Transformers
Hi did you manage to fix your issue ? If so feel free to share your fix and close this thread
HI, The following script is used to fine-tune a BertForSequenceClassification model on SST2. The script is adapted from [this colab](https://colab.research.google.com/github/huggingface/datasets/blob/master/notebooks/Overview.ipynb) that presents an example of fine-tuning BertForQuestionAnswering using squad dataset. In that colab, loss works fine. When I adapt it to SST2, the loss fails to decrease as it should. I attach the adapted script below and appreciate anyone pointing out what I miss? ```python import torch from datasets import load_dataset from transformers import BertForSequenceClassification from transformers import BertTokenizerFast # Load our training dataset and tokenizer dataset = load_dataset("glue", 'sst2') tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') del dataset["test"] # let's remove it in this demo # Tokenize our training dataset def convert_to_features(example_batch): encodings = tokenizer(example_batch["sentence"]) encodings.update({"labels": example_batch["label"]}) return encodings encoded_dataset = dataset.map(convert_to_features, batched=True) # Format our dataset to outputs torch.Tensor to train a pytorch model columns = ['input_ids', 'token_type_ids', 'attention_mask', 'labels'] encoded_dataset.set_format(type='torch', columns=columns) # Instantiate a PyTorch Dataloader around our dataset # Let's do dynamic batching (pad on the fly with our own collate_fn) def collate_fn(examples): return tokenizer.pad(examples, return_tensors='pt') dataloader = torch.utils.data.DataLoader(encoded_dataset['train'], collate_fn=collate_fn, batch_size=8) # Now let's train our model device = 'cuda' if torch.cuda.is_available() else 'cpu' # Let's load a pretrained Bert model and a simple optimizer model = BertForSequenceClassification.from_pretrained('bert-base-cased', return_dict=True) optimizer = torch.optim.Adam(model.parameters(), lr=1e-5) model.train().to(device) for i, batch in enumerate(dataloader): batch.to(device) outputs = model(**batch) loss = outputs.loss loss.backward() optimizer.step() model.zero_grad() print(f'Step {i} - loss: {loss:.3}') ``` In case needed. - datasets == 1.0.2 - transformers == 3.2.0
21
Loss not decrease with Datasets and Transformers HI, The following script is used to fine-tune a BertForSequenceClassification model on SST2. The script is adapted from [this colab](https://colab.research.google.com/github/huggingface/datasets/blob/master/notebooks/Overview.ipynb) that presents an example of fine-tuning BertForQuestionAnswering using squad dataset. In that colab, loss works fine. When I adapt it to SST2, the loss fails to decrease as it should. I attach the adapted script below and appreciate anyone pointing out what I miss? ```python import torch from datasets import load_dataset from transformers import BertForSequenceClassification from transformers import BertTokenizerFast # Load our training dataset and tokenizer dataset = load_dataset("glue", 'sst2') tokenizer = BertTokenizerFast.from_pretrained('bert-base-cased') del dataset["test"] # let's remove it in this demo # Tokenize our training dataset def convert_to_features(example_batch): encodings = tokenizer(example_batch["sentence"]) encodings.update({"labels": example_batch["label"]}) return encodings encoded_dataset = dataset.map(convert_to_features, batched=True) # Format our dataset to outputs torch.Tensor to train a pytorch model columns = ['input_ids', 'token_type_ids', 'attention_mask', 'labels'] encoded_dataset.set_format(type='torch', columns=columns) # Instantiate a PyTorch Dataloader around our dataset # Let's do dynamic batching (pad on the fly with our own collate_fn) def collate_fn(examples): return tokenizer.pad(examples, return_tensors='pt') dataloader = torch.utils.data.DataLoader(encoded_dataset['train'], collate_fn=collate_fn, batch_size=8) # Now let's train our model device = 'cuda' if torch.cuda.is_available() else 'cpu' # Let's load a pretrained Bert model and a simple optimizer model = BertForSequenceClassification.from_pretrained('bert-base-cased', return_dict=True) optimizer = torch.optim.Adam(model.parameters(), lr=1e-5) model.train().to(device) for i, batch in enumerate(dataloader): batch.to(device) outputs = model(**batch) loss = outputs.loss loss.backward() optimizer.step() model.zero_grad() print(f'Step {i} - loss: {loss:.3}') ``` In case needed. - datasets == 1.0.2 - transformers == 3.2.0 Hi did you manage to fix your issue ? If so feel free to share your fix and close this thread
[ 0.0143272132, -0.0178403407, 0.0766257867, 0.270960182, 0.1909325421, -0.2114585042, 0.3216446042, 0.1833658516, -0.3186632097, 0.1440706402, -0.1105744243, 0.2251770645, 0.0432988033, -0.3711668849, -0.3412017822, -0.5152070522, 0.0927676037, 0.1171909422, -0.417071104, -0.3085790575, 0.2463039011, 0.1486860365, -0.5372667313, -0.233257249, -0.4022983015, 0.2082425356, -0.0268376656, 0.0849921554, -0.1229777262, -0.1508572251, 0.4350037575, 0.2246646732, 0.6234451532, 0.5011124015, -0.0001253695, 0.0167350397, 0.0884677693, -0.1851127744, -0.0964059681, 0.1887829453, 0.0095060263, -0.0720066056, 0.0785157979, -0.2393473685, -0.2013339549, 0.5764878392, -0.0589541271, -0.1579336226, 0.5676101446, 0.0713825822, 0.0511578135, 0.0994234011, -0.3086315989, 0.0978988633, -0.0312878639, 0.1299946606, -0.221784398, -0.158829838, 0.1423972547, -0.2430082262, -0.2492348999, 0.2442485094, -0.0914828479, 0.1282950491, 0.4990984499, 0.212920323, -0.365901351, -0.2715991139, 0.2734738886, 0.0496388189, 0.3472603858, -0.4256629646, -0.4216346145, -0.1504350752, 0.12791875, 0.0961998701, 0.0465046614, -0.1955450475, 0.0177181885, 0.0964232534, -0.1567199081, -0.2207978517, -0.4685477912, 0.0264694523, 0.0917971805, 0.4098716676, -0.0062108454, -0.1192714497, -0.1143857762, -0.349177748, -0.1651541591, 0.0337855518, 0.1241988242, 0.1486430466, -0.5537847281, -0.1846330017, -0.1117321625, -0.1745157689, -0.0275355969, -0.3231816292, 0.0780726299, 0.1016264483, 0.082153663, -0.1564658433, 0.1735978276, 0.3648106456, 0.0943130553, 0.4102594852, 0.1208895743, 0.1123723984, -0.2615920603, 0.0032643343, -0.1972547024, -0.1704996228, 0.3708522618, 0.0576067045, 0.3201505244, -0.1923867762, -0.4567263722, -0.0554660521, -0.3279339969, -0.2216428816, 0.091651462, 0.2830949128, -0.1445198059, 0.2163468301, -0.1008514836, 0.269380033, -0.3416719735, 0.0706471279, -0.0472736433, -0.0374249294, -0.5051250458, 0.072348401, 0.3726486862, 0.2174146324, 0.2313279957, 0.0451214351, 0.1214560494, 0.2522252202, -0.0618573688, -0.0985317081, 0.3288626969, -0.1315160096, -0.2866592109, 0.0891970918, -0.2206839621, 0.0552944988, 0.0595233366, 0.1287126094, -0.3794059157, 0.2103697509, -0.0756790414, -0.0523014776, -0.0269695949, -0.0535665937, -0.1378823519, 0.334174782, 0.1426264495, -0.1533271074, 0.1410789937, -0.6094962955, -0.3426013589, -0.0242807269, 0.5197734237, 0.5062794685, -0.4620134234, -0.3242631257, 0.2939983904, 0.2669239044, 0.5352311134, 0.5651915669, -0.1079585105, 0.0349414758, 0.0557244457, 0.2512503266, 0.1858740896, -0.2093687952, -0.7334694862, -0.0830295682, -0.0441934466, 0.0869676247, 0.2217092961, -0.131174311, 0.4703831673, -0.2120388597, -0.1244113818, -0.2151400149, -0.1037927493, 0.1159088239, -0.2668858469, 0.1395716667, 0.413634181, 0.0328764357, 0.1747833788, -0.0320383869, -0.126001209, 0.6209385395, 0.2226440012, -0.1818390936, 0.2899459898, 0.0643969178, 0.1717641056, -0.2174839675, 0.2140320092, 0.0806370676, -0.3901187479, 0.2001284659, -0.1324911416, 0.1447693408, 0.014918698, 0.0626081452, 0.0884099305, -0.2703788877, -0.1136360094, -0.1285361946, 0.0465300493, 0.0782189667, -0.1111468896, -0.4716425836, -0.1832151264, -0.1192099899, 0.1697308123, 0.0719179586, -0.0869847164, 0.3454033732, 0.0259104427, -0.4336413145, 0.0098218573, 0.1193503514, 0.3469043076, -0.0527058765, -0.1413048059, 0.1916844547, -0.062703222, 0.1314257234, 0.2388150394, 0.3168721795, 0.4315246344, -0.3996689022, 0.2770923078, 0.4996348917, -0.0656075031, 0.105396919, -0.2424382269, -0.0199281964, 0.010152854, 0.1996154487, -0.0707076564, -0.2372714132, -0.1725028157, -0.1236380339, -0.3080771565, 0.10976509, -0.3041390777, -0.1481755078, 0.2156851292, 0.0678421035, -0.1514199078, 0.174823761, 0.3401044011, 0.0692098662, 0.0954239666, 0.2409140915, -0.4496682882, -0.2235210687, 0.1370735914, -0.0167489629, 0.4678154588, -0.0258350298, 0.1285743713, -0.1111882403, 0.2357775867, -0.1046385691, -0.0667029843, 0.3016968966, -0.1883017272, 0.1050801873, 0.3168637455, 0.3701638281, -0.0432829, -0.0838378817, -0.0384022444, 0.1736605614, -0.2928594649, 0.3218759596, -0.2582611144, 0.0612126142, -0.2138754874, -0.0527617149, 0.1186534688, 0.1473301947, -0.0626922846, -0.0735689476, -0.0472458303, 0.2227205336, 0.0347404629, 0.3342998326, 0.328189671, -0.218313545, -0.0666736811, -0.0572620817, -0.0280945897, 0.0324907824, -0.0410682261, 0.0276345629, -0.2657493949, -0.0736551583, -0.1680518687, -0.2551649213, -0.317106694, 0.0704179034, -0.180271849, -0.1311720014, 0.2053001076, -0.0421732403, -0.3728771508, -0.2056105584, -0.0110589284, -0.3334242105, 0.0961777344, 0.1580106467, -0.1058864668, -0.2090539932, 0.0334987268, -0.3507478237, 0.1322999299, 0.1283811033, -0.1099347323, -0.1493012905, -0.1089204773, 0.3558454812, -0.0532987863, -0.0475712568, 0.0296139792, 0.2345344722, 0.1703337729, -0.3580479324, 0.4893871248, -0.0219128728, -0.2243322581, -0.175848797, 0.0223400779, 0.1377401948, -0.0775634944, 0.0666947514, -0.2440138012, -0.2023455799, 0.1336152256, -0.1854814738, 0.3551796079, 0.3544382751, 0.1523951739, 0.1105732992, -0.19086878, -0.450973928, 0.3485203981, 0.3832607865, 0.4323942363, -0.4216375053, 0.1823228449, 0.0361407734, 0.9876065254, 0.1043778732, -0.3358763754, 0.2449721843, 0.1232648268, -0.0912316814, 0.040585231, -0.3617664874, 0.5099084973, -0.0015320792, -0.0853111446, 0.3287679851, 0.031203514, -0.2091063857, 0.1018045619, -0.2216372937, -0.1103070974, -0.3670125604, 0.0729518309, 0.1993706971, 0.2293974459, -0.036809288, 0.3337682784, -0.0824842304, -0.1033094674, 0.351270467, 0.0184068736, 0.4582263827, -0.1077622324, 0.1760485917, -0.1072183177, -0.6214440465, 0.1384931505, -0.0775876269, 0.340939939, 0.0871910676, -0.2041323334, 0.0871131644, 0.2505130172, 0.2127578408, 0.2498398721, 0.038217023, -0.0485704578, -0.0983309299, -0.0534546897, -0.1513859183, -0.2904685736, 0.0043621883, 0.4999236166, -0.0523272976, -0.1654865593, -0.4805055559, 0.2167248875, -0.1697979271, 0.0787682831, 0.0343559235, -0.2242307216, 0.0256751999, 0.1167296395, 0.0166052841, 0.2248081267, 0.1711087227, 0.0104536638, 0.1089625135, 0.1017682031, -0.3740819693, 0.3025341928, 0.3633351326, 0.2641851306, 0.2990294993, 0.1077371836, 0.196443215, 0.1423642039, 0.2262048274, 0.1970769912, -0.0208578128, -0.6519160271, 0.3639232814, 0.2096342593, 0.1794053167, 0.1377777904, -0.0091092307, -0.0136544686, -0.2079296857, 0.2204767913, -0.0087606534, 0.1700920314, 0.4786547422, -0.0046265959, -0.3678676486, -0.0532869287, -0.0504153036, -0.2648195922, -0.1895356476, -0.5693152547, 0.0968559682, -0.361654222, 0.1745094955, 0.3774798214, 0.8383367658, 0.1199333668, 0.0641971603, 0.0058645653, 0.0753907934, 0.4150815308, 0.042224396, 0.1986550838, -0.1886024624, -0.1785338223, 0.0570544787, 0.0519796945, 0.057793241, 0.054322008, -0.5023738742, 0.5196647644, 0.0769690946, 0.1709812433, -0.0532268733, 0.1329181343, 0.3378891051, -0.2948260605, -0.2281221747, 0.0177723058, -0.0332327932, 0.2830350399, -0.0332400575, -0.3221073151, -0.0351765603, -0.1473836154, -0.1400850862, 0.0983340815, -0.5406106114, -0.1973624527, 0.2189486027, -0.4878491461, 0.6094718575, 0.3612017035, 0.7112467289, 0.0389163494, -0.1341973841, 0.183658585, -0.1868412644, 0.2206080407, 0.1224507168, -0.1901770532, 0.1150002331, 0.0256077237, -0.0704027116, -0.0071218577, 0.2948195338, 0.0246202089, -0.2678574622, -0.0589652807, 0.5732700825, -0.353677839, 0.1465211809, -0.0981547534, -0.1048580855, -0.1738299578, 0.0196666308, 0.2717898488, -0.1337006092, 0.4722104073, 0.0465047099, -0.2123426795, 0.1507708728, 0.5336149335, -0.0612938628, 0.035070233, 0.6399751902, -0.1759636253, -0.0593745708, -0.0515856817, -0.0456875227, 0.049531471, -0.3411386907, -0.107468456, 0.1047036871, -0.0610814504, 0.2422993183, 0.3580416739, -0.1100454405, -0.0321705565, -0.3433735371, 0.1485663801, -0.3661328256, -0.0861078203, 0.1647066772, 0.2435693592, -0.0653008595, 0.1125682443, 0.0855051801, 0.0734751448, -0.1801757812, -0.1088631377, 0.1182272434, 0.2003918439, 0.009600901, -0.2287469059, -0.0130350329, -0.2042816579, -0.13017115, 0.0387508161, 0.2149037868, -0.0377596691, -0.1776065826, 0.1479622126, 0.0929815918, -0.0645050183, -0.5151128173, 0.1278841197, 0.1166146547, -0.2510860264, 0.3547611237, 0.1306277514, 0.2909608185, 0.4648828208, 0.3471973836, -0.341691345, 0.0412847064, -0.1069639251, 0.2297142148, 0.2724523544, 0.3789079785, 0.0959768966, 0.2298775166, -0.1649803668, -0.0427530222, 0.2534691095, 0.3290733993, 0.1927933395, 0.1455295831, -0.3761539161, 0.0110200737, -0.0626260489, -0.003987595, 0.0892029926, 0.0288747884, -0.3305234611, 0.1826042235, 0.1258684099, -0.0624787956, -0.0567515083, 0.0470642485, 0.0025412857, -0.009978882, 0.0793805718, -0.3615134358, 0.1841418296, 0.126690954, 0.2745286822, 0.3068197668, 0.2341706753, 0.2034866214, 0.0538996197, -0.019959515, 0.1516919732, 0.0307160448, -0.3423264623, -0.0957271904, 0.007999775, 0.0819252878, 0.7272577286, -0.233915031, 0.2487427592, -0.0474248044, 0.142561689, -0.2965923846, 0.0486089326, 0.0628922954, -0.0674518123, -0.1082302853, 0.333643198, 0.0007177481, -0.5508166552, -0.0054126186, 0.2232460827, -0.0829268321, -0.3166798055, -0.0854550898, -0.189769581, 0.3159940541, -0.1717508882, -0.3310951889, 0.2240344733, 0.0462156422, 0.0432559773, -0.1881861091, 0.0043717595, -0.3820969164, 0.2529361248, 0.145720765, 0.1615885794, 0.3201904297, -0.025588531, 0.1071970165, -0.1764331013, 0.5512980223, 0.2408432961, 0.361179024, 0.0062453444, -0.2476912439, 0.1683619916, -0.09842778, 0.0391286835, 0.0988014638, -0.0983741879, -0.3236693442, 0.0431243703, -0.0247211736, -0.0108728521, 0.1131598204, -0.0320629515, -0.0715001225, -0.382029146, 0.24896954, -0.0715471879, 0.0952053666, -0.2893679142, -0.1540642381, -0.1538222581, 0.0290068649, 0.0377822071, -0.2452780157, 0.0288736634, -0.2547993958, -0.019245863, -0.0545472987, 0.5542145967, 0.0983994976, 0.0764158219, -0.5310487151, 0.1737273782, -0.3281564116, 0.1233851537, 0.0902652964, 0.0631546974, -0.0918574557, 0.1053629369, 0.0074242889, 0.2421835065, 0.3709096014, -0.2622209787, 0.0256211478, 0.2357783914, -0.2690032721, 0.2432829589, -0.2464672327, 0.0811783224, 0.1025464162, -0.2114074379, 0.1775927097, 0.0955259353, -0.0788860396, 0.0357867368, 0.1249651685, -0.1148098037, -0.097976014, 0.4438374639, 0.202201575, 0.286583811, -0.1549036205, -0.0948730782, -0.1554533541, -0.2424679101, -0.2454553246, -0.5271037221, -0.0060196635, 0.4133564532, -0.0477305166, -0.0831041038, -0.1928852499, 0.1409992278, 0.2417923212, -0.0685427934, -0.3989033997, 0.1612614691, -0.0422264859, 0.1907721758, -0.4427526593, 0.0727857649, -0.0308055971, 0.1064898819, -0.5212317705, -0.4688403308, 0.6822168827, -0.6715812087, -0.2621472776, -0.4065579176, 0.2129826546, -0.1121410802, -0.1544559747, -0.7287843227, 0.0748959929, 0.0446140096, 0.2008205652, -0.3198164403, 0.1755494922, 0.1637384295, 0.2320657969, 0.0097399065, 0.5042396784, 0.1847339422, -0.0396696739, 0.0817943588, -0.1719210446 ]
https://github.com/huggingface/datasets/issues/666
Does both 'bookcorpus' and 'wikipedia' belong to the same datasets which Google used for pretraining BERT?
No they are other similar copies but they are not provided by the official Bert models authors.
17
Does both 'bookcorpus' and 'wikipedia' belong to the same datasets which Google used for pretraining BERT? No they are other similar copies but they are not provided by the official Bert models authors.
[ 0.1324198991, -0.133234933, -0.0841304287, 0.4101325274, -0.0619928353, 0.0686284304, 0.4990637302, 0.0508506447, 0.0587276965, -0.1818360686, -0.5121808052, 0.0105854897, 0.1604424715, 0.263495326, 0.3741165996, -0.0626937747, 0.295380652, 0.0685095787, -0.1061500013, -0.4837571681, -0.0717286989, 0.213878423, 0.0865202546, 0.2500124276, 0.1909606606, 0.2310382724, -0.2693661749, -0.0304537751, -0.0282235369, 0.0310504641, 0.3777731359, 0.3160232604, 0.2182169408, 0.4636309743, -0.0001177422, -0.0648743808, -0.0596587621, -0.0256549679, -0.0905916393, -0.0317616835, -0.5987685919, 0.4022059441, 0.0205677822, -0.2447786927, -0.2479806542, 0.1904207617, 0.0798729658, 0.0083658481, 0.1955293268, 0.0961966515, 0.1572680324, 0.0176670067, 0.115346238, -0.0210657101, 0.4745379388, -0.0441599898, 0.0986413807, 0.2570822835, 0.2947521508, -0.0075675207, 0.1934589446, 0.2982079387, 0.0136623997, 0.1792532653, 0.327930212, 0.2027475387, 0.0356972031, -0.2289013416, 0.1980826706, 0.6075036526, 0.5808104873, -0.1521252692, -0.2595594525, 0.3440980315, 0.1413088441, 0.3872636855, -0.0057436703, 0.3685972691, 0.1439116895, 0.0601420179, -0.3490223587, -0.4425524175, -0.2131686956, 0.0481957942, -0.4004026949, 0.1453387439, -0.0261952709, -0.0515786, 0.1161749363, -0.0598329976, -0.176988855, -0.4608445466, 0.1334207356, 0.0316438749, 0.2590481043, -0.4295483232, -0.4468901455, 0.4916747808, 0.0198778789, -0.2651942968, 0.1151548252, -0.2458390445, -0.4626722634, -0.0033407656, 0.5650663972, -0.1606397182, -0.0972066298, 0.4177865088, 0.0059135025, 0.0520162843, -0.4645185769, 0.140715301, -0.0226491224, 0.1596688628, -0.0140339695, -0.4965684712, -0.0201720782, -0.4630059898, -0.2084348202, 0.3940345943, -0.2711070776, -0.3099861145, -0.0238772314, 0.2217529267, -0.2402871698, 0.0059975293, -0.0714804977, 0.0521042459, -0.3137901425, -0.0417635217, -0.13708134, 0.1919547468, -0.147814855, 0.0813204944, 0.1714700162, -0.1659355909, 0.2277072072, 0.0033453191, -0.187454626, 0.1649450809, 0.1627699733, -0.2344545722, 0.2292418033, 0.0988226905, 0.144421041, 0.3086493909, -0.2100578099, 0.0957050025, -0.2624315023, 0.2983239889, -0.2653518319, 0.1203861982, 0.0544190034, 0.1465217024, -0.0216826703, -0.459558636, -0.1376625299, 0.3717736006, 0.2018168718, -0.3964065015, -0.0214512553, -0.0741343126, 0.0003055925, -0.0498958156, 0.1014835015, 0.1136584803, -0.4338353574, -0.0991016179, -0.0695911571, 0.1668551564, 0.0413709879, 0.4769979715, -0.2406732887, -0.0016943674, 0.1298739463, 0.2944985032, -0.0079250438, 0.1406478733, -0.2155560255, -0.0801780373, 0.6388682127, -0.0573146977, -0.2702762485, 0.0628420487, -0.1214900836, 0.0706075653, -0.0278567467, 0.1578112096, -0.0948842168, -0.012869644, -0.0184741803, -0.3641974032, 0.2479722053, 0.2232213616, 0.2096704543, -0.2025904208, -0.1239567846, 0.3146232069, 0.0930861011, -0.2049705535, -0.1000240818, 0.3123936355, 0.2197782695, 0.1353083849, 0.3516611755, -0.1904548407, -0.0783340782, -0.1033201888, -0.4503235519, 0.1138189435, 0.4208243489, -0.224795714, -0.3842028975, -0.3467472792, 0.106940642, -0.2695676684, 0.0403118506, -0.1109492183, -0.1928630322, 0.1469337195, -0.1691977084, -0.3153447509, -0.1299066842, -0.0747417957, -0.2905252576, 0.4140482843, -0.3119817972, 0.2114654481, -0.0152958371, 0.2411212623, -0.2127110213, 0.148635596, 0.1532106996, -0.0725461841, 0.1858246177, 0.2266050726, 0.4529058933, 0.2760823667, 0.5355111957, -0.5498379469, -0.0086448863, 0.2895114124, 0.1784518957, -0.0589444935, -0.5726774335, 0.078967385, 0.4249207973, 0.0028087192, 0.2812070847, -0.0891249925, -0.1369205713, -0.0390578024, 0.0601684935, -0.1927033961, -0.0228142459, 0.2331893593, 0.2672103643, 0.2973284125, -0.2956995666, 0.1688206792, 0.1861184239, -0.2630075514, 0.0444294363, 0.1328229904, -0.5474490523, -0.2302993685, 0.0332791395, -0.1503331214, -0.1289110929, 0.0344537348, 0.1915321201, -0.1533610225, -0.1680428833, -0.1252953559, 0.2708814144, -0.0212537143, -0.3044991195, -0.2566543519, -0.1274338961, -0.0223317239, -0.1389683485, 0.2556281388, -0.099697113, 0.0149442013, -0.3301987052, 0.2602416575, 0.0299832113, -0.0868942365, -0.1960294992, -0.1635625809, -0.2488683611, -0.0509140193, -0.0062401122, 0.0555707999, 0.0800183043, -0.0115496665, -0.1427585781, 0.4850376546, -0.1470861286, 0.1867517829, -0.0164173748, -0.2713660002, -0.2431884259, 0.2103699297, 0.2645956576, -0.1789330989, -0.2447142005, -0.3091820478, -0.3024851084, -0.3940913379, -0.3749519289, 0.1970196366, -0.2094993889, 0.0385528393, 0.0277208928, 0.1748259217, -0.5439239144, -0.1631398499, -0.0401762091, -0.1210953221, -0.0790130645, -0.2031616718, -0.0244430527, -0.0962445512, 0.107574895, -0.4731317759, -0.1166657507, 0.4031416178, 0.0157227572, 0.3176194429, -0.0277785603, 0.1408165842, -0.059880767, -0.0406190529, 0.2494785637, 0.1290908009, -0.4799001217, -0.2105069906, 0.4358053207, -0.0284083802, -0.1621989012, -0.2142314017, -0.2048005462, 0.1530331671, 0.0487890616, -0.2156378478, -0.061677292, -0.3050423861, -0.2642214894, 0.3011389673, 0.3834314644, -0.1515818387, -0.0606884956, -0.0312172044, -0.1840979308, -0.0187144205, 0.2367312163, 0.2664716244, 0.2112923712, -0.2286884487, -0.4692655802, -0.5121155977, 1.0407930613, 0.182552889, -0.101801306, 0.1718465984, 0.2220472693, 0.1048513353, 0.0664469823, 0.1045498997, 0.0572127812, 0.1135688201, -0.0143871875, 0.5116860867, 0.1329766661, -0.4170604944, 0.0342964418, 0.1691180021, -0.6020397544, -0.1954277307, -0.1465611011, 0.2970228195, 0.2466923296, 0.2368283421, -0.0028762522, 0.0660989285, -0.4088566005, -0.0887969881, 0.0617680028, 0.0506606773, -0.1207097322, 0.2141331285, -0.1384864599, -0.6867519021, 0.1933726668, -0.070949398, -0.2052297294, 0.0560387112, 0.019449411, 0.0868581906, -0.0800294876, 0.1252578199, -0.3246700466, -0.1553138644, -0.097032547, -0.1469942331, 0.0126968632, -0.0250423141, -0.540325582, 0.0070911245, 0.1818079203, 0.1770075858, -0.3593623042, 0.1586028636, 0.3823164105, -0.066270709, -0.1340384185, 0.0394915491, 0.0597208366, -0.0261143707, 0.2145721316, -0.1636146009, -0.0589314252, 0.0720094442, -0.2767028213, 0.0830319822, 0.109154962, 0.2225003988, 0.5866470933, 0.2598197758, 0.3088316023, 0.126603961, 0.1405754983, -0.0172694623, 0.1246082857, 0.1883587539, 0.4441548586, -0.3815986216, 0.0418764353, -0.0205788873, -0.2442579418, -0.020868551, 0.2543657124, 0.1880320162, -0.0247268416, 0.5760332942, -0.3531188965, -0.0513543338, 0.0268813279, 0.2596485615, 0.080587104, -0.4422300756, -0.7111805081, 0.4129860401, 0.3456957638, -0.2478867322, -0.0011172434, 0.4646762908, -0.2808058858, 0.1282556951, 0.3057812452, 0.9812769294, -0.1408483386, 0.5032832623, 0.0965093598, 0.2022592276, 0.2007420957, -0.1934659928, -0.1131108776, -0.3900812566, -0.0107198488, -0.194806695, -0.0556964539, -0.3312035501, 0.2056026608, -0.1097879559, 0.3445867002, -0.1208687127, 0.1145378724, -0.1543721855, 0.0669136196, 0.2483334243, 0.2096649706, 0.2211127877, 0.1095281914, 0.111572586, 0.2460920364, -0.0531758554, 0.0593532659, -0.1016326249, 0.058149986, -0.4849035144, 0.0853029042, 0.1788758636, 0.2424291521, -0.0005604526, -0.5334536433, 0.1449190974, 0.2944182754, 0.5593868494, -0.0638764873, -0.4661137164, 0.405811578, -0.0868348032, 0.1213348731, -0.0691809133, -0.0592408665, 0.0723412111, 0.0326825492, -0.0503386334, 0.1156681776, 0.09168984, -0.1074123457, -0.5722080469, -0.0525915995, -0.0917848721, -0.2888647318, -0.0002393665, 0.1918549836, -0.1695802063, 0.0064625908, 0.061578054, -0.1173144206, 0.1855727881, 0.2290790975, 0.2940687835, -0.3287421167, -0.2035217285, 0.3612870574, 0.6086620688, 0.2955799103, 0.5356587768, -0.1068028733, -0.1889113188, -0.2103469074, -0.2012575269, 0.3934397101, -0.1953914911, 0.0757811517, -0.1093032658, 0.0502355099, 0.0399317667, 0.4836316109, 0.18751055, 0.2573178411, 0.0170723535, 0.0654169917, 0.0673966408, 0.0407560542, -0.160655424, 0.5022099614, 0.2771168053, -0.2831904888, 0.1389852762, -0.0427670889, -0.2440882325, 0.2964821458, -0.0983618647, 0.0290954243, -0.0750985444, -0.1111128479, -0.1471776217, -0.2076717913, 0.0225397106, -0.4305151701, -0.1581305265, -0.2058915496, -0.1212103814, 0.1397267282, -0.0677736402, -0.2945944667, -0.2339216471, -0.0598239414, -0.0185734313, -0.000152059, 0.0129812658, 0.1715542078, 0.3940028548, 0.1722124368, -0.0029348494, -0.1716358513, -0.3191103637, 0.167013213, 0.1354027092, 0.1584018469, 0.2739042938, 0.0659334511, 0.2369225174, 0.0057690362, 0.0120736919, 0.3034845293, 0.2247574925, 0.1233667061, 0.0962817967, 0.0573435463, 0.0691857189, 0.2848481238, 0.1961987764, 0.3843571246, -0.2311221212, -0.0829435661, 0.1619481593, 0.1932962835, -0.1112760082, -0.0962240919, 0.1826934665, -0.2088821977, -0.2195142955, 0.1951327175, 0.260096699, 0.2783451974, 0.1306709647, 0.0764358789, -0.2148829252, 0.0471829064, 0.4676145315, 0.2438168079, 0.2255599499, 0.1254581213, 0.2277617306, 0.1582163572, 0.1559791267, 0.161418438, 0.0979191661, 0.1106009781, -0.1034636274, -0.0271253791, 0.5461993814, 0.0388219506, 0.067728959, 0.0852848142, 0.0421055183, 0.2842885256, 0.2741175294, 0.4039291739, -0.2936074734, -0.2621203065, -0.5696950555, 0.0139664868, -0.0656386018, -0.3557181656, 0.0519287214, -0.4053052068, 0.2063619494, 0.141130507, -0.3217982948, -0.2162514627, 0.1946168542, 0.0757135525, -0.10937538, -0.4116971493, 0.183030799, 0.1711620092, 0.142201826, 0.0944694951, 0.1711366922, -0.190729171, -0.1423850358, 0.0793431997, 0.6095257998, -0.0323603712, 0.0049414141, -0.2050828487, -0.3360156715, 0.3389038146, -0.0195933655, 0.1750800908, -0.1984652281, 0.2157602757, -0.4320354462, 0.292524159, 0.0897910073, 0.0395126492, 0.0613230206, 0.1295153052, 0.2644069493, -0.25579831, -0.0652647391, -0.1294135302, 0.1327611357, -0.0701978803, -0.0012828751, -0.3846643567, 0.4658089876, 0.057936389, 0.2285820842, 0.1208449751, 0.11127159, 0.0252908692, 0.1268811077, 0.363268733, 0.3803140223, 0.0688279793, -0.3417421877, -0.1238423437, -0.1760856509, 0.0878644437, -0.208367154, 0.2201400995, -0.0782324597, 0.3059859276, -0.1753034592, 0.0076718661, 0.2532884181, -0.1376582533, -0.3357025981, 0.2708671689, -0.3088421524, -0.0135836694, -0.1889764518, 0.0675631016, -0.1638003439, 0.1567008793, 0.2238536924, -0.112517409, -0.0717946216, -0.0859608948, -0.1239655912, 0.2219491601, 0.2634162009, 0.1766875982, -0.0960950926, 0.2713316977, -0.0753870532, -0.1762154698, 0.1869933009, -0.3589597642, -0.0309925545, 0.0352216884, -0.2463648319, 0.0154424813, -0.1843356043, -0.0716844872, 0.1203959137, 0.2608820498, 0.1746184528, 0.1953512728, -0.2793254554, -0.3151469529, -0.0628897175, -0.2449341118, 0.0448937491, 0.4290234745, -0.1279314905, -0.0388097502, 0.0359487906, -0.225938201, 0.5050829053, -0.1065704376, -0.0702054501, -0.4230029285, -0.2444337904, 0.0838425905, 0.1866802871, -0.7867594361, 0.1392012239, 0.2918976843, -0.233957991, -0.1703790277, -0.0696731582, 0.242632255, 0.1770140231, -0.2896568179, 0.2271286994, -0.0063795792, -0.2858681679, -0.1549108922, -0.225344643 ]
https://github.com/huggingface/datasets/issues/665
runing dataset.map, it raises TypeError: can't pickle Tokenizer objects
Hi ! It works on my side with both the LongFormerTokenizer and the LongFormerTokenizerFast. Which version of transformers/datasets are you using ?
I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`. ``` def convert_to_features(example): # Tokenize contexts and questions (as pairs of inputs) input_pairs = [example['question'], example['context']] encodings = tokenizer.encode_plus(input_pairs, pad_to_max_length=True, max_length=512) context_encodings = tokenizer.encode_plus(example['context']) # Compute start and end tokens for labels using Transformers's fast tokenizers alignement methodes. # this will give us the position of answer span in the context text start_idx, end_idx = get_correct_alignement(example['context'], example['answers']) start_positions_context = context_encodings.char_to_token(start_idx) end_positions_context = context_encodings.char_to_token(end_idx-1) # here we will compute the start and end position of the answer in the whole example # as the example is encoded like this <s> question</s></s> context</s> # and we know the postion of the answer in the context # we can just find out the index of the sep token and then add that to position + 1 (+1 because there are two sep tokens) # this will give us the position of the answer span in whole example sep_idx = encodings['input_ids'].index(tokenizer.sep_token_id) start_positions = start_positions_context + sep_idx + 1 end_positions = end_positions_context + sep_idx + 1 if end_positions > 512: start_positions, end_positions = 0, 0 encodings.update({'start_positions': start_positions, 'end_positions': end_positions, 'attention_mask': encodings['attention_mask']}) return encodings ``` Then I run `dataset.map(convert_to_features)`, it raise ``` In [59]: a.map(convert_to_features) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-59-c453b508761d> in <module> ----> 1 a.map(convert_to_features) /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 365 file = StringIO() 366 with _no_cache_fields(obj): --> 367 dump(obj, file) 368 return file.getvalue() 369 /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 337 def dump(obj, file): 338 """pickle an object to a file""" --> 339 Pickler(file, recurse=True).dump(obj) 340 return 341 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 444 raise PicklingError(msg) 445 else: --> 446 StockPickler.dump(self, obj) 447 stack.clear() # clear record of 'recursion-sensitive' pickled objects 448 return /opt/conda/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_function(pickler, obj) 1436 globs, obj.__name__, 1437 obj.__defaults__, obj.__closure__, -> 1438 obj.__dict__, fkwdefaults), obj=obj) 1439 else: 1440 _super = ('super' in getattr(obj.func_code,'co_names',())) and (_byref is not None) and getattr(pickler, '_recurse', False) /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/pickle.py in save_tuple(self, obj) 787 write(MARK) 788 for element in obj: --> 789 save(element) 790 791 if id(obj) in memo: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle Tokenizer objects ```
22
runing dataset.map, it raises TypeError: can't pickle Tokenizer objects I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`. ``` def convert_to_features(example): # Tokenize contexts and questions (as pairs of inputs) input_pairs = [example['question'], example['context']] encodings = tokenizer.encode_plus(input_pairs, pad_to_max_length=True, max_length=512) context_encodings = tokenizer.encode_plus(example['context']) # Compute start and end tokens for labels using Transformers's fast tokenizers alignement methodes. # this will give us the position of answer span in the context text start_idx, end_idx = get_correct_alignement(example['context'], example['answers']) start_positions_context = context_encodings.char_to_token(start_idx) end_positions_context = context_encodings.char_to_token(end_idx-1) # here we will compute the start and end position of the answer in the whole example # as the example is encoded like this <s> question</s></s> context</s> # and we know the postion of the answer in the context # we can just find out the index of the sep token and then add that to position + 1 (+1 because there are two sep tokens) # this will give us the position of the answer span in whole example sep_idx = encodings['input_ids'].index(tokenizer.sep_token_id) start_positions = start_positions_context + sep_idx + 1 end_positions = end_positions_context + sep_idx + 1 if end_positions > 512: start_positions, end_positions = 0, 0 encodings.update({'start_positions': start_positions, 'end_positions': end_positions, 'attention_mask': encodings['attention_mask']}) return encodings ``` Then I run `dataset.map(convert_to_features)`, it raise ``` In [59]: a.map(convert_to_features) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-59-c453b508761d> in <module> ----> 1 a.map(convert_to_features) /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 365 file = StringIO() 366 with _no_cache_fields(obj): --> 367 dump(obj, file) 368 return file.getvalue() 369 /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 337 def dump(obj, file): 338 """pickle an object to a file""" --> 339 Pickler(file, recurse=True).dump(obj) 340 return 341 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 444 raise PicklingError(msg) 445 else: --> 446 StockPickler.dump(self, obj) 447 stack.clear() # clear record of 'recursion-sensitive' pickled objects 448 return /opt/conda/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_function(pickler, obj) 1436 globs, obj.__name__, 1437 obj.__defaults__, obj.__closure__, -> 1438 obj.__dict__, fkwdefaults), obj=obj) 1439 else: 1440 _super = ('super' in getattr(obj.func_code,'co_names',())) and (_byref is not None) and getattr(pickler, '_recurse', False) /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/pickle.py in save_tuple(self, obj) 787 write(MARK) 788 for element in obj: --> 789 save(element) 790 791 if id(obj) in memo: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle Tokenizer objects ``` Hi ! It works on my side with both the LongFormerTokenizer and the LongFormerTokenizerFast. Which version of transformers/datasets are you using ?
[ -0.2387793064, -0.2978487313, -0.0196805913, 0.2330354303, 0.4450324476, -0.1729923189, 0.2851523757, 0.1309392452, -0.276091218, 0.1103134975, -0.0697863922, 0.4891905189, -0.0087261396, -0.0467340946, -0.1457095742, -0.1114736199, 0.0535605326, 0.2078532726, 0.0181141309, -0.0561073758, -0.2787824571, 0.207442537, -0.4731769562, 0.1585230082, -0.2825991213, -0.2674279809, 0.1064045429, -0.1985801905, -0.2693117261, -0.3823215365, -0.1436450928, -0.0733661503, -0.0288478155, 0.5633369684, -0.0001192604, 0.0994179696, 0.1089545265, -0.145972237, 0.005223644, -0.0495663695, -0.0748075992, -0.3035498261, -0.2058744133, -0.4582726061, -0.1556462198, -0.1438440233, 0.0111552952, -0.3324888051, 0.5145231485, 0.2914210558, 0.1399782449, 0.4932262897, 0.0206352416, 0.0532784015, 0.0153279454, 0.0298239198, -0.131453231, -0.2608632147, 0.1487915516, 0.2165462971, -0.1302713007, 0.3254894018, -0.16130355, -0.2627823353, 0.0994699225, 0.0949373916, 0.1041131467, -0.4675593376, 0.3230481148, -0.0021583703, 0.2189716399, -0.0208102651, -0.2567600608, -0.2679678202, -0.0794852525, 0.0625911132, -0.0412522778, -0.2022153735, 0.0776131824, 0.051286459, -0.3526939452, -0.1723531932, -0.1798729748, 0.1082337722, 0.0383865014, 0.3674841821, -0.2666113079, 0.2930519283, 0.0967983454, -0.2501665652, -0.1138214841, -0.0991192684, 0.2264453322, 0.4768719375, -0.3883422613, -0.3008862436, -0.0943804905, -0.4099988341, 0.3477459848, -0.0384068899, -0.227679655, 0.2554123402, -0.0489556231, 0.1893793195, 0.0231761169, 0.3520214856, 0.2632216215, 0.3699641228, 0.0116729168, -0.1440163404, 0.0652596056, -0.0488729551, -0.0822232366, -0.221576035, -0.0569124147, 0.2582864761, 0.3595127463, -0.018612938, -0.0462388806, 0.0278619379, -0.2262803167, 0.042743206, 0.1734635979, 0.4068898261, 0.1080137193, 0.2318413407, -0.3183894455, 0.0902410001, -0.1242801398, 0.0253061932, -0.165486455, 0.2140230685, -0.0066214097, -0.1393791437, -0.1643194258, 0.0698125139, 0.2013428807, -0.0268375371, 0.0632025003, -0.2202775329, 0.0615381785, -0.1790308654, 0.2758252025, -0.0943107828, -0.050224077, 0.1737564951, 0.2081712782, -0.4094806015, -0.2060558796, 0.0352332778, -0.3411521316, 0.0173318814, 0.131188482, 0.1185403913, 0.0562378652, 0.0476906113, -0.3749631643, 0.2920552492, 0.4146036506, 0.007591249, 0.0322677419, -0.1267378628, -0.2016420215, -0.1111271605, 0.2182483375, 0.1899360418, -0.1373289227, -0.2079761922, 0.2503730059, -0.0020624166, 0.1535669118, 0.4049601555, -0.0530273505, 0.2562196553, -0.1467849314, 0.559774518, 0.4704820812, -0.625507772, -0.5309310555, 0.1032185107, -0.4468847215, -0.1779430062, -0.0353463739, 0.0416382886, 0.561388433, 0.1241551861, -0.1132062748, 0.3392554522, 0.0722959042, 0.2676003873, -0.1563939452, -0.1415294856, 0.4092996716, 0.092681706, 0.2170975804, 0.1164890528, -0.168253392, 0.1971370429, -0.1022471189, -0.1236947402, 0.0914444104, 0.1902047694, 0.1654273421, -0.2108137012, 0.0806121156, -0.1629787236, -0.5545788407, 0.0651860982, -0.3476859629, 0.2234149724, -0.2890501022, -0.1947725862, -0.2887653112, 0.1541355401, -0.4519183934, -0.0524004102, 0.0838472992, -0.0306146666, 0.1889375448, -0.013604735, 0.0192882679, -0.0761403516, 0.1458209902, 0.1860937476, -0.2552470863, 0.206203267, -0.2569343448, 0.0211482756, -0.059730567, 0.099063009, 0.4085006416, -0.1759830713, -0.255145669, 0.2755494118, 0.172052294, -0.0848681852, -0.0500597395, -0.0350359567, 0.2658096552, -0.2096953839, -0.064406991, 0.1785882711, 0.1667185277, -0.0287600961, -0.0929356292, 0.4431661665, 0.2247035354, 0.3178623319, -0.019105548, 0.1625135541, 0.2412848771, -0.1027472615, -0.0464949533, -0.1355440915, -0.1764929444, 0.0628634244, 0.2340397537, -0.0736531317, 0.0656427741, -0.059075132, 0.847992897, -0.0683463737, 0.0793829486, 0.2044740766, -0.116350919, 0.0497057475, -0.0788841099, -0.4018101096, 0.0417375378, 0.0392285511, -0.1734899431, -0.1066210642, 0.2546637654, 0.1459449381, 0.0415254608, 0.3150499761, 0.1146959215, 0.2255444378, 0.1599871963, 0.1129512414, -0.1720334589, -0.1941429526, 0.1629726738, 0.1452345103, -0.1468620449, -0.024432173, -0.0460565463, 0.0444772132, 0.0104705654, -0.0486727878, -0.1950333267, -0.2504670024, 0.0337897651, -0.0237583909, 0.0957350582, 0.4495550692, 0.3668554723, 0.3240295351, 0.4278210104, -0.1099203452, -0.1704415232, -0.1969798207, -0.0876938924, -0.0677345395, 0.1707259417, -0.005356261, -0.0357479304, 0.0103843929, 0.1024925411, -0.456127882, -0.4291421771, 0.2537454069, -0.1782850027, 0.1860092729, -0.0141354073, 0.1210131422, -0.3429493904, -0.2921086252, 0.2118502706, -0.2194128186, -0.3013741672, 0.0706817657, -0.0610883757, -0.3209869564, 0.0511770956, -0.2405866086, -0.3765722215, -0.3376920223, 0.3630160093, -0.0082481569, 0.1135795265, 0.1541582793, -0.0030259092, 0.2885194719, -0.0200713351, -0.0359077342, -0.244001627, 0.0543055683, 0.4122084379, -0.1826187521, -0.2826856673, -0.391576916, -0.1759160608, 0.0525785871, -0.1293790936, -0.1020928621, -0.2275469899, -0.271194011, 0.2238457948, -0.1608631164, 0.045888029, 0.5580424666, -0.0492364317, 0.0907654762, 0.0115672322, -0.160931915, 0.2720035315, 0.1358188838, 0.0812893808, -0.0107792886, 0.5259885192, 0.1519600451, 0.8704360723, 0.1582152545, -0.2194379717, 0.1683555543, -0.1485035121, -0.0106374593, -0.0340547934, -0.3892844617, 0.1844978034, -0.0443503037, 0.1226070747, 0.1395881027, -0.209491834, -0.1556349695, 0.1454911828, -0.0947225913, -0.2187252492, -0.2757362127, -0.0225728881, 0.0979046226, 0.0983443111, 0.047766529, 0.1866318733, -0.4435555339, 0.0679603964, 0.1192271113, 0.0044027381, 0.0480468422, -0.0468374304, -1.0162569284, -0.0913211331, -0.1702793837, 0.3654930592, 0.2294978201, 0.4982431233, -0.0179928597, -0.0469949953, 0.0515057296, -0.2121097893, 0.8495112062, 0.2505566776, -0.0532122888, 0.0796273127, 0.0189494062, -0.1545514464, 0.0577013195, -0.1632409543, 0.6255756617, 0.4945645034, 0.7852732539, -0.4374045432, -0.0893703476, 0.0312041119, -0.0599598736, -0.1476592869, 0.0810301825, -0.2087637633, -0.1804115623, -0.5762068033, 0.2585668266, 0.2810133696, 0.1928339005, 0.1528313756, -0.2231671959, 0.0690150782, -0.2840030789, -0.0985405222, 0.2312043756, 0.2143351138, 0.1858995557, -0.0022408559, 0.1455385536, -0.1561148316, -0.2068819404, 0.1899430454, 0.2558946609, -0.623185873, 0.2523160875, 0.1651499718, 0.5603797436, 0.1582311094, -0.1150252298, 0.2946461141, -0.0105133373, 0.479395777, -0.0390629433, 0.4788195491, 0.3626246154, 0.2778423727, -0.3016586304, -0.1384535581, 0.3859471679, -0.0154792974, 0.0721444264, 0.015305832, 0.2642337382, -0.152379334, 0.5785443187, 0.1050154045, 1.0689463615, -0.0962893516, -0.09116216, 0.1268846542, 0.2655838728, 0.5600721836, -0.2914606929, 0.2052386403, -0.5174928904, -0.0904989392, 0.0042559877, -0.1398294866, 0.1350088567, 0.1887043864, -0.430057317, 0.1389256716, 0.0992786959, 0.4275939763, 0.0399221145, 0.4134415388, -0.0181037094, -0.4771102369, -0.1259957999, 0.0662658662, -0.2162791044, 0.2179785818, 0.0931359753, 0.0167734399, -0.2299903929, -0.333407253, -0.0685395822, 0.0877208486, -0.398034662, 0.6731895208, 0.3429540992, -0.1945346594, 0.2956731617, 0.229450196, 0.1547932476, 0.2516961992, -0.06370911, 0.1682656854, 0.1497502029, -0.0029829429, 0.1993836164, -0.0682336912, 0.1190656945, -0.0103188921, -0.1015118659, 0.1754912585, -0.0124606993, -0.2762166858, -0.2717877328, -0.1240052581, 0.2903384268, -0.3395359516, -0.2814122438, -0.0395573862, -0.2850348353, -0.20351322, 0.0220347326, -0.0706589147, -0.37479949, 0.2263819128, 0.2376688123, -0.1426928341, 0.1695864201, 0.3712312579, -0.0255006161, -0.0888266861, 0.55849123, 0.0715674981, -0.1946098357, -0.2024846226, 0.1518792808, -0.0337788872, -0.2271941751, 0.1091583073, -0.1162662581, -0.2636434436, -0.228795588, 0.3435635269, -0.0256999005, 0.0402621701, -0.2143466771, -0.4193456769, -0.5076625943, 0.0499492101, -0.1311997622, 0.1811649352, 0.4385975003, 0.4080055952, -0.2568693161, 0.3760202825, -0.2495920062, -0.0800240263, -0.5987673402, 0.2662304342, 0.0188428126, -0.5459759235, -0.0275539123, 0.0216406267, 0.0264435783, 0.2940588295, -0.1200793236, -0.1588125229, -0.0702610016, 0.1605631262, 0.2280810773, -0.1013727859, -0.2458607405, 0.1184101254, -0.1792993546, -0.1568113267, 0.1025062203, 0.1319526881, 0.0121631492, 0.1235532314, -0.0908354148, -0.1170051619, -0.0513541922, -0.086523287, 0.0492477901, -0.1551796198, 0.2005682141, 0.388777405, -0.1900875419, -0.0090763913, -0.2909187675, 0.1795438081, 0.693025887, 0.0096778013, 0.393394649, -0.3145880103, -0.1508097947, 0.2292111814, -0.2073031217, 0.1850659698, -0.323890686, -0.0958862156, 0.2286645025, 0.1294851452, -0.2605692744, -0.2062440813, 0.5028803945, -0.3981368542, 0.1572270095, 0.1296643019, -0.0983622149, 0.2678847611, 0.1832061857, 0.160304606, 0.7458074689, 0.0117862113, 0.1765501648, -0.0622488782, -0.0920017809, 0.0551158004, 0.5123580098, 0.1351605952, 0.2308290601, 0.1101418212, -0.2032731622, 0.3773396909, -0.4285533428, 0.2233324647, 0.3698288202, -0.1252682209, -0.1937610507, 0.208747074, -0.1403711885, 0.2644396126, -0.0434947833, 0.352260083, -0.1093695387, -0.1740658879, -0.1687216461, 0.4904872179, -0.3190308809, -0.0490969718, -0.0212327018, -0.0759383813, -0.1959421039, -0.2856764495, 0.0508423895, -0.0616605058, 0.1097758934, 0.0157874823, -0.080427587, 0.2032716721, -0.1478795409, 0.1775083393, 0.2425410599, -0.3291361034, 0.2424014658, 0.1096198484, 0.2629411221, -0.2478345037, 0.1149145588, 0.3023825884, 0.268660605, -0.4128153324, 0.1197531298, -0.0614378452, -0.1552256644, 0.1539586782, 0.1354498416, -0.1843045652, -0.219290331, 0.2301809043, 0.0778794214, -0.2095595896, -0.1722646207, 0.1902218461, 0.1092763692, 0.1233892664, -0.0497295521, -0.0805692747, -0.205393374, -0.3169716895, -0.1771354973, -0.3990468681, -0.048668962, 0.0820414275, -0.2334051132, 0.2352662534, -0.3069976866, 0.080678381, 0.0823598057, 0.3644183576, 0.315518111, 0.0889510512, -0.3957802653, -0.0233591516, -0.4049154222, 0.2132006586, 0.3097580075, -0.1938924491, 0.0852777287, 0.1949707568, 0.0605364554, 0.3144335151, -0.1063979939, 0.057046745, -0.131813854, -0.0067868624, -0.2199010998, 0.1342487633, -0.1653566957, 0.1062283069, 0.2053379565, -0.3196311593, 0.3005921841, 0.2335089594, -0.0160383843, -0.203766942, -0.0731839016, -0.2135286182, -0.3241594136, -0.0482807383, 0.2011154443, 0.298532337, -0.2826666832, 0.1801340878, 0.2097663879, -0.0438413285, -0.287552774, -0.1931218952, 0.1564356387, 0.4927532971, -0.0002100572, 0.12636967, -0.3023885787, -0.1757033318, 0.0875674933, -0.2813341022, -0.2423000634, 0.3333650529, -0.2057005018, 0.1753342003, -0.014725904, 0.2186225504, 0.0708540455, 0.283408314, -0.245333299, -0.4549573958, 0.6601228118, -0.4289315939, -0.4800796211, -0.056264773, -0.0659725964, 0.1373785436, -0.2057527155, -0.2559032142, -0.150451988, 0.2913419902, 0.0845628828, -0.2006699145, 0.051886376, 0.1554603577, -0.0358310938, -0.1501897424, 0.3721498251, 0.1291875988, 0.0628955588, 0.1038765386, -0.2139436007 ]
https://github.com/huggingface/datasets/issues/665
runing dataset.map, it raises TypeError: can't pickle Tokenizer objects
Then I guess you need to give us more informations on your setup (OS, python, GPU, etc) or a Google Colab reproducing the error for us to be able to debug this error.
I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`. ``` def convert_to_features(example): # Tokenize contexts and questions (as pairs of inputs) input_pairs = [example['question'], example['context']] encodings = tokenizer.encode_plus(input_pairs, pad_to_max_length=True, max_length=512) context_encodings = tokenizer.encode_plus(example['context']) # Compute start and end tokens for labels using Transformers's fast tokenizers alignement methodes. # this will give us the position of answer span in the context text start_idx, end_idx = get_correct_alignement(example['context'], example['answers']) start_positions_context = context_encodings.char_to_token(start_idx) end_positions_context = context_encodings.char_to_token(end_idx-1) # here we will compute the start and end position of the answer in the whole example # as the example is encoded like this <s> question</s></s> context</s> # and we know the postion of the answer in the context # we can just find out the index of the sep token and then add that to position + 1 (+1 because there are two sep tokens) # this will give us the position of the answer span in whole example sep_idx = encodings['input_ids'].index(tokenizer.sep_token_id) start_positions = start_positions_context + sep_idx + 1 end_positions = end_positions_context + sep_idx + 1 if end_positions > 512: start_positions, end_positions = 0, 0 encodings.update({'start_positions': start_positions, 'end_positions': end_positions, 'attention_mask': encodings['attention_mask']}) return encodings ``` Then I run `dataset.map(convert_to_features)`, it raise ``` In [59]: a.map(convert_to_features) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-59-c453b508761d> in <module> ----> 1 a.map(convert_to_features) /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 365 file = StringIO() 366 with _no_cache_fields(obj): --> 367 dump(obj, file) 368 return file.getvalue() 369 /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 337 def dump(obj, file): 338 """pickle an object to a file""" --> 339 Pickler(file, recurse=True).dump(obj) 340 return 341 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 444 raise PicklingError(msg) 445 else: --> 446 StockPickler.dump(self, obj) 447 stack.clear() # clear record of 'recursion-sensitive' pickled objects 448 return /opt/conda/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_function(pickler, obj) 1436 globs, obj.__name__, 1437 obj.__defaults__, obj.__closure__, -> 1438 obj.__dict__, fkwdefaults), obj=obj) 1439 else: 1440 _super = ('super' in getattr(obj.func_code,'co_names',())) and (_byref is not None) and getattr(pickler, '_recurse', False) /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/pickle.py in save_tuple(self, obj) 787 write(MARK) 788 for element in obj: --> 789 save(element) 790 791 if id(obj) in memo: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle Tokenizer objects ```
33
runing dataset.map, it raises TypeError: can't pickle Tokenizer objects I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`. ``` def convert_to_features(example): # Tokenize contexts and questions (as pairs of inputs) input_pairs = [example['question'], example['context']] encodings = tokenizer.encode_plus(input_pairs, pad_to_max_length=True, max_length=512) context_encodings = tokenizer.encode_plus(example['context']) # Compute start and end tokens for labels using Transformers's fast tokenizers alignement methodes. # this will give us the position of answer span in the context text start_idx, end_idx = get_correct_alignement(example['context'], example['answers']) start_positions_context = context_encodings.char_to_token(start_idx) end_positions_context = context_encodings.char_to_token(end_idx-1) # here we will compute the start and end position of the answer in the whole example # as the example is encoded like this <s> question</s></s> context</s> # and we know the postion of the answer in the context # we can just find out the index of the sep token and then add that to position + 1 (+1 because there are two sep tokens) # this will give us the position of the answer span in whole example sep_idx = encodings['input_ids'].index(tokenizer.sep_token_id) start_positions = start_positions_context + sep_idx + 1 end_positions = end_positions_context + sep_idx + 1 if end_positions > 512: start_positions, end_positions = 0, 0 encodings.update({'start_positions': start_positions, 'end_positions': end_positions, 'attention_mask': encodings['attention_mask']}) return encodings ``` Then I run `dataset.map(convert_to_features)`, it raise ``` In [59]: a.map(convert_to_features) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-59-c453b508761d> in <module> ----> 1 a.map(convert_to_features) /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 365 file = StringIO() 366 with _no_cache_fields(obj): --> 367 dump(obj, file) 368 return file.getvalue() 369 /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 337 def dump(obj, file): 338 """pickle an object to a file""" --> 339 Pickler(file, recurse=True).dump(obj) 340 return 341 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 444 raise PicklingError(msg) 445 else: --> 446 StockPickler.dump(self, obj) 447 stack.clear() # clear record of 'recursion-sensitive' pickled objects 448 return /opt/conda/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_function(pickler, obj) 1436 globs, obj.__name__, 1437 obj.__defaults__, obj.__closure__, -> 1438 obj.__dict__, fkwdefaults), obj=obj) 1439 else: 1440 _super = ('super' in getattr(obj.func_code,'co_names',())) and (_byref is not None) and getattr(pickler, '_recurse', False) /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/pickle.py in save_tuple(self, obj) 787 write(MARK) 788 for element in obj: --> 789 save(element) 790 791 if id(obj) in memo: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle Tokenizer objects ``` Then I guess you need to give us more informations on your setup (OS, python, GPU, etc) or a Google Colab reproducing the error for us to be able to debug this error.
[ -0.2387793064, -0.2978487313, -0.0196805913, 0.2330354303, 0.4450324476, -0.1729923189, 0.2851523757, 0.1309392452, -0.276091218, 0.1103134975, -0.0697863922, 0.4891905189, -0.0087261396, -0.0467340946, -0.1457095742, -0.1114736199, 0.0535605326, 0.2078532726, 0.0181141309, -0.0561073758, -0.2787824571, 0.207442537, -0.4731769562, 0.1585230082, -0.2825991213, -0.2674279809, 0.1064045429, -0.1985801905, -0.2693117261, -0.3823215365, -0.1436450928, -0.0733661503, -0.0288478155, 0.5633369684, -0.0001192604, 0.0994179696, 0.1089545265, -0.145972237, 0.005223644, -0.0495663695, -0.0748075992, -0.3035498261, -0.2058744133, -0.4582726061, -0.1556462198, -0.1438440233, 0.0111552952, -0.3324888051, 0.5145231485, 0.2914210558, 0.1399782449, 0.4932262897, 0.0206352416, 0.0532784015, 0.0153279454, 0.0298239198, -0.131453231, -0.2608632147, 0.1487915516, 0.2165462971, -0.1302713007, 0.3254894018, -0.16130355, -0.2627823353, 0.0994699225, 0.0949373916, 0.1041131467, -0.4675593376, 0.3230481148, -0.0021583703, 0.2189716399, -0.0208102651, -0.2567600608, -0.2679678202, -0.0794852525, 0.0625911132, -0.0412522778, -0.2022153735, 0.0776131824, 0.051286459, -0.3526939452, -0.1723531932, -0.1798729748, 0.1082337722, 0.0383865014, 0.3674841821, -0.2666113079, 0.2930519283, 0.0967983454, -0.2501665652, -0.1138214841, -0.0991192684, 0.2264453322, 0.4768719375, -0.3883422613, -0.3008862436, -0.0943804905, -0.4099988341, 0.3477459848, -0.0384068899, -0.227679655, 0.2554123402, -0.0489556231, 0.1893793195, 0.0231761169, 0.3520214856, 0.2632216215, 0.3699641228, 0.0116729168, -0.1440163404, 0.0652596056, -0.0488729551, -0.0822232366, -0.221576035, -0.0569124147, 0.2582864761, 0.3595127463, -0.018612938, -0.0462388806, 0.0278619379, -0.2262803167, 0.042743206, 0.1734635979, 0.4068898261, 0.1080137193, 0.2318413407, -0.3183894455, 0.0902410001, -0.1242801398, 0.0253061932, -0.165486455, 0.2140230685, -0.0066214097, -0.1393791437, -0.1643194258, 0.0698125139, 0.2013428807, -0.0268375371, 0.0632025003, -0.2202775329, 0.0615381785, -0.1790308654, 0.2758252025, -0.0943107828, -0.050224077, 0.1737564951, 0.2081712782, -0.4094806015, -0.2060558796, 0.0352332778, -0.3411521316, 0.0173318814, 0.131188482, 0.1185403913, 0.0562378652, 0.0476906113, -0.3749631643, 0.2920552492, 0.4146036506, 0.007591249, 0.0322677419, -0.1267378628, -0.2016420215, -0.1111271605, 0.2182483375, 0.1899360418, -0.1373289227, -0.2079761922, 0.2503730059, -0.0020624166, 0.1535669118, 0.4049601555, -0.0530273505, 0.2562196553, -0.1467849314, 0.559774518, 0.4704820812, -0.625507772, -0.5309310555, 0.1032185107, -0.4468847215, -0.1779430062, -0.0353463739, 0.0416382886, 0.561388433, 0.1241551861, -0.1132062748, 0.3392554522, 0.0722959042, 0.2676003873, -0.1563939452, -0.1415294856, 0.4092996716, 0.092681706, 0.2170975804, 0.1164890528, -0.168253392, 0.1971370429, -0.1022471189, -0.1236947402, 0.0914444104, 0.1902047694, 0.1654273421, -0.2108137012, 0.0806121156, -0.1629787236, -0.5545788407, 0.0651860982, -0.3476859629, 0.2234149724, -0.2890501022, -0.1947725862, -0.2887653112, 0.1541355401, -0.4519183934, -0.0524004102, 0.0838472992, -0.0306146666, 0.1889375448, -0.013604735, 0.0192882679, -0.0761403516, 0.1458209902, 0.1860937476, -0.2552470863, 0.206203267, -0.2569343448, 0.0211482756, -0.059730567, 0.099063009, 0.4085006416, -0.1759830713, -0.255145669, 0.2755494118, 0.172052294, -0.0848681852, -0.0500597395, -0.0350359567, 0.2658096552, -0.2096953839, -0.064406991, 0.1785882711, 0.1667185277, -0.0287600961, -0.0929356292, 0.4431661665, 0.2247035354, 0.3178623319, -0.019105548, 0.1625135541, 0.2412848771, -0.1027472615, -0.0464949533, -0.1355440915, -0.1764929444, 0.0628634244, 0.2340397537, -0.0736531317, 0.0656427741, -0.059075132, 0.847992897, -0.0683463737, 0.0793829486, 0.2044740766, -0.116350919, 0.0497057475, -0.0788841099, -0.4018101096, 0.0417375378, 0.0392285511, -0.1734899431, -0.1066210642, 0.2546637654, 0.1459449381, 0.0415254608, 0.3150499761, 0.1146959215, 0.2255444378, 0.1599871963, 0.1129512414, -0.1720334589, -0.1941429526, 0.1629726738, 0.1452345103, -0.1468620449, -0.024432173, -0.0460565463, 0.0444772132, 0.0104705654, -0.0486727878, -0.1950333267, -0.2504670024, 0.0337897651, -0.0237583909, 0.0957350582, 0.4495550692, 0.3668554723, 0.3240295351, 0.4278210104, -0.1099203452, -0.1704415232, -0.1969798207, -0.0876938924, -0.0677345395, 0.1707259417, -0.005356261, -0.0357479304, 0.0103843929, 0.1024925411, -0.456127882, -0.4291421771, 0.2537454069, -0.1782850027, 0.1860092729, -0.0141354073, 0.1210131422, -0.3429493904, -0.2921086252, 0.2118502706, -0.2194128186, -0.3013741672, 0.0706817657, -0.0610883757, -0.3209869564, 0.0511770956, -0.2405866086, -0.3765722215, -0.3376920223, 0.3630160093, -0.0082481569, 0.1135795265, 0.1541582793, -0.0030259092, 0.2885194719, -0.0200713351, -0.0359077342, -0.244001627, 0.0543055683, 0.4122084379, -0.1826187521, -0.2826856673, -0.391576916, -0.1759160608, 0.0525785871, -0.1293790936, -0.1020928621, -0.2275469899, -0.271194011, 0.2238457948, -0.1608631164, 0.045888029, 0.5580424666, -0.0492364317, 0.0907654762, 0.0115672322, -0.160931915, 0.2720035315, 0.1358188838, 0.0812893808, -0.0107792886, 0.5259885192, 0.1519600451, 0.8704360723, 0.1582152545, -0.2194379717, 0.1683555543, -0.1485035121, -0.0106374593, -0.0340547934, -0.3892844617, 0.1844978034, -0.0443503037, 0.1226070747, 0.1395881027, -0.209491834, -0.1556349695, 0.1454911828, -0.0947225913, -0.2187252492, -0.2757362127, -0.0225728881, 0.0979046226, 0.0983443111, 0.047766529, 0.1866318733, -0.4435555339, 0.0679603964, 0.1192271113, 0.0044027381, 0.0480468422, -0.0468374304, -1.0162569284, -0.0913211331, -0.1702793837, 0.3654930592, 0.2294978201, 0.4982431233, -0.0179928597, -0.0469949953, 0.0515057296, -0.2121097893, 0.8495112062, 0.2505566776, -0.0532122888, 0.0796273127, 0.0189494062, -0.1545514464, 0.0577013195, -0.1632409543, 0.6255756617, 0.4945645034, 0.7852732539, -0.4374045432, -0.0893703476, 0.0312041119, -0.0599598736, -0.1476592869, 0.0810301825, -0.2087637633, -0.1804115623, -0.5762068033, 0.2585668266, 0.2810133696, 0.1928339005, 0.1528313756, -0.2231671959, 0.0690150782, -0.2840030789, -0.0985405222, 0.2312043756, 0.2143351138, 0.1858995557, -0.0022408559, 0.1455385536, -0.1561148316, -0.2068819404, 0.1899430454, 0.2558946609, -0.623185873, 0.2523160875, 0.1651499718, 0.5603797436, 0.1582311094, -0.1150252298, 0.2946461141, -0.0105133373, 0.479395777, -0.0390629433, 0.4788195491, 0.3626246154, 0.2778423727, -0.3016586304, -0.1384535581, 0.3859471679, -0.0154792974, 0.0721444264, 0.015305832, 0.2642337382, -0.152379334, 0.5785443187, 0.1050154045, 1.0689463615, -0.0962893516, -0.09116216, 0.1268846542, 0.2655838728, 0.5600721836, -0.2914606929, 0.2052386403, -0.5174928904, -0.0904989392, 0.0042559877, -0.1398294866, 0.1350088567, 0.1887043864, -0.430057317, 0.1389256716, 0.0992786959, 0.4275939763, 0.0399221145, 0.4134415388, -0.0181037094, -0.4771102369, -0.1259957999, 0.0662658662, -0.2162791044, 0.2179785818, 0.0931359753, 0.0167734399, -0.2299903929, -0.333407253, -0.0685395822, 0.0877208486, -0.398034662, 0.6731895208, 0.3429540992, -0.1945346594, 0.2956731617, 0.229450196, 0.1547932476, 0.2516961992, -0.06370911, 0.1682656854, 0.1497502029, -0.0029829429, 0.1993836164, -0.0682336912, 0.1190656945, -0.0103188921, -0.1015118659, 0.1754912585, -0.0124606993, -0.2762166858, -0.2717877328, -0.1240052581, 0.2903384268, -0.3395359516, -0.2814122438, -0.0395573862, -0.2850348353, -0.20351322, 0.0220347326, -0.0706589147, -0.37479949, 0.2263819128, 0.2376688123, -0.1426928341, 0.1695864201, 0.3712312579, -0.0255006161, -0.0888266861, 0.55849123, 0.0715674981, -0.1946098357, -0.2024846226, 0.1518792808, -0.0337788872, -0.2271941751, 0.1091583073, -0.1162662581, -0.2636434436, -0.228795588, 0.3435635269, -0.0256999005, 0.0402621701, -0.2143466771, -0.4193456769, -0.5076625943, 0.0499492101, -0.1311997622, 0.1811649352, 0.4385975003, 0.4080055952, -0.2568693161, 0.3760202825, -0.2495920062, -0.0800240263, -0.5987673402, 0.2662304342, 0.0188428126, -0.5459759235, -0.0275539123, 0.0216406267, 0.0264435783, 0.2940588295, -0.1200793236, -0.1588125229, -0.0702610016, 0.1605631262, 0.2280810773, -0.1013727859, -0.2458607405, 0.1184101254, -0.1792993546, -0.1568113267, 0.1025062203, 0.1319526881, 0.0121631492, 0.1235532314, -0.0908354148, -0.1170051619, -0.0513541922, -0.086523287, 0.0492477901, -0.1551796198, 0.2005682141, 0.388777405, -0.1900875419, -0.0090763913, -0.2909187675, 0.1795438081, 0.693025887, 0.0096778013, 0.393394649, -0.3145880103, -0.1508097947, 0.2292111814, -0.2073031217, 0.1850659698, -0.323890686, -0.0958862156, 0.2286645025, 0.1294851452, -0.2605692744, -0.2062440813, 0.5028803945, -0.3981368542, 0.1572270095, 0.1296643019, -0.0983622149, 0.2678847611, 0.1832061857, 0.160304606, 0.7458074689, 0.0117862113, 0.1765501648, -0.0622488782, -0.0920017809, 0.0551158004, 0.5123580098, 0.1351605952, 0.2308290601, 0.1101418212, -0.2032731622, 0.3773396909, -0.4285533428, 0.2233324647, 0.3698288202, -0.1252682209, -0.1937610507, 0.208747074, -0.1403711885, 0.2644396126, -0.0434947833, 0.352260083, -0.1093695387, -0.1740658879, -0.1687216461, 0.4904872179, -0.3190308809, -0.0490969718, -0.0212327018, -0.0759383813, -0.1959421039, -0.2856764495, 0.0508423895, -0.0616605058, 0.1097758934, 0.0157874823, -0.080427587, 0.2032716721, -0.1478795409, 0.1775083393, 0.2425410599, -0.3291361034, 0.2424014658, 0.1096198484, 0.2629411221, -0.2478345037, 0.1149145588, 0.3023825884, 0.268660605, -0.4128153324, 0.1197531298, -0.0614378452, -0.1552256644, 0.1539586782, 0.1354498416, -0.1843045652, -0.219290331, 0.2301809043, 0.0778794214, -0.2095595896, -0.1722646207, 0.1902218461, 0.1092763692, 0.1233892664, -0.0497295521, -0.0805692747, -0.205393374, -0.3169716895, -0.1771354973, -0.3990468681, -0.048668962, 0.0820414275, -0.2334051132, 0.2352662534, -0.3069976866, 0.080678381, 0.0823598057, 0.3644183576, 0.315518111, 0.0889510512, -0.3957802653, -0.0233591516, -0.4049154222, 0.2132006586, 0.3097580075, -0.1938924491, 0.0852777287, 0.1949707568, 0.0605364554, 0.3144335151, -0.1063979939, 0.057046745, -0.131813854, -0.0067868624, -0.2199010998, 0.1342487633, -0.1653566957, 0.1062283069, 0.2053379565, -0.3196311593, 0.3005921841, 0.2335089594, -0.0160383843, -0.203766942, -0.0731839016, -0.2135286182, -0.3241594136, -0.0482807383, 0.2011154443, 0.298532337, -0.2826666832, 0.1801340878, 0.2097663879, -0.0438413285, -0.287552774, -0.1931218952, 0.1564356387, 0.4927532971, -0.0002100572, 0.12636967, -0.3023885787, -0.1757033318, 0.0875674933, -0.2813341022, -0.2423000634, 0.3333650529, -0.2057005018, 0.1753342003, -0.014725904, 0.2186225504, 0.0708540455, 0.283408314, -0.245333299, -0.4549573958, 0.6601228118, -0.4289315939, -0.4800796211, -0.056264773, -0.0659725964, 0.1373785436, -0.2057527155, -0.2559032142, -0.150451988, 0.2913419902, 0.0845628828, -0.2006699145, 0.051886376, 0.1554603577, -0.0358310938, -0.1501897424, 0.3721498251, 0.1291875988, 0.0628955588, 0.1038765386, -0.2139436007 ]
https://github.com/huggingface/datasets/issues/665
runing dataset.map, it raises TypeError: can't pickle Tokenizer objects
I have the same issue with `transformers/BertJapaneseTokenizer`. ```python # train_ds = Dataset(features: { # 'title': Value(dtype='string', id=None), # 'score': Value(dtype='float64', id=None) # }, num_rows: 99999) t = BertJapaneseTokenizer.from_pretrained('bert-base-japanese-whole-word-masking') encoded = train_ds.map(lambda examples: {'tokens': t.encode(examples['title'])}, batched=True) ``` <details><summary>Error Message</summary> ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-35-2b7d66b291c1> in <module> 2 3 encoded = train_ds.map(lambda examples: ----> 4 {'tokens': t.encode(examples['title'])}, batched=True) /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /usr/local/lib/python3.6/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 /usr/local/lib/python3.6/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 /usr/local/lib/python3.6/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): /usr/local/lib/python3.6/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): /usr/local/lib/python3.6/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod /usr/local/lib/python3.6/site-packages/datasets/utils/py_utils.py in dumps(obj) 365 file = StringIO() 366 with _no_cache_fields(obj): --> 367 dump(obj, file) 368 return file.getvalue() 369 /usr/local/lib/python3.6/site-packages/datasets/utils/py_utils.py in dump(obj, file) 337 def dump(obj, file): 338 """pickle an object to a file""" --> 339 Pickler(file, recurse=True).dump(obj) 340 return 341 /usr/local/lib/python3.6/site-packages/dill/_dill.py in dump(self, obj) 444 raise PicklingError(msg) 445 else: --> 446 StockPickler.dump(self, obj) 447 stack.clear() # clear record of 'recursion-sensitive' pickled objects 448 return /usr/local/lib/python3.6/pickle.py in dump(self, obj) 407 if self.proto >= 4: 408 self.framer.start_framing() --> 409 self.save(obj) 410 self.write(STOP) 411 self.framer.end_framing() /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 474 f = self.dispatch.get(t) 475 if f is not None: --> 476 f(self, obj) # Call unbound method with explicit self 477 return 478 /usr/local/lib/python3.6/site-packages/dill/_dill.py in save_function(pickler, obj) 1436 globs, obj.__name__, 1437 obj.__defaults__, obj.__closure__, -> 1438 obj.__dict__, fkwdefaults), obj=obj) 1439 else: 1440 _super = ('super' in getattr(obj.func_code,'co_names',())) and (_byref is not None) and getattr(pickler, '_recurse', False) /usr/local/lib/python3.6/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 608 else: 609 save(func) --> 610 save(args) 611 write(REDUCE) 612 /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 474 f = self.dispatch.get(t) 475 if f is not None: --> 476 f(self, obj) # Call unbound method with explicit self 477 return 478 /usr/local/lib/python3.6/pickle.py in save_tuple(self, obj) 749 write(MARK) 750 for element in obj: --> 751 save(element) 752 753 if id(obj) in memo: /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 474 f = self.dispatch.get(t) 475 if f is not None: --> 476 f(self, obj) # Call unbound method with explicit self 477 return 478 /usr/local/lib/python3.6/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /usr/local/lib/python3.6/pickle.py in save_dict(self, obj) 819 820 self.memoize(obj) --> 821 self._batch_setitems(obj.items()) 822 823 dispatch[dict] = save_dict /usr/local/lib/python3.6/pickle.py in _batch_setitems(self, items) 850 k, v = tmp[0] 851 save(k) --> 852 save(v) 853 write(SETITEM) 854 # else tmp is empty, and we're done /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 519 520 # Save the reduce() output and finally memoize the object --> 521 self.save_reduce(obj=obj, *rv) 522 523 def persistent_id(self, obj): /usr/local/lib/python3.6/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 632 633 if state is not None: --> 634 save(state) 635 write(BUILD) 636 /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 474 f = self.dispatch.get(t) 475 if f is not None: --> 476 f(self, obj) # Call unbound method with explicit self 477 return 478 /usr/local/lib/python3.6/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /usr/local/lib/python3.6/pickle.py in save_dict(self, obj) 819 820 self.memoize(obj) --> 821 self._batch_setitems(obj.items()) 822 823 dispatch[dict] = save_dict /usr/local/lib/python3.6/pickle.py in _batch_setitems(self, items) 845 for k, v in tmp: 846 save(k) --> 847 save(v) 848 write(SETITEMS) 849 elif n: /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 519 520 # Save the reduce() output and finally memoize the object --> 521 self.save_reduce(obj=obj, *rv) 522 523 def persistent_id(self, obj): /usr/local/lib/python3.6/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 632 633 if state is not None: --> 634 save(state) 635 write(BUILD) 636 /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 474 f = self.dispatch.get(t) 475 if f is not None: --> 476 f(self, obj) # Call unbound method with explicit self 477 return 478 /usr/local/lib/python3.6/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /usr/local/lib/python3.6/pickle.py in save_dict(self, obj) 819 820 self.memoize(obj) --> 821 self._batch_setitems(obj.items()) 822 823 dispatch[dict] = save_dict /usr/local/lib/python3.6/pickle.py in _batch_setitems(self, items) 845 for k, v in tmp: 846 save(k) --> 847 save(v) 848 write(SETITEMS) 849 elif n: /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 494 reduce = getattr(obj, "__reduce_ex__", None) 495 if reduce is not None: --> 496 rv = reduce(self.proto) 497 else: 498 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle Tagger objects ``` </details> trainsformers: 2.10.0 datasets: 1.0.2 dill: 0.3.2 python: 3.6.8 OS: ubuntu 16.04 (Docker Image) on [Deep Learning VM](https://console.cloud.google.com/marketplace/details/click-to-deploy-images/deeplearning) (GCP) GPU: Tesla P100 (CUDA 10)
I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`. ``` def convert_to_features(example): # Tokenize contexts and questions (as pairs of inputs) input_pairs = [example['question'], example['context']] encodings = tokenizer.encode_plus(input_pairs, pad_to_max_length=True, max_length=512) context_encodings = tokenizer.encode_plus(example['context']) # Compute start and end tokens for labels using Transformers's fast tokenizers alignement methodes. # this will give us the position of answer span in the context text start_idx, end_idx = get_correct_alignement(example['context'], example['answers']) start_positions_context = context_encodings.char_to_token(start_idx) end_positions_context = context_encodings.char_to_token(end_idx-1) # here we will compute the start and end position of the answer in the whole example # as the example is encoded like this <s> question</s></s> context</s> # and we know the postion of the answer in the context # we can just find out the index of the sep token and then add that to position + 1 (+1 because there are two sep tokens) # this will give us the position of the answer span in whole example sep_idx = encodings['input_ids'].index(tokenizer.sep_token_id) start_positions = start_positions_context + sep_idx + 1 end_positions = end_positions_context + sep_idx + 1 if end_positions > 512: start_positions, end_positions = 0, 0 encodings.update({'start_positions': start_positions, 'end_positions': end_positions, 'attention_mask': encodings['attention_mask']}) return encodings ``` Then I run `dataset.map(convert_to_features)`, it raise ``` In [59]: a.map(convert_to_features) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-59-c453b508761d> in <module> ----> 1 a.map(convert_to_features) /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 365 file = StringIO() 366 with _no_cache_fields(obj): --> 367 dump(obj, file) 368 return file.getvalue() 369 /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 337 def dump(obj, file): 338 """pickle an object to a file""" --> 339 Pickler(file, recurse=True).dump(obj) 340 return 341 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 444 raise PicklingError(msg) 445 else: --> 446 StockPickler.dump(self, obj) 447 stack.clear() # clear record of 'recursion-sensitive' pickled objects 448 return /opt/conda/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_function(pickler, obj) 1436 globs, obj.__name__, 1437 obj.__defaults__, obj.__closure__, -> 1438 obj.__dict__, fkwdefaults), obj=obj) 1439 else: 1440 _super = ('super' in getattr(obj.func_code,'co_names',())) and (_byref is not None) and getattr(pickler, '_recurse', False) /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/pickle.py in save_tuple(self, obj) 787 write(MARK) 788 for element in obj: --> 789 save(element) 790 791 if id(obj) in memo: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle Tokenizer objects ```
861
runing dataset.map, it raises TypeError: can't pickle Tokenizer objects I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`. ``` def convert_to_features(example): # Tokenize contexts and questions (as pairs of inputs) input_pairs = [example['question'], example['context']] encodings = tokenizer.encode_plus(input_pairs, pad_to_max_length=True, max_length=512) context_encodings = tokenizer.encode_plus(example['context']) # Compute start and end tokens for labels using Transformers's fast tokenizers alignement methodes. # this will give us the position of answer span in the context text start_idx, end_idx = get_correct_alignement(example['context'], example['answers']) start_positions_context = context_encodings.char_to_token(start_idx) end_positions_context = context_encodings.char_to_token(end_idx-1) # here we will compute the start and end position of the answer in the whole example # as the example is encoded like this <s> question</s></s> context</s> # and we know the postion of the answer in the context # we can just find out the index of the sep token and then add that to position + 1 (+1 because there are two sep tokens) # this will give us the position of the answer span in whole example sep_idx = encodings['input_ids'].index(tokenizer.sep_token_id) start_positions = start_positions_context + sep_idx + 1 end_positions = end_positions_context + sep_idx + 1 if end_positions > 512: start_positions, end_positions = 0, 0 encodings.update({'start_positions': start_positions, 'end_positions': end_positions, 'attention_mask': encodings['attention_mask']}) return encodings ``` Then I run `dataset.map(convert_to_features)`, it raise ``` In [59]: a.map(convert_to_features) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-59-c453b508761d> in <module> ----> 1 a.map(convert_to_features) /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 365 file = StringIO() 366 with _no_cache_fields(obj): --> 367 dump(obj, file) 368 return file.getvalue() 369 /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 337 def dump(obj, file): 338 """pickle an object to a file""" --> 339 Pickler(file, recurse=True).dump(obj) 340 return 341 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 444 raise PicklingError(msg) 445 else: --> 446 StockPickler.dump(self, obj) 447 stack.clear() # clear record of 'recursion-sensitive' pickled objects 448 return /opt/conda/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_function(pickler, obj) 1436 globs, obj.__name__, 1437 obj.__defaults__, obj.__closure__, -> 1438 obj.__dict__, fkwdefaults), obj=obj) 1439 else: 1440 _super = ('super' in getattr(obj.func_code,'co_names',())) and (_byref is not None) and getattr(pickler, '_recurse', False) /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/pickle.py in save_tuple(self, obj) 787 write(MARK) 788 for element in obj: --> 789 save(element) 790 791 if id(obj) in memo: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle Tokenizer objects ``` I have the same issue with `transformers/BertJapaneseTokenizer`. ```python # train_ds = Dataset(features: { # 'title': Value(dtype='string', id=None), # 'score': Value(dtype='float64', id=None) # }, num_rows: 99999) t = BertJapaneseTokenizer.from_pretrained('bert-base-japanese-whole-word-masking') encoded = train_ds.map(lambda examples: {'tokens': t.encode(examples['title'])}, batched=True) ``` <details><summary>Error Message</summary> ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-35-2b7d66b291c1> in <module> 2 3 encoded = train_ds.map(lambda examples: ----> 4 {'tokens': t.encode(examples['title'])}, batched=True) /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /usr/local/lib/python3.6/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /usr/local/lib/python3.6/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 /usr/local/lib/python3.6/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 /usr/local/lib/python3.6/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): /usr/local/lib/python3.6/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): /usr/local/lib/python3.6/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod /usr/local/lib/python3.6/site-packages/datasets/utils/py_utils.py in dumps(obj) 365 file = StringIO() 366 with _no_cache_fields(obj): --> 367 dump(obj, file) 368 return file.getvalue() 369 /usr/local/lib/python3.6/site-packages/datasets/utils/py_utils.py in dump(obj, file) 337 def dump(obj, file): 338 """pickle an object to a file""" --> 339 Pickler(file, recurse=True).dump(obj) 340 return 341 /usr/local/lib/python3.6/site-packages/dill/_dill.py in dump(self, obj) 444 raise PicklingError(msg) 445 else: --> 446 StockPickler.dump(self, obj) 447 stack.clear() # clear record of 'recursion-sensitive' pickled objects 448 return /usr/local/lib/python3.6/pickle.py in dump(self, obj) 407 if self.proto >= 4: 408 self.framer.start_framing() --> 409 self.save(obj) 410 self.write(STOP) 411 self.framer.end_framing() /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 474 f = self.dispatch.get(t) 475 if f is not None: --> 476 f(self, obj) # Call unbound method with explicit self 477 return 478 /usr/local/lib/python3.6/site-packages/dill/_dill.py in save_function(pickler, obj) 1436 globs, obj.__name__, 1437 obj.__defaults__, obj.__closure__, -> 1438 obj.__dict__, fkwdefaults), obj=obj) 1439 else: 1440 _super = ('super' in getattr(obj.func_code,'co_names',())) and (_byref is not None) and getattr(pickler, '_recurse', False) /usr/local/lib/python3.6/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 608 else: 609 save(func) --> 610 save(args) 611 write(REDUCE) 612 /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 474 f = self.dispatch.get(t) 475 if f is not None: --> 476 f(self, obj) # Call unbound method with explicit self 477 return 478 /usr/local/lib/python3.6/pickle.py in save_tuple(self, obj) 749 write(MARK) 750 for element in obj: --> 751 save(element) 752 753 if id(obj) in memo: /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 474 f = self.dispatch.get(t) 475 if f is not None: --> 476 f(self, obj) # Call unbound method with explicit self 477 return 478 /usr/local/lib/python3.6/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /usr/local/lib/python3.6/pickle.py in save_dict(self, obj) 819 820 self.memoize(obj) --> 821 self._batch_setitems(obj.items()) 822 823 dispatch[dict] = save_dict /usr/local/lib/python3.6/pickle.py in _batch_setitems(self, items) 850 k, v = tmp[0] 851 save(k) --> 852 save(v) 853 write(SETITEM) 854 # else tmp is empty, and we're done /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 519 520 # Save the reduce() output and finally memoize the object --> 521 self.save_reduce(obj=obj, *rv) 522 523 def persistent_id(self, obj): /usr/local/lib/python3.6/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 632 633 if state is not None: --> 634 save(state) 635 write(BUILD) 636 /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 474 f = self.dispatch.get(t) 475 if f is not None: --> 476 f(self, obj) # Call unbound method with explicit self 477 return 478 /usr/local/lib/python3.6/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /usr/local/lib/python3.6/pickle.py in save_dict(self, obj) 819 820 self.memoize(obj) --> 821 self._batch_setitems(obj.items()) 822 823 dispatch[dict] = save_dict /usr/local/lib/python3.6/pickle.py in _batch_setitems(self, items) 845 for k, v in tmp: 846 save(k) --> 847 save(v) 848 write(SETITEMS) 849 elif n: /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 519 520 # Save the reduce() output and finally memoize the object --> 521 self.save_reduce(obj=obj, *rv) 522 523 def persistent_id(self, obj): /usr/local/lib/python3.6/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 632 633 if state is not None: --> 634 save(state) 635 write(BUILD) 636 /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 474 f = self.dispatch.get(t) 475 if f is not None: --> 476 f(self, obj) # Call unbound method with explicit self 477 return 478 /usr/local/lib/python3.6/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /usr/local/lib/python3.6/pickle.py in save_dict(self, obj) 819 820 self.memoize(obj) --> 821 self._batch_setitems(obj.items()) 822 823 dispatch[dict] = save_dict /usr/local/lib/python3.6/pickle.py in _batch_setitems(self, items) 845 for k, v in tmp: 846 save(k) --> 847 save(v) 848 write(SETITEMS) 849 elif n: /usr/local/lib/python3.6/pickle.py in save(self, obj, save_persistent_id) 494 reduce = getattr(obj, "__reduce_ex__", None) 495 if reduce is not None: --> 496 rv = reduce(self.proto) 497 else: 498 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle Tagger objects ``` </details> trainsformers: 2.10.0 datasets: 1.0.2 dill: 0.3.2 python: 3.6.8 OS: ubuntu 16.04 (Docker Image) on [Deep Learning VM](https://console.cloud.google.com/marketplace/details/click-to-deploy-images/deeplearning) (GCP) GPU: Tesla P100 (CUDA 10)
[ -0.2387793064, -0.2978487313, -0.0196805913, 0.2330354303, 0.4450324476, -0.1729923189, 0.2851523757, 0.1309392452, -0.276091218, 0.1103134975, -0.0697863922, 0.4891905189, -0.0087261396, -0.0467340946, -0.1457095742, -0.1114736199, 0.0535605326, 0.2078532726, 0.0181141309, -0.0561073758, -0.2787824571, 0.207442537, -0.4731769562, 0.1585230082, -0.2825991213, -0.2674279809, 0.1064045429, -0.1985801905, -0.2693117261, -0.3823215365, -0.1436450928, -0.0733661503, -0.0288478155, 0.5633369684, -0.0001192604, 0.0994179696, 0.1089545265, -0.145972237, 0.005223644, -0.0495663695, -0.0748075992, -0.3035498261, -0.2058744133, -0.4582726061, -0.1556462198, -0.1438440233, 0.0111552952, -0.3324888051, 0.5145231485, 0.2914210558, 0.1399782449, 0.4932262897, 0.0206352416, 0.0532784015, 0.0153279454, 0.0298239198, -0.131453231, -0.2608632147, 0.1487915516, 0.2165462971, -0.1302713007, 0.3254894018, -0.16130355, -0.2627823353, 0.0994699225, 0.0949373916, 0.1041131467, -0.4675593376, 0.3230481148, -0.0021583703, 0.2189716399, -0.0208102651, -0.2567600608, -0.2679678202, -0.0794852525, 0.0625911132, -0.0412522778, -0.2022153735, 0.0776131824, 0.051286459, -0.3526939452, -0.1723531932, -0.1798729748, 0.1082337722, 0.0383865014, 0.3674841821, -0.2666113079, 0.2930519283, 0.0967983454, -0.2501665652, -0.1138214841, -0.0991192684, 0.2264453322, 0.4768719375, -0.3883422613, -0.3008862436, -0.0943804905, -0.4099988341, 0.3477459848, -0.0384068899, -0.227679655, 0.2554123402, -0.0489556231, 0.1893793195, 0.0231761169, 0.3520214856, 0.2632216215, 0.3699641228, 0.0116729168, -0.1440163404, 0.0652596056, -0.0488729551, -0.0822232366, -0.221576035, -0.0569124147, 0.2582864761, 0.3595127463, -0.018612938, -0.0462388806, 0.0278619379, -0.2262803167, 0.042743206, 0.1734635979, 0.4068898261, 0.1080137193, 0.2318413407, -0.3183894455, 0.0902410001, -0.1242801398, 0.0253061932, -0.165486455, 0.2140230685, -0.0066214097, -0.1393791437, -0.1643194258, 0.0698125139, 0.2013428807, -0.0268375371, 0.0632025003, -0.2202775329, 0.0615381785, -0.1790308654, 0.2758252025, -0.0943107828, -0.050224077, 0.1737564951, 0.2081712782, -0.4094806015, -0.2060558796, 0.0352332778, -0.3411521316, 0.0173318814, 0.131188482, 0.1185403913, 0.0562378652, 0.0476906113, -0.3749631643, 0.2920552492, 0.4146036506, 0.007591249, 0.0322677419, -0.1267378628, -0.2016420215, -0.1111271605, 0.2182483375, 0.1899360418, -0.1373289227, -0.2079761922, 0.2503730059, -0.0020624166, 0.1535669118, 0.4049601555, -0.0530273505, 0.2562196553, -0.1467849314, 0.559774518, 0.4704820812, -0.625507772, -0.5309310555, 0.1032185107, -0.4468847215, -0.1779430062, -0.0353463739, 0.0416382886, 0.561388433, 0.1241551861, -0.1132062748, 0.3392554522, 0.0722959042, 0.2676003873, -0.1563939452, -0.1415294856, 0.4092996716, 0.092681706, 0.2170975804, 0.1164890528, -0.168253392, 0.1971370429, -0.1022471189, -0.1236947402, 0.0914444104, 0.1902047694, 0.1654273421, -0.2108137012, 0.0806121156, -0.1629787236, -0.5545788407, 0.0651860982, -0.3476859629, 0.2234149724, -0.2890501022, -0.1947725862, -0.2887653112, 0.1541355401, -0.4519183934, -0.0524004102, 0.0838472992, -0.0306146666, 0.1889375448, -0.013604735, 0.0192882679, -0.0761403516, 0.1458209902, 0.1860937476, -0.2552470863, 0.206203267, -0.2569343448, 0.0211482756, -0.059730567, 0.099063009, 0.4085006416, -0.1759830713, -0.255145669, 0.2755494118, 0.172052294, -0.0848681852, -0.0500597395, -0.0350359567, 0.2658096552, -0.2096953839, -0.064406991, 0.1785882711, 0.1667185277, -0.0287600961, -0.0929356292, 0.4431661665, 0.2247035354, 0.3178623319, -0.019105548, 0.1625135541, 0.2412848771, -0.1027472615, -0.0464949533, -0.1355440915, -0.1764929444, 0.0628634244, 0.2340397537, -0.0736531317, 0.0656427741, -0.059075132, 0.847992897, -0.0683463737, 0.0793829486, 0.2044740766, -0.116350919, 0.0497057475, -0.0788841099, -0.4018101096, 0.0417375378, 0.0392285511, -0.1734899431, -0.1066210642, 0.2546637654, 0.1459449381, 0.0415254608, 0.3150499761, 0.1146959215, 0.2255444378, 0.1599871963, 0.1129512414, -0.1720334589, -0.1941429526, 0.1629726738, 0.1452345103, -0.1468620449, -0.024432173, -0.0460565463, 0.0444772132, 0.0104705654, -0.0486727878, -0.1950333267, -0.2504670024, 0.0337897651, -0.0237583909, 0.0957350582, 0.4495550692, 0.3668554723, 0.3240295351, 0.4278210104, -0.1099203452, -0.1704415232, -0.1969798207, -0.0876938924, -0.0677345395, 0.1707259417, -0.005356261, -0.0357479304, 0.0103843929, 0.1024925411, -0.456127882, -0.4291421771, 0.2537454069, -0.1782850027, 0.1860092729, -0.0141354073, 0.1210131422, -0.3429493904, -0.2921086252, 0.2118502706, -0.2194128186, -0.3013741672, 0.0706817657, -0.0610883757, -0.3209869564, 0.0511770956, -0.2405866086, -0.3765722215, -0.3376920223, 0.3630160093, -0.0082481569, 0.1135795265, 0.1541582793, -0.0030259092, 0.2885194719, -0.0200713351, -0.0359077342, -0.244001627, 0.0543055683, 0.4122084379, -0.1826187521, -0.2826856673, -0.391576916, -0.1759160608, 0.0525785871, -0.1293790936, -0.1020928621, -0.2275469899, -0.271194011, 0.2238457948, -0.1608631164, 0.045888029, 0.5580424666, -0.0492364317, 0.0907654762, 0.0115672322, -0.160931915, 0.2720035315, 0.1358188838, 0.0812893808, -0.0107792886, 0.5259885192, 0.1519600451, 0.8704360723, 0.1582152545, -0.2194379717, 0.1683555543, -0.1485035121, -0.0106374593, -0.0340547934, -0.3892844617, 0.1844978034, -0.0443503037, 0.1226070747, 0.1395881027, -0.209491834, -0.1556349695, 0.1454911828, -0.0947225913, -0.2187252492, -0.2757362127, -0.0225728881, 0.0979046226, 0.0983443111, 0.047766529, 0.1866318733, -0.4435555339, 0.0679603964, 0.1192271113, 0.0044027381, 0.0480468422, -0.0468374304, -1.0162569284, -0.0913211331, -0.1702793837, 0.3654930592, 0.2294978201, 0.4982431233, -0.0179928597, -0.0469949953, 0.0515057296, -0.2121097893, 0.8495112062, 0.2505566776, -0.0532122888, 0.0796273127, 0.0189494062, -0.1545514464, 0.0577013195, -0.1632409543, 0.6255756617, 0.4945645034, 0.7852732539, -0.4374045432, -0.0893703476, 0.0312041119, -0.0599598736, -0.1476592869, 0.0810301825, -0.2087637633, -0.1804115623, -0.5762068033, 0.2585668266, 0.2810133696, 0.1928339005, 0.1528313756, -0.2231671959, 0.0690150782, -0.2840030789, -0.0985405222, 0.2312043756, 0.2143351138, 0.1858995557, -0.0022408559, 0.1455385536, -0.1561148316, -0.2068819404, 0.1899430454, 0.2558946609, -0.623185873, 0.2523160875, 0.1651499718, 0.5603797436, 0.1582311094, -0.1150252298, 0.2946461141, -0.0105133373, 0.479395777, -0.0390629433, 0.4788195491, 0.3626246154, 0.2778423727, -0.3016586304, -0.1384535581, 0.3859471679, -0.0154792974, 0.0721444264, 0.015305832, 0.2642337382, -0.152379334, 0.5785443187, 0.1050154045, 1.0689463615, -0.0962893516, -0.09116216, 0.1268846542, 0.2655838728, 0.5600721836, -0.2914606929, 0.2052386403, -0.5174928904, -0.0904989392, 0.0042559877, -0.1398294866, 0.1350088567, 0.1887043864, -0.430057317, 0.1389256716, 0.0992786959, 0.4275939763, 0.0399221145, 0.4134415388, -0.0181037094, -0.4771102369, -0.1259957999, 0.0662658662, -0.2162791044, 0.2179785818, 0.0931359753, 0.0167734399, -0.2299903929, -0.333407253, -0.0685395822, 0.0877208486, -0.398034662, 0.6731895208, 0.3429540992, -0.1945346594, 0.2956731617, 0.229450196, 0.1547932476, 0.2516961992, -0.06370911, 0.1682656854, 0.1497502029, -0.0029829429, 0.1993836164, -0.0682336912, 0.1190656945, -0.0103188921, -0.1015118659, 0.1754912585, -0.0124606993, -0.2762166858, -0.2717877328, -0.1240052581, 0.2903384268, -0.3395359516, -0.2814122438, -0.0395573862, -0.2850348353, -0.20351322, 0.0220347326, -0.0706589147, -0.37479949, 0.2263819128, 0.2376688123, -0.1426928341, 0.1695864201, 0.3712312579, -0.0255006161, -0.0888266861, 0.55849123, 0.0715674981, -0.1946098357, -0.2024846226, 0.1518792808, -0.0337788872, -0.2271941751, 0.1091583073, -0.1162662581, -0.2636434436, -0.228795588, 0.3435635269, -0.0256999005, 0.0402621701, -0.2143466771, -0.4193456769, -0.5076625943, 0.0499492101, -0.1311997622, 0.1811649352, 0.4385975003, 0.4080055952, -0.2568693161, 0.3760202825, -0.2495920062, -0.0800240263, -0.5987673402, 0.2662304342, 0.0188428126, -0.5459759235, -0.0275539123, 0.0216406267, 0.0264435783, 0.2940588295, -0.1200793236, -0.1588125229, -0.0702610016, 0.1605631262, 0.2280810773, -0.1013727859, -0.2458607405, 0.1184101254, -0.1792993546, -0.1568113267, 0.1025062203, 0.1319526881, 0.0121631492, 0.1235532314, -0.0908354148, -0.1170051619, -0.0513541922, -0.086523287, 0.0492477901, -0.1551796198, 0.2005682141, 0.388777405, -0.1900875419, -0.0090763913, -0.2909187675, 0.1795438081, 0.693025887, 0.0096778013, 0.393394649, -0.3145880103, -0.1508097947, 0.2292111814, -0.2073031217, 0.1850659698, -0.323890686, -0.0958862156, 0.2286645025, 0.1294851452, -0.2605692744, -0.2062440813, 0.5028803945, -0.3981368542, 0.1572270095, 0.1296643019, -0.0983622149, 0.2678847611, 0.1832061857, 0.160304606, 0.7458074689, 0.0117862113, 0.1765501648, -0.0622488782, -0.0920017809, 0.0551158004, 0.5123580098, 0.1351605952, 0.2308290601, 0.1101418212, -0.2032731622, 0.3773396909, -0.4285533428, 0.2233324647, 0.3698288202, -0.1252682209, -0.1937610507, 0.208747074, -0.1403711885, 0.2644396126, -0.0434947833, 0.352260083, -0.1093695387, -0.1740658879, -0.1687216461, 0.4904872179, -0.3190308809, -0.0490969718, -0.0212327018, -0.0759383813, -0.1959421039, -0.2856764495, 0.0508423895, -0.0616605058, 0.1097758934, 0.0157874823, -0.080427587, 0.2032716721, -0.1478795409, 0.1775083393, 0.2425410599, -0.3291361034, 0.2424014658, 0.1096198484, 0.2629411221, -0.2478345037, 0.1149145588, 0.3023825884, 0.268660605, -0.4128153324, 0.1197531298, -0.0614378452, -0.1552256644, 0.1539586782, 0.1354498416, -0.1843045652, -0.219290331, 0.2301809043, 0.0778794214, -0.2095595896, -0.1722646207, 0.1902218461, 0.1092763692, 0.1233892664, -0.0497295521, -0.0805692747, -0.205393374, -0.3169716895, -0.1771354973, -0.3990468681, -0.048668962, 0.0820414275, -0.2334051132, 0.2352662534, -0.3069976866, 0.080678381, 0.0823598057, 0.3644183576, 0.315518111, 0.0889510512, -0.3957802653, -0.0233591516, -0.4049154222, 0.2132006586, 0.3097580075, -0.1938924491, 0.0852777287, 0.1949707568, 0.0605364554, 0.3144335151, -0.1063979939, 0.057046745, -0.131813854, -0.0067868624, -0.2199010998, 0.1342487633, -0.1653566957, 0.1062283069, 0.2053379565, -0.3196311593, 0.3005921841, 0.2335089594, -0.0160383843, -0.203766942, -0.0731839016, -0.2135286182, -0.3241594136, -0.0482807383, 0.2011154443, 0.298532337, -0.2826666832, 0.1801340878, 0.2097663879, -0.0438413285, -0.287552774, -0.1931218952, 0.1564356387, 0.4927532971, -0.0002100572, 0.12636967, -0.3023885787, -0.1757033318, 0.0875674933, -0.2813341022, -0.2423000634, 0.3333650529, -0.2057005018, 0.1753342003, -0.014725904, 0.2186225504, 0.0708540455, 0.283408314, -0.245333299, -0.4549573958, 0.6601228118, -0.4289315939, -0.4800796211, -0.056264773, -0.0659725964, 0.1373785436, -0.2057527155, -0.2559032142, -0.150451988, 0.2913419902, 0.0845628828, -0.2006699145, 0.051886376, 0.1554603577, -0.0358310938, -0.1501897424, 0.3721498251, 0.1291875988, 0.0628955588, 0.1038765386, -0.2139436007 ]
https://github.com/huggingface/datasets/issues/665
runing dataset.map, it raises TypeError: can't pickle Tokenizer objects
> I have the same issue with `transformers/BertJapaneseTokenizer`. It looks like it this tokenizer is not supported unfortunately. This is because `t.word_tokenizer.mecab` is a `fugashi.fugashi.GenericTagger` which is not compatible with pickle nor dill. We need objects passes to `map` to be picklable for our caching system to work properly. Here it crashes because the caching system is not able to pickle the GenericTagger. \> Maybe you can create an issue on [fugashi](https://github.com/polm/fugashi/issues) 's repo and ask to make `fugashi.fugashi.GenericTagger` compatible with pickle ? What you can do in the meantime is use a picklable wrapper of the tokenizer: ```python from transformers import BertJapaneseTokenizer, MecabTokenizer class PicklableTokenizer(BertJapaneseTokenizer): def __getstate__(self): state = dict(self.__dict__) state["do_lower_case"] = self.word_tokenizer.do_lower_case state["never_split"] = self.word_tokenizer.never_split del state["word_tokenizer"] return state def __setstate__(self, state): do_lower_case = state.pop("do_lower_case") never_split = state.pop("never_split") self.__dict__ = state self.word_tokenizer = MecabTokenizer( do_lower_case=do_lower_case, never_split=never_split) ) t = PicklableTokenizer.from_pretrained("cl-tohoku/bert-base-japanese-whole-word-masking") encoded = train_ds.map(lambda examples: {'tokens': t.encode(examples['title'])}, batched=True) # it works ```
I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`. ``` def convert_to_features(example): # Tokenize contexts and questions (as pairs of inputs) input_pairs = [example['question'], example['context']] encodings = tokenizer.encode_plus(input_pairs, pad_to_max_length=True, max_length=512) context_encodings = tokenizer.encode_plus(example['context']) # Compute start and end tokens for labels using Transformers's fast tokenizers alignement methodes. # this will give us the position of answer span in the context text start_idx, end_idx = get_correct_alignement(example['context'], example['answers']) start_positions_context = context_encodings.char_to_token(start_idx) end_positions_context = context_encodings.char_to_token(end_idx-1) # here we will compute the start and end position of the answer in the whole example # as the example is encoded like this <s> question</s></s> context</s> # and we know the postion of the answer in the context # we can just find out the index of the sep token and then add that to position + 1 (+1 because there are two sep tokens) # this will give us the position of the answer span in whole example sep_idx = encodings['input_ids'].index(tokenizer.sep_token_id) start_positions = start_positions_context + sep_idx + 1 end_positions = end_positions_context + sep_idx + 1 if end_positions > 512: start_positions, end_positions = 0, 0 encodings.update({'start_positions': start_positions, 'end_positions': end_positions, 'attention_mask': encodings['attention_mask']}) return encodings ``` Then I run `dataset.map(convert_to_features)`, it raise ``` In [59]: a.map(convert_to_features) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-59-c453b508761d> in <module> ----> 1 a.map(convert_to_features) /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 365 file = StringIO() 366 with _no_cache_fields(obj): --> 367 dump(obj, file) 368 return file.getvalue() 369 /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 337 def dump(obj, file): 338 """pickle an object to a file""" --> 339 Pickler(file, recurse=True).dump(obj) 340 return 341 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 444 raise PicklingError(msg) 445 else: --> 446 StockPickler.dump(self, obj) 447 stack.clear() # clear record of 'recursion-sensitive' pickled objects 448 return /opt/conda/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_function(pickler, obj) 1436 globs, obj.__name__, 1437 obj.__defaults__, obj.__closure__, -> 1438 obj.__dict__, fkwdefaults), obj=obj) 1439 else: 1440 _super = ('super' in getattr(obj.func_code,'co_names',())) and (_byref is not None) and getattr(pickler, '_recurse', False) /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/pickle.py in save_tuple(self, obj) 787 write(MARK) 788 for element in obj: --> 789 save(element) 790 791 if id(obj) in memo: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle Tokenizer objects ```
153
runing dataset.map, it raises TypeError: can't pickle Tokenizer objects I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`. ``` def convert_to_features(example): # Tokenize contexts and questions (as pairs of inputs) input_pairs = [example['question'], example['context']] encodings = tokenizer.encode_plus(input_pairs, pad_to_max_length=True, max_length=512) context_encodings = tokenizer.encode_plus(example['context']) # Compute start and end tokens for labels using Transformers's fast tokenizers alignement methodes. # this will give us the position of answer span in the context text start_idx, end_idx = get_correct_alignement(example['context'], example['answers']) start_positions_context = context_encodings.char_to_token(start_idx) end_positions_context = context_encodings.char_to_token(end_idx-1) # here we will compute the start and end position of the answer in the whole example # as the example is encoded like this <s> question</s></s> context</s> # and we know the postion of the answer in the context # we can just find out the index of the sep token and then add that to position + 1 (+1 because there are two sep tokens) # this will give us the position of the answer span in whole example sep_idx = encodings['input_ids'].index(tokenizer.sep_token_id) start_positions = start_positions_context + sep_idx + 1 end_positions = end_positions_context + sep_idx + 1 if end_positions > 512: start_positions, end_positions = 0, 0 encodings.update({'start_positions': start_positions, 'end_positions': end_positions, 'attention_mask': encodings['attention_mask']}) return encodings ``` Then I run `dataset.map(convert_to_features)`, it raise ``` In [59]: a.map(convert_to_features) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-59-c453b508761d> in <module> ----> 1 a.map(convert_to_features) /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 365 file = StringIO() 366 with _no_cache_fields(obj): --> 367 dump(obj, file) 368 return file.getvalue() 369 /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 337 def dump(obj, file): 338 """pickle an object to a file""" --> 339 Pickler(file, recurse=True).dump(obj) 340 return 341 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 444 raise PicklingError(msg) 445 else: --> 446 StockPickler.dump(self, obj) 447 stack.clear() # clear record of 'recursion-sensitive' pickled objects 448 return /opt/conda/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_function(pickler, obj) 1436 globs, obj.__name__, 1437 obj.__defaults__, obj.__closure__, -> 1438 obj.__dict__, fkwdefaults), obj=obj) 1439 else: 1440 _super = ('super' in getattr(obj.func_code,'co_names',())) and (_byref is not None) and getattr(pickler, '_recurse', False) /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/pickle.py in save_tuple(self, obj) 787 write(MARK) 788 for element in obj: --> 789 save(element) 790 791 if id(obj) in memo: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle Tokenizer objects ``` > I have the same issue with `transformers/BertJapaneseTokenizer`. It looks like it this tokenizer is not supported unfortunately. This is because `t.word_tokenizer.mecab` is a `fugashi.fugashi.GenericTagger` which is not compatible with pickle nor dill. We need objects passes to `map` to be picklable for our caching system to work properly. Here it crashes because the caching system is not able to pickle the GenericTagger. \> Maybe you can create an issue on [fugashi](https://github.com/polm/fugashi/issues) 's repo and ask to make `fugashi.fugashi.GenericTagger` compatible with pickle ? What you can do in the meantime is use a picklable wrapper of the tokenizer: ```python from transformers import BertJapaneseTokenizer, MecabTokenizer class PicklableTokenizer(BertJapaneseTokenizer): def __getstate__(self): state = dict(self.__dict__) state["do_lower_case"] = self.word_tokenizer.do_lower_case state["never_split"] = self.word_tokenizer.never_split del state["word_tokenizer"] return state def __setstate__(self, state): do_lower_case = state.pop("do_lower_case") never_split = state.pop("never_split") self.__dict__ = state self.word_tokenizer = MecabTokenizer( do_lower_case=do_lower_case, never_split=never_split) ) t = PicklableTokenizer.from_pretrained("cl-tohoku/bert-base-japanese-whole-word-masking") encoded = train_ds.map(lambda examples: {'tokens': t.encode(examples['title'])}, batched=True) # it works ```
[ -0.2387793064, -0.2978487313, -0.0196805913, 0.2330354303, 0.4450324476, -0.1729923189, 0.2851523757, 0.1309392452, -0.276091218, 0.1103134975, -0.0697863922, 0.4891905189, -0.0087261396, -0.0467340946, -0.1457095742, -0.1114736199, 0.0535605326, 0.2078532726, 0.0181141309, -0.0561073758, -0.2787824571, 0.207442537, -0.4731769562, 0.1585230082, -0.2825991213, -0.2674279809, 0.1064045429, -0.1985801905, -0.2693117261, -0.3823215365, -0.1436450928, -0.0733661503, -0.0288478155, 0.5633369684, -0.0001192604, 0.0994179696, 0.1089545265, -0.145972237, 0.005223644, -0.0495663695, -0.0748075992, -0.3035498261, -0.2058744133, -0.4582726061, -0.1556462198, -0.1438440233, 0.0111552952, -0.3324888051, 0.5145231485, 0.2914210558, 0.1399782449, 0.4932262897, 0.0206352416, 0.0532784015, 0.0153279454, 0.0298239198, -0.131453231, -0.2608632147, 0.1487915516, 0.2165462971, -0.1302713007, 0.3254894018, -0.16130355, -0.2627823353, 0.0994699225, 0.0949373916, 0.1041131467, -0.4675593376, 0.3230481148, -0.0021583703, 0.2189716399, -0.0208102651, -0.2567600608, -0.2679678202, -0.0794852525, 0.0625911132, -0.0412522778, -0.2022153735, 0.0776131824, 0.051286459, -0.3526939452, -0.1723531932, -0.1798729748, 0.1082337722, 0.0383865014, 0.3674841821, -0.2666113079, 0.2930519283, 0.0967983454, -0.2501665652, -0.1138214841, -0.0991192684, 0.2264453322, 0.4768719375, -0.3883422613, -0.3008862436, -0.0943804905, -0.4099988341, 0.3477459848, -0.0384068899, -0.227679655, 0.2554123402, -0.0489556231, 0.1893793195, 0.0231761169, 0.3520214856, 0.2632216215, 0.3699641228, 0.0116729168, -0.1440163404, 0.0652596056, -0.0488729551, -0.0822232366, -0.221576035, -0.0569124147, 0.2582864761, 0.3595127463, -0.018612938, -0.0462388806, 0.0278619379, -0.2262803167, 0.042743206, 0.1734635979, 0.4068898261, 0.1080137193, 0.2318413407, -0.3183894455, 0.0902410001, -0.1242801398, 0.0253061932, -0.165486455, 0.2140230685, -0.0066214097, -0.1393791437, -0.1643194258, 0.0698125139, 0.2013428807, -0.0268375371, 0.0632025003, -0.2202775329, 0.0615381785, -0.1790308654, 0.2758252025, -0.0943107828, -0.050224077, 0.1737564951, 0.2081712782, -0.4094806015, -0.2060558796, 0.0352332778, -0.3411521316, 0.0173318814, 0.131188482, 0.1185403913, 0.0562378652, 0.0476906113, -0.3749631643, 0.2920552492, 0.4146036506, 0.007591249, 0.0322677419, -0.1267378628, -0.2016420215, -0.1111271605, 0.2182483375, 0.1899360418, -0.1373289227, -0.2079761922, 0.2503730059, -0.0020624166, 0.1535669118, 0.4049601555, -0.0530273505, 0.2562196553, -0.1467849314, 0.559774518, 0.4704820812, -0.625507772, -0.5309310555, 0.1032185107, -0.4468847215, -0.1779430062, -0.0353463739, 0.0416382886, 0.561388433, 0.1241551861, -0.1132062748, 0.3392554522, 0.0722959042, 0.2676003873, -0.1563939452, -0.1415294856, 0.4092996716, 0.092681706, 0.2170975804, 0.1164890528, -0.168253392, 0.1971370429, -0.1022471189, -0.1236947402, 0.0914444104, 0.1902047694, 0.1654273421, -0.2108137012, 0.0806121156, -0.1629787236, -0.5545788407, 0.0651860982, -0.3476859629, 0.2234149724, -0.2890501022, -0.1947725862, -0.2887653112, 0.1541355401, -0.4519183934, -0.0524004102, 0.0838472992, -0.0306146666, 0.1889375448, -0.013604735, 0.0192882679, -0.0761403516, 0.1458209902, 0.1860937476, -0.2552470863, 0.206203267, -0.2569343448, 0.0211482756, -0.059730567, 0.099063009, 0.4085006416, -0.1759830713, -0.255145669, 0.2755494118, 0.172052294, -0.0848681852, -0.0500597395, -0.0350359567, 0.2658096552, -0.2096953839, -0.064406991, 0.1785882711, 0.1667185277, -0.0287600961, -0.0929356292, 0.4431661665, 0.2247035354, 0.3178623319, -0.019105548, 0.1625135541, 0.2412848771, -0.1027472615, -0.0464949533, -0.1355440915, -0.1764929444, 0.0628634244, 0.2340397537, -0.0736531317, 0.0656427741, -0.059075132, 0.847992897, -0.0683463737, 0.0793829486, 0.2044740766, -0.116350919, 0.0497057475, -0.0788841099, -0.4018101096, 0.0417375378, 0.0392285511, -0.1734899431, -0.1066210642, 0.2546637654, 0.1459449381, 0.0415254608, 0.3150499761, 0.1146959215, 0.2255444378, 0.1599871963, 0.1129512414, -0.1720334589, -0.1941429526, 0.1629726738, 0.1452345103, -0.1468620449, -0.024432173, -0.0460565463, 0.0444772132, 0.0104705654, -0.0486727878, -0.1950333267, -0.2504670024, 0.0337897651, -0.0237583909, 0.0957350582, 0.4495550692, 0.3668554723, 0.3240295351, 0.4278210104, -0.1099203452, -0.1704415232, -0.1969798207, -0.0876938924, -0.0677345395, 0.1707259417, -0.005356261, -0.0357479304, 0.0103843929, 0.1024925411, -0.456127882, -0.4291421771, 0.2537454069, -0.1782850027, 0.1860092729, -0.0141354073, 0.1210131422, -0.3429493904, -0.2921086252, 0.2118502706, -0.2194128186, -0.3013741672, 0.0706817657, -0.0610883757, -0.3209869564, 0.0511770956, -0.2405866086, -0.3765722215, -0.3376920223, 0.3630160093, -0.0082481569, 0.1135795265, 0.1541582793, -0.0030259092, 0.2885194719, -0.0200713351, -0.0359077342, -0.244001627, 0.0543055683, 0.4122084379, -0.1826187521, -0.2826856673, -0.391576916, -0.1759160608, 0.0525785871, -0.1293790936, -0.1020928621, -0.2275469899, -0.271194011, 0.2238457948, -0.1608631164, 0.045888029, 0.5580424666, -0.0492364317, 0.0907654762, 0.0115672322, -0.160931915, 0.2720035315, 0.1358188838, 0.0812893808, -0.0107792886, 0.5259885192, 0.1519600451, 0.8704360723, 0.1582152545, -0.2194379717, 0.1683555543, -0.1485035121, -0.0106374593, -0.0340547934, -0.3892844617, 0.1844978034, -0.0443503037, 0.1226070747, 0.1395881027, -0.209491834, -0.1556349695, 0.1454911828, -0.0947225913, -0.2187252492, -0.2757362127, -0.0225728881, 0.0979046226, 0.0983443111, 0.047766529, 0.1866318733, -0.4435555339, 0.0679603964, 0.1192271113, 0.0044027381, 0.0480468422, -0.0468374304, -1.0162569284, -0.0913211331, -0.1702793837, 0.3654930592, 0.2294978201, 0.4982431233, -0.0179928597, -0.0469949953, 0.0515057296, -0.2121097893, 0.8495112062, 0.2505566776, -0.0532122888, 0.0796273127, 0.0189494062, -0.1545514464, 0.0577013195, -0.1632409543, 0.6255756617, 0.4945645034, 0.7852732539, -0.4374045432, -0.0893703476, 0.0312041119, -0.0599598736, -0.1476592869, 0.0810301825, -0.2087637633, -0.1804115623, -0.5762068033, 0.2585668266, 0.2810133696, 0.1928339005, 0.1528313756, -0.2231671959, 0.0690150782, -0.2840030789, -0.0985405222, 0.2312043756, 0.2143351138, 0.1858995557, -0.0022408559, 0.1455385536, -0.1561148316, -0.2068819404, 0.1899430454, 0.2558946609, -0.623185873, 0.2523160875, 0.1651499718, 0.5603797436, 0.1582311094, -0.1150252298, 0.2946461141, -0.0105133373, 0.479395777, -0.0390629433, 0.4788195491, 0.3626246154, 0.2778423727, -0.3016586304, -0.1384535581, 0.3859471679, -0.0154792974, 0.0721444264, 0.015305832, 0.2642337382, -0.152379334, 0.5785443187, 0.1050154045, 1.0689463615, -0.0962893516, -0.09116216, 0.1268846542, 0.2655838728, 0.5600721836, -0.2914606929, 0.2052386403, -0.5174928904, -0.0904989392, 0.0042559877, -0.1398294866, 0.1350088567, 0.1887043864, -0.430057317, 0.1389256716, 0.0992786959, 0.4275939763, 0.0399221145, 0.4134415388, -0.0181037094, -0.4771102369, -0.1259957999, 0.0662658662, -0.2162791044, 0.2179785818, 0.0931359753, 0.0167734399, -0.2299903929, -0.333407253, -0.0685395822, 0.0877208486, -0.398034662, 0.6731895208, 0.3429540992, -0.1945346594, 0.2956731617, 0.229450196, 0.1547932476, 0.2516961992, -0.06370911, 0.1682656854, 0.1497502029, -0.0029829429, 0.1993836164, -0.0682336912, 0.1190656945, -0.0103188921, -0.1015118659, 0.1754912585, -0.0124606993, -0.2762166858, -0.2717877328, -0.1240052581, 0.2903384268, -0.3395359516, -0.2814122438, -0.0395573862, -0.2850348353, -0.20351322, 0.0220347326, -0.0706589147, -0.37479949, 0.2263819128, 0.2376688123, -0.1426928341, 0.1695864201, 0.3712312579, -0.0255006161, -0.0888266861, 0.55849123, 0.0715674981, -0.1946098357, -0.2024846226, 0.1518792808, -0.0337788872, -0.2271941751, 0.1091583073, -0.1162662581, -0.2636434436, -0.228795588, 0.3435635269, -0.0256999005, 0.0402621701, -0.2143466771, -0.4193456769, -0.5076625943, 0.0499492101, -0.1311997622, 0.1811649352, 0.4385975003, 0.4080055952, -0.2568693161, 0.3760202825, -0.2495920062, -0.0800240263, -0.5987673402, 0.2662304342, 0.0188428126, -0.5459759235, -0.0275539123, 0.0216406267, 0.0264435783, 0.2940588295, -0.1200793236, -0.1588125229, -0.0702610016, 0.1605631262, 0.2280810773, -0.1013727859, -0.2458607405, 0.1184101254, -0.1792993546, -0.1568113267, 0.1025062203, 0.1319526881, 0.0121631492, 0.1235532314, -0.0908354148, -0.1170051619, -0.0513541922, -0.086523287, 0.0492477901, -0.1551796198, 0.2005682141, 0.388777405, -0.1900875419, -0.0090763913, -0.2909187675, 0.1795438081, 0.693025887, 0.0096778013, 0.393394649, -0.3145880103, -0.1508097947, 0.2292111814, -0.2073031217, 0.1850659698, -0.323890686, -0.0958862156, 0.2286645025, 0.1294851452, -0.2605692744, -0.2062440813, 0.5028803945, -0.3981368542, 0.1572270095, 0.1296643019, -0.0983622149, 0.2678847611, 0.1832061857, 0.160304606, 0.7458074689, 0.0117862113, 0.1765501648, -0.0622488782, -0.0920017809, 0.0551158004, 0.5123580098, 0.1351605952, 0.2308290601, 0.1101418212, -0.2032731622, 0.3773396909, -0.4285533428, 0.2233324647, 0.3698288202, -0.1252682209, -0.1937610507, 0.208747074, -0.1403711885, 0.2644396126, -0.0434947833, 0.352260083, -0.1093695387, -0.1740658879, -0.1687216461, 0.4904872179, -0.3190308809, -0.0490969718, -0.0212327018, -0.0759383813, -0.1959421039, -0.2856764495, 0.0508423895, -0.0616605058, 0.1097758934, 0.0157874823, -0.080427587, 0.2032716721, -0.1478795409, 0.1775083393, 0.2425410599, -0.3291361034, 0.2424014658, 0.1096198484, 0.2629411221, -0.2478345037, 0.1149145588, 0.3023825884, 0.268660605, -0.4128153324, 0.1197531298, -0.0614378452, -0.1552256644, 0.1539586782, 0.1354498416, -0.1843045652, -0.219290331, 0.2301809043, 0.0778794214, -0.2095595896, -0.1722646207, 0.1902218461, 0.1092763692, 0.1233892664, -0.0497295521, -0.0805692747, -0.205393374, -0.3169716895, -0.1771354973, -0.3990468681, -0.048668962, 0.0820414275, -0.2334051132, 0.2352662534, -0.3069976866, 0.080678381, 0.0823598057, 0.3644183576, 0.315518111, 0.0889510512, -0.3957802653, -0.0233591516, -0.4049154222, 0.2132006586, 0.3097580075, -0.1938924491, 0.0852777287, 0.1949707568, 0.0605364554, 0.3144335151, -0.1063979939, 0.057046745, -0.131813854, -0.0067868624, -0.2199010998, 0.1342487633, -0.1653566957, 0.1062283069, 0.2053379565, -0.3196311593, 0.3005921841, 0.2335089594, -0.0160383843, -0.203766942, -0.0731839016, -0.2135286182, -0.3241594136, -0.0482807383, 0.2011154443, 0.298532337, -0.2826666832, 0.1801340878, 0.2097663879, -0.0438413285, -0.287552774, -0.1931218952, 0.1564356387, 0.4927532971, -0.0002100572, 0.12636967, -0.3023885787, -0.1757033318, 0.0875674933, -0.2813341022, -0.2423000634, 0.3333650529, -0.2057005018, 0.1753342003, -0.014725904, 0.2186225504, 0.0708540455, 0.283408314, -0.245333299, -0.4549573958, 0.6601228118, -0.4289315939, -0.4800796211, -0.056264773, -0.0659725964, 0.1373785436, -0.2057527155, -0.2559032142, -0.150451988, 0.2913419902, 0.0845628828, -0.2006699145, 0.051886376, 0.1554603577, -0.0358310938, -0.1501897424, 0.3721498251, 0.1291875988, 0.0628955588, 0.1038765386, -0.2139436007 ]
https://github.com/huggingface/datasets/issues/665
runing dataset.map, it raises TypeError: can't pickle Tokenizer objects
We can also update the `BertJapaneseTokenizer` in `transformers` as you just shown @lhoestq to make it compatible with pickle. It will be faster than asking on fugashi 's repo and good for the other users of `transformers` as well. I'm currently working on `transformers` I'll include it in the https://github.com/huggingface/transformers/pull/7141 PR and the next release of `transformers`.
I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`. ``` def convert_to_features(example): # Tokenize contexts and questions (as pairs of inputs) input_pairs = [example['question'], example['context']] encodings = tokenizer.encode_plus(input_pairs, pad_to_max_length=True, max_length=512) context_encodings = tokenizer.encode_plus(example['context']) # Compute start and end tokens for labels using Transformers's fast tokenizers alignement methodes. # this will give us the position of answer span in the context text start_idx, end_idx = get_correct_alignement(example['context'], example['answers']) start_positions_context = context_encodings.char_to_token(start_idx) end_positions_context = context_encodings.char_to_token(end_idx-1) # here we will compute the start and end position of the answer in the whole example # as the example is encoded like this <s> question</s></s> context</s> # and we know the postion of the answer in the context # we can just find out the index of the sep token and then add that to position + 1 (+1 because there are two sep tokens) # this will give us the position of the answer span in whole example sep_idx = encodings['input_ids'].index(tokenizer.sep_token_id) start_positions = start_positions_context + sep_idx + 1 end_positions = end_positions_context + sep_idx + 1 if end_positions > 512: start_positions, end_positions = 0, 0 encodings.update({'start_positions': start_positions, 'end_positions': end_positions, 'attention_mask': encodings['attention_mask']}) return encodings ``` Then I run `dataset.map(convert_to_features)`, it raise ``` In [59]: a.map(convert_to_features) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-59-c453b508761d> in <module> ----> 1 a.map(convert_to_features) /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 365 file = StringIO() 366 with _no_cache_fields(obj): --> 367 dump(obj, file) 368 return file.getvalue() 369 /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 337 def dump(obj, file): 338 """pickle an object to a file""" --> 339 Pickler(file, recurse=True).dump(obj) 340 return 341 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 444 raise PicklingError(msg) 445 else: --> 446 StockPickler.dump(self, obj) 447 stack.clear() # clear record of 'recursion-sensitive' pickled objects 448 return /opt/conda/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_function(pickler, obj) 1436 globs, obj.__name__, 1437 obj.__defaults__, obj.__closure__, -> 1438 obj.__dict__, fkwdefaults), obj=obj) 1439 else: 1440 _super = ('super' in getattr(obj.func_code,'co_names',())) and (_byref is not None) and getattr(pickler, '_recurse', False) /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/pickle.py in save_tuple(self, obj) 787 write(MARK) 788 for element in obj: --> 789 save(element) 790 791 if id(obj) in memo: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle Tokenizer objects ```
57
runing dataset.map, it raises TypeError: can't pickle Tokenizer objects I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`. ``` def convert_to_features(example): # Tokenize contexts and questions (as pairs of inputs) input_pairs = [example['question'], example['context']] encodings = tokenizer.encode_plus(input_pairs, pad_to_max_length=True, max_length=512) context_encodings = tokenizer.encode_plus(example['context']) # Compute start and end tokens for labels using Transformers's fast tokenizers alignement methodes. # this will give us the position of answer span in the context text start_idx, end_idx = get_correct_alignement(example['context'], example['answers']) start_positions_context = context_encodings.char_to_token(start_idx) end_positions_context = context_encodings.char_to_token(end_idx-1) # here we will compute the start and end position of the answer in the whole example # as the example is encoded like this <s> question</s></s> context</s> # and we know the postion of the answer in the context # we can just find out the index of the sep token and then add that to position + 1 (+1 because there are two sep tokens) # this will give us the position of the answer span in whole example sep_idx = encodings['input_ids'].index(tokenizer.sep_token_id) start_positions = start_positions_context + sep_idx + 1 end_positions = end_positions_context + sep_idx + 1 if end_positions > 512: start_positions, end_positions = 0, 0 encodings.update({'start_positions': start_positions, 'end_positions': end_positions, 'attention_mask': encodings['attention_mask']}) return encodings ``` Then I run `dataset.map(convert_to_features)`, it raise ``` In [59]: a.map(convert_to_features) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-59-c453b508761d> in <module> ----> 1 a.map(convert_to_features) /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 365 file = StringIO() 366 with _no_cache_fields(obj): --> 367 dump(obj, file) 368 return file.getvalue() 369 /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 337 def dump(obj, file): 338 """pickle an object to a file""" --> 339 Pickler(file, recurse=True).dump(obj) 340 return 341 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 444 raise PicklingError(msg) 445 else: --> 446 StockPickler.dump(self, obj) 447 stack.clear() # clear record of 'recursion-sensitive' pickled objects 448 return /opt/conda/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_function(pickler, obj) 1436 globs, obj.__name__, 1437 obj.__defaults__, obj.__closure__, -> 1438 obj.__dict__, fkwdefaults), obj=obj) 1439 else: 1440 _super = ('super' in getattr(obj.func_code,'co_names',())) and (_byref is not None) and getattr(pickler, '_recurse', False) /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/pickle.py in save_tuple(self, obj) 787 write(MARK) 788 for element in obj: --> 789 save(element) 790 791 if id(obj) in memo: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle Tokenizer objects ``` We can also update the `BertJapaneseTokenizer` in `transformers` as you just shown @lhoestq to make it compatible with pickle. It will be faster than asking on fugashi 's repo and good for the other users of `transformers` as well. I'm currently working on `transformers` I'll include it in the https://github.com/huggingface/transformers/pull/7141 PR and the next release of `transformers`.
[ -0.2387793064, -0.2978487313, -0.0196805913, 0.2330354303, 0.4450324476, -0.1729923189, 0.2851523757, 0.1309392452, -0.276091218, 0.1103134975, -0.0697863922, 0.4891905189, -0.0087261396, -0.0467340946, -0.1457095742, -0.1114736199, 0.0535605326, 0.2078532726, 0.0181141309, -0.0561073758, -0.2787824571, 0.207442537, -0.4731769562, 0.1585230082, -0.2825991213, -0.2674279809, 0.1064045429, -0.1985801905, -0.2693117261, -0.3823215365, -0.1436450928, -0.0733661503, -0.0288478155, 0.5633369684, -0.0001192604, 0.0994179696, 0.1089545265, -0.145972237, 0.005223644, -0.0495663695, -0.0748075992, -0.3035498261, -0.2058744133, -0.4582726061, -0.1556462198, -0.1438440233, 0.0111552952, -0.3324888051, 0.5145231485, 0.2914210558, 0.1399782449, 0.4932262897, 0.0206352416, 0.0532784015, 0.0153279454, 0.0298239198, -0.131453231, -0.2608632147, 0.1487915516, 0.2165462971, -0.1302713007, 0.3254894018, -0.16130355, -0.2627823353, 0.0994699225, 0.0949373916, 0.1041131467, -0.4675593376, 0.3230481148, -0.0021583703, 0.2189716399, -0.0208102651, -0.2567600608, -0.2679678202, -0.0794852525, 0.0625911132, -0.0412522778, -0.2022153735, 0.0776131824, 0.051286459, -0.3526939452, -0.1723531932, -0.1798729748, 0.1082337722, 0.0383865014, 0.3674841821, -0.2666113079, 0.2930519283, 0.0967983454, -0.2501665652, -0.1138214841, -0.0991192684, 0.2264453322, 0.4768719375, -0.3883422613, -0.3008862436, -0.0943804905, -0.4099988341, 0.3477459848, -0.0384068899, -0.227679655, 0.2554123402, -0.0489556231, 0.1893793195, 0.0231761169, 0.3520214856, 0.2632216215, 0.3699641228, 0.0116729168, -0.1440163404, 0.0652596056, -0.0488729551, -0.0822232366, -0.221576035, -0.0569124147, 0.2582864761, 0.3595127463, -0.018612938, -0.0462388806, 0.0278619379, -0.2262803167, 0.042743206, 0.1734635979, 0.4068898261, 0.1080137193, 0.2318413407, -0.3183894455, 0.0902410001, -0.1242801398, 0.0253061932, -0.165486455, 0.2140230685, -0.0066214097, -0.1393791437, -0.1643194258, 0.0698125139, 0.2013428807, -0.0268375371, 0.0632025003, -0.2202775329, 0.0615381785, -0.1790308654, 0.2758252025, -0.0943107828, -0.050224077, 0.1737564951, 0.2081712782, -0.4094806015, -0.2060558796, 0.0352332778, -0.3411521316, 0.0173318814, 0.131188482, 0.1185403913, 0.0562378652, 0.0476906113, -0.3749631643, 0.2920552492, 0.4146036506, 0.007591249, 0.0322677419, -0.1267378628, -0.2016420215, -0.1111271605, 0.2182483375, 0.1899360418, -0.1373289227, -0.2079761922, 0.2503730059, -0.0020624166, 0.1535669118, 0.4049601555, -0.0530273505, 0.2562196553, -0.1467849314, 0.559774518, 0.4704820812, -0.625507772, -0.5309310555, 0.1032185107, -0.4468847215, -0.1779430062, -0.0353463739, 0.0416382886, 0.561388433, 0.1241551861, -0.1132062748, 0.3392554522, 0.0722959042, 0.2676003873, -0.1563939452, -0.1415294856, 0.4092996716, 0.092681706, 0.2170975804, 0.1164890528, -0.168253392, 0.1971370429, -0.1022471189, -0.1236947402, 0.0914444104, 0.1902047694, 0.1654273421, -0.2108137012, 0.0806121156, -0.1629787236, -0.5545788407, 0.0651860982, -0.3476859629, 0.2234149724, -0.2890501022, -0.1947725862, -0.2887653112, 0.1541355401, -0.4519183934, -0.0524004102, 0.0838472992, -0.0306146666, 0.1889375448, -0.013604735, 0.0192882679, -0.0761403516, 0.1458209902, 0.1860937476, -0.2552470863, 0.206203267, -0.2569343448, 0.0211482756, -0.059730567, 0.099063009, 0.4085006416, -0.1759830713, -0.255145669, 0.2755494118, 0.172052294, -0.0848681852, -0.0500597395, -0.0350359567, 0.2658096552, -0.2096953839, -0.064406991, 0.1785882711, 0.1667185277, -0.0287600961, -0.0929356292, 0.4431661665, 0.2247035354, 0.3178623319, -0.019105548, 0.1625135541, 0.2412848771, -0.1027472615, -0.0464949533, -0.1355440915, -0.1764929444, 0.0628634244, 0.2340397537, -0.0736531317, 0.0656427741, -0.059075132, 0.847992897, -0.0683463737, 0.0793829486, 0.2044740766, -0.116350919, 0.0497057475, -0.0788841099, -0.4018101096, 0.0417375378, 0.0392285511, -0.1734899431, -0.1066210642, 0.2546637654, 0.1459449381, 0.0415254608, 0.3150499761, 0.1146959215, 0.2255444378, 0.1599871963, 0.1129512414, -0.1720334589, -0.1941429526, 0.1629726738, 0.1452345103, -0.1468620449, -0.024432173, -0.0460565463, 0.0444772132, 0.0104705654, -0.0486727878, -0.1950333267, -0.2504670024, 0.0337897651, -0.0237583909, 0.0957350582, 0.4495550692, 0.3668554723, 0.3240295351, 0.4278210104, -0.1099203452, -0.1704415232, -0.1969798207, -0.0876938924, -0.0677345395, 0.1707259417, -0.005356261, -0.0357479304, 0.0103843929, 0.1024925411, -0.456127882, -0.4291421771, 0.2537454069, -0.1782850027, 0.1860092729, -0.0141354073, 0.1210131422, -0.3429493904, -0.2921086252, 0.2118502706, -0.2194128186, -0.3013741672, 0.0706817657, -0.0610883757, -0.3209869564, 0.0511770956, -0.2405866086, -0.3765722215, -0.3376920223, 0.3630160093, -0.0082481569, 0.1135795265, 0.1541582793, -0.0030259092, 0.2885194719, -0.0200713351, -0.0359077342, -0.244001627, 0.0543055683, 0.4122084379, -0.1826187521, -0.2826856673, -0.391576916, -0.1759160608, 0.0525785871, -0.1293790936, -0.1020928621, -0.2275469899, -0.271194011, 0.2238457948, -0.1608631164, 0.045888029, 0.5580424666, -0.0492364317, 0.0907654762, 0.0115672322, -0.160931915, 0.2720035315, 0.1358188838, 0.0812893808, -0.0107792886, 0.5259885192, 0.1519600451, 0.8704360723, 0.1582152545, -0.2194379717, 0.1683555543, -0.1485035121, -0.0106374593, -0.0340547934, -0.3892844617, 0.1844978034, -0.0443503037, 0.1226070747, 0.1395881027, -0.209491834, -0.1556349695, 0.1454911828, -0.0947225913, -0.2187252492, -0.2757362127, -0.0225728881, 0.0979046226, 0.0983443111, 0.047766529, 0.1866318733, -0.4435555339, 0.0679603964, 0.1192271113, 0.0044027381, 0.0480468422, -0.0468374304, -1.0162569284, -0.0913211331, -0.1702793837, 0.3654930592, 0.2294978201, 0.4982431233, -0.0179928597, -0.0469949953, 0.0515057296, -0.2121097893, 0.8495112062, 0.2505566776, -0.0532122888, 0.0796273127, 0.0189494062, -0.1545514464, 0.0577013195, -0.1632409543, 0.6255756617, 0.4945645034, 0.7852732539, -0.4374045432, -0.0893703476, 0.0312041119, -0.0599598736, -0.1476592869, 0.0810301825, -0.2087637633, -0.1804115623, -0.5762068033, 0.2585668266, 0.2810133696, 0.1928339005, 0.1528313756, -0.2231671959, 0.0690150782, -0.2840030789, -0.0985405222, 0.2312043756, 0.2143351138, 0.1858995557, -0.0022408559, 0.1455385536, -0.1561148316, -0.2068819404, 0.1899430454, 0.2558946609, -0.623185873, 0.2523160875, 0.1651499718, 0.5603797436, 0.1582311094, -0.1150252298, 0.2946461141, -0.0105133373, 0.479395777, -0.0390629433, 0.4788195491, 0.3626246154, 0.2778423727, -0.3016586304, -0.1384535581, 0.3859471679, -0.0154792974, 0.0721444264, 0.015305832, 0.2642337382, -0.152379334, 0.5785443187, 0.1050154045, 1.0689463615, -0.0962893516, -0.09116216, 0.1268846542, 0.2655838728, 0.5600721836, -0.2914606929, 0.2052386403, -0.5174928904, -0.0904989392, 0.0042559877, -0.1398294866, 0.1350088567, 0.1887043864, -0.430057317, 0.1389256716, 0.0992786959, 0.4275939763, 0.0399221145, 0.4134415388, -0.0181037094, -0.4771102369, -0.1259957999, 0.0662658662, -0.2162791044, 0.2179785818, 0.0931359753, 0.0167734399, -0.2299903929, -0.333407253, -0.0685395822, 0.0877208486, -0.398034662, 0.6731895208, 0.3429540992, -0.1945346594, 0.2956731617, 0.229450196, 0.1547932476, 0.2516961992, -0.06370911, 0.1682656854, 0.1497502029, -0.0029829429, 0.1993836164, -0.0682336912, 0.1190656945, -0.0103188921, -0.1015118659, 0.1754912585, -0.0124606993, -0.2762166858, -0.2717877328, -0.1240052581, 0.2903384268, -0.3395359516, -0.2814122438, -0.0395573862, -0.2850348353, -0.20351322, 0.0220347326, -0.0706589147, -0.37479949, 0.2263819128, 0.2376688123, -0.1426928341, 0.1695864201, 0.3712312579, -0.0255006161, -0.0888266861, 0.55849123, 0.0715674981, -0.1946098357, -0.2024846226, 0.1518792808, -0.0337788872, -0.2271941751, 0.1091583073, -0.1162662581, -0.2636434436, -0.228795588, 0.3435635269, -0.0256999005, 0.0402621701, -0.2143466771, -0.4193456769, -0.5076625943, 0.0499492101, -0.1311997622, 0.1811649352, 0.4385975003, 0.4080055952, -0.2568693161, 0.3760202825, -0.2495920062, -0.0800240263, -0.5987673402, 0.2662304342, 0.0188428126, -0.5459759235, -0.0275539123, 0.0216406267, 0.0264435783, 0.2940588295, -0.1200793236, -0.1588125229, -0.0702610016, 0.1605631262, 0.2280810773, -0.1013727859, -0.2458607405, 0.1184101254, -0.1792993546, -0.1568113267, 0.1025062203, 0.1319526881, 0.0121631492, 0.1235532314, -0.0908354148, -0.1170051619, -0.0513541922, -0.086523287, 0.0492477901, -0.1551796198, 0.2005682141, 0.388777405, -0.1900875419, -0.0090763913, -0.2909187675, 0.1795438081, 0.693025887, 0.0096778013, 0.393394649, -0.3145880103, -0.1508097947, 0.2292111814, -0.2073031217, 0.1850659698, -0.323890686, -0.0958862156, 0.2286645025, 0.1294851452, -0.2605692744, -0.2062440813, 0.5028803945, -0.3981368542, 0.1572270095, 0.1296643019, -0.0983622149, 0.2678847611, 0.1832061857, 0.160304606, 0.7458074689, 0.0117862113, 0.1765501648, -0.0622488782, -0.0920017809, 0.0551158004, 0.5123580098, 0.1351605952, 0.2308290601, 0.1101418212, -0.2032731622, 0.3773396909, -0.4285533428, 0.2233324647, 0.3698288202, -0.1252682209, -0.1937610507, 0.208747074, -0.1403711885, 0.2644396126, -0.0434947833, 0.352260083, -0.1093695387, -0.1740658879, -0.1687216461, 0.4904872179, -0.3190308809, -0.0490969718, -0.0212327018, -0.0759383813, -0.1959421039, -0.2856764495, 0.0508423895, -0.0616605058, 0.1097758934, 0.0157874823, -0.080427587, 0.2032716721, -0.1478795409, 0.1775083393, 0.2425410599, -0.3291361034, 0.2424014658, 0.1096198484, 0.2629411221, -0.2478345037, 0.1149145588, 0.3023825884, 0.268660605, -0.4128153324, 0.1197531298, -0.0614378452, -0.1552256644, 0.1539586782, 0.1354498416, -0.1843045652, -0.219290331, 0.2301809043, 0.0778794214, -0.2095595896, -0.1722646207, 0.1902218461, 0.1092763692, 0.1233892664, -0.0497295521, -0.0805692747, -0.205393374, -0.3169716895, -0.1771354973, -0.3990468681, -0.048668962, 0.0820414275, -0.2334051132, 0.2352662534, -0.3069976866, 0.080678381, 0.0823598057, 0.3644183576, 0.315518111, 0.0889510512, -0.3957802653, -0.0233591516, -0.4049154222, 0.2132006586, 0.3097580075, -0.1938924491, 0.0852777287, 0.1949707568, 0.0605364554, 0.3144335151, -0.1063979939, 0.057046745, -0.131813854, -0.0067868624, -0.2199010998, 0.1342487633, -0.1653566957, 0.1062283069, 0.2053379565, -0.3196311593, 0.3005921841, 0.2335089594, -0.0160383843, -0.203766942, -0.0731839016, -0.2135286182, -0.3241594136, -0.0482807383, 0.2011154443, 0.298532337, -0.2826666832, 0.1801340878, 0.2097663879, -0.0438413285, -0.287552774, -0.1931218952, 0.1564356387, 0.4927532971, -0.0002100572, 0.12636967, -0.3023885787, -0.1757033318, 0.0875674933, -0.2813341022, -0.2423000634, 0.3333650529, -0.2057005018, 0.1753342003, -0.014725904, 0.2186225504, 0.0708540455, 0.283408314, -0.245333299, -0.4549573958, 0.6601228118, -0.4289315939, -0.4800796211, -0.056264773, -0.0659725964, 0.1373785436, -0.2057527155, -0.2559032142, -0.150451988, 0.2913419902, 0.0845628828, -0.2006699145, 0.051886376, 0.1554603577, -0.0358310938, -0.1501897424, 0.3721498251, 0.1291875988, 0.0628955588, 0.1038765386, -0.2139436007 ]
https://github.com/huggingface/datasets/issues/665
runing dataset.map, it raises TypeError: can't pickle Tokenizer objects
Thank you for the rapid and polite response! @lhoestq Thanks for the suggestion! I've passed the pickle phase, but another `ArrowInvalid` problem occored. I created another issue #687 . @thomwolf Wow, really fast work. I'm looking forward to the next release 🤗
I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`. ``` def convert_to_features(example): # Tokenize contexts and questions (as pairs of inputs) input_pairs = [example['question'], example['context']] encodings = tokenizer.encode_plus(input_pairs, pad_to_max_length=True, max_length=512) context_encodings = tokenizer.encode_plus(example['context']) # Compute start and end tokens for labels using Transformers's fast tokenizers alignement methodes. # this will give us the position of answer span in the context text start_idx, end_idx = get_correct_alignement(example['context'], example['answers']) start_positions_context = context_encodings.char_to_token(start_idx) end_positions_context = context_encodings.char_to_token(end_idx-1) # here we will compute the start and end position of the answer in the whole example # as the example is encoded like this <s> question</s></s> context</s> # and we know the postion of the answer in the context # we can just find out the index of the sep token and then add that to position + 1 (+1 because there are two sep tokens) # this will give us the position of the answer span in whole example sep_idx = encodings['input_ids'].index(tokenizer.sep_token_id) start_positions = start_positions_context + sep_idx + 1 end_positions = end_positions_context + sep_idx + 1 if end_positions > 512: start_positions, end_positions = 0, 0 encodings.update({'start_positions': start_positions, 'end_positions': end_positions, 'attention_mask': encodings['attention_mask']}) return encodings ``` Then I run `dataset.map(convert_to_features)`, it raise ``` In [59]: a.map(convert_to_features) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-59-c453b508761d> in <module> ----> 1 a.map(convert_to_features) /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 365 file = StringIO() 366 with _no_cache_fields(obj): --> 367 dump(obj, file) 368 return file.getvalue() 369 /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 337 def dump(obj, file): 338 """pickle an object to a file""" --> 339 Pickler(file, recurse=True).dump(obj) 340 return 341 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 444 raise PicklingError(msg) 445 else: --> 446 StockPickler.dump(self, obj) 447 stack.clear() # clear record of 'recursion-sensitive' pickled objects 448 return /opt/conda/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_function(pickler, obj) 1436 globs, obj.__name__, 1437 obj.__defaults__, obj.__closure__, -> 1438 obj.__dict__, fkwdefaults), obj=obj) 1439 else: 1440 _super = ('super' in getattr(obj.func_code,'co_names',())) and (_byref is not None) and getattr(pickler, '_recurse', False) /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/pickle.py in save_tuple(self, obj) 787 write(MARK) 788 for element in obj: --> 789 save(element) 790 791 if id(obj) in memo: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle Tokenizer objects ```
42
runing dataset.map, it raises TypeError: can't pickle Tokenizer objects I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`. ``` def convert_to_features(example): # Tokenize contexts and questions (as pairs of inputs) input_pairs = [example['question'], example['context']] encodings = tokenizer.encode_plus(input_pairs, pad_to_max_length=True, max_length=512) context_encodings = tokenizer.encode_plus(example['context']) # Compute start and end tokens for labels using Transformers's fast tokenizers alignement methodes. # this will give us the position of answer span in the context text start_idx, end_idx = get_correct_alignement(example['context'], example['answers']) start_positions_context = context_encodings.char_to_token(start_idx) end_positions_context = context_encodings.char_to_token(end_idx-1) # here we will compute the start and end position of the answer in the whole example # as the example is encoded like this <s> question</s></s> context</s> # and we know the postion of the answer in the context # we can just find out the index of the sep token and then add that to position + 1 (+1 because there are two sep tokens) # this will give us the position of the answer span in whole example sep_idx = encodings['input_ids'].index(tokenizer.sep_token_id) start_positions = start_positions_context + sep_idx + 1 end_positions = end_positions_context + sep_idx + 1 if end_positions > 512: start_positions, end_positions = 0, 0 encodings.update({'start_positions': start_positions, 'end_positions': end_positions, 'attention_mask': encodings['attention_mask']}) return encodings ``` Then I run `dataset.map(convert_to_features)`, it raise ``` In [59]: a.map(convert_to_features) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-59-c453b508761d> in <module> ----> 1 a.map(convert_to_features) /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint) 1242 fn_kwargs=fn_kwargs, 1243 new_fingerprint=new_fingerprint, -> 1244 update_data=update_data, 1245 ) 1246 else: /opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 151 "output_all_columns": self._output_all_columns, 152 } --> 153 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 154 if new_format["columns"] is not None: 155 new_format["columns"] = list(set(new_format["columns"]) & set(out.column_names)) /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): /opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 365 file = StringIO() 366 with _no_cache_fields(obj): --> 367 dump(obj, file) 368 return file.getvalue() 369 /opt/conda/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 337 def dump(obj, file): 338 """pickle an object to a file""" --> 339 Pickler(file, recurse=True).dump(obj) 340 return 341 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 444 raise PicklingError(msg) 445 else: --> 446 StockPickler.dump(self, obj) 447 stack.clear() # clear record of 'recursion-sensitive' pickled objects 448 return /opt/conda/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_function(pickler, obj) 1436 globs, obj.__name__, 1437 obj.__defaults__, obj.__closure__, -> 1438 obj.__dict__, fkwdefaults), obj=obj) 1439 else: 1440 _super = ('super' in getattr(obj.func_code,'co_names',())) and (_byref is not None) and getattr(pickler, '_recurse', False) /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/pickle.py in save_tuple(self, obj) 787 write(MARK) 788 for element in obj: --> 789 save(element) 790 791 if id(obj) in memo: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /opt/conda/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /opt/conda/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 931 # we only care about session the first pass thru 932 pickler._session = False --> 933 StockPickler.save_dict(pickler, obj) 934 log.info("# D2") 935 return /opt/conda/lib/python3.7/pickle.py in save_dict(self, obj) 857 858 self.memoize(obj) --> 859 self._batch_setitems(obj.items()) 860 861 dispatch[dict] = save_dict /opt/conda/lib/python3.7/pickle.py in _batch_setitems(self, items) 883 for k, v in tmp: 884 save(k) --> 885 save(v) 886 write(SETITEMS) 887 elif n: /opt/conda/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle Tokenizer objects ``` Thank you for the rapid and polite response! @lhoestq Thanks for the suggestion! I've passed the pickle phase, but another `ArrowInvalid` problem occored. I created another issue #687 . @thomwolf Wow, really fast work. I'm looking forward to the next release 🤗
[ -0.2387793064, -0.2978487313, -0.0196805913, 0.2330354303, 0.4450324476, -0.1729923189, 0.2851523757, 0.1309392452, -0.276091218, 0.1103134975, -0.0697863922, 0.4891905189, -0.0087261396, -0.0467340946, -0.1457095742, -0.1114736199, 0.0535605326, 0.2078532726, 0.0181141309, -0.0561073758, -0.2787824571, 0.207442537, -0.4731769562, 0.1585230082, -0.2825991213, -0.2674279809, 0.1064045429, -0.1985801905, -0.2693117261, -0.3823215365, -0.1436450928, -0.0733661503, -0.0288478155, 0.5633369684, -0.0001192604, 0.0994179696, 0.1089545265, -0.145972237, 0.005223644, -0.0495663695, -0.0748075992, -0.3035498261, -0.2058744133, -0.4582726061, -0.1556462198, -0.1438440233, 0.0111552952, -0.3324888051, 0.5145231485, 0.2914210558, 0.1399782449, 0.4932262897, 0.0206352416, 0.0532784015, 0.0153279454, 0.0298239198, -0.131453231, -0.2608632147, 0.1487915516, 0.2165462971, -0.1302713007, 0.3254894018, -0.16130355, -0.2627823353, 0.0994699225, 0.0949373916, 0.1041131467, -0.4675593376, 0.3230481148, -0.0021583703, 0.2189716399, -0.0208102651, -0.2567600608, -0.2679678202, -0.0794852525, 0.0625911132, -0.0412522778, -0.2022153735, 0.0776131824, 0.051286459, -0.3526939452, -0.1723531932, -0.1798729748, 0.1082337722, 0.0383865014, 0.3674841821, -0.2666113079, 0.2930519283, 0.0967983454, -0.2501665652, -0.1138214841, -0.0991192684, 0.2264453322, 0.4768719375, -0.3883422613, -0.3008862436, -0.0943804905, -0.4099988341, 0.3477459848, -0.0384068899, -0.227679655, 0.2554123402, -0.0489556231, 0.1893793195, 0.0231761169, 0.3520214856, 0.2632216215, 0.3699641228, 0.0116729168, -0.1440163404, 0.0652596056, -0.0488729551, -0.0822232366, -0.221576035, -0.0569124147, 0.2582864761, 0.3595127463, -0.018612938, -0.0462388806, 0.0278619379, -0.2262803167, 0.042743206, 0.1734635979, 0.4068898261, 0.1080137193, 0.2318413407, -0.3183894455, 0.0902410001, -0.1242801398, 0.0253061932, -0.165486455, 0.2140230685, -0.0066214097, -0.1393791437, -0.1643194258, 0.0698125139, 0.2013428807, -0.0268375371, 0.0632025003, -0.2202775329, 0.0615381785, -0.1790308654, 0.2758252025, -0.0943107828, -0.050224077, 0.1737564951, 0.2081712782, -0.4094806015, -0.2060558796, 0.0352332778, -0.3411521316, 0.0173318814, 0.131188482, 0.1185403913, 0.0562378652, 0.0476906113, -0.3749631643, 0.2920552492, 0.4146036506, 0.007591249, 0.0322677419, -0.1267378628, -0.2016420215, -0.1111271605, 0.2182483375, 0.1899360418, -0.1373289227, -0.2079761922, 0.2503730059, -0.0020624166, 0.1535669118, 0.4049601555, -0.0530273505, 0.2562196553, -0.1467849314, 0.559774518, 0.4704820812, -0.625507772, -0.5309310555, 0.1032185107, -0.4468847215, -0.1779430062, -0.0353463739, 0.0416382886, 0.561388433, 0.1241551861, -0.1132062748, 0.3392554522, 0.0722959042, 0.2676003873, -0.1563939452, -0.1415294856, 0.4092996716, 0.092681706, 0.2170975804, 0.1164890528, -0.168253392, 0.1971370429, -0.1022471189, -0.1236947402, 0.0914444104, 0.1902047694, 0.1654273421, -0.2108137012, 0.0806121156, -0.1629787236, -0.5545788407, 0.0651860982, -0.3476859629, 0.2234149724, -0.2890501022, -0.1947725862, -0.2887653112, 0.1541355401, -0.4519183934, -0.0524004102, 0.0838472992, -0.0306146666, 0.1889375448, -0.013604735, 0.0192882679, -0.0761403516, 0.1458209902, 0.1860937476, -0.2552470863, 0.206203267, -0.2569343448, 0.0211482756, -0.059730567, 0.099063009, 0.4085006416, -0.1759830713, -0.255145669, 0.2755494118, 0.172052294, -0.0848681852, -0.0500597395, -0.0350359567, 0.2658096552, -0.2096953839, -0.064406991, 0.1785882711, 0.1667185277, -0.0287600961, -0.0929356292, 0.4431661665, 0.2247035354, 0.3178623319, -0.019105548, 0.1625135541, 0.2412848771, -0.1027472615, -0.0464949533, -0.1355440915, -0.1764929444, 0.0628634244, 0.2340397537, -0.0736531317, 0.0656427741, -0.059075132, 0.847992897, -0.0683463737, 0.0793829486, 0.2044740766, -0.116350919, 0.0497057475, -0.0788841099, -0.4018101096, 0.0417375378, 0.0392285511, -0.1734899431, -0.1066210642, 0.2546637654, 0.1459449381, 0.0415254608, 0.3150499761, 0.1146959215, 0.2255444378, 0.1599871963, 0.1129512414, -0.1720334589, -0.1941429526, 0.1629726738, 0.1452345103, -0.1468620449, -0.024432173, -0.0460565463, 0.0444772132, 0.0104705654, -0.0486727878, -0.1950333267, -0.2504670024, 0.0337897651, -0.0237583909, 0.0957350582, 0.4495550692, 0.3668554723, 0.3240295351, 0.4278210104, -0.1099203452, -0.1704415232, -0.1969798207, -0.0876938924, -0.0677345395, 0.1707259417, -0.005356261, -0.0357479304, 0.0103843929, 0.1024925411, -0.456127882, -0.4291421771, 0.2537454069, -0.1782850027, 0.1860092729, -0.0141354073, 0.1210131422, -0.3429493904, -0.2921086252, 0.2118502706, -0.2194128186, -0.3013741672, 0.0706817657, -0.0610883757, -0.3209869564, 0.0511770956, -0.2405866086, -0.3765722215, -0.3376920223, 0.3630160093, -0.0082481569, 0.1135795265, 0.1541582793, -0.0030259092, 0.2885194719, -0.0200713351, -0.0359077342, -0.244001627, 0.0543055683, 0.4122084379, -0.1826187521, -0.2826856673, -0.391576916, -0.1759160608, 0.0525785871, -0.1293790936, -0.1020928621, -0.2275469899, -0.271194011, 0.2238457948, -0.1608631164, 0.045888029, 0.5580424666, -0.0492364317, 0.0907654762, 0.0115672322, -0.160931915, 0.2720035315, 0.1358188838, 0.0812893808, -0.0107792886, 0.5259885192, 0.1519600451, 0.8704360723, 0.1582152545, -0.2194379717, 0.1683555543, -0.1485035121, -0.0106374593, -0.0340547934, -0.3892844617, 0.1844978034, -0.0443503037, 0.1226070747, 0.1395881027, -0.209491834, -0.1556349695, 0.1454911828, -0.0947225913, -0.2187252492, -0.2757362127, -0.0225728881, 0.0979046226, 0.0983443111, 0.047766529, 0.1866318733, -0.4435555339, 0.0679603964, 0.1192271113, 0.0044027381, 0.0480468422, -0.0468374304, -1.0162569284, -0.0913211331, -0.1702793837, 0.3654930592, 0.2294978201, 0.4982431233, -0.0179928597, -0.0469949953, 0.0515057296, -0.2121097893, 0.8495112062, 0.2505566776, -0.0532122888, 0.0796273127, 0.0189494062, -0.1545514464, 0.0577013195, -0.1632409543, 0.6255756617, 0.4945645034, 0.7852732539, -0.4374045432, -0.0893703476, 0.0312041119, -0.0599598736, -0.1476592869, 0.0810301825, -0.2087637633, -0.1804115623, -0.5762068033, 0.2585668266, 0.2810133696, 0.1928339005, 0.1528313756, -0.2231671959, 0.0690150782, -0.2840030789, -0.0985405222, 0.2312043756, 0.2143351138, 0.1858995557, -0.0022408559, 0.1455385536, -0.1561148316, -0.2068819404, 0.1899430454, 0.2558946609, -0.623185873, 0.2523160875, 0.1651499718, 0.5603797436, 0.1582311094, -0.1150252298, 0.2946461141, -0.0105133373, 0.479395777, -0.0390629433, 0.4788195491, 0.3626246154, 0.2778423727, -0.3016586304, -0.1384535581, 0.3859471679, -0.0154792974, 0.0721444264, 0.015305832, 0.2642337382, -0.152379334, 0.5785443187, 0.1050154045, 1.0689463615, -0.0962893516, -0.09116216, 0.1268846542, 0.2655838728, 0.5600721836, -0.2914606929, 0.2052386403, -0.5174928904, -0.0904989392, 0.0042559877, -0.1398294866, 0.1350088567, 0.1887043864, -0.430057317, 0.1389256716, 0.0992786959, 0.4275939763, 0.0399221145, 0.4134415388, -0.0181037094, -0.4771102369, -0.1259957999, 0.0662658662, -0.2162791044, 0.2179785818, 0.0931359753, 0.0167734399, -0.2299903929, -0.333407253, -0.0685395822, 0.0877208486, -0.398034662, 0.6731895208, 0.3429540992, -0.1945346594, 0.2956731617, 0.229450196, 0.1547932476, 0.2516961992, -0.06370911, 0.1682656854, 0.1497502029, -0.0029829429, 0.1993836164, -0.0682336912, 0.1190656945, -0.0103188921, -0.1015118659, 0.1754912585, -0.0124606993, -0.2762166858, -0.2717877328, -0.1240052581, 0.2903384268, -0.3395359516, -0.2814122438, -0.0395573862, -0.2850348353, -0.20351322, 0.0220347326, -0.0706589147, -0.37479949, 0.2263819128, 0.2376688123, -0.1426928341, 0.1695864201, 0.3712312579, -0.0255006161, -0.0888266861, 0.55849123, 0.0715674981, -0.1946098357, -0.2024846226, 0.1518792808, -0.0337788872, -0.2271941751, 0.1091583073, -0.1162662581, -0.2636434436, -0.228795588, 0.3435635269, -0.0256999005, 0.0402621701, -0.2143466771, -0.4193456769, -0.5076625943, 0.0499492101, -0.1311997622, 0.1811649352, 0.4385975003, 0.4080055952, -0.2568693161, 0.3760202825, -0.2495920062, -0.0800240263, -0.5987673402, 0.2662304342, 0.0188428126, -0.5459759235, -0.0275539123, 0.0216406267, 0.0264435783, 0.2940588295, -0.1200793236, -0.1588125229, -0.0702610016, 0.1605631262, 0.2280810773, -0.1013727859, -0.2458607405, 0.1184101254, -0.1792993546, -0.1568113267, 0.1025062203, 0.1319526881, 0.0121631492, 0.1235532314, -0.0908354148, -0.1170051619, -0.0513541922, -0.086523287, 0.0492477901, -0.1551796198, 0.2005682141, 0.388777405, -0.1900875419, -0.0090763913, -0.2909187675, 0.1795438081, 0.693025887, 0.0096778013, 0.393394649, -0.3145880103, -0.1508097947, 0.2292111814, -0.2073031217, 0.1850659698, -0.323890686, -0.0958862156, 0.2286645025, 0.1294851452, -0.2605692744, -0.2062440813, 0.5028803945, -0.3981368542, 0.1572270095, 0.1296643019, -0.0983622149, 0.2678847611, 0.1832061857, 0.160304606, 0.7458074689, 0.0117862113, 0.1765501648, -0.0622488782, -0.0920017809, 0.0551158004, 0.5123580098, 0.1351605952, 0.2308290601, 0.1101418212, -0.2032731622, 0.3773396909, -0.4285533428, 0.2233324647, 0.3698288202, -0.1252682209, -0.1937610507, 0.208747074, -0.1403711885, 0.2644396126, -0.0434947833, 0.352260083, -0.1093695387, -0.1740658879, -0.1687216461, 0.4904872179, -0.3190308809, -0.0490969718, -0.0212327018, -0.0759383813, -0.1959421039, -0.2856764495, 0.0508423895, -0.0616605058, 0.1097758934, 0.0157874823, -0.080427587, 0.2032716721, -0.1478795409, 0.1775083393, 0.2425410599, -0.3291361034, 0.2424014658, 0.1096198484, 0.2629411221, -0.2478345037, 0.1149145588, 0.3023825884, 0.268660605, -0.4128153324, 0.1197531298, -0.0614378452, -0.1552256644, 0.1539586782, 0.1354498416, -0.1843045652, -0.219290331, 0.2301809043, 0.0778794214, -0.2095595896, -0.1722646207, 0.1902218461, 0.1092763692, 0.1233892664, -0.0497295521, -0.0805692747, -0.205393374, -0.3169716895, -0.1771354973, -0.3990468681, -0.048668962, 0.0820414275, -0.2334051132, 0.2352662534, -0.3069976866, 0.080678381, 0.0823598057, 0.3644183576, 0.315518111, 0.0889510512, -0.3957802653, -0.0233591516, -0.4049154222, 0.2132006586, 0.3097580075, -0.1938924491, 0.0852777287, 0.1949707568, 0.0605364554, 0.3144335151, -0.1063979939, 0.057046745, -0.131813854, -0.0067868624, -0.2199010998, 0.1342487633, -0.1653566957, 0.1062283069, 0.2053379565, -0.3196311593, 0.3005921841, 0.2335089594, -0.0160383843, -0.203766942, -0.0731839016, -0.2135286182, -0.3241594136, -0.0482807383, 0.2011154443, 0.298532337, -0.2826666832, 0.1801340878, 0.2097663879, -0.0438413285, -0.287552774, -0.1931218952, 0.1564356387, 0.4927532971, -0.0002100572, 0.12636967, -0.3023885787, -0.1757033318, 0.0875674933, -0.2813341022, -0.2423000634, 0.3333650529, -0.2057005018, 0.1753342003, -0.014725904, 0.2186225504, 0.0708540455, 0.283408314, -0.245333299, -0.4549573958, 0.6601228118, -0.4289315939, -0.4800796211, -0.056264773, -0.0659725964, 0.1373785436, -0.2057527155, -0.2559032142, -0.150451988, 0.2913419902, 0.0845628828, -0.2006699145, 0.051886376, 0.1554603577, -0.0358310938, -0.1501897424, 0.3721498251, 0.1291875988, 0.0628955588, 0.1038765386, -0.2139436007 ]
https://github.com/huggingface/datasets/issues/664
load_dataset from local squad.py, raise error: TypeError: 'NoneType' object is not callable
Hi ! Thanks for reporting. It looks like no object inherits from `datasets.GeneratorBasedBuilder` (or more generally from `datasets.DatasetBuilder`) in your script. Could you check that there exist at least one dataset builder class ?
version: 1.0.2 ``` train_dataset = datasets.load_dataset('squad') ``` The above code can works. However, when I download the squad.py from your server, and saved as `my_squad.py` to local. I run followings raise errors. ``` train_dataset = datasets.load_dataset('./my_squad.py') ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-28-25a84b4d1581> in <module> ----> 1 train_dataset = nlp.load_dataset('./my_squad.py') /opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, script_version, **config_kwargs) 602 hash=hash, 603 features=features, --> 604 **config_kwargs, 605 ) 606 TypeError: 'NoneType' object is not callable
34
load_dataset from local squad.py, raise error: TypeError: 'NoneType' object is not callable version: 1.0.2 ``` train_dataset = datasets.load_dataset('squad') ``` The above code can works. However, when I download the squad.py from your server, and saved as `my_squad.py` to local. I run followings raise errors. ``` train_dataset = datasets.load_dataset('./my_squad.py') ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-28-25a84b4d1581> in <module> ----> 1 train_dataset = nlp.load_dataset('./my_squad.py') /opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, script_version, **config_kwargs) 602 hash=hash, 603 features=features, --> 604 **config_kwargs, 605 ) 606 TypeError: 'NoneType' object is not callable Hi ! Thanks for reporting. It looks like no object inherits from `datasets.GeneratorBasedBuilder` (or more generally from `datasets.DatasetBuilder`) in your script. Could you check that there exist at least one dataset builder class ?
[ -0.2243588269, 0.3296632469, 0.1114710793, 0.1580807865, 0.3371320367, -0.0254656393, 0.6201821566, 0.3964117765, -0.1371877789, 0.0546794273, -0.0827252641, 0.4112724364, -0.1245824471, -0.024263991, 0.3396509588, 0.0455026962, -0.0610546321, 0.2632742524, -0.1969890445, -0.2398488075, -0.2595590353, -0.0362524465, -0.0532293878, 0.3426586688, -0.3587335944, 0.01673018, -0.0222248156, 0.413007766, -0.2073465735, -0.4058050215, 0.4260212183, -0.0520703942, 0.4543029666, 0.4609364867, -0.000108605, 0.0964229479, 0.2037237138, -0.056775257, -0.4298073947, -0.4939338267, 0.0174135938, -0.2600156367, 0.3480305076, -0.4434493482, -0.0442653, 0.1277415156, 0.1641694605, -0.2078907341, 0.4198298156, 0.5076457858, 0.2114355713, 0.4164865017, -0.0478948355, -0.1072462052, 0.0606457703, 0.2325320244, -0.1264865398, 0.4050810933, 0.0112332813, -0.2007901967, 0.2467611581, -0.0516307093, -0.2405681312, -0.0204575695, 0.2836371958, 0.1646960974, -0.0038882045, -0.339671284, 0.0379902907, 0.0254599042, 0.3043538332, -0.5623263717, -0.4327318668, 0.0522475466, 0.2386764884, -0.0903792381, 0.0619195513, 0.1269759983, -0.1391507834, 0.1650294662, -0.2995200455, -0.0174529124, -0.3469912708, 0.2185474634, 0.1378308386, 0.0882262215, -0.0734708235, 0.2105120271, -0.0946085006, 0.1174467877, 0.1658373773, -0.0670499578, 0.2600556016, 0.224714905, -0.1657714993, -0.0563902669, 0.1484063417, -0.2879837453, 0.0835406408, 0.1376607269, 0.1994939744, 0.0354082957, 0.1475708634, 0.3584356308, 0.304630518, -0.0103832893, 0.4460419118, 0.3905523419, 0.2092551887, 0.0204773396, -0.3075549901, 0.0816469416, -0.4033692777, -0.1090948805, 0.2758958936, 0.0765985027, 0.6148069501, -0.175850302, -0.0884731412, -0.0214999709, -0.0159816276, -0.0150976861, 0.1789546907, 0.3566184342, -0.0046706293, 0.1785070598, 0.022645846, 0.3013432324, -0.228946507, -0.3886496425, -0.1576166898, -0.0191610828, -0.1196382418, 0.1119066626, 0.3236373961, 0.0200298112, 0.0620409958, -0.0539847165, 0.009688328, 0.0857435837, 0.3394779563, -0.2605609298, -0.0883494392, 0.0893338099, 0.1972519159, 0.0455684848, 0.3239513636, -0.4812257588, -0.1657758355, 0.0935725048, -0.1421401054, -0.4150407314, -0.2359465659, 0.1811514497, -0.1541478336, -0.0848483294, -0.0737669617, -0.1494626105, 0.2222110033, -0.3436720371, -0.0893645957, -0.2118360102, -0.0979258567, -0.3135223389, 0.1799424887, 0.731836915, -0.5566920042, -0.174850598, 0.0376518443, -0.1776362211, 0.2152793854, 0.0091929324, -0.3966126144, 0.2239098251, -0.0369547196, -0.1163443401, 0.8239556551, -0.5646020174, -0.210843116, 0.314820528, -0.2390917987, -0.1988458931, -0.066105701, -0.0253552031, 0.3400921226, 0.0921125263, 0.2875827551, 0.5355542302, -0.0294602737, 0.0208227299, -0.1860278994, -0.2029986978, 0.0848432854, 0.2191347331, 0.0231417362, 0.3303082585, 0.1459700912, 0.086407043, 0.0052343351, -0.1767733991, 0.1181471497, 0.0941682383, 0.338704735, 0.0741474777, -0.2490804493, -0.2523498833, -0.6033934355, 0.0904372185, -0.3337164223, 0.2756747603, -0.2055825442, -0.1493387073, -0.215419516, 0.0664724261, -0.3703392446, 0.1264155805, 0.1411834359, 0.1770202816, 0.0798649415, -0.0429253206, -0.3529269695, 0.0876476169, -0.2050778419, 0.2082750946, -0.1766450703, 0.2906636, -0.1883772165, -0.2833374441, 0.0891406909, 0.2023648024, 0.2694807947, -0.1818107516, -0.1411183774, 0.3598249853, -0.2107283324, -0.0693583116, 0.1634409577, -0.2966670692, 0.0126889814, -0.0751979128, 0.2857248187, -0.0647992939, 0.1065603122, -0.0678152591, -0.1150796041, 0.5167068243, -0.0031732845, 0.1721062213, -0.0526649132, 0.0205948595, 0.1081373692, 0.0752764493, -0.2094511092, -0.1581073999, -0.2273747027, 0.2697476745, 0.4829779863, 0.118858844, -0.1470672339, 0.0532561988, 0.5740780234, -0.0546504967, 0.1372894347, 0.0851618573, -0.1313453913, -0.0412322916, 0.0708398521, 0.1479735225, 0.5725582242, 0.0996331796, -0.0794531479, -0.026810335, -0.1564650089, -0.0062205438, -0.033436548, -0.1205939725, 0.2183307558, 0.0642099753, 0.0933712348, 0.0356458947, -0.288557142, -0.1144712493, 0.126733914, 0.2433503866, -0.1978190094, 0.2767355144, -0.246538952, 0.0061043864, -0.4481369555, -0.0640273541, -0.340860486, -0.0192826763, -0.2010143995, 0.1224419102, 0.1562083662, 0.1803924441, -0.1137544513, 0.005295482, 0.0849540681, -0.5639898181, 0.1915778667, -0.079823792, -0.3821258247, -0.0223752782, 0.4319243133, 0.0793725848, 0.2485447079, -0.2006806582, -0.0224453416, -0.0097835883, -0.0044246032, -0.0129086236, 0.1107251719, 0.2616941631, 0.0467460677, 0.2120767087, -0.1695709676, -0.2411050498, 0.5361258984, -0.3284080625, 0.022523405, 0.2159547508, -0.1201799735, -0.099103421, -0.2032280117, -0.6506758332, -0.5834838152, -0.3092333972, 0.0982244313, 0.3362256587, 0.2940900326, 0.2489457726, 0.3768067658, 0.4234932959, 0.020835666, 0.1071605608, -0.072012201, -0.3683303893, 0.3266991973, -0.3098601699, -0.3858875632, 0.0721754506, -0.0773553476, 0.1593593061, -0.164202258, -0.143696934, -0.1241338626, 0.1434111148, 0.2297295779, -0.0108089894, 0.153446272, 0.3795168698, 0.0624460094, 0.0130371004, -0.0232358854, -0.2466183603, 0.130396083, 0.2644397616, 0.129202947, 0.1152429283, 0.4664044082, -0.3106529713, 0.6398792267, -0.0654287264, -0.1792744398, 0.3221141696, -0.1978888959, 0.3280731142, -0.2653110623, -0.511905551, 0.0864263773, -0.0068482286, -0.1117150411, 0.1300497353, -0.0943715945, -0.2312443405, -0.3441788852, 0.0010111089, -0.3042764664, -0.287599802, 0.129142642, 0.1015193239, 0.0178159531, 0.165662542, 0.1310943812, -0.4643909037, 0.0817350596, -0.2946577966, 0.1311014146, 0.0188822746, 0.1163313538, -0.6968169808, -0.0040906258, -0.2606071532, 0.2750988901, -0.0018120959, 0.3443773091, -0.0007360305, -0.1504273713, 0.0790584162, 0.0071523292, 0.3598924875, 0.0443537682, -0.0332391076, 0.3494808078, 0.0083166538, -0.3661865294, -0.0690006316, 0.0578531437, 0.4126608968, 0.1779299676, 0.3058730364, -0.1788775325, -0.1519781798, 0.2920210958, 0.1171977073, -0.1820324808, -0.1239637062, -0.4005766809, -0.146454528, -0.4580984116, -0.1369232684, -0.3179374039, 0.3135765493, -0.1764064729, -0.0169397667, 0.0101260981, 0.225615114, 0.0984550267, 0.2285173535, 0.1719059795, 0.0103982389, 0.0234332271, 0.1817035973, 0.1397233009, 0.0885703638, 0.4274910092, -0.0154268099, -0.4276292324, 0.0968836099, 0.0247513633, 0.2670661509, 0.2610839009, 0.0509396493, -0.3438415527, 0.1145096123, -0.0504522361, 0.1614844352, 0.0166757498, 0.2412513942, -0.2432652116, -0.1654125601, -0.6092642546, 0.2995340824, -0.017432142, 0.1257794499, 0.0740778297, -0.1040714532, -0.0699957982, 0.2641102672, -0.0333867036, 0.9230504036, -0.2437043935, 0.2671841383, 0.4023741782, 0.0270803571, 0.5112034678, -0.1930642873, 0.0954385996, -0.5287601948, 0.0611547604, 0.0787503719, -0.1406326592, 0.2448662668, 0.4530045986, -0.267467767, 0.2707573175, -0.1633040011, 0.2369350791, 0.0229806323, 0.3502409756, 0.0826203898, -0.2968752086, -0.5334138274, 0.1607748866, -0.1526111513, 0.2689839303, -0.122584112, -0.3375271559, -0.1786664128, -0.1476678848, 0.0995047018, 0.2700581551, -0.197402969, 0.2189332843, 0.0926459879, -0.1975752264, -0.0251708459, 0.396194011, 0.1224071458, -0.0203801785, -0.1569618583, -0.1656002849, -0.0339815728, 0.0331329927, -0.1739092469, 0.0883122385, 0.3278300464, -0.0933511481, -0.3661978841, 0.1251245886, 0.0381673165, -0.2050874382, 0.2090358138, 0.0745570362, 0.3146265745, -0.389338553, -0.3871370554, -0.0512850098, 0.0112019414, -0.1596219987, 0.1664564162, -0.0108032944, -0.1299458444, 0.0197042376, 0.1222799271, -0.1492580324, 0.0454933792, 0.6396823525, 0.0037156071, 0.1097423509, 0.5209496617, 0.0998620093, 0.0745397359, -0.3004194796, 0.3296761513, 0.0122951502, -0.3325356543, -0.005159887, 0.2763142586, -0.0711302981, 0.0493512787, 0.0253267381, 0.0048106853, 0.1556648314, -0.0613140352, -0.1963359118, -0.3921732306, 0.0833669528, 0.2229948342, 0.0238746237, 0.3970580101, 0.3349560797, 0.2966407239, -0.0667456836, -0.3174313009, -0.0635911003, -0.2534834445, 0.085392423, 0.1011065617, -0.2618180215, 0.0404367559, -0.0037618855, 0.1213665903, -0.0390640311, -0.0343278497, -0.2343988866, -0.0242192205, 0.1676314473, 0.1767393947, -0.0129672559, -0.1407911628, -0.1967521459, -0.2141486257, -0.0655743033, -0.0679333284, 0.1429408193, -0.0243407544, 0.1971214265, -0.0413309112, 0.2479351461, -0.0501686744, -0.0038261383, -0.0880309567, 0.1236707196, -0.0530494414, 0.2134477198, 0.0203920472, -0.0633006319, -0.4011787474, -0.0378916524, 0.0690685064, 0.3248783052, 0.2766214907, -0.4967814982, -0.073051177, 0.1525527388, 0.0463827252, 0.4550615549, -0.190095067, 0.1661149561, 0.03149179, 0.17238985, -0.2358931154, -0.0859520584, 0.4179474711, -0.3348883986, -0.073361367, 0.1853558123, -0.2392933518, -0.0198513549, -0.0200151727, 0.0348274857, 0.198942259, 0.0168719348, 0.2267225832, 0.2360971719, -0.131692335, 0.0538280122, 0.2121462375, 0.2222719789, 0.121232219, 0.3404953778, -0.3878472447, -0.0408478901, -0.3319379985, -0.0604661964, 0.2438611239, -0.3466594219, 0.0407509319, 0.0672534108, 0.0857074261, -0.0763253421, -0.2831715941, 0.7181065083, -0.4838990271, -0.2441075891, -0.1867140681, 0.1332158297, -0.1122146249, 0.0941124484, -0.4224554598, -0.0312602073, -0.0904556662, -0.0902874023, -0.1380403489, -0.2224529237, 0.1279007941, -0.0256491657, -0.1128324643, -0.1216527522, 0.3253851235, 0.1182352453, -0.2297561318, -0.0603046305, 0.1626445651, 0.0888856277, 0.2507383227, -0.0889423788, 0.095975399, 0.3186891377, 0.5235216618, 0.0713190064, 0.1520191282, 0.0657195151, -0.2197308987, -0.0342744291, -0.1044726297, 0.0762777776, 0.0663299039, 0.1891946048, 0.1664164215, -0.1354343742, -0.1276479214, 0.0595247224, -0.0899121016, -0.0937431678, 0.5399534106, -0.0734169036, -0.2679058909, -0.322348088, 0.1203832924, -0.5080350041, 0.0191759318, 0.4161301553, 0.3160794973, 0.1190877929, -0.4740586579, 0.0708643124, -0.0395556055, 0.3334863186, 0.0198187213, 0.0365334004, -0.2406849563, 0.0904706344, -0.6870473027, 0.2286407799, 0.0082810912, 0.10386426, 0.066070877, 0.3264710605, -0.144270137, 0.1549473256, -0.2070237398, -0.0874890313, -0.0201650448, 0.1666977406, -0.2390476167, -0.2215582132, -0.3781502545, 0.1564939618, 0.0617070012, -0.5121260881, 0.0867968425, -0.2959515452, 0.0290354993, -0.1131120175, -0.1626593471, 0.0351398438, -0.0939828083, 0.4827962816, 0.0560310036, 0.4043295085, 0.1090319231, -0.1398844272, -0.0718360171, -0.1703635305, -0.1583563834, 0.3901117444, 0.0352962948, 0.3115004599, -0.0136264144, 0.0669585168, -0.4052654803, 0.2364000976, 0.023013616, -0.1279180199, -0.0627652928, -0.1101916581, -0.1321986765, 0.0215623844, -0.0501379557, 0.079521358, -0.0191894379, 0.2761865258, -0.3440570533, -0.0467148572, 0.5400161147, -0.3772192299, -0.284217447, -0.0952102542, 0.3152954876, 0.0061884923, -0.2457028627, -0.4609936774, 0.1890917867, 0.3097380996, -0.1667710543, -0.1326295137, 0.2897097468, -0.1685257107, 0.1667708457, -0.1672701091, 0.1841707528, -0.2169227451, 0.006686246, 0.0432693511, -0.1639605761 ]
https://github.com/huggingface/datasets/issues/657
Squad Metric Description & Feature Mismatch
Thanks for reporting ! There indeed a mismatch between the features and the kwargs description I believe `answer_start` was added to match the squad dataset format for consistency, even though it is not used in the metric computation. I think I'd rather keep it this way, so that you can just give `references=squad["answers"]` to `.compute()`. Maybe we can just fix the description then.
The [description](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L39) doesn't mention `answer_start` in squad. However the `datasets.features` require [it](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L68). It's also not used in the evaluation.
63
Squad Metric Description & Feature Mismatch The [description](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L39) doesn't mention `answer_start` in squad. However the `datasets.features` require [it](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L68). It's also not used in the evaluation. Thanks for reporting ! There indeed a mismatch between the features and the kwargs description I believe `answer_start` was added to match the squad dataset format for consistency, even though it is not used in the metric computation. I think I'd rather keep it this way, so that you can just give `references=squad["answers"]` to `.compute()`. Maybe we can just fix the description then.
[ 0.0384344459, -0.1900424063, -0.0537598021, -0.0725317523, 0.4192172587, -0.0426004566, 0.1088643521, 0.0794382468, -0.215908587, 0.1062575951, -0.181975022, 0.4140356183, 0.3362864554, -0.0604612976, 0.1003780216, 0.1568865627, 0.0473280028, 0.0839828923, -0.0124866264, -0.1399420649, -0.1415313929, 0.298404932, -0.2252350897, 0.2715794444, -0.2736499608, -0.0178926438, -0.0506352335, 0.1622512937, -0.3746501505, -0.5675834417, 0.2677565515, 0.0306371227, -0.3266793787, 0.2287685424, -0.0001090158, -0.1445932835, 0.2327793837, -0.1377822161, -0.1771668196, -0.0342069119, 0.180046618, -0.3626689017, 0.1918866634, -0.4109574854, -0.0487219952, 0.1148333997, 0.0063601811, -0.0542373732, 0.3847956657, 0.1295463592, 0.2297419906, 0.4827030897, 0.0115808425, -0.2939109206, -0.0669131503, -0.035664551, -0.1096249521, 0.2075037062, 0.2950327098, -0.1821527183, -0.2618210316, 0.2340932041, 0.0406406522, 0.0445100144, 0.4658947289, 0.0488792248, 0.2508768737, -0.1295683682, 0.0629555807, 0.0557781905, 0.2274372578, -0.2071213573, -0.379889816, -0.1025849134, 0.0531464033, -0.091942288, 0.0872523636, 0.082810998, -0.1797546446, -0.012323413, -0.3148845732, 0.1019576788, -0.1891079843, 0.0358033516, -0.0675048754, 0.3396835327, -0.1549963504, 0.0361523777, 0.2265035808, -0.0704885498, -0.1331758797, 0.0341340676, -0.0735611916, 0.2844386101, -0.4198203683, -0.156045869, 0.2228901088, -0.020036513, 0.6190392971, -0.0421509072, 0.1646749824, 0.02486399, 0.3776239157, 0.1775777042, 0.0793170705, 0.4991119504, 0.5429852605, -0.1149802655, -0.001403103, 0.1581896693, -0.1400869638, 0.0006064749, 0.0942755714, -0.146792978, 0.1362457424, 0.0379650854, 0.1092147976, -0.1411067545, -0.1879776567, 0.1140721291, 0.0556676127, -0.0816744119, 0.0181321558, 0.3469877839, -0.0054647285, -0.0605895445, -0.1710804254, 0.2534981966, -0.0183082037, 0.1575540006, -0.3258034289, 0.1219165698, -0.2628059089, 0.0448267609, -0.1285423338, -0.121959269, 0.4747456908, -0.0501227751, 0.7316460609, -0.3010177314, -0.0586592481, 0.0636631921, -0.0390795469, -0.0274202339, -0.0383259207, 0.0665432215, 0.3291544616, -0.3137714863, -0.0523794331, -0.0128112696, -0.2679872811, -0.207008332, 0.0971628129, 0.2169309258, -0.529591918, 0.0841748863, 0.0191983897, 0.3222346008, 0.0022984142, -0.038179975, -0.0678532198, 0.0785542205, -0.4157372415, -0.2373694628, 0.4349513352, 0.1600912064, -0.0744297877, -0.0936139375, 0.2863317728, -0.0914693549, -0.22943528, 0.0623864383, -0.0687921196, 0.0911996812, -0.1189323291, 0.2205138057, 0.4820011258, -0.6493633986, -0.304839164, 0.0117191626, -0.1494524479, -0.1385001242, -0.2431691885, -0.0276348647, 0.2740222812, 0.1774706095, 0.0658347383, 0.0588015988, 0.206663847, -0.0599477142, -0.3792650104, -0.1584868133, -0.0096754357, -0.0494995937, -0.0848825872, 0.1371220946, 0.0600271635, 0.1734497249, 0.0599576645, 0.0350069515, -0.1196736842, 0.0897830278, 0.1923914552, -0.1864149719, 0.1418642402, -0.2624906898, -0.3259229064, 0.2314721048, -0.4219744802, 0.1186334416, 0.1511097103, -0.3517679274, -0.6282200217, 0.2035232633, -0.1491962522, -0.2065082788, 0.2031186223, -0.3312683702, 0.2791955173, 0.0093606254, -0.126821667, -0.1456930339, -0.2963277102, 0.0748762116, 0.0622852854, 0.0990390703, -0.2384699583, 0.0805218369, 0.1940939277, 0.2733444571, 0.1319562644, 0.1275602728, -0.1257134378, 0.4458441138, 0.0097676367, 0.1940328926, 0.2939256728, 0.0445200242, -0.0508880056, 0.007126587, -0.0308097508, 0.2197390497, 0.0883626044, -0.2323542535, -0.3145394921, 0.4246507585, -0.1224976331, 0.1658184826, 0.034308143, 0.1127613634, 0.1513231993, -0.0237646736, -0.2545130551, -0.0314414948, 0.0066198683, -0.050196778, 0.0542635582, -0.0734680891, -0.0802664384, -0.0812715366, 0.6966177225, 0.0119204959, 0.0642427728, 0.1774987876, -0.0329265967, -0.2631054521, -0.1926163286, -0.4333090484, 0.3488346934, 0.1907121688, 0.0782117471, 0.0230337046, -0.0434497446, -0.0238941014, 0.0534149259, 0.1939953864, -0.0103236204, 0.354257375, 0.3989409804, -0.1800168455, -0.0387117378, 0.1886888295, -0.2210491598, 0.0798668265, -0.2387338877, -0.0015482239, 0.2407596856, 0.040645659, 0.0088517759, -0.1270714402, -0.4600841403, -0.415073365, 0.3634661734, 0.026314063, 0.2164813578, 0.3412558436, 0.2149057835, 0.1921675056, 0.143650189, 0.0168057196, 0.1201280355, -0.4616580904, 0.1071901917, 0.0702020749, -0.1624263376, 0.1004729569, 0.2189999223, -0.3725537658, -0.0299975034, -0.1779545844, -0.4762519896, 0.1616972089, -0.0275494363, 0.3890664577, 0.1912372708, 0.1360050589, -0.4979568422, -0.107298553, 0.4114947617, -0.3360352814, -0.3585233092, -0.1036215052, 0.0542119555, -0.1929951608, -0.2370442897, -0.3711308837, 0.0113398479, -0.4087291658, 0.3871575594, 0.0803840905, 0.0601454265, 0.2898188829, -0.0015501243, 0.3929220736, -0.1249706596, -0.1458929032, -0.432792455, -0.3826182187, 0.3666388392, -0.084931545, -0.4884541631, 0.0189985167, -0.1149353981, -0.0452606194, -0.3103395998, -0.0352043398, -1.1364412308, 0.1700793803, 0.1271781921, -0.1813667864, 0.1192193031, 0.2368254215, -0.5600414872, -0.0788351223, -0.3416190743, -0.4113593102, 0.3146169186, 0.2838905454, 0.1413573772, -0.2506253719, 0.2161834389, 0.1242948472, 0.8888487816, 0.2331057042, 0.1609022617, -0.2426309586, -0.1912293136, 0.1344809532, 0.0041368101, -0.3907556534, 0.1829264611, -0.0979354903, 0.0240478907, 0.3376946449, 0.2204972059, -0.0359368175, -0.0884131119, 0.2805606425, -0.1713956594, -0.2517635822, -0.2128239125, 0.2326666564, 0.1044016778, 0.1094351709, 0.2401743382, -0.3419875205, -0.1232594773, -0.0082460251, 0.2320180088, 0.0651293397, 0.1779605448, -0.792993784, -0.1233449578, -0.1499419063, 0.2213965505, 0.2740212679, -0.043823123, -0.0035358062, -0.0784568116, 0.127856195, -0.0885966271, 0.6530708075, 0.1421282142, -0.0944208875, 0.169014588, 0.175590992, -0.4683640003, -0.1306079179, -0.0884225741, 0.3365379274, 0.3961405456, 0.3704075515, -0.4528733194, -0.1798211634, -0.0824128985, -0.0248378981, -0.1235277057, 0.0070577841, -0.6551501751, -0.276180774, -0.165327087, 0.2495295852, 0.1240832433, 0.0326752998, 0.16336371, 0.0280102864, 0.3029096127, 0.1078596115, 0.1145451069, 0.4966827929, 0.3356106579, 0.0225761794, -0.1246725917, 0.2346403003, -0.0850384757, -0.3230128288, 0.3395517766, 0.0269840341, -0.1159276515, 0.019125212, -0.326603502, 0.2890708447, 0.2416297942, -0.1814799607, 0.0906043798, -0.3929244876, 0.0673669428, -0.1850719601, 0.0427734479, 0.4216830432, 0.076856859, -0.0398625508, -0.1143276617, 0.4105684161, -0.2401655316, -0.1583058387, -0.034449894, 0.3706846237, 0.1414438337, 0.0601720065, -0.0102416575, 1.0200065374, 0.052129928, -0.1580083519, 0.2711502314, -0.0472821034, 0.5198646188, -0.1478834152, 0.2608548701, -0.4259822667, -0.1347874552, 0.0839141384, -0.219978109, -0.0904908702, 0.1006637067, -0.2206876427, 0.1749457866, -0.1338858306, 0.4090325534, -0.0596340969, 0.2469777167, -0.0361243524, -0.0739269182, -0.428942591, 0.2308984101, -0.0863792747, 0.1210721508, -0.0505420528, -0.0839659646, -0.2879821956, -0.146954, -0.1935780942, 0.0809502751, 0.0188849624, 0.2164884955, 0.3956876397, -0.2521109581, 0.0806007162, 0.4948328435, 0.3612059355, -0.0179022551, -0.1604378968, 0.1334341466, -0.3254789114, 0.0968632028, 0.0188937727, 0.2583018243, 0.0252781287, -0.3979593813, -0.1800470203, 0.0508728623, 0.0217195582, -0.1788698435, -0.3010590672, 0.1531125754, 0.039440155, -0.2973149419, -0.208268106, -0.0005500811, -0.049478285, -0.2583517134, 0.1320417672, 0.067235522, -0.2313183546, 0.3131327927, 0.3865984678, -0.1113004014, 0.2371285558, 0.4063924551, -0.200903669, -0.1178986654, 0.1609757394, -0.126258567, -0.2319331765, -0.2166246027, -0.0883549824, -0.2817944884, -0.2436753362, 0.0997203216, 0.1100004986, -0.1503902525, -0.1758229584, 0.2263850719, 0.2988096476, 0.1472545266, 0.0732382759, -0.3525341153, -0.2241643071, 0.2353286445, 0.0177503861, -0.1402797401, 0.0120052937, 0.3174556494, 0.0925336927, 0.3731620312, -0.3981430233, 0.0657028854, -0.3477118909, 0.1524636745, 0.0164831076, -0.3082903624, 0.3413857222, -0.0658026859, 0.067022033, 0.0657466426, -0.4848767221, -0.2254498005, -0.0560643822, 0.1289644688, -0.1247250885, 0.2390374541, 0.239948079, 0.1777083725, -0.1101102307, -0.1238412634, 0.105747588, 0.2011774182, 0.0197199341, 0.1939902008, -0.2998624444, 0.3818893135, 0.131531924, -0.3277378082, 0.2166210413, 0.0656024963, -0.1260644048, 0.0701943561, -0.1483679116, -0.0619577616, 0.1529890597, 0.2921735644, 0.1241735145, 0.1555730104, 0.1947730333, 0.0618587472, 0.0387166552, 0.0105805313, 0.1409812719, 0.1572415084, -0.2007600963, 0.1395862103, -0.2652697861, 0.205188483, -0.3029920459, -0.1528887749, 0.485052824, -0.0681187287, 0.2212643325, 0.198671326, 0.2453089803, 0.09940736, 0.2199913859, 0.1079205275, 0.5991258621, -0.061069075, 0.0599963777, -0.0868286714, 0.0118269315, 0.1556931883, 0.3291957974, 0.0128821703, 0.2464578003, 0.0147658596, -0.0369102731, 0.3591685593, -0.0478722826, 0.0404675491, 0.1642526835, 0.2609472275, -0.2687525749, 0.0692027658, 0.1256684661, 0.158308953, -0.0700463876, 0.7059478164, -0.263520658, -0.0498143546, -0.2375161201, -0.1269139796, -0.017710926, -0.0924669951, -0.1009917632, -0.2525002956, 0.0155232586, -0.257863313, 0.2252056152, -0.1401657909, 0.234828338, -0.281550914, 0.1279931068, 0.1161623895, 0.0049285195, 0.3126759231, 0.307682544, -0.0500047505, 0.0465310849, 0.1621742696, 0.3137165606, 0.2272780389, 0.4471284151, 0.3903554678, 0.0512048155, -0.0292131416, 0.0833073333, -0.0924873874, -0.069198288, 0.0647645742, 0.123227343, -0.0407953486, -0.5604943633, 0.3493506014, 0.1857196689, -0.2499479353, 0.083799161, -0.0217214059, 0.011481991, -0.0813001096, 0.1417378485, -0.250515908, -0.0043505719, -0.197937116, 0.073689647, -0.1613986492, 0.0595476255, -0.1602686644, 0.269682765, 0.1501701176, -0.2571896911, 0.1407111436, 0.0442429632, 0.1846886277, 0.2414645553, -0.0327478237, -0.0230109785, 0.0277724359, -0.7008521557, 0.2437221557, 0.2913863361, 0.1446159184, 0.064014405, 0.294991523, -0.1753891408, 0.250195533, 0.0487771332, -0.241287604, -0.0748223737, -0.1962625831, -0.4760008752, 0.0213080086, -0.2091044784, -0.0578981861, 0.1915593445, 0.0349218287, -0.0243192352, -0.2226162851, 0.0521263294, 0.0932008997, 0.0291391425, -0.0105783343, 0.0017511788, -0.1912244409, 0.1408904046, 0.411067158, 0.0085810376, 0.0723994598, 0.1618168354, -0.3288662434, -0.1204130203, 0.1013042256, -0.015251725, 0.2814259231, 0.0257541128, -0.4013804793, -0.0533987992, 0.4772092998, 0.233996436, -0.345246911, -0.4014284313, 0.0463568084, 0.023744585, 0.0774244741, -0.026225891, 0.4119680524, -0.0833833814, 0.2936120629, -0.1765292883, -0.4193324149, 0.7072587609, -0.3268918991, -0.3418450058, 0.0193427484, 0.397051245, 0.3459707797, -0.1593001038, -0.6697815657, -0.137917757, 0.2949357033, 0.0028167199, -0.1122924834, 0.1081513464, -0.4581030309, -0.0393700227, -0.0313257724, -0.2585921884, 0.1169317588, -0.1140031144, 0.1401875764, -0.2812473476 ]
https://github.com/huggingface/datasets/issues/657
Squad Metric Description & Feature Mismatch
But then providing the `answer_start` becomes mandatory since the format of the features is checked against the one provided in the squad [file](https://github.com/huggingface/datasets/pull/658/files).
The [description](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L39) doesn't mention `answer_start` in squad. However the `datasets.features` require [it](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L68). It's also not used in the evaluation.
23
Squad Metric Description & Feature Mismatch The [description](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L39) doesn't mention `answer_start` in squad. However the `datasets.features` require [it](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L68). It's also not used in the evaluation. But then providing the `answer_start` becomes mandatory since the format of the features is checked against the one provided in the squad [file](https://github.com/huggingface/datasets/pull/658/files).
[ 0.0714832917, -0.3686691523, -0.0856219605, -0.0963041261, 0.4095246196, -0.1043118462, 0.1253432482, 0.039565444, -0.2808917463, 0.0161716715, -0.0155541645, 0.3508736789, 0.2142228782, 0.0877159685, -0.1212029532, 0.1233919263, 0.0228275098, 0.114642702, -0.1461588293, -0.0721072927, -0.1057655215, 0.2958208323, -0.3101405501, 0.1393029094, -0.3326879144, 0.2032144964, -0.0322559141, 0.2053762525, -0.5319287181, -0.4879085422, 0.3031818569, 0.0732050538, -0.2346523404, 0.2549629509, -0.0001087786, -0.1570353955, 0.1928604096, -0.1502052099, -0.0956223235, -0.1865074486, 0.1002463847, -0.301348418, 0.2080406398, -0.2634672821, -0.1206466258, 0.126685515, -0.0258797016, 0.0158129074, 0.5856687427, 0.1773663014, 0.2096451372, 0.5279718041, 0.0051360782, -0.2664542496, -0.0079288892, 0.0832575262, -0.1241673604, 0.2411234677, 0.3226966858, -0.0091244122, -0.2592710853, 0.2154820114, 0.182272315, 0.0905653685, 0.4155048132, 0.0111929877, 0.1710324436, -0.1892597526, -0.1101631671, 0.0799339339, 0.2163021564, -0.1620045602, -0.2368019968, -0.1409005076, 0.053300295, -0.1408356726, 0.2025522888, 0.0599071905, -0.0294722579, 0.0576388277, -0.2525348365, 0.0616586842, -0.1925628781, -0.0569441691, -0.0384192951, 0.184589982, -0.2179055661, -0.0223871749, 0.0588666238, -0.0770309269, -0.3285883069, 0.027572833, -0.0039780797, 0.1555656791, -0.3463531733, -0.2450009733, 0.1401149929, -0.0120899677, 0.5897562504, 0.1307131201, 0.0278303307, -0.07555677, 0.1916166395, 0.0966404155, 0.0683345869, 0.3594315052, 0.5389778614, -0.260147661, -0.0470283367, 0.0979138315, -0.0602264032, 0.0362293757, 0.2225053608, -0.1853073537, 0.110271588, -0.0105526857, 0.1973389834, -0.1863770783, -0.3243860304, 0.2362407595, 0.033138901, -0.1849230528, 0.1610158682, 0.3308875561, 0.0394728333, -0.1160726696, -0.1364461333, 0.3753704429, -0.0615499206, 0.1788348705, -0.2362854183, 0.0175781846, -0.1785052419, 0.0176157467, 0.0770152882, -0.0945926085, 0.4684262574, 0.1037267372, 0.6205450296, -0.2139695138, 0.0900898948, 0.0907742009, -0.0086812694, -0.0588401966, -0.0381920226, 0.0323761851, 0.3155767918, -0.1487369835, -0.0383849815, -0.0121804085, -0.3050560355, -0.1685031056, 0.0228981562, 0.2471962571, -0.4179113805, 0.1742910892, 0.1866098791, 0.1592617184, -0.157810986, -0.0198884886, 0.0972553343, -0.007158333, -0.2175531983, -0.0871073902, 0.4565598965, 0.3123027384, -0.0138830254, -0.1896153688, 0.4936757386, -0.2422698587, -0.3501277864, 0.1747063547, -0.0872781798, -0.0625976995, -0.2254831791, 0.1653338373, 0.4319166243, -0.6663406491, -0.1211432591, 0.1177962869, -0.4087070823, -0.1348312795, -0.1633997858, -0.1139437631, 0.215761587, 0.0414272025, 0.0647868067, 0.1040396243, 0.0628901049, -0.0814870149, -0.3227226138, -0.0968138948, -0.1105401516, -0.0340453833, -0.2024563998, 0.0050684572, -0.0367083438, 0.2662733197, -0.0300773047, 0.1435510516, -0.2213811725, 0.0760086924, 0.2579775453, -0.286282897, 0.0779088661, -0.1838900149, -0.3849331141, 0.0795557201, -0.3601301312, 0.0163336005, 0.1635149717, -0.2715015709, -0.5420480371, 0.0469521508, -0.1306706965, -0.1301480085, 0.1964089721, -0.2922312915, 0.1908030659, -0.0649098679, -0.2068102807, 0.055555284, -0.5343649387, 0.2205051631, 0.0747222826, -0.0390693024, -0.2212112993, 0.1489000618, 0.1544103026, 0.1852427572, 0.1026899889, -0.0409525596, -0.1115171164, 0.5497419238, -0.0968206823, 0.1595625877, 0.2671709955, -0.0458368957, 0.0607397296, -0.1218107194, -0.1407346129, 0.0995273888, -0.0703592598, -0.1978718787, -0.3766764402, 0.4630093575, -0.1700359732, 0.1172299758, 0.1548950225, 0.079031229, 0.1918997616, -0.1135170683, -0.4225901663, -0.2107367367, 0.1589574516, 0.0613233335, 0.0597393997, 0.0673559979, -0.2234182805, -0.0676215887, 0.7663309574, -0.0128329163, 0.0169439688, 0.1607963592, 0.0620673448, -0.1778205633, -0.1424491853, -0.4926059842, 0.5218942165, 0.2119179219, 0.0149998292, 0.0737029463, -0.15310058, -0.1920885146, 0.091580689, 0.0498372167, -0.0947700813, 0.2592765987, 0.2015847117, -0.131431222, -0.0671302527, 0.0983821154, -0.1724920422, -0.1129591838, -0.2569568157, -0.1258194447, 0.1275726408, 0.0317182094, -0.166122064, -0.1506335139, -0.3098287582, -0.2745749354, 0.348770529, -0.0223367605, 0.2935879827, 0.3687448502, 0.1583544314, 0.3362481594, 0.0544576161, -0.1106504127, 0.1403375715, -0.2051765621, 0.1116328016, 0.0981989428, -0.1121824831, 0.089935042, 0.2285866439, -0.509159565, -0.0139456298, -0.0505291559, -0.4765907526, 0.2807791233, -0.0454611927, 0.3085440993, 0.0962103829, 0.0719202906, -0.3590720594, 0.0183289759, 0.3224571645, -0.3235702217, -0.3216751516, -0.18649818, -0.0132516092, -0.2689189315, -0.3647122979, -0.5461172462, 0.0952370241, -0.2989227176, 0.3766981065, 0.1400760859, -0.0273448955, 0.2844633758, -0.0148346033, 0.3455063701, -0.2718375027, 0.006416827, -0.3936616182, -0.4697284698, 0.2268736213, -0.1384316981, -0.4657115042, 0.0588323213, 0.0330039784, -0.0363267325, -0.2294950336, -0.0529052019, -1.0586349964, 0.0498611666, 0.1250766367, -0.2215353996, 0.1816777289, 0.3187160194, -0.564501822, -0.0541787557, -0.3160336316, -0.3421316743, 0.3988609016, 0.2140412182, 0.2097068578, -0.3139363229, 0.3115651011, 0.1362068355, 0.9513813853, 0.2537691593, 0.1607134193, -0.0673191473, -0.0600465052, 0.3613639176, -0.1113010943, -0.2788302302, 0.3016224802, 0.0773938, 0.1918254048, 0.3122570515, 0.1924503297, 0.2049938589, -0.0494211204, 0.3052556217, -0.1406048834, -0.2224220484, -0.2550002933, 0.2897505164, 0.0553184077, 0.1037335619, 0.1859115511, -0.2607046664, 0.0168893002, -0.029379271, 0.431830436, 0.2483833879, 0.101939328, -0.8079239726, -0.1121241823, -0.0766045302, 0.1463543326, 0.2055113316, 0.0852454677, -0.0143183991, -0.20518516, 0.0176270641, -0.0590093136, 0.5863505602, 0.3503597975, -0.1195379421, -0.0343177058, 0.2263385355, -0.5820798278, -0.1642437577, -0.1585284173, 0.4097059369, 0.5023412704, 0.547333777, -0.4737732112, -0.3406570852, 0.1070997715, -0.1551386714, -0.0475147627, -0.0328379832, -0.5244739056, -0.2369218171, -0.2704087198, 0.2653135657, 0.1774004698, -0.01574504, 0.2089426816, 0.0026242011, 0.3166659772, -0.0421448201, 0.1978399307, 0.414167285, 0.1020236686, 0.0150057068, -0.0443543494, 0.0389800183, -0.0707698837, -0.3313650787, 0.3410165608, -0.0112082073, -0.0931085125, 0.1719153076, -0.3292696774, 0.2612445652, 0.4037440121, -0.1517472863, 0.1503641605, -0.4624972045, 0.1431889087, -0.2112345397, 0.1175280586, 0.4971190989, 0.058616899, -0.0626977831, -0.0065459353, 0.2420920134, -0.217858389, -0.0609112568, -0.0005249711, 0.41247949, 0.1833918542, 0.0914430246, -0.0982120037, 0.9600062966, 0.1251902282, -0.0917279795, 0.242221579, 0.0418739878, 0.4939932227, -0.0268486142, 0.248256281, -0.2694193721, -0.2852008641, 0.1116494462, -0.2703735828, 0.0440563858, 0.0544330031, -0.2114076018, 0.1932344437, -0.0683503672, 0.5172489882, -0.0599552207, 0.3799264729, -0.1693508327, -0.0310524963, -0.3296199441, 0.2161274552, 0.0824193805, 0.0719726309, -0.0860539749, -0.0578271486, -0.1177077591, -0.3063987792, -0.0524225049, 0.0447314307, -0.0459589101, 0.0218896866, 0.4349377751, -0.2040506899, 0.1554916948, 0.3100823462, 0.3358574808, 0.0439824909, -0.0902957916, 0.1862782091, -0.1875782609, 0.0377071425, 0.0011449541, 0.2060985863, 0.1023437232, -0.2707347572, 0.0024802412, -0.0309494566, 0.0829145983, -0.1804997474, -0.2589583993, 0.0774731115, -0.0274889264, -0.3178336322, -0.3131408691, -0.0012585934, -0.1030948013, -0.1117482558, 0.1407167912, 0.0107707698, -0.1047644019, 0.2426192015, 0.3311519325, -0.1736882478, -0.0474304371, 0.2663511932, -0.3080544472, -0.0539533608, 0.1893164963, -0.1640933007, -0.0731062144, -0.2250329703, -0.0445178375, -0.20472987, -0.26116997, -0.0439944603, 0.2591428161, -0.1860082, -0.0765226781, 0.0950371623, 0.3709027469, 0.1623035371, 0.2081295699, -0.3234921098, -0.2744860649, 0.1854545772, -0.1068590283, -0.2031576335, 0.1021008044, 0.4163109064, 0.0986238569, 0.2295033038, -0.4194537997, 0.1195935309, -0.1490286291, 0.0883521587, 0.0453018919, -0.3655310869, 0.3733586371, -0.0366697609, 0.0840920955, 0.0656249672, -0.490303278, -0.2547088563, -0.0756020844, 0.1120663211, -0.0457426906, 0.0290304888, 0.0841081291, 0.0154870003, -0.1726399511, -0.081672132, 0.0525548384, 0.2083191425, 0.1003900915, 0.0571952015, -0.3976974189, 0.1715799421, 0.0665497258, -0.3400270343, 0.216144219, 0.0923185125, -0.0706029832, 0.0571209453, -0.303457737, -0.0367361344, -0.0810490176, 0.3800122738, 0.1568393111, 0.1931462586, -0.0197584741, 0.0780096501, 0.030158611, -0.0885216519, 0.1816164851, 0.1655514985, -0.2564047277, 0.1150652021, -0.215773344, 0.2028285861, -0.1534435302, -0.0049393331, 0.4422464073, -0.044384595, 0.2240916342, 0.3737486899, 0.2172664255, 0.1900693327, 0.3056745231, 0.275015384, 0.459174335, 0.0920074433, 0.0804984793, -0.0482114628, 0.076581955, 0.1516331285, 0.5011119843, -0.0244689453, 0.3242201209, -0.1924532503, -0.0954263732, 0.3372444808, -0.2135296464, 0.1509515792, 0.167029202, 0.1110202447, -0.2499295473, 0.1986941397, 0.1473441422, 0.188024193, -0.0462238267, 0.8048351407, -0.3650281131, -0.1945147663, -0.2721889019, -0.1492254883, -0.0865747854, -0.1328082234, -0.0712956041, -0.2399503738, -0.016819939, -0.152850911, 0.0741858184, -0.0917200744, 0.0913093984, -0.1889368147, -0.0162143707, 0.0621764958, 0.0030814477, 0.3148223758, 0.1481962204, -0.0151355704, 0.1107647866, 0.0245115496, 0.2311199605, 0.3774185777, 0.4738668501, 0.2855056822, 0.1190146357, 0.132476151, 0.0000618232, 0.0421585627, -0.1417862326, 0.0589396209, 0.0722181499, -0.0158620682, -0.4801880419, 0.2754590213, 0.2455085069, -0.2900888026, 0.1766068637, 0.0518722534, -0.0513363071, -0.2626930177, 0.0709405765, -0.1839473248, 0.1674201339, -0.2281308174, 0.0863310993, -0.3151621819, 0.0125390543, -0.1503467858, 0.2780929804, 0.1792277098, -0.2272625566, 0.1218721643, 0.0491320603, 0.0213145539, 0.2931469679, -0.0375425331, 0.0089201611, 0.0167213026, -0.7170855403, 0.1781848967, 0.340487808, 0.3211581409, 0.1111538783, 0.3643411994, -0.1321586668, 0.3216062486, 0.1501120776, -0.226116538, -0.0753632933, -0.2230734378, -0.3450178206, 0.088958025, -0.0635397211, 0.0358619727, 0.1450351626, 0.0524475053, 0.0716816559, -0.1267293096, 0.041465994, 0.0683658645, 0.1159663424, -0.0059021153, -0.1477763206, -0.0798498765, 0.1761416048, 0.3649194241, -0.0657628849, -0.013251246, 0.2049592286, -0.1980928034, -0.1940237135, -0.0136133078, -0.0612452701, 0.3370965421, -0.051594656, -0.4326334894, -0.0818320289, 0.4637615383, 0.1893282682, -0.4613311589, -0.3907952011, 0.2044503838, -0.0979916528, 0.041124884, -0.1005762219, 0.5699031353, -0.0965010077, 0.3637690842, -0.2342427522, -0.3605830073, 0.560297668, -0.259842664, -0.1011113971, -0.0214642826, 0.4138110578, 0.3865251541, -0.245656997, -0.6112873554, -0.1607126594, 0.1788604558, -0.0031614823, -0.2295851111, 0.1471382231, -0.3713878393, -0.0177421197, -0.0656006336, -0.0327634476, 0.2191711217, -0.2374017388, 0.1443993151, -0.1633359343 ]
https://github.com/huggingface/datasets/issues/651
Problem with JSON dataset format
Currently the `json` dataset doesn't support this format unfortunately. However you could load it with ```python from datasets import Dataset import pandas as pd df = pd.read_json("path_to_local.json", orient="index") dataset = Dataset.from_pandas(df) ```
I have a local json dataset with the following form. { 'id01234': {'key1': value1, 'key2': value2, 'key3': value3}, 'id01235': {'key1': value1, 'key2': value2, 'key3': value3}, . . . 'id09999': {'key1': value1, 'key2': value2, 'key3': value3} } Note that instead of a list of records it's basically a dictionary of key value pairs with the keys being the record_ids and the values being the corresponding record. Reading this with json: ``` data = datasets.load('json', data_files='path_to_local.json') ``` Throws an error and asks me to chose a field. What's the right way to handle this?
32
Problem with JSON dataset format I have a local json dataset with the following form. { 'id01234': {'key1': value1, 'key2': value2, 'key3': value3}, 'id01235': {'key1': value1, 'key2': value2, 'key3': value3}, . . . 'id09999': {'key1': value1, 'key2': value2, 'key3': value3} } Note that instead of a list of records it's basically a dictionary of key value pairs with the keys being the record_ids and the values being the corresponding record. Reading this with json: ``` data = datasets.load('json', data_files='path_to_local.json') ``` Throws an error and asks me to chose a field. What's the right way to handle this? Currently the `json` dataset doesn't support this format unfortunately. However you could load it with ```python from datasets import Dataset import pandas as pd df = pd.read_json("path_to_local.json", orient="index") dataset = Dataset.from_pandas(df) ```
[ 0.1458692104, 0.1199861914, -0.0658117086, 0.3802386522, -0.0994930342, 0.2573180497, 0.237864539, 0.4517602324, 0.4588267803, -0.0621232614, 0.1368803829, 0.485652566, -0.145507887, 0.2548016012, -0.3202169836, -0.1480668932, 0.0985159874, 0.2186022699, 0.2703850865, -0.0470252782, -0.4397019744, -0.1153431162, 0.048959367, 0.0190585461, 0.0482812114, -0.2671153247, -0.0260773674, 0.07178469, -0.162074253, -0.4581753016, 0.1564127952, 0.1291371733, 0.0828993469, 0.1049763039, -0.0001129885, 0.0956466347, 0.1844623834, -0.0450864993, -0.1903441846, -0.299005419, -0.7772286534, -0.1859283149, 0.3369081914, -0.2603326142, -0.2133953124, -0.8189457059, -0.1771576554, -0.5484949946, 0.3485091031, 0.053874746, 0.1756142676, -0.0457042754, -0.117270194, 0.2295886129, -0.1242404655, 0.4465411603, 0.0052379947, 0.2138410807, 0.1540415585, 0.2234111875, 0.1710987985, -0.1115012169, -0.2714057267, -0.1085490212, 0.3714461029, -0.0568572581, -0.0460284203, 0.0683588833, 0.0254376996, 0.2053814381, 0.7304254174, -0.0766047537, -0.4558513761, -0.2077882886, -0.0709648281, -0.0512551442, 0.0490766987, 0.140066117, -0.0317336172, 0.4423694909, -0.1603933871, -0.1668307632, -0.0914007202, 0.4621088505, -0.1848820299, -0.0156270005, -0.0242640078, 0.1310402453, -0.048818443, -0.3260755837, 0.0286139641, -0.4399697483, 0.128877148, 0.0635579079, -0.0337629654, -0.2168125808, -0.0416975096, -0.3340822756, 0.2119554579, -0.0481729507, -0.0074765994, 0.1113776341, -0.2421927452, 0.3040261567, 0.6694853306, -0.2420200855, 0.4449412823, 0.0218048804, 0.0466979854, -0.1306555867, 0.2354112566, -0.062948443, -0.1822789609, 0.0292546432, -0.2261858732, -0.2180081457, 0.0942564681, -0.1267885566, -0.1877720654, 0.463996768, -0.498690635, 0.0386365764, 0.0729416013, 0.1641998589, -0.0591547117, 0.4581668973, 0.0739174858, 0.3095893264, 0.291824311, 0.2605211437, -0.0923482776, 0.0517236032, 0.2988284528, -0.2001814246, 0.0685546994, -0.0650405958, 0.2729400992, 0.1133927628, -0.0976343974, -0.1352138966, 0.0604376644, 0.0339624174, 0.0336547345, 0.343840301, 0.1155547276, 0.2728942633, 0.0587199368, -0.7610888481, -0.2815734148, 0.3070135415, -0.1231466979, -0.1196511015, -0.2131771892, 0.1140164882, -0.2145392895, -0.1683910042, -0.5135981441, 0.1099391729, -0.0350387879, 0.0967565775, -0.1146053672, 0.0682747662, -0.0962641537, -0.3119339347, -0.0715676099, 0.2158742696, -0.7670142055, 0.0624734983, 0.2604253888, 0.1439978182, -0.0009401538, 0.3863135576, -0.3122445643, 0.1130621284, 0.0466577522, 0.2099812925, 0.3463833928, -0.4240631759, -0.1853325069, 0.6589511037, 0.1311641335, 0.0572888441, 0.1835733205, 0.0641262978, 0.0861071795, -0.1249699071, 0.4913158417, 0.2782321572, -0.1301453561, 0.1315333247, -0.0413273051, -0.2937498987, 0.3844844401, 0.1433076113, -0.2987166941, 0.0400856137, -0.0638530627, 0.1849565208, 0.1030339077, -0.1027431935, -0.0346189961, 0.2544199824, 0.1330921352, -0.229143396, -0.0917218551, 0.1678027213, -0.4931346774, 0.0583167039, 0.0407989621, -0.2706648111, -0.1732381284, -0.2292880118, -0.2658455372, -0.0448416248, -0.3415182233, 0.3753654063, 0.102970019, -0.1386786848, -0.0613621734, 0.0832327232, -0.189054966, -0.1287671775, 0.1051744893, 0.0485647731, -0.356081605, 0.234025538, 0.0891057327, 0.1402282566, 0.1026290059, 0.0952601209, 0.1381036788, -0.0816347525, 0.0490513816, 0.2223202586, 0.2931486368, -0.0688417181, 0.0757606253, 0.1965521276, 0.269646287, 0.2145307213, -0.0805482194, 0.0517450348, 0.2669300437, -0.120843485, -0.4998886585, 0.5624607205, -0.0740084797, 0.275415808, -0.2417862117, 0.1344882548, 0.507040441, 0.1711892784, -0.2448193282, -0.26526618, -0.1872990131, 0.2555712163, 0.0549999215, 0.1753741652, -0.5730939507, 0.0807780623, 0.3986862898, -0.1162140518, 0.1785607934, 0.0774061084, 0.0183163993, 0.1102361083, 0.0166592598, 0.3469283879, 0.1840493232, 0.1019804925, -0.1722500175, -0.1593766958, 0.1704729199, -0.126226753, -0.030276617, 0.062900655, 0.1021464318, 0.1732895523, 0.1294022352, -0.2646362185, 0.0097441748, 0.108299695, 0.1709942967, 0.3211760521, -0.1843875945, 0.2181838751, -0.5527151823, -0.1690995544, -0.191568166, -0.3349090219, 0.0057536745, -0.2660441101, 0.014342173, 0.0908644199, -0.1945690066, 0.0133134099, 0.0123494528, 0.077350013, -0.0093090311, -0.4200897217, -0.0577932373, -0.1707867831, -0.1814785451, 0.0558719262, 0.4747770131, 0.0712881908, 0.1124230623, -0.1644035131, -0.1423164606, -0.0538366698, 0.1102760509, 0.1040440276, -0.0833399296, 0.1146068498, 0.1896597594, 0.5317565799, -0.3402477205, -0.1636220366, 0.2713464499, 0.3887447119, -0.1310294569, 0.0392327867, 0.13945584, 0.0595931821, 0.0794298649, -0.3075088561, -0.1711044759, -0.2167972475, 0.4356907308, 0.1593659818, 0.1710599661, -0.0084813675, 0.112897709, -0.0164319649, 0.144768402, -0.1445474029, -0.0614728592, -0.3365550637, 0.374482125, -0.1530004889, -0.379776448, 0.0752773136, -0.0251516681, -0.0309549924, -0.2401714921, -0.0991344228, -0.0014947694, 0.0422445647, 0.0657007843, 0.0162206683, -0.1312143952, 0.1923988163, 0.1064990312, 0.0139338672, -0.0919714421, -0.1125548556, 0.2691609263, 0.2732815742, 0.1071157008, 0.3044456244, 0.5737470984, 0.0091620684, 0.1929805726, 0.2185967416, -0.0632899031, 0.0823071301, -0.0631023571, -0.0089375312, -0.0812864006, 0.0083392393, -0.2582142949, 0.0239420887, -0.128375724, 0.0636105314, 0.0780437514, -0.112245895, -0.2132259905, 0.1502922922, -0.4659945369, -0.1925675422, 0.1423622519, -0.2337082177, -0.0703254491, -0.2169298828, -0.000983014, 0.1018206328, 0.0360617749, -0.1283742785, 0.2931227088, 0.1016211957, 0.0939057469, -0.4172827601, -0.3083843291, -0.4276410639, 0.1367156655, 0.1104793251, 0.7288773656, -0.0195551161, 0.1968235373, 0.0636688098, -0.0242179632, 0.5950885415, -0.1059878096, 0.0960165709, 0.1525065601, 0.1006459743, -0.4992516041, 0.2310390472, -0.0852853507, 0.3208944201, -0.2690151632, 0.4516743422, -0.4052475095, -0.3435760736, -0.1920021027, 0.2402454615, -0.2700728476, -0.2101641297, -0.192162469, -0.2964921296, -0.2380505353, -0.258957535, 0.2959804833, 0.1589807719, 0.3359678984, -0.069105193, -0.1125484407, -0.0040721395, 0.1293797791, 0.0557941981, 0.1993988454, 0.2729334831, 0.1131542996, 0.1793413311, 0.1726691276, 0.4247415662, 0.5462688804, 0.3334123492, -0.145520702, -0.0143333012, -0.2502031624, 0.2467491478, -0.0559656546, -0.0126834987, -0.0202426612, 0.1780310571, -0.273562938, -0.1463043988, -0.1517331153, 0.3680627644, -0.311407268, -0.3521306813, -0.5186553001, 0.6033035517, 0.0841255635, -0.0123818843, 0.025399657, 0.2774886489, -0.1227985248, 0.4810543358, 0.2179086953, 0.5684338212, -0.3487235308, 0.0267519485, 0.1977462769, -0.5146610141, 0.4830616415, -0.2183381617, -0.0967939198, -0.3696782291, 0.393425405, -0.1548228711, -0.0373506732, 0.3727441728, 0.4814718068, -0.0547150671, 0.1361580044, -0.3032667041, -0.0946576968, -0.1093671694, 0.2447791845, 0.1032146737, -0.1591504663, -0.4589943588, 0.081694521, -0.2037876099, -0.2845904529, 0.0229374263, -0.1684265137, -0.3422835469, -0.1301285475, -0.1290250421, -0.2174227536, 0.3331003189, 0.0794570595, 0.2641437054, -0.2753998041, 0.1338728517, 0.254865557, 0.0644340366, 0.1171612144, -0.1934218556, -0.2033859789, -0.3793013692, 0.0770607963, -0.0499612354, 0.0118618896, 0.1184826195, 0.0981206894, -0.0415071994, -0.1009147018, -0.1732546538, -0.1489337236, -0.1010819003, 0.2071550936, -0.1293742508, -0.3121790886, -0.5626692176, -0.0551259331, 0.0729705095, 0.0901851729, 0.1077717319, 0.0797571987, 0.0778418034, 0.064630717, -0.0084436722, 0.001606107, 0.1139384583, 0.3233718276, 0.0668379813, -0.0398826301, 0.3139286637, 0.1302961409, -0.1649360806, -0.1316999644, 0.5236608386, 0.3322331011, 0.25764817, -0.0298177153, -0.1930638701, -0.010491766, -0.2179306597, 0.3178393543, -0.0223676711, -0.1482018679, 0.2405257821, -0.4940350652, -0.218016997, 0.294675827, 0.2369864285, 0.0139886988, 0.1584947258, 0.0604556799, -0.253000468, -0.2274927199, -0.2128078938, -0.0762624517, -0.3122346401, 0.2695814371, -0.1362296343, 0.2458582222, 0.0352967754, -0.2442629039, 0.1339186281, -0.17402713, 0.0646463484, -0.2034872025, -0.0977170393, 0.1148318574, 0.3019971251, -0.142211318, -0.0085984142, -0.2923327088, -0.2843975127, 0.0394897051, -0.1387789845, 0.2076570392, -0.0695350394, 0.4448584318, 0.0516577289, 0.0198934507, 0.0777344257, -0.0676855966, 0.0560831688, 0.2144365758, -0.0532596372, 0.0691272467, 0.1086292043, -0.0738354847, -0.2708694339, 0.1666850597, -0.1808829457, 0.137446478, 0.2203942835, -0.4979726374, 0.4107674956, 0.475704968, 0.395671159, 0.4644885659, -0.2230913639, 0.246288836, 0.2214044034, 0.1531098783, -0.020488942, -0.5072892904, 0.3848719299, 0.1289763004, -0.078207396, 0.2625133097, 0.0682194233, -0.041361589, -0.3533287048, -0.2404541969, 0.2358685881, -0.0373978354, -0.114133954, 0.5161634088, -0.0539600812, -0.2124408036, -0.0689394921, 0.5151493549, 0.243520081, 0.2089927197, 0.2078996152, -0.060160853, 0.4138969183, 0.0516656525, -0.0301794093, -0.4153175354, 0.4144588411, -0.0049186, 0.0307823475, -0.0177140199, 0.4281782508, 0.1536103785, 0.0701016709, -0.0016900992, 0.2020603716, -0.0245913565, -0.0508457497, -0.2886846066, -0.3768411577, -0.1583998948, -0.0580373146, -0.1849884838, -0.2045612335, -0.312361449, -0.1415840387, 0.0404949374, 0.2243338078, -0.3365141153, 0.4711940885, -0.0136739332, 0.133226797, -0.2788592875, 0.0597940423, 0.1122532934, -0.1988797188, 0.2645430565, -0.053511776, -0.0188859291, 0.158921361, -0.1320623159, 0.0369449146, -0.5998961329, -0.1819779724, -0.0855081156, 0.0556057207, -0.0905482024, -0.1600079238, 0.296666652, 0.1264392138, 0.0164628662, 0.3209453523, 0.1543253064, 0.0716398284, -0.0946692973, -0.0717240199, -0.1753924787, -0.1442166269, 0.2563312948, -0.160259828, -0.1590491831, -0.4251283109, 0.1613832861, 0.3798043132, 0.3913545609, 0.120635137, 0.0776893198, -0.1784186512, 0.3760290146, 0.0717430413, 0.0428183079, 0.0304697659, 0.1283908337, -0.2076286227, -0.1148083284, -0.0716460198, -0.2363215089, 0.420445919, 0.1062996686, 0.288969934, 0.3643232584, -0.2331483364, 0.4509800971, -0.3636855483, 0.1910834461, 0.0698703751, -0.4637277722, 0.111158751, 0.1946078837, -0.0551872402, -0.0834940895, 0.2223049849, 0.1503239721, 0.0707844719, -0.3576924205, -0.0745875686, -0.2778409719, -0.1664797664, -0.1417881548, 0.2965260744, 0.0731143057, 0.1139511466, 0.0423506722, 0.1826491654, -0.0085290801, -0.1535205096, 0.4577557147, -0.232989952, 0.4298785627, -0.2028202116, 0.1843890846, -0.141055271, -0.2135639489, -0.3715866208, -0.1534893662, -0.3980413079, 0.2372506261, -0.1922962964, 0.0056451643, -0.1154153198, 0.294038713, -0.111401245, 0.3417703211, -0.0218547732, -0.0153429601, 0.2648356259, -0.3608398736, -0.1684056222, 0.4840176105, -0.1143329665, 0.0133907348, -0.1234350652, -0.0647940487, -0.0121955974, 0.3006780446, -0.1669052392, -0.1197579205, -0.2389785349, -0.0009339312, -0.1093447655, -0.0956911445, 0.082940951, -0.077634789, 0.0185354128, -0.1587723941, -0.2314797044 ]
https://github.com/huggingface/datasets/issues/650
dummy data testing can't test datasets using `dl_manager.extract` in `_split_generators`
Hi :) In your dummy data zip file you can just have `subset000.xz` as directories instead of compressed files. Let me know if it helps
Hi, I recently want to add a dataset whose source data is like this ``` openwebtext.tar.xz |__ openwebtext |__subset000.xz | |__ ....txt | |__ ....txt | ... |__ subset001.xz | .... ``` So I wrote `openwebtext.py` like this ``` def _split_generators(self, dl_manager): dl_dir = dl_manager.download_and_extract(_URL) owt_dir = os.path.join(dl_dir, 'openwebtext') subset_xzs = [ os.path.join(owt_dir, file_name) for file_name in os.listdir(owt_dir) if file_name.endswith('xz') # filter out ...xz.lock ] ex_dirs = dl_manager.extract(subset_xzs, num_proc=round(os.cpu_count()*0.75)) nested_txt_files = [ [ os.path.join(ex_dir,txt_file_name) for txt_file_name in os.listdir(ex_dir) if txt_file_name.endswith('txt') ] for ex_dir in ex_dirs ] txt_files = chain(*nested_txt_files) return [ datasets.SplitGenerator( name=datasets.Split.TRAIN, gen_kwargs={"txt_files": txt_files} ), ] ``` All went good, I can load and use real openwebtext, except when I try to test with dummy data. The problem is `MockDownloadManager.extract` do nothing, so `ex_dirs = dl_manager.extract(subset_xzs)` won't decompress `subset_xxx.xz`s for me. How should I do ? Or you can modify `MockDownloadManager` to make it like a real `DownloadManager` ?
25
dummy data testing can't test datasets using `dl_manager.extract` in `_split_generators` Hi, I recently want to add a dataset whose source data is like this ``` openwebtext.tar.xz |__ openwebtext |__subset000.xz | |__ ....txt | |__ ....txt | ... |__ subset001.xz | .... ``` So I wrote `openwebtext.py` like this ``` def _split_generators(self, dl_manager): dl_dir = dl_manager.download_and_extract(_URL) owt_dir = os.path.join(dl_dir, 'openwebtext') subset_xzs = [ os.path.join(owt_dir, file_name) for file_name in os.listdir(owt_dir) if file_name.endswith('xz') # filter out ...xz.lock ] ex_dirs = dl_manager.extract(subset_xzs, num_proc=round(os.cpu_count()*0.75)) nested_txt_files = [ [ os.path.join(ex_dir,txt_file_name) for txt_file_name in os.listdir(ex_dir) if txt_file_name.endswith('txt') ] for ex_dir in ex_dirs ] txt_files = chain(*nested_txt_files) return [ datasets.SplitGenerator( name=datasets.Split.TRAIN, gen_kwargs={"txt_files": txt_files} ), ] ``` All went good, I can load and use real openwebtext, except when I try to test with dummy data. The problem is `MockDownloadManager.extract` do nothing, so `ex_dirs = dl_manager.extract(subset_xzs)` won't decompress `subset_xxx.xz`s for me. How should I do ? Or you can modify `MockDownloadManager` to make it like a real `DownloadManager` ? Hi :) In your dummy data zip file you can just have `subset000.xz` as directories instead of compressed files. Let me know if it helps
[ -0.2775551975, 0.0534974821, 0.0134970266, 0.3913993239, -0.0723610148, 0.1356920153, 0.452233851, 0.3349657655, -0.0165994558, 0.0843320787, -0.0575095415, 0.2236391157, -0.1632839739, -0.0482926145, 0.0641592816, -0.1906500459, -0.1669516265, 0.2437196523, 0.0134652406, 0.031177314, -0.2944734693, 0.081539385, -0.2834988832, -0.0913857743, -0.137154296, 0.0181266908, -0.209564209, 0.3072613478, -0.2457744479, -0.2825934887, 0.0010185599, 0.0183558892, 0.0423618704, 0.5455896854, -0.0001227711, 0.1388189793, 0.3071192503, -0.2575384676, -0.333334595, -0.0337700471, -0.2507254183, -0.2779996991, -0.1756441742, 0.0213026591, -0.0840832219, -0.2268640846, -0.1854513139, -0.2622464001, 0.3548206389, 0.2717152238, 0.092332229, 0.613117516, -0.0415802114, -0.1280227453, 0.2287501246, -0.0264095776, -0.1879368871, 0.2233157754, -0.0529861972, -0.0236794166, 0.087337032, -0.101954706, -0.001184465, 0.4950456619, -0.3201800585, 0.119338721, 0.1507469118, -0.3189714253, -0.0463723429, 0.550545156, 0.4802379012, -0.1391591579, -0.3204443455, -0.2336203307, -0.2743136585, -0.1307142526, 0.074765034, 0.218037948, -0.2292435765, 0.3225834966, -0.029313501, -0.0288202707, 0.1385272145, 0.2705382705, -0.2816977799, 0.3059702516, -0.1236130521, 0.0502374731, 0.4046252668, 0.3228847086, 0.2671746016, -0.2975229025, -0.3519620299, -0.0660927445, -0.1584337503, -0.2081914246, -0.3658330142, -0.4488223791, 0.1594889015, 0.353017807, -0.0114579098, 0.1824111044, 0.0564970151, 0.1532960236, 0.0790389776, 0.4907520711, 0.2176590711, 0.2714264989, 0.0527711548, 0.1392947137, 0.0016768641, 0.0483288243, 0.0824972317, -0.3559398651, -0.2401303351, 0.1764754057, 0.3213751018, -0.1328307688, -0.3999721408, -0.1878485978, -0.2729803026, -0.2551985681, -0.0030331698, 0.3480630815, -0.055273883, 0.1527872086, 0.1276449859, 0.472751528, -0.0498081893, -0.5964108109, -0.1689494252, 0.0743231252, -0.2225881219, 0.1139060035, 0.1182285324, 0.0219425485, 0.4373013079, 0.1158564985, -0.1179257557, -0.0122446604, 0.6474177241, -0.0120399324, 0.4655233324, 0.1485738009, 0.1298145801, -0.068881847, 0.1100027785, -0.1474854946, -0.0640195012, 0.0963677242, 0.0561536886, -0.1661679745, 0.0018028906, 0.0488937534, -0.4305838048, 0.2151849419, -0.0022326426, 0.107809782, -0.0936748683, -0.0127068851, -0.0310164914, -0.0464014374, -0.0932801366, 0.1658294648, 0.3068813682, 0.4303736687, -0.2990069389, 0.1886533946, -0.4357547164, 0.1057800129, 0.5174134374, -0.0811933503, -0.0792281926, 0.3894139528, -0.2814278603, 0.1036905348, 0.4281540811, -0.1070777103, -0.1339181811, 0.3495474756, -0.0856408104, 0.2467709333, 0.303525269, -0.3556996584, -0.1740886569, -0.0409201421, -0.4010947049, 0.1216157824, -0.0223302152, -0.0752302632, -0.3159448206, -0.1216393486, 0.3932136297, 0.0853224024, 0.0043441295, 0.1314849406, -0.0922580957, 0.1189818531, 0.2170329541, -0.0133682992, 0.0638615638, -0.0933699831, -0.3415873051, -0.3053727746, -0.061341688, 0.1441963464, -0.2157243937, 0.3868089318, -0.3383386433, 0.3813674748, 0.3305302858, -0.0956294462, -0.5658615828, -0.0990947783, -0.2402648479, -0.3324829638, 0.0340707675, 0.3017255664, 0.1029656008, 0.0747679546, -0.0000564379, -0.272488296, 0.343028754, 0.1322464496, -0.3578071296, 0.1702772081, 0.0935112834, -0.1067068502, -0.0051660817, 0.043854896, -0.1398248374, -0.4835775197, -0.1919868141, 0.2014568448, 0.2268776596, -0.1514832973, -0.1123246849, -0.2281042337, 0.0167493578, -0.1487819701, 0.0856784061, 0.408757329, 0.0543925464, -0.1391614079, 0.1577094346, 0.1511577964, 0.3081715405, -0.0488708541, -0.2156967223, 0.0614775941, 0.1661099195, -0.3463018835, 0.2142065316, -0.2726495862, 0.0913261548, 0.2350989282, 0.3804802895, -0.0418400317, 0.2846015692, 0.0348782279, 0.2850271761, -0.0671252459, 0.143988505, -0.0548983216, -0.3179723918, -0.1246316209, 0.2577800453, 0.2502179444, 0.5530326366, -0.0051693162, 0.390224725, 0.106765084, 0.1798736155, -0.1399503052, 0.3181183636, 0.0894172862, -0.1737316102, 0.2202001214, -0.2962658107, -0.3673281074, -0.183587417, 0.2700137496, 0.3687213063, 0.3929933608, -0.3055078983, -0.1090082154, -0.4188290536, 0.1396481693, 0.0166624226, -0.2076061666, -0.0101962695, -0.1257268041, -0.0310542826, 0.0821424574, -0.2311614156, 0.0737057328, 0.1541528851, 0.1014866382, -0.0827401057, -0.0176658034, -0.2265049517, -0.0992560908, -0.3669633567, 0.0497563407, 0.3964760005, 0.0628840327, 0.170743376, -0.256339252, -0.3311188519, -0.044409357, -0.0038233453, 0.2833930552, 0.0153304357, 0.3275275528, 0.269520402, 0.0554337241, 0.3602996767, -0.1851064712, -0.0745980665, -0.1926947385, -0.1971706897, 0.1344672889, 0.1516902745, 0.1327987313, -0.2324695289, -0.5946477652, -0.1509213448, -0.2586506903, 0.0104378927, 0.0821236223, -0.0298238397, 0.2840039134, 0.0449706838, 0.0342340507, 0.2216670364, -0.2649143636, -0.2609223425, -0.3637113273, 0.2890399694, -0.2334612757, -0.266803354, 0.0168264024, -0.5399338007, 0.1551875323, -0.2124398202, -0.0537145101, -0.024519207, 0.1239688396, -0.1419388205, 0.1030270457, 0.2029163241, 0.187889725, -0.0453678146, 0.0392214656, -0.1372801363, 0.1033983603, 0.2979872525, 0.0868109986, 0.5367180705, -0.1488343626, 0.173851341, 0.0305472035, 0.2985988855, 0.0357532576, 0.0153355692, 0.2445666641, -0.1797608733, 0.2922434807, -0.1095675007, -0.2095204443, -0.304235965, 0.0125175528, 0.0374831818, 0.2866486013, -0.1137528494, -0.0525305495, -0.060764242, 0.1878272295, 0.0676005557, -0.2674082816, 0.0879298374, -0.2774009705, -0.1997951865, 0.0362316407, 0.2855169773, -0.0677636191, -0.2022216916, 0.0911603346, -0.1012436524, 0.1115729511, -0.2520763278, -0.1802863628, 0.3822591603, -0.5033351183, 0.4058063328, 0.0177056715, 0.2860860825, 0.3129204214, -0.2308181673, 0.0782693252, 0.0477269255, 0.4159892797, -0.3579122424, 0.1582534313, 0.4472881258, -0.2505179644, -0.0422280431, -0.1235633492, -0.2599177063, -0.1890914589, 0.0263636112, -0.3584084213, -0.3673053086, -0.2347056717, 0.1790148169, 0.1722270101, -0.1315885782, -0.0946045369, -0.195420146, -0.1408472359, -0.1739497632, -0.2578311265, -0.0831954107, 0.0511243232, -0.2538347542, -0.1126226559, -0.0213238932, -0.2422348261, 0.3344986141, 0.3226644695, 0.1653524488, -0.0121187745, 0.0048923697, 0.2595239282, 0.0321120322, -0.000283852, 0.5156347156, -0.1827041507, -0.2526944876, 0.1532876194, -0.1646176875, 0.3801350296, 0.1221782044, -0.0386988558, 0.0844476968, -0.4061063826, 0.0917845517, -0.3141174912, 0.5976006985, 0.3187380731, -0.1618885994, 0.1839360595, -0.2865276635, 0.4400343001, -0.119855538, -0.0586535968, 0.5181101561, -0.4390117526, -0.2725731134, 0.2292658538, -0.1000220627, 0.6527174115, 0.1551796198, -0.0103555657, 0.2116363347, 0.2181541771, 0.189475894, -0.2540006042, 0.0620614961, -0.2933144271, -0.2902563512, 0.1150470898, -0.1187710688, 0.2748993337, 0.3439328074, -0.371096909, 0.2314968705, -0.166252166, 0.1161673814, 0.2451561689, 0.467181623, -0.2161771506, 0.0160148181, -0.0778772533, 0.052051764, 0.3815428317, 0.2001960874, -0.0275134891, -0.1653924286, -0.2098923326, -0.1588152647, 0.0254393797, 0.2343831956, -0.4178392291, -0.0726502165, -0.0403766558, -0.2204381078, 0.1376759261, 0.1729966402, 0.2418774664, 0.0537329577, -0.1271223724, -0.1456126571, -0.2578456104, -0.0458923206, 0.1940440685, 0.0672239959, 0.1478219628, 0.0373471156, -0.3742961884, 0.2848320901, -0.1732951403, -0.2097567916, 0.3150956929, -0.1556826681, 0.1648637503, -0.3636010587, 0.017421741, -0.0640937686, -0.1363242418, -0.0785264969, 0.0533222668, 0.0521458164, -0.7080106735, 0.1413471699, -0.2713919282, -0.3244530857, -0.0393843874, 0.1066874266, -0.2228571326, 0.4759735763, 0.4173583686, -0.1163218468, 0.3777333796, -0.2346685827, 0.3289361894, 0.3370269835, -0.1697395593, 0.6116290092, -0.0555218048, -0.3803267777, 0.1090202332, 0.3577328622, 0.2878514826, -0.0637153387, -0.2488833964, -0.1406082511, -0.1500299573, -0.1582458913, 0.1125161573, 0.3955528736, -0.1776656061, 0.2958665192, -0.1747027487, 0.3727816939, -0.1949800998, -0.0024366076, -0.1881540865, 0.1233800203, -0.0857633054, -0.1829469502, 0.2429676652, -0.0049516261, 0.0499992594, -0.0530923307, -0.2602924407, -0.1787487566, -0.294421941, 0.1744042337, 0.0657969266, -0.238659367, 0.1459910423, 0.0540410988, -0.0258018952, -0.120797731, 0.1762764305, -0.3385203481, -0.0109814648, 0.252572298, 0.3427564204, -0.0067284727, -0.6286966205, 0.0099322749, -0.2735544145, 0.2913062274, -0.2193518728, 0.0491061397, 0.1606856436, 0.0328970514, 0.1278441548, -0.2077874243, 0.1320328265, -0.1334704161, 0.5864813328, 0.1192624196, 0.0063476725, -0.0403591841, 0.2203478962, 0.3805126846, 0.09980423, 0.0783211738, 0.134965241, 0.0863007084, -0.3046167493, 0.0316625461, 0.2106907517, 0.0489399433, 0.3257641792, 0.27453053, 0.2787435949, 0.0171891116, -0.0304753985, -0.1940560192, 0.2114886791, 0.2699232996, 0.191338852, 0.7015007734, -0.493688643, 0.333783865, 0.1052522659, -0.2653428316, 0.2542864978, -0.4790070057, 0.1929243952, 0.6058323979, -0.3864372075, 0.0741804838, -0.0801454857, -0.2112537771, 0.2038946003, 0.1999296695, 0.2975565791, 0.2877903283, 0.0260335617, 0.361949414, -0.550458014, -0.0771564171, -0.1918419898, 0.2061726451, 0.2919976115, 0.0384994969, -0.0975592211, 0.0093712853, -0.4708305895, -0.2300651073, 0.2454042882, -0.2955703437, -0.2263981402, -0.0519427247, -0.0112386923, 0.3497266769, -0.2697202861, 0.0553601235, -0.0817314833, -0.3166094422, 0.209785521, 0.1095301136, -0.0809018537, 0.1963224262, 0.4950663149, 0.2401908636, 0.022662865, -0.4391453564, -0.366115123, 0.1244544014, 0.0449608862, -0.1386365592, 0.3397325873, -0.319817394, -0.2074071914, 0.2640449703, 0.0414102003, -0.080663681, -0.4398866594, 0.2591482103, -0.4032659233, -0.1769729108, 0.6636249423, 0.1579112709, 0.0095403874, 0.0294658244, -0.240048781, -0.0903020501, 0.0417931378, 0.1923094392, -0.4423006773, 0.1097014025, 0.0098784622, 0.0258051045, -0.2754498422, 0.4726876915, -0.0548032857, -0.0301341731, -0.2771564424, -0.1637394577, -0.5738851428, 0.2634523213, -0.0527887754, -0.4865394533, 0.0810312107, -0.1199835613, 0.3776105642, 0.1762557328, -0.1693375111, 0.3486985564, 0.2776538432, 0.2912563086, -0.3625786006, -0.243878901, -0.2989763618, 0.030773595, -0.0500391722, -0.4768274426, 0.0896088928, -0.000499182, -0.1357266158, 0.1987258792, 0.0193389896, 0.3844161034, 0.000375827, 0.271522373, 0.0879436135, 0.4524201155, -0.100581117, 0.1148445532, -0.0384094864, 0.2583157718, -0.1768372357, -0.0881769657, 0.2198530287, 0.2592369318, 0.0071112835, 0.2904506028, -0.3201829493, 0.4042015374, 0.3185974956, 0.3075395525, -0.5568349361, 0.1301243454, -0.2209291309, -0.0340215862, 0.6548752785, 0.28448838, -0.3331444263, 0.1173803136, -0.0490211248, 0.0082141031, 0.3080023527, -0.1347648799, -0.1568371952, -0.2240474969, 0.0681478456, -0.0966740027, -0.1177392378, -0.145793438, -0.1565950513, 0.1873217821, -0.0510617606, 0.1215429083, 0.1973783523, 0.5144414306, -0.003709059, 0.008738325, 0.2875571251, 0.2362604141, -0.0319846049, 0.0270487424, -0.115338251 ]
https://github.com/huggingface/datasets/issues/650
dummy data testing can't test datasets using `dl_manager.extract` in `_split_generators`
Thanks for your comment @lhoestq , Just for confirmation, changing dummy data like this won't make dummy test test the functionality to extract `subsetxxx.xz` but actually kind of circumvent it. But since we will test the real data so it is ok ?
Hi, I recently want to add a dataset whose source data is like this ``` openwebtext.tar.xz |__ openwebtext |__subset000.xz | |__ ....txt | |__ ....txt | ... |__ subset001.xz | .... ``` So I wrote `openwebtext.py` like this ``` def _split_generators(self, dl_manager): dl_dir = dl_manager.download_and_extract(_URL) owt_dir = os.path.join(dl_dir, 'openwebtext') subset_xzs = [ os.path.join(owt_dir, file_name) for file_name in os.listdir(owt_dir) if file_name.endswith('xz') # filter out ...xz.lock ] ex_dirs = dl_manager.extract(subset_xzs, num_proc=round(os.cpu_count()*0.75)) nested_txt_files = [ [ os.path.join(ex_dir,txt_file_name) for txt_file_name in os.listdir(ex_dir) if txt_file_name.endswith('txt') ] for ex_dir in ex_dirs ] txt_files = chain(*nested_txt_files) return [ datasets.SplitGenerator( name=datasets.Split.TRAIN, gen_kwargs={"txt_files": txt_files} ), ] ``` All went good, I can load and use real openwebtext, except when I try to test with dummy data. The problem is `MockDownloadManager.extract` do nothing, so `ex_dirs = dl_manager.extract(subset_xzs)` won't decompress `subset_xxx.xz`s for me. How should I do ? Or you can modify `MockDownloadManager` to make it like a real `DownloadManager` ?
43
dummy data testing can't test datasets using `dl_manager.extract` in `_split_generators` Hi, I recently want to add a dataset whose source data is like this ``` openwebtext.tar.xz |__ openwebtext |__subset000.xz | |__ ....txt | |__ ....txt | ... |__ subset001.xz | .... ``` So I wrote `openwebtext.py` like this ``` def _split_generators(self, dl_manager): dl_dir = dl_manager.download_and_extract(_URL) owt_dir = os.path.join(dl_dir, 'openwebtext') subset_xzs = [ os.path.join(owt_dir, file_name) for file_name in os.listdir(owt_dir) if file_name.endswith('xz') # filter out ...xz.lock ] ex_dirs = dl_manager.extract(subset_xzs, num_proc=round(os.cpu_count()*0.75)) nested_txt_files = [ [ os.path.join(ex_dir,txt_file_name) for txt_file_name in os.listdir(ex_dir) if txt_file_name.endswith('txt') ] for ex_dir in ex_dirs ] txt_files = chain(*nested_txt_files) return [ datasets.SplitGenerator( name=datasets.Split.TRAIN, gen_kwargs={"txt_files": txt_files} ), ] ``` All went good, I can load and use real openwebtext, except when I try to test with dummy data. The problem is `MockDownloadManager.extract` do nothing, so `ex_dirs = dl_manager.extract(subset_xzs)` won't decompress `subset_xxx.xz`s for me. How should I do ? Or you can modify `MockDownloadManager` to make it like a real `DownloadManager` ? Thanks for your comment @lhoestq , Just for confirmation, changing dummy data like this won't make dummy test test the functionality to extract `subsetxxx.xz` but actually kind of circumvent it. But since we will test the real data so it is ok ?
[ -0.2775551975, 0.0534974821, 0.0134970266, 0.3913993239, -0.0723610148, 0.1356920153, 0.452233851, 0.3349657655, -0.0165994558, 0.0843320787, -0.0575095415, 0.2236391157, -0.1632839739, -0.0482926145, 0.0641592816, -0.1906500459, -0.1669516265, 0.2437196523, 0.0134652406, 0.031177314, -0.2944734693, 0.081539385, -0.2834988832, -0.0913857743, -0.137154296, 0.0181266908, -0.209564209, 0.3072613478, -0.2457744479, -0.2825934887, 0.0010185599, 0.0183558892, 0.0423618704, 0.5455896854, -0.0001227711, 0.1388189793, 0.3071192503, -0.2575384676, -0.333334595, -0.0337700471, -0.2507254183, -0.2779996991, -0.1756441742, 0.0213026591, -0.0840832219, -0.2268640846, -0.1854513139, -0.2622464001, 0.3548206389, 0.2717152238, 0.092332229, 0.613117516, -0.0415802114, -0.1280227453, 0.2287501246, -0.0264095776, -0.1879368871, 0.2233157754, -0.0529861972, -0.0236794166, 0.087337032, -0.101954706, -0.001184465, 0.4950456619, -0.3201800585, 0.119338721, 0.1507469118, -0.3189714253, -0.0463723429, 0.550545156, 0.4802379012, -0.1391591579, -0.3204443455, -0.2336203307, -0.2743136585, -0.1307142526, 0.074765034, 0.218037948, -0.2292435765, 0.3225834966, -0.029313501, -0.0288202707, 0.1385272145, 0.2705382705, -0.2816977799, 0.3059702516, -0.1236130521, 0.0502374731, 0.4046252668, 0.3228847086, 0.2671746016, -0.2975229025, -0.3519620299, -0.0660927445, -0.1584337503, -0.2081914246, -0.3658330142, -0.4488223791, 0.1594889015, 0.353017807, -0.0114579098, 0.1824111044, 0.0564970151, 0.1532960236, 0.0790389776, 0.4907520711, 0.2176590711, 0.2714264989, 0.0527711548, 0.1392947137, 0.0016768641, 0.0483288243, 0.0824972317, -0.3559398651, -0.2401303351, 0.1764754057, 0.3213751018, -0.1328307688, -0.3999721408, -0.1878485978, -0.2729803026, -0.2551985681, -0.0030331698, 0.3480630815, -0.055273883, 0.1527872086, 0.1276449859, 0.472751528, -0.0498081893, -0.5964108109, -0.1689494252, 0.0743231252, -0.2225881219, 0.1139060035, 0.1182285324, 0.0219425485, 0.4373013079, 0.1158564985, -0.1179257557, -0.0122446604, 0.6474177241, -0.0120399324, 0.4655233324, 0.1485738009, 0.1298145801, -0.068881847, 0.1100027785, -0.1474854946, -0.0640195012, 0.0963677242, 0.0561536886, -0.1661679745, 0.0018028906, 0.0488937534, -0.4305838048, 0.2151849419, -0.0022326426, 0.107809782, -0.0936748683, -0.0127068851, -0.0310164914, -0.0464014374, -0.0932801366, 0.1658294648, 0.3068813682, 0.4303736687, -0.2990069389, 0.1886533946, -0.4357547164, 0.1057800129, 0.5174134374, -0.0811933503, -0.0792281926, 0.3894139528, -0.2814278603, 0.1036905348, 0.4281540811, -0.1070777103, -0.1339181811, 0.3495474756, -0.0856408104, 0.2467709333, 0.303525269, -0.3556996584, -0.1740886569, -0.0409201421, -0.4010947049, 0.1216157824, -0.0223302152, -0.0752302632, -0.3159448206, -0.1216393486, 0.3932136297, 0.0853224024, 0.0043441295, 0.1314849406, -0.0922580957, 0.1189818531, 0.2170329541, -0.0133682992, 0.0638615638, -0.0933699831, -0.3415873051, -0.3053727746, -0.061341688, 0.1441963464, -0.2157243937, 0.3868089318, -0.3383386433, 0.3813674748, 0.3305302858, -0.0956294462, -0.5658615828, -0.0990947783, -0.2402648479, -0.3324829638, 0.0340707675, 0.3017255664, 0.1029656008, 0.0747679546, -0.0000564379, -0.272488296, 0.343028754, 0.1322464496, -0.3578071296, 0.1702772081, 0.0935112834, -0.1067068502, -0.0051660817, 0.043854896, -0.1398248374, -0.4835775197, -0.1919868141, 0.2014568448, 0.2268776596, -0.1514832973, -0.1123246849, -0.2281042337, 0.0167493578, -0.1487819701, 0.0856784061, 0.408757329, 0.0543925464, -0.1391614079, 0.1577094346, 0.1511577964, 0.3081715405, -0.0488708541, -0.2156967223, 0.0614775941, 0.1661099195, -0.3463018835, 0.2142065316, -0.2726495862, 0.0913261548, 0.2350989282, 0.3804802895, -0.0418400317, 0.2846015692, 0.0348782279, 0.2850271761, -0.0671252459, 0.143988505, -0.0548983216, -0.3179723918, -0.1246316209, 0.2577800453, 0.2502179444, 0.5530326366, -0.0051693162, 0.390224725, 0.106765084, 0.1798736155, -0.1399503052, 0.3181183636, 0.0894172862, -0.1737316102, 0.2202001214, -0.2962658107, -0.3673281074, -0.183587417, 0.2700137496, 0.3687213063, 0.3929933608, -0.3055078983, -0.1090082154, -0.4188290536, 0.1396481693, 0.0166624226, -0.2076061666, -0.0101962695, -0.1257268041, -0.0310542826, 0.0821424574, -0.2311614156, 0.0737057328, 0.1541528851, 0.1014866382, -0.0827401057, -0.0176658034, -0.2265049517, -0.0992560908, -0.3669633567, 0.0497563407, 0.3964760005, 0.0628840327, 0.170743376, -0.256339252, -0.3311188519, -0.044409357, -0.0038233453, 0.2833930552, 0.0153304357, 0.3275275528, 0.269520402, 0.0554337241, 0.3602996767, -0.1851064712, -0.0745980665, -0.1926947385, -0.1971706897, 0.1344672889, 0.1516902745, 0.1327987313, -0.2324695289, -0.5946477652, -0.1509213448, -0.2586506903, 0.0104378927, 0.0821236223, -0.0298238397, 0.2840039134, 0.0449706838, 0.0342340507, 0.2216670364, -0.2649143636, -0.2609223425, -0.3637113273, 0.2890399694, -0.2334612757, -0.266803354, 0.0168264024, -0.5399338007, 0.1551875323, -0.2124398202, -0.0537145101, -0.024519207, 0.1239688396, -0.1419388205, 0.1030270457, 0.2029163241, 0.187889725, -0.0453678146, 0.0392214656, -0.1372801363, 0.1033983603, 0.2979872525, 0.0868109986, 0.5367180705, -0.1488343626, 0.173851341, 0.0305472035, 0.2985988855, 0.0357532576, 0.0153355692, 0.2445666641, -0.1797608733, 0.2922434807, -0.1095675007, -0.2095204443, -0.304235965, 0.0125175528, 0.0374831818, 0.2866486013, -0.1137528494, -0.0525305495, -0.060764242, 0.1878272295, 0.0676005557, -0.2674082816, 0.0879298374, -0.2774009705, -0.1997951865, 0.0362316407, 0.2855169773, -0.0677636191, -0.2022216916, 0.0911603346, -0.1012436524, 0.1115729511, -0.2520763278, -0.1802863628, 0.3822591603, -0.5033351183, 0.4058063328, 0.0177056715, 0.2860860825, 0.3129204214, -0.2308181673, 0.0782693252, 0.0477269255, 0.4159892797, -0.3579122424, 0.1582534313, 0.4472881258, -0.2505179644, -0.0422280431, -0.1235633492, -0.2599177063, -0.1890914589, 0.0263636112, -0.3584084213, -0.3673053086, -0.2347056717, 0.1790148169, 0.1722270101, -0.1315885782, -0.0946045369, -0.195420146, -0.1408472359, -0.1739497632, -0.2578311265, -0.0831954107, 0.0511243232, -0.2538347542, -0.1126226559, -0.0213238932, -0.2422348261, 0.3344986141, 0.3226644695, 0.1653524488, -0.0121187745, 0.0048923697, 0.2595239282, 0.0321120322, -0.000283852, 0.5156347156, -0.1827041507, -0.2526944876, 0.1532876194, -0.1646176875, 0.3801350296, 0.1221782044, -0.0386988558, 0.0844476968, -0.4061063826, 0.0917845517, -0.3141174912, 0.5976006985, 0.3187380731, -0.1618885994, 0.1839360595, -0.2865276635, 0.4400343001, -0.119855538, -0.0586535968, 0.5181101561, -0.4390117526, -0.2725731134, 0.2292658538, -0.1000220627, 0.6527174115, 0.1551796198, -0.0103555657, 0.2116363347, 0.2181541771, 0.189475894, -0.2540006042, 0.0620614961, -0.2933144271, -0.2902563512, 0.1150470898, -0.1187710688, 0.2748993337, 0.3439328074, -0.371096909, 0.2314968705, -0.166252166, 0.1161673814, 0.2451561689, 0.467181623, -0.2161771506, 0.0160148181, -0.0778772533, 0.052051764, 0.3815428317, 0.2001960874, -0.0275134891, -0.1653924286, -0.2098923326, -0.1588152647, 0.0254393797, 0.2343831956, -0.4178392291, -0.0726502165, -0.0403766558, -0.2204381078, 0.1376759261, 0.1729966402, 0.2418774664, 0.0537329577, -0.1271223724, -0.1456126571, -0.2578456104, -0.0458923206, 0.1940440685, 0.0672239959, 0.1478219628, 0.0373471156, -0.3742961884, 0.2848320901, -0.1732951403, -0.2097567916, 0.3150956929, -0.1556826681, 0.1648637503, -0.3636010587, 0.017421741, -0.0640937686, -0.1363242418, -0.0785264969, 0.0533222668, 0.0521458164, -0.7080106735, 0.1413471699, -0.2713919282, -0.3244530857, -0.0393843874, 0.1066874266, -0.2228571326, 0.4759735763, 0.4173583686, -0.1163218468, 0.3777333796, -0.2346685827, 0.3289361894, 0.3370269835, -0.1697395593, 0.6116290092, -0.0555218048, -0.3803267777, 0.1090202332, 0.3577328622, 0.2878514826, -0.0637153387, -0.2488833964, -0.1406082511, -0.1500299573, -0.1582458913, 0.1125161573, 0.3955528736, -0.1776656061, 0.2958665192, -0.1747027487, 0.3727816939, -0.1949800998, -0.0024366076, -0.1881540865, 0.1233800203, -0.0857633054, -0.1829469502, 0.2429676652, -0.0049516261, 0.0499992594, -0.0530923307, -0.2602924407, -0.1787487566, -0.294421941, 0.1744042337, 0.0657969266, -0.238659367, 0.1459910423, 0.0540410988, -0.0258018952, -0.120797731, 0.1762764305, -0.3385203481, -0.0109814648, 0.252572298, 0.3427564204, -0.0067284727, -0.6286966205, 0.0099322749, -0.2735544145, 0.2913062274, -0.2193518728, 0.0491061397, 0.1606856436, 0.0328970514, 0.1278441548, -0.2077874243, 0.1320328265, -0.1334704161, 0.5864813328, 0.1192624196, 0.0063476725, -0.0403591841, 0.2203478962, 0.3805126846, 0.09980423, 0.0783211738, 0.134965241, 0.0863007084, -0.3046167493, 0.0316625461, 0.2106907517, 0.0489399433, 0.3257641792, 0.27453053, 0.2787435949, 0.0171891116, -0.0304753985, -0.1940560192, 0.2114886791, 0.2699232996, 0.191338852, 0.7015007734, -0.493688643, 0.333783865, 0.1052522659, -0.2653428316, 0.2542864978, -0.4790070057, 0.1929243952, 0.6058323979, -0.3864372075, 0.0741804838, -0.0801454857, -0.2112537771, 0.2038946003, 0.1999296695, 0.2975565791, 0.2877903283, 0.0260335617, 0.361949414, -0.550458014, -0.0771564171, -0.1918419898, 0.2061726451, 0.2919976115, 0.0384994969, -0.0975592211, 0.0093712853, -0.4708305895, -0.2300651073, 0.2454042882, -0.2955703437, -0.2263981402, -0.0519427247, -0.0112386923, 0.3497266769, -0.2697202861, 0.0553601235, -0.0817314833, -0.3166094422, 0.209785521, 0.1095301136, -0.0809018537, 0.1963224262, 0.4950663149, 0.2401908636, 0.022662865, -0.4391453564, -0.366115123, 0.1244544014, 0.0449608862, -0.1386365592, 0.3397325873, -0.319817394, -0.2074071914, 0.2640449703, 0.0414102003, -0.080663681, -0.4398866594, 0.2591482103, -0.4032659233, -0.1769729108, 0.6636249423, 0.1579112709, 0.0095403874, 0.0294658244, -0.240048781, -0.0903020501, 0.0417931378, 0.1923094392, -0.4423006773, 0.1097014025, 0.0098784622, 0.0258051045, -0.2754498422, 0.4726876915, -0.0548032857, -0.0301341731, -0.2771564424, -0.1637394577, -0.5738851428, 0.2634523213, -0.0527887754, -0.4865394533, 0.0810312107, -0.1199835613, 0.3776105642, 0.1762557328, -0.1693375111, 0.3486985564, 0.2776538432, 0.2912563086, -0.3625786006, -0.243878901, -0.2989763618, 0.030773595, -0.0500391722, -0.4768274426, 0.0896088928, -0.000499182, -0.1357266158, 0.1987258792, 0.0193389896, 0.3844161034, 0.000375827, 0.271522373, 0.0879436135, 0.4524201155, -0.100581117, 0.1148445532, -0.0384094864, 0.2583157718, -0.1768372357, -0.0881769657, 0.2198530287, 0.2592369318, 0.0071112835, 0.2904506028, -0.3201829493, 0.4042015374, 0.3185974956, 0.3075395525, -0.5568349361, 0.1301243454, -0.2209291309, -0.0340215862, 0.6548752785, 0.28448838, -0.3331444263, 0.1173803136, -0.0490211248, 0.0082141031, 0.3080023527, -0.1347648799, -0.1568371952, -0.2240474969, 0.0681478456, -0.0966740027, -0.1177392378, -0.145793438, -0.1565950513, 0.1873217821, -0.0510617606, 0.1215429083, 0.1973783523, 0.5144414306, -0.003709059, 0.008738325, 0.2875571251, 0.2362604141, -0.0319846049, 0.0270487424, -0.115338251 ]
https://github.com/huggingface/datasets/issues/650
dummy data testing can't test datasets using `dl_manager.extract` in `_split_generators`
Yes it's fine for now. We plan to add a job for slow tests. And at one point we'll also do another pass on the dummy data handling and consider extracting files.
Hi, I recently want to add a dataset whose source data is like this ``` openwebtext.tar.xz |__ openwebtext |__subset000.xz | |__ ....txt | |__ ....txt | ... |__ subset001.xz | .... ``` So I wrote `openwebtext.py` like this ``` def _split_generators(self, dl_manager): dl_dir = dl_manager.download_and_extract(_URL) owt_dir = os.path.join(dl_dir, 'openwebtext') subset_xzs = [ os.path.join(owt_dir, file_name) for file_name in os.listdir(owt_dir) if file_name.endswith('xz') # filter out ...xz.lock ] ex_dirs = dl_manager.extract(subset_xzs, num_proc=round(os.cpu_count()*0.75)) nested_txt_files = [ [ os.path.join(ex_dir,txt_file_name) for txt_file_name in os.listdir(ex_dir) if txt_file_name.endswith('txt') ] for ex_dir in ex_dirs ] txt_files = chain(*nested_txt_files) return [ datasets.SplitGenerator( name=datasets.Split.TRAIN, gen_kwargs={"txt_files": txt_files} ), ] ``` All went good, I can load and use real openwebtext, except when I try to test with dummy data. The problem is `MockDownloadManager.extract` do nothing, so `ex_dirs = dl_manager.extract(subset_xzs)` won't decompress `subset_xxx.xz`s for me. How should I do ? Or you can modify `MockDownloadManager` to make it like a real `DownloadManager` ?
32
dummy data testing can't test datasets using `dl_manager.extract` in `_split_generators` Hi, I recently want to add a dataset whose source data is like this ``` openwebtext.tar.xz |__ openwebtext |__subset000.xz | |__ ....txt | |__ ....txt | ... |__ subset001.xz | .... ``` So I wrote `openwebtext.py` like this ``` def _split_generators(self, dl_manager): dl_dir = dl_manager.download_and_extract(_URL) owt_dir = os.path.join(dl_dir, 'openwebtext') subset_xzs = [ os.path.join(owt_dir, file_name) for file_name in os.listdir(owt_dir) if file_name.endswith('xz') # filter out ...xz.lock ] ex_dirs = dl_manager.extract(subset_xzs, num_proc=round(os.cpu_count()*0.75)) nested_txt_files = [ [ os.path.join(ex_dir,txt_file_name) for txt_file_name in os.listdir(ex_dir) if txt_file_name.endswith('txt') ] for ex_dir in ex_dirs ] txt_files = chain(*nested_txt_files) return [ datasets.SplitGenerator( name=datasets.Split.TRAIN, gen_kwargs={"txt_files": txt_files} ), ] ``` All went good, I can load and use real openwebtext, except when I try to test with dummy data. The problem is `MockDownloadManager.extract` do nothing, so `ex_dirs = dl_manager.extract(subset_xzs)` won't decompress `subset_xxx.xz`s for me. How should I do ? Or you can modify `MockDownloadManager` to make it like a real `DownloadManager` ? Yes it's fine for now. We plan to add a job for slow tests. And at one point we'll also do another pass on the dummy data handling and consider extracting files.
[ -0.2775551975, 0.0534974821, 0.0134970266, 0.3913993239, -0.0723610148, 0.1356920153, 0.452233851, 0.3349657655, -0.0165994558, 0.0843320787, -0.0575095415, 0.2236391157, -0.1632839739, -0.0482926145, 0.0641592816, -0.1906500459, -0.1669516265, 0.2437196523, 0.0134652406, 0.031177314, -0.2944734693, 0.081539385, -0.2834988832, -0.0913857743, -0.137154296, 0.0181266908, -0.209564209, 0.3072613478, -0.2457744479, -0.2825934887, 0.0010185599, 0.0183558892, 0.0423618704, 0.5455896854, -0.0001227711, 0.1388189793, 0.3071192503, -0.2575384676, -0.333334595, -0.0337700471, -0.2507254183, -0.2779996991, -0.1756441742, 0.0213026591, -0.0840832219, -0.2268640846, -0.1854513139, -0.2622464001, 0.3548206389, 0.2717152238, 0.092332229, 0.613117516, -0.0415802114, -0.1280227453, 0.2287501246, -0.0264095776, -0.1879368871, 0.2233157754, -0.0529861972, -0.0236794166, 0.087337032, -0.101954706, -0.001184465, 0.4950456619, -0.3201800585, 0.119338721, 0.1507469118, -0.3189714253, -0.0463723429, 0.550545156, 0.4802379012, -0.1391591579, -0.3204443455, -0.2336203307, -0.2743136585, -0.1307142526, 0.074765034, 0.218037948, -0.2292435765, 0.3225834966, -0.029313501, -0.0288202707, 0.1385272145, 0.2705382705, -0.2816977799, 0.3059702516, -0.1236130521, 0.0502374731, 0.4046252668, 0.3228847086, 0.2671746016, -0.2975229025, -0.3519620299, -0.0660927445, -0.1584337503, -0.2081914246, -0.3658330142, -0.4488223791, 0.1594889015, 0.353017807, -0.0114579098, 0.1824111044, 0.0564970151, 0.1532960236, 0.0790389776, 0.4907520711, 0.2176590711, 0.2714264989, 0.0527711548, 0.1392947137, 0.0016768641, 0.0483288243, 0.0824972317, -0.3559398651, -0.2401303351, 0.1764754057, 0.3213751018, -0.1328307688, -0.3999721408, -0.1878485978, -0.2729803026, -0.2551985681, -0.0030331698, 0.3480630815, -0.055273883, 0.1527872086, 0.1276449859, 0.472751528, -0.0498081893, -0.5964108109, -0.1689494252, 0.0743231252, -0.2225881219, 0.1139060035, 0.1182285324, 0.0219425485, 0.4373013079, 0.1158564985, -0.1179257557, -0.0122446604, 0.6474177241, -0.0120399324, 0.4655233324, 0.1485738009, 0.1298145801, -0.068881847, 0.1100027785, -0.1474854946, -0.0640195012, 0.0963677242, 0.0561536886, -0.1661679745, 0.0018028906, 0.0488937534, -0.4305838048, 0.2151849419, -0.0022326426, 0.107809782, -0.0936748683, -0.0127068851, -0.0310164914, -0.0464014374, -0.0932801366, 0.1658294648, 0.3068813682, 0.4303736687, -0.2990069389, 0.1886533946, -0.4357547164, 0.1057800129, 0.5174134374, -0.0811933503, -0.0792281926, 0.3894139528, -0.2814278603, 0.1036905348, 0.4281540811, -0.1070777103, -0.1339181811, 0.3495474756, -0.0856408104, 0.2467709333, 0.303525269, -0.3556996584, -0.1740886569, -0.0409201421, -0.4010947049, 0.1216157824, -0.0223302152, -0.0752302632, -0.3159448206, -0.1216393486, 0.3932136297, 0.0853224024, 0.0043441295, 0.1314849406, -0.0922580957, 0.1189818531, 0.2170329541, -0.0133682992, 0.0638615638, -0.0933699831, -0.3415873051, -0.3053727746, -0.061341688, 0.1441963464, -0.2157243937, 0.3868089318, -0.3383386433, 0.3813674748, 0.3305302858, -0.0956294462, -0.5658615828, -0.0990947783, -0.2402648479, -0.3324829638, 0.0340707675, 0.3017255664, 0.1029656008, 0.0747679546, -0.0000564379, -0.272488296, 0.343028754, 0.1322464496, -0.3578071296, 0.1702772081, 0.0935112834, -0.1067068502, -0.0051660817, 0.043854896, -0.1398248374, -0.4835775197, -0.1919868141, 0.2014568448, 0.2268776596, -0.1514832973, -0.1123246849, -0.2281042337, 0.0167493578, -0.1487819701, 0.0856784061, 0.408757329, 0.0543925464, -0.1391614079, 0.1577094346, 0.1511577964, 0.3081715405, -0.0488708541, -0.2156967223, 0.0614775941, 0.1661099195, -0.3463018835, 0.2142065316, -0.2726495862, 0.0913261548, 0.2350989282, 0.3804802895, -0.0418400317, 0.2846015692, 0.0348782279, 0.2850271761, -0.0671252459, 0.143988505, -0.0548983216, -0.3179723918, -0.1246316209, 0.2577800453, 0.2502179444, 0.5530326366, -0.0051693162, 0.390224725, 0.106765084, 0.1798736155, -0.1399503052, 0.3181183636, 0.0894172862, -0.1737316102, 0.2202001214, -0.2962658107, -0.3673281074, -0.183587417, 0.2700137496, 0.3687213063, 0.3929933608, -0.3055078983, -0.1090082154, -0.4188290536, 0.1396481693, 0.0166624226, -0.2076061666, -0.0101962695, -0.1257268041, -0.0310542826, 0.0821424574, -0.2311614156, 0.0737057328, 0.1541528851, 0.1014866382, -0.0827401057, -0.0176658034, -0.2265049517, -0.0992560908, -0.3669633567, 0.0497563407, 0.3964760005, 0.0628840327, 0.170743376, -0.256339252, -0.3311188519, -0.044409357, -0.0038233453, 0.2833930552, 0.0153304357, 0.3275275528, 0.269520402, 0.0554337241, 0.3602996767, -0.1851064712, -0.0745980665, -0.1926947385, -0.1971706897, 0.1344672889, 0.1516902745, 0.1327987313, -0.2324695289, -0.5946477652, -0.1509213448, -0.2586506903, 0.0104378927, 0.0821236223, -0.0298238397, 0.2840039134, 0.0449706838, 0.0342340507, 0.2216670364, -0.2649143636, -0.2609223425, -0.3637113273, 0.2890399694, -0.2334612757, -0.266803354, 0.0168264024, -0.5399338007, 0.1551875323, -0.2124398202, -0.0537145101, -0.024519207, 0.1239688396, -0.1419388205, 0.1030270457, 0.2029163241, 0.187889725, -0.0453678146, 0.0392214656, -0.1372801363, 0.1033983603, 0.2979872525, 0.0868109986, 0.5367180705, -0.1488343626, 0.173851341, 0.0305472035, 0.2985988855, 0.0357532576, 0.0153355692, 0.2445666641, -0.1797608733, 0.2922434807, -0.1095675007, -0.2095204443, -0.304235965, 0.0125175528, 0.0374831818, 0.2866486013, -0.1137528494, -0.0525305495, -0.060764242, 0.1878272295, 0.0676005557, -0.2674082816, 0.0879298374, -0.2774009705, -0.1997951865, 0.0362316407, 0.2855169773, -0.0677636191, -0.2022216916, 0.0911603346, -0.1012436524, 0.1115729511, -0.2520763278, -0.1802863628, 0.3822591603, -0.5033351183, 0.4058063328, 0.0177056715, 0.2860860825, 0.3129204214, -0.2308181673, 0.0782693252, 0.0477269255, 0.4159892797, -0.3579122424, 0.1582534313, 0.4472881258, -0.2505179644, -0.0422280431, -0.1235633492, -0.2599177063, -0.1890914589, 0.0263636112, -0.3584084213, -0.3673053086, -0.2347056717, 0.1790148169, 0.1722270101, -0.1315885782, -0.0946045369, -0.195420146, -0.1408472359, -0.1739497632, -0.2578311265, -0.0831954107, 0.0511243232, -0.2538347542, -0.1126226559, -0.0213238932, -0.2422348261, 0.3344986141, 0.3226644695, 0.1653524488, -0.0121187745, 0.0048923697, 0.2595239282, 0.0321120322, -0.000283852, 0.5156347156, -0.1827041507, -0.2526944876, 0.1532876194, -0.1646176875, 0.3801350296, 0.1221782044, -0.0386988558, 0.0844476968, -0.4061063826, 0.0917845517, -0.3141174912, 0.5976006985, 0.3187380731, -0.1618885994, 0.1839360595, -0.2865276635, 0.4400343001, -0.119855538, -0.0586535968, 0.5181101561, -0.4390117526, -0.2725731134, 0.2292658538, -0.1000220627, 0.6527174115, 0.1551796198, -0.0103555657, 0.2116363347, 0.2181541771, 0.189475894, -0.2540006042, 0.0620614961, -0.2933144271, -0.2902563512, 0.1150470898, -0.1187710688, 0.2748993337, 0.3439328074, -0.371096909, 0.2314968705, -0.166252166, 0.1161673814, 0.2451561689, 0.467181623, -0.2161771506, 0.0160148181, -0.0778772533, 0.052051764, 0.3815428317, 0.2001960874, -0.0275134891, -0.1653924286, -0.2098923326, -0.1588152647, 0.0254393797, 0.2343831956, -0.4178392291, -0.0726502165, -0.0403766558, -0.2204381078, 0.1376759261, 0.1729966402, 0.2418774664, 0.0537329577, -0.1271223724, -0.1456126571, -0.2578456104, -0.0458923206, 0.1940440685, 0.0672239959, 0.1478219628, 0.0373471156, -0.3742961884, 0.2848320901, -0.1732951403, -0.2097567916, 0.3150956929, -0.1556826681, 0.1648637503, -0.3636010587, 0.017421741, -0.0640937686, -0.1363242418, -0.0785264969, 0.0533222668, 0.0521458164, -0.7080106735, 0.1413471699, -0.2713919282, -0.3244530857, -0.0393843874, 0.1066874266, -0.2228571326, 0.4759735763, 0.4173583686, -0.1163218468, 0.3777333796, -0.2346685827, 0.3289361894, 0.3370269835, -0.1697395593, 0.6116290092, -0.0555218048, -0.3803267777, 0.1090202332, 0.3577328622, 0.2878514826, -0.0637153387, -0.2488833964, -0.1406082511, -0.1500299573, -0.1582458913, 0.1125161573, 0.3955528736, -0.1776656061, 0.2958665192, -0.1747027487, 0.3727816939, -0.1949800998, -0.0024366076, -0.1881540865, 0.1233800203, -0.0857633054, -0.1829469502, 0.2429676652, -0.0049516261, 0.0499992594, -0.0530923307, -0.2602924407, -0.1787487566, -0.294421941, 0.1744042337, 0.0657969266, -0.238659367, 0.1459910423, 0.0540410988, -0.0258018952, -0.120797731, 0.1762764305, -0.3385203481, -0.0109814648, 0.252572298, 0.3427564204, -0.0067284727, -0.6286966205, 0.0099322749, -0.2735544145, 0.2913062274, -0.2193518728, 0.0491061397, 0.1606856436, 0.0328970514, 0.1278441548, -0.2077874243, 0.1320328265, -0.1334704161, 0.5864813328, 0.1192624196, 0.0063476725, -0.0403591841, 0.2203478962, 0.3805126846, 0.09980423, 0.0783211738, 0.134965241, 0.0863007084, -0.3046167493, 0.0316625461, 0.2106907517, 0.0489399433, 0.3257641792, 0.27453053, 0.2787435949, 0.0171891116, -0.0304753985, -0.1940560192, 0.2114886791, 0.2699232996, 0.191338852, 0.7015007734, -0.493688643, 0.333783865, 0.1052522659, -0.2653428316, 0.2542864978, -0.4790070057, 0.1929243952, 0.6058323979, -0.3864372075, 0.0741804838, -0.0801454857, -0.2112537771, 0.2038946003, 0.1999296695, 0.2975565791, 0.2877903283, 0.0260335617, 0.361949414, -0.550458014, -0.0771564171, -0.1918419898, 0.2061726451, 0.2919976115, 0.0384994969, -0.0975592211, 0.0093712853, -0.4708305895, -0.2300651073, 0.2454042882, -0.2955703437, -0.2263981402, -0.0519427247, -0.0112386923, 0.3497266769, -0.2697202861, 0.0553601235, -0.0817314833, -0.3166094422, 0.209785521, 0.1095301136, -0.0809018537, 0.1963224262, 0.4950663149, 0.2401908636, 0.022662865, -0.4391453564, -0.366115123, 0.1244544014, 0.0449608862, -0.1386365592, 0.3397325873, -0.319817394, -0.2074071914, 0.2640449703, 0.0414102003, -0.080663681, -0.4398866594, 0.2591482103, -0.4032659233, -0.1769729108, 0.6636249423, 0.1579112709, 0.0095403874, 0.0294658244, -0.240048781, -0.0903020501, 0.0417931378, 0.1923094392, -0.4423006773, 0.1097014025, 0.0098784622, 0.0258051045, -0.2754498422, 0.4726876915, -0.0548032857, -0.0301341731, -0.2771564424, -0.1637394577, -0.5738851428, 0.2634523213, -0.0527887754, -0.4865394533, 0.0810312107, -0.1199835613, 0.3776105642, 0.1762557328, -0.1693375111, 0.3486985564, 0.2776538432, 0.2912563086, -0.3625786006, -0.243878901, -0.2989763618, 0.030773595, -0.0500391722, -0.4768274426, 0.0896088928, -0.000499182, -0.1357266158, 0.1987258792, 0.0193389896, 0.3844161034, 0.000375827, 0.271522373, 0.0879436135, 0.4524201155, -0.100581117, 0.1148445532, -0.0384094864, 0.2583157718, -0.1768372357, -0.0881769657, 0.2198530287, 0.2592369318, 0.0071112835, 0.2904506028, -0.3201829493, 0.4042015374, 0.3185974956, 0.3075395525, -0.5568349361, 0.1301243454, -0.2209291309, -0.0340215862, 0.6548752785, 0.28448838, -0.3331444263, 0.1173803136, -0.0490211248, 0.0082141031, 0.3080023527, -0.1347648799, -0.1568371952, -0.2240474969, 0.0681478456, -0.0966740027, -0.1177392378, -0.145793438, -0.1565950513, 0.1873217821, -0.0510617606, 0.1215429083, 0.1973783523, 0.5144414306, -0.003709059, 0.008738325, 0.2875571251, 0.2362604141, -0.0319846049, 0.0270487424, -0.115338251 ]
https://github.com/huggingface/datasets/issues/649
Inconsistent behavior in map
Thanks for reporting ! This issue must have appeared when we refactored type inference in `nlp` By default the library tries to keep the same feature types when applying `map` but apparently it has troubles with nested structures. I'll try to fix that next week
I'm observing inconsistent behavior when applying .map(). This happens specifically when I'm incrementally adding onto a feature that is a nested dictionary. Here's a simple example that reproduces the problem. ```python import datasets # Dataset with a single feature called 'field' consisting of two examples dataset = datasets.Dataset.from_dict({'field': ['a', 'b']}) print(dataset[0]) # outputs {'field': 'a'} # Map this dataset to create another feature called 'otherfield', which is a dictionary containing a key called 'capital' dataset = dataset.map(lambda example: {'otherfield': {'capital': example['field'].capitalize()}}) print(dataset[0]) # output is okay {'field': 'a', 'otherfield': {'capital': 'A'}} # Now I want to map again to modify 'otherfield', by adding another key called 'append_x' to the dictionary under 'otherfield' print(dataset.map(lambda example: {'otherfield': {'append_x': example['field'] + 'x'}})[0]) # printing out the first example after applying the map shows that the new key 'append_x' doesn't get added # it also messes up the value stored at 'capital' {'field': 'a', 'otherfield': {'capital': None}} # Instead, I try to do the same thing by using a different mapped fn print(dataset.map(lambda example: {'otherfield': {'append_x': example['field'] + 'x', 'capital': example['otherfield']['capital']}})[0]) # this preserves the value under capital, but still no 'append_x' {'field': 'a', 'otherfield': {'capital': 'A'}} # Instead, I try to pass 'otherfield' to remove_columns print(dataset.map(lambda example: {'otherfield': {'append_x': example['field'] + 'x', 'capital': example['otherfield']['capital']}}, remove_columns=['otherfield'])[0]) # this still doesn't fix the problem {'field': 'a', 'otherfield': {'capital': 'A'}} # Alternately, here's what happens if I just directly map both 'capital' and 'append_x' on a fresh dataset. # Recreate the dataset dataset = datasets.Dataset.from_dict({'field': ['a', 'b']}) # Now map the entire 'otherfield' dict directly, instead of incrementally as before print(dataset.map(lambda example: {'otherfield': {'append_x': example['field'] + 'x', 'capital': example['field'].capitalize()}})[0]) # This looks good! {'field': 'a', 'otherfield': {'append_x': 'ax', 'capital': 'A'}} ``` This might be a new issue, because I didn't see this behavior in the `nlp` library. Any help is appreciated!
45
Inconsistent behavior in map I'm observing inconsistent behavior when applying .map(). This happens specifically when I'm incrementally adding onto a feature that is a nested dictionary. Here's a simple example that reproduces the problem. ```python import datasets # Dataset with a single feature called 'field' consisting of two examples dataset = datasets.Dataset.from_dict({'field': ['a', 'b']}) print(dataset[0]) # outputs {'field': 'a'} # Map this dataset to create another feature called 'otherfield', which is a dictionary containing a key called 'capital' dataset = dataset.map(lambda example: {'otherfield': {'capital': example['field'].capitalize()}}) print(dataset[0]) # output is okay {'field': 'a', 'otherfield': {'capital': 'A'}} # Now I want to map again to modify 'otherfield', by adding another key called 'append_x' to the dictionary under 'otherfield' print(dataset.map(lambda example: {'otherfield': {'append_x': example['field'] + 'x'}})[0]) # printing out the first example after applying the map shows that the new key 'append_x' doesn't get added # it also messes up the value stored at 'capital' {'field': 'a', 'otherfield': {'capital': None}} # Instead, I try to do the same thing by using a different mapped fn print(dataset.map(lambda example: {'otherfield': {'append_x': example['field'] + 'x', 'capital': example['otherfield']['capital']}})[0]) # this preserves the value under capital, but still no 'append_x' {'field': 'a', 'otherfield': {'capital': 'A'}} # Instead, I try to pass 'otherfield' to remove_columns print(dataset.map(lambda example: {'otherfield': {'append_x': example['field'] + 'x', 'capital': example['otherfield']['capital']}}, remove_columns=['otherfield'])[0]) # this still doesn't fix the problem {'field': 'a', 'otherfield': {'capital': 'A'}} # Alternately, here's what happens if I just directly map both 'capital' and 'append_x' on a fresh dataset. # Recreate the dataset dataset = datasets.Dataset.from_dict({'field': ['a', 'b']}) # Now map the entire 'otherfield' dict directly, instead of incrementally as before print(dataset.map(lambda example: {'otherfield': {'append_x': example['field'] + 'x', 'capital': example['field'].capitalize()}})[0]) # This looks good! {'field': 'a', 'otherfield': {'append_x': 'ax', 'capital': 'A'}} ``` This might be a new issue, because I didn't see this behavior in the `nlp` library. Any help is appreciated! Thanks for reporting ! This issue must have appeared when we refactored type inference in `nlp` By default the library tries to keep the same feature types when applying `map` but apparently it has troubles with nested structures. I'll try to fix that next week
[ 0.3283727765, -0.2924291193, -0.0719692037, 0.0814119279, -0.0720761493, -0.2064360082, 0.0637709722, 0.0195533521, 0.2041489929, -0.0053225802, 0.292031765, 0.5868220925, 0.209287703, 0.1178401485, -0.3162102997, 0.1631347388, 0.2691357136, -0.0755069181, 0.0736095458, -0.136680305, -0.2508084476, 0.0666692629, -0.5501967669, -0.1045748815, -0.0512329787, -0.2376286834, -0.2272645384, -0.2153917551, 0.0933097005, -0.0640513971, -0.0802594498, 0.1609658003, -0.3127310276, 0.3500860333, -0.000115136, -0.1009185687, 0.2150342315, -0.0772835314, 0.0711239129, 0.0254445095, -0.0651641712, -0.18519786, -0.0215637498, -0.2740438282, 0.1911570281, -0.0858945921, -0.2054760456, -0.2903948426, 0.0998268276, -0.2147041857, 0.2083425969, -0.0882751644, 0.0907830894, 0.2036316991, 0.0287714619, 0.1171302423, -0.0643493831, 0.0056962776, 0.0296099279, -0.2457847446, 0.1012370437, 0.0323891863, -0.1886448562, -0.1628933996, 0.3863433897, 0.1219843477, 0.3245944381, -0.3239735067, 0.0626330748, -0.0192076992, 0.0291196313, 0.0251825098, -0.3432812989, -0.253994137, -0.3001534045, -0.0827325806, 0.2275514901, -0.3730779588, -0.1039254516, -0.1914054751, -0.1468645185, -0.1279848367, 0.2984394431, 0.5585368872, -0.3571728468, 0.0947527513, -0.1084651425, 0.2734063268, -0.1603788137, -0.164442271, -0.2618699074, -0.4508466721, 0.0857140794, 0.3864741921, 0.0043788627, 0.0150338039, 0.3914424777, -0.186893627, -0.0469606705, -0.4379442334, 0.1130756587, 0.2154433876, -0.3255037963, 0.2683790922, 0.3306060135, 0.1537621617, 0.4373147488, 0.2231998295, 0.1474876553, -0.0318471789, -0.3212689757, 0.0861437395, 0.608695209, 0.0624116361, 0.2395027876, -0.2713069022, 0.4256378412, 0.0798458382, 0.0098995017, 0.1574281901, -0.5427668691, -0.0663731247, 0.0712641254, -0.1117041558, 0.271551013, -0.086617671, -0.0785828978, 0.3137060702, 0.0207542907, 0.5313534141, -0.1912367791, -0.0386034474, -0.207751736, 0.0864647105, 0.0024233428, 0.1304296255, 0.273006022, 0.3178070784, -0.1392194927, -0.2177396715, -0.3970100284, -0.0170152206, 0.3400409818, -0.1534976512, -0.36143291, 0.3681811392, -0.0495871529, -0.4164007008, 0.0381334685, 0.270856142, -0.0403649248, 0.1602686346, 0.3031720817, 0.1658838242, -0.1487569064, -0.0807440206, -0.1751650721, 0.3520653844, 0.4351247847, -0.2993873954, 0.1443831921, 0.0354405381, -0.4979198277, -0.4050822854, 0.0301577356, 0.5204485655, -0.1916330457, -0.048870977, -0.0841387808, 0.3315014243, 0.0023970872, 0.2420015186, 0.0136621222, 0.153141126, -0.1249736622, 0.2145012021, 0.2045970857, -0.1615844965, -0.4443526268, 0.2402662784, -0.0463324971, 0.4343186319, -0.3960131407, -0.0249243565, 0.1610621363, -0.1516001672, 0.1488510072, -0.0462928899, 0.1757986397, -0.0066656461, -0.2617480755, 0.3233525753, 0.2869601548, -0.348000735, -0.2542613447, 0.400269866, 0.2608436644, -0.0804874152, 0.2576495707, 0.1320992708, 0.2061038464, -0.0267863423, 0.1052478626, 0.0331105106, -0.1136966422, 0.0844125375, -0.4560530186, 0.3330091536, -0.0763350576, -0.1763487756, -0.1707536727, 0.0100763915, 0.00960474, 0.1199485362, -0.0798508227, -0.0691366866, 0.1536290646, -0.000864208, -0.2326337993, -0.0664440095, 0.1253823638, -0.1909983158, 0.2330996245, 0.0806064606, -0.1279174238, 0.0695781484, 0.1376041919, -0.1389886439, -0.4655867219, 0.1393826455, 0.4000683725, -0.1673891395, -0.2414456606, 0.3641874492, 0.0692587271, -0.002302015, -0.2280890048, 0.0989655629, 0.33258757, 0.3299351931, 0.0358657688, 0.1566068679, 0.1441522241, -0.2623309493, -0.09114369, 0.1735063791, 0.3850868642, 0.3000434935, -0.3314893544, -0.0568486862, -0.1686349213, 0.0851569995, -0.0463744365, -0.6482141614, -0.355604291, 0.1406765431, -0.0350370035, -0.1433358938, 0.1924089938, 0.4853856564, 0.1540118307, -0.1167076528, 0.0462063514, -0.1036287397, -0.0340309702, 0.0007395637, -0.1649096161, 0.2468136996, 0.5029404163, -0.0317556038, 0.2145571709, 0.0306692701, 0.3216382861, -0.2117248476, 0.0213167388, 0.1173989847, 0.016156394, 0.1465898752, 0.5601218343, 0.1424715668, -0.1684334427, 0.26320678, 0.1871364564, 0.0386452004, 0.0624047033, 0.0907628313, -0.2531962991, 0.1338757426, 0.0510711372, -0.316116035, -0.0984152108, -0.5975273252, -0.0520731732, 0.3707389832, -0.2355759591, 0.0839984939, 0.3379153907, -0.3251422644, 0.0241298024, -0.2906602621, 0.0372629724, -0.2106798589, 0.0101509662, -0.0008531647, -0.119270958, -0.2419506162, 0.0747873932, 0.451842308, -0.2425146103, -0.3445887268, -0.7150275111, -0.0899504423, -0.3523364067, 0.1481157839, -0.0713119581, -0.0721299946, -0.0156702995, -0.0927322954, 0.2402780056, -0.2040441036, -0.197530508, 0.0924527347, 0.187016204, -0.3144248128, -0.121485509, -0.0873896778, 0.0895960554, -0.2379461378, 0.297544837, -0.0686318353, 0.0802902281, 0.1324362606, -0.1091015488, -0.2828169167, 0.1742838174, -0.0787642226, -0.1740810126, 0.3903703988, 0.2282118052, -0.1205741614, 0.1720116884, -0.0620097183, -0.1167682335, -0.1341579705, 0.185547784, -0.1187648922, -0.2799406648, -0.1594984382, 0.433362782, 0.3595966399, 0.0029953581, 0.2989761829, 0.1547246128, -0.0664264187, -0.1760398149, -0.4334546924, 0.1408874542, 0.5860909224, 0.0139512196, 0.1631965488, 0.2730637789, 0.0733999684, 0.3057005703, 0.3173773885, -0.098008424, 0.2232824862, -0.1188821271, -0.0478854887, -0.2906947732, -0.1633784622, -0.2218583971, -0.2506219149, 0.0141530503, 0.0295921713, 0.0194461271, -0.4428290427, 0.140032813, -0.1187645271, -0.2647046447, -0.2848888636, -0.0516304746, -0.2999197841, 0.2841060758, 0.1367472857, 0.2810205817, -0.155203566, -0.1385189891, -0.0789593905, -0.3428581059, 0.2689986825, -0.2150084823, -0.2971649766, -0.1210716888, -0.3153410852, 0.388584286, 0.0652253926, 0.2098757476, 0.1250799596, -0.4220082164, 0.0919419229, 0.1380856633, 0.4020267427, -0.4266529381, -0.0200011786, -0.1246156096, -0.3372525871, -0.5130756497, -0.1785172075, 0.0059911767, 0.8075062037, 0.1143295467, 0.4953758419, -0.0577766933, 0.0176589936, -0.1742611527, 0.0347508974, 0.0271136519, -0.1188023463, 0.0878933743, -0.1159713343, -0.2429100275, -0.2227450758, 0.0133714052, 0.0186489336, 0.31741032, -0.3497678936, 0.1555936635, 0.143491745, -0.1378666162, -0.0431596488, 0.2221333385, 0.2328153402, 0.1089470312, 0.040827211, 0.0711773634, -0.3110005558, 0.324319154, -0.0059175524, 0.1358443201, -0.0720114335, -0.2679105997, -0.0119424332, 0.2709789276, 0.1727702618, 0.2241785228, -0.2227844298, -0.0291618966, -0.022587562, -0.2912720144, 0.5955765247, 0.0222176164, 0.0258124918, -0.1589708924, 0.4224529862, -0.0279712025, -0.4867107868, 0.3390015662, -0.0815821663, -0.2324020267, 0.5947390199, -0.188005358, 0.504350543, 0.1774412245, -0.0333689377, 0.2652245462, 0.0960997641, -0.07814347, 0.1000581682, 0.2075048238, -0.3149505258, -0.1735152602, -0.0446482189, 0.1884694397, -0.1958249062, 0.1896787882, -0.1084640473, 0.0508314185, -0.1657968014, 0.6276269555, 0.0688497871, -0.3101538122, 0.3981218338, -0.0345552377, -0.1007143408, 0.0702550262, 0.4636613429, 0.3073571622, 0.0203548297, -0.0549088344, -0.190663442, -0.3429856896, -0.0222572256, 0.0342616662, -0.1484504491, 0.2699089944, 0.0888039097, 0.0082462681, 0.0272730663, 0.5211563706, 0.0885115564, 0.1108672246, 0.1789794117, -0.1381910294, 0.5807951093, 0.2329132408, 0.1320386827, -0.2373418361, -0.2910967767, 0.1437287033, -0.2804421484, 0.0871349499, -0.2552815378, -0.07093063, -0.7718064785, 0.3505953252, -0.2758606076, -0.2989431918, -0.0883856639, 0.0231948402, -0.2038774639, -0.1183102354, 0.0394661799, -0.1617492139, -0.0789021477, 0.3045651615, -0.1264171749, -0.1972381771, 0.1007835791, 0.503726542, 0.069555372, 0.4625644088, 0.2889646888, -0.22224769, -0.0142584294, -0.0470951758, -0.1965955943, -0.2833275199, 0.2451337725, 0.0803102031, -0.1415917575, 0.0006985183, 0.1558644325, 0.3267734349, -0.3146661818, 0.0501043797, -0.2087603807, -0.2365891337, -0.0785741657, 0.3313897848, 0.177379787, 0.0771930739, -0.1244440377, -0.0876155496, -0.0371808186, 0.5158187151, -0.2492160946, 0.0297315102, 0.5445588231, 0.3482587039, 0.5488522649, 0.1669693887, 0.0330426916, -0.1139921471, 0.1379627138, 0.0576443188, -0.0070282971, -0.196998477, 0.0927836895, 0.0975268334, 0.2467229664, 0.1431359947, -0.0202179458, -0.0817834288, 0.2235705853, -0.3962993622, 0.3992109597, 0.0477069765, -0.1095538959, 0.2654609978, -0.1771472096, 0.355257988, 0.2055753917, 0.2373933792, -0.1122223809, -0.1242636368, 0.2162543088, 0.0146350842, 0.0578590557, -0.0392931253, -0.0661936551, -0.079474017, -0.3762367666, 0.1798867732, 0.3319212794, -0.2201945633, 0.0316515267, 0.2090616673, 0.0847322047, 0.1028605625, -0.19606857, -0.1993498355, -0.4081459045, 0.208377555, -0.1368822306, -0.2583906651, 0.7140583396, 0.1178332567, 0.4833857715, 0.5350747705, 0.1387885511, -0.363943249, -0.2383734882, -0.0338434391, -0.1895393878, -0.2641139627, 0.1569012851, 0.5044385791, -0.0935209095, 0.0170586761, 0.2735709548, 0.1556527913, -0.0954526439, 0.488783896, 0.5087662935, 0.0641677454, 0.083883971, -0.1006648764, 0.1373464018, -0.196014151, 0.373991549, 0.2221965492, 0.1100255176, 0.1483700573, 0.2638942301, 0.0017181492, 0.1322784275, -0.3337880969, 0.0190552883, 0.2291948199, -0.2112756371, -0.31934461, 0.0417509861, -0.3345663249, -0.0603920557, -0.2493556142, -0.1686457843, -0.1024260893, 0.523063302, -0.1845663488, -0.0359459519, -0.1700662225, 0.0130210817, -0.2495191246, 0.5381360054, -0.0387334526, 0.2034343183, -0.062798351, 0.0051705944, -0.0611838475, -0.1318742484, 0.1170627326, 0.2796714306, -0.3479602635, 0.4438442886, 0.0131661659, -0.336047411, 0.1206348315, 0.2105064094, -0.2048145831, 0.0788402632, 0.1018046811, 0.1002452597, -0.1397598088, 0.1486282051, 0.36579597, 0.4342814088, -0.0745402426, 0.2215064168, 0.066569142, -0.071638532, 0.0137890102, -0.2227044851, 0.1665644646, -0.5212208033, 0.0166322608, -0.1729620993, 0.2235326618, 0.0654630885, 0.0667768493, 0.0536084995, 0.2340753824, 0.1249891073, -0.157534793, -0.2167907655, 0.002999092, -0.4744949639, 0.161525473, -0.1510285288, -0.0472114086, -0.1579039842, 0.031176284, 0.3251594901, -0.0296742991, 0.1237815619, -0.4717043936, -0.2631179392, 0.3394149542, -0.0446447693, -0.114451766, -0.1804471016, -0.2015490681, 0.1241679266, -0.3140755594, 0.1728308797, -0.1143608838, 0.1543126851, -0.0288259406, 0.0082055433, -0.3365115225, -0.2416061014, 0.5207397342, 0.3949007392, -0.0324203521, -0.2991229296, -0.2901269794, -0.1878256947, 0.0111459484, -0.2121374458, 0.3095387816, -0.0964083672, 0.3693118989, 0.0061806473, 0.0086326785, 0.0333505459, 0.1296661198, 0.1743181944, -0.3438023627, -0.099005498, 0.039934054, -0.2183187604, 0.1883192509, -0.0171574578, 0.5380633473, -0.1453256458, 0.3856753707, 0.095580861, -0.3196709454, 0.3257687986, -0.3355544209, -0.1595034599, 0.1842432767, 0.0158362836, 0.0343551412, -0.2107643932, 0.0301295538, -0.4007387161, 0.2965136468, -0.3499025404, -0.1761532724, 0.001384057, -0.2839894593, -0.3851124346, -0.0579376109, 0.1256391108, 0.0840846151, -0.1349221319, 0.1699390411, -0.1088755652 ]
https://github.com/huggingface/datasets/issues/647
Cannot download dataset_info.json
Thanks for reporting ! We should add support for servers without internet connection indeed I'll do that early next week
I am running my job on a cloud server where does not provide for connections from the standard compute nodes to outside resources. Hence, when I use `dataset.load_dataset()` to load data, I got an error like this: ``` ConnectionError: Couldn't reach https://storage.googleapis.com/huggingface-nlp/cache/datasets/text/default-53ee3045f07ba8ca/0.0.0/dataset_info.json ``` I tried to open this link manually, but I cannot access this file. How can I download this file and pass it through `dataset.load_dataset()` manually? Versions: Python version 3.7.3 PyTorch version 1.6.0 TensorFlow version 2.3.0 datasets version: 1.0.1
20
Cannot download dataset_info.json I am running my job on a cloud server where does not provide for connections from the standard compute nodes to outside resources. Hence, when I use `dataset.load_dataset()` to load data, I got an error like this: ``` ConnectionError: Couldn't reach https://storage.googleapis.com/huggingface-nlp/cache/datasets/text/default-53ee3045f07ba8ca/0.0.0/dataset_info.json ``` I tried to open this link manually, but I cannot access this file. How can I download this file and pass it through `dataset.load_dataset()` manually? Versions: Python version 3.7.3 PyTorch version 1.6.0 TensorFlow version 2.3.0 datasets version: 1.0.1 Thanks for reporting ! We should add support for servers without internet connection indeed I'll do that early next week
[ -0.2581690848, 0.0243744832, -0.0594887286, 0.2031507641, 0.0788521543, 0.1288591027, 0.0959737375, 0.2360106558, 0.1991668493, 0.079568252, 0.1454199851, 0.2383176684, 0.2438560128, 0.1896516383, 0.1779322326, -0.1044931561, -0.1757184565, 0.0602589808, 0.0163061507, 0.1639958322, -0.2036470473, 0.1125225052, -0.0277885683, 0.0930871069, -0.1486054957, -0.3295292258, 0.1726286411, 0.1674590558, -0.1995365173, -0.0480164662, 0.3676280677, 0.1111577973, 0.0231310315, 0.180083856, -0.0001172043, 0.2482482195, 0.3314515948, -0.0468825065, -0.3855319023, -0.6151011586, -0.2775321007, -0.3104660511, 0.1326968968, -0.2921256721, 0.0545549244, -0.0274381489, 0.3667289019, -0.2455899268, 0.3066192865, 0.3828884661, 0.0818872899, 0.1975742877, 0.1668198407, -0.0151024042, -0.0796688274, -0.1569043845, 0.1030239016, 0.2234268337, 0.077849254, 0.0222973935, 0.1356134862, 0.2242700011, -0.141586259, 0.193400085, 0.3185083568, 0.0770920366, -0.2284040749, -0.2921457589, 0.37315467, 0.4352722466, 0.7340176702, -0.2587644458, -0.350402981, -0.0941053182, 0.0685786679, 0.0049102744, 0.4181964397, 0.3318795562, -0.267455101, 0.0532441847, -0.3854347467, -0.4756150246, -0.513351202, 0.2596526444, -0.0437951572, -0.0062725972, -0.0868521929, 0.0650682598, 0.1307830811, 0.0529990941, 0.1102164313, -0.0586895272, 0.0596235543, 0.2255721837, -0.1393048018, 0.0642872453, -0.0231558308, -0.378189832, 0.0988891199, 0.2373105288, 0.1910164207, 0.0885314345, -0.297957927, 0.2700928152, 0.2438111305, -0.019225223, -0.0753265396, 0.0507074296, 0.3943022788, 0.1891428083, 0.2085786015, -0.194688797, -0.0591311529, -0.2078118622, -0.1013943031, 0.0001050091, 0.270966202, -0.0075751287, -0.2217638046, 0.1743745953, -0.2492109984, 0.0577882305, -0.030844776, 0.2868506014, -0.4215430319, 0.1188229471, 0.3688769937, 0.0901181623, -0.0124302786, -0.225528419, -0.0405955836, 0.0507173575, 0.1518692076, 0.1059543565, 0.2024207562, -0.0358265862, 0.3656518161, -0.0974894539, -0.0094230389, -0.1456916183, 0.3619758189, -0.0676196516, -0.3675275445, 0.4784256816, 0.3598555028, 0.0498910286, -0.0304136612, 0.0404358357, -0.0042620124, 0.1028192863, -0.5772801638, -0.4673506021, -0.1304806173, 0.0880936608, -0.1737633795, 0.0141782407, -0.3551726043, -0.0608474948, -0.2671114504, -0.279756099, -0.1031834111, 0.0695328191, -0.1675978005, -0.2041426748, 0.3580978513, 0.3052936792, -0.4322127998, -0.0583980866, -0.057355199, -0.2180732042, 0.0616178066, 0.0804651231, -0.2448320687, 0.2876026928, -0.183933273, 0.0781299248, 0.4764017463, -0.3475126624, -0.7220584154, 0.5315423608, -0.2805051804, -0.0655641556, 0.0445310473, 0.2094903886, 0.128846243, 0.25880602, 0.4079206288, 0.4810495675, 0.0635357574, -0.0915064961, 0.0023363126, -0.3649244308, 0.0945880413, 0.3108662665, 0.0989393443, 0.2225619256, 0.1619276404, -0.0530176349, 0.2041986436, 0.0445409976, 0.0700533837, 0.4481005967, -0.0124175223, 0.0885308236, -0.1026971415, -0.1130255982, -0.6764417291, 0.1161552891, 0.0002773045, -0.0813718736, -0.6097719669, -0.0802459717, -0.2205839157, -0.038936533, 0.0883241892, 0.2622841895, 0.0493858121, 0.0496017933, 0.1081952378, 0.1324220598, -0.1000127122, 0.4082686007, -0.31105721, 0.1138600558, -0.3475218415, 0.119877696, 0.1842235029, 0.1942978203, 0.1091843694, -0.1518643647, 0.0917046964, -0.0541607849, -0.1490965337, 0.4382845759, -0.2289567292, 0.4687088728, -0.0645765215, 0.3214546144, 0.0793488994, -0.0825938582, -0.0710099563, 0.0418953076, 0.10062702, -0.028056778, -0.2885228693, 0.3034877181, 0.1970915198, 0.2505657673, 0.0842368305, 0.2263908237, 0.2398905456, 0.0106030433, -0.1017639935, 0.3073263764, 0.1692443788, 0.1132229716, 0.2009828091, -0.1750229746, -0.5216662884, 0.126698643, 0.3750925064, -0.1219120622, 0.1262112111, 0.1015704423, -0.1663370728, -0.0890583768, 0.1078620702, 0.1592138708, 0.1848904788, -0.0357064344, -0.039111685, 0.1988345981, -0.0235855747, -0.2433004975, -0.0912043527, 0.0482787713, 0.2365596741, 0.0827148184, 0.0179685373, -0.0010182119, -0.016023064, -0.2249883264, 0.1684879214, 0.260335952, -0.2508514225, 0.2482614368, -0.2147571743, -0.1431509703, 0.1123685315, 0.2177844197, -0.2780339718, -0.196971491, -0.1126687899, 0.4512029588, -0.0530624241, -0.2184861451, -0.2282788008, 0.3127139509, 0.1134809777, -0.5957485437, -0.0996807292, -0.1528218091, -0.0897531882, 0.0087623158, 0.1686341614, 0.1447746456, 0.2064513862, -0.1780373305, 0.0105938781, -0.4024782479, 0.1097433865, 0.0560422763, 0.1726338416, 0.139885053, 0.1356798112, 0.6456849575, -0.109647505, 0.0676187351, 0.112869814, -0.0828176886, -0.1381506473, -0.0324001834, -0.1608321071, 0.1464508027, -0.0544036515, -0.5343642235, -0.428578347, -0.2995086312, 0.4056404233, -0.0244590491, 0.2796210647, 0.0601894595, 0.0293877982, 0.2110874206, 0.3687654138, 0.1299318522, -0.0944869742, -0.6934449077, 0.3646911979, -0.1951299906, -0.3631878495, 0.2532726824, 0.0645146146, 0.159446612, 0.4275203347, -0.6492445469, -0.1355829388, -0.0504808463, 0.2179582417, -0.281586349, -0.0338862129, 0.493915081, -0.2021098435, 0.070963569, -0.0619996302, -0.0312900692, 0.0147360573, 0.1017190963, 0.2120200992, 0.4684891403, 0.538823843, 0.1260889173, 0.6983603835, -0.1538119912, 0.0850010738, -0.022463046, -0.3815023303, 0.2022923678, 0.119059965, -0.122126542, -0.146251902, -0.0883390233, -0.1300348192, -0.2253789008, -0.0755706578, 0.126139164, -0.3344646394, -0.1559284925, -0.4494191408, -0.2811368704, 0.1039604023, -0.0513808392, 0.2389106005, 0.2231047302, 0.2089972496, -0.4047693312, -0.2367789298, -0.0049996832, 0.3802209198, 0.1709281951, 0.2029419988, -0.1041330695, -0.1379256845, -0.499595046, 0.4311986864, 0.0101297852, 0.4071520269, -0.2748413086, 0.1849475503, 0.0598674715, -0.0574486144, 0.4644340873, -0.3087021112, 0.3222224414, 0.0798896551, -0.0434510186, -0.2367431819, 0.0476069041, -0.1010695547, 0.3014732897, 0.4305859804, 0.4523825347, -0.1853970587, -0.1183360368, -0.0836560354, -0.0412401147, -0.2490081638, -0.0373987183, -0.1405756474, -0.5846742392, -0.2606700659, -0.1465644985, 0.0063716108, 0.3492480516, 0.099902302, 0.2069007903, -0.0585071668, 0.2324884832, -0.0146720782, 0.0018997096, -0.0240557976, 0.1483073831, -0.1793144345, 0.4764509499, 0.2076440901, 0.2092897892, 0.6061330438, 0.3182341158, -0.3097952902, 0.0760812759, 0.0074523864, 0.0707545206, 0.1588320583, -0.1001963913, -0.0475747734, 0.556096375, 0.1700888723, -0.2265904993, 0.2163726091, 0.2004491538, -0.0449657775, -0.2611286342, -0.588994503, 0.5028378963, 0.1020910367, -0.0888955519, 0.3096006215, -0.0867452025, -0.0259942617, -0.0179135185, -0.2588956058, 0.746345818, -0.0078483913, 0.1021857336, 0.2200819552, 0.1290267706, 0.7392463088, -0.8184086084, 0.426035732, 0.0502768196, -0.2318522632, -0.2800002992, -0.1687981486, 0.0427938625, 0.2465156764, 0.1353965104, 0.353770107, 0.0492915586, 0.139837563, 0.2809299827, 0.3276109993, -0.3123632669, -0.1970206201, -0.1295175254, 0.02760702, -0.2567068934, 0.5734648705, -0.1012450382, -0.3177194297, -0.0105633754, -0.2015152276, -0.2205118239, 0.2966546714, -0.3537477255, 0.182903707, -0.0251922738, 0.0123271467, -0.1197535172, 0.1188769042, 0.0307792146, 0.2270127684, -0.4064326584, 0.0962212458, -0.3807075918, -0.2729480863, 0.0600299574, 0.1930931062, 0.1431874931, -0.1488230973, -0.3436149657, 0.31033355, -0.209320724, -0.5062015653, 0.3441851437, -0.1510680765, -0.3313437402, 0.0829867274, -0.14149867, -0.1066783443, -0.0420581773, 0.0139352251, 0.0564836115, 0.0459988229, 0.0307924729, -0.0586121194, 0.1070294008, -0.1867022961, 0.0720014572, 0.6140074134, -0.0818192214, -0.1576107293, 0.4818258584, 0.1507882923, -0.0686288849, -0.1476230323, 0.0328449048, -0.0315196626, 0.1339664161, 0.0476740561, -0.0774001181, 0.4039570391, -0.3512093425, -0.0243557971, 0.1211345941, 0.0978175625, 0.0288177468, -0.8456358314, -0.2271313816, 0.2395490259, 0.0572061613, 0.0895520523, 0.2577367425, -0.0146430349, 0.1545115411, -0.1004174426, -0.198708728, 0.1689091027, -0.2931168675, -0.2407391667, 0.4437699616, 0.2284310758, 0.5434685349, -0.0682904273, -0.0336170048, -0.0724585876, -0.1338689029, -0.0819212347, -0.0315990672, 0.1933620721, 0.034347672, -0.1537768841, -0.0401890948, -0.5816943049, -0.2384196669, 0.2793465555, 0.2583548129, 0.1257845014, -0.0541531742, 0.0894366205, -0.3515667021, 0.4427088499, -0.4098798633, 0.200061217, 0.0118044205, 0.6186722517, -0.2902221382, 0.189917013, 0.0933984816, 0.0799571201, -0.3963114321, -0.1322664618, 0.0644160509, -0.1562736928, 0.4741697013, -0.3039165437, 0.263294071, -0.1518125236, 0.1123896614, 0.1734665036, -0.2352960557, 0.2265855372, 0.1939249337, 0.1053428948, -0.0775516033, -0.0710766166, 0.3126711547, 0.1430845261, 0.058297012, -0.0590569638, 0.081595473, -0.0269315168, -0.0752382129, -0.0132574048, 0.3911986947, -0.2190272957, 0.1376020163, 0.2432946563, -0.0124948546, 0.0229646862, -0.0299672019, 0.3261119425, 0.0983020514, 0.2900645435, -0.0794334337, -0.1628965437, 0.0581231005, 0.1574459821, -0.183163777, -0.5663151145, -0.2402624339, 0.1602427363, -0.3456601501, 0.0673189238, -0.3224355578, 0.1991877854, -0.205193758, 0.0599442236, -0.405063808, 0.2330882996, 0.0006373553, -0.0790739134, -0.4354064167, -0.21185866, 0.0559328496, 0.2156289965, 0.3409397006, -0.283557415, 0.0105215646, 0.0513612628, -0.0588662326, -0.0872231871, 0.0364541933, 0.1461376995, 0.0961384326, -0.2760258019, -0.0853726864, -0.157936886, -0.0975598842, 0.1521983147, 0.2372903675, 0.2586216033, 0.100576587, -0.0636843294, 0.3023331165, 0.0530359223, -0.1611153334, 0.0035623279, 0.0596505068, 0.4132118523, -0.4068722129, 0.2244319916, 0.1159291267, -0.0663938075, 0.4338054061, -0.0910514072, 0.4080497622, -0.1714949906, 0.196952492, -0.1435180455, -0.0548872575, -0.2223403752, -0.1979020238, -0.4185054004, -0.3149419129, 0.3104334772, 0.0740806311, 0.3062134683, -0.0984378681, 0.0051385313, -0.2273654342, 0.5094875693, 0.3295616806, 0.3142698407, -0.0078128558, -0.0333033614, -0.4118764997, -0.0295044575, -0.2248631865, -0.2211926877, 0.155286029, 0.2018477172, -0.1512493193, 0.1393016577, -0.1522101164, -0.0737687126, -0.209964335, 0.1152875647, -0.1031567082, -0.3068385422, -0.13240619, 0.1277770251, -0.0125602866, -0.3340643346, 0.0885634273, -0.2397805154, -0.0091693997, -0.1310244054, 0.217358768, -0.1317512244, 0.101334326, 0.4135286212, 0.0147083923, 0.4208114147, 0.0513823926, -0.1141483337, -0.2717924416, -0.123175472, -0.2075556517, 0.3100584745, 0.1311534941, 0.2213365287, -0.0996851251, -0.0406363569, -0.3142708838, 0.145071432, -0.1366642863, -0.0818041116, -0.1601700336, -0.1002271473, -0.3212532997, 0.2325600386, 0.0840069577, -0.0241559781, -0.0681619793, -0.0603405535, -0.2181844711, -0.0449175611, 0.3933364749, -0.4936445951, -0.1012934744, -0.0289599169, 0.1853542626, -0.0953272432, 0.1094550565, -0.2316055447, 0.2562435865, 0.3378904462, -0.1461079568, -0.1566696614, -0.0595971383, -0.1753624976, -0.0237310622, -0.0522245318, 0.3484821618, -0.0584434196, -0.3829174936, -0.2968150675, -0.2815039158 ]
https://github.com/huggingface/datasets/issues/647
Cannot download dataset_info.json
Right now the recommended way is to create the dataset on a server with internet connection and then to save it and copy the serialized dataset to the server without internet connection.
I am running my job on a cloud server where does not provide for connections from the standard compute nodes to outside resources. Hence, when I use `dataset.load_dataset()` to load data, I got an error like this: ``` ConnectionError: Couldn't reach https://storage.googleapis.com/huggingface-nlp/cache/datasets/text/default-53ee3045f07ba8ca/0.0.0/dataset_info.json ``` I tried to open this link manually, but I cannot access this file. How can I download this file and pass it through `dataset.load_dataset()` manually? Versions: Python version 3.7.3 PyTorch version 1.6.0 TensorFlow version 2.3.0 datasets version: 1.0.1
32
Cannot download dataset_info.json I am running my job on a cloud server where does not provide for connections from the standard compute nodes to outside resources. Hence, when I use `dataset.load_dataset()` to load data, I got an error like this: ``` ConnectionError: Couldn't reach https://storage.googleapis.com/huggingface-nlp/cache/datasets/text/default-53ee3045f07ba8ca/0.0.0/dataset_info.json ``` I tried to open this link manually, but I cannot access this file. How can I download this file and pass it through `dataset.load_dataset()` manually? Versions: Python version 3.7.3 PyTorch version 1.6.0 TensorFlow version 2.3.0 datasets version: 1.0.1 Right now the recommended way is to create the dataset on a server with internet connection and then to save it and copy the serialized dataset to the server without internet connection.
[ -0.2739142478, 0.0575308204, -0.0347834155, 0.1870901436, 0.0935545266, 0.1803250164, 0.0954203531, 0.2747620344, 0.082955271, 0.0868134648, 0.1172922254, 0.2410643399, 0.2068436891, 0.1971997619, 0.2280212194, -0.0897161886, -0.1748177707, 0.0688977838, 0.0379335023, 0.1446815133, -0.1514800936, 0.0732107908, 0.0222484823, 0.0637848452, -0.1027823091, -0.3270793557, 0.1324489713, 0.1972538084, -0.2260448039, -0.0828826129, 0.3538629711, 0.143566817, 0.0654657334, 0.1908267885, -0.0001164499, 0.2554251254, 0.2761068642, -0.1264929026, -0.3891866505, -0.5971480012, -0.2190194875, -0.3448016644, 0.1283261627, -0.3310894966, 0.0493181646, -0.0734004453, 0.359478116, -0.1955468059, 0.3597824872, 0.3856016397, 0.0774664208, 0.2254532874, 0.1947091371, 0.0195437968, -0.1284130067, -0.1219934821, 0.0888300985, 0.3027690947, 0.0329985395, 0.1223275065, 0.1463486105, 0.1968403459, -0.122589387, 0.2005217373, 0.3200191259, 0.0434266664, -0.2740689218, -0.3115538955, 0.375538677, 0.4086198807, 0.734675467, -0.3074286878, -0.3879797161, -0.0871094987, 0.0589406192, -0.0454807207, 0.4212038219, 0.3348723948, -0.2379803807, 0.137594372, -0.3929383755, -0.5090522766, -0.5490766764, 0.2441610545, -0.0238857809, -0.0689401925, -0.0839279145, 0.0655505806, 0.0700825825, 0.0319328681, 0.113157846, -0.1106232256, 0.1374397874, 0.2582968175, -0.0843181089, 0.0147208199, -0.0684520677, -0.4558705688, 0.0996308997, 0.1897503585, 0.180679813, 0.0876996741, -0.2284601629, 0.235582009, 0.1796383113, 0.004850436, -0.0918786004, 0.0451236516, 0.3965954781, 0.1481320113, 0.2023458928, -0.1901383996, -0.1607417464, -0.1193294525, -0.033857137, 0.0178024117, 0.2646451294, -0.0304429103, -0.2177006155, 0.2142812014, -0.2792240977, 0.0577115044, -0.0448975004, 0.3205521107, -0.451736629, 0.0873988718, 0.364179194, 0.0601882786, -0.0415943675, -0.1907899678, -0.032249853, 0.0793239623, 0.2298873365, 0.0989321023, 0.1862664819, -0.0769822299, 0.405151695, -0.1058286205, -0.0253471397, -0.1501200646, 0.3815005422, -0.0347793438, -0.3565563858, 0.4856555462, 0.4002936184, 0.0500051193, -0.0698555633, 0.0087389527, -0.0139075313, 0.1168024465, -0.5142011046, -0.4643810093, -0.1429091841, 0.0872386396, -0.203742221, 0.0277113933, -0.3442263007, -0.047754623, -0.1650041789, -0.2439989895, -0.1405539811, 0.0832345858, -0.1811585575, -0.2239718288, 0.4070425928, 0.260679841, -0.4162976146, -0.0523283668, 0.0091466652, -0.1822410226, 0.0957820639, 0.0717510432, -0.2450941354, 0.3522920907, -0.1390306503, 0.0617719404, 0.5221263766, -0.3030912876, -0.7184163332, 0.4686602354, -0.2963495553, -0.0514527075, 0.01490964, 0.1851375252, 0.1693568975, 0.1772420257, 0.3453247547, 0.5167126656, 0.0464098193, -0.0720025077, -0.0083474871, -0.3728986979, 0.1220352128, 0.259283632, 0.0820800439, 0.1653036624, 0.1632930636, 0.0451847129, 0.1699100137, 0.0009180023, 0.0579496063, 0.464712888, -0.0027851374, 0.1030352116, -0.1065412089, -0.0707987845, -0.7039725184, 0.1187507883, -0.0212402996, -0.1210233197, -0.6178974509, -0.1230689585, -0.1917590648, -0.0210739858, 0.0644881502, 0.2469472289, 0.0336725563, 0.0527776293, 0.1737811565, 0.1497740149, -0.0895221382, 0.4002640545, -0.2856491208, 0.1286259592, -0.4003407955, 0.1032397375, 0.1249526143, 0.1720951945, 0.1340135187, -0.1628951877, 0.1166373417, -0.1240880415, -0.1739652753, 0.4517517984, -0.2501600087, 0.510627985, -0.1213385835, 0.3544614017, 0.1358035356, -0.0870271102, -0.043914374, 0.038128648, 0.0842311382, 0.021850355, -0.3699806333, 0.3021431267, 0.1896649301, 0.1218511537, 0.1134382039, 0.2273875773, 0.3066496551, 0.0234624688, -0.1310730875, 0.2813236415, 0.1746363491, 0.1272788048, 0.2188441008, -0.1274065971, -0.501426816, 0.2014040649, 0.426148206, -0.1354449689, 0.1467633396, 0.1135953143, -0.1700539142, -0.1370068789, 0.0919981971, 0.1641851217, 0.1402626783, -0.0655516535, 0.0136209168, 0.1298472881, -0.0443725884, -0.229536593, -0.1062690094, 0.0263653044, 0.2623515725, 0.0965015069, 0.0491824374, 0.0334138237, 0.0066689597, -0.1386482269, 0.1981186122, 0.2735870779, -0.1948744953, 0.2650152147, -0.2267472297, -0.0929266661, 0.0412770957, 0.1424243599, -0.2560818791, -0.1625166386, -0.092506066, 0.4689163268, -0.057584431, -0.1909464747, -0.1897979826, 0.2515117526, 0.1366597116, -0.5261313319, -0.0057421303, -0.0959621444, -0.0684396029, -0.0185880139, 0.1396003067, 0.1354275048, 0.2400064468, -0.1796418726, 0.0289247446, -0.3744143844, 0.099728398, 0.0843669847, 0.1751836687, 0.1168125346, 0.0857618153, 0.6367666721, -0.1055241078, 0.0176781211, 0.0998933986, -0.0474893041, -0.1694598347, 0.0396547168, -0.1627121419, 0.0653251112, -0.0126700867, -0.5224086642, -0.509221375, -0.2645642459, 0.3670661449, -0.0126496116, 0.304117173, 0.1039892063, -0.0237411745, 0.19280155, 0.3947016299, 0.1460027099, -0.0952268615, -0.7382700443, 0.4059026539, -0.2604084611, -0.4382023215, 0.2343434095, 0.0621497035, 0.1385690719, 0.4293505847, -0.609054327, -0.1359506547, -0.039138183, 0.2375534475, -0.2261974066, -0.0720164403, 0.5114514232, -0.1925545633, 0.0823359117, -0.1040969566, 0.0212001055, 0.0836034343, 0.1290894896, 0.2441370487, 0.4184113443, 0.5404877067, 0.1681102216, 0.7009677887, -0.056369815, 0.0604444072, -0.0432020128, -0.3582236767, 0.1943772882, 0.1316644847, -0.1063026115, -0.1105110794, -0.1030636057, -0.1522715837, -0.1618838161, -0.0816999748, 0.135122329, -0.2991718352, -0.1520617604, -0.4132375121, -0.3150020242, 0.1286229789, -0.0678836629, 0.2963247895, 0.2067393064, 0.2157342434, -0.4287413061, -0.2588940859, 0.0063701342, 0.3762168288, 0.1784723848, 0.225402385, -0.1324312538, -0.1656572819, -0.6117650867, 0.3463321924, 0.0103154825, 0.4689974189, -0.2301759273, 0.1798459142, 0.0835050866, -0.0941342637, 0.4290555418, -0.2495357841, 0.310531199, 0.0183770638, -0.0356858596, -0.2880854607, 0.0349951945, -0.0521408208, 0.3610963523, 0.3792175949, 0.4429050982, -0.2210143805, -0.1045999676, -0.0795644596, -0.0167636741, -0.3497423232, -0.0143492846, -0.1387257576, -0.62857306, -0.282969147, -0.1870858073, -0.0445167236, 0.3387081921, 0.1342915446, 0.2128897756, -0.0565803871, 0.2776511908, -0.0254854932, 0.0109867333, -0.0339392573, 0.1958838105, -0.1098549366, 0.5311941504, 0.2137073278, 0.2450786531, 0.5885624886, 0.3323702216, -0.3327035606, 0.019971516, 0.0245344695, 0.0532648712, 0.1240947917, -0.133160606, -0.0789604858, 0.5337426662, 0.1537058055, -0.3034185469, 0.212707445, 0.1396432221, -0.0571991913, -0.2989490926, -0.5814876556, 0.478339076, 0.0775319636, -0.056698706, 0.2993632555, -0.2010769695, -0.0492857285, -0.0046018856, -0.1940876693, 0.716219306, -0.093138963, 0.1033358574, 0.2150271237, 0.1401150972, 0.6555054784, -0.7900180221, 0.3992991745, 0.0381453671, -0.2679976523, -0.2783518136, -0.1457651109, 0.0254390929, 0.1649258137, 0.0266110543, 0.3068060279, 0.0720438063, 0.1196132302, 0.2397856563, 0.4148024023, -0.2893676758, -0.2671438754, -0.1212489158, 0.0269073732, -0.2770169973, 0.5673683286, -0.0577684529, -0.3126715124, -0.0194542073, -0.1962101609, -0.196407035, 0.2838347852, -0.3512869179, 0.246033147, -0.0581763685, -0.0332473554, -0.1655847728, 0.1115575656, 0.0988960117, 0.2406302541, -0.3796508312, 0.0563733205, -0.3700043261, -0.2870517671, 0.0400020666, 0.1308579743, 0.181256935, -0.1244321689, -0.2355840206, 0.2666381299, -0.1747034341, -0.4450395107, 0.3805354536, -0.2422423363, -0.2784992158, 0.091851376, -0.1555112004, -0.1224188879, -0.0879326463, -0.0163861141, 0.050187204, 0.1084883064, -0.0505951047, -0.0403738767, 0.0692366138, -0.1534147561, 0.0809172317, 0.581664443, -0.0806179345, -0.1587273926, 0.5003038049, 0.1704467535, -0.0681157038, -0.1195202321, 0.1162561625, -0.0412761942, 0.146731481, 0.0195538253, -0.1293825656, 0.4212917387, -0.3932153285, 0.0289680958, 0.1204618588, 0.0393050909, -0.0330124162, -0.8135486841, -0.2863282263, 0.2287547141, 0.1580987722, 0.1293037236, 0.2596991658, 0.010022427, 0.1542130113, -0.0297788177, -0.1967710108, 0.1311983764, -0.320820719, -0.1879941374, 0.4375839829, 0.1676707715, 0.4972366989, -0.0736198202, -0.0389232785, -0.070986256, -0.1190065369, -0.0706461221, -0.0970106795, 0.1862730235, -0.0162252542, -0.1704064012, -0.0438649245, -0.5901020169, -0.2316230237, 0.2620548904, 0.2117797583, 0.1315575391, -0.0495784692, 0.0545420833, -0.3019165099, 0.3776361644, -0.393743217, 0.1543298364, 0.002225168, 0.6276220679, -0.2808519304, 0.2070871145, 0.050036028, 0.0412116162, -0.4263060391, -0.1283072382, 0.0890375152, -0.1582610458, 0.4299827814, -0.2920496762, 0.2547512054, -0.1186932549, 0.104203932, 0.1905023903, -0.2503336966, 0.2916420996, 0.233757481, 0.0911971629, -0.0436655842, -0.0714255646, 0.2956950366, 0.0096983779, 0.0150978575, -0.0356243365, 0.0838100836, 0.0553011484, -0.1473535448, -0.0251034573, 0.4249931872, -0.1997364014, 0.1090441495, 0.2411954552, -0.0350362547, 0.0313415788, -0.0165633373, 0.3380120695, 0.1041948423, 0.2461734861, -0.0894295648, -0.1074878946, 0.1684740931, 0.1592970192, -0.1315554827, -0.5190199018, -0.285969615, 0.0930763409, -0.3006416559, 0.1135273129, -0.2937908769, 0.17156367, -0.2090359628, -0.0076377504, -0.3982141018, 0.2975949943, 0.0084657045, -0.1158960909, -0.4368098378, -0.1715789139, 0.0607247017, 0.2427889556, 0.3312903345, -0.3223012686, -0.0130050452, 0.0944709405, -0.048620943, -0.0815675557, 0.0354833007, 0.1492994577, 0.0825721323, -0.2803864777, 0.0063786218, -0.1056703255, -0.1089556962, 0.0429221615, 0.2040768862, 0.2475278676, 0.0892021433, -0.0607505813, 0.3859771192, 0.0831937715, -0.1735336035, 0.0214275997, 0.0603294894, 0.3365600407, -0.3860045671, 0.2362741381, 0.0912704393, -0.0563465208, 0.3863759339, -0.0467828959, 0.3695308268, -0.1001308709, 0.2297028154, -0.0592052452, -0.0601840615, -0.193204388, -0.1512306333, -0.4297842383, -0.2587771714, 0.3552365899, 0.0758622438, 0.3142482936, -0.0911458805, 0.0132113816, -0.2163450867, 0.5425177217, 0.3017627001, 0.3233074546, -0.0104512414, -0.0313141756, -0.4100428522, -0.0654307753, -0.2089729458, -0.2313198, 0.1802463233, 0.2493040413, -0.1689022481, 0.1777104288, -0.1527424902, -0.0287994705, -0.1564902663, 0.1588185132, -0.0730372891, -0.2842101157, -0.0704199895, 0.1299329996, -0.0345266499, -0.3565249741, 0.1670374572, -0.2185204178, -0.0108182998, -0.1399710625, 0.2111244798, -0.1460440457, 0.0307212323, 0.4213564396, 0.0243800897, 0.3493376374, 0.0227134526, -0.1319887042, -0.213693127, -0.0371699631, -0.2274542302, 0.3000166416, 0.1238163933, 0.2504257262, -0.1134875715, -0.0519047454, -0.3240871727, 0.0799017623, -0.1384276599, -0.1868674457, -0.164100796, -0.1094834581, -0.3572939932, 0.2280036509, 0.1295658499, 0.0464156829, -0.0875976533, -0.0353562534, -0.2175741643, -0.0534103364, 0.41175583, -0.5382969379, -0.0688975677, -0.0045621567, 0.1256930828, -0.1282255054, 0.1439087391, -0.2383607477, 0.3045871854, 0.3289352655, -0.2071261406, -0.181385234, -0.0144906091, -0.1164343432, -0.0206497628, -0.0535507165, 0.404812932, -0.076815702, -0.3848384917, -0.32075122, -0.260137409 ]
https://github.com/huggingface/datasets/issues/647
Cannot download dataset_info.json
#652 should allow you to load text/json/csv/pandas datasets without an internet connection **IF** you've the dataset script locally. Example: If you have `datasets/text/text.py` locally, then you can do `load_dataset("./datasets/text", data_files=...)`
I am running my job on a cloud server where does not provide for connections from the standard compute nodes to outside resources. Hence, when I use `dataset.load_dataset()` to load data, I got an error like this: ``` ConnectionError: Couldn't reach https://storage.googleapis.com/huggingface-nlp/cache/datasets/text/default-53ee3045f07ba8ca/0.0.0/dataset_info.json ``` I tried to open this link manually, but I cannot access this file. How can I download this file and pass it through `dataset.load_dataset()` manually? Versions: Python version 3.7.3 PyTorch version 1.6.0 TensorFlow version 2.3.0 datasets version: 1.0.1
30
Cannot download dataset_info.json I am running my job on a cloud server where does not provide for connections from the standard compute nodes to outside resources. Hence, when I use `dataset.load_dataset()` to load data, I got an error like this: ``` ConnectionError: Couldn't reach https://storage.googleapis.com/huggingface-nlp/cache/datasets/text/default-53ee3045f07ba8ca/0.0.0/dataset_info.json ``` I tried to open this link manually, but I cannot access this file. How can I download this file and pass it through `dataset.load_dataset()` manually? Versions: Python version 3.7.3 PyTorch version 1.6.0 TensorFlow version 2.3.0 datasets version: 1.0.1 #652 should allow you to load text/json/csv/pandas datasets without an internet connection **IF** you've the dataset script locally. Example: If you have `datasets/text/text.py` locally, then you can do `load_dataset("./datasets/text", data_files=...)`
[ -0.2791209221, 0.0578072928, -0.0465702079, 0.1835988164, 0.1229125708, 0.1868668795, 0.1547662616, 0.2711951435, 0.2081409097, 0.0419170409, 0.048986014, 0.2596796453, 0.282695502, 0.1925578862, 0.1847233921, -0.0445271693, -0.2054240704, 0.0323138088, 0.024126254, 0.176589638, -0.2130241394, 0.0461443886, -0.0344450846, 0.1338434666, -0.1162247211, -0.3269085586, 0.160654828, 0.2022771537, -0.1810082197, -0.0399473272, 0.4320088029, 0.1607672721, 0.0582314543, 0.1993093789, -0.0001162807, 0.2081349343, 0.3396977782, -0.05234465, -0.3972236812, -0.6450169683, -0.250235945, -0.2693963945, 0.1729401946, -0.3017247915, 0.0687520131, -0.1249874607, 0.3304026127, -0.265976727, 0.2997104526, 0.380861938, 0.0811683461, 0.1861017495, 0.1585742682, -0.004569184, -0.1447034031, -0.1378960907, 0.1531007886, 0.2840476632, 0.0423735194, -0.0152339414, 0.1086688638, 0.2042809576, -0.177322492, 0.2587243617, 0.3738179803, 0.1103392318, -0.2407455444, -0.2773668468, 0.400968492, 0.4214970469, 0.7367278337, -0.3251824975, -0.3985492587, -0.1495106667, 0.029951375, -0.0038790589, 0.3894180954, 0.314329803, -0.2539663315, 0.0717124939, -0.3475771844, -0.4419794083, -0.5005509257, 0.2443237752, -0.0905221477, -0.0712039992, -0.0764269084, 0.0694528371, 0.1398930997, 0.0175052062, 0.208991617, -0.075041309, 0.1016554236, 0.2641216218, -0.1614484191, 0.068015635, 0.0132726263, -0.4202746153, 0.079999119, 0.1321249008, 0.1859794408, 0.1021030545, -0.324042052, 0.2630484104, 0.2888854146, 0.0031039335, -0.0972453505, 0.0537397377, 0.411030829, 0.2029901743, 0.2062123567, -0.1693378389, -0.1028852537, -0.2158844471, -0.0904718786, -0.0342142321, 0.282025367, -0.0254259761, -0.2750399411, 0.1628291905, -0.2433770597, 0.0810469911, 0.0057739136, 0.3083934486, -0.4633271992, 0.1482779533, 0.3730780184, 0.0677468702, 0.001143739, -0.1491360366, -0.0526333116, 0.13200064, 0.1611261219, 0.0686710775, 0.1769049913, -0.0410545617, 0.3526958525, -0.1015114337, -0.0355792828, -0.1430632323, 0.3078432679, -0.0415492095, -0.3538812101, 0.47359249, 0.3906004429, 0.0865465924, -0.0025993316, -0.0301781576, -0.022992624, 0.0905554071, -0.504989624, -0.4248256385, -0.1023375764, 0.0907279104, -0.1651342511, 0.0188840833, -0.379502207, -0.0540540665, -0.2387857735, -0.2132171988, -0.1138014793, 0.0657530203, -0.1576316655, -0.1937028766, 0.3814213574, 0.342697382, -0.4553877115, -0.0428900756, -0.0256772004, -0.1867497265, 0.0314612091, 0.1171086729, -0.2610654831, 0.3278618455, -0.1416548342, -0.0006122288, 0.4650779963, -0.3743422031, -0.6786805391, 0.5116193295, -0.2511110902, -0.03737811, 0.0120723695, 0.1940939575, 0.0640430525, 0.2246437818, 0.4172990322, 0.5540280938, 0.0352412984, -0.0761470348, 0.0335002467, -0.3742311597, 0.1206461415, 0.3107516766, 0.1238315105, 0.1601825207, 0.1756914854, -0.0048197429, 0.1874802411, 0.0122597385, 0.0361299142, 0.4173101187, -0.047865212, 0.1298309565, -0.0888287798, -0.0869748741, -0.6877629161, 0.1259183884, 0.0302224513, -0.1560216099, -0.6504184008, -0.1148978397, -0.2287499905, -0.0189218279, 0.0801192448, 0.2297029197, 0.0302911438, 0.0678147525, 0.1056918502, 0.1507731676, -0.112746574, 0.463406831, -0.2621696293, 0.1545109749, -0.3642699718, 0.0545702726, 0.1842841059, 0.2045583576, 0.137039721, -0.1432600021, 0.0727347657, -0.0753010511, -0.1526920646, 0.4997182786, -0.2178864926, 0.4904350638, -0.090886496, 0.316501081, 0.1006955951, -0.0196568873, -0.0989884883, 0.0419107787, 0.1325565577, 0.004910876, -0.3661687076, 0.3218407631, 0.1772815883, 0.2363185585, 0.1218027025, 0.2513241768, 0.2710550129, 0.0193476938, -0.0697236583, 0.283426851, 0.1404716372, 0.0977992788, 0.2253126651, -0.1177347526, -0.5117952824, 0.1311009228, 0.345379144, -0.1234254837, 0.1201109514, 0.1088845283, -0.1616202146, -0.1135594174, 0.0792018771, 0.1813411415, 0.1146395504, -0.0515867546, -0.0541439503, 0.1559967995, -0.0488836356, -0.2223094255, -0.1094931364, 0.0705572069, 0.1992181987, 0.0120597826, 0.0031578108, 0.0231654514, 0.0083961403, -0.1761658639, 0.1933675706, 0.2756210864, -0.2250333279, 0.2806058824, -0.2429245114, -0.1875537038, 0.1272241473, 0.1716043353, -0.2033438385, -0.1666339934, -0.1529945433, 0.4840416014, -0.0454377793, -0.1549714506, -0.1914565265, 0.2822308838, 0.1641653627, -0.567543745, -0.0469841398, -0.155535832, -0.0562374294, 0.0154019669, 0.2038508505, 0.1700976193, 0.216990754, -0.1641972363, 0.0632856861, -0.4364121258, 0.1209369749, 0.0438388288, 0.132240966, 0.1461336911, 0.1247556582, 0.6109939218, -0.1397797316, 0.0299062897, 0.0867851302, -0.0766617805, -0.0999120772, -0.0275356639, -0.1574815363, 0.0970093608, -0.0283454936, -0.5136215091, -0.4184243083, -0.3151579201, 0.4051456451, 0.0110965492, 0.2497460693, 0.1429152042, 0.0136673357, 0.2127900422, 0.3999162018, 0.1146336347, -0.0925630331, -0.6567989588, 0.4005849957, -0.2118275762, -0.3886093199, 0.1795177162, 0.0410545841, 0.1734780967, 0.3741798699, -0.602979362, -0.1492183656, -0.0957723632, 0.2385058701, -0.2502657473, -0.058799386, 0.4799560308, -0.2010465264, 0.0503727458, -0.0519972108, -0.0412349477, 0.0203935336, 0.1076032668, 0.2154724896, 0.4581020474, 0.5635312796, 0.1050902158, 0.6342534423, -0.187180981, 0.0657901913, -0.0232314691, -0.395752728, 0.2789324522, 0.1227038354, -0.1484975219, -0.2132077813, -0.086514473, -0.1262930334, -0.1791208982, -0.0912337378, 0.1277411729, -0.3572419882, -0.1581608802, -0.4311300218, -0.2972109318, 0.0731827691, -0.108588405, 0.1910109967, 0.2258857042, 0.2070738524, -0.3853978515, -0.2513486445, 0.0082504461, 0.3692329228, 0.1811158955, 0.1868810207, -0.0452398099, -0.1204558238, -0.5152067542, 0.3726809323, -0.0426246747, 0.4191332161, -0.1932644546, 0.1551177502, 0.0765386298, -0.0632439479, 0.4792940915, -0.244397372, 0.3249922097, 0.0773286596, -0.0583409593, -0.3281808197, 0.0437760279, -0.099617742, 0.3088564575, 0.3605071604, 0.4001764655, -0.1641090214, -0.1108550355, -0.0523647964, -0.0363096036, -0.2664947808, -0.0389657877, -0.1516126394, -0.605322957, -0.2809655368, -0.177987203, 0.0015703519, 0.3210446239, 0.1302583367, 0.216848731, -0.0666726157, 0.202984482, 0.0007948856, 0.0263554975, -0.0381246954, 0.2138101459, -0.1303321421, 0.4847904742, 0.1835351139, 0.2229399085, 0.5773662925, 0.3251748681, -0.3378045261, 0.0231074765, 0.0153536005, 0.0541644134, 0.109783262, -0.148304224, -0.0399408527, 0.5120702386, 0.1543314904, -0.2161360979, 0.2679843009, 0.1858836263, -0.0193495862, -0.2554168999, -0.6606374979, 0.5072336793, 0.0906061828, -0.1004103571, 0.3094779551, -0.1373146921, -0.023788996, -0.0360243842, -0.2209877968, 0.6713665128, -0.1245178208, 0.1313058585, 0.2163772583, 0.1202806234, 0.7099762559, -0.7732666135, 0.367652148, 0.0492251143, -0.2292074412, -0.2622096241, -0.1553096771, 0.0091337329, 0.1447041929, 0.140329659, 0.3702158928, 0.0631039515, 0.1699430197, 0.3019889295, 0.3609044254, -0.3123668134, -0.2391068041, -0.1296969801, 0.0286570452, -0.2375219017, 0.5534264445, -0.0718666762, -0.2736501694, -0.0073236329, -0.2225478142, -0.1852610558, 0.2623910606, -0.3086828887, 0.2724312544, -0.0676859692, -0.0077403905, -0.1633069962, 0.1958072633, 0.060803514, 0.2248882353, -0.3993470073, 0.0888334885, -0.3730615377, -0.2940769494, 0.013119923, 0.1559786052, 0.2039616853, -0.0827014893, -0.2740247548, 0.3077614903, -0.1745191365, -0.470313102, 0.3294251859, -0.1210384592, -0.2856193781, 0.1029755101, -0.1716604084, -0.1696083099, -0.0616298877, 0.0056704418, 0.055274602, 0.0283128005, 0.0480153337, -0.0401019007, 0.0483589843, -0.2244565189, 0.0567753762, 0.6204462647, -0.113300778, -0.1472986639, 0.4869608581, 0.2025522143, -0.0932650343, -0.1289632022, 0.0157458112, 0.0206468832, 0.1816702187, 0.0618591793, -0.097029008, 0.4065273404, -0.3604157269, -0.029637754, 0.1149357334, 0.0493561029, -0.0129001224, -0.8330098987, -0.2787038386, 0.2436225712, 0.0842237398, 0.1087343618, 0.2688505948, -0.0022196341, 0.1604646742, -0.0900823697, -0.1942878664, 0.1731632948, -0.2985099256, -0.220215112, 0.4320729375, 0.223466143, 0.5248357654, -0.0811827704, -0.0177935585, -0.0946032107, -0.0888052359, -0.0914296433, -0.0799657926, 0.1858024746, 0.0011574066, -0.1877689213, -0.0108700152, -0.6070567966, -0.2640087903, 0.2268238962, 0.271720618, 0.1981512755, -0.0349513404, 0.0191734619, -0.3432271481, 0.4107034206, -0.3544178903, 0.1874037236, -0.0310114399, 0.5695281625, -0.2640038431, 0.1736275405, 0.0520729125, 0.0772722512, -0.3644010127, -0.1432741135, 0.0622181334, -0.1929645389, 0.4270819426, -0.2802505493, 0.2403900176, -0.1060443968, 0.1559552848, 0.213809669, -0.252376169, 0.2427346408, 0.2068295032, 0.0972651318, -0.0943277776, -0.0249109305, 0.215867728, 0.039022848, 0.0503950976, -0.0125889247, 0.0665477142, -0.0099796774, -0.1072607785, -0.0145940892, 0.4498601854, -0.185998857, 0.1092174798, 0.3178956509, -0.0188897569, -0.0018889682, 0.0333694592, 0.3920707703, 0.1267468184, 0.2934995592, -0.0956422314, -0.2091742158, 0.0239958875, 0.2001221627, -0.1951173842, -0.5417725444, -0.2135816962, 0.1336315572, -0.3624089658, 0.033880502, -0.3084081113, 0.1986404061, -0.2256320417, 0.0916829109, -0.3848975897, 0.2415829301, 0.0161777306, -0.1153538451, -0.3337487876, -0.2156985998, 0.053856425, 0.2196044773, 0.360496223, -0.3386314809, -0.0658824444, 0.0333777256, -0.0416159108, -0.1041029543, 0.0878843144, 0.1423381418, 0.0879148915, -0.2790154815, -0.0923999175, -0.1470279247, -0.0800862461, 0.1165983602, 0.2271207869, 0.2707595527, 0.1289185286, -0.0918841437, 0.3254324496, 0.0407519192, -0.1868710965, 0.042927999, 0.0326360762, 0.3506327569, -0.3650425971, 0.2370020151, 0.1269572824, -0.0832223669, 0.4458379149, -0.0731198043, 0.4121448994, -0.1663269103, 0.1976700872, -0.06922324, -0.035448838, -0.208285585, -0.1467548162, -0.4075518847, -0.3283406794, 0.3176429272, 0.06354063, 0.3068358004, -0.0944894925, 0.0135338195, -0.1860035956, 0.5233607292, 0.3315806687, 0.3229911923, 0.0180410892, 0.0121836551, -0.4556887448, -0.0568073168, -0.226843521, -0.2344715446, 0.1527449936, 0.1690330803, -0.1858550161, 0.1104454994, -0.1380705982, -0.0008361368, -0.2150800228, 0.07052356, -0.0605569668, -0.3487338126, -0.1644015014, 0.1297162026, -0.02518088, -0.3342962265, 0.0895448923, -0.2687938213, -0.0057373685, -0.1350551248, 0.2368744463, -0.1141498908, 0.0302371494, 0.3860866725, -0.0399920866, 0.3857759535, 0.065651238, -0.0871567503, -0.2826166749, -0.1070458964, -0.2059085965, 0.3248493075, 0.1207989454, 0.2053454518, -0.1192816198, -0.1100054458, -0.3097413182, 0.1902946234, -0.1096411794, -0.1507735997, -0.1237106398, -0.099407725, -0.307834655, 0.2365944237, 0.0698108748, -0.0148072364, -0.0909003839, 0.0097413026, -0.1888251603, -0.0998867452, 0.4315689802, -0.4962153733, -0.1133599356, -0.0368741825, 0.1417092979, -0.1003404111, 0.1042069271, -0.2002297342, 0.3202194273, 0.3165216148, -0.1479850709, -0.1897579879, -0.0562838465, -0.1773484647, 0.0039490997, -0.0703321174, 0.3125735819, -0.059360981, -0.3655907214, -0.3102484047, -0.2552458048 ]
https://github.com/huggingface/datasets/issues/643
Caching processed dataset at wrong folder
Thanks for reporting ! It uses a temporary file to write the data. However it looks like the temporary file is not placed in the right directory during the processing
Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ```
30
Caching processed dataset at wrong folder Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ``` Thanks for reporting ! It uses a temporary file to write the data. However it looks like the temporary file is not placed in the right directory during the processing
[ -0.0562821813, 0.1755033135, -0.0487306379, 0.3908854425, -0.0356468223, -0.0572806224, 0.2760778069, -0.0244469363, 0.0408121645, 0.1573937237, 0.0506477766, 0.1766867787, 0.0519223511, 0.3638363779, -0.03565754, 0.3218174875, 0.2768937349, -0.0544237867, 0.0543462075, -0.043526981, -0.307221204, 0.376565814, -0.200190559, -0.0186389871, -0.5099136829, -0.1708421111, -0.2043419182, -0.0366440378, 0.0198707543, 0.2087091357, 0.1927694678, 0.0984717607, 0.1747972667, 0.6240897775, -0.0001294347, -0.1149766445, 0.2048154473, -0.2666312158, -0.1961361617, -0.1022197977, -0.3119006157, -0.0044887676, -0.1497936696, -0.0720396936, -0.1685162187, 0.0581679493, 0.3384490609, -0.5294010639, -0.0324839652, 0.1970878839, 0.0550545417, -0.4087738693, -0.4787143171, 0.3768618405, 0.1074029058, 0.2737840414, -0.1276574135, 0.2617734075, 0.0274086744, -0.1451184005, 0.0063618761, 0.2977353632, 0.000732097, -0.0749410316, 0.2810916007, 0.3585240245, -0.2941531837, -0.3332057595, 0.5126187205, -0.4663318694, 0.398663342, -0.3778884709, -0.2051139623, -0.2074550241, -0.3296647072, -0.2811294198, 0.5710796714, 0.172390312, -0.0678305179, 0.0381802134, -0.3426436782, -0.2352156937, 0.0801222101, 0.1073579043, -0.1712420136, 0.258448571, -0.2692752481, 0.0078241322, -0.0813754648, 0.2511204481, 0.6566112041, -0.3971767426, -0.0177654997, 0.3113217652, -0.0171629079, 0.0418485068, -0.2528597116, 0.5198612809, -0.2589481175, -0.194189325, -0.1401863098, -0.1371274292, -0.1453164518, 0.1114480346, -0.0100336624, 0.3893759549, 0.0142912902, 0.1784573048, 0.1091899052, 0.0854989514, -0.4649643898, -0.102423422, -0.1018914282, -0.280589968, 0.0215529576, 0.1529059261, -0.0357462466, -0.242292285, -0.1104082689, -0.0570121072, -0.3516083658, 0.0353409871, 0.0664605275, 0.285449177, 0.0223695301, -0.1636578143, -0.2073558867, 0.2409925759, -0.1883876324, 0.3741030693, -0.0681624934, 0.0487460233, -0.321357429, 0.4333800077, 0.0406436361, -0.2225215584, 0.1916906536, 0.0157996565, -0.0768359527, -0.3220773637, -0.0095079252, -0.4610793591, 0.3809149265, 0.2202899903, 0.1426359713, 0.4319465458, 0.0019606219, -0.2612245083, -0.125350073, 0.2638801932, -0.5655603409, -0.2583986819, 0.2529351115, -0.0420589186, -0.2712311745, -0.0508866385, -0.6118242145, 0.0973582491, 0.4751485884, -0.249696359, 0.0291340221, -0.0071693044, -0.5547559857, -0.2493054718, 0.084140569, 0.2138255239, -0.3784086704, 0.2292412966, -0.2632397711, 0.4557929039, 0.4782081842, 0.4059207737, 0.0980357155, 0.3541256487, -0.4703490734, -0.018397823, 0.1202928051, -0.3309089541, -0.7670696378, 0.2393061221, -0.0553215779, 0.0022585527, 0.0424811319, 0.0430200659, 0.1667086333, -0.1728423834, 0.1321417093, 0.1466970593, 0.1153551117, 0.2249989063, -0.2722535431, -0.1135416627, -0.0317635722, -0.140868187, 0.014797831, 0.1906703264, 0.0313851349, -0.3111225963, 0.1627006382, -0.0954518765, 0.1095284671, 0.2840325534, 0.1987293363, -0.1217927039, -0.0088151908, 0.219526127, -0.1978285164, 0.0785654932, -0.043593064, -0.1874963194, -0.4925785065, -0.1061091796, -0.0936828479, -0.1442345083, -0.1505866051, -0.2586652339, -0.0705620721, 0.3078177571, 0.1895608157, 0.0718138292, -0.0172848664, 0.5587957501, 0.0425691791, -0.1547440588, -0.0659864023, 0.2057197243, -0.1104198247, -0.2670923471, -0.1782829463, -0.1684378237, 0.2095977813, -0.2671535015, -0.1758680344, 0.1820198148, 0.2802889049, 0.45504421, 0.0352443382, 0.2760799527, 0.1084621996, 0.1304477006, 0.2053912431, -0.092435807, 0.0293363985, 0.1651973128, -0.0806707442, 0.365188539, -0.1599464118, 0.0635769442, -0.0642153621, -0.3164080381, -0.0544160679, 0.1412292868, 0.2415258735, -0.1335028261, 0.1456724703, 0.4068558812, 0.3810800612, 0.170389235, 0.1708753258, 0.3384851217, 0.5877078176, 0.0830793381, -0.0072803032, 0.0868360922, -0.1417500228, -0.2576187849, 0.2089812905, 0.4739125073, 0.4611822665, -0.1000750065, 0.2996845543, 0.1259819716, 0.0905265212, -0.1617135853, 0.2070005387, 0.0486470312, 0.1792274117, -0.0102857724, 0.2194527686, -0.0296279844, -0.041148819, 0.2106042951, 0.0995522887, 0.2070691288, -0.0999974906, 0.5765222907, -0.1749670655, -0.2962673903, -0.2514064312, -0.2246742249, 0.1264941543, -0.1912496686, -0.0676637739, 0.2575971782, -0.0080909021, -0.004708753, 0.301882416, 0.1664896607, -0.0958431959, -0.5050302744, -0.1803772151, 0.1535262913, -0.200500682, -0.1138210669, 0.3516035974, -0.0197491366, 0.0268059708, -0.2237727791, 0.0200728327, -0.3809754848, -0.0776561424, 0.2111566514, -0.1135220677, 0.2927726209, -0.2416089326, 0.0524748936, -0.3985489309, -0.2574802637, -0.1008351296, -0.0618555024, -0.0682771429, -0.4157518744, -0.0122675989, -0.0417398401, -0.1293983608, 0.0482097417, -0.2307545394, -0.0240255054, 0.0910840854, -0.0031614834, 0.3184534907, -0.0141434139, -0.0393553339, -0.2473148555, 0.3702617884, -0.3497523069, -0.3336967826, -0.6516954899, 0.2838871777, -0.1492913961, -0.0440368615, -0.0416812599, -0.0779947042, 0.0555622615, 0.4272269309, -0.4290872812, -0.320713222, -0.1345353127, -0.0098095769, 0.2001429498, -0.081565313, 0.3003766835, -0.0045483941, 0.2103825808, -0.0307015982, -0.3322173059, 0.042831976, 0.3315357864, 0.3256827593, -0.0178600494, 0.1884341389, 0.006295939, 0.6751115322, 0.2125790566, 0.0176496599, 0.3855676353, -0.0628993139, 0.2614317834, -0.2494226992, -0.0922999531, 0.2275806516, 0.0313537307, -0.661051929, 0.3991058767, 0.0960738584, -0.4041826129, 0.1855946332, -0.2265985459, -0.3275678158, -0.2346797138, 0.2420726269, 0.0593659841, 0.2746415138, 0.0666518062, 0.1323848367, -0.267331928, -0.267229259, 0.060285382, 0.1197601333, 0.2946382761, 0.1816903055, 0.3472680748, -0.5023313165, -0.3641363084, 0.3330275714, 0.3905139565, 0.1117807478, -0.0613580234, 0.3069004118, 0.1638712287, -0.1416216046, 0.6055471301, -0.3414016366, -0.1618321687, -0.1456077397, 0.0838120431, -0.0051112492, 0.0111393733, 0.0911114886, 0.4281991124, 0.0128002316, 0.5021355748, 0.3324738443, 0.006174989, -0.1754250526, 0.235671252, -0.3256071508, -0.0917088911, -0.2625864148, -0.5155373216, -0.2017365992, -0.0243564993, 0.1427341402, -0.0709050074, 0.1209730133, 0.0633415207, 0.1503103375, -0.0181344431, 0.0420120098, 0.14891164, 0.418238163, 0.1263737679, -0.1437667608, 0.1408949196, 0.1409350932, 0.3221429288, 0.5147651434, 0.1704255193, 0.2171601802, 0.2110311538, -0.2364504039, 0.3073486388, 0.4408435822, -0.1777643561, -0.1690576077, -0.1695640981, -0.0828565806, -0.3682964742, 0.3819871545, 0.1639522165, 0.350155443, -0.3786005974, -0.4777137041, 0.4054704607, 0.1832027435, -0.2680816054, 0.3681356311, -0.0032617045, -0.5314047933, 0.4476587474, 0.1192125529, 1.0677211285, -0.0280556288, 0.2187955678, 0.024861671, 0.0335932076, 0.0263977703, -0.4069087505, 0.257833451, -0.2166917324, -0.6217987537, -0.1070585474, -0.2104317546, -0.1467544585, 0.0568302013, -0.2196529359, 0.450304389, 0.0789024085, -0.0052418089, -0.0949504897, -0.1046711057, -0.1614502519, -0.1285874844, -0.1570949107, 0.0151918, 0.0346294865, 0.4675065577, -0.1815327853, 0.1736758798, -0.2376920879, 0.087309815, -0.1408265978, -0.0248802174, -0.5036339164, -0.0072962889, -0.3956757784, -0.2783014774, -0.1324392557, 0.3288991153, 0.5609944463, 0.2409274578, 0.0507683419, -0.0050177332, 0.1346103549, 0.2099208683, -0.0000259323, -0.4559620619, 0.0346979238, 0.0874913037, 0.1809629649, -0.3113734424, 0.0901879445, -0.2999634445, -0.0884052515, 0.0175643098, -0.0760427788, 0.0428938493, -0.2532402575, 0.0199300908, -0.1287474334, 0.0843429714, 0.0125714391, 0.0075315447, 0.2728302479, 0.4122649431, -0.5614525676, -0.3694351315, -0.2027307749, 0.1790425926, 0.2824056745, 0.0935891494, 0.5242558122, -0.24576509, -0.1774655133, 0.0112959621, 0.0560790151, -0.3277439177, 0.2327899039, 0.1281799674, -0.4396620989, -0.1521255672, -0.1758616269, 0.0732951388, 0.2788393795, -0.0159511119, -0.4446372688, -0.3718072772, -0.4002513587, 0.0330338813, 0.0493193083, 0.0435314029, 0.0281927809, 0.2562392354, 0.1701103896, -0.2793207169, -0.1557125598, 0.1606870741, -0.0612230785, 0.1131735742, 0.0303947292, 0.0429071337, 0.4526514113, -0.1833743751, -0.1235073656, 0.1809013784, 0.0278480314, -0.0776690617, -0.0461228006, 0.1795365363, 0.167163834, -0.0533493012, -0.0240507443, -0.2914882898, 0.1014395431, -0.4307424128, 0.2056397349, 0.2780202329, 0.1040159017, -0.1492013931, 0.142413497, 0.001286611, -0.0319463424, -0.0352664292, -0.128603071, 0.3755894899, 0.1459939033, 0.2723154426, 0.1754766703, 0.0813813061, -0.0299716201, -0.0383946523, 0.1442058235, 0.3954286873, 0.1295500845, -0.2500986457, 0.0136539033, -0.0697724149, 0.0310942978, 0.1242491007, -0.1378896981, -0.3759161234, 0.3196122944, -0.0090326453, 0.1303751618, -0.0355185345, 0.0503745601, -0.1860331148, -0.041829817, 0.5113438964, 0.250444293, 0.1900663823, -0.0409481041, 0.0315544009, 0.4879703224, -0.2109055817, 0.0090665808, -0.2042762637, 0.033489462, 0.5536414385, 0.3623779118, 0.0902799591, -0.071824722, 0.5481163263, 0.1639935672, 0.1840909421, 0.4036704004, -0.0341612101, -0.0197870135, -0.1628611684, -0.0979244858, 0.2346388698, -0.1800172329, 0.3569229841, 0.220754683, 0.0212629847, -0.4289578199, -0.018519368, -0.2301100045, 0.2464828491, -0.1843436062, -0.2571742237, 0.2252784222, -0.1393987834, 0.1097766906, 0.3992194533, -0.1051694304, -0.0902861953, 0.0895916596, 0.1580914408, -0.1947741956, 0.3890992105, 0.0247047413, 0.1284039915, 0.2157681584, -0.0189616084, 0.69126302, -0.4017899036, 0.1211556345, -0.0657230988, 0.1271679699, 0.2669977248, 0.3885890245, -0.3067554533, -0.1319034249, 0.1379082948, 0.0722924694, -0.0580659993, 0.2541579604, -0.0454964526, 0.0189013239, 0.0825252905, 0.040317744, -0.0241406467, 0.1920214295, 0.1807075441, 0.1906842887, 0.2427743226, 0.0923805758, -0.1546777487, 0.0720105693, -0.1111398041, 0.0404132716, -0.3237196803, 0.1414384544, 0.1943963766, -0.2693224251, 0.337816745, 0.2822554708, -0.0039548012, 0.1737370491, 0.4144848287, 0.4470073879, 0.3810233772, -0.3458938301, -0.2810310721, -0.321467191, 0.3492797315, -0.0205257051, 0.1844318807, -0.5769681931, 0.0726154745, 0.0396596454, -0.0608088709, 0.0117182136, 0.0538608581, -0.1230438054, 0.1567470133, -0.2668755651, -0.1203641966, -0.1544597447, -0.0252305735, -0.125164628, -0.464790076, 0.2174207866, -0.2235412598, 0.0293813348, 0.0444849581, 0.031553667, -0.247691378, -0.0166685935, 0.4364027381, 0.1388331354, 0.1036732346, -0.2208712846, -0.0176570527, -0.2244777232, -0.0005778176, -0.3665598631, -0.0425501168, -0.0079671834, 0.316619873, -0.3149811924, 0.0972124711, -0.3729237914, 0.040681988, 0.2318438441, 0.1112589538, 0.073141396, -0.0877920687, -0.2125245929, 0.0728408545, 0.1720267087, 0.5756812096, 0.011907516, 0.2167342305, -0.2610248923, 0.0048547792, 0.235881269, -0.3160805404, -0.4929456413, 0.3831423819, 0.0332282484, 0.1937093586, -0.0659843162, -0.2832106054, 0.0543288924, 0.1061112657, -0.2017673403, -0.162127018, -0.0056030252, 0.0952655375, 0.1294673383, -0.0604174286, 0.3633390367, 0.1185596958, -0.3589940965, -0.0725695714, -0.2732178271 ]
https://github.com/huggingface/datasets/issues/643
Caching processed dataset at wrong folder
Well actually I just tested and the temporary file is placed in the same directory, so it should work as expected. Which version of `datasets` are you using ?
Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ```
29
Caching processed dataset at wrong folder Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ``` Well actually I just tested and the temporary file is placed in the same directory, so it should work as expected. Which version of `datasets` are you using ?
[ -0.0980262011, 0.1880931705, -0.0280871168, 0.3890115321, -0.0152986562, -0.0114679523, 0.3272337019, -0.0096282084, 0.0338673629, 0.2286567837, 0.0054277871, 0.2275296748, 0.0270036869, 0.3596074879, -0.0818916261, 0.3205984831, 0.2760050893, -0.0400121063, 0.064423278, -0.0552731119, -0.3491485417, 0.3673863709, -0.2507933378, -0.0342623182, -0.5128511786, -0.1368786395, -0.1799271405, -0.0654984713, -0.0533349887, 0.2139815241, 0.2417698503, 0.0878140926, 0.2495012581, 0.661549449, -0.0001283521, -0.1254281551, 0.2665182948, -0.2071332783, -0.2330144942, -0.1373617053, -0.3181045651, -0.014190373, -0.1339171827, -0.0676875338, -0.1839046478, 0.055913996, 0.2722488642, -0.5808055997, -0.0250828881, 0.2409745157, 0.0725319088, -0.428832829, -0.4749283791, 0.3053101301, 0.0975685641, 0.2478017956, -0.142292276, 0.2430686057, 0.0100712227, -0.1486691236, -0.0139403017, 0.3300215602, -0.0270179082, -0.0138575844, 0.2550141215, 0.3406345844, -0.3194047511, -0.3421724439, 0.5276229978, -0.4035199881, 0.4292228818, -0.340400517, -0.176773712, -0.2474317998, -0.3338010609, -0.2652027011, 0.5508041978, 0.1417494863, -0.0569063947, 0.0546893664, -0.4403162003, -0.1930940449, 0.10153272, 0.1382196993, -0.2382395864, 0.2111842483, -0.2950586975, 0.0276472755, -0.011653468, 0.1779492944, 0.676631093, -0.3875516355, -0.0103659276, 0.2630079687, -0.076471433, 0.0587412976, -0.1897366792, 0.5381627083, -0.2099023163, -0.178782478, -0.2083130032, -0.1328073144, -0.1667216867, 0.0946199968, 0.0385344774, 0.4278604686, -0.0002028501, 0.2039847225, 0.1246511713, 0.1027066857, -0.5209600925, -0.0831507742, -0.0767244399, -0.2948050201, 0.0310732257, 0.0969407484, 0.0182938837, -0.2827686369, -0.1402125061, -0.0378731936, -0.3314203024, 0.0076373932, 0.1045959741, 0.2721993029, 0.0197711848, -0.1099094227, -0.2434049994, 0.2486742288, -0.2118347287, 0.3456626832, -0.0870071873, 0.0086986292, -0.3563784957, 0.4384667575, 0.0830168501, -0.251698792, 0.1514324993, 0.0271902382, -0.0714057013, -0.289983809, -0.0525119565, -0.446180284, 0.3620025814, 0.1732683033, 0.1398665458, 0.4446721077, 0.013379815, -0.2829954922, -0.1326736957, 0.2426328957, -0.5642428398, -0.2653875053, 0.1985355467, -0.0222924612, -0.2773582339, -0.0693463534, -0.6552343369, 0.1527506858, 0.4416986406, -0.2127339095, 0.0085252784, -0.0149788931, -0.5274880528, -0.2238632143, 0.0653400719, 0.2004465759, -0.3652799726, 0.2058353275, -0.3317600787, 0.4557799101, 0.4756259024, 0.3935822845, 0.0600948818, 0.2928663492, -0.4933999181, -0.027843399, 0.1094954088, -0.3094348907, -0.8372095823, 0.2986418903, -0.0138159506, -0.0036940163, -0.0160197355, -0.0175277479, 0.1869796067, -0.1316635311, 0.1638333052, 0.1282262802, 0.1112386882, 0.1921883076, -0.2752438784, -0.1077733561, -0.0107341819, -0.1389642209, 0.0377675816, 0.2096467912, 0.0414763689, -0.3141261041, 0.1381217688, -0.069786422, 0.1110016033, 0.2728103697, 0.2326658964, -0.1298243105, 0.0115752229, 0.1633970886, -0.2243788987, 0.1474625766, 0.0282333363, -0.1464347839, -0.4751336277, -0.1171610132, -0.1194385514, -0.1630005836, -0.1702290177, -0.2517787218, -0.0769412592, 0.307275027, 0.1577135026, 0.0284265317, -0.0407032855, 0.5251294971, 0.0626687109, -0.1593218446, -0.0775784403, 0.2420238554, -0.1074184328, -0.2392098457, -0.1487955898, -0.195563212, 0.22053653, -0.261343509, -0.2108386606, 0.1778928041, 0.3059597313, 0.4031630158, 0.0000761904, 0.2722764611, 0.1150536314, 0.1092064679, 0.1694866866, -0.0730654821, 0.002863545, 0.158908546, -0.08707688, 0.2959048748, -0.1469186842, 0.1218438148, -0.1049630269, -0.2768553793, -0.0485450961, 0.1285164803, 0.2272477597, -0.1897709668, 0.0760214329, 0.343096137, 0.383125335, 0.198202014, 0.2105253786, 0.3193437159, 0.6449167132, 0.0745251551, -0.0350593328, 0.1307910681, -0.1365966499, -0.2520188987, 0.2219441682, 0.5235060453, 0.4602492154, -0.0905336589, 0.3149168491, 0.1629968137, 0.0578843355, -0.1506622732, 0.1834231764, 0.0628222674, 0.2291887254, -0.0392770804, 0.2224123776, -0.0436757915, -0.0493959263, 0.200511381, 0.0795629397, 0.2584428787, -0.1204504147, 0.5334350467, -0.2883335352, -0.2838530242, -0.2435617745, -0.2431817055, 0.1216466799, -0.2136331201, -0.0976685286, 0.283724159, 0.0229829848, 0.0302869175, 0.232142821, 0.1779782474, -0.1119579896, -0.4812889993, -0.1549043953, 0.1786361337, -0.2874042094, -0.1078281403, 0.3575818837, -0.0645390823, -0.0030335099, -0.2168627083, 0.0499557555, -0.3820486367, -0.1052476168, 0.2430864275, -0.1462057829, 0.2984904945, -0.2173312306, 0.0096436944, -0.4151871502, -0.2589136362, -0.0426565707, -0.0731207877, -0.0663108006, -0.3781527579, -0.0269043408, -0.0367621891, -0.085888803, 0.0030578196, -0.1907086968, -0.0507300831, 0.0393038616, -0.0032558078, 0.2771963775, 0.0263254941, -0.0282735769, -0.2060231119, 0.3607292175, -0.3355194628, -0.3527883291, -0.6440095305, 0.3036518991, -0.1445789039, -0.0496169478, -0.0091051497, -0.0806197226, 0.0811307281, 0.4302973151, -0.4716595709, -0.3017313778, -0.189389497, 0.0136478534, 0.2360906452, -0.0786210895, 0.3027954996, 0.029011026, 0.1964472085, -0.0391067192, -0.4018259346, 0.0120686796, 0.3081807494, 0.3579261899, 0.0200457256, 0.2512150705, 0.0542703979, 0.6362164617, 0.3114109933, -0.0254183691, 0.4196687937, -0.0525016859, 0.2791054547, -0.2759058475, -0.1334952563, 0.2206903249, 0.0085317688, -0.6468423605, 0.4143175483, 0.1350239962, -0.4364432395, 0.1293365061, -0.2338132113, -0.3097458482, -0.2208639681, 0.2010636032, 0.0150644425, 0.2418790162, 0.0931669697, 0.1408701539, -0.2238604128, -0.2583942413, 0.0733994171, 0.0829023719, 0.2794163227, 0.1986619234, 0.2841058373, -0.4492783844, -0.3418408334, 0.3656339347, 0.3487120867, 0.1174188331, -0.0517196432, 0.2863927484, 0.1670885682, -0.1253131032, 0.601755321, -0.3549859524, -0.1576303095, -0.1396561116, 0.0860989764, -0.0286169667, -0.0127256578, 0.0868601054, 0.4143779874, -0.0153197479, 0.5273711085, 0.3371326625, -0.0092126792, -0.1358057559, 0.213593632, -0.2908638418, -0.1111325026, -0.2496884912, -0.5072108507, -0.203581959, -0.030515071, 0.1430049539, -0.0360444523, 0.0577825792, -0.0157500952, 0.131757915, -0.0788709149, 0.0373285264, 0.1687452942, 0.3987451196, 0.1434881985, -0.0929078162, 0.1817072332, 0.150650993, 0.3403624296, 0.5511040688, 0.1500349641, 0.1495836377, 0.1981314868, -0.1751902401, 0.2572016716, 0.3737205267, -0.1885135323, -0.2240607589, -0.1297324002, -0.0401515178, -0.3493864238, 0.380907625, 0.1846685112, 0.3165335357, -0.4214710891, -0.500972271, 0.4355790019, 0.2205657214, -0.2880977094, 0.3781587183, 0.0354243293, -0.5233603716, 0.3892886639, 0.1044139192, 1.0422184467, -0.0291999001, 0.1440988481, 0.0531244017, 0.0830089897, 0.0313167349, -0.3644895852, 0.21909298, -0.1676380038, -0.6126425266, -0.0993559435, -0.1702267975, -0.1494572163, 0.1020815894, -0.1965597123, 0.4737480283, 0.0464323238, 0.0202116668, -0.1003160104, -0.0861563012, -0.1475776285, -0.1369806528, -0.2015279233, 0.0424225479, -0.0138793048, 0.4463690817, -0.1584410965, 0.2061470151, -0.176995337, 0.0774842352, -0.1612952799, -0.0300465766, -0.412976563, -0.0100578368, -0.3488591313, -0.2777052224, -0.1216034964, 0.332114011, 0.5052713752, 0.2408726513, 0.0065474957, 0.0173620339, 0.1277463734, 0.227251187, -0.0037386629, -0.4449215829, 0.0543819852, 0.0711082667, 0.1271183789, -0.3398969769, 0.144374609, -0.3299236596, -0.0805931911, 0.0498802736, -0.0724174827, 0.0122181671, -0.222353518, 0.0186883938, -0.0997203216, 0.0818676278, 0.0187698063, -0.0277273934, 0.2760846019, 0.4491717517, -0.5062206984, -0.3761131763, -0.2003278732, 0.2312146276, 0.2537478507, 0.0779750049, 0.4709461927, -0.2033420354, -0.1989324838, 0.0163190644, 0.0493042842, -0.2708590925, 0.265440464, 0.1176895723, -0.4325998425, -0.0760935843, -0.1049764827, 0.062380638, 0.2794388533, -0.0690010861, -0.3804730177, -0.3362635374, -0.3996808529, 0.0158157442, 0.007566053, 0.0767894313, 0.0372361429, 0.1834815741, 0.1978899986, -0.2522153258, -0.1632394642, 0.1962478757, -0.0291685071, 0.0893339589, 0.0308364686, 0.0201766137, 0.3836661279, -0.18118155, -0.1201846376, 0.1872047037, 0.0288530607, -0.0975006148, -0.0426418781, 0.1753436774, 0.2000725418, -0.0873261169, -0.0261495654, -0.3177044094, 0.0501993895, -0.4659600854, 0.2392886132, 0.3294808269, 0.1140274778, -0.1467585415, 0.1601731926, -0.090150401, 0.0041614529, -0.0279725846, -0.1430331469, 0.3741377592, 0.1804340929, 0.2766547501, 0.230761081, 0.0583929233, -0.0458600223, -0.0354676098, 0.1661789268, 0.3798241019, 0.141623944, -0.287699908, 0.0398342125, -0.0435176343, 0.0818059072, 0.1289952099, -0.1184121817, -0.404456079, 0.3410648108, 0.0122531597, 0.0788663328, -0.0586055852, 0.0762962699, -0.1434564292, -0.036213439, 0.4677840471, 0.2167764753, 0.1726542562, -0.0198742505, 0.0120631624, 0.5274105668, -0.2263321877, 0.0627217367, -0.1645875573, 0.0231250133, 0.5131483078, 0.3814444244, 0.100813821, -0.0556069985, 0.5689254999, 0.1279404759, 0.1613864154, 0.3975925148, -0.0264824796, 0.0311632678, -0.2019388527, -0.0550161488, 0.2214681059, -0.2355240136, 0.3087991774, 0.2096163929, 0.0180902146, -0.4070121348, 0.0104145836, -0.2349977046, 0.1744943559, -0.1533946246, -0.2313523889, 0.2195530087, -0.1457257122, 0.0759932399, 0.4029555619, -0.1542877257, -0.1516587436, 0.1393972635, 0.1362302899, -0.2383459657, 0.3084791303, 0.0470376201, 0.1173308045, 0.2149896473, 0.0212371051, 0.7285472155, -0.3807319105, 0.1181312427, -0.049573306, 0.1587445885, 0.2729343772, 0.3947120011, -0.2817905545, -0.1670731008, 0.1221455783, 0.0612510182, -0.1060803458, 0.2734853923, -0.0934417769, -0.0007923966, 0.1241959333, 0.058661893, -0.0224677455, 0.1964730024, 0.1348849982, 0.2219512612, 0.1697977632, 0.1599491388, -0.1646050662, 0.1446320564, -0.1275214255, 0.0413756296, -0.345408231, 0.1061100811, 0.2801466584, -0.2671584487, 0.3705638051, 0.2498253882, 0.002798574, 0.1581300795, 0.4029341042, 0.4333431125, 0.3784105778, -0.3179953694, -0.2564050853, -0.3567008078, 0.3485018909, -0.0395745859, 0.210888505, -0.53175354, 0.0837219059, 0.0091927834, -0.0288416911, 0.0147680873, 0.0835056156, -0.1280094087, 0.1944003105, -0.2590571046, -0.1269492209, -0.1365108937, 0.0002453754, -0.1157819927, -0.4538484514, 0.2380295247, -0.2168744057, 0.0133955264, 0.0219859798, 0.0698787645, -0.2033715248, -0.0798680261, 0.4682742655, 0.2058282644, 0.1373897791, -0.2023871541, 0.0295154732, -0.3125997186, 0.0013138547, -0.3460719883, -0.0226153489, -0.0177885741, 0.3184144795, -0.3162146509, 0.0922099799, -0.3713300824, 0.0409186445, 0.2394524813, 0.1391160488, 0.066161491, -0.1014296561, -0.2200340778, 0.0427588858, 0.1457411945, 0.5836616755, 0.0304108672, 0.2649636269, -0.2504312694, -0.0683838874, 0.2764884531, -0.3251816928, -0.5561156869, 0.3612314463, 0.0431548394, 0.2361360192, -0.142843917, -0.272261411, 0.0014825752, 0.1511981636, -0.2202392966, -0.1296271235, 0.0169422235, 0.1076123118, 0.1338992566, -0.0762366354, 0.3681735992, 0.1175735146, -0.3408050835, -0.0224708654, -0.2614037097 ]
https://github.com/huggingface/datasets/issues/643
Caching processed dataset at wrong folder
It looks like a pyarrow issue with google colab. For some reason this code increases the disk usage of google colab while it actually writes into google drive: ```python import pyarrow as pa stream = pa.OSFile("/content/drive/My Drive/path/to/file.arrow", "wb") writer = pa.RecordBatchStreamWriter(stream, schema=pa.schema({"text": pa.string()})) writer.write_table(pa.Table.from_pydict({"text": ["a"*511 + "\n"] * ((1 << 30) // 512)})) # 1GiB writer.close() stream.close() ``` Moreover if I `rm` the file on google drive, it frees disk space on google colab.
Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ```
74
Caching processed dataset at wrong folder Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ``` It looks like a pyarrow issue with google colab. For some reason this code increases the disk usage of google colab while it actually writes into google drive: ```python import pyarrow as pa stream = pa.OSFile("/content/drive/My Drive/path/to/file.arrow", "wb") writer = pa.RecordBatchStreamWriter(stream, schema=pa.schema({"text": pa.string()})) writer.write_table(pa.Table.from_pydict({"text": ["a"*511 + "\n"] * ((1 << 30) // 512)})) # 1GiB writer.close() stream.close() ``` Moreover if I `rm` the file on google drive, it frees disk space on google colab.
[ 0.0214204751, 0.2508094907, -0.0044861445, 0.404622823, -0.059329439, -0.097665906, 0.3005951643, 0.0051360354, -0.2152587324, 0.1271966547, -0.0451291576, 0.3386110067, 0.1068909019, 0.293412149, 0.06055611, 0.2235910147, 0.2913429439, -0.0080434429, 0.110989958, -0.0101503907, -0.2467476726, 0.3662293851, -0.2008792013, -0.0313707218, -0.4776650965, -0.0688775331, -0.0705261007, -0.1316780597, -0.0325234048, 0.1094121858, 0.1837548018, 0.0785783157, 0.1501134485, 0.5543879271, -0.0001274843, -0.2014523447, 0.2319874316, -0.1646426767, -0.1672950387, 0.095237188, -0.0660739765, -0.0158476774, 0.0897296444, -0.0740430728, -0.0477136746, 0.0367299691, 0.2621204257, -0.1535120457, -0.0225635879, 0.1620318592, 0.0549755655, -0.3191693425, -0.3850811422, 0.4330033362, 0.3903362751, 0.2227913588, -0.1758395135, 0.5310471058, 0.0761608034, -0.1830211133, -0.3298395276, 0.26407516, -0.1264404207, 0.1106781662, 0.3018000722, 0.4598483741, -0.2333253324, -0.1505203694, 0.4259732366, -0.4988751113, 0.327249378, -0.5334556699, -0.0028970868, -0.3041200042, -0.2905580997, -0.3609195948, 0.5149069428, 0.2798947692, -0.240869239, 0.0373576954, -0.389555037, -0.1254131645, 0.0084920116, 0.0503369048, -0.1800256073, 0.171101734, -0.1223679334, 0.0516219474, 0.0287984665, 0.3116213381, 0.7678458095, -0.364816308, 0.0661573634, 0.1391308904, -0.0734797418, 0.1814910918, -0.1290128231, 0.5854720473, -0.131290853, -0.1340879053, -0.1266845614, -0.1530452818, 0.0074449405, 0.1737576872, 0.1315619349, 0.3484869301, -0.2132811546, 0.0425849743, 0.0428296402, 0.0529008918, -0.3369434774, -0.0782317519, 0.0316967368, -0.2644618452, 0.1953687072, -0.0778722838, 0.0231226031, -0.2491860092, -0.1689236164, -0.2116444707, -0.3935552537, -0.0601107068, -0.0610283837, 0.2024488151, -0.0228126273, -0.2642136514, -0.2638736367, 0.2894006968, -0.2768120468, 0.357504189, -0.0012719508, 0.0600015298, -0.2810416222, 0.5400342941, 0.1548737586, -0.1799013615, 0.0203178227, 0.1410446167, -0.0431126915, -0.2354218513, -0.0890349448, -0.4710319936, 0.2895700037, 0.1914194673, 0.1892023981, 0.3132678568, -0.1785365939, -0.2473847568, -0.1625047028, 0.4494557679, -0.5062211156, -0.3123242259, 0.1799286008, -0.0252873413, -0.2993509471, -0.0670902506, -0.7675721049, 0.132182017, 0.4474858642, -0.2971972525, 0.0309304968, -0.0965608284, -0.4285757542, -0.3032744229, 0.0149897598, 0.1452413052, -0.359757334, 0.0603812411, -0.1958556175, 0.4015368819, 0.4847248197, 0.4746411741, -0.0242268704, 0.3547288179, -0.4302557409, 0.0213745032, -0.0106693739, -0.156739831, -0.8236624002, 0.1317306012, -0.1323922724, 0.0695863888, 0.1081512421, 0.0055572065, 0.1588885337, -0.0654985905, 0.2246365696, 0.20693174, 0.0737835392, 0.2635890543, -0.3758738041, -0.1832396537, -0.0158578474, -0.0594401248, -0.0387474597, 0.0208462663, 0.0070686545, -0.4193620384, 0.2358667254, -0.1587568223, 0.179130882, 0.2395593673, 0.3115642369, -0.2237323523, 0.0086979792, 0.2210535258, -0.2592788637, 0.0565236732, -0.084523432, -0.1852929145, -0.622589469, -0.1273641139, -0.1777252108, -0.0660639629, -0.1020757407, -0.1924064159, -0.0981778726, 0.2356913835, 0.1794312745, 0.077390112, 0.1373388171, 0.3301823139, 0.183696568, -0.1190628037, 0.0269475933, 0.3751266003, -0.1567520052, -0.3961034119, -0.0702995062, -0.1427295804, 0.2049589306, -0.1596709043, -0.0452096276, 0.0729758143, 0.1840243638, 0.4450158179, -0.0777893439, 0.2858205736, 0.1316983402, 0.0216106605, 0.1732712984, -0.0894047171, 0.0138270808, 0.0375895202, -0.0361162014, 0.3025757968, -0.0142474789, 0.1336646378, -0.1301428229, -0.3485518694, -0.1377635151, 0.0490129441, 0.3428659737, 0.0856745988, 0.0891670138, 0.518650949, 0.4237041771, 0.2823849022, 0.1714911759, 0.3646704853, 0.6328816414, -0.0050883442, -0.0541189946, 0.257504642, -0.2285195589, -0.3635297716, 0.2713558972, 0.2931199968, 0.4082561731, -0.0139625352, 0.1979500204, 0.1831990033, 0.1056672037, -0.2301923186, 0.2001958042, 0.1337821484, 0.2639003694, -0.0150431683, 0.380197525, -0.1243997663, -0.1518716216, 0.1923526675, 0.0603037775, 0.1992244124, -0.2093028277, 0.5275091529, -0.1733886153, -0.2081392109, -0.2764718533, -0.2005175352, 0.0451710038, -0.1497695297, -0.0626135841, 0.4318823218, 0.0306839589, -0.0486450121, 0.3401045799, 0.1422449052, -0.1621334851, -0.5259186029, -0.1383045614, -0.0220133197, -0.3286529481, -0.0774948001, 0.4027001262, -0.0441006161, 0.0771532059, -0.1384211928, 0.0884589031, -0.3343408108, -0.1214695498, 0.2740838826, -0.1896561682, 0.3587255478, -0.3514129221, -0.1115448549, -0.4793853462, -0.3280753195, -0.1017478481, -0.0617398508, -0.1142809391, -0.3009618819, -0.0578715131, 0.0006672031, -0.077166222, 0.0741544515, -0.1301367134, 0.0200143345, 0.1932438612, -0.0068308618, 0.380648613, -0.0050655054, -0.043236658, -0.1388839483, 0.3479843736, -0.3142752945, -0.2478323132, -0.4356375933, 0.2898032069, -0.0098420205, -0.0552161895, -0.04590334, -0.1516476274, -0.042331215, 0.4133681357, -0.5115941763, -0.3616777062, -0.1239702925, 0.2218837589, 0.1521574408, -0.1106738374, 0.2670274377, 0.1321384609, 0.1791775525, 0.0847617984, -0.4711602628, -0.1082861722, 0.3099479675, 0.2349284738, 0.0253392681, 0.0066286349, 0.0264173597, 0.6789848804, -0.0198745076, 0.0968689024, 0.5025280714, -0.0739437118, 0.2042860836, -0.1957440525, -0.0140867196, 0.1454436183, -0.1160622016, -0.6394330859, 0.3694887161, 0.0848568678, -0.484421581, 0.2561871409, -0.2750032246, -0.2847718298, -0.3084432483, 0.2834478319, 0.2377593815, 0.1873609871, 0.0623417795, 0.0377472378, -0.1657356471, -0.3295603395, 0.0454919785, -0.0543025732, 0.2175505757, 0.0898289159, 0.3859019876, -0.4134773314, -0.4909829199, 0.2205982208, 0.3826883733, -0.1792142987, 0.0343788378, 0.222851634, 0.3623178303, -0.2491300851, 0.558006525, -0.0694048107, -0.1339289248, -0.146287933, 0.166487202, -0.1333396882, -0.0457109697, -0.0675485954, 0.2604501247, -0.0163359065, 0.3377737999, 0.1728353947, 0.0868890136, -0.0843029395, 0.3391500115, -0.283531487, -0.0867723376, -0.1964410841, -0.7121967673, -0.0780664012, 0.0588038526, 0.1275706142, 0.0980687439, 0.0418758988, 0.1731922328, 0.2353617102, -0.0124084856, 0.0576719716, 0.1508389562, 0.5057431459, 0.0489220172, -0.1249406934, -0.0064024911, 0.0524297245, 0.4683278203, 0.4879971743, 0.3116281927, 0.221216172, 0.1519513577, -0.1782700568, 0.2390084118, 0.2694662511, -0.1086312383, -0.1066312864, -0.2813800871, -0.0630208403, -0.2542047501, 0.193458274, 0.1144244596, 0.2429377884, -0.2523651719, -0.212758109, 0.5412889123, 0.1812483966, -0.3203700185, 0.1657177955, 0.079824701, -0.5004062653, 0.410710454, 0.1969553381, 1.0303814411, -0.0471592024, 0.3019302189, 0.3087443411, -0.1668762416, -0.1174322143, -0.2488426566, 0.3039295673, -0.2209102958, -0.5396696925, -0.0110264653, -0.2475278229, -0.1905700415, -0.0188330989, -0.2668168247, 0.3062216938, -0.0438309051, 0.0509451143, -0.0009031792, -0.1211186722, 0.0458540358, -0.1328753382, -0.2634561658, -0.0213886499, -0.0880284682, 0.2598495483, -0.1332020164, 0.1381905973, -0.1858514696, 0.0161061902, -0.1680464596, -0.0160227045, -0.4394679964, -0.0721303076, -0.2420896143, -0.3970457315, -0.145438686, 0.2823382318, 0.2300015092, -0.0147828665, 0.0704172626, 0.0020574338, 0.1275440007, 0.286444962, 0.0846179575, -0.4260697365, -0.1445914209, 0.0226758644, 0.0339435488, -0.2728813887, 0.1001209244, -0.3597155809, -0.136366725, 0.2026910931, -0.1626839191, 0.0294708684, -0.0940957144, -0.1133510768, -0.0550967641, 0.0660779178, 0.0095067676, -0.0463663004, 0.263918072, 0.463750422, -0.4630711973, -0.3630081117, -0.187815547, 0.253195107, 0.4450024366, 0.2145128697, 0.5582187176, -0.2028561831, -0.2048253417, 0.057699725, -0.1367767751, -0.2237822562, 0.1204760447, 0.1326522976, -0.3732176721, 0.0511841625, -0.1787278354, 0.0684330091, 0.2830270529, -0.0346839093, -0.4491633773, -0.1557342261, -0.381881386, 0.0471600853, 0.1669678241, -0.087484315, 0.1780774891, 0.1550745964, 0.2216192484, -0.095302172, -0.1456442028, 0.2007080764, 0.0055036126, 0.2432678938, 0.0172681212, -0.1123384386, 0.4713476002, -0.1918706149, -0.1179879904, 0.1168156788, 0.1549625546, -0.1169965565, -0.015345973, 0.1827223152, 0.1044030339, -0.1024021506, -0.1249285638, -0.1001678929, 0.2199304253, -0.4058307707, 0.3253194094, 0.24868159, 0.1182097793, -0.2841391563, 0.2652660012, -0.0952177644, -0.1122515425, -0.1452154964, -0.1768480092, 0.3615040183, 0.2094567269, 0.2111811936, 0.2580583096, 0.0975414366, 0.0806858093, -0.0012960085, 0.276417166, 0.3049293756, 0.0272612404, -0.2269965559, -0.1670791209, -0.183432579, 0.0302477498, 0.1225222945, -0.0035722365, -0.495803982, 0.3037508428, 0.004101105, 0.1544913948, -0.1203545928, 0.1704878062, -0.2577297688, -0.1299339682, 0.4528478384, 0.2115070224, 0.1399545372, -0.0298392326, -0.0397718288, 0.5303689837, 0.0392150469, -0.1085442677, -0.153461054, 0.0309161507, 0.4009896219, 0.4879713655, 0.1087321118, 0.0028848457, 0.2444180846, 0.0172581412, 0.0839074478, 0.2110324651, -0.090522252, -0.0388358571, -0.1549649686, -0.1460745782, 0.2240421623, -0.0110139595, 0.1774436831, 0.2570497394, 0.1577576995, -0.1078224704, -0.0595412105, -0.1887118071, 0.2701649368, -0.2121589929, -0.2904267311, 0.2382963896, -0.148488462, 0.0976770073, 0.4762373567, -0.2112547606, -0.2921561003, 0.3226988018, 0.2024368197, -0.2835077047, 0.2390039116, 0.1534792781, 0.1942010969, 0.1675262749, 0.0098428363, 0.585139215, -0.4067664146, 0.03457845, -0.1898214221, 0.1489820331, 0.4157556593, 0.3311623931, -0.2545666695, -0.2914424241, 0.0924551114, 0.1278853565, -0.1309447289, 0.1330520213, -0.0176010057, 0.2327789813, 0.0003343309, 0.0493432693, -0.0455654599, 0.168859154, 0.2412274182, 0.1468366534, 0.184875831, -0.0148404427, -0.1873383373, -0.0714157447, -0.0255147256, -0.0618175156, -0.2494094223, 0.1596643478, 0.2407692075, -0.2312214375, 0.3012769818, 0.3104698062, -0.0102102337, 0.1933276951, 0.5336734653, 0.3685655892, 0.3064678013, -0.3856615722, -0.1242970899, -0.2901499867, 0.377302736, -0.201538071, 0.1256183386, -0.3924018741, 0.151605472, -0.1680916399, 0.027775526, -0.0537367687, 0.3108820915, -0.1991759241, 0.0368192606, -0.3342731893, -0.0064270594, -0.0134859243, -0.1722969562, -0.1404055357, -0.44810009, 0.3833132982, -0.2276221812, 0.0577225834, 0.003216156, 0.0626592785, -0.171734035, 0.0512427576, 0.5267398953, 0.153784439, 0.1620917767, -0.1921781749, 0.0589523092, -0.2873102129, -0.0165702421, -0.3212078512, 0.0060101459, -0.0835124627, 0.2568943501, -0.216487363, 0.0752682984, -0.3169202507, 0.3819303215, 0.2212302238, 0.0362060778, 0.3712444901, -0.1140621603, -0.1697271019, 0.0451944768, -0.1173970252, 0.3468998671, 0.0570165701, 0.2356340736, -0.4045064449, -0.0970254913, 0.225555405, -0.4353227019, -0.4823938906, 0.4828675091, 0.1074677929, 0.2992261052, -0.2077957988, -0.247983411, 0.015988037, 0.1334013194, -0.1762093753, -0.2149590403, 0.1418542415, -0.0739012659, 0.090460375, -0.0241559278, 0.2754199505, 0.0608071834, -0.476314038, -0.1921881437, -0.3000220656 ]
https://github.com/huggingface/datasets/issues/643
Caching processed dataset at wrong folder
Actually I did more tests it doesn't >.< I'll let you know if I find a way to fix that
Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ```
20
Caching processed dataset at wrong folder Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ``` Actually I did more tests it doesn't >.< I'll let you know if I find a way to fix that
[ -0.100196965, 0.1869411469, -0.0199803077, 0.4581358135, -0.0414947458, -0.0328616202, 0.310751766, 0.0137842586, 0.0069227661, 0.1962366849, 0.0152606834, 0.2812228799, 0.0530099608, 0.4453214407, -0.0918109193, 0.3288263083, 0.2770380676, -0.0716738701, 0.0422289968, -0.083330892, -0.3645290136, 0.3949063122, -0.2226697356, -0.0297364686, -0.4760731459, -0.1265687048, -0.1334364414, -0.0599123128, -0.0275347568, 0.2656661868, 0.2077789158, 0.01725398, 0.1959412247, 0.6396949887, -0.0001290814, -0.1540850103, 0.2132693976, -0.2452559769, -0.1593501866, -0.1146852672, -0.2909756303, 0.0105282692, -0.1092144698, -0.0579328835, -0.2169559449, 0.1224939153, 0.2166627198, -0.5325362086, -0.0100779887, 0.2681662142, 0.0640945882, -0.4739493132, -0.480668366, 0.383352071, 0.0587678328, 0.2437631935, -0.1412623674, 0.2848826051, -0.0153786503, -0.1163647324, -0.0842501149, 0.2958208621, -0.0695915967, 0.0128158424, 0.2305928022, 0.3311594129, -0.3048781753, -0.3038527668, 0.5335623026, -0.4408623874, 0.3466918468, -0.3541080356, -0.1448861361, -0.265127331, -0.322508961, -0.3541122377, 0.5375026464, 0.1383072436, -0.1107280925, 0.0715743974, -0.4810944498, -0.23269099, 0.0656592548, 0.0965538323, -0.1904102713, 0.3148017526, -0.2614334226, 0.034551207, -0.0387205631, 0.2343809009, 0.6895994544, -0.3677736819, -0.0195308309, 0.1927598268, -0.1213610843, 0.0573781095, -0.2128069848, 0.5516892672, -0.2121066749, -0.1210529283, -0.2416574806, -0.1189973354, -0.1252043545, 0.0866357163, 0.0504913963, 0.445263654, -0.0332960859, 0.133025974, 0.0818042532, 0.0395882651, -0.526815474, -0.0845655948, -0.0271516927, -0.2695403397, -0.0042476621, 0.1287913769, -0.0369933099, -0.2902013958, -0.0993200764, -0.0460208766, -0.312728852, -0.013800161, 0.0954967588, 0.3146099746, -0.0434426889, -0.1035688147, -0.2572105229, 0.2454316169, -0.1969507635, 0.3418699801, -0.080373913, 0.0207407046, -0.3455399275, 0.4818636477, 0.0642976165, -0.2464163601, 0.1298304051, 0.0363992155, -0.010365203, -0.3284162581, -0.0583500713, -0.4485410452, 0.3813794255, 0.1436963081, 0.145327881, 0.4247840643, 0.0019367398, -0.2195817679, -0.1311644614, 0.2365234196, -0.6200785637, -0.2533977628, 0.1688309759, -0.0321041346, -0.2495456636, -0.0673455819, -0.6999959946, 0.1224301234, 0.4770285785, -0.2050563395, -0.0080383867, -0.0043333452, -0.4935470521, -0.2447818071, 0.0572938025, 0.1244078279, -0.2343384475, 0.179204151, -0.3634158075, 0.4979798198, 0.513926208, 0.3871516883, 0.0752897114, 0.2675049007, -0.4960412085, -0.0413407646, 0.1093341187, -0.289912641, -0.84691751, 0.3187883496, -0.0423516817, -0.012807223, 0.0056163738, -0.025561275, 0.2197384089, -0.0894948095, 0.1782179773, 0.1592389047, 0.0948839411, 0.2119771093, -0.2583328784, -0.146441415, -0.0520193465, -0.1498499811, 0.0301358476, 0.2176419348, -0.0006994103, -0.3706176877, 0.15091905, -0.1175169796, 0.1293628067, 0.2562040389, 0.2577471435, -0.1585948914, 0.0000067373, 0.1345373988, -0.2021969408, 0.130584389, 0.0093785562, -0.1663395464, -0.5060367584, -0.0681093782, -0.1266944557, -0.1641606241, -0.1428062022, -0.222837314, -0.0874699652, 0.3029135168, 0.1267005205, 0.0550166368, -0.0214773454, 0.5375716686, 0.1039921641, -0.1637993902, -0.0310335644, 0.2271191925, -0.1092195734, -0.2241534889, -0.1367473751, -0.1725662947, 0.2570611835, -0.2123560607, -0.2030740827, 0.1432765424, 0.2454464287, 0.4036560059, -0.0317768715, 0.2653984427, 0.0925488919, 0.0413973518, 0.1671620905, -0.0784719288, -0.0313067175, 0.1556564718, -0.000980382, 0.2876313031, -0.098950237, 0.1851484627, -0.0919764563, -0.2702075541, -0.0442136824, 0.0820062011, 0.2814542651, -0.144052282, 0.0922965258, 0.3347587883, 0.3947922885, 0.2348683923, 0.2349325567, 0.3371483386, 0.6447879076, 0.119115144, -0.0171499308, 0.1671897322, -0.1317230761, -0.2494185567, 0.2548366785, 0.4952819943, 0.423006624, -0.1029383168, 0.2637454271, 0.203637898, 0.0837235451, -0.1512749493, 0.1672001779, 0.0601981767, 0.3180696368, 0.0076512406, 0.2109300792, -0.0649534687, -0.0552663915, 0.1915415674, 0.0658395365, 0.2555198371, -0.1284782887, 0.548122704, -0.307259351, -0.2564249039, -0.2413407266, -0.2760953903, 0.0781548098, -0.1602676511, -0.118229039, 0.3370000422, 0.0332644023, 0.0506811738, 0.2371834666, 0.1976032704, -0.1381626427, -0.4697012901, -0.1437358409, 0.1527374834, -0.245411098, -0.1133156568, 0.3678133786, -0.0569793507, 0.0241777096, -0.1859463602, 0.0227219369, -0.3783480227, -0.0986187607, 0.2697837055, -0.1195579991, 0.2959062159, -0.2688422799, 0.0188589152, -0.4218040407, -0.3589330912, -0.0800453499, -0.0346794389, -0.0787686035, -0.4026957452, -0.0332608595, -0.0269002859, -0.0811649859, 0.0032073862, -0.1645308286, -0.0334001929, 0.0611831248, 0.0083253989, 0.3051476181, -0.0450578742, -0.0811832324, -0.2303549647, 0.3723261952, -0.3175049722, -0.3663460314, -0.6225435138, 0.2493042201, -0.126867041, -0.0361842401, -0.031137431, -0.0876351893, 0.121336028, 0.3739611208, -0.4566193223, -0.2531040311, -0.1389435232, -0.0384323783, 0.2074794322, -0.0992779881, 0.2927908599, 0.062847726, 0.221025914, -0.0134767881, -0.4279941022, 0.0216267109, 0.3045814633, 0.382042408, 0.0778237507, 0.2560872436, 0.0397078544, 0.6177142262, 0.2947866321, -0.0088364044, 0.4568141401, -0.0352962725, 0.2197226435, -0.2286724299, -0.1513241678, 0.2661589086, 0.0503712632, -0.6271563172, 0.3973253965, 0.10809315, -0.4347504079, 0.1437236518, -0.2814535201, -0.3260056674, -0.2251606286, 0.2219087481, -0.0011850697, 0.208519876, 0.0663942695, 0.1401647925, -0.2165210694, -0.2471470386, 0.1060161963, 0.0449224189, 0.2869084775, 0.1469971687, 0.2787694335, -0.4967867434, -0.3790462315, 0.3464757502, 0.360693723, 0.0563133135, -0.0647535548, 0.3000006378, 0.1742335856, -0.1240519136, 0.5816717148, -0.3319549263, -0.1878369749, -0.1880343854, 0.0243845787, 0.0193962343, 0.0048053535, 0.115965642, 0.3986050487, -0.0556097589, 0.4732913971, 0.321741581, 0.0159068685, -0.1249709576, 0.1998547614, -0.3449237645, -0.148280561, -0.1974348426, -0.5270223022, -0.2029924095, -0.0049555553, 0.1355162263, -0.0128362272, 0.0748147815, -0.0141314697, 0.1147591323, -0.0878755823, 0.0675266087, 0.1530639827, 0.4317624569, 0.1444835663, -0.1085924134, 0.0938732028, 0.2191274166, 0.381564647, 0.5146507025, 0.1817270666, 0.1613637358, 0.1798892319, -0.1523649096, 0.30458197, 0.3195317984, -0.1802611798, -0.2109510005, -0.0914972574, -0.0381052457, -0.3330707252, 0.3399731815, 0.1309190094, 0.3543568254, -0.4325093031, -0.4281258285, 0.4614940882, 0.1713366061, -0.296661526, 0.3499472141, 0.0447989553, -0.5196498632, 0.4166849852, 0.1613184363, 1.1192384958, 0.0064205383, 0.1492104679, 0.0563517772, 0.0863895193, -0.0224033389, -0.3167365193, 0.225466758, -0.189727515, -0.6439608335, -0.095360294, -0.1686270833, -0.2084509283, 0.092996709, -0.1833430082, 0.42816028, 0.0131868562, -0.0684453845, -0.1066495702, -0.0882829279, -0.0291197523, -0.1644827724, -0.2493916303, 0.0234039668, -0.066964224, 0.4125228524, -0.1377207637, 0.1827721298, -0.1545262188, 0.0587960444, -0.1939362288, -0.0522649996, -0.3953529894, -0.0228392687, -0.3558653295, -0.2806152701, -0.1223723367, 0.3432164192, 0.5044690371, 0.2127479613, 0.0109197497, 0.006249262, 0.1235874668, 0.2426978201, 0.0332191437, -0.4295631349, 0.0050998619, 0.0530465581, 0.1005419716, -0.3044881225, 0.1799135357, -0.4050153196, -0.028911829, 0.0571527369, -0.1012033075, 0.0512931198, -0.2298831046, 0.008256536, -0.0810014606, 0.0929945111, 0.0212132838, -0.0150380861, 0.2631599009, 0.4860741496, -0.4386586547, -0.404532671, -0.2367360294, 0.2274437398, 0.307924062, 0.0721368939, 0.4588259161, -0.1814825237, -0.2117978334, 0.0217543487, 0.0081972163, -0.2481900752, 0.309876591, 0.0689787194, -0.4246729314, -0.0832343698, -0.1431316435, 0.0346488245, 0.3159292042, 0.0340313241, -0.4057687819, -0.2975548506, -0.3905526698, 0.0329499468, -0.0539822131, 0.0018421862, 0.053390678, 0.1469670981, 0.1759286076, -0.1808767319, -0.1588265747, 0.1416151375, -0.0857372135, 0.0707458258, 0.055379048, 0.0067399, 0.396546334, -0.1677693278, -0.1059673131, 0.1616747379, 0.063921459, -0.0879735202, -0.0432715081, 0.1717987955, 0.1972263306, -0.0620709509, -0.0526820235, -0.2885943651, 0.0479905196, -0.4657149613, 0.2235803157, 0.3048147261, 0.1255900711, -0.1487082094, 0.2037118226, -0.1439112872, -0.07964053, -0.0604649633, -0.1301432699, 0.3830967844, 0.1570236534, 0.2263220102, 0.2681729496, 0.0695645511, -0.0093633002, -0.0734358951, 0.2125530243, 0.3936017454, 0.1422577351, -0.2025918216, 0.0021377406, -0.0084061436, 0.0643013641, 0.0922195613, -0.077545397, -0.4096876383, 0.3800756335, 0.0100466767, 0.0969911739, -0.0744946003, 0.0850033537, -0.2100767493, -0.0563187897, 0.5034117699, 0.1240137592, 0.1653405875, 0.030188771, 0.0092838714, 0.5287905335, -0.198492974, 0.0644593611, -0.2298062444, 0.0299998149, 0.5227378607, 0.4158556163, 0.0957125798, -0.0363948569, 0.4889541864, 0.1238825619, 0.0548813157, 0.3511892557, -0.0391250849, 0.0481878519, -0.1636128426, -0.0937613398, 0.1594882905, -0.2239947766, 0.2865585387, 0.2315381169, -0.0386952572, -0.3612741232, -0.0633784458, -0.2279268354, 0.2280165553, -0.1960699707, -0.2139563411, 0.2110282183, -0.1182355657, 0.115996547, 0.3922672272, -0.1613474935, -0.2112933844, 0.182007134, 0.1608034223, -0.2490401417, 0.3454977572, -0.0114990203, 0.1392012089, 0.1760272384, 0.0654563755, 0.7366921306, -0.415304482, 0.1058182418, -0.1174083129, 0.1387729496, 0.2489474118, 0.42298913, -0.2619305551, -0.1962726712, 0.1766311973, 0.0808220282, -0.110091798, 0.2239329964, -0.0668054745, 0.0656223744, 0.074492313, 0.0567405783, -0.0181807596, 0.1978738457, 0.1304051429, 0.2323052883, 0.2414750308, 0.1912725121, -0.1268615723, 0.1268394291, -0.1530819535, 0.0317872539, -0.3571461439, 0.1267788261, 0.2589237094, -0.270953238, 0.3677130938, 0.3034544289, -0.0048088538, 0.1969353259, 0.420201242, 0.3629056811, 0.3622785807, -0.3203475177, -0.2182141542, -0.3224576116, 0.3802942336, -0.0063215541, 0.202030465, -0.5194978118, 0.0457504019, 0.0079022925, -0.0216593966, 0.0384819657, 0.1716010571, -0.1097052023, 0.1593043506, -0.3157357872, -0.0987094268, -0.110377863, -0.0025158594, -0.1039052531, -0.4072433412, 0.3230717778, -0.1130490825, 0.0270746984, 0.0397795886, 0.0766293555, -0.2620251477, -0.1165410951, 0.458986491, 0.2134212106, 0.1491033584, -0.2523421943, 0.0602661297, -0.226085797, 0.0038755105, -0.3273194432, 0.0119494274, 0.0091761034, 0.3091532588, -0.2791394293, 0.0806867182, -0.4037920535, 0.0749667883, 0.2575176358, 0.0394627973, 0.084736973, -0.0773895159, -0.1713287383, 0.0262786895, 0.0999203399, 0.5492197871, 0.0676569715, 0.2419801503, -0.2468034178, -0.0222040229, 0.2681180835, -0.3252446949, -0.5462809205, 0.3673077226, 0.0814202204, 0.2363241017, -0.1652342081, -0.2404950857, -0.0269384924, 0.1208176315, -0.2052074969, -0.1055415422, 0.0260223132, 0.0342706926, 0.1519043595, -0.0629814416, 0.3229033947, 0.1310684085, -0.3947970569, -0.0453305095, -0.2368302941 ]
https://github.com/huggingface/datasets/issues/643
Caching processed dataset at wrong folder
Actually I also have the issue when writing a regular text file ```python f = open("/content/drive/My Drive/path/to/file", "w") f.write(("a"*511 + "\n") * ((1 << 30) // 512)) # 1GiB f.close() ``` Is that supposed to happen ?
Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ```
37
Caching processed dataset at wrong folder Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ``` Actually I also have the issue when writing a regular text file ```python f = open("/content/drive/My Drive/path/to/file", "w") f.write(("a"*511 + "\n") * ((1 << 30) // 512)) # 1GiB f.close() ``` Is that supposed to happen ?
[ -0.0809622034, 0.1509337276, -0.0047162957, 0.4641734362, -0.0074454453, -0.0837902278, 0.378277272, -0.0160656814, -0.0122850528, 0.151423797, 0.0223203972, 0.2040353268, 0.1237225235, 0.4594928026, -0.0932220742, 0.3096235693, 0.2900454402, -0.0745369494, 0.0555243231, -0.1031740159, -0.3542967737, 0.3774953187, -0.2202057838, -0.0087545589, -0.4959011376, -0.194345057, -0.1198796406, 0.0271139406, -0.0074648974, 0.2972819805, 0.1181407347, 0.0325629897, 0.1704260707, 0.6366827488, -0.0001297842, -0.1508616209, 0.2038343996, -0.2284536064, -0.1701294184, -0.1342804283, -0.2650021613, 0.0300457813, -0.0569732375, -0.0505862162, -0.1384719312, 0.154890731, 0.2752763033, -0.5360544324, 0.0094058439, 0.2767142355, 0.0580062047, -0.4531149268, -0.4936721325, 0.3889503479, 0.1365728378, 0.2704540491, -0.1813370734, 0.2528254092, -0.0109169586, -0.1303181201, -0.0711399838, 0.2785565257, -0.080672808, 0.0198997129, 0.2697372139, 0.4275934398, -0.3152778745, -0.2621910572, 0.5415555835, -0.4134801924, 0.36088866, -0.3902038336, -0.2110206485, -0.2957026958, -0.3344984055, -0.367435813, 0.5965530276, 0.1802712977, -0.1347958893, 0.0444769561, -0.473382324, -0.2119875252, 0.0828588605, 0.10224583, -0.1576582193, 0.2304848731, -0.2503765523, 0.0505878963, -0.0516204387, 0.2697184086, 0.6813457608, -0.4417131841, -0.0237603113, 0.2037514299, -0.0917871743, 0.0940780118, -0.2643795013, 0.4885317981, -0.2613623738, -0.1318338811, -0.1807596385, -0.1316577196, -0.1469574273, 0.1340811849, 0.1013709381, 0.3952641785, -0.0123560773, 0.118258357, 0.1236553639, 0.0157680195, -0.5297673345, -0.1027594283, -0.0362675264, -0.2775635719, 0.0065121059, 0.0582703799, -0.0306737423, -0.2944574058, -0.1228456274, -0.0581410825, -0.3343103528, 0.0305989999, 0.0391498171, 0.2700137496, -0.0227350704, -0.1497121006, -0.2075526565, 0.2387864143, -0.2323745638, 0.3985632956, -0.0660966262, 0.0024267759, -0.3374917209, 0.4626072943, 0.0347471461, -0.2426496297, 0.1173255146, 0.0656708926, -0.0227641575, -0.3494030833, -0.0363065042, -0.4917877316, 0.3772358894, 0.1531205624, 0.1754187942, 0.4545667768, -0.0162567776, -0.2907525003, -0.0823217481, 0.2838456035, -0.568107903, -0.2272557765, 0.1737811863, -0.0337879807, -0.2504400313, -0.0980440527, -0.6474571228, 0.0480874851, 0.5046129227, -0.2406377047, 0.0103451638, -0.0212472416, -0.5231412053, -0.2621287704, 0.0020737755, 0.1776812971, -0.2439187318, 0.2162410319, -0.2958572805, 0.5004324317, 0.5286246538, 0.4728854895, 0.0916795731, 0.2983111739, -0.5009071827, -0.0403810591, 0.1156429276, -0.245313704, -0.7745266557, 0.3366719484, -0.086564973, 0.0202922635, 0.0238601286, 0.0039782315, 0.2072508931, -0.1113532707, 0.2035690248, 0.116135858, 0.11525172, 0.1914680749, -0.2601096928, -0.0995407477, -0.067587845, -0.1769415289, -0.0160327554, 0.1607620716, 0.0332443342, -0.3790468276, 0.134554103, -0.1305038929, 0.1587211341, 0.2919361889, 0.2254764438, -0.1097868904, 0.002340307, 0.1582439691, -0.1636751443, 0.0663116127, 0.00643177, -0.1549729705, -0.4688414633, -0.0954162553, -0.0691836923, -0.1704115123, -0.1157702431, -0.209033221, -0.0990912095, 0.3020284176, 0.052763056, 0.1034015268, -0.0371863618, 0.5598994493, 0.0584909022, -0.1376341134, -0.0100796428, 0.1996803433, -0.0974132195, -0.2990059853, -0.1839176118, -0.1400811374, 0.2100965828, -0.1822101623, -0.2029639184, 0.1439809501, 0.2620846331, 0.4544187188, -0.0678557158, 0.2846869528, 0.1313075572, 0.117817156, 0.173606649, -0.0596176162, 0.0129099125, 0.0975575969, -0.059639506, 0.2911249101, -0.0939189941, 0.164913103, -0.0630543157, -0.311547637, -0.1043289006, 0.0928655639, 0.2769775391, -0.0767953023, 0.1137633845, 0.3560963571, 0.3650046587, 0.2202541232, 0.2212858796, 0.2814453542, 0.6594775319, 0.0796381682, 0.0169113036, 0.131661281, -0.1434535235, -0.2267144471, 0.2522942126, 0.4938211441, 0.450912714, -0.1102535203, 0.2818645537, 0.2308766097, 0.0572354235, -0.1920552105, 0.2052626908, 0.063575834, 0.2396271229, 0.0193324629, 0.1999726743, -0.0383977592, -0.1153915375, 0.2090266943, 0.069549717, 0.1952135712, -0.1690085828, 0.548971951, -0.2330795377, -0.2392104119, -0.3021416366, -0.1950261444, 0.0795689449, -0.1342740953, -0.148057729, 0.3275838196, 0.0119453175, -0.0300213788, 0.2582432628, 0.2365767658, -0.1091114655, -0.4411350489, -0.1046402305, 0.115415819, -0.2608534396, -0.113901481, 0.3723793328, -0.0132911867, 0.0179707091, -0.2058745325, 0.0274478719, -0.3316387534, -0.0950439647, 0.2160345018, -0.1245896146, 0.3008137047, -0.2806508541, 0.0052452986, -0.432366401, -0.3232479095, -0.1116877496, -0.0163677447, -0.1328598857, -0.4609754086, 0.0380084291, -0.090361014, -0.1600344032, -0.0169567149, -0.1087302342, -0.0706207603, 0.1383947283, -0.0190438479, 0.3141639829, 0.0401260145, -0.1042644605, -0.206906572, 0.3973646164, -0.2842166126, -0.3432785869, -0.5802718401, 0.2480846643, -0.1291807443, -0.0765837207, 0.0040053655, -0.0649519265, 0.0509701446, 0.4050846398, -0.4348991811, -0.2244686484, -0.1609028727, -0.0584500134, 0.1966930479, -0.0321758576, 0.2875187695, 0.0443619676, 0.2087787986, -0.0488302447, -0.4330033362, 0.1043200418, 0.273560077, 0.3252646923, 0.0411880314, 0.267167449, 0.0133692063, 0.5328205228, 0.3042556942, 0.0319028758, 0.4304858148, -0.0257740468, 0.2479051948, -0.2646465898, -0.1220803112, 0.2533508837, -0.0026005413, -0.6874215007, 0.3849374056, 0.133144781, -0.3752191961, 0.1488452554, -0.2473294735, -0.2869770229, -0.2395713329, 0.2274457663, 0.0160556026, 0.2355139256, 0.031137323, 0.1894523501, -0.196217522, -0.2596498728, 0.0710702762, 0.1155293807, 0.283270061, 0.0787958428, 0.2494219542, -0.4221399128, -0.3851807117, 0.3280617297, 0.4100992382, 0.0784637034, -0.0790635869, 0.2768160105, 0.2013738751, -0.1284294426, 0.571834445, -0.3225117028, -0.2128906995, -0.157590583, 0.005541672, -0.0180004481, 0.0042309291, 0.0476929322, 0.4170282483, -0.0004010076, 0.490239352, 0.3160839379, 0.0031769902, -0.1257742792, 0.1545049101, -0.3040199876, -0.1654360145, -0.1865907311, -0.5046246648, -0.1751075834, -0.0743582174, 0.1343410462, 0.0022163629, -0.0032347033, -0.0233535375, 0.1278806925, -0.0532520749, 0.0945351869, 0.0910328999, 0.4122693241, 0.1079912037, -0.1451218277, 0.1175668463, 0.2242972106, 0.3180163801, 0.5354545116, 0.1898304224, 0.1655129045, 0.1603081673, -0.2400106937, 0.2840305567, 0.3559732437, -0.1273950636, -0.1553617865, -0.1032552645, -0.1012606621, -0.3344503939, 0.3314048052, 0.1584888548, 0.3463461101, -0.3968760073, -0.4340336621, 0.4349763095, 0.1569946706, -0.2913617194, 0.3219605088, 0.0002826862, -0.5629953742, 0.4082658887, 0.1468818635, 1.102669239, -0.0250928104, 0.2338025719, 0.0235598497, -0.0046498831, -0.0545312352, -0.3294464052, 0.2526038289, -0.2281483561, -0.6414884329, -0.0915872231, -0.2005325854, -0.1712311506, 0.0673606098, -0.1693916321, 0.357049942, 0.0608160757, -0.0344431289, -0.0861866921, -0.0958181322, -0.1250858605, -0.1322514713, -0.2325711548, 0.0000315724, -0.014496102, 0.4019239247, -0.1263515651, 0.147089541, -0.1871937215, 0.0651531368, -0.2133184373, -0.0509146266, -0.4018421769, -0.0048371148, -0.3165279329, -0.3073407114, -0.0720214471, 0.3442333341, 0.5794885159, 0.2448794395, 0.0094381049, -0.031170385, 0.0687985197, 0.2260992229, 0.0237996429, -0.431920588, -0.0044457787, 0.0783524588, 0.0978336856, -0.3306053877, 0.1395052969, -0.3778976798, -0.0554658286, 0.0662570447, -0.1121948212, -0.0004933355, -0.2233912647, -0.0294297747, -0.0849100426, 0.0734182224, 0.0106681986, -0.0022156436, 0.2830318213, 0.4514398873, -0.4418174624, -0.4067652822, -0.2347949147, 0.2583928704, 0.2941416204, 0.0805194378, 0.50571841, -0.1924354732, -0.1908165514, 0.0337104835, 0.0553313866, -0.2769656777, 0.3419545293, 0.1261819303, -0.4228163064, -0.1077387258, -0.1517353654, 0.1283309162, 0.260507226, 0.0372667126, -0.4263400137, -0.3310598433, -0.3691377938, 0.0153497448, -0.0511793382, 0.0413539186, 0.0808202028, 0.1399012357, 0.2029253393, -0.2439489812, -0.1427309811, 0.191476956, -0.0776704699, 0.1080354825, 0.1253314018, -0.0303895492, 0.3905186355, -0.1557262242, -0.1167278215, 0.1853380948, 0.0732200071, -0.0771494284, -0.0613899454, 0.1893731207, 0.2049025297, -0.1101851836, -0.0476793796, -0.2540997863, 0.077239804, -0.4438062012, 0.2715402246, 0.3231216371, 0.0687292814, -0.1394195557, 0.1464876235, -0.0420567021, -0.105266422, -0.0374788977, -0.1940354407, 0.406779319, 0.1452095956, 0.1737909168, 0.2661371529, 0.086408183, 0.00273057, -0.058171872, 0.2556657493, 0.3912896812, 0.1391524971, -0.2817209363, 0.0091888933, -0.0093170954, 0.0877390876, 0.1118070558, -0.1098466143, -0.385548681, 0.3469543755, 0.006165416, 0.1675996929, -0.0860013142, 0.0664688423, -0.2295812666, -0.0495781489, 0.488873601, 0.1787821054, 0.098316744, -0.0034018597, 0.0161502343, 0.4908654094, -0.174336344, 0.030838199, -0.2170121819, 0.0416655652, 0.4911318421, 0.3654717207, 0.0658308566, -0.0110051371, 0.5228967071, 0.177636072, 0.0692606419, 0.3879830837, 0.0145954043, 0.041226238, -0.2444340587, -0.0556931682, 0.1413013935, -0.2105816007, 0.3062292635, 0.2023255825, -0.0969419107, -0.416574806, -0.0124938702, -0.222988382, 0.1945795268, -0.2766157687, -0.2702249587, 0.2230633646, -0.1256964505, 0.1343893558, 0.4146280587, -0.1829533726, -0.1224095672, 0.1584742516, 0.1388183683, -0.1914563328, 0.3510166407, 0.0748238862, 0.102569893, 0.2082947344, 0.0153052667, 0.7186054587, -0.3996396661, 0.138430506, -0.1246139631, 0.2011360228, 0.2932032645, 0.4530896842, -0.2599587142, -0.1737222224, 0.1562869251, 0.0734250844, -0.0617404804, 0.2570312023, -0.0532396026, 0.1493945122, 0.1064755768, 0.0463065766, -0.0061289491, 0.2349720895, 0.1404095888, 0.1613081247, 0.1536078751, 0.1668096483, -0.1433658004, 0.1003962606, -0.1489123702, 0.0240981728, -0.3396231234, 0.0856768414, 0.3113989532, -0.2772238255, 0.3688082695, 0.2808135152, -0.0135310367, 0.2127437443, 0.4522305429, 0.407807827, 0.3765892684, -0.3265293837, -0.192331776, -0.2515756786, 0.3914070427, -0.0224454105, 0.1984595507, -0.5478373766, 0.0420850404, -0.0205493737, -0.0433788188, 0.0044849594, 0.174730733, -0.1757800132, 0.1482003182, -0.3036430478, -0.1035673469, -0.0763941035, -0.1082214937, -0.1096824706, -0.467241168, 0.3492944837, -0.1440925747, 0.0327429138, 0.0726814345, 0.1453407109, -0.2700289786, -0.1587572247, 0.4588567317, 0.2459576726, 0.1691597402, -0.2327439189, 0.0059667421, -0.2120884955, -0.0001608324, -0.3116272092, 0.0455616675, 0.0111170188, 0.34007442, -0.2860618532, 0.0865052789, -0.3210941851, 0.1406546086, 0.2385006845, 0.023211401, 0.1386778504, -0.0741586462, -0.2107340097, -0.001598101, 0.1609108746, 0.5694401264, 0.0424067527, 0.1978938431, -0.2249978036, -0.0082821669, 0.2339943647, -0.3523562253, -0.5315514803, 0.3948780298, 0.0739599764, 0.249863103, -0.1458753496, -0.3200003207, -0.0253369808, 0.1369528621, -0.2490014732, -0.140920341, -0.0034687582, 0.0467935093, 0.0967405587, -0.0225265063, 0.3537876308, 0.1031756103, -0.4071533084, -0.0464942046, -0.2741340399 ]
https://github.com/huggingface/datasets/issues/643
Caching processed dataset at wrong folder
The code you wrote should write a 1GB file in the Google Drive folder. Doesn't it?
Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ```
16
Caching processed dataset at wrong folder Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ``` The code you wrote should write a 1GB file in the Google Drive folder. Doesn't it?
[ -0.0446972065, 0.1795122921, -0.0474339724, 0.4067885578, -0.0353465229, -0.0158606544, 0.3132925034, 0.0269284993, -0.0032728014, 0.2124623507, 0.0527833179, 0.2332564294, 0.0173065271, 0.4683628082, -0.0888159275, 0.3117386997, 0.2533088923, -0.0614045523, 0.0652198792, -0.0793858841, -0.3149402738, 0.3846561313, -0.2003741264, -0.0362800397, -0.500323832, -0.1209212467, -0.1952659637, -0.0283287037, -0.0948129743, 0.2490338385, 0.1699592322, 0.032848794, 0.2113139182, 0.6244878173, -0.0001260697, -0.1791576743, 0.2552548945, -0.2370761335, -0.1875327826, -0.0942381546, -0.2913306355, -0.0120649906, -0.1296517104, -0.0519672036, -0.1738841385, 0.1368011236, 0.2410813123, -0.5128409266, 0.0125836423, 0.2712925076, 0.0960834548, -0.4741631746, -0.4019342661, 0.3541022241, 0.1001480296, 0.2302197665, -0.0978729576, 0.2973213792, -0.00641461, -0.1276717037, -0.0666756928, 0.3040252626, -0.0224507563, -0.0017922161, 0.2682514191, 0.3478747606, -0.3101863265, -0.3176039159, 0.5124370456, -0.4732308984, 0.3450901508, -0.3447908759, -0.1621992141, -0.2686658502, -0.3249445558, -0.3767520487, 0.527546227, 0.1636802405, -0.1465067565, 0.0504786521, -0.496620506, -0.2640629411, 0.0583115183, 0.0859935433, -0.2157357931, 0.3035002351, -0.2949536443, 0.0281176344, -0.0502059385, 0.2880084217, 0.6402246356, -0.3850523531, 0.0206759907, 0.1959231347, -0.0750692934, 0.0538780168, -0.1898902208, 0.5359111428, -0.2053766996, -0.080694586, -0.2508225739, -0.1914848089, -0.0957581252, 0.0858408287, 0.0577563494, 0.4821521938, -0.0581907853, 0.1287788451, 0.0558158867, 0.0115776807, -0.4982736409, -0.0858848318, -0.0615557767, -0.2610616684, -0.0232869163, 0.1011673212, -0.0176242534, -0.2813466489, -0.1566878408, -0.0024421043, -0.3255878389, -0.0047461228, 0.0736409649, 0.254573971, -0.0352054052, -0.1727344245, -0.2061344385, 0.2438771874, -0.2096228898, 0.325751096, -0.0973587558, 0.0834292248, -0.3553805649, 0.4614125192, 0.064357698, -0.2175327539, 0.1618286967, -0.0303345695, 0.0486509204, -0.3234559298, -0.0199803449, -0.4359336197, 0.346786797, 0.1586117595, 0.1547555327, 0.4147903621, 0.0052950401, -0.31180197, -0.1208234727, 0.2784830034, -0.6148866415, -0.2724707127, 0.1674014628, 0.0043113464, -0.2542262375, -0.0784915015, -0.7056849003, 0.1296863407, 0.5126652122, -0.2033642828, 0.0143642686, -0.0296661966, -0.4853774607, -0.2789666653, 0.0931208804, 0.1397346705, -0.2764249444, 0.2111439854, -0.324093312, 0.5097717643, 0.5368672609, 0.4086744487, 0.0867169648, 0.3118776083, -0.480671674, -0.002311548, 0.1090579107, -0.2603106201, -0.7887854576, 0.3294821084, -0.0921200216, -0.0341039971, 0.0108741932, -0.0524565689, 0.2498146147, -0.1281842887, 0.2223533243, 0.118407391, 0.0447632372, 0.1605666727, -0.2890419066, -0.141553238, -0.0388856158, -0.1678702533, 0.0084934095, 0.1557977498, 0.0203556214, -0.3486267924, 0.1816390157, -0.096856907, 0.1932919323, 0.2729936242, 0.2430144548, -0.1512927413, -0.0257408489, 0.192305088, -0.1705404967, 0.1176256761, 0.005134915, -0.1445206553, -0.4764552712, -0.1168648526, -0.1284797192, -0.1662072092, -0.1146266311, -0.2664224207, -0.0477709025, 0.2823027968, 0.1235270649, 0.0425948203, -0.0230107177, 0.5242789388, 0.1113479063, -0.1764963716, -0.0565920658, 0.2039709091, -0.1602295637, -0.2727031112, -0.1193595976, -0.1635744721, 0.1950162202, -0.2037997991, -0.176429525, 0.146366924, 0.239962697, 0.3614382446, 0.0290910974, 0.2707651556, 0.0838490501, 0.0333191566, 0.209800303, -0.0554023311, -0.0060467925, 0.1278682947, -0.1146659255, 0.2786547542, -0.0739003792, 0.1376665086, -0.088008441, -0.2931885421, -0.1379476041, 0.1056082025, 0.2040585876, -0.1038913503, 0.10001681, 0.3206191063, 0.3659140766, 0.2343897969, 0.2518414855, 0.3290373981, 0.6469291449, 0.0343540497, -0.0320183635, 0.1619457304, -0.1168717444, -0.3037322462, 0.2609198391, 0.457529217, 0.4510045946, -0.0714945644, 0.3330639601, 0.1795521975, 0.0596503355, -0.146026805, 0.1589974612, 0.0625513569, 0.2426036447, -0.0450444706, 0.2130969912, -0.0463405587, -0.0528765693, 0.1504991502, 0.0499274582, 0.2370590419, -0.1375341117, 0.52236408, -0.2170301378, -0.2122850418, -0.2391373515, -0.2586256266, 0.089601852, -0.1758667976, -0.137831226, 0.2729138732, 0.0500508882, -0.0241101682, 0.2173446864, 0.2124044746, -0.0968777612, -0.4409403205, -0.093419835, 0.1598259509, -0.272813499, -0.0783885196, 0.3454493582, -0.0601837039, 0.0677393749, -0.1669666767, 0.0556155369, -0.3132526278, -0.1032667533, 0.2399734855, -0.1826259345, 0.2825630903, -0.2589118183, 0.004353533, -0.4489740133, -0.3210090995, -0.114205204, -0.0281107221, -0.1064752936, -0.4497766197, 0.0043180366, -0.0534782074, -0.1324048042, -0.0062672999, -0.1664133519, -0.0508486815, 0.1070087105, 0.046280399, 0.282414794, -0.0013548133, -0.0263721701, -0.1866545081, 0.4291412532, -0.2935031056, -0.3800827563, -0.6091431379, 0.2402901053, -0.1338402778, -0.0644774362, 0.0137088969, -0.0646500438, 0.110076718, 0.3217846155, -0.418318361, -0.2801472545, -0.1830430478, -0.0565824732, 0.1905385256, -0.0270394366, 0.2956297398, 0.0346343406, 0.1806825101, -0.0232599974, -0.4232107997, -0.0011002622, 0.3015036881, 0.3348652124, -0.0046830731, 0.260940969, 0.0532181598, 0.5737910271, 0.3420696557, 0.0703264251, 0.4111798108, -0.018538978, 0.283570528, -0.2689016461, -0.0825404823, 0.3358346522, -0.0045603523, -0.6965684891, 0.3890520334, 0.1380960047, -0.4020673633, 0.1778075695, -0.2560752928, -0.2944075763, -0.1955453604, 0.2278750986, 0.0192515273, 0.1546320766, 0.0519254506, 0.1103790104, -0.2017570585, -0.2173902988, 0.0626596659, 0.0561021827, 0.2871220708, 0.1901310831, 0.3035386801, -0.4826381207, -0.4505155385, 0.3193285465, 0.3583855033, 0.0268736221, -0.0282573923, 0.2993694246, 0.2221173048, -0.1431094259, 0.5819001794, -0.3227647543, -0.2359461784, -0.172220096, 0.0360447951, 0.0184007529, 0.0002365723, 0.0674708858, 0.4076422155, -0.0278031435, 0.4173496962, 0.3009569645, 0.023245059, -0.0766070932, 0.2138882577, -0.2958989441, -0.1170051545, -0.2367080599, -0.5745478272, -0.2460455894, -0.0253196452, 0.2117003798, 0.0146662481, 0.0607150123, -0.0048601981, 0.1458209157, -0.0785792693, 0.0907556191, 0.1310395151, 0.4218706489, 0.15771465, -0.1334289163, 0.0870029181, 0.2162811756, 0.326094985, 0.5480579734, 0.1665851921, 0.2173841149, 0.2050192505, -0.2190314084, 0.3270570636, 0.3367364407, -0.1730908006, -0.254338026, -0.0812732577, 0.0071181473, -0.3672322929, 0.363633275, 0.1331376731, 0.3152448535, -0.4551063478, -0.4510668814, 0.4400534034, 0.1708372533, -0.259547025, 0.3553854227, 0.0819831714, -0.5158581138, 0.4137577713, 0.1381798983, 1.1279286146, -0.0231650881, 0.2007927746, 0.0686907098, 0.081809707, 0.0057591232, -0.3252649605, 0.2268909216, -0.1491577625, -0.6130785942, -0.0723866299, -0.1585839689, -0.2013927549, 0.0647545233, -0.2076790333, 0.4101579785, 0.0273536146, -0.0350209922, -0.0974771976, -0.0545840375, -0.0675396472, -0.1100803614, -0.1576212347, 0.0595993735, 0.0056403023, 0.4071374238, -0.1616105437, 0.1993333399, -0.1928610057, 0.0326418728, -0.1974646151, -0.0513986796, -0.3769134879, -0.0154411457, -0.3699805737, -0.298874408, -0.1157844514, 0.319170028, 0.5089957714, 0.2731176019, 0.0094286492, -0.0298536047, 0.0898998082, 0.2153795063, 0.0090977186, -0.4728893638, 0.012827374, 0.0297751445, 0.1223494709, -0.2711938024, 0.1495260894, -0.3859470189, -0.0631943047, 0.1162365004, -0.116757527, 0.0370575376, -0.2118512988, -0.0182977412, -0.1191812828, 0.0690051913, 0.0394491665, 0.0435188152, 0.2638120055, 0.4571985006, -0.4170373976, -0.4305546582, -0.2661254406, 0.1776323318, 0.3450032175, 0.0716157034, 0.4960004091, -0.2081112266, -0.1910767108, 0.0185073968, 0.0000647218, -0.1955669224, 0.3140621781, 0.1060145721, -0.437708348, -0.0703069419, -0.1496838033, 0.0698464811, 0.3320937753, 0.0437689722, -0.3825743198, -0.2999256849, -0.4178442061, 0.0382336192, -0.0361524709, 0.0407303274, 0.0147996377, 0.1367592812, 0.2235814482, -0.1935917139, -0.192851603, 0.1412617862, -0.0920390338, 0.0669262037, 0.0898922235, -0.0069837775, 0.429052949, -0.1722291261, -0.0915495083, 0.166373089, 0.0423536003, -0.1221254766, -0.0323458537, 0.156682536, 0.2242706865, -0.036069721, -0.0263477862, -0.2317686379, 0.0401276201, -0.457518369, 0.2492558956, 0.3022358418, 0.1360568553, -0.205019325, 0.1941809207, -0.1127571464, -0.0335187912, -0.1197798178, -0.1145361885, 0.3726639748, 0.1349272728, 0.2175254226, 0.3037365377, 0.0779421329, 0.0291689895, -0.0210776869, 0.1902551353, 0.4145395756, 0.1018230021, -0.2399726659, 0.0245176591, -0.0547638573, 0.1027780473, 0.1373426616, -0.0889266357, -0.3767092824, 0.3508295119, 0.0365207195, 0.1507930011, -0.0523606688, 0.0547361411, -0.2197597921, -0.0100613348, 0.5260447264, 0.1290272325, 0.1877488792, -0.0440781005, 0.0206919387, 0.5375123024, -0.1673855036, -0.0024450722, -0.2392360419, 0.0114917224, 0.4959448874, 0.4118015766, 0.0894748569, -0.014721645, 0.4912986159, 0.1121211424, 0.1070730463, 0.36793226, -0.0412073508, -0.0124511942, -0.185786292, -0.0598007701, 0.1554000229, -0.1773816794, 0.3018843234, 0.2154381722, -0.0786966011, -0.3884580433, -0.0414210446, -0.2103201449, 0.2080654353, -0.2081900686, -0.2179648429, 0.2021919489, -0.1233750358, 0.0614826046, 0.4115558863, -0.133823961, -0.1926843077, 0.1497223675, 0.0943594128, -0.2575371563, 0.3588055074, 0.032256335, 0.0874737725, 0.1497799456, 0.0274600051, 0.7081150413, -0.4393173456, 0.1149683148, -0.1275028884, 0.1237793118, 0.3178446889, 0.4450242817, -0.2584784925, -0.1782467067, 0.1497452557, 0.0477907918, -0.1281426996, 0.225349158, -0.0409546494, 0.0705203936, 0.0697557032, 0.0933058411, -0.0532025285, 0.1945134848, 0.1485282779, 0.145756349, 0.2058077157, 0.1708897948, -0.172792092, 0.1114584804, -0.1520688832, 0.0414843857, -0.4139540792, 0.1071758941, 0.2566114664, -0.2570854425, 0.3453411758, 0.2927152216, 0.0105912667, 0.1742861271, 0.4269961417, 0.4116213024, 0.3664236665, -0.3534594774, -0.1867630184, -0.3090299368, 0.3833360374, -0.0509148724, 0.1405676305, -0.5579476357, 0.1094648018, -0.011994279, -0.0461657569, -0.0060199294, 0.1920228302, -0.138564378, 0.1270840317, -0.2760285735, -0.1136431098, -0.0776509717, -0.0166890435, -0.0771117359, -0.4317475855, 0.3348554075, -0.1419654489, 0.0563005134, 0.0217560139, 0.0962530449, -0.2522622645, -0.1563680172, 0.4937505722, 0.1967358589, 0.1923655272, -0.2603973746, 0.000312967, -0.2698325217, 0.0980951637, -0.3428789079, 0.0407127365, -0.0193720572, 0.3388944864, -0.281599462, 0.0439135693, -0.3746963441, 0.1420729309, 0.2724717259, 0.0337096676, 0.1308256388, -0.0283606499, -0.2041527182, 0.0594848059, 0.1460770965, 0.5029762387, 0.0188889243, 0.235562399, -0.2690111697, -0.0395551249, 0.2869607806, -0.315687716, -0.5447865725, 0.3355141878, 0.0593460537, 0.2711541951, -0.1600672752, -0.2820849717, 0.0071514817, 0.1244506612, -0.2202488482, -0.2036886811, 0.0575488321, 0.0194393713, 0.1309790164, -0.046945069, 0.3310012519, 0.0756133199, -0.3983119726, -0.0506492555, -0.2439451963 ]
https://github.com/huggingface/datasets/issues/643
Caching processed dataset at wrong folder
I could check it and as you say as I write to te Drive disk the colab disk also increases...
Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ```
20
Caching processed dataset at wrong folder Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ``` I could check it and as you say as I write to te Drive disk the colab disk also increases...
[ -0.0909002498, 0.0898179933, -0.0347920954, 0.4908718765, -0.0633707717, -0.0270623807, 0.2676790655, 0.0049587754, 0.024215566, 0.227923587, -0.0148067949, 0.2577181458, 0.0650782213, 0.46861431, -0.0855878443, 0.3258921802, 0.2614868581, -0.0908619761, 0.0236125942, -0.0889640003, -0.3442031145, 0.3814181685, -0.1878896952, -0.0883717537, -0.4606525004, -0.14890562, -0.1486402303, -0.0555908345, -0.0616810881, 0.2551704049, 0.1518822163, 0.047634501, 0.2141139209, 0.6586299539, -0.0001266875, -0.2107377648, 0.1852642596, -0.2339998633, -0.197298184, -0.0303514861, -0.291354388, -0.0428781658, -0.0804465041, -0.0939844772, -0.1805125773, 0.1525767595, 0.1875964105, -0.4624532461, 0.0369794965, 0.2215132117, 0.0815561861, -0.4583999813, -0.472329706, 0.3777892888, 0.0973053277, 0.2221824974, -0.1482014209, 0.322209537, -0.0102287158, -0.0661059693, -0.1228183806, 0.2910982072, -0.0457292609, 0.0100273779, 0.2436987609, 0.3522852361, -0.2692081034, -0.3386739194, 0.6088121533, -0.4549605548, 0.3356358111, -0.3624154329, -0.1185457483, -0.276568383, -0.2856236994, -0.375787288, 0.5314128995, 0.138943702, -0.147815153, 0.0686530471, -0.4924885631, -0.2548328936, 0.0755868703, 0.0571189262, -0.2038836628, 0.2674260139, -0.2745116949, 0.0091092288, -0.0179538392, 0.2676404715, 0.7121447921, -0.3867539763, -0.0097834719, 0.2255639285, -0.1349747926, 0.0430148914, -0.176112175, 0.5634053349, -0.2399386019, -0.1454801261, -0.2318121046, -0.1449788064, -0.1336896569, 0.1113656461, 0.0579790138, 0.4367699623, -0.0656071678, 0.1153589785, 0.0733885616, 0.0440182947, -0.4660322666, -0.0788129121, -0.0530330986, -0.2441564053, 0.0195788145, 0.0858406648, -0.0243463404, -0.2801482975, -0.1593988091, -0.0670680404, -0.2925984561, 0.0194888711, 0.0709376633, 0.2782580256, -0.0084350128, -0.1163732633, -0.2690791786, 0.224453792, -0.1827167869, 0.3975836635, -0.0862434134, 0.0280138403, -0.3113509119, 0.4865096509, 0.0744591504, -0.2300518006, 0.1022623479, 0.0751509592, -0.0056708572, -0.332251519, -0.1181937605, -0.4248939455, 0.335398674, 0.1824309081, 0.1418439597, 0.3487936258, -0.0752955154, -0.2226864696, -0.1101972833, 0.2607311308, -0.6085548401, -0.2279902548, 0.1420246661, -0.0007226429, -0.2446968108, -0.0833468661, -0.7278814316, 0.0973593146, 0.4525424838, -0.1691075414, 0.0063450998, -0.0134534128, -0.4763545692, -0.2047983557, 0.0397766121, 0.1366305351, -0.2087152302, 0.182603389, -0.3155361712, 0.5325462222, 0.4800925255, 0.4041323066, 0.0826627836, 0.2509360313, -0.5047851205, -0.1302545965, 0.0681142136, -0.2428760827, -0.8206087947, 0.2948429286, -0.0977444872, 0.0086050574, 0.0828308836, -0.0241563693, 0.2168328911, -0.0997235999, 0.1954144835, 0.1250829697, 0.07380566, 0.2005303204, -0.3050264716, -0.1327730417, -0.1084550917, -0.1719166785, -0.002899308, 0.1939235479, 0.0233738311, -0.3604535758, 0.1965494156, -0.1077613384, 0.1663273871, 0.2490557283, 0.2758972049, -0.2232209444, -0.0158253089, 0.1475936919, -0.1878913641, 0.0984162018, 0.030998379, -0.1838447601, -0.4914021194, -0.1147516891, -0.1692595184, -0.1446655244, -0.1153861061, -0.2338030189, -0.0712444112, 0.3111443818, 0.097951442, 0.0034813427, -0.0143397842, 0.526315093, 0.086015895, -0.1585881859, -0.0184127744, 0.2007095814, -0.0831225961, -0.2301698476, -0.1330535412, -0.1328959316, 0.1908376217, -0.2405848205, -0.1907077432, 0.0976369679, 0.2659993768, 0.4339229167, 0.0383329466, 0.2717315555, 0.119079046, 0.0998930931, 0.214497149, -0.0961882174, -0.0499376431, 0.1104997322, -0.0246757101, 0.2426782548, -0.0756837353, 0.161713928, -0.1038875654, -0.3116765022, -0.0743964016, 0.0543082692, 0.3153130114, -0.1267092079, 0.0170020536, 0.3911197782, 0.4046424627, 0.2553060353, 0.2483256161, 0.3756074607, 0.6352422833, 0.077317223, -0.0819763169, 0.2210303098, -0.1640895009, -0.3080348074, 0.2351092249, 0.5566409826, 0.4196313322, -0.0789888576, 0.3083800077, 0.2244250029, 0.0988957658, -0.1601508409, 0.19387272, 0.0511636585, 0.2598303556, 0.0632750168, 0.244445473, -0.0309987534, -0.0644109622, 0.1818398833, 0.0606857277, 0.238208428, -0.1505657583, 0.5132131577, -0.2193126678, -0.2198528796, -0.253724575, -0.2095602006, 0.1171368584, -0.1727665365, -0.1311655492, 0.3562391698, 0.0576350316, -0.0108535429, 0.2667399943, 0.227563858, -0.1232322901, -0.4242447913, -0.1358308643, 0.1687889397, -0.2426113039, -0.0781315863, 0.3596921265, -0.0710117668, 0.0865672603, -0.1987025291, 0.0729769096, -0.3626459241, -0.1350431889, 0.2516102791, -0.1367729902, 0.307351619, -0.2948589921, 0.0065402235, -0.4329469502, -0.3261020184, -0.1517669857, -0.0480664074, -0.1187815219, -0.4421815276, -0.0419284776, -0.0632461533, -0.1138278767, 0.020172596, -0.1713446826, -0.0622776188, 0.099983573, 0.0376609415, 0.3234494925, 0.0060569174, -0.0844253898, -0.1918917745, 0.4517861307, -0.2782469392, -0.3682190478, -0.6094021201, 0.2131614536, -0.0835438073, 0.0003338784, 0.0212866757, -0.1330575347, 0.1271718889, 0.3549331427, -0.4617932737, -0.3288874924, -0.1489284933, 0.0233003031, 0.190487504, -0.0547219776, 0.2663660049, 0.0645633265, 0.1716391146, 0.0243138559, -0.4264401793, -0.0048503126, 0.3264304698, 0.3931534588, 0.0035664332, 0.2174668759, 0.010487048, 0.5704644918, 0.2698994577, -0.020593049, 0.4525628388, -0.0104250712, 0.2274506092, -0.2605684996, -0.1322252899, 0.2276982367, 0.020328518, -0.6987560987, 0.4155741334, 0.0959088579, -0.4083206356, 0.1828234345, -0.3095017374, -0.2439014167, -0.2038914561, 0.2121490091, 0.0300385151, 0.2055121064, 0.0212331954, 0.1008073166, -0.1913898289, -0.2594246864, 0.0551404916, 0.0401587263, 0.2412414253, 0.1229618415, 0.3073000014, -0.4604548216, -0.4348341823, 0.334154129, 0.3555980027, -0.0023160533, -0.0438426174, 0.2870716453, 0.2458268255, -0.1482653916, 0.5649100542, -0.3025718927, -0.1659478843, -0.1720980555, 0.028918067, 0.0175499022, 0.0298031885, 0.0448259562, 0.3730850816, 0.0043944805, 0.5102786422, 0.3682122827, 0.0015426134, -0.0915673226, 0.2732629776, -0.3322291672, -0.172917366, -0.1844392419, -0.5728096366, -0.1761687398, 0.0130244605, 0.1412499696, 0.0300490111, 0.0221446417, -0.0319687501, 0.1181977689, -0.1086960286, 0.0976109207, 0.1747452766, 0.4427562654, 0.2253115922, -0.091456078, 0.0405407883, 0.2281245291, 0.3766056895, 0.5109021664, 0.1520318538, 0.2301544845, 0.1836990863, -0.2098181695, 0.2359925508, 0.3207582533, -0.1442792267, -0.1745631099, -0.1821289808, -0.0112456912, -0.3184018135, 0.3036260009, 0.1171123758, 0.3674889207, -0.4066760242, -0.4075479507, 0.4499435127, 0.1345496476, -0.3216316998, 0.2389629036, -0.0022427442, -0.53063941, 0.4041657746, 0.1716744304, 1.111768961, 0.0401866026, 0.176585421, 0.0392426066, 0.0319477618, -0.0652516335, -0.3078402579, 0.1893231869, -0.1908807606, -0.6514497399, -0.0732113719, -0.1613129675, -0.2037960589, 0.0769558921, -0.2160164267, 0.3886811733, -0.0033976655, -0.0716829449, -0.1122513264, -0.0528871827, -0.0460919365, -0.1305936426, -0.2803537846, 0.0377535746, -0.0601430684, 0.3965790272, -0.1411874145, 0.1791494638, -0.1214805767, 0.0727492198, -0.1955318153, -0.0794792846, -0.3821721673, -0.0182941612, -0.3670308888, -0.3077132106, -0.1050221026, 0.3306062222, 0.5086340308, 0.2187629193, 0.0300994441, -0.0138404425, 0.0932264552, 0.2404081672, 0.0285434872, -0.4196963012, -0.0287541132, 0.045471672, 0.0815913454, -0.2918022275, 0.1761637032, -0.3630618453, -0.0291384384, 0.0981051996, -0.1210693717, 0.0322277844, -0.2401295304, 0.0087007927, -0.1003759727, 0.1044994369, 0.0404586568, -0.0503647104, 0.2496074736, 0.5033814311, -0.4237059951, -0.4663744271, -0.2362973392, 0.239101842, 0.3680253029, 0.1011444852, 0.473441571, -0.2448924184, -0.181454584, 0.0002701731, 0.0250365697, -0.2598957121, 0.3429082036, 0.0776615515, -0.3460297585, -0.0873567984, -0.1469554305, 0.0331368297, 0.3445208371, 0.0494187102, -0.4454932213, -0.2655266523, -0.4145762026, -0.0005247063, -0.0301437452, 0.0728257447, 0.0513028949, 0.1242001653, 0.1792029142, -0.1231447682, -0.1842484027, 0.1778454185, -0.0687738284, 0.1079053953, 0.1092500165, -0.0445647389, 0.4041938782, -0.1749345213, -0.0894474164, 0.1353371739, 0.0723470598, -0.1188267693, -0.0061151846, 0.1551076025, 0.1744978279, -0.0285286978, -0.1091036871, -0.2261293381, 0.083310917, -0.4550172389, 0.3012822866, 0.2682910562, 0.1576909572, -0.167320773, 0.1907923669, -0.1116957441, -0.0656145737, -0.073665522, -0.1129292175, 0.3603917062, 0.1441702545, 0.2214201093, 0.2751778364, 0.0632536039, 0.0111394553, -0.0444084592, 0.2156650275, 0.3725348413, 0.090857245, -0.1623176783, 0.0083145769, 0.0030544724, 0.0255273487, 0.1160372943, -0.0616759993, -0.4699501991, 0.3420878351, 0.0489590839, 0.1168970242, -0.0590607338, 0.111525692, -0.2292786241, -0.0432576239, 0.516887784, 0.1539981216, 0.13168028, 0.044082582, 0.0327840373, 0.5230232477, -0.1982859522, 0.0246884208, -0.2192222774, 0.01805727, 0.4865019917, 0.4259887934, 0.0942510292, -0.0261397474, 0.47932145, 0.0896814242, 0.0908980742, 0.3561839461, -0.0500974879, 0.0549434423, -0.1865665913, -0.0388187692, 0.1921583414, -0.2290360779, 0.248880133, 0.2621863484, -0.0514821969, -0.3562254012, -0.0759625733, -0.2727500796, 0.2419855148, -0.2199639678, -0.2384084463, 0.2570858002, -0.1364897341, 0.108802855, 0.4127171636, -0.1660004705, -0.1683588773, 0.1964527518, 0.145678997, -0.2558960021, 0.3493221402, 0.01033023, 0.1349763125, 0.1556819379, 0.0422731228, 0.7475678921, -0.4142763317, 0.1408898383, -0.1750689149, 0.1564680934, 0.2523055375, 0.4177720845, -0.243599847, -0.2142859995, 0.2119776011, 0.0734438598, -0.1310042292, 0.1941263974, -0.0987378657, 0.0808148682, 0.0563204214, 0.0752585903, -0.0412347838, 0.213066414, 0.1265199631, 0.1920006126, 0.2290848941, 0.1382927746, -0.1069687679, 0.0859757736, -0.1110325456, 0.0139107825, -0.358921051, 0.0974492356, 0.2541071177, -0.3553038538, 0.3786211312, 0.2719305456, 0.006804341, 0.134221077, 0.4763183296, 0.3950312436, 0.3025307059, -0.2944333851, -0.1898591369, -0.2639845312, 0.3594505191, -0.0134936832, 0.1397279054, -0.5812433958, 0.0616459027, -0.0707524121, -0.0522552617, 0.0035259142, 0.1889205426, -0.1334936023, 0.1061548814, -0.3326286674, -0.0784466192, -0.088429004, -0.0156106278, -0.0666601062, -0.4335344732, 0.3351229429, -0.1234756634, 0.0484895781, 0.0505676977, 0.161329329, -0.2314793169, -0.1227805167, 0.4660207927, 0.203521654, 0.1742150635, -0.2906888127, 0.0410779752, -0.1961378753, -0.0451881327, -0.3456784785, 0.0302921161, 0.0224215761, 0.3042701781, -0.1964486688, 0.0540573113, -0.3024549484, 0.1461643875, 0.2656726539, 0.0278429054, 0.1670300514, -0.0894474611, -0.1717294604, 0.0250689071, 0.0971112847, 0.5377412438, 0.0824894831, 0.2462518662, -0.1996487826, -0.0883891806, 0.2424051762, -0.2692516446, -0.5248529315, 0.3899616301, 0.0918866545, 0.2048324496, -0.212650463, -0.2469799966, 0.013412009, 0.1386603564, -0.2424544841, -0.1393658072, 0.1419805288, 0.0024187728, 0.143782571, -0.0412589014, 0.3298477829, 0.0980604067, -0.4087775052, -0.0612628609, -0.2565208673 ]
https://github.com/huggingface/datasets/issues/643
Caching processed dataset at wrong folder
To reproduce it: ```bash !df -h | grep sda1 ``` ```python f = open("/content/drive/My Drive/test_to_remove.txt", "w") f.write(("a"*511 + "\n") * ((1 << 30) // 512)) # 1GiB f.write(("a"*511 + "\n") * ((1 << 30) // 512)) # 1GiB f.close() ``` ```bash !ls -lh /content/drive/My\ Drive/test_to_remove.txt !df -h | grep sda1 !rm -rf /content/drive/My\ Drive/test_to_remove.txt ``` [Colab](https://colab.research.google.com/drive/1D0UiweCYQwwWZ65EEhuqqbaDDbhJYXfm?usp=sharing)
Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ```
56
Caching processed dataset at wrong folder Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ``` To reproduce it: ```bash !df -h | grep sda1 ``` ```python f = open("/content/drive/My Drive/test_to_remove.txt", "w") f.write(("a"*511 + "\n") * ((1 << 30) // 512)) # 1GiB f.write(("a"*511 + "\n") * ((1 << 30) // 512)) # 1GiB f.close() ``` ```bash !ls -lh /content/drive/My\ Drive/test_to_remove.txt !df -h | grep sda1 !rm -rf /content/drive/My\ Drive/test_to_remove.txt ``` [Colab](https://colab.research.google.com/drive/1D0UiweCYQwwWZ65EEhuqqbaDDbhJYXfm?usp=sharing)
[ -0.0841227099, 0.1945448816, -0.0163263883, 0.4593134522, -0.0439057387, -0.0728671029, 0.3859434426, 0.030553652, 0.033721216, 0.2072657049, -0.0354525633, 0.2843729258, 0.0471326411, 0.405802995, -0.1138570905, 0.3554212451, 0.277764231, -0.1252812594, -0.0011572756, -0.1184546426, -0.3421108425, 0.3819751441, -0.2049855292, -0.0256493408, -0.4567474127, -0.0956496, -0.147344172, -0.0011716028, -0.0159745049, 0.2834332585, 0.1546799839, 0.0342305638, 0.2064485699, 0.6668279171, -0.0001267947, -0.1738705635, 0.2114758343, -0.2006002963, -0.2727821469, -0.101995647, -0.3044108152, 0.0360214375, -0.1111781448, -0.0811381638, -0.1309182942, 0.1151061207, 0.1956803799, -0.5906013846, -0.021709092, 0.2646553814, 0.0812927485, -0.4493578672, -0.5469540358, 0.3519180417, 0.112133041, 0.2696867883, -0.1255563796, 0.2454708666, -0.0296037532, -0.1314676702, -0.0899723023, 0.3205049634, -0.1109801978, -0.0286938976, 0.224293679, 0.3244672418, -0.3142948747, -0.2437789589, 0.5524445772, -0.4051459432, 0.3221744895, -0.3460016549, -0.1634962112, -0.3033886552, -0.3498371542, -0.3369373679, 0.5142974257, 0.1225768253, -0.0838440582, 0.0870276764, -0.5243648887, -0.1893934906, 0.0964753181, 0.0881539956, -0.2207660526, 0.2885015309, -0.2636705935, 0.0324778408, -0.0383785218, 0.2351330817, 0.6513155103, -0.4771047533, 0.012943143, 0.2287503183, -0.1191158593, 0.1084958464, -0.1420406699, 0.4823614359, -0.2183915824, -0.1262339652, -0.2273811549, -0.1387717724, -0.1228207871, 0.09688095, 0.0549011119, 0.4719406068, -0.066796504, 0.1334535033, 0.0674370006, 0.0957630351, -0.4957550168, -0.0539301895, 0.0051824497, -0.2332229167, -0.0355140716, 0.1311546564, -0.0165153723, -0.2762653232, -0.2102953345, 0.0187313724, -0.3704523444, -0.0185113698, 0.0934006721, 0.2619768977, -0.0247534309, -0.1263897568, -0.2220384479, 0.2480699569, -0.2516384423, 0.4041091502, -0.1224166304, 0.0474492013, -0.3677769899, 0.422129035, 0.0711667091, -0.2111283392, 0.1136211976, 0.0618331581, -0.0047398475, -0.3111231625, -0.0762211308, -0.4326266646, 0.4141174853, 0.111244306, 0.1141542569, 0.4161488116, 0.0264520552, -0.2670828998, -0.0823545083, 0.2368802279, -0.5531476736, -0.2045002878, 0.1599126011, 0.0041204011, -0.2979139984, -0.0669917539, -0.6956055164, 0.1260886043, 0.403411746, -0.1562401056, 0.0185714047, -0.0514682308, -0.4866923094, -0.2335226685, 0.0505957864, 0.1709022224, -0.2770161331, 0.1444512457, -0.3489134908, 0.5182400942, 0.5450222492, 0.4078441262, 0.0712292343, 0.2802246511, -0.511520505, -0.0195446759, 0.0752296895, -0.2570968568, -0.7950390577, 0.337769419, -0.0835520551, 0.0778088868, -0.015745936, -0.0586845912, 0.197332263, -0.1049477085, 0.1535240859, 0.13607274, 0.1003889889, 0.1800668091, -0.2769971192, -0.1262809038, -0.0409163497, -0.1735575944, 0.0368152671, 0.172534138, 0.047665678, -0.3246938586, 0.1804222018, -0.116600357, 0.1493273228, 0.2664096951, 0.2396842986, -0.1233286783, -0.022479495, 0.1364759505, -0.2220257223, 0.1532648504, 0.0340713821, -0.1538008004, -0.512519598, -0.1051219031, -0.1252609342, -0.1472774446, -0.1138539463, -0.2297271639, -0.0633672178, 0.3790795505, 0.094151713, 0.0542889088, -0.0053921123, 0.5049633384, 0.087743409, -0.1718441248, -0.0558092296, 0.188889429, -0.1316523254, -0.2515572309, -0.1695167124, -0.1328743994, 0.2208892554, -0.2341689318, -0.183390379, 0.1453887969, 0.2613752782, 0.423281163, -0.0350135788, 0.2826691866, 0.0854926035, 0.1074392274, 0.1793876737, -0.0734494179, -0.0230700672, 0.1655795574, -0.1058249399, 0.281768024, -0.11350137, 0.1841134876, -0.1023151055, -0.3243633211, -0.0864484385, 0.0631370619, 0.2896332741, -0.131616503, 0.0799007267, 0.3997073174, 0.3467099369, 0.2356553972, 0.2422428578, 0.3499768674, 0.6368630528, 0.0411727168, -0.0480862968, 0.1404187232, -0.0809065104, -0.2828870118, 0.275200665, 0.5394603014, 0.4638065994, -0.0988676995, 0.3149522841, 0.1691282094, 0.086285226, -0.1600847542, 0.2028652877, 0.0676128045, 0.2505052388, 0.0337446146, 0.2440981865, -0.0421399735, -0.090477787, 0.1334926486, 0.0407065637, 0.2235365808, -0.1144714803, 0.5990409851, -0.3186648488, -0.2106163651, -0.2102442533, -0.2406887412, 0.1269746274, -0.2022584528, -0.132225439, 0.3160973787, -0.0469735898, 0.0264324844, 0.2152579576, 0.1936611682, -0.1426063031, -0.458107084, -0.1588829607, 0.1610167474, -0.2578990757, -0.0891750902, 0.3661744595, -0.0499388874, 0.0422776937, -0.1529657245, 0.0076162163, -0.3925895095, -0.1384722143, 0.261259526, -0.1823775917, 0.3225194514, -0.2217480987, -0.0241664387, -0.439527452, -0.3129887879, -0.0940907449, -0.0256120469, -0.1019077748, -0.4108664691, -0.0089528915, -0.0493566282, -0.1378780305, 0.0002187452, -0.0952605382, -0.0734974593, 0.0395644717, -0.0142235355, 0.2749410272, 0.0180202257, -0.0792427883, -0.1839405447, 0.4457669854, -0.2575637996, -0.3838850558, -0.5558648109, 0.1845141053, -0.0844427794, -0.0193768889, -0.044543881, -0.0801562518, 0.1160566509, 0.4078013599, -0.4832975268, -0.2445379347, -0.1550946832, -0.0202741642, 0.1770355999, -0.0848397166, 0.3010419309, 0.0698691905, 0.1874432266, -0.0501758307, -0.4178805649, 0.0349136926, 0.2792584002, 0.3262370825, -0.0075919493, 0.2600145638, 0.0915994048, 0.5603272319, 0.2719268203, -0.0357673131, 0.4003483653, -0.0069065462, 0.2754006386, -0.2521510124, -0.1157735065, 0.26470837, 0.0552049726, -0.701397717, 0.420953989, 0.0577466078, -0.4382656813, 0.1772969067, -0.2116812766, -0.3041628003, -0.2247137576, 0.2229959667, 0.0012428002, 0.1784543693, 0.0605884157, 0.1398741901, -0.1659089923, -0.2183030844, 0.0834838748, 0.0565795116, 0.3373070657, 0.1339709014, 0.2628168762, -0.448269695, -0.3884062767, 0.3494024575, 0.3611343503, 0.0470247865, -0.0848466158, 0.2404614091, 0.1869643778, -0.1444205344, 0.5466489196, -0.3347465992, -0.1636126637, -0.1299710423, 0.0169891361, -0.01410951, 0.0017945628, 0.0124019878, 0.3665884137, -0.0325380266, 0.5276474357, 0.2805067301, -0.0422107764, -0.1070471555, 0.2349509001, -0.2846835554, -0.1501442939, -0.1825916022, -0.5665209889, -0.2081161886, -0.0184085555, 0.1475915164, 0.0265534073, 0.0363262668, -0.000575681, 0.1285928786, -0.0907081366, 0.1047618538, 0.1362763643, 0.394087553, 0.1735526323, -0.1035952419, 0.0645231903, 0.2168626636, 0.3731350303, 0.5316538215, 0.14160119, 0.1814554334, 0.2140342444, -0.1720279902, 0.236490801, 0.3640688956, -0.1516596079, -0.2099584937, -0.1321109235, -0.0220672563, -0.3369804919, 0.3455789089, 0.157853052, 0.3325905502, -0.3623310924, -0.4115196168, 0.4117584527, 0.1483871788, -0.3303747475, 0.3158076108, 0.0331265777, -0.5511072278, 0.461345613, 0.1280946881, 1.1126841307, -0.0020386036, 0.1784240156, 0.1135695949, 0.0957015231, -0.0194321889, -0.2755329013, 0.200599581, -0.1734853685, -0.5922016501, -0.0799103826, -0.1618945897, -0.2040150166, 0.1059160456, -0.1329106987, 0.4099911153, -0.0166434366, -0.0567096658, -0.0946828499, -0.0610730536, -0.046845194, -0.0961307511, -0.2189693898, 0.0503208302, -0.0369419605, 0.3914656043, -0.149508059, 0.2168742418, -0.197198227, 0.0422705673, -0.1725227684, -0.029981833, -0.3739891052, 0.0167010259, -0.3672956824, -0.3203127384, -0.1461951435, 0.34899652, 0.4700148702, 0.2422030568, 0.0681791082, 0.0135831125, 0.0455535948, 0.2881100774, 0.0449517258, -0.4729408324, 0.0219209511, 0.0892639756, 0.0966319069, -0.3060152233, 0.171494782, -0.3764617741, -0.0309772789, 0.0909723565, -0.115745008, 0.0323733538, -0.2353325337, -0.0012708409, -0.1241159886, 0.0911291614, 0.0381634645, -0.0249627829, 0.2713149488, 0.4538407326, -0.4913176596, -0.4338662326, -0.2429764569, 0.2196906656, 0.2761556804, 0.0923028514, 0.4714730978, -0.196315363, -0.2017212212, -0.0035784394, -0.0369498692, -0.2587952316, 0.3299716413, 0.109343268, -0.4681280553, -0.1054975763, -0.126248464, 0.0081285648, 0.2813584507, 0.0266784783, -0.4296481311, -0.3005278707, -0.3172000647, 0.0161022674, -0.0597175583, 0.0772565976, 0.0695809424, 0.1193822622, 0.0892355591, -0.19503057, -0.1829490215, 0.2048533857, -0.0947709829, 0.1227943003, 0.0786330923, -0.0175765026, 0.4281572402, -0.1939686537, -0.0813814104, 0.1431473345, 0.0738635063, -0.1201179624, -0.0491997823, 0.1548920125, 0.1974502653, -0.0815240666, -0.0458105542, -0.2472179979, 0.0709019154, -0.4901148975, 0.2950860262, 0.334808439, 0.1295578331, -0.161329776, 0.2049960196, -0.1187462658, -0.0410111547, -0.0701126158, -0.1410944015, 0.3600340784, 0.1319337934, 0.2307247072, 0.3176659346, 0.0463445224, -0.0278105456, -0.0652956218, 0.2071719915, 0.4547817409, 0.1323381811, -0.1851795763, -0.0328353755, -0.0284978226, 0.1077325046, 0.0593162179, -0.085581392, -0.4570808411, 0.3199622035, 0.0424062721, 0.1196211502, -0.0851222426, 0.0694156289, -0.2036310881, -0.01168756, 0.5102895498, 0.1288096756, 0.1602645069, 0.0473563299, -0.0059921518, 0.5263203979, -0.1773722768, 0.056670513, -0.2004924417, -0.0103059858, 0.5074064136, 0.3961099684, 0.0522770211, -0.0095697427, 0.4942309558, 0.122483775, 0.0646162033, 0.3955700099, -0.0130430022, 0.0467666313, -0.1954601556, -0.0617311001, 0.1664905995, -0.237186566, 0.2832928002, 0.1871672124, -0.0691951364, -0.3907465637, -0.0177041572, -0.1824212223, 0.2373392731, -0.2330202013, -0.2296694219, 0.1860865504, -0.1380092204, 0.0792410374, 0.3893227279, -0.1683449, -0.1806378961, 0.1558276862, 0.177124083, -0.2397207767, 0.3626709282, -0.028909348, 0.1323880255, 0.1518107653, 0.0500287861, 0.7001644373, -0.3557698727, 0.1334789395, -0.1025940627, 0.1700506657, 0.2860389352, 0.3981004953, -0.2447242439, -0.1887212247, 0.1763647348, 0.0670010448, -0.1224941462, 0.2717934251, -0.1491891295, 0.032715641, 0.0977706686, 0.0750927255, -0.0500116348, 0.1827305704, 0.1619617492, 0.1637400687, 0.2166753411, 0.1712012291, -0.1385444254, 0.1400007457, -0.1463420689, 0.0411111303, -0.3651643991, 0.0879892483, 0.2932605147, -0.2734499574, 0.4256703258, 0.2981346548, 0.0132940467, 0.1791389734, 0.4029974937, 0.3924379051, 0.3411542177, -0.3213727772, -0.161722973, -0.2840149105, 0.3639717996, -0.0266980976, 0.1606378853, -0.5455218554, 0.0793510973, -0.0012821774, -0.0612961203, 0.0257045366, 0.1679889709, -0.1000317857, 0.1487789303, -0.3114844859, -0.1130682528, -0.0751880258, -0.087441206, -0.1050553843, -0.4513826072, 0.3197155297, -0.0907448903, 0.0485185273, 0.0477201529, 0.119886592, -0.2438071072, -0.1118515506, 0.4397116899, 0.2618423998, 0.1683417112, -0.2935880423, -0.0259574838, -0.2678935528, 0.0190908462, -0.3106363714, 0.0170402043, -0.0132975774, 0.341457665, -0.2391729355, 0.0636949688, -0.3666889668, 0.1739196926, 0.2756895721, 0.0119208228, 0.0677404329, -0.0571766533, -0.2674061358, 0.0780814067, 0.0970483944, 0.5984996557, 0.0942750573, 0.2917084396, -0.248727411, -0.086562328, 0.3026676476, -0.3510764241, -0.5694524646, 0.3708777726, 0.0836353302, 0.2353770435, -0.1646019071, -0.2726033628, 0.0098312767, 0.122805208, -0.246363312, -0.114819102, 0.0384761766, 0.0152511206, 0.134185344, -0.0320452489, 0.2907692194, 0.1469573677, -0.4093951285, 0.0017055845, -0.2389719039 ]
https://github.com/huggingface/datasets/issues/643
Caching processed dataset at wrong folder
Apparently, Colab uses a local cache of the data files read/written from Google Drive. See: - https://github.com/googlecolab/colabtools/issues/2087#issuecomment-860818457 - https://github.com/googlecolab/colabtools/issues/1915#issuecomment-804234540 - https://github.com/googlecolab/colabtools/issues/2147#issuecomment-885052636
Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ```
21
Caching processed dataset at wrong folder Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ``` Apparently, Colab uses a local cache of the data files read/written from Google Drive. See: - https://github.com/googlecolab/colabtools/issues/2087#issuecomment-860818457 - https://github.com/googlecolab/colabtools/issues/1915#issuecomment-804234540 - https://github.com/googlecolab/colabtools/issues/2147#issuecomment-885052636
[ -0.0610346422, 0.2720839083, -0.0283775385, 0.4453432858, -0.0815309957, -0.021029219, 0.3334374428, 0.0359667353, -0.0489297956, 0.2337762415, -0.0136981849, 0.2756026089, 0.036514245, 0.3952311575, -0.0828426033, 0.3347193003, 0.2051367611, -0.0510049984, 0.0500108413, -0.0852868706, -0.3551538587, 0.3671508431, -0.1679540426, -0.0600117296, -0.4700481296, -0.0544969551, -0.1362237036, -0.0494377539, -0.0417694487, 0.2399594039, 0.2862649262, 0.0359597169, 0.1236969754, 0.5833588839, -0.0001266251, -0.1561576724, 0.2202805281, -0.2129781693, -0.2345522195, -0.1091253534, -0.3383676112, -0.0145690665, -0.0260071345, -0.0600659288, -0.2109532952, 0.1481443644, 0.2697552443, -0.4910911918, -0.0131427469, 0.2409366369, 0.0793206245, -0.470918268, -0.5250528455, 0.3897103965, 0.135281533, 0.2636303604, -0.1766056865, 0.3681117892, 0.0485501029, -0.117983371, -0.1188478991, 0.3179061115, -0.0560809933, 0.1058958024, 0.2113447338, 0.3341000676, -0.3169408143, -0.2632049024, 0.5499748588, -0.4216970801, 0.3362533748, -0.349286586, -0.1351042241, -0.3083280921, -0.3160906732, -0.3311679959, 0.5454384089, 0.1797974408, -0.1486810297, 0.0793513507, -0.5265553594, -0.1687602103, 0.0950279683, 0.0548878424, -0.2062121183, 0.2981133759, -0.2602459192, 0.0158503558, -0.0781460404, 0.2501655221, 0.7252605557, -0.368647337, 0.0660393536, 0.2389564961, -0.0488777496, 0.0935400054, -0.129261896, 0.6320320964, -0.2738451958, -0.1767210066, -0.1868342608, -0.1085796729, -0.1575985402, 0.1380192786, 0.018835865, 0.4789531231, 0.0039041836, 0.0920020118, 0.0752187818, 0.0572809204, -0.4851473272, -0.0536838248, -0.0079048406, -0.2523824871, -0.0383136384, 0.1286387593, -0.0470280834, -0.3197010756, -0.0857712924, 0.0002603114, -0.3140639067, -0.0209066868, 0.1428411156, 0.1975005567, -0.0527264439, -0.1274860948, -0.2333369404, 0.1353301406, -0.2033347636, 0.3468828499, -0.1063610092, 0.0106966905, -0.2981443703, 0.4901649356, 0.1197803095, -0.2768304944, 0.1424655765, -0.0081910966, -0.0196970738, -0.2453969419, -0.0582592785, -0.4647095501, 0.411508441, 0.1777166426, 0.1157996655, 0.3921354115, 0.0538569018, -0.2697460353, -0.1676189601, 0.2586171329, -0.5754595399, -0.2996767163, 0.2304364294, -0.0208043754, -0.2513171434, -0.0653133467, -0.6218785644, 0.1069451123, 0.4818570912, -0.175459072, 0.0321228355, -0.0747875571, -0.6098791361, -0.215555802, 0.0196571033, 0.2119020373, -0.3435809612, 0.1560846269, -0.2851770222, 0.4931888282, 0.5012345314, 0.4064077437, 0.0037119263, 0.2275685221, -0.4611549973, -0.0845461115, 0.0169551671, -0.2920345366, -0.7751478553, 0.3196128905, -0.0727756694, 0.007427474, -0.0272700563, -0.0856555328, 0.2009666413, -0.1715905964, 0.2674721479, 0.1972283274, 0.0454788543, 0.2304415107, -0.295191735, -0.1713250279, -0.0874362513, -0.145907864, 0.0176957566, 0.1757321805, 0.0241738781, -0.3182269931, 0.0907217935, -0.113160111, 0.1602273285, 0.2599442005, 0.2357995659, -0.1545769423, 0.0087158754, 0.2336182445, -0.1542995721, 0.1625275761, 0.0036727046, -0.1264236122, -0.4546041191, -0.0886872336, -0.1274773329, -0.1392585039, -0.1500978321, -0.2166196108, -0.0460939892, 0.3267394602, 0.1241034493, 0.090093106, 0.0072633554, 0.5470095277, 0.0962230787, -0.1861603707, -0.0688972399, 0.1952026188, -0.128712371, -0.2006804049, -0.1603136808, -0.1325291544, 0.213544488, -0.2256239653, -0.2190116495, 0.1192049235, 0.1958231926, 0.4027073979, 0.0170838311, 0.2980303764, 0.1268270761, 0.0936341137, 0.1950585991, -0.1518375129, 0.0072076833, 0.1414072663, -0.0516693629, 0.3032367527, -0.1035399511, 0.1649567783, -0.1215224862, -0.2772287726, -0.0143902274, 0.0629782602, 0.2463196963, -0.1730801314, 0.1119628474, 0.3348494172, 0.4395121336, 0.2801446021, 0.2144914269, 0.3809011579, 0.5975577831, 0.0968181863, -0.0589017421, 0.1561950594, -0.1204376519, -0.3311528265, 0.2858494818, 0.5158720016, 0.4232351482, -0.113623485, 0.3228369057, 0.1980502605, 0.0616603307, -0.225292176, 0.1160483658, 0.0464668535, 0.2495323122, -0.0243315157, 0.2553370893, -0.0680699721, -0.0644715056, 0.2110358924, 0.0694479346, 0.2028131336, -0.064956665, 0.5757153034, -0.3395922184, -0.2704721093, -0.305832535, -0.3091859221, 0.0882459134, -0.1829892546, -0.1151197627, 0.3313700259, -0.0017695585, -0.0220327787, 0.2284810394, 0.2463255227, -0.1572625041, -0.5371962786, -0.1162830144, 0.0796746016, -0.2961495221, -0.0847115144, 0.3633798063, -0.0289393291, 0.0331701711, -0.275011301, -0.0099123148, -0.2773791552, -0.0903324112, 0.3296644986, -0.1228610799, 0.3179920018, -0.279959172, -0.0681022182, -0.5162335634, -0.3406289816, -0.090352051, -0.0407028608, -0.0643920973, -0.4448993206, -0.0423484631, -0.0331223942, -0.1272597611, 0.0647556484, -0.2019144893, 0.0180336796, 0.1064040959, 0.0326872431, 0.300103724, -0.0105566131, -0.0835690275, -0.1544341892, 0.403321594, -0.2872374356, -0.3533236682, -0.6466092467, 0.2498883605, -0.1351863742, -0.0283569191, -0.0251942631, -0.0988628864, 0.0905016735, 0.3466602564, -0.4697764814, -0.3415855467, -0.162146166, -0.0230159331, 0.287614733, -0.1157942265, 0.3167224526, 0.0533322841, 0.1837206185, -0.0475871526, -0.4573250115, 0.0412997045, 0.3344969451, 0.3154990971, 0.0712054744, 0.1656315178, 0.0524887964, 0.5838850737, 0.1963843554, 0.0033476623, 0.4174215198, 0.0334162191, 0.270760566, -0.260635227, -0.1167368665, 0.3184655309, -0.0091534629, -0.708897531, 0.3999044299, 0.1424098611, -0.4741083682, 0.1123818085, -0.2295335531, -0.3285391331, -0.2492346019, 0.2241232991, 0.0461438932, 0.2049541026, 0.1014349833, 0.0578610078, -0.1939951479, -0.2382671237, 0.0419609398, 0.0788222775, 0.2632603943, 0.1419653296, 0.3554458618, -0.468516022, -0.4422907531, 0.2757279873, 0.4402052164, 0.0699538291, -0.0736956447, 0.2665043771, 0.1775007099, -0.1060263291, 0.4324996173, -0.3066910207, -0.1186123192, -0.1068840772, -0.0587690733, 0.0352004841, -0.0381539539, 0.072753489, 0.3715411127, -0.0315234587, 0.379899919, 0.3456371427, 0.028784452, -0.0514400825, 0.2525832653, -0.3350934386, -0.0490928479, -0.1584185213, -0.5227062106, -0.1282045096, -0.0280656889, 0.098298572, -0.0418732762, 0.0433155745, 0.0891468525, 0.1448995769, -0.021902075, 0.0066881166, 0.1420859993, 0.3605316281, 0.1842477471, -0.1114721373, 0.0879383832, 0.1742120832, 0.3784195781, 0.5623612404, 0.1346815974, 0.1577069163, 0.2116666883, -0.1818944961, 0.1685478389, 0.3276045024, -0.2029966414, -0.3079081476, -0.146231696, -0.1028273925, -0.2917164266, 0.4136126935, 0.0401665904, 0.2762885392, -0.3081189692, -0.4156613052, 0.44584319, 0.1735879183, -0.3169113994, 0.2682507336, -0.0192025136, -0.4749499261, 0.4058654904, 0.1894844621, 0.9381873608, -0.0248288512, 0.1439874619, 0.0340872929, 0.0824856386, -0.0335668325, -0.2409597337, 0.237177372, -0.1249687076, -0.6252011657, -0.0858773813, -0.1457360089, -0.2388961613, 0.0211119764, -0.1256091148, 0.377645582, 0.079266347, -0.030371787, -0.0979220569, -0.1868660152, -0.0253433865, -0.1460149884, -0.1743213534, 0.0650662854, -0.051962927, 0.4258986413, -0.1126187518, 0.2005702853, -0.2046694458, 0.0717929378, -0.1707330644, -0.0027805723, -0.4321497381, -0.0162163023, -0.3535530865, -0.3014706373, -0.1923626661, 0.3247592151, 0.5008485913, 0.1771115065, -0.0187868159, -0.0409856364, 0.118360281, 0.2895126045, 0.0174747165, -0.4401691258, 0.0983933881, 0.0616217889, 0.2057496756, -0.3807366192, 0.140545398, -0.4127309024, 0.038524311, 0.1372516304, -0.1217072755, 0.1495088935, -0.1938779354, 0.0215561874, -0.0560253449, 0.0967270657, 0.0351233743, -0.0456842221, 0.2836749256, 0.4138993621, -0.4844202101, -0.414719671, -0.2022252828, 0.2524101734, 0.3291337192, 0.048730962, 0.4361200333, -0.2197818607, -0.1725670546, 0.0463009253, -0.0563873984, -0.2556512654, 0.2581130266, 0.0765589923, -0.4564635456, -0.0662184805, -0.1193896309, 0.0747758076, 0.3262428045, 0.021223342, -0.4047260284, -0.2840516865, -0.3805631697, -0.0061066314, -0.0117714508, -0.0340358354, 0.1052043587, 0.1842136532, 0.2032056004, -0.1853342205, -0.1720731258, 0.1845738441, -0.0779559687, 0.1102797464, 0.0915994346, 0.0051639695, 0.4396786094, -0.1158708706, -0.1271944642, 0.1521353722, 0.0477270074, -0.1261093765, 0.0074362792, 0.1519674808, 0.1834238768, -0.1086485758, -0.1192331761, -0.2260847986, 0.0933701992, -0.4723146558, 0.2670769393, 0.316914767, 0.0945049971, -0.1686930805, 0.190819189, -0.0560383573, 0.0059707165, -0.0417535119, -0.1228339821, 0.3638265431, 0.1446346045, 0.2355249375, 0.2257519513, 0.0823730156, 0.1297098696, -0.0842085332, 0.1280233562, 0.4104744792, 0.1123142764, -0.2094894946, 0.0082571739, -0.0048572188, 0.0663096458, 0.0484097973, -0.0378642306, -0.440035522, 0.3940448165, 0.0093094967, 0.1735150516, -0.1155927107, 0.1054904237, -0.1395044923, -0.0170404576, 0.4958128631, 0.2734284401, 0.1625188887, 0.0455282144, -0.0032553088, 0.5179224014, -0.1021975279, 0.0253697149, -0.1444011778, 0.0151201608, 0.5032029748, 0.385058701, 0.1004866064, 0.0218723081, 0.4303711951, 0.1386059225, 0.0944204628, 0.2966913879, -0.017315913, 0.0574203879, -0.2226380408, -0.0104266405, 0.128703326, -0.1916089803, 0.3092508912, 0.1943609416, -0.0265151188, -0.3995789289, -0.0168504771, -0.2102159411, 0.2406071275, -0.184108749, -0.2305292934, 0.2448953688, -0.1181804016, 0.0915058628, 0.4082011878, -0.1653727442, -0.1561180651, 0.1989691854, 0.1204100326, -0.2833485603, 0.3890851736, -0.0123546626, 0.1500689238, 0.1247941256, 0.0552650094, 0.6754956245, -0.4372318983, 0.0796014071, -0.1580542773, 0.1361441165, 0.2211263925, 0.4328948259, -0.2361827493, -0.2410747558, 0.1083935946, 0.0952117965, -0.1768146306, 0.2151083648, -0.1572495252, 0.01979593, 0.1072926745, 0.0654592514, -0.034599483, 0.2740279436, 0.0637463555, 0.1900173128, 0.2508348227, 0.0725256354, -0.0809131414, 0.1579118371, -0.1163226664, 0.0537207089, -0.3247789145, 0.1395674348, 0.2562490404, -0.2785400152, 0.3983517885, 0.3185351789, 0.0041495147, 0.1767767966, 0.448800385, 0.387170583, 0.2692137957, -0.2240317315, -0.2394539267, -0.3032339215, 0.373172015, 0.0111447517, 0.2197729498, -0.521463871, 0.1024875715, -0.0134944357, 0.0273573585, -0.1312634051, 0.1433431655, -0.1088340804, 0.0602251068, -0.2716014683, -0.1216601282, -0.0860632136, -0.1030696705, -0.1022538394, -0.4066259563, 0.2854689658, -0.136955291, 0.0459238477, 0.0413858742, -0.0217672158, -0.2653208971, -0.145493418, 0.4206566811, 0.255931586, 0.0869823471, -0.2278870344, 0.0763833299, -0.2209263146, 0.057495445, -0.2973891795, -0.0059904265, -0.059941411, 0.3144713938, -0.2841038406, 0.1138189137, -0.3640372157, 0.1491270661, 0.2469115555, 0.0944954604, 0.1421545148, -0.1197960228, -0.2716231644, 0.0439234786, 0.1121163964, 0.5071698427, 0.0741107091, 0.2756847441, -0.2454089969, -0.0398044623, 0.2746976614, -0.358717978, -0.4444824159, 0.3010289371, 0.0462573431, 0.2388998419, -0.2108974606, -0.1806067675, 0.0214910954, 0.1159698069, -0.2133397013, -0.1380123794, 0.0589218289, -0.0019631716, 0.1463186294, -0.0995387435, 0.2787250876, 0.133489117, -0.3511357903, -0.1038613543, -0.2308577597 ]
https://github.com/huggingface/datasets/issues/633
Load large text file for LM pre-training resulting in OOM
Not sure what could cause that on the `datasets` side. Could this be a `Trainer` issue ? cc @julien-c @sgugger ?
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this: ```python from datasets import load_dataset @dataclass class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling): """ Data collator used for language modeling based on DataCollatorForLazyLanguageModeling - collates batches of tensors, honoring their tokenizer's pad_token - preprocesses batches for masked language modeling """ block_size: int = 512 def __call__(self, examples: List[dict]) -> Dict[str, torch.Tensor]: examples = [example['text'] for example in examples] batch, attention_mask = self._tensorize_batch(examples) if self.mlm: inputs, labels = self.mask_tokens(batch) return {"input_ids": inputs, "labels": labels} else: labels = batch.clone().detach() if self.tokenizer.pad_token_id is not None: labels[labels == self.tokenizer.pad_token_id] = -100 return {"input_ids": batch, "labels": labels} def _tensorize_batch(self, examples: List[str]) -> Tuple[torch.Tensor, torch.Tensor]: if self.tokenizer._pad_token is None: raise ValueError( "You are attempting to pad samples but the tokenizer you are using" f" ({self.tokenizer.__class__.__name__}) does not have one." ) tensor_examples = self.tokenizer.batch_encode_plus( [ex for ex in examples if ex], max_length=self.block_size, return_tensors="pt", pad_to_max_length=True, return_attention_mask=True, truncation=True, ) input_ids, attention_mask = tensor_examples["input_ids"], tensor_examples["attention_mask"] return input_ids, attention_mask dataset = load_dataset('text', data_files='train.txt',cache_dir="./", , split='train') data_collator = DataCollatorForDatasetsLanguageModeling(tokenizer=tokenizer, mlm=True, mlm_probability=0.15, block_size=tokenizer.max_len) trainer = Trainer(model=model, args=args, data_collator=data_collator, train_dataset=train_dataset, prediction_loss_only=True, ) trainer.train(model_path=model_path) ``` This train.txt is about 1.1GB and has 90k lines where each line is a sequence of 4k words. During training, the memory usage increased fast as the following graph and resulted in OOM before the finish of training. ![image](https://user-images.githubusercontent.com/29704017/93292112-5576b280-f817-11ea-8da2-b2db9bf35665.png) Could you please give me any suggestions on why this happened and how to fix it? Thanks.
21
Load large text file for LM pre-training resulting in OOM I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this: ```python from datasets import load_dataset @dataclass class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling): """ Data collator used for language modeling based on DataCollatorForLazyLanguageModeling - collates batches of tensors, honoring their tokenizer's pad_token - preprocesses batches for masked language modeling """ block_size: int = 512 def __call__(self, examples: List[dict]) -> Dict[str, torch.Tensor]: examples = [example['text'] for example in examples] batch, attention_mask = self._tensorize_batch(examples) if self.mlm: inputs, labels = self.mask_tokens(batch) return {"input_ids": inputs, "labels": labels} else: labels = batch.clone().detach() if self.tokenizer.pad_token_id is not None: labels[labels == self.tokenizer.pad_token_id] = -100 return {"input_ids": batch, "labels": labels} def _tensorize_batch(self, examples: List[str]) -> Tuple[torch.Tensor, torch.Tensor]: if self.tokenizer._pad_token is None: raise ValueError( "You are attempting to pad samples but the tokenizer you are using" f" ({self.tokenizer.__class__.__name__}) does not have one." ) tensor_examples = self.tokenizer.batch_encode_plus( [ex for ex in examples if ex], max_length=self.block_size, return_tensors="pt", pad_to_max_length=True, return_attention_mask=True, truncation=True, ) input_ids, attention_mask = tensor_examples["input_ids"], tensor_examples["attention_mask"] return input_ids, attention_mask dataset = load_dataset('text', data_files='train.txt',cache_dir="./", , split='train') data_collator = DataCollatorForDatasetsLanguageModeling(tokenizer=tokenizer, mlm=True, mlm_probability=0.15, block_size=tokenizer.max_len) trainer = Trainer(model=model, args=args, data_collator=data_collator, train_dataset=train_dataset, prediction_loss_only=True, ) trainer.train(model_path=model_path) ``` This train.txt is about 1.1GB and has 90k lines where each line is a sequence of 4k words. During training, the memory usage increased fast as the following graph and resulted in OOM before the finish of training. ![image](https://user-images.githubusercontent.com/29704017/93292112-5576b280-f817-11ea-8da2-b2db9bf35665.png) Could you please give me any suggestions on why this happened and how to fix it? Thanks. Not sure what could cause that on the `datasets` side. Could this be a `Trainer` issue ? cc @julien-c @sgugger ?
[ -0.6339287758, -0.4775367975, 0.0106936339, 0.2986355424, 0.3600475788, -0.1518250853, 0.5567325354, 0.3738059103, 0.0108824177, 0.0107197072, -0.1295929253, -0.18279998, -0.2669847012, -0.1620898843, -0.0323720984, 0.0232064184, -0.0998212174, 0.1968754083, -0.2772670686, -0.0966667682, 0.0570117086, -0.0776295736, -0.2127604336, -0.0297442414, -0.3879218698, -0.0617135502, 0.3158173263, 0.1221212, -0.1640812606, -0.0958080217, -0.2297018319, 0.119790107, 0.4393487573, 0.4340214729, -0.0001147721, 0.006616035, 0.1890440583, -0.2363325804, -0.1672692001, 0.0192165729, 0.0775553286, -0.3022911847, -0.1064001769, -0.3036170602, -0.0272462256, -0.1061252356, -0.0156821143, -0.2243726701, 0.4987519681, 0.5414044857, 0.1587626338, 0.2508127093, -0.2136606872, 0.0723967925, 0.2544373274, 0.0488998592, 0.1056829095, -0.279514879, 0.4687837362, -0.1923182458, -0.4726888537, 0.1478175521, -0.2247737497, -0.2016822845, -0.0950889289, 0.0382047594, 0.3660890162, 0.0315694809, 0.264187485, 0.3474210203, 0.4272074997, -0.0008117458, -0.2896355689, -0.3209853768, -0.1426238865, -0.0843159407, 0.1892365664, 0.2010776103, 0.0598267578, 0.1184591651, 0.1071273461, -0.1253313273, -0.1519900113, 0.0761609226, -0.2748081684, 0.3397958577, -0.2012512237, -0.0380431116, 0.1555752903, -0.0944791734, 0.1961691827, -0.0997749493, 0.0034041153, 0.2567145824, -0.2454416901, -0.1123952568, -0.0716821104, -0.5194144845, 0.1627841145, -0.2759452164, 0.1981880367, 0.2972389162, -0.0876618102, -0.0676169321, 0.0863934457, 0.4202025831, -0.2524374425, 0.2605278194, 0.2272560149, 0.1640108824, -0.1717063934, -0.0443987809, -0.330511868, -0.196245268, 0.101593703, -0.0773416832, -0.01101714, -0.2546043694, -0.2404216528, 0.0585463457, -0.1407698393, -0.0308451336, 0.2748159766, 0.3899731338, -0.3540614843, 0.4294975996, 0.1651093066, 0.0523290113, -0.4855332971, -0.3365270793, -0.1744022369, 0.1532571465, -0.2032444477, 0.0389758199, 0.1297923326, 0.1396337599, 0.059654139, -0.0428832248, -0.0625894815, -0.4402191341, -0.0094448598, -0.0241032131, 0.0207528826, -0.0425147861, 0.0630237609, -0.0233655367, 0.2347659469, -0.1249950975, -0.0253819991, 0.3477917314, -0.2762122154, -0.2276413292, 0.0509794764, 0.2101763934, -0.0282484628, 0.2091549039, 0.0285064094, 0.076856479, 0.5359787345, 0.0066536209, -0.0471478626, -0.3782060146, 0.0945210904, 0.09201736, 0.1619914323, 0.1766303331, -0.0425881632, -0.0726021677, 0.0063892393, 0.1035868898, 0.255040884, 0.3907330334, -0.2264700383, 0.2906735837, 0.0070044314, -0.0566554591, 0.531992197, -0.2620989084, -0.448443979, 0.2338527441, -0.3511554897, 0.1081818491, 0.2206699997, 0.1759026051, 0.1138893515, -0.1089851037, 0.269015044, 0.3656848669, 0.0705157742, 0.1209139377, -0.2366241515, -0.0922286212, -0.1715157032, 0.484202981, 0.3627240956, -0.0255861767, -0.0730891153, 0.3563797474, 0.1833981574, -0.1992233247, 0.1312806904, 0.3693415225, -0.1744248569, -0.1261585057, 0.0944814086, 0.0655978322, -0.3000326455, -0.0709873065, -0.0908445045, 0.0828674436, -0.113605693, -0.0894262865, 0.2825580835, 0.0228702798, -0.0766652972, 0.1131797433, 0.0379410386, -0.1318217963, 0.0248665065, -0.0704168901, 0.1261966228, 0.0154216662, -0.0932068974, 0.0873603746, -0.2184159905, -0.1239405051, 0.0018027833, -0.1370612979, 0.0769502148, 0.1752731353, -0.0511877313, 0.0384013392, -0.1730398387, 0.1069575101, -0.1529778093, -0.298707068, -0.5071571469, 0.4358932972, 0.1864788085, -0.3381094635, 0.3402596712, 0.1040275842, -0.0295993686, -0.1062710881, -0.1198952049, 0.5749332309, 0.2730709314, 0.0196178816, 0.2990929186, -0.2454111725, 0.2542811036, -0.2662390769, -0.1036156192, -0.0977649167, 0.4209234416, 0.0310555417, 0.2350631654, 0.148280859, -0.0869455338, -0.2320595682, 0.4703812003, -0.1788096428, -0.0138721522, 0.2665260434, -0.42472139, -0.0115633914, -0.3480208814, -0.2494778484, 0.0067338794, 0.1732287854, -0.0944128707, -0.0554352067, 0.008537855, -0.2627931237, 0.007836163, 0.1532372683, -0.071852088, 0.3198344707, 0.1165148765, 0.1005952582, -0.1228920668, -0.1794071943, 0.1028475463, 0.1782901436, -0.2751910388, 0.1844427735, -0.0228228215, -0.0134466691, -0.2862634957, 0.1904246807, -0.1268012673, 0.0388153642, -0.0647432804, 0.2586891055, -0.0779030025, 0.1019123122, 0.3001610041, 0.3549231291, 0.4629623294, -0.078094922, 0.3263479173, -0.0826637447, -0.179695949, 0.0329435393, 0.3345076442, -0.3179928362, -0.0248904116, 0.0053772237, 0.0511769243, -0.0989300385, -0.1660347283, 0.0946891159, 0.1968245059, -0.1661895066, -0.2573058605, -0.0721762925, 0.1776910722, -0.0424320959, 0.1197286695, -0.2324416637, 0.0084072342, 0.1450571865, -0.0062899678, -0.1843239069, 0.0404453538, -0.1199218407, -0.0470516644, -0.4116414487, -0.0535182469, 0.1070508584, 0.1367316544, 0.3593675792, 0.1067890301, 0.1944517642, 0.2884452343, 0.1585921198, 0.0063675116, -0.0885990858, 0.514171958, -0.0175728817, -0.2971981764, -0.2908624411, -0.2397542596, 0.0251129922, 0.3155243397, -0.6842605472, 0.2337828726, -0.1138518378, -0.0940266177, -0.3955195546, 0.0007259165, 0.2522046864, -0.0761485249, 0.0163397267, 0.0954743102, 0.2302767783, 0.1546789706, -0.0387875624, 0.3857944012, -0.4130838215, 0.3594084978, -0.1354580224, 0.4855528176, -0.1221181452, -0.2300206274, 0.0988748446, 0.150448218, -0.0171155203, -0.0218025893, -0.013968504, -0.2593792975, -0.0582376271, 0.0227312557, 0.5197219849, 0.0168901123, -0.1655895114, -0.0158989225, 0.0681641772, 0.2563199401, -0.2606987357, 0.4905276895, -0.1907786578, 0.0184166096, -0.1996744573, 0.018745685, -0.2049808055, -0.215085566, -0.1641349345, 0.0934441686, -0.0303828474, -0.2240439802, -0.2116938084, 0.1031402275, -0.3681345582, -0.0437650047, 0.1179903299, 0.2293323725, 0.180770576, -0.1961434186, -0.086288549, -0.2018707991, 0.3574142754, 0.1934526861, 0.1124653816, 0.1632592976, -0.0568786226, -0.2155373245, -0.1774518341, -0.2904544771, 0.1419077218, 0.6505103707, 0.6102461219, -0.2162736505, -0.1585991681, 0.0791449249, 0.0026030652, -0.165273279, -0.5487569571, -0.1285093725, -0.1654993445, -0.4410513937, 0.0046062781, 0.3584984243, 0.3558540642, -0.22644566, -0.0318753272, 0.1387299597, -0.0007014232, 0.3717510402, -0.1297641248, 0.015053574, -0.0664107651, 0.2258286476, -0.1074175015, 0.3673554361, 0.2488898337, 0.3563637137, 0.1917258948, -0.3175571263, 0.0706881434, -0.0298887268, 0.2314308435, 0.1151607335, 0.110228315, 0.3546279967, 0.128971085, 0.3322557211, -0.1909665465, 0.6737232804, -0.0073443507, 0.2068270594, -0.8374908566, -0.2673701942, 0.3314560056, -0.0263577066, 0.1994025707, 0.2157178372, -0.4038516879, -0.3216699064, 0.3766613007, 0.0990833342, 0.7675246596, -0.2972694337, 0.3962582052, -0.1552994251, 0.6611962914, 0.1280310601, -0.3813101351, 0.1585617661, -0.3987911642, -0.2663660347, 0.2130052298, -0.0923115239, 0.0365401395, 0.1605038643, -0.2905769646, -0.0298116673, 0.0862521157, 0.2249334008, 0.130669862, 0.5134937763, 0.1209266186, -0.600698173, -0.0828131065, 0.0265691411, -0.0234004669, -0.1049020886, -0.049279213, 0.0799463987, -0.0313266367, -0.2085639089, -0.0284665171, 0.205257833, -0.2474460602, 0.0866158083, 0.0637525693, -0.0720531121, 0.5367996097, 0.1062303782, -0.0013606648, 0.4988961518, -0.0392867327, 0.1321583688, -0.2274818718, -0.1652867049, 0.2007086128, -0.0658490956, 0.4217028618, 0.0883790255, -0.0005877246, 0.1141034588, 0.0632385314, -0.0466908105, 0.0947638825, -0.3643093109, 0.1054971069, -0.4112312198, -0.2154277414, -0.0884305388, -0.3007825911, -0.1009221226, 0.1231094971, 0.1373569965, -0.4644461274, 0.1151453257, 0.2652112246, -0.3750101328, 0.0119967815, 0.3838247657, 0.1710590869, -0.105138883, 0.4998430014, 0.4575878084, -0.0533618517, -0.2644974291, -0.1096290797, 0.2944484651, -0.2731434703, 0.0849161148, -0.2455590516, -0.3016010821, 0.2093509287, 0.0808757395, 0.1000995934, -0.0149995526, -0.0632621124, -0.2510293424, -0.6380496621, -0.1814442873, -0.0027230312, -0.0035483714, 0.146083653, 0.2738986313, -0.310046941, 0.5892781019, -0.2788559198, -0.052941788, -0.2076085359, 0.2782230675, -0.0555623733, -0.3855460584, 0.2115359306, 0.203352496, 0.100104101, 0.0805967897, 0.0059090997, -0.2213537991, -0.1435203254, 0.1127154306, 0.2364701182, -0.4196631014, -0.0159935597, -0.3129968643, -0.0924900621, -0.2700215876, 0.0660678744, 0.0170286167, 0.0139455562, -0.2261789143, 0.0093941661, 0.0475258939, -0.2552625537, 0.0420603566, -0.2545849979, 0.1250909269, 0.2465713024, 0.1331034005, 0.1178304181, 0.0006368674, -0.39310202, 0.1796458364, 0.6661382914, -0.0175324008, 0.4190824628, -0.4357323945, -0.0715065226, 0.247659415, 0.0498033017, 0.048066061, -0.3416771889, -0.0107187238, 0.2935880125, 0.2268189788, 0.0152087733, -0.0147334104, 0.2263551056, -0.4112984836, 0.1301488876, 0.3453428149, -0.1119267717, -0.0674755946, 0.1559655219, 0.0913229808, 0.5066780448, 0.1149651706, 0.0057113338, 0.2489493787, -0.001220117, 0.1548575163, 0.4856929183, 0.2611193657, 0.2386805862, 0.3016281426, -0.0326662362, -0.0406999178, -0.2312836349, 0.2294138521, -0.4356159866, -0.4151661694, -0.2674565315, 0.5044153929, -0.0193238575, 0.1242091432, -0.3350304961, -0.0662411302, -0.0406534113, 0.2541331649, -0.1192155406, 0.2744085193, -0.4530943632, -0.1705992669, -0.0894244462, -0.1239619032, 0.0115339896, 0.1896334738, -0.0558586083, 0.2722766995, -0.5796655416, 0.2293860167, 0.0521360412, 0.145150125, -0.1346787363, 0.1227788106, 0.1055011004, -0.5078572035, 0.3433355689, 0.2378558517, 0.2918593287, 0.1154051423, -0.2219064534, 0.3443706036, 0.4366976619, -0.1908069104, -0.0406121425, -0.1209840924, -0.0356198065, -0.1499130428, 0.1974351406, 0.3490366042, 0.1878992021, 0.2596161366, 0.0557277352, -0.2659660578, 0.2785173655, 0.0650137886, -0.3240588009, 0.1786665469, -0.1329391301, 0.4019321501, -0.3285807371, -0.4429641962, 0.0098670311, -0.3941244185, 0.2155873924, 0.6670196652, -0.2954227626, 0.2878553569, -0.0254884064, 0.0485502705, 0.0018408649, 0.4760500491, 0.4697352946, 0.2841595113, -0.3783714771, -0.0256677344, -0.3288836777, 0.2765586078, -0.2024303377, 0.0669974536, 0.0222479869, 0.1707944721, 0.1645778716, -0.0033022426, -0.0796227604, -0.0136220623, 0.2188031375, -0.1950692683, -0.1675593108, -0.1280472726, 0.002094669, 0.3573178947, -0.025900675, -0.297549814, 0.1588655859, 0.1150630713, 0.0991569832, -0.3214531243, 0.3626994789, -0.198463425, -0.0203630701, 0.0691281036, -0.1504710913, 0.379209578, -0.2204387635, -0.0330467634, -0.0818275213, 0.1281417012, -0.1670769602, -0.2209999114, 0.3402221501, 0.3884243667, -0.1076364294, 0.1082137674, -0.2551926076, -0.086462304, 0.040304441, -0.3696906269, -0.3087161481, -0.0074875448, -0.0002531049, 0.0085247457, 0.1030982137, 0.2458303422, 0.1053374857, -0.0278405156, -0.2292287946, -0.1855803728, 0.2094751149, -0.2946498394, -0.3130411506, -0.0353800692, 0.0556243658, -0.1636291295, 0.2511018217, -0.4624069035, 0.1457486451, 0.2297440022, -0.0255144555, -0.4540735781, 0.2232971638, 0.2540614307, 0.016472023, -0.2076970041, 0.0534572378, 0.152623415, -0.1369921863, -0.2016398907, -0.1757195294 ]
https://github.com/huggingface/datasets/issues/633
Load large text file for LM pre-training resulting in OOM
There was a memory leak issue fixed recently in master. You should install from source and see if it fixes your problem.
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this: ```python from datasets import load_dataset @dataclass class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling): """ Data collator used for language modeling based on DataCollatorForLazyLanguageModeling - collates batches of tensors, honoring their tokenizer's pad_token - preprocesses batches for masked language modeling """ block_size: int = 512 def __call__(self, examples: List[dict]) -> Dict[str, torch.Tensor]: examples = [example['text'] for example in examples] batch, attention_mask = self._tensorize_batch(examples) if self.mlm: inputs, labels = self.mask_tokens(batch) return {"input_ids": inputs, "labels": labels} else: labels = batch.clone().detach() if self.tokenizer.pad_token_id is not None: labels[labels == self.tokenizer.pad_token_id] = -100 return {"input_ids": batch, "labels": labels} def _tensorize_batch(self, examples: List[str]) -> Tuple[torch.Tensor, torch.Tensor]: if self.tokenizer._pad_token is None: raise ValueError( "You are attempting to pad samples but the tokenizer you are using" f" ({self.tokenizer.__class__.__name__}) does not have one." ) tensor_examples = self.tokenizer.batch_encode_plus( [ex for ex in examples if ex], max_length=self.block_size, return_tensors="pt", pad_to_max_length=True, return_attention_mask=True, truncation=True, ) input_ids, attention_mask = tensor_examples["input_ids"], tensor_examples["attention_mask"] return input_ids, attention_mask dataset = load_dataset('text', data_files='train.txt',cache_dir="./", , split='train') data_collator = DataCollatorForDatasetsLanguageModeling(tokenizer=tokenizer, mlm=True, mlm_probability=0.15, block_size=tokenizer.max_len) trainer = Trainer(model=model, args=args, data_collator=data_collator, train_dataset=train_dataset, prediction_loss_only=True, ) trainer.train(model_path=model_path) ``` This train.txt is about 1.1GB and has 90k lines where each line is a sequence of 4k words. During training, the memory usage increased fast as the following graph and resulted in OOM before the finish of training. ![image](https://user-images.githubusercontent.com/29704017/93292112-5576b280-f817-11ea-8da2-b2db9bf35665.png) Could you please give me any suggestions on why this happened and how to fix it? Thanks.
22
Load large text file for LM pre-training resulting in OOM I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this: ```python from datasets import load_dataset @dataclass class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling): """ Data collator used for language modeling based on DataCollatorForLazyLanguageModeling - collates batches of tensors, honoring their tokenizer's pad_token - preprocesses batches for masked language modeling """ block_size: int = 512 def __call__(self, examples: List[dict]) -> Dict[str, torch.Tensor]: examples = [example['text'] for example in examples] batch, attention_mask = self._tensorize_batch(examples) if self.mlm: inputs, labels = self.mask_tokens(batch) return {"input_ids": inputs, "labels": labels} else: labels = batch.clone().detach() if self.tokenizer.pad_token_id is not None: labels[labels == self.tokenizer.pad_token_id] = -100 return {"input_ids": batch, "labels": labels} def _tensorize_batch(self, examples: List[str]) -> Tuple[torch.Tensor, torch.Tensor]: if self.tokenizer._pad_token is None: raise ValueError( "You are attempting to pad samples but the tokenizer you are using" f" ({self.tokenizer.__class__.__name__}) does not have one." ) tensor_examples = self.tokenizer.batch_encode_plus( [ex for ex in examples if ex], max_length=self.block_size, return_tensors="pt", pad_to_max_length=True, return_attention_mask=True, truncation=True, ) input_ids, attention_mask = tensor_examples["input_ids"], tensor_examples["attention_mask"] return input_ids, attention_mask dataset = load_dataset('text', data_files='train.txt',cache_dir="./", , split='train') data_collator = DataCollatorForDatasetsLanguageModeling(tokenizer=tokenizer, mlm=True, mlm_probability=0.15, block_size=tokenizer.max_len) trainer = Trainer(model=model, args=args, data_collator=data_collator, train_dataset=train_dataset, prediction_loss_only=True, ) trainer.train(model_path=model_path) ``` This train.txt is about 1.1GB and has 90k lines where each line is a sequence of 4k words. During training, the memory usage increased fast as the following graph and resulted in OOM before the finish of training. ![image](https://user-images.githubusercontent.com/29704017/93292112-5576b280-f817-11ea-8da2-b2db9bf35665.png) Could you please give me any suggestions on why this happened and how to fix it? Thanks. There was a memory leak issue fixed recently in master. You should install from source and see if it fixes your problem.
[ -0.6339287758, -0.4775367975, 0.0106936339, 0.2986355424, 0.3600475788, -0.1518250853, 0.5567325354, 0.3738059103, 0.0108824177, 0.0107197072, -0.1295929253, -0.18279998, -0.2669847012, -0.1620898843, -0.0323720984, 0.0232064184, -0.0998212174, 0.1968754083, -0.2772670686, -0.0966667682, 0.0570117086, -0.0776295736, -0.2127604336, -0.0297442414, -0.3879218698, -0.0617135502, 0.3158173263, 0.1221212, -0.1640812606, -0.0958080217, -0.2297018319, 0.119790107, 0.4393487573, 0.4340214729, -0.0001147721, 0.006616035, 0.1890440583, -0.2363325804, -0.1672692001, 0.0192165729, 0.0775553286, -0.3022911847, -0.1064001769, -0.3036170602, -0.0272462256, -0.1061252356, -0.0156821143, -0.2243726701, 0.4987519681, 0.5414044857, 0.1587626338, 0.2508127093, -0.2136606872, 0.0723967925, 0.2544373274, 0.0488998592, 0.1056829095, -0.279514879, 0.4687837362, -0.1923182458, -0.4726888537, 0.1478175521, -0.2247737497, -0.2016822845, -0.0950889289, 0.0382047594, 0.3660890162, 0.0315694809, 0.264187485, 0.3474210203, 0.4272074997, -0.0008117458, -0.2896355689, -0.3209853768, -0.1426238865, -0.0843159407, 0.1892365664, 0.2010776103, 0.0598267578, 0.1184591651, 0.1071273461, -0.1253313273, -0.1519900113, 0.0761609226, -0.2748081684, 0.3397958577, -0.2012512237, -0.0380431116, 0.1555752903, -0.0944791734, 0.1961691827, -0.0997749493, 0.0034041153, 0.2567145824, -0.2454416901, -0.1123952568, -0.0716821104, -0.5194144845, 0.1627841145, -0.2759452164, 0.1981880367, 0.2972389162, -0.0876618102, -0.0676169321, 0.0863934457, 0.4202025831, -0.2524374425, 0.2605278194, 0.2272560149, 0.1640108824, -0.1717063934, -0.0443987809, -0.330511868, -0.196245268, 0.101593703, -0.0773416832, -0.01101714, -0.2546043694, -0.2404216528, 0.0585463457, -0.1407698393, -0.0308451336, 0.2748159766, 0.3899731338, -0.3540614843, 0.4294975996, 0.1651093066, 0.0523290113, -0.4855332971, -0.3365270793, -0.1744022369, 0.1532571465, -0.2032444477, 0.0389758199, 0.1297923326, 0.1396337599, 0.059654139, -0.0428832248, -0.0625894815, -0.4402191341, -0.0094448598, -0.0241032131, 0.0207528826, -0.0425147861, 0.0630237609, -0.0233655367, 0.2347659469, -0.1249950975, -0.0253819991, 0.3477917314, -0.2762122154, -0.2276413292, 0.0509794764, 0.2101763934, -0.0282484628, 0.2091549039, 0.0285064094, 0.076856479, 0.5359787345, 0.0066536209, -0.0471478626, -0.3782060146, 0.0945210904, 0.09201736, 0.1619914323, 0.1766303331, -0.0425881632, -0.0726021677, 0.0063892393, 0.1035868898, 0.255040884, 0.3907330334, -0.2264700383, 0.2906735837, 0.0070044314, -0.0566554591, 0.531992197, -0.2620989084, -0.448443979, 0.2338527441, -0.3511554897, 0.1081818491, 0.2206699997, 0.1759026051, 0.1138893515, -0.1089851037, 0.269015044, 0.3656848669, 0.0705157742, 0.1209139377, -0.2366241515, -0.0922286212, -0.1715157032, 0.484202981, 0.3627240956, -0.0255861767, -0.0730891153, 0.3563797474, 0.1833981574, -0.1992233247, 0.1312806904, 0.3693415225, -0.1744248569, -0.1261585057, 0.0944814086, 0.0655978322, -0.3000326455, -0.0709873065, -0.0908445045, 0.0828674436, -0.113605693, -0.0894262865, 0.2825580835, 0.0228702798, -0.0766652972, 0.1131797433, 0.0379410386, -0.1318217963, 0.0248665065, -0.0704168901, 0.1261966228, 0.0154216662, -0.0932068974, 0.0873603746, -0.2184159905, -0.1239405051, 0.0018027833, -0.1370612979, 0.0769502148, 0.1752731353, -0.0511877313, 0.0384013392, -0.1730398387, 0.1069575101, -0.1529778093, -0.298707068, -0.5071571469, 0.4358932972, 0.1864788085, -0.3381094635, 0.3402596712, 0.1040275842, -0.0295993686, -0.1062710881, -0.1198952049, 0.5749332309, 0.2730709314, 0.0196178816, 0.2990929186, -0.2454111725, 0.2542811036, -0.2662390769, -0.1036156192, -0.0977649167, 0.4209234416, 0.0310555417, 0.2350631654, 0.148280859, -0.0869455338, -0.2320595682, 0.4703812003, -0.1788096428, -0.0138721522, 0.2665260434, -0.42472139, -0.0115633914, -0.3480208814, -0.2494778484, 0.0067338794, 0.1732287854, -0.0944128707, -0.0554352067, 0.008537855, -0.2627931237, 0.007836163, 0.1532372683, -0.071852088, 0.3198344707, 0.1165148765, 0.1005952582, -0.1228920668, -0.1794071943, 0.1028475463, 0.1782901436, -0.2751910388, 0.1844427735, -0.0228228215, -0.0134466691, -0.2862634957, 0.1904246807, -0.1268012673, 0.0388153642, -0.0647432804, 0.2586891055, -0.0779030025, 0.1019123122, 0.3001610041, 0.3549231291, 0.4629623294, -0.078094922, 0.3263479173, -0.0826637447, -0.179695949, 0.0329435393, 0.3345076442, -0.3179928362, -0.0248904116, 0.0053772237, 0.0511769243, -0.0989300385, -0.1660347283, 0.0946891159, 0.1968245059, -0.1661895066, -0.2573058605, -0.0721762925, 0.1776910722, -0.0424320959, 0.1197286695, -0.2324416637, 0.0084072342, 0.1450571865, -0.0062899678, -0.1843239069, 0.0404453538, -0.1199218407, -0.0470516644, -0.4116414487, -0.0535182469, 0.1070508584, 0.1367316544, 0.3593675792, 0.1067890301, 0.1944517642, 0.2884452343, 0.1585921198, 0.0063675116, -0.0885990858, 0.514171958, -0.0175728817, -0.2971981764, -0.2908624411, -0.2397542596, 0.0251129922, 0.3155243397, -0.6842605472, 0.2337828726, -0.1138518378, -0.0940266177, -0.3955195546, 0.0007259165, 0.2522046864, -0.0761485249, 0.0163397267, 0.0954743102, 0.2302767783, 0.1546789706, -0.0387875624, 0.3857944012, -0.4130838215, 0.3594084978, -0.1354580224, 0.4855528176, -0.1221181452, -0.2300206274, 0.0988748446, 0.150448218, -0.0171155203, -0.0218025893, -0.013968504, -0.2593792975, -0.0582376271, 0.0227312557, 0.5197219849, 0.0168901123, -0.1655895114, -0.0158989225, 0.0681641772, 0.2563199401, -0.2606987357, 0.4905276895, -0.1907786578, 0.0184166096, -0.1996744573, 0.018745685, -0.2049808055, -0.215085566, -0.1641349345, 0.0934441686, -0.0303828474, -0.2240439802, -0.2116938084, 0.1031402275, -0.3681345582, -0.0437650047, 0.1179903299, 0.2293323725, 0.180770576, -0.1961434186, -0.086288549, -0.2018707991, 0.3574142754, 0.1934526861, 0.1124653816, 0.1632592976, -0.0568786226, -0.2155373245, -0.1774518341, -0.2904544771, 0.1419077218, 0.6505103707, 0.6102461219, -0.2162736505, -0.1585991681, 0.0791449249, 0.0026030652, -0.165273279, -0.5487569571, -0.1285093725, -0.1654993445, -0.4410513937, 0.0046062781, 0.3584984243, 0.3558540642, -0.22644566, -0.0318753272, 0.1387299597, -0.0007014232, 0.3717510402, -0.1297641248, 0.015053574, -0.0664107651, 0.2258286476, -0.1074175015, 0.3673554361, 0.2488898337, 0.3563637137, 0.1917258948, -0.3175571263, 0.0706881434, -0.0298887268, 0.2314308435, 0.1151607335, 0.110228315, 0.3546279967, 0.128971085, 0.3322557211, -0.1909665465, 0.6737232804, -0.0073443507, 0.2068270594, -0.8374908566, -0.2673701942, 0.3314560056, -0.0263577066, 0.1994025707, 0.2157178372, -0.4038516879, -0.3216699064, 0.3766613007, 0.0990833342, 0.7675246596, -0.2972694337, 0.3962582052, -0.1552994251, 0.6611962914, 0.1280310601, -0.3813101351, 0.1585617661, -0.3987911642, -0.2663660347, 0.2130052298, -0.0923115239, 0.0365401395, 0.1605038643, -0.2905769646, -0.0298116673, 0.0862521157, 0.2249334008, 0.130669862, 0.5134937763, 0.1209266186, -0.600698173, -0.0828131065, 0.0265691411, -0.0234004669, -0.1049020886, -0.049279213, 0.0799463987, -0.0313266367, -0.2085639089, -0.0284665171, 0.205257833, -0.2474460602, 0.0866158083, 0.0637525693, -0.0720531121, 0.5367996097, 0.1062303782, -0.0013606648, 0.4988961518, -0.0392867327, 0.1321583688, -0.2274818718, -0.1652867049, 0.2007086128, -0.0658490956, 0.4217028618, 0.0883790255, -0.0005877246, 0.1141034588, 0.0632385314, -0.0466908105, 0.0947638825, -0.3643093109, 0.1054971069, -0.4112312198, -0.2154277414, -0.0884305388, -0.3007825911, -0.1009221226, 0.1231094971, 0.1373569965, -0.4644461274, 0.1151453257, 0.2652112246, -0.3750101328, 0.0119967815, 0.3838247657, 0.1710590869, -0.105138883, 0.4998430014, 0.4575878084, -0.0533618517, -0.2644974291, -0.1096290797, 0.2944484651, -0.2731434703, 0.0849161148, -0.2455590516, -0.3016010821, 0.2093509287, 0.0808757395, 0.1000995934, -0.0149995526, -0.0632621124, -0.2510293424, -0.6380496621, -0.1814442873, -0.0027230312, -0.0035483714, 0.146083653, 0.2738986313, -0.310046941, 0.5892781019, -0.2788559198, -0.052941788, -0.2076085359, 0.2782230675, -0.0555623733, -0.3855460584, 0.2115359306, 0.203352496, 0.100104101, 0.0805967897, 0.0059090997, -0.2213537991, -0.1435203254, 0.1127154306, 0.2364701182, -0.4196631014, -0.0159935597, -0.3129968643, -0.0924900621, -0.2700215876, 0.0660678744, 0.0170286167, 0.0139455562, -0.2261789143, 0.0093941661, 0.0475258939, -0.2552625537, 0.0420603566, -0.2545849979, 0.1250909269, 0.2465713024, 0.1331034005, 0.1178304181, 0.0006368674, -0.39310202, 0.1796458364, 0.6661382914, -0.0175324008, 0.4190824628, -0.4357323945, -0.0715065226, 0.247659415, 0.0498033017, 0.048066061, -0.3416771889, -0.0107187238, 0.2935880125, 0.2268189788, 0.0152087733, -0.0147334104, 0.2263551056, -0.4112984836, 0.1301488876, 0.3453428149, -0.1119267717, -0.0674755946, 0.1559655219, 0.0913229808, 0.5066780448, 0.1149651706, 0.0057113338, 0.2489493787, -0.001220117, 0.1548575163, 0.4856929183, 0.2611193657, 0.2386805862, 0.3016281426, -0.0326662362, -0.0406999178, -0.2312836349, 0.2294138521, -0.4356159866, -0.4151661694, -0.2674565315, 0.5044153929, -0.0193238575, 0.1242091432, -0.3350304961, -0.0662411302, -0.0406534113, 0.2541331649, -0.1192155406, 0.2744085193, -0.4530943632, -0.1705992669, -0.0894244462, -0.1239619032, 0.0115339896, 0.1896334738, -0.0558586083, 0.2722766995, -0.5796655416, 0.2293860167, 0.0521360412, 0.145150125, -0.1346787363, 0.1227788106, 0.1055011004, -0.5078572035, 0.3433355689, 0.2378558517, 0.2918593287, 0.1154051423, -0.2219064534, 0.3443706036, 0.4366976619, -0.1908069104, -0.0406121425, -0.1209840924, -0.0356198065, -0.1499130428, 0.1974351406, 0.3490366042, 0.1878992021, 0.2596161366, 0.0557277352, -0.2659660578, 0.2785173655, 0.0650137886, -0.3240588009, 0.1786665469, -0.1329391301, 0.4019321501, -0.3285807371, -0.4429641962, 0.0098670311, -0.3941244185, 0.2155873924, 0.6670196652, -0.2954227626, 0.2878553569, -0.0254884064, 0.0485502705, 0.0018408649, 0.4760500491, 0.4697352946, 0.2841595113, -0.3783714771, -0.0256677344, -0.3288836777, 0.2765586078, -0.2024303377, 0.0669974536, 0.0222479869, 0.1707944721, 0.1645778716, -0.0033022426, -0.0796227604, -0.0136220623, 0.2188031375, -0.1950692683, -0.1675593108, -0.1280472726, 0.002094669, 0.3573178947, -0.025900675, -0.297549814, 0.1588655859, 0.1150630713, 0.0991569832, -0.3214531243, 0.3626994789, -0.198463425, -0.0203630701, 0.0691281036, -0.1504710913, 0.379209578, -0.2204387635, -0.0330467634, -0.0818275213, 0.1281417012, -0.1670769602, -0.2209999114, 0.3402221501, 0.3884243667, -0.1076364294, 0.1082137674, -0.2551926076, -0.086462304, 0.040304441, -0.3696906269, -0.3087161481, -0.0074875448, -0.0002531049, 0.0085247457, 0.1030982137, 0.2458303422, 0.1053374857, -0.0278405156, -0.2292287946, -0.1855803728, 0.2094751149, -0.2946498394, -0.3130411506, -0.0353800692, 0.0556243658, -0.1636291295, 0.2511018217, -0.4624069035, 0.1457486451, 0.2297440022, -0.0255144555, -0.4540735781, 0.2232971638, 0.2540614307, 0.016472023, -0.2076970041, 0.0534572378, 0.152623415, -0.1369921863, -0.2016398907, -0.1757195294 ]
https://github.com/huggingface/datasets/issues/633
Load large text file for LM pre-training resulting in OOM
@lhoestq @sgugger Thanks for your comments. I have install from source code as you told, but the problem is still there. To reproduce the issue, just replace [these lines](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L241-L258) with: (load_dataset and DataCollatorForDatasetsLanguageModeling as [above mentioned](https://github.com/huggingface/datasets/issues/633#issue-702440484)) ```python dataset = load_dataset("bookcorpus") dataset = dataset.train_test_split(test_size=0.1) train_dataset = dataset['train'] eval_dataset = dataset['test'] if training_args.do_eval else None data_collator = DataCollatorForDatasetsLanguageModeling( tokenizer=tokenizer, mlm=data_args.mlm, mlm_probability=data_args.mlm_probability, block_size=data_args.block_size ) ``` and run by: ```bash python run_language_modeling.py --output_dir=output \ --model_type=bert \ --model_name_or_path=bert-base-uncased \ --do_train \ --do_eval \ --mlm ```
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this: ```python from datasets import load_dataset @dataclass class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling): """ Data collator used for language modeling based on DataCollatorForLazyLanguageModeling - collates batches of tensors, honoring their tokenizer's pad_token - preprocesses batches for masked language modeling """ block_size: int = 512 def __call__(self, examples: List[dict]) -> Dict[str, torch.Tensor]: examples = [example['text'] for example in examples] batch, attention_mask = self._tensorize_batch(examples) if self.mlm: inputs, labels = self.mask_tokens(batch) return {"input_ids": inputs, "labels": labels} else: labels = batch.clone().detach() if self.tokenizer.pad_token_id is not None: labels[labels == self.tokenizer.pad_token_id] = -100 return {"input_ids": batch, "labels": labels} def _tensorize_batch(self, examples: List[str]) -> Tuple[torch.Tensor, torch.Tensor]: if self.tokenizer._pad_token is None: raise ValueError( "You are attempting to pad samples but the tokenizer you are using" f" ({self.tokenizer.__class__.__name__}) does not have one." ) tensor_examples = self.tokenizer.batch_encode_plus( [ex for ex in examples if ex], max_length=self.block_size, return_tensors="pt", pad_to_max_length=True, return_attention_mask=True, truncation=True, ) input_ids, attention_mask = tensor_examples["input_ids"], tensor_examples["attention_mask"] return input_ids, attention_mask dataset = load_dataset('text', data_files='train.txt',cache_dir="./", , split='train') data_collator = DataCollatorForDatasetsLanguageModeling(tokenizer=tokenizer, mlm=True, mlm_probability=0.15, block_size=tokenizer.max_len) trainer = Trainer(model=model, args=args, data_collator=data_collator, train_dataset=train_dataset, prediction_loss_only=True, ) trainer.train(model_path=model_path) ``` This train.txt is about 1.1GB and has 90k lines where each line is a sequence of 4k words. During training, the memory usage increased fast as the following graph and resulted in OOM before the finish of training. ![image](https://user-images.githubusercontent.com/29704017/93292112-5576b280-f817-11ea-8da2-b2db9bf35665.png) Could you please give me any suggestions on why this happened and how to fix it? Thanks.
80
Load large text file for LM pre-training resulting in OOM I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this: ```python from datasets import load_dataset @dataclass class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling): """ Data collator used for language modeling based on DataCollatorForLazyLanguageModeling - collates batches of tensors, honoring their tokenizer's pad_token - preprocesses batches for masked language modeling """ block_size: int = 512 def __call__(self, examples: List[dict]) -> Dict[str, torch.Tensor]: examples = [example['text'] for example in examples] batch, attention_mask = self._tensorize_batch(examples) if self.mlm: inputs, labels = self.mask_tokens(batch) return {"input_ids": inputs, "labels": labels} else: labels = batch.clone().detach() if self.tokenizer.pad_token_id is not None: labels[labels == self.tokenizer.pad_token_id] = -100 return {"input_ids": batch, "labels": labels} def _tensorize_batch(self, examples: List[str]) -> Tuple[torch.Tensor, torch.Tensor]: if self.tokenizer._pad_token is None: raise ValueError( "You are attempting to pad samples but the tokenizer you are using" f" ({self.tokenizer.__class__.__name__}) does not have one." ) tensor_examples = self.tokenizer.batch_encode_plus( [ex for ex in examples if ex], max_length=self.block_size, return_tensors="pt", pad_to_max_length=True, return_attention_mask=True, truncation=True, ) input_ids, attention_mask = tensor_examples["input_ids"], tensor_examples["attention_mask"] return input_ids, attention_mask dataset = load_dataset('text', data_files='train.txt',cache_dir="./", , split='train') data_collator = DataCollatorForDatasetsLanguageModeling(tokenizer=tokenizer, mlm=True, mlm_probability=0.15, block_size=tokenizer.max_len) trainer = Trainer(model=model, args=args, data_collator=data_collator, train_dataset=train_dataset, prediction_loss_only=True, ) trainer.train(model_path=model_path) ``` This train.txt is about 1.1GB and has 90k lines where each line is a sequence of 4k words. During training, the memory usage increased fast as the following graph and resulted in OOM before the finish of training. ![image](https://user-images.githubusercontent.com/29704017/93292112-5576b280-f817-11ea-8da2-b2db9bf35665.png) Could you please give me any suggestions on why this happened and how to fix it? Thanks. @lhoestq @sgugger Thanks for your comments. I have install from source code as you told, but the problem is still there. To reproduce the issue, just replace [these lines](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L241-L258) with: (load_dataset and DataCollatorForDatasetsLanguageModeling as [above mentioned](https://github.com/huggingface/datasets/issues/633#issue-702440484)) ```python dataset = load_dataset("bookcorpus") dataset = dataset.train_test_split(test_size=0.1) train_dataset = dataset['train'] eval_dataset = dataset['test'] if training_args.do_eval else None data_collator = DataCollatorForDatasetsLanguageModeling( tokenizer=tokenizer, mlm=data_args.mlm, mlm_probability=data_args.mlm_probability, block_size=data_args.block_size ) ``` and run by: ```bash python run_language_modeling.py --output_dir=output \ --model_type=bert \ --model_name_or_path=bert-base-uncased \ --do_train \ --do_eval \ --mlm ```
[ -0.6339287758, -0.4775367975, 0.0106936339, 0.2986355424, 0.3600475788, -0.1518250853, 0.5567325354, 0.3738059103, 0.0108824177, 0.0107197072, -0.1295929253, -0.18279998, -0.2669847012, -0.1620898843, -0.0323720984, 0.0232064184, -0.0998212174, 0.1968754083, -0.2772670686, -0.0966667682, 0.0570117086, -0.0776295736, -0.2127604336, -0.0297442414, -0.3879218698, -0.0617135502, 0.3158173263, 0.1221212, -0.1640812606, -0.0958080217, -0.2297018319, 0.119790107, 0.4393487573, 0.4340214729, -0.0001147721, 0.006616035, 0.1890440583, -0.2363325804, -0.1672692001, 0.0192165729, 0.0775553286, -0.3022911847, -0.1064001769, -0.3036170602, -0.0272462256, -0.1061252356, -0.0156821143, -0.2243726701, 0.4987519681, 0.5414044857, 0.1587626338, 0.2508127093, -0.2136606872, 0.0723967925, 0.2544373274, 0.0488998592, 0.1056829095, -0.279514879, 0.4687837362, -0.1923182458, -0.4726888537, 0.1478175521, -0.2247737497, -0.2016822845, -0.0950889289, 0.0382047594, 0.3660890162, 0.0315694809, 0.264187485, 0.3474210203, 0.4272074997, -0.0008117458, -0.2896355689, -0.3209853768, -0.1426238865, -0.0843159407, 0.1892365664, 0.2010776103, 0.0598267578, 0.1184591651, 0.1071273461, -0.1253313273, -0.1519900113, 0.0761609226, -0.2748081684, 0.3397958577, -0.2012512237, -0.0380431116, 0.1555752903, -0.0944791734, 0.1961691827, -0.0997749493, 0.0034041153, 0.2567145824, -0.2454416901, -0.1123952568, -0.0716821104, -0.5194144845, 0.1627841145, -0.2759452164, 0.1981880367, 0.2972389162, -0.0876618102, -0.0676169321, 0.0863934457, 0.4202025831, -0.2524374425, 0.2605278194, 0.2272560149, 0.1640108824, -0.1717063934, -0.0443987809, -0.330511868, -0.196245268, 0.101593703, -0.0773416832, -0.01101714, -0.2546043694, -0.2404216528, 0.0585463457, -0.1407698393, -0.0308451336, 0.2748159766, 0.3899731338, -0.3540614843, 0.4294975996, 0.1651093066, 0.0523290113, -0.4855332971, -0.3365270793, -0.1744022369, 0.1532571465, -0.2032444477, 0.0389758199, 0.1297923326, 0.1396337599, 0.059654139, -0.0428832248, -0.0625894815, -0.4402191341, -0.0094448598, -0.0241032131, 0.0207528826, -0.0425147861, 0.0630237609, -0.0233655367, 0.2347659469, -0.1249950975, -0.0253819991, 0.3477917314, -0.2762122154, -0.2276413292, 0.0509794764, 0.2101763934, -0.0282484628, 0.2091549039, 0.0285064094, 0.076856479, 0.5359787345, 0.0066536209, -0.0471478626, -0.3782060146, 0.0945210904, 0.09201736, 0.1619914323, 0.1766303331, -0.0425881632, -0.0726021677, 0.0063892393, 0.1035868898, 0.255040884, 0.3907330334, -0.2264700383, 0.2906735837, 0.0070044314, -0.0566554591, 0.531992197, -0.2620989084, -0.448443979, 0.2338527441, -0.3511554897, 0.1081818491, 0.2206699997, 0.1759026051, 0.1138893515, -0.1089851037, 0.269015044, 0.3656848669, 0.0705157742, 0.1209139377, -0.2366241515, -0.0922286212, -0.1715157032, 0.484202981, 0.3627240956, -0.0255861767, -0.0730891153, 0.3563797474, 0.1833981574, -0.1992233247, 0.1312806904, 0.3693415225, -0.1744248569, -0.1261585057, 0.0944814086, 0.0655978322, -0.3000326455, -0.0709873065, -0.0908445045, 0.0828674436, -0.113605693, -0.0894262865, 0.2825580835, 0.0228702798, -0.0766652972, 0.1131797433, 0.0379410386, -0.1318217963, 0.0248665065, -0.0704168901, 0.1261966228, 0.0154216662, -0.0932068974, 0.0873603746, -0.2184159905, -0.1239405051, 0.0018027833, -0.1370612979, 0.0769502148, 0.1752731353, -0.0511877313, 0.0384013392, -0.1730398387, 0.1069575101, -0.1529778093, -0.298707068, -0.5071571469, 0.4358932972, 0.1864788085, -0.3381094635, 0.3402596712, 0.1040275842, -0.0295993686, -0.1062710881, -0.1198952049, 0.5749332309, 0.2730709314, 0.0196178816, 0.2990929186, -0.2454111725, 0.2542811036, -0.2662390769, -0.1036156192, -0.0977649167, 0.4209234416, 0.0310555417, 0.2350631654, 0.148280859, -0.0869455338, -0.2320595682, 0.4703812003, -0.1788096428, -0.0138721522, 0.2665260434, -0.42472139, -0.0115633914, -0.3480208814, -0.2494778484, 0.0067338794, 0.1732287854, -0.0944128707, -0.0554352067, 0.008537855, -0.2627931237, 0.007836163, 0.1532372683, -0.071852088, 0.3198344707, 0.1165148765, 0.1005952582, -0.1228920668, -0.1794071943, 0.1028475463, 0.1782901436, -0.2751910388, 0.1844427735, -0.0228228215, -0.0134466691, -0.2862634957, 0.1904246807, -0.1268012673, 0.0388153642, -0.0647432804, 0.2586891055, -0.0779030025, 0.1019123122, 0.3001610041, 0.3549231291, 0.4629623294, -0.078094922, 0.3263479173, -0.0826637447, -0.179695949, 0.0329435393, 0.3345076442, -0.3179928362, -0.0248904116, 0.0053772237, 0.0511769243, -0.0989300385, -0.1660347283, 0.0946891159, 0.1968245059, -0.1661895066, -0.2573058605, -0.0721762925, 0.1776910722, -0.0424320959, 0.1197286695, -0.2324416637, 0.0084072342, 0.1450571865, -0.0062899678, -0.1843239069, 0.0404453538, -0.1199218407, -0.0470516644, -0.4116414487, -0.0535182469, 0.1070508584, 0.1367316544, 0.3593675792, 0.1067890301, 0.1944517642, 0.2884452343, 0.1585921198, 0.0063675116, -0.0885990858, 0.514171958, -0.0175728817, -0.2971981764, -0.2908624411, -0.2397542596, 0.0251129922, 0.3155243397, -0.6842605472, 0.2337828726, -0.1138518378, -0.0940266177, -0.3955195546, 0.0007259165, 0.2522046864, -0.0761485249, 0.0163397267, 0.0954743102, 0.2302767783, 0.1546789706, -0.0387875624, 0.3857944012, -0.4130838215, 0.3594084978, -0.1354580224, 0.4855528176, -0.1221181452, -0.2300206274, 0.0988748446, 0.150448218, -0.0171155203, -0.0218025893, -0.013968504, -0.2593792975, -0.0582376271, 0.0227312557, 0.5197219849, 0.0168901123, -0.1655895114, -0.0158989225, 0.0681641772, 0.2563199401, -0.2606987357, 0.4905276895, -0.1907786578, 0.0184166096, -0.1996744573, 0.018745685, -0.2049808055, -0.215085566, -0.1641349345, 0.0934441686, -0.0303828474, -0.2240439802, -0.2116938084, 0.1031402275, -0.3681345582, -0.0437650047, 0.1179903299, 0.2293323725, 0.180770576, -0.1961434186, -0.086288549, -0.2018707991, 0.3574142754, 0.1934526861, 0.1124653816, 0.1632592976, -0.0568786226, -0.2155373245, -0.1774518341, -0.2904544771, 0.1419077218, 0.6505103707, 0.6102461219, -0.2162736505, -0.1585991681, 0.0791449249, 0.0026030652, -0.165273279, -0.5487569571, -0.1285093725, -0.1654993445, -0.4410513937, 0.0046062781, 0.3584984243, 0.3558540642, -0.22644566, -0.0318753272, 0.1387299597, -0.0007014232, 0.3717510402, -0.1297641248, 0.015053574, -0.0664107651, 0.2258286476, -0.1074175015, 0.3673554361, 0.2488898337, 0.3563637137, 0.1917258948, -0.3175571263, 0.0706881434, -0.0298887268, 0.2314308435, 0.1151607335, 0.110228315, 0.3546279967, 0.128971085, 0.3322557211, -0.1909665465, 0.6737232804, -0.0073443507, 0.2068270594, -0.8374908566, -0.2673701942, 0.3314560056, -0.0263577066, 0.1994025707, 0.2157178372, -0.4038516879, -0.3216699064, 0.3766613007, 0.0990833342, 0.7675246596, -0.2972694337, 0.3962582052, -0.1552994251, 0.6611962914, 0.1280310601, -0.3813101351, 0.1585617661, -0.3987911642, -0.2663660347, 0.2130052298, -0.0923115239, 0.0365401395, 0.1605038643, -0.2905769646, -0.0298116673, 0.0862521157, 0.2249334008, 0.130669862, 0.5134937763, 0.1209266186, -0.600698173, -0.0828131065, 0.0265691411, -0.0234004669, -0.1049020886, -0.049279213, 0.0799463987, -0.0313266367, -0.2085639089, -0.0284665171, 0.205257833, -0.2474460602, 0.0866158083, 0.0637525693, -0.0720531121, 0.5367996097, 0.1062303782, -0.0013606648, 0.4988961518, -0.0392867327, 0.1321583688, -0.2274818718, -0.1652867049, 0.2007086128, -0.0658490956, 0.4217028618, 0.0883790255, -0.0005877246, 0.1141034588, 0.0632385314, -0.0466908105, 0.0947638825, -0.3643093109, 0.1054971069, -0.4112312198, -0.2154277414, -0.0884305388, -0.3007825911, -0.1009221226, 0.1231094971, 0.1373569965, -0.4644461274, 0.1151453257, 0.2652112246, -0.3750101328, 0.0119967815, 0.3838247657, 0.1710590869, -0.105138883, 0.4998430014, 0.4575878084, -0.0533618517, -0.2644974291, -0.1096290797, 0.2944484651, -0.2731434703, 0.0849161148, -0.2455590516, -0.3016010821, 0.2093509287, 0.0808757395, 0.1000995934, -0.0149995526, -0.0632621124, -0.2510293424, -0.6380496621, -0.1814442873, -0.0027230312, -0.0035483714, 0.146083653, 0.2738986313, -0.310046941, 0.5892781019, -0.2788559198, -0.052941788, -0.2076085359, 0.2782230675, -0.0555623733, -0.3855460584, 0.2115359306, 0.203352496, 0.100104101, 0.0805967897, 0.0059090997, -0.2213537991, -0.1435203254, 0.1127154306, 0.2364701182, -0.4196631014, -0.0159935597, -0.3129968643, -0.0924900621, -0.2700215876, 0.0660678744, 0.0170286167, 0.0139455562, -0.2261789143, 0.0093941661, 0.0475258939, -0.2552625537, 0.0420603566, -0.2545849979, 0.1250909269, 0.2465713024, 0.1331034005, 0.1178304181, 0.0006368674, -0.39310202, 0.1796458364, 0.6661382914, -0.0175324008, 0.4190824628, -0.4357323945, -0.0715065226, 0.247659415, 0.0498033017, 0.048066061, -0.3416771889, -0.0107187238, 0.2935880125, 0.2268189788, 0.0152087733, -0.0147334104, 0.2263551056, -0.4112984836, 0.1301488876, 0.3453428149, -0.1119267717, -0.0674755946, 0.1559655219, 0.0913229808, 0.5066780448, 0.1149651706, 0.0057113338, 0.2489493787, -0.001220117, 0.1548575163, 0.4856929183, 0.2611193657, 0.2386805862, 0.3016281426, -0.0326662362, -0.0406999178, -0.2312836349, 0.2294138521, -0.4356159866, -0.4151661694, -0.2674565315, 0.5044153929, -0.0193238575, 0.1242091432, -0.3350304961, -0.0662411302, -0.0406534113, 0.2541331649, -0.1192155406, 0.2744085193, -0.4530943632, -0.1705992669, -0.0894244462, -0.1239619032, 0.0115339896, 0.1896334738, -0.0558586083, 0.2722766995, -0.5796655416, 0.2293860167, 0.0521360412, 0.145150125, -0.1346787363, 0.1227788106, 0.1055011004, -0.5078572035, 0.3433355689, 0.2378558517, 0.2918593287, 0.1154051423, -0.2219064534, 0.3443706036, 0.4366976619, -0.1908069104, -0.0406121425, -0.1209840924, -0.0356198065, -0.1499130428, 0.1974351406, 0.3490366042, 0.1878992021, 0.2596161366, 0.0557277352, -0.2659660578, 0.2785173655, 0.0650137886, -0.3240588009, 0.1786665469, -0.1329391301, 0.4019321501, -0.3285807371, -0.4429641962, 0.0098670311, -0.3941244185, 0.2155873924, 0.6670196652, -0.2954227626, 0.2878553569, -0.0254884064, 0.0485502705, 0.0018408649, 0.4760500491, 0.4697352946, 0.2841595113, -0.3783714771, -0.0256677344, -0.3288836777, 0.2765586078, -0.2024303377, 0.0669974536, 0.0222479869, 0.1707944721, 0.1645778716, -0.0033022426, -0.0796227604, -0.0136220623, 0.2188031375, -0.1950692683, -0.1675593108, -0.1280472726, 0.002094669, 0.3573178947, -0.025900675, -0.297549814, 0.1588655859, 0.1150630713, 0.0991569832, -0.3214531243, 0.3626994789, -0.198463425, -0.0203630701, 0.0691281036, -0.1504710913, 0.379209578, -0.2204387635, -0.0330467634, -0.0818275213, 0.1281417012, -0.1670769602, -0.2209999114, 0.3402221501, 0.3884243667, -0.1076364294, 0.1082137674, -0.2551926076, -0.086462304, 0.040304441, -0.3696906269, -0.3087161481, -0.0074875448, -0.0002531049, 0.0085247457, 0.1030982137, 0.2458303422, 0.1053374857, -0.0278405156, -0.2292287946, -0.1855803728, 0.2094751149, -0.2946498394, -0.3130411506, -0.0353800692, 0.0556243658, -0.1636291295, 0.2511018217, -0.4624069035, 0.1457486451, 0.2297440022, -0.0255144555, -0.4540735781, 0.2232971638, 0.2540614307, 0.016472023, -0.2076970041, 0.0534572378, 0.152623415, -0.1369921863, -0.2016398907, -0.1757195294 ]
https://github.com/huggingface/datasets/issues/633
Load large text file for LM pre-training resulting in OOM
Same here. Pre-training on wikitext-103 to do some test. At the end of the training it takes 32GB of RAM + ~30GB of SWAP. I installed dataset==1.1.0, not built from source. I will try uninstalling and building from source when it finish.
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this: ```python from datasets import load_dataset @dataclass class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling): """ Data collator used for language modeling based on DataCollatorForLazyLanguageModeling - collates batches of tensors, honoring their tokenizer's pad_token - preprocesses batches for masked language modeling """ block_size: int = 512 def __call__(self, examples: List[dict]) -> Dict[str, torch.Tensor]: examples = [example['text'] for example in examples] batch, attention_mask = self._tensorize_batch(examples) if self.mlm: inputs, labels = self.mask_tokens(batch) return {"input_ids": inputs, "labels": labels} else: labels = batch.clone().detach() if self.tokenizer.pad_token_id is not None: labels[labels == self.tokenizer.pad_token_id] = -100 return {"input_ids": batch, "labels": labels} def _tensorize_batch(self, examples: List[str]) -> Tuple[torch.Tensor, torch.Tensor]: if self.tokenizer._pad_token is None: raise ValueError( "You are attempting to pad samples but the tokenizer you are using" f" ({self.tokenizer.__class__.__name__}) does not have one." ) tensor_examples = self.tokenizer.batch_encode_plus( [ex for ex in examples if ex], max_length=self.block_size, return_tensors="pt", pad_to_max_length=True, return_attention_mask=True, truncation=True, ) input_ids, attention_mask = tensor_examples["input_ids"], tensor_examples["attention_mask"] return input_ids, attention_mask dataset = load_dataset('text', data_files='train.txt',cache_dir="./", , split='train') data_collator = DataCollatorForDatasetsLanguageModeling(tokenizer=tokenizer, mlm=True, mlm_probability=0.15, block_size=tokenizer.max_len) trainer = Trainer(model=model, args=args, data_collator=data_collator, train_dataset=train_dataset, prediction_loss_only=True, ) trainer.train(model_path=model_path) ``` This train.txt is about 1.1GB and has 90k lines where each line is a sequence of 4k words. During training, the memory usage increased fast as the following graph and resulted in OOM before the finish of training. ![image](https://user-images.githubusercontent.com/29704017/93292112-5576b280-f817-11ea-8da2-b2db9bf35665.png) Could you please give me any suggestions on why this happened and how to fix it? Thanks.
42
Load large text file for LM pre-training resulting in OOM I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this: ```python from datasets import load_dataset @dataclass class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling): """ Data collator used for language modeling based on DataCollatorForLazyLanguageModeling - collates batches of tensors, honoring their tokenizer's pad_token - preprocesses batches for masked language modeling """ block_size: int = 512 def __call__(self, examples: List[dict]) -> Dict[str, torch.Tensor]: examples = [example['text'] for example in examples] batch, attention_mask = self._tensorize_batch(examples) if self.mlm: inputs, labels = self.mask_tokens(batch) return {"input_ids": inputs, "labels": labels} else: labels = batch.clone().detach() if self.tokenizer.pad_token_id is not None: labels[labels == self.tokenizer.pad_token_id] = -100 return {"input_ids": batch, "labels": labels} def _tensorize_batch(self, examples: List[str]) -> Tuple[torch.Tensor, torch.Tensor]: if self.tokenizer._pad_token is None: raise ValueError( "You are attempting to pad samples but the tokenizer you are using" f" ({self.tokenizer.__class__.__name__}) does not have one." ) tensor_examples = self.tokenizer.batch_encode_plus( [ex for ex in examples if ex], max_length=self.block_size, return_tensors="pt", pad_to_max_length=True, return_attention_mask=True, truncation=True, ) input_ids, attention_mask = tensor_examples["input_ids"], tensor_examples["attention_mask"] return input_ids, attention_mask dataset = load_dataset('text', data_files='train.txt',cache_dir="./", , split='train') data_collator = DataCollatorForDatasetsLanguageModeling(tokenizer=tokenizer, mlm=True, mlm_probability=0.15, block_size=tokenizer.max_len) trainer = Trainer(model=model, args=args, data_collator=data_collator, train_dataset=train_dataset, prediction_loss_only=True, ) trainer.train(model_path=model_path) ``` This train.txt is about 1.1GB and has 90k lines where each line is a sequence of 4k words. During training, the memory usage increased fast as the following graph and resulted in OOM before the finish of training. ![image](https://user-images.githubusercontent.com/29704017/93292112-5576b280-f817-11ea-8da2-b2db9bf35665.png) Could you please give me any suggestions on why this happened and how to fix it? Thanks. Same here. Pre-training on wikitext-103 to do some test. At the end of the training it takes 32GB of RAM + ~30GB of SWAP. I installed dataset==1.1.0, not built from source. I will try uninstalling and building from source when it finish.
[ -0.6339287758, -0.4775367975, 0.0106936339, 0.2986355424, 0.3600475788, -0.1518250853, 0.5567325354, 0.3738059103, 0.0108824177, 0.0107197072, -0.1295929253, -0.18279998, -0.2669847012, -0.1620898843, -0.0323720984, 0.0232064184, -0.0998212174, 0.1968754083, -0.2772670686, -0.0966667682, 0.0570117086, -0.0776295736, -0.2127604336, -0.0297442414, -0.3879218698, -0.0617135502, 0.3158173263, 0.1221212, -0.1640812606, -0.0958080217, -0.2297018319, 0.119790107, 0.4393487573, 0.4340214729, -0.0001147721, 0.006616035, 0.1890440583, -0.2363325804, -0.1672692001, 0.0192165729, 0.0775553286, -0.3022911847, -0.1064001769, -0.3036170602, -0.0272462256, -0.1061252356, -0.0156821143, -0.2243726701, 0.4987519681, 0.5414044857, 0.1587626338, 0.2508127093, -0.2136606872, 0.0723967925, 0.2544373274, 0.0488998592, 0.1056829095, -0.279514879, 0.4687837362, -0.1923182458, -0.4726888537, 0.1478175521, -0.2247737497, -0.2016822845, -0.0950889289, 0.0382047594, 0.3660890162, 0.0315694809, 0.264187485, 0.3474210203, 0.4272074997, -0.0008117458, -0.2896355689, -0.3209853768, -0.1426238865, -0.0843159407, 0.1892365664, 0.2010776103, 0.0598267578, 0.1184591651, 0.1071273461, -0.1253313273, -0.1519900113, 0.0761609226, -0.2748081684, 0.3397958577, -0.2012512237, -0.0380431116, 0.1555752903, -0.0944791734, 0.1961691827, -0.0997749493, 0.0034041153, 0.2567145824, -0.2454416901, -0.1123952568, -0.0716821104, -0.5194144845, 0.1627841145, -0.2759452164, 0.1981880367, 0.2972389162, -0.0876618102, -0.0676169321, 0.0863934457, 0.4202025831, -0.2524374425, 0.2605278194, 0.2272560149, 0.1640108824, -0.1717063934, -0.0443987809, -0.330511868, -0.196245268, 0.101593703, -0.0773416832, -0.01101714, -0.2546043694, -0.2404216528, 0.0585463457, -0.1407698393, -0.0308451336, 0.2748159766, 0.3899731338, -0.3540614843, 0.4294975996, 0.1651093066, 0.0523290113, -0.4855332971, -0.3365270793, -0.1744022369, 0.1532571465, -0.2032444477, 0.0389758199, 0.1297923326, 0.1396337599, 0.059654139, -0.0428832248, -0.0625894815, -0.4402191341, -0.0094448598, -0.0241032131, 0.0207528826, -0.0425147861, 0.0630237609, -0.0233655367, 0.2347659469, -0.1249950975, -0.0253819991, 0.3477917314, -0.2762122154, -0.2276413292, 0.0509794764, 0.2101763934, -0.0282484628, 0.2091549039, 0.0285064094, 0.076856479, 0.5359787345, 0.0066536209, -0.0471478626, -0.3782060146, 0.0945210904, 0.09201736, 0.1619914323, 0.1766303331, -0.0425881632, -0.0726021677, 0.0063892393, 0.1035868898, 0.255040884, 0.3907330334, -0.2264700383, 0.2906735837, 0.0070044314, -0.0566554591, 0.531992197, -0.2620989084, -0.448443979, 0.2338527441, -0.3511554897, 0.1081818491, 0.2206699997, 0.1759026051, 0.1138893515, -0.1089851037, 0.269015044, 0.3656848669, 0.0705157742, 0.1209139377, -0.2366241515, -0.0922286212, -0.1715157032, 0.484202981, 0.3627240956, -0.0255861767, -0.0730891153, 0.3563797474, 0.1833981574, -0.1992233247, 0.1312806904, 0.3693415225, -0.1744248569, -0.1261585057, 0.0944814086, 0.0655978322, -0.3000326455, -0.0709873065, -0.0908445045, 0.0828674436, -0.113605693, -0.0894262865, 0.2825580835, 0.0228702798, -0.0766652972, 0.1131797433, 0.0379410386, -0.1318217963, 0.0248665065, -0.0704168901, 0.1261966228, 0.0154216662, -0.0932068974, 0.0873603746, -0.2184159905, -0.1239405051, 0.0018027833, -0.1370612979, 0.0769502148, 0.1752731353, -0.0511877313, 0.0384013392, -0.1730398387, 0.1069575101, -0.1529778093, -0.298707068, -0.5071571469, 0.4358932972, 0.1864788085, -0.3381094635, 0.3402596712, 0.1040275842, -0.0295993686, -0.1062710881, -0.1198952049, 0.5749332309, 0.2730709314, 0.0196178816, 0.2990929186, -0.2454111725, 0.2542811036, -0.2662390769, -0.1036156192, -0.0977649167, 0.4209234416, 0.0310555417, 0.2350631654, 0.148280859, -0.0869455338, -0.2320595682, 0.4703812003, -0.1788096428, -0.0138721522, 0.2665260434, -0.42472139, -0.0115633914, -0.3480208814, -0.2494778484, 0.0067338794, 0.1732287854, -0.0944128707, -0.0554352067, 0.008537855, -0.2627931237, 0.007836163, 0.1532372683, -0.071852088, 0.3198344707, 0.1165148765, 0.1005952582, -0.1228920668, -0.1794071943, 0.1028475463, 0.1782901436, -0.2751910388, 0.1844427735, -0.0228228215, -0.0134466691, -0.2862634957, 0.1904246807, -0.1268012673, 0.0388153642, -0.0647432804, 0.2586891055, -0.0779030025, 0.1019123122, 0.3001610041, 0.3549231291, 0.4629623294, -0.078094922, 0.3263479173, -0.0826637447, -0.179695949, 0.0329435393, 0.3345076442, -0.3179928362, -0.0248904116, 0.0053772237, 0.0511769243, -0.0989300385, -0.1660347283, 0.0946891159, 0.1968245059, -0.1661895066, -0.2573058605, -0.0721762925, 0.1776910722, -0.0424320959, 0.1197286695, -0.2324416637, 0.0084072342, 0.1450571865, -0.0062899678, -0.1843239069, 0.0404453538, -0.1199218407, -0.0470516644, -0.4116414487, -0.0535182469, 0.1070508584, 0.1367316544, 0.3593675792, 0.1067890301, 0.1944517642, 0.2884452343, 0.1585921198, 0.0063675116, -0.0885990858, 0.514171958, -0.0175728817, -0.2971981764, -0.2908624411, -0.2397542596, 0.0251129922, 0.3155243397, -0.6842605472, 0.2337828726, -0.1138518378, -0.0940266177, -0.3955195546, 0.0007259165, 0.2522046864, -0.0761485249, 0.0163397267, 0.0954743102, 0.2302767783, 0.1546789706, -0.0387875624, 0.3857944012, -0.4130838215, 0.3594084978, -0.1354580224, 0.4855528176, -0.1221181452, -0.2300206274, 0.0988748446, 0.150448218, -0.0171155203, -0.0218025893, -0.013968504, -0.2593792975, -0.0582376271, 0.0227312557, 0.5197219849, 0.0168901123, -0.1655895114, -0.0158989225, 0.0681641772, 0.2563199401, -0.2606987357, 0.4905276895, -0.1907786578, 0.0184166096, -0.1996744573, 0.018745685, -0.2049808055, -0.215085566, -0.1641349345, 0.0934441686, -0.0303828474, -0.2240439802, -0.2116938084, 0.1031402275, -0.3681345582, -0.0437650047, 0.1179903299, 0.2293323725, 0.180770576, -0.1961434186, -0.086288549, -0.2018707991, 0.3574142754, 0.1934526861, 0.1124653816, 0.1632592976, -0.0568786226, -0.2155373245, -0.1774518341, -0.2904544771, 0.1419077218, 0.6505103707, 0.6102461219, -0.2162736505, -0.1585991681, 0.0791449249, 0.0026030652, -0.165273279, -0.5487569571, -0.1285093725, -0.1654993445, -0.4410513937, 0.0046062781, 0.3584984243, 0.3558540642, -0.22644566, -0.0318753272, 0.1387299597, -0.0007014232, 0.3717510402, -0.1297641248, 0.015053574, -0.0664107651, 0.2258286476, -0.1074175015, 0.3673554361, 0.2488898337, 0.3563637137, 0.1917258948, -0.3175571263, 0.0706881434, -0.0298887268, 0.2314308435, 0.1151607335, 0.110228315, 0.3546279967, 0.128971085, 0.3322557211, -0.1909665465, 0.6737232804, -0.0073443507, 0.2068270594, -0.8374908566, -0.2673701942, 0.3314560056, -0.0263577066, 0.1994025707, 0.2157178372, -0.4038516879, -0.3216699064, 0.3766613007, 0.0990833342, 0.7675246596, -0.2972694337, 0.3962582052, -0.1552994251, 0.6611962914, 0.1280310601, -0.3813101351, 0.1585617661, -0.3987911642, -0.2663660347, 0.2130052298, -0.0923115239, 0.0365401395, 0.1605038643, -0.2905769646, -0.0298116673, 0.0862521157, 0.2249334008, 0.130669862, 0.5134937763, 0.1209266186, -0.600698173, -0.0828131065, 0.0265691411, -0.0234004669, -0.1049020886, -0.049279213, 0.0799463987, -0.0313266367, -0.2085639089, -0.0284665171, 0.205257833, -0.2474460602, 0.0866158083, 0.0637525693, -0.0720531121, 0.5367996097, 0.1062303782, -0.0013606648, 0.4988961518, -0.0392867327, 0.1321583688, -0.2274818718, -0.1652867049, 0.2007086128, -0.0658490956, 0.4217028618, 0.0883790255, -0.0005877246, 0.1141034588, 0.0632385314, -0.0466908105, 0.0947638825, -0.3643093109, 0.1054971069, -0.4112312198, -0.2154277414, -0.0884305388, -0.3007825911, -0.1009221226, 0.1231094971, 0.1373569965, -0.4644461274, 0.1151453257, 0.2652112246, -0.3750101328, 0.0119967815, 0.3838247657, 0.1710590869, -0.105138883, 0.4998430014, 0.4575878084, -0.0533618517, -0.2644974291, -0.1096290797, 0.2944484651, -0.2731434703, 0.0849161148, -0.2455590516, -0.3016010821, 0.2093509287, 0.0808757395, 0.1000995934, -0.0149995526, -0.0632621124, -0.2510293424, -0.6380496621, -0.1814442873, -0.0027230312, -0.0035483714, 0.146083653, 0.2738986313, -0.310046941, 0.5892781019, -0.2788559198, -0.052941788, -0.2076085359, 0.2782230675, -0.0555623733, -0.3855460584, 0.2115359306, 0.203352496, 0.100104101, 0.0805967897, 0.0059090997, -0.2213537991, -0.1435203254, 0.1127154306, 0.2364701182, -0.4196631014, -0.0159935597, -0.3129968643, -0.0924900621, -0.2700215876, 0.0660678744, 0.0170286167, 0.0139455562, -0.2261789143, 0.0093941661, 0.0475258939, -0.2552625537, 0.0420603566, -0.2545849979, 0.1250909269, 0.2465713024, 0.1331034005, 0.1178304181, 0.0006368674, -0.39310202, 0.1796458364, 0.6661382914, -0.0175324008, 0.4190824628, -0.4357323945, -0.0715065226, 0.247659415, 0.0498033017, 0.048066061, -0.3416771889, -0.0107187238, 0.2935880125, 0.2268189788, 0.0152087733, -0.0147334104, 0.2263551056, -0.4112984836, 0.1301488876, 0.3453428149, -0.1119267717, -0.0674755946, 0.1559655219, 0.0913229808, 0.5066780448, 0.1149651706, 0.0057113338, 0.2489493787, -0.001220117, 0.1548575163, 0.4856929183, 0.2611193657, 0.2386805862, 0.3016281426, -0.0326662362, -0.0406999178, -0.2312836349, 0.2294138521, -0.4356159866, -0.4151661694, -0.2674565315, 0.5044153929, -0.0193238575, 0.1242091432, -0.3350304961, -0.0662411302, -0.0406534113, 0.2541331649, -0.1192155406, 0.2744085193, -0.4530943632, -0.1705992669, -0.0894244462, -0.1239619032, 0.0115339896, 0.1896334738, -0.0558586083, 0.2722766995, -0.5796655416, 0.2293860167, 0.0521360412, 0.145150125, -0.1346787363, 0.1227788106, 0.1055011004, -0.5078572035, 0.3433355689, 0.2378558517, 0.2918593287, 0.1154051423, -0.2219064534, 0.3443706036, 0.4366976619, -0.1908069104, -0.0406121425, -0.1209840924, -0.0356198065, -0.1499130428, 0.1974351406, 0.3490366042, 0.1878992021, 0.2596161366, 0.0557277352, -0.2659660578, 0.2785173655, 0.0650137886, -0.3240588009, 0.1786665469, -0.1329391301, 0.4019321501, -0.3285807371, -0.4429641962, 0.0098670311, -0.3941244185, 0.2155873924, 0.6670196652, -0.2954227626, 0.2878553569, -0.0254884064, 0.0485502705, 0.0018408649, 0.4760500491, 0.4697352946, 0.2841595113, -0.3783714771, -0.0256677344, -0.3288836777, 0.2765586078, -0.2024303377, 0.0669974536, 0.0222479869, 0.1707944721, 0.1645778716, -0.0033022426, -0.0796227604, -0.0136220623, 0.2188031375, -0.1950692683, -0.1675593108, -0.1280472726, 0.002094669, 0.3573178947, -0.025900675, -0.297549814, 0.1588655859, 0.1150630713, 0.0991569832, -0.3214531243, 0.3626994789, -0.198463425, -0.0203630701, 0.0691281036, -0.1504710913, 0.379209578, -0.2204387635, -0.0330467634, -0.0818275213, 0.1281417012, -0.1670769602, -0.2209999114, 0.3402221501, 0.3884243667, -0.1076364294, 0.1082137674, -0.2551926076, -0.086462304, 0.040304441, -0.3696906269, -0.3087161481, -0.0074875448, -0.0002531049, 0.0085247457, 0.1030982137, 0.2458303422, 0.1053374857, -0.0278405156, -0.2292287946, -0.1855803728, 0.2094751149, -0.2946498394, -0.3130411506, -0.0353800692, 0.0556243658, -0.1636291295, 0.2511018217, -0.4624069035, 0.1457486451, 0.2297440022, -0.0255144555, -0.4540735781, 0.2232971638, 0.2540614307, 0.016472023, -0.2076970041, 0.0534572378, 0.152623415, -0.1369921863, -0.2016398907, -0.1757195294 ]