html_url
stringlengths
51
51
title
stringlengths
6
280
comments
stringlengths
67
24.7k
body
stringlengths
51
36.2k
__index_level_0__
int64
1
1.17k
comment_length
int64
16
1.45k
text
stringlengths
190
38.3k
embeddings
sequence
https://github.com/huggingface/datasets/issues/4592
Issue with jalFaizy/detect_chess_pieces when running datasets-cli test
Hi @faizankshaikh Please note that we have recently launched the Community feature, specifically targeted to create Discussions (about issues/questions/asking-for-help) on each Dataset on the Hub: - Blog post: https://huggingface.co/blog/community-update - Docs: https://huggingface.co/docs/hub/repositories-pull-requests-discussions The Discussion tab for your "jalFaizy/detect_chess_pieces" dataset is here: https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/discussions You can use it to ask for help by pinging the Datasets maintainers: see our docs here: https://huggingface.co/docs/datasets/master/en/share#ask-for-a-help-and-reviews I'm transferring this discussion to your Discussion tab and trying to address it: https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/discussions/1
### Link https://huggingface.co/datasets/jalFaizy/detect_chess_pieces ### Description I am trying to write a appropriate data loader for [a custom dataset](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces) using [this script](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/blob/main/detect_chess_pieces.py) When I run the command `$ datasets-cli test "D:\workspace\HF\detect_chess_pieces" --save_infos --all_configs` It gives the following error ``` Using custom data configuration default Traceback (most recent call last): File "c:\users\faiza\anaconda3\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\faiza\anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\faiza\anaconda3\Scripts\datasets-cli.exe\__main__.py", line 7, in <module> File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\datasets_cli.py", line 39, in main service.run() File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 132, in run for j, builder in enumerate(get_builders()): File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 125, in get_builders yield builder_cls( File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 1148, in __init__ super().__init__(*args, **kwargs) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 306, in __init__ info = self.get_exported_dataset_info() File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 405, in get_exported_dataset_info return self.get_all_exported_dataset_infos().get(self.config.name, DatasetInfo()) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 390, in get_all_exported_dataset_infos return DatasetInfosDict.from_directory(cls.get_imported_module_dir()) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 309, in from_directory dataset_infos_dict = { File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 310, in <dictcomp> config_name: DatasetInfo.from_dict(dataset_info_dict) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 272, in from_dict return cls(**{k: v for k, v in dataset_info_dict.items() if k in field_names}) File "<string>", line 20, in __init__ File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 160, in __post_init__ templates = [ File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 161, in <listcomp> template if isinstance(template, TaskTemplate) else task_template_from_dict(template) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\tasks\__init__.py", line 43, in task_template_from_dict return template.from_dict(task_template_dict) AttributeError: 'NoneType' object has no attribute 'from_dict' ``` My assumption is that there is some kind of issue in how the "task_templates" are read, because even if I keep them as None, or not include the argument at all, the same error occurs ### Owner Yes
675
74
Issue with jalFaizy/detect_chess_pieces when running datasets-cli test ### Link https://huggingface.co/datasets/jalFaizy/detect_chess_pieces ### Description I am trying to write a appropriate data loader for [a custom dataset](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces) using [this script](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/blob/main/detect_chess_pieces.py) When I run the command `$ datasets-cli test "D:\workspace\HF\detect_chess_pieces" --save_infos --all_configs` It gives the following error ``` Using custom data configuration default Traceback (most recent call last): File "c:\users\faiza\anaconda3\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\faiza\anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\faiza\anaconda3\Scripts\datasets-cli.exe\__main__.py", line 7, in <module> File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\datasets_cli.py", line 39, in main service.run() File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 132, in run for j, builder in enumerate(get_builders()): File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 125, in get_builders yield builder_cls( File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 1148, in __init__ super().__init__(*args, **kwargs) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 306, in __init__ info = self.get_exported_dataset_info() File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 405, in get_exported_dataset_info return self.get_all_exported_dataset_infos().get(self.config.name, DatasetInfo()) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 390, in get_all_exported_dataset_infos return DatasetInfosDict.from_directory(cls.get_imported_module_dir()) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 309, in from_directory dataset_infos_dict = { File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 310, in <dictcomp> config_name: DatasetInfo.from_dict(dataset_info_dict) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 272, in from_dict return cls(**{k: v for k, v in dataset_info_dict.items() if k in field_names}) File "<string>", line 20, in __init__ File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 160, in __post_init__ templates = [ File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 161, in <listcomp> template if isinstance(template, TaskTemplate) else task_template_from_dict(template) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\tasks\__init__.py", line 43, in task_template_from_dict return template.from_dict(task_template_dict) AttributeError: 'NoneType' object has no attribute 'from_dict' ``` My assumption is that there is some kind of issue in how the "task_templates" are read, because even if I keep them as None, or not include the argument at all, the same error occurs ### Owner Yes Hi @faizankshaikh Please note that we have recently launched the Community feature, specifically targeted to create Discussions (about issues/questions/asking-for-help) on each Dataset on the Hub: - Blog post: https://huggingface.co/blog/community-update - Docs: https://huggingface.co/docs/hub/repositories-pull-requests-discussions The Discussion tab for your "jalFaizy/detect_chess_pieces" dataset is here: https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/discussions You can use it to ask for help by pinging the Datasets maintainers: see our docs here: https://huggingface.co/docs/datasets/master/en/share#ask-for-a-help-and-reviews I'm transferring this discussion to your Discussion tab and trying to address it: https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/discussions/1
[ -1.2934759855270386, -0.850969135761261, -0.6652039289474487, 1.4016519784927368, -0.08902116119861603, -1.3593443632125854, 0.07938576489686966, -1.0377224683761597, 1.6571012735366821, -0.7465834617614746, 0.20704735815525055, -1.6742411851882935, 0.034898437559604645, -0.635442316532135, -0.670836329460144, -0.8820162415504456, -0.42446357011795044, -0.8075826168060303, 1.0661022663116455, 2.5488288402557373, 1.3786344528198242, -1.4842976331710815, 2.7724270820617676, 0.8225930333137512, -0.3439713418483734, -0.9548497796058655, 0.5917197465896606, 0.025983044877648354, -1.1418062448501587, -0.49134179949760437, -0.9197075366973877, -0.12614604830741882, -0.5925992131233215, -0.4728344976902008, -0.12404201179742813, 0.47813209891319275, -0.2494075745344162, -0.4025714695453644, -0.7117108702659607, -0.7381405234336853, 0.467475950717926, -0.42519038915634155, 1.0285252332687378, -0.3215063810348511, 1.7217768430709839, -0.6300739645957947, 0.37281182408332825, 0.7438758611679077, 1.2360199689865112, 0.07175850123167038, 0.06520123034715652, 0.18611697852611542, 0.2931576669216156, 0.02639295719563961, 0.5411744713783264, 1.0912635326385498, 0.6746659874916077, 0.4605894982814789, 0.7804334759712219, -2.09250807762146, 1.315443992614746, -0.9671988487243652, 0.12285134196281433, 1.3756799697875977, -0.9766360521316528, 0.40519294142723083, -1.7350153923034668, -0.1377430558204651, 0.6652692556381226, -2.088677406311035, 0.05112855136394501, -1.1587435007095337, -0.4818370044231415, 1.0035141706466675, 0.3394201993942261, -1.0577348470687866, 0.19526124000549316, -0.523779571056366, 1.0399267673492432, 0.37009477615356445, 1.0491938591003418, -1.6743324995040894, 0.13500821590423584, -0.2900792956352234, 0.12897507846355438, -1.4339219331741333, -1.581592321395874, 0.6070490479469299, 0.5284817218780518, 0.7336909770965576, 0.0006414363160729408, 1.0117392539978027, -1.0327118635177612, 0.7631464600563049, -1.0870836973190308, -1.7101408243179321, -1.445191502571106, -2.436986207962036, -2.3891444206237793, 0.7088776230812073, -0.5762430429458618, -0.5486704111099243, 2.049556255340576, -0.9574741125106812, -1.6539149284362793, 1.0586023330688477, 0.2473815232515335, 0.051086314022541046, 2.406724691390991, 0.33119478821754456, -0.8455535173416138, 0.5136975646018982, -0.7611815333366394, 0.8282275199890137, -0.23339219391345978, 1.2500247955322266, 0.4275878071784973, -0.9285968542098999, 1.5596376657485962, -0.5225687623023987, 0.6787923574447632, -0.5992045998573303, -0.44967687129974365, -0.6908076405525208, 0.35330966114997864, 1.76046884059906, -0.27593308687210083, 1.608492136001587, -0.2663954794406891, -1.5107693672180176, -1.47645902633667, 0.7039525508880615, 0.3734854459762573, -0.7945493459701538, 0.13060861825942993, -0.44325003027915955, 0.10806788504123688, -0.020666763186454773, 1.2075384855270386, 1.2850209474563599, 0.5741704702377319, -0.38987231254577637, -0.9135974645614624, 0.243185892701149, -0.04872170090675354, -0.7094044089317322, -1.7657040357589722, -0.2891274094581604, 0.12266235053539276, 0.7182963490486145, -1.1814693212509155, 1.8588346242904663, 0.994567334651947, 1.9546436071395874, 1.004509449005127, -0.3371897041797638, 1.3065557479858398, -0.016066154465079308, 1.8323338031768799, -0.5278905034065247, 0.7587955594062805, -0.35951006412506104, -1.186982274055481, 0.9049283862113953, -0.40358665585517883, -2.023196220397949, -0.7508406639099121, -0.6334244012832642, -0.16293740272521973, -0.7952563762664795, 0.944261372089386, -0.3237725794315338, -1.443082571029663, 0.18329033255577087, -0.6955857276916504, 0.04788287729024887, -1.3288668394088745, 0.12029168009757996, 0.7001079320907593, -0.5848803520202637, 0.10148917883634567, -0.2001742571592331, -1.280819296836853, -0.4780553877353668, 0.23106779158115387, 1.9396802186965942, -0.6758847236633301, 0.9305427670478821, 1.0859284400939941, -0.6243603229522705, 0.22078371047973633, 0.25820958614349365, -0.28555378317832947, 0.779024600982666, -1.0435532331466675, -0.5084814429283142, 1.1777477264404297, -0.23605892062187195, -0.6947053670883179, 1.4672240018844604, 0.7619031071662903, -1.147176742553711, -0.2984359562397003, -0.17905722558498383, -0.9600562453269958, 0.007526585832238197, -1.5164780616760254, -0.12920689582824707, 0.45361027121543884, -1.5277127027511597, -0.40254318714141846, -0.17017753422260284, 1.4153635501861572, -0.18914170563220978, 1.455478310585022, -0.45673197507858276, -0.04251014441251755, -0.30794695019721985, -0.5869137644767761, 0.0948064997792244, -0.14572212100028992, -0.5338048338890076, 0.13900341093540192, -0.9161545038223267, 0.306491881608963, 1.5571036338806152, 0.25653210282325745, 0.06540092825889587, 0.3612534701824188, 1.1262462139129639, 0.3022810220718384, -0.10283677279949188, -0.7185444831848145, -1.4110342264175415, 2.0823943614959717, -1.506387710571289, 2.047569751739502, 0.7900450825691223, -0.08660688996315002, -1.765077829360962, -1.7714587450027466, 1.3138455152511597, 1.2432664632797241, 2.2522075176239014, 0.5558087825775146, 0.24185334146022797, -0.8098754286766052, -0.6098377704620361, 0.4267796576023102, -0.9591964483261108, -0.5800021886825562, 0.21260730922222137, 2.3911592960357666, 1.8658748865127563, -0.47151806950569153, -0.1325264722108841, -0.7369092106819153, 1.3349844217300415, -0.2772487699985504, 0.28724709153175354, 2.095287799835205, -0.4400465488433838, -0.9726750254631042, 1.3669596910476685, -2.4314661026000977, 0.178885355591774, 2.0278823375701904, 0.3612859845161438, 0.13706344366073608, -1.4107422828674316, -0.6373028755187988, -0.579388439655304, -0.3296521008014679, -1.1993348598480225, 0.5169811248779297, -0.29743579030036926, -0.9655577540397644, -1.4771547317504883, 0.11604785919189453, -1.1784871816635132, -1.9218209981918335, 0.42792388796806335, 1.7042523622512817, 2.0974886417388916, -0.9150032997131348, 1.5155014991760254, -0.3627244830131531, 0.10851550847291946, 1.1313813924789429, 1.249953031539917, 3.071725368499756, 1.832149863243103, -1.1264171600341797, 0.6780346632003784, -0.15162833034992218, -0.43161970376968384, 1.1581708192825317, -1.2383472919464111, 1.240810513496399, -0.13333943486213684, -1.10232412815094, -1.2770527601242065, 0.9544337391853333, 0.4636472761631012, -0.10826662927865982, -0.5349979996681213, 1.364060640335083, 0.11130516231060028, 1.3352619409561157, 0.48152217268943787, -0.36142364144325256, 0.46488866209983826, -0.46184873580932617, -0.551748514175415, 1.4872496128082275, 0.14455635845661163, -1.6156855821609497, -2.169856309890747, -0.27780619263648987, -0.7724405527114868, -0.06261264532804489, -0.8080857992172241, -1.010623812675476, 1.7301652431488037, 0.2620127499103546, -1.1836082935333252, -0.28410783410072327, -0.4266372323036194, -0.4592651426792145, 2.7777907848358154, -1.3052250146865845, -0.1083541065454483, -0.9729791283607483, -0.5888636112213135, 1.607574701309204, -1.1376516819000244, -0.18987876176834106, -1.1451836824417114, -0.6736491918563843, -1.2077549695968628, -0.4702121317386627, -0.0027127559296786785, -0.9903447031974792, 0.7842971086502075, 0.21377445757389069, -1.1056591272354126, -0.3112192153930664, -0.8346162438392639, 0.986294686794281, -0.22554518282413483, 0.2828582525253296, 1.907666802406311, 0.369782418012619, -0.4476655125617981, 0.7903403043746948, 1.2370014190673828, 0.6117461919784546, -0.7661125063896179, -0.09516949951648712, -0.6649567484855652, 0.4979962408542633, -1.2497236728668213, 0.23851895332336426, -2.8471553325653076, 0.675302267074585, -0.1435064822435379, -0.012037105858325958, -0.030545052140951157, -1.2374855279922485, 1.0604201555252075, 2.7046682834625244, -1.1715366840362549, 0.48070210218429565, 0.4535185694694519, 1.1219146251678467, -1.5407376289367676, 0.377459317445755, -0.43320417404174805, 2.096069097518921, 0.12504948675632477, 1.2127947807312012, -0.5359498858451843, -2.2737927436828613, 0.7431442141532898, -1.1769312620162964, -1.147504210472107, 0.8346580266952515, -0.9387960433959961, 0.19473253190517426, -1.497294306755066, -0.09367036074399948, -1.066606044769287, -1.2262961864471436, 0.620495617389679, 0.23508036136627197, 0.4443945586681366, -0.6136978268623352, 0.301470547914505, -2.1693036556243896, -1.3782620429992676, -0.29646095633506775, -0.923859179019928, 0.6075172424316406, -0.5033082365989685, 0.5971372723579407, -0.06360859423875809, -0.00007892679423093796, 0.3168581426143646, 1.4532941579818726, 3.4502806663513184, 0.1314038187265396, 0.17350053787231445, -0.19959451258182526, -0.9568876028060913, 1.4337468147277832, 0.8731186389923096, -0.18317455053329468, -0.49165165424346924, -1.0046101808547974, 1.2588820457458496, 1.9955782890319824, 1.0960381031036377, -0.12771379947662354, -0.8757706880569458, -0.7258114814758301, -0.019487537443637848, 0.19382625818252563, 0.4545460641384125, 0.855388879776001, -0.11183010786771774, 0.06783561408519745, 1.588625431060791, 1.0612882375717163, -0.3786308467388153, 0.1450922191143036, -0.9479750394821167, -0.3277258276939392, 0.505449652671814, 0.2622705101966858, 0.10063003748655319, 0.43265411257743835, -0.8760825395584106, -0.4024393856525421, -0.25906479358673096, -0.7516198754310608, -0.6549451947212219, -0.4392678737640381, -0.4167788624763489, 1.6019954681396484, 0.03512367606163025, -0.5013789534568787, -0.05292697250843048, -0.7323590517044067, -0.19042405486106873, -1.1214518547058105, 0.2632720470428467, -0.1630367785692215, -0.03191687539219856, -0.2645692825317383, 1.7179784774780273, -0.8665703535079956, -2.0599563121795654, 0.2537006437778473, 0.29659512639045715, -0.25381478667259216, 0.19108833372592926, 1.6484512090682983, 0.6691222190856934, 1.3100106716156006, 1.340551733970642, 0.9700368642807007, -0.762284517288208, -1.270395278930664, 0.6238834261894226, 1.1238867044448853, -1.3916819095611572, 1.0457302331924438, -0.19950167834758759, -0.5217851400375366, 0.6326486468315125, 1.4516758918762207, 0.4651075303554535, -1.9463326930999756, 0.8262922763824463, -1.056731939315796, 0.988761305809021, 0.6748372316360474, 0.73713618516922, 0.14157533645629883, 0.7365534901618958, -1.135237216949463, -1.2015132904052734, -0.7232505083084106, -0.7135668396949768, 1.8680850267410278, -0.17084629833698273, 0.6151249408721924, -0.2531343102455139, -1.1685503721237183, -0.042535342276096344, 0.8389955759048462, 0.40417060256004333, -0.40978100895881653, 0.8425473570823669, -0.6540875434875488, -0.9393008947372437, -1.1577297449111938, -0.3279418647289276, -0.9806650876998901, -1.0174837112426758, 0.9960406422615051, 0.6470019221305847, 0.49279770255088806, 1.8984509706497192, 0.6813448071479797, 0.32680919766426086, -2.4551525115966797, 0.9836482405662537, 0.3174103796482086, -0.10778117924928665, 0.834804892539978, 0.3757234811782837, 1.003719687461853, -0.048998840153217316, 0.5703094601631165, -2.3437557220458984, 2.1887006759643555, -0.19116546213626862, 0.6170864701271057, 0.05968514829874039, -0.20665304362773895, 1.0274337530136108, 0.6902205944061279, 0.38148432970046997, -0.9740686416625977, 0.7233186364173889, -0.4625532031059265, 1.177707314491272, 1.0361076593399048, -0.7858808636665344, 0.09744829684495926, 1.271807074546814, 0.532443642616272, -0.560543417930603, -0.9532052278518677, -0.9141224026679993, 0.9690732955932617, 1.7350987195968628, -0.11320225894451141, -0.08940766751766205, 0.8349719643592834, 0.5338034629821777, -0.9782052040100098, -0.05723090469837189, -0.7718567848205566, -0.7105340957641602, 1.7078925371170044, 2.0538761615753174, -0.07911594957113266, -0.07237991690635681, -0.7022173404693604, -1.2182114124298096, 0.8975220918655396, -0.1493147909641266, 0.02016640082001686, 0.665677011013031, -0.6534419059753418, 1.138344168663025, 0.7004314064979553, 0.888215959072113, 0.051105938851833344, 0.2699531316757202, 0.4660853445529938, -0.20281973481178284, -1.172171950340271, -0.36593517661094666, -1.1125447750091553, -2.3614156246185303, 0.22408892214298248, -0.27280479669570923, -1.562269687652588, -0.010630819946527481, -0.9681228995323181, 1.0073561668395996, -0.5381346940994263, -1.0230615139007568, -1.5000497102737427, 0.25413262844085693, -0.05396249145269394, 0.9416929483413696, -1.5369294881820679, -0.22344970703125, 1.2525553703308105, 0.7859117984771729, -0.530034065246582, 1.0399483442306519, 0.24549682438373566, 1.035576343536377, 0.8241380453109741, -0.3182174861431122, 0.6617528200149536, 0.06853826344013214, -1.3649934530258179, 0.40156590938568115, 1.2793735265731812, 0.1600898802280426, 1.3974069356918335, -0.3138997554779053, 0.07228877395391464, 0.2667998969554901, -0.6274521350860596, -0.4928196966648102, -0.43857884407043457, 0.6896906495094299, 0.032406874001026154, -0.9248433709144592, -0.1678076684474945, -0.19126909971237183, -0.34579282999038696, 0.17714589834213257, -1.5525912046432495, -0.21336160600185394, -0.4880410134792328, -0.4213224947452545, -1.4027875661849976, -0.012298766523599625, 1.4887241125106812, -0.767462968826294, -0.15656763315200806, 0.47943776845932007, 0.39876285195350647, 0.438839316368103, 0.6353324055671692, -0.7286699414253235, -0.3220076262950897, -0.4507732093334198, -0.32773542404174805, 0.22974804043769836, 1.221882700920105, 0.052363887429237366, -1.0628015995025635, 0.6955997347831726, -0.420453816652298, 0.11112701147794724, 2.0305674076080322, 0.166895791888237, -0.6442045569419861, 0.41117674112319946, -0.6912734508514404, 1.8538448810577393, 1.6356173753738403, 1.3068430423736572, -0.2040262371301651, -0.8912390470504761, 0.5853335857391357, -0.42342254519462585, -0.33017539978027344, 0.7717180848121643, 0.30507969856262207, -0.32638823986053467, -1.4212870597839355, 0.6340969204902649, 1.2463353872299194, -0.7548611164093018, -0.762160062789917, 0.15647979080677032, -0.8473032712936401, 1.128656268119812, 0.6570854783058167, 0.353654146194458, 0.3903355002403259, 1.7576395273208618, 0.693265438079834, -0.537330687046051, 0.4640273153781891, 0.5056695938110352, -0.2490612268447876, -2.0124690532684326, -1.02131986618042, 0.2652781009674072, -0.47814297676086426, -1.513360857963562, 1.469556450843811, -1.2783722877502441, -0.9902746081352234, 0.5490556359291077, -0.021169982850551605, 1.272510051727295, 0.3738947808742523, 1.5955644845962524, 2.185940742492676, 0.7358602285385132, 0.4669186770915985, 1.1774276494979858, -0.19373077154159546, -0.5299825072288513, 1.9288250207901, -0.4312375485897064, 0.570655345916748, 1.1048208475112915, -0.3487636148929596, -1.013084053993225, -0.8628743290901184, -1.2227338552474976, -0.7099727988243103, 1.1299761533737183, 0.04841005802154541, -1.1571011543273926, 0.3184661567211151, 1.6112335920333862, 0.2101016640663147, -0.41784006357192993, 0.6268324851989746, 0.4205283224582672, -0.8859579563140869, -0.21807697415351868, -0.9653403162956238, 0.531537652015686, -0.1415487676858902, -0.2674785256385803, 0.22506974637508392, 0.6020324230194092, 1.3294332027435303, -0.08456447720527649, 0.18610794842243195, 1.0671674013137817, -1.3481659889221191, 1.5393954515457153, -0.6251574158668518, 0.26258397102355957, -2.414869785308838, 1.3858792781829834, -0.750669002532959, 1.9522136449813843, -2.699718475341797, 0.4963211119174957, -0.3926944434642792, -0.5067473649978638, 0.2017085999250412, -0.3781494200229645, 0.21459642052650452, -0.07095982879400253, -1.0494210720062256, 0.02322857640683651, -0.5087811350822449, 0.7075551748275757, 1.1326080560684204, 1.4189764261245728, -1.1315046548843384, -0.3033699691295624, -1.6813607215881348, -0.1948172003030777, -0.8376539945602417, 0.20299795269966125, -1.978402018547058, -0.19600725173950195, -1.9955148696899414, -2.44610857963562, -1.4245123863220215, -0.8717852234840393, 1.1443524360656738, 0.17833390831947327, -1.0126564502716064, 1.2720338106155396, -0.41270390152931213, -1.9013962745666504, 1.1554781198501587, -2.156050682067871 ]
https://github.com/huggingface/datasets/issues/4592
Issue with jalFaizy/detect_chess_pieces when running datasets-cli test
Thank you @albertvillanova , I will keep that in mind. Just a quick note - I posted the issue on Github because the dataset viewer suggested me to "open an issue for direct support". Maybe it can be updated with your suggestion ![image](https://user-images.githubusercontent.com/8406903/176397633-7b077d81-2044-4487-b58e-6346b05be5cf.png)
### Link https://huggingface.co/datasets/jalFaizy/detect_chess_pieces ### Description I am trying to write a appropriate data loader for [a custom dataset](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces) using [this script](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/blob/main/detect_chess_pieces.py) When I run the command `$ datasets-cli test "D:\workspace\HF\detect_chess_pieces" --save_infos --all_configs` It gives the following error ``` Using custom data configuration default Traceback (most recent call last): File "c:\users\faiza\anaconda3\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\faiza\anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\faiza\anaconda3\Scripts\datasets-cli.exe\__main__.py", line 7, in <module> File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\datasets_cli.py", line 39, in main service.run() File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 132, in run for j, builder in enumerate(get_builders()): File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 125, in get_builders yield builder_cls( File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 1148, in __init__ super().__init__(*args, **kwargs) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 306, in __init__ info = self.get_exported_dataset_info() File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 405, in get_exported_dataset_info return self.get_all_exported_dataset_infos().get(self.config.name, DatasetInfo()) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 390, in get_all_exported_dataset_infos return DatasetInfosDict.from_directory(cls.get_imported_module_dir()) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 309, in from_directory dataset_infos_dict = { File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 310, in <dictcomp> config_name: DatasetInfo.from_dict(dataset_info_dict) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 272, in from_dict return cls(**{k: v for k, v in dataset_info_dict.items() if k in field_names}) File "<string>", line 20, in __init__ File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 160, in __post_init__ templates = [ File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 161, in <listcomp> template if isinstance(template, TaskTemplate) else task_template_from_dict(template) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\tasks\__init__.py", line 43, in task_template_from_dict return template.from_dict(task_template_dict) AttributeError: 'NoneType' object has no attribute 'from_dict' ``` My assumption is that there is some kind of issue in how the "task_templates" are read, because even if I keep them as None, or not include the argument at all, the same error occurs ### Owner Yes
675
43
Issue with jalFaizy/detect_chess_pieces when running datasets-cli test ### Link https://huggingface.co/datasets/jalFaizy/detect_chess_pieces ### Description I am trying to write a appropriate data loader for [a custom dataset](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces) using [this script](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/blob/main/detect_chess_pieces.py) When I run the command `$ datasets-cli test "D:\workspace\HF\detect_chess_pieces" --save_infos --all_configs` It gives the following error ``` Using custom data configuration default Traceback (most recent call last): File "c:\users\faiza\anaconda3\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\faiza\anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\faiza\anaconda3\Scripts\datasets-cli.exe\__main__.py", line 7, in <module> File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\datasets_cli.py", line 39, in main service.run() File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 132, in run for j, builder in enumerate(get_builders()): File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 125, in get_builders yield builder_cls( File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 1148, in __init__ super().__init__(*args, **kwargs) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 306, in __init__ info = self.get_exported_dataset_info() File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 405, in get_exported_dataset_info return self.get_all_exported_dataset_infos().get(self.config.name, DatasetInfo()) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 390, in get_all_exported_dataset_infos return DatasetInfosDict.from_directory(cls.get_imported_module_dir()) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 309, in from_directory dataset_infos_dict = { File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 310, in <dictcomp> config_name: DatasetInfo.from_dict(dataset_info_dict) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 272, in from_dict return cls(**{k: v for k, v in dataset_info_dict.items() if k in field_names}) File "<string>", line 20, in __init__ File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 160, in __post_init__ templates = [ File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 161, in <listcomp> template if isinstance(template, TaskTemplate) else task_template_from_dict(template) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\tasks\__init__.py", line 43, in task_template_from_dict return template.from_dict(task_template_dict) AttributeError: 'NoneType' object has no attribute 'from_dict' ``` My assumption is that there is some kind of issue in how the "task_templates" are read, because even if I keep them as None, or not include the argument at all, the same error occurs ### Owner Yes Thank you @albertvillanova , I will keep that in mind. Just a quick note - I posted the issue on Github because the dataset viewer suggested me to "open an issue for direct support". Maybe it can be updated with your suggestion ![image](https://user-images.githubusercontent.com/8406903/176397633-7b077d81-2044-4487-b58e-6346b05be5cf.png)
[ -1.2934759855270386, -0.850969135761261, -0.6652039289474487, 1.4016519784927368, -0.08902116119861603, -1.3593443632125854, 0.07938576489686966, -1.0377224683761597, 1.6571012735366821, -0.7465834617614746, 0.20704735815525055, -1.6742411851882935, 0.034898437559604645, -0.635442316532135, -0.670836329460144, -0.8820162415504456, -0.42446357011795044, -0.8075826168060303, 1.0661022663116455, 2.5488288402557373, 1.3786344528198242, -1.4842976331710815, 2.7724270820617676, 0.8225930333137512, -0.3439713418483734, -0.9548497796058655, 0.5917197465896606, 0.025983044877648354, -1.1418062448501587, -0.49134179949760437, -0.9197075366973877, -0.12614604830741882, -0.5925992131233215, -0.4728344976902008, -0.12404201179742813, 0.47813209891319275, -0.2494075745344162, -0.4025714695453644, -0.7117108702659607, -0.7381405234336853, 0.467475950717926, -0.42519038915634155, 1.0285252332687378, -0.3215063810348511, 1.7217768430709839, -0.6300739645957947, 0.37281182408332825, 0.7438758611679077, 1.2360199689865112, 0.07175850123167038, 0.06520123034715652, 0.18611697852611542, 0.2931576669216156, 0.02639295719563961, 0.5411744713783264, 1.0912635326385498, 0.6746659874916077, 0.4605894982814789, 0.7804334759712219, -2.09250807762146, 1.315443992614746, -0.9671988487243652, 0.12285134196281433, 1.3756799697875977, -0.9766360521316528, 0.40519294142723083, -1.7350153923034668, -0.1377430558204651, 0.6652692556381226, -2.088677406311035, 0.05112855136394501, -1.1587435007095337, -0.4818370044231415, 1.0035141706466675, 0.3394201993942261, -1.0577348470687866, 0.19526124000549316, -0.523779571056366, 1.0399267673492432, 0.37009477615356445, 1.0491938591003418, -1.6743324995040894, 0.13500821590423584, -0.2900792956352234, 0.12897507846355438, -1.4339219331741333, -1.581592321395874, 0.6070490479469299, 0.5284817218780518, 0.7336909770965576, 0.0006414363160729408, 1.0117392539978027, -1.0327118635177612, 0.7631464600563049, -1.0870836973190308, -1.7101408243179321, -1.445191502571106, -2.436986207962036, -2.3891444206237793, 0.7088776230812073, -0.5762430429458618, -0.5486704111099243, 2.049556255340576, -0.9574741125106812, -1.6539149284362793, 1.0586023330688477, 0.2473815232515335, 0.051086314022541046, 2.406724691390991, 0.33119478821754456, -0.8455535173416138, 0.5136975646018982, -0.7611815333366394, 0.8282275199890137, -0.23339219391345978, 1.2500247955322266, 0.4275878071784973, -0.9285968542098999, 1.5596376657485962, -0.5225687623023987, 0.6787923574447632, -0.5992045998573303, -0.44967687129974365, -0.6908076405525208, 0.35330966114997864, 1.76046884059906, -0.27593308687210083, 1.608492136001587, -0.2663954794406891, -1.5107693672180176, -1.47645902633667, 0.7039525508880615, 0.3734854459762573, -0.7945493459701538, 0.13060861825942993, -0.44325003027915955, 0.10806788504123688, -0.020666763186454773, 1.2075384855270386, 1.2850209474563599, 0.5741704702377319, -0.38987231254577637, -0.9135974645614624, 0.243185892701149, -0.04872170090675354, -0.7094044089317322, -1.7657040357589722, -0.2891274094581604, 0.12266235053539276, 0.7182963490486145, -1.1814693212509155, 1.8588346242904663, 0.994567334651947, 1.9546436071395874, 1.004509449005127, -0.3371897041797638, 1.3065557479858398, -0.016066154465079308, 1.8323338031768799, -0.5278905034065247, 0.7587955594062805, -0.35951006412506104, -1.186982274055481, 0.9049283862113953, -0.40358665585517883, -2.023196220397949, -0.7508406639099121, -0.6334244012832642, -0.16293740272521973, -0.7952563762664795, 0.944261372089386, -0.3237725794315338, -1.443082571029663, 0.18329033255577087, -0.6955857276916504, 0.04788287729024887, -1.3288668394088745, 0.12029168009757996, 0.7001079320907593, -0.5848803520202637, 0.10148917883634567, -0.2001742571592331, -1.280819296836853, -0.4780553877353668, 0.23106779158115387, 1.9396802186965942, -0.6758847236633301, 0.9305427670478821, 1.0859284400939941, -0.6243603229522705, 0.22078371047973633, 0.25820958614349365, -0.28555378317832947, 0.779024600982666, -1.0435532331466675, -0.5084814429283142, 1.1777477264404297, -0.23605892062187195, -0.6947053670883179, 1.4672240018844604, 0.7619031071662903, -1.147176742553711, -0.2984359562397003, -0.17905722558498383, -0.9600562453269958, 0.007526585832238197, -1.5164780616760254, -0.12920689582824707, 0.45361027121543884, -1.5277127027511597, -0.40254318714141846, -0.17017753422260284, 1.4153635501861572, -0.18914170563220978, 1.455478310585022, -0.45673197507858276, -0.04251014441251755, -0.30794695019721985, -0.5869137644767761, 0.0948064997792244, -0.14572212100028992, -0.5338048338890076, 0.13900341093540192, -0.9161545038223267, 0.306491881608963, 1.5571036338806152, 0.25653210282325745, 0.06540092825889587, 0.3612534701824188, 1.1262462139129639, 0.3022810220718384, -0.10283677279949188, -0.7185444831848145, -1.4110342264175415, 2.0823943614959717, -1.506387710571289, 2.047569751739502, 0.7900450825691223, -0.08660688996315002, -1.765077829360962, -1.7714587450027466, 1.3138455152511597, 1.2432664632797241, 2.2522075176239014, 0.5558087825775146, 0.24185334146022797, -0.8098754286766052, -0.6098377704620361, 0.4267796576023102, -0.9591964483261108, -0.5800021886825562, 0.21260730922222137, 2.3911592960357666, 1.8658748865127563, -0.47151806950569153, -0.1325264722108841, -0.7369092106819153, 1.3349844217300415, -0.2772487699985504, 0.28724709153175354, 2.095287799835205, -0.4400465488433838, -0.9726750254631042, 1.3669596910476685, -2.4314661026000977, 0.178885355591774, 2.0278823375701904, 0.3612859845161438, 0.13706344366073608, -1.4107422828674316, -0.6373028755187988, -0.579388439655304, -0.3296521008014679, -1.1993348598480225, 0.5169811248779297, -0.29743579030036926, -0.9655577540397644, -1.4771547317504883, 0.11604785919189453, -1.1784871816635132, -1.9218209981918335, 0.42792388796806335, 1.7042523622512817, 2.0974886417388916, -0.9150032997131348, 1.5155014991760254, -0.3627244830131531, 0.10851550847291946, 1.1313813924789429, 1.249953031539917, 3.071725368499756, 1.832149863243103, -1.1264171600341797, 0.6780346632003784, -0.15162833034992218, -0.43161970376968384, 1.1581708192825317, -1.2383472919464111, 1.240810513496399, -0.13333943486213684, -1.10232412815094, -1.2770527601242065, 0.9544337391853333, 0.4636472761631012, -0.10826662927865982, -0.5349979996681213, 1.364060640335083, 0.11130516231060028, 1.3352619409561157, 0.48152217268943787, -0.36142364144325256, 0.46488866209983826, -0.46184873580932617, -0.551748514175415, 1.4872496128082275, 0.14455635845661163, -1.6156855821609497, -2.169856309890747, -0.27780619263648987, -0.7724405527114868, -0.06261264532804489, -0.8080857992172241, -1.010623812675476, 1.7301652431488037, 0.2620127499103546, -1.1836082935333252, -0.28410783410072327, -0.4266372323036194, -0.4592651426792145, 2.7777907848358154, -1.3052250146865845, -0.1083541065454483, -0.9729791283607483, -0.5888636112213135, 1.607574701309204, -1.1376516819000244, -0.18987876176834106, -1.1451836824417114, -0.6736491918563843, -1.2077549695968628, -0.4702121317386627, -0.0027127559296786785, -0.9903447031974792, 0.7842971086502075, 0.21377445757389069, -1.1056591272354126, -0.3112192153930664, -0.8346162438392639, 0.986294686794281, -0.22554518282413483, 0.2828582525253296, 1.907666802406311, 0.369782418012619, -0.4476655125617981, 0.7903403043746948, 1.2370014190673828, 0.6117461919784546, -0.7661125063896179, -0.09516949951648712, -0.6649567484855652, 0.4979962408542633, -1.2497236728668213, 0.23851895332336426, -2.8471553325653076, 0.675302267074585, -0.1435064822435379, -0.012037105858325958, -0.030545052140951157, -1.2374855279922485, 1.0604201555252075, 2.7046682834625244, -1.1715366840362549, 0.48070210218429565, 0.4535185694694519, 1.1219146251678467, -1.5407376289367676, 0.377459317445755, -0.43320417404174805, 2.096069097518921, 0.12504948675632477, 1.2127947807312012, -0.5359498858451843, -2.2737927436828613, 0.7431442141532898, -1.1769312620162964, -1.147504210472107, 0.8346580266952515, -0.9387960433959961, 0.19473253190517426, -1.497294306755066, -0.09367036074399948, -1.066606044769287, -1.2262961864471436, 0.620495617389679, 0.23508036136627197, 0.4443945586681366, -0.6136978268623352, 0.301470547914505, -2.1693036556243896, -1.3782620429992676, -0.29646095633506775, -0.923859179019928, 0.6075172424316406, -0.5033082365989685, 0.5971372723579407, -0.06360859423875809, -0.00007892679423093796, 0.3168581426143646, 1.4532941579818726, 3.4502806663513184, 0.1314038187265396, 0.17350053787231445, -0.19959451258182526, -0.9568876028060913, 1.4337468147277832, 0.8731186389923096, -0.18317455053329468, -0.49165165424346924, -1.0046101808547974, 1.2588820457458496, 1.9955782890319824, 1.0960381031036377, -0.12771379947662354, -0.8757706880569458, -0.7258114814758301, -0.019487537443637848, 0.19382625818252563, 0.4545460641384125, 0.855388879776001, -0.11183010786771774, 0.06783561408519745, 1.588625431060791, 1.0612882375717163, -0.3786308467388153, 0.1450922191143036, -0.9479750394821167, -0.3277258276939392, 0.505449652671814, 0.2622705101966858, 0.10063003748655319, 0.43265411257743835, -0.8760825395584106, -0.4024393856525421, -0.25906479358673096, -0.7516198754310608, -0.6549451947212219, -0.4392678737640381, -0.4167788624763489, 1.6019954681396484, 0.03512367606163025, -0.5013789534568787, -0.05292697250843048, -0.7323590517044067, -0.19042405486106873, -1.1214518547058105, 0.2632720470428467, -0.1630367785692215, -0.03191687539219856, -0.2645692825317383, 1.7179784774780273, -0.8665703535079956, -2.0599563121795654, 0.2537006437778473, 0.29659512639045715, -0.25381478667259216, 0.19108833372592926, 1.6484512090682983, 0.6691222190856934, 1.3100106716156006, 1.340551733970642, 0.9700368642807007, -0.762284517288208, -1.270395278930664, 0.6238834261894226, 1.1238867044448853, -1.3916819095611572, 1.0457302331924438, -0.19950167834758759, -0.5217851400375366, 0.6326486468315125, 1.4516758918762207, 0.4651075303554535, -1.9463326930999756, 0.8262922763824463, -1.056731939315796, 0.988761305809021, 0.6748372316360474, 0.73713618516922, 0.14157533645629883, 0.7365534901618958, -1.135237216949463, -1.2015132904052734, -0.7232505083084106, -0.7135668396949768, 1.8680850267410278, -0.17084629833698273, 0.6151249408721924, -0.2531343102455139, -1.1685503721237183, -0.042535342276096344, 0.8389955759048462, 0.40417060256004333, -0.40978100895881653, 0.8425473570823669, -0.6540875434875488, -0.9393008947372437, -1.1577297449111938, -0.3279418647289276, -0.9806650876998901, -1.0174837112426758, 0.9960406422615051, 0.6470019221305847, 0.49279770255088806, 1.8984509706497192, 0.6813448071479797, 0.32680919766426086, -2.4551525115966797, 0.9836482405662537, 0.3174103796482086, -0.10778117924928665, 0.834804892539978, 0.3757234811782837, 1.003719687461853, -0.048998840153217316, 0.5703094601631165, -2.3437557220458984, 2.1887006759643555, -0.19116546213626862, 0.6170864701271057, 0.05968514829874039, -0.20665304362773895, 1.0274337530136108, 0.6902205944061279, 0.38148432970046997, -0.9740686416625977, 0.7233186364173889, -0.4625532031059265, 1.177707314491272, 1.0361076593399048, -0.7858808636665344, 0.09744829684495926, 1.271807074546814, 0.532443642616272, -0.560543417930603, -0.9532052278518677, -0.9141224026679993, 0.9690732955932617, 1.7350987195968628, -0.11320225894451141, -0.08940766751766205, 0.8349719643592834, 0.5338034629821777, -0.9782052040100098, -0.05723090469837189, -0.7718567848205566, -0.7105340957641602, 1.7078925371170044, 2.0538761615753174, -0.07911594957113266, -0.07237991690635681, -0.7022173404693604, -1.2182114124298096, 0.8975220918655396, -0.1493147909641266, 0.02016640082001686, 0.665677011013031, -0.6534419059753418, 1.138344168663025, 0.7004314064979553, 0.888215959072113, 0.051105938851833344, 0.2699531316757202, 0.4660853445529938, -0.20281973481178284, -1.172171950340271, -0.36593517661094666, -1.1125447750091553, -2.3614156246185303, 0.22408892214298248, -0.27280479669570923, -1.562269687652588, -0.010630819946527481, -0.9681228995323181, 1.0073561668395996, -0.5381346940994263, -1.0230615139007568, -1.5000497102737427, 0.25413262844085693, -0.05396249145269394, 0.9416929483413696, -1.5369294881820679, -0.22344970703125, 1.2525553703308105, 0.7859117984771729, -0.530034065246582, 1.0399483442306519, 0.24549682438373566, 1.035576343536377, 0.8241380453109741, -0.3182174861431122, 0.6617528200149536, 0.06853826344013214, -1.3649934530258179, 0.40156590938568115, 1.2793735265731812, 0.1600898802280426, 1.3974069356918335, -0.3138997554779053, 0.07228877395391464, 0.2667998969554901, -0.6274521350860596, -0.4928196966648102, -0.43857884407043457, 0.6896906495094299, 0.032406874001026154, -0.9248433709144592, -0.1678076684474945, -0.19126909971237183, -0.34579282999038696, 0.17714589834213257, -1.5525912046432495, -0.21336160600185394, -0.4880410134792328, -0.4213224947452545, -1.4027875661849976, -0.012298766523599625, 1.4887241125106812, -0.767462968826294, -0.15656763315200806, 0.47943776845932007, 0.39876285195350647, 0.438839316368103, 0.6353324055671692, -0.7286699414253235, -0.3220076262950897, -0.4507732093334198, -0.32773542404174805, 0.22974804043769836, 1.221882700920105, 0.052363887429237366, -1.0628015995025635, 0.6955997347831726, -0.420453816652298, 0.11112701147794724, 2.0305674076080322, 0.166895791888237, -0.6442045569419861, 0.41117674112319946, -0.6912734508514404, 1.8538448810577393, 1.6356173753738403, 1.3068430423736572, -0.2040262371301651, -0.8912390470504761, 0.5853335857391357, -0.42342254519462585, -0.33017539978027344, 0.7717180848121643, 0.30507969856262207, -0.32638823986053467, -1.4212870597839355, 0.6340969204902649, 1.2463353872299194, -0.7548611164093018, -0.762160062789917, 0.15647979080677032, -0.8473032712936401, 1.128656268119812, 0.6570854783058167, 0.353654146194458, 0.3903355002403259, 1.7576395273208618, 0.693265438079834, -0.537330687046051, 0.4640273153781891, 0.5056695938110352, -0.2490612268447876, -2.0124690532684326, -1.02131986618042, 0.2652781009674072, -0.47814297676086426, -1.513360857963562, 1.469556450843811, -1.2783722877502441, -0.9902746081352234, 0.5490556359291077, -0.021169982850551605, 1.272510051727295, 0.3738947808742523, 1.5955644845962524, 2.185940742492676, 0.7358602285385132, 0.4669186770915985, 1.1774276494979858, -0.19373077154159546, -0.5299825072288513, 1.9288250207901, -0.4312375485897064, 0.570655345916748, 1.1048208475112915, -0.3487636148929596, -1.013084053993225, -0.8628743290901184, -1.2227338552474976, -0.7099727988243103, 1.1299761533737183, 0.04841005802154541, -1.1571011543273926, 0.3184661567211151, 1.6112335920333862, 0.2101016640663147, -0.41784006357192993, 0.6268324851989746, 0.4205283224582672, -0.8859579563140869, -0.21807697415351868, -0.9653403162956238, 0.531537652015686, -0.1415487676858902, -0.2674785256385803, 0.22506974637508392, 0.6020324230194092, 1.3294332027435303, -0.08456447720527649, 0.18610794842243195, 1.0671674013137817, -1.3481659889221191, 1.5393954515457153, -0.6251574158668518, 0.26258397102355957, -2.414869785308838, 1.3858792781829834, -0.750669002532959, 1.9522136449813843, -2.699718475341797, 0.4963211119174957, -0.3926944434642792, -0.5067473649978638, 0.2017085999250412, -0.3781494200229645, 0.21459642052650452, -0.07095982879400253, -1.0494210720062256, 0.02322857640683651, -0.5087811350822449, 0.7075551748275757, 1.1326080560684204, 1.4189764261245728, -1.1315046548843384, -0.3033699691295624, -1.6813607215881348, -0.1948172003030777, -0.8376539945602417, 0.20299795269966125, -1.978402018547058, -0.19600725173950195, -1.9955148696899414, -2.44610857963562, -1.4245123863220215, -0.8717852234840393, 1.1443524360656738, 0.17833390831947327, -1.0126564502716064, 1.2720338106155396, -0.41270390152931213, -1.9013962745666504, 1.1554781198501587, -2.156050682067871 ]
https://github.com/huggingface/datasets/issues/4592
Issue with jalFaizy/detect_chess_pieces when running datasets-cli test
Thank you pointing this out: yes, definitely, we should fix the error message. We are working on this.
### Link https://huggingface.co/datasets/jalFaizy/detect_chess_pieces ### Description I am trying to write a appropriate data loader for [a custom dataset](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces) using [this script](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/blob/main/detect_chess_pieces.py) When I run the command `$ datasets-cli test "D:\workspace\HF\detect_chess_pieces" --save_infos --all_configs` It gives the following error ``` Using custom data configuration default Traceback (most recent call last): File "c:\users\faiza\anaconda3\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\faiza\anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\faiza\anaconda3\Scripts\datasets-cli.exe\__main__.py", line 7, in <module> File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\datasets_cli.py", line 39, in main service.run() File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 132, in run for j, builder in enumerate(get_builders()): File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 125, in get_builders yield builder_cls( File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 1148, in __init__ super().__init__(*args, **kwargs) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 306, in __init__ info = self.get_exported_dataset_info() File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 405, in get_exported_dataset_info return self.get_all_exported_dataset_infos().get(self.config.name, DatasetInfo()) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 390, in get_all_exported_dataset_infos return DatasetInfosDict.from_directory(cls.get_imported_module_dir()) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 309, in from_directory dataset_infos_dict = { File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 310, in <dictcomp> config_name: DatasetInfo.from_dict(dataset_info_dict) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 272, in from_dict return cls(**{k: v for k, v in dataset_info_dict.items() if k in field_names}) File "<string>", line 20, in __init__ File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 160, in __post_init__ templates = [ File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 161, in <listcomp> template if isinstance(template, TaskTemplate) else task_template_from_dict(template) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\tasks\__init__.py", line 43, in task_template_from_dict return template.from_dict(task_template_dict) AttributeError: 'NoneType' object has no attribute 'from_dict' ``` My assumption is that there is some kind of issue in how the "task_templates" are read, because even if I keep them as None, or not include the argument at all, the same error occurs ### Owner Yes
675
18
Issue with jalFaizy/detect_chess_pieces when running datasets-cli test ### Link https://huggingface.co/datasets/jalFaizy/detect_chess_pieces ### Description I am trying to write a appropriate data loader for [a custom dataset](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces) using [this script](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/blob/main/detect_chess_pieces.py) When I run the command `$ datasets-cli test "D:\workspace\HF\detect_chess_pieces" --save_infos --all_configs` It gives the following error ``` Using custom data configuration default Traceback (most recent call last): File "c:\users\faiza\anaconda3\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\faiza\anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\faiza\anaconda3\Scripts\datasets-cli.exe\__main__.py", line 7, in <module> File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\datasets_cli.py", line 39, in main service.run() File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 132, in run for j, builder in enumerate(get_builders()): File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 125, in get_builders yield builder_cls( File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 1148, in __init__ super().__init__(*args, **kwargs) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 306, in __init__ info = self.get_exported_dataset_info() File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 405, in get_exported_dataset_info return self.get_all_exported_dataset_infos().get(self.config.name, DatasetInfo()) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 390, in get_all_exported_dataset_infos return DatasetInfosDict.from_directory(cls.get_imported_module_dir()) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 309, in from_directory dataset_infos_dict = { File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 310, in <dictcomp> config_name: DatasetInfo.from_dict(dataset_info_dict) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 272, in from_dict return cls(**{k: v for k, v in dataset_info_dict.items() if k in field_names}) File "<string>", line 20, in __init__ File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 160, in __post_init__ templates = [ File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 161, in <listcomp> template if isinstance(template, TaskTemplate) else task_template_from_dict(template) File "c:\users\faiza\anaconda3\lib\site-packages\datasets\tasks\__init__.py", line 43, in task_template_from_dict return template.from_dict(task_template_dict) AttributeError: 'NoneType' object has no attribute 'from_dict' ``` My assumption is that there is some kind of issue in how the "task_templates" are read, because even if I keep them as None, or not include the argument at all, the same error occurs ### Owner Yes Thank you pointing this out: yes, definitely, we should fix the error message. We are working on this.
[ -1.2934759855270386, -0.850969135761261, -0.6652039289474487, 1.4016519784927368, -0.08902116119861603, -1.3593443632125854, 0.07938576489686966, -1.0377224683761597, 1.6571012735366821, -0.7465834617614746, 0.20704735815525055, -1.6742411851882935, 0.034898437559604645, -0.635442316532135, -0.670836329460144, -0.8820162415504456, -0.42446357011795044, -0.8075826168060303, 1.0661022663116455, 2.5488288402557373, 1.3786344528198242, -1.4842976331710815, 2.7724270820617676, 0.8225930333137512, -0.3439713418483734, -0.9548497796058655, 0.5917197465896606, 0.025983044877648354, -1.1418062448501587, -0.49134179949760437, -0.9197075366973877, -0.12614604830741882, -0.5925992131233215, -0.4728344976902008, -0.12404201179742813, 0.47813209891319275, -0.2494075745344162, -0.4025714695453644, -0.7117108702659607, -0.7381405234336853, 0.467475950717926, -0.42519038915634155, 1.0285252332687378, -0.3215063810348511, 1.7217768430709839, -0.6300739645957947, 0.37281182408332825, 0.7438758611679077, 1.2360199689865112, 0.07175850123167038, 0.06520123034715652, 0.18611697852611542, 0.2931576669216156, 0.02639295719563961, 0.5411744713783264, 1.0912635326385498, 0.6746659874916077, 0.4605894982814789, 0.7804334759712219, -2.09250807762146, 1.315443992614746, -0.9671988487243652, 0.12285134196281433, 1.3756799697875977, -0.9766360521316528, 0.40519294142723083, -1.7350153923034668, -0.1377430558204651, 0.6652692556381226, -2.088677406311035, 0.05112855136394501, -1.1587435007095337, -0.4818370044231415, 1.0035141706466675, 0.3394201993942261, -1.0577348470687866, 0.19526124000549316, -0.523779571056366, 1.0399267673492432, 0.37009477615356445, 1.0491938591003418, -1.6743324995040894, 0.13500821590423584, -0.2900792956352234, 0.12897507846355438, -1.4339219331741333, -1.581592321395874, 0.6070490479469299, 0.5284817218780518, 0.7336909770965576, 0.0006414363160729408, 1.0117392539978027, -1.0327118635177612, 0.7631464600563049, -1.0870836973190308, -1.7101408243179321, -1.445191502571106, -2.436986207962036, -2.3891444206237793, 0.7088776230812073, -0.5762430429458618, -0.5486704111099243, 2.049556255340576, -0.9574741125106812, -1.6539149284362793, 1.0586023330688477, 0.2473815232515335, 0.051086314022541046, 2.406724691390991, 0.33119478821754456, -0.8455535173416138, 0.5136975646018982, -0.7611815333366394, 0.8282275199890137, -0.23339219391345978, 1.2500247955322266, 0.4275878071784973, -0.9285968542098999, 1.5596376657485962, -0.5225687623023987, 0.6787923574447632, -0.5992045998573303, -0.44967687129974365, -0.6908076405525208, 0.35330966114997864, 1.76046884059906, -0.27593308687210083, 1.608492136001587, -0.2663954794406891, -1.5107693672180176, -1.47645902633667, 0.7039525508880615, 0.3734854459762573, -0.7945493459701538, 0.13060861825942993, -0.44325003027915955, 0.10806788504123688, -0.020666763186454773, 1.2075384855270386, 1.2850209474563599, 0.5741704702377319, -0.38987231254577637, -0.9135974645614624, 0.243185892701149, -0.04872170090675354, -0.7094044089317322, -1.7657040357589722, -0.2891274094581604, 0.12266235053539276, 0.7182963490486145, -1.1814693212509155, 1.8588346242904663, 0.994567334651947, 1.9546436071395874, 1.004509449005127, -0.3371897041797638, 1.3065557479858398, -0.016066154465079308, 1.8323338031768799, -0.5278905034065247, 0.7587955594062805, -0.35951006412506104, -1.186982274055481, 0.9049283862113953, -0.40358665585517883, -2.023196220397949, -0.7508406639099121, -0.6334244012832642, -0.16293740272521973, -0.7952563762664795, 0.944261372089386, -0.3237725794315338, -1.443082571029663, 0.18329033255577087, -0.6955857276916504, 0.04788287729024887, -1.3288668394088745, 0.12029168009757996, 0.7001079320907593, -0.5848803520202637, 0.10148917883634567, -0.2001742571592331, -1.280819296836853, -0.4780553877353668, 0.23106779158115387, 1.9396802186965942, -0.6758847236633301, 0.9305427670478821, 1.0859284400939941, -0.6243603229522705, 0.22078371047973633, 0.25820958614349365, -0.28555378317832947, 0.779024600982666, -1.0435532331466675, -0.5084814429283142, 1.1777477264404297, -0.23605892062187195, -0.6947053670883179, 1.4672240018844604, 0.7619031071662903, -1.147176742553711, -0.2984359562397003, -0.17905722558498383, -0.9600562453269958, 0.007526585832238197, -1.5164780616760254, -0.12920689582824707, 0.45361027121543884, -1.5277127027511597, -0.40254318714141846, -0.17017753422260284, 1.4153635501861572, -0.18914170563220978, 1.455478310585022, -0.45673197507858276, -0.04251014441251755, -0.30794695019721985, -0.5869137644767761, 0.0948064997792244, -0.14572212100028992, -0.5338048338890076, 0.13900341093540192, -0.9161545038223267, 0.306491881608963, 1.5571036338806152, 0.25653210282325745, 0.06540092825889587, 0.3612534701824188, 1.1262462139129639, 0.3022810220718384, -0.10283677279949188, -0.7185444831848145, -1.4110342264175415, 2.0823943614959717, -1.506387710571289, 2.047569751739502, 0.7900450825691223, -0.08660688996315002, -1.765077829360962, -1.7714587450027466, 1.3138455152511597, 1.2432664632797241, 2.2522075176239014, 0.5558087825775146, 0.24185334146022797, -0.8098754286766052, -0.6098377704620361, 0.4267796576023102, -0.9591964483261108, -0.5800021886825562, 0.21260730922222137, 2.3911592960357666, 1.8658748865127563, -0.47151806950569153, -0.1325264722108841, -0.7369092106819153, 1.3349844217300415, -0.2772487699985504, 0.28724709153175354, 2.095287799835205, -0.4400465488433838, -0.9726750254631042, 1.3669596910476685, -2.4314661026000977, 0.178885355591774, 2.0278823375701904, 0.3612859845161438, 0.13706344366073608, -1.4107422828674316, -0.6373028755187988, -0.579388439655304, -0.3296521008014679, -1.1993348598480225, 0.5169811248779297, -0.29743579030036926, -0.9655577540397644, -1.4771547317504883, 0.11604785919189453, -1.1784871816635132, -1.9218209981918335, 0.42792388796806335, 1.7042523622512817, 2.0974886417388916, -0.9150032997131348, 1.5155014991760254, -0.3627244830131531, 0.10851550847291946, 1.1313813924789429, 1.249953031539917, 3.071725368499756, 1.832149863243103, -1.1264171600341797, 0.6780346632003784, -0.15162833034992218, -0.43161970376968384, 1.1581708192825317, -1.2383472919464111, 1.240810513496399, -0.13333943486213684, -1.10232412815094, -1.2770527601242065, 0.9544337391853333, 0.4636472761631012, -0.10826662927865982, -0.5349979996681213, 1.364060640335083, 0.11130516231060028, 1.3352619409561157, 0.48152217268943787, -0.36142364144325256, 0.46488866209983826, -0.46184873580932617, -0.551748514175415, 1.4872496128082275, 0.14455635845661163, -1.6156855821609497, -2.169856309890747, -0.27780619263648987, -0.7724405527114868, -0.06261264532804489, -0.8080857992172241, -1.010623812675476, 1.7301652431488037, 0.2620127499103546, -1.1836082935333252, -0.28410783410072327, -0.4266372323036194, -0.4592651426792145, 2.7777907848358154, -1.3052250146865845, -0.1083541065454483, -0.9729791283607483, -0.5888636112213135, 1.607574701309204, -1.1376516819000244, -0.18987876176834106, -1.1451836824417114, -0.6736491918563843, -1.2077549695968628, -0.4702121317386627, -0.0027127559296786785, -0.9903447031974792, 0.7842971086502075, 0.21377445757389069, -1.1056591272354126, -0.3112192153930664, -0.8346162438392639, 0.986294686794281, -0.22554518282413483, 0.2828582525253296, 1.907666802406311, 0.369782418012619, -0.4476655125617981, 0.7903403043746948, 1.2370014190673828, 0.6117461919784546, -0.7661125063896179, -0.09516949951648712, -0.6649567484855652, 0.4979962408542633, -1.2497236728668213, 0.23851895332336426, -2.8471553325653076, 0.675302267074585, -0.1435064822435379, -0.012037105858325958, -0.030545052140951157, -1.2374855279922485, 1.0604201555252075, 2.7046682834625244, -1.1715366840362549, 0.48070210218429565, 0.4535185694694519, 1.1219146251678467, -1.5407376289367676, 0.377459317445755, -0.43320417404174805, 2.096069097518921, 0.12504948675632477, 1.2127947807312012, -0.5359498858451843, -2.2737927436828613, 0.7431442141532898, -1.1769312620162964, -1.147504210472107, 0.8346580266952515, -0.9387960433959961, 0.19473253190517426, -1.497294306755066, -0.09367036074399948, -1.066606044769287, -1.2262961864471436, 0.620495617389679, 0.23508036136627197, 0.4443945586681366, -0.6136978268623352, 0.301470547914505, -2.1693036556243896, -1.3782620429992676, -0.29646095633506775, -0.923859179019928, 0.6075172424316406, -0.5033082365989685, 0.5971372723579407, -0.06360859423875809, -0.00007892679423093796, 0.3168581426143646, 1.4532941579818726, 3.4502806663513184, 0.1314038187265396, 0.17350053787231445, -0.19959451258182526, -0.9568876028060913, 1.4337468147277832, 0.8731186389923096, -0.18317455053329468, -0.49165165424346924, -1.0046101808547974, 1.2588820457458496, 1.9955782890319824, 1.0960381031036377, -0.12771379947662354, -0.8757706880569458, -0.7258114814758301, -0.019487537443637848, 0.19382625818252563, 0.4545460641384125, 0.855388879776001, -0.11183010786771774, 0.06783561408519745, 1.588625431060791, 1.0612882375717163, -0.3786308467388153, 0.1450922191143036, -0.9479750394821167, -0.3277258276939392, 0.505449652671814, 0.2622705101966858, 0.10063003748655319, 0.43265411257743835, -0.8760825395584106, -0.4024393856525421, -0.25906479358673096, -0.7516198754310608, -0.6549451947212219, -0.4392678737640381, -0.4167788624763489, 1.6019954681396484, 0.03512367606163025, -0.5013789534568787, -0.05292697250843048, -0.7323590517044067, -0.19042405486106873, -1.1214518547058105, 0.2632720470428467, -0.1630367785692215, -0.03191687539219856, -0.2645692825317383, 1.7179784774780273, -0.8665703535079956, -2.0599563121795654, 0.2537006437778473, 0.29659512639045715, -0.25381478667259216, 0.19108833372592926, 1.6484512090682983, 0.6691222190856934, 1.3100106716156006, 1.340551733970642, 0.9700368642807007, -0.762284517288208, -1.270395278930664, 0.6238834261894226, 1.1238867044448853, -1.3916819095611572, 1.0457302331924438, -0.19950167834758759, -0.5217851400375366, 0.6326486468315125, 1.4516758918762207, 0.4651075303554535, -1.9463326930999756, 0.8262922763824463, -1.056731939315796, 0.988761305809021, 0.6748372316360474, 0.73713618516922, 0.14157533645629883, 0.7365534901618958, -1.135237216949463, -1.2015132904052734, -0.7232505083084106, -0.7135668396949768, 1.8680850267410278, -0.17084629833698273, 0.6151249408721924, -0.2531343102455139, -1.1685503721237183, -0.042535342276096344, 0.8389955759048462, 0.40417060256004333, -0.40978100895881653, 0.8425473570823669, -0.6540875434875488, -0.9393008947372437, -1.1577297449111938, -0.3279418647289276, -0.9806650876998901, -1.0174837112426758, 0.9960406422615051, 0.6470019221305847, 0.49279770255088806, 1.8984509706497192, 0.6813448071479797, 0.32680919766426086, -2.4551525115966797, 0.9836482405662537, 0.3174103796482086, -0.10778117924928665, 0.834804892539978, 0.3757234811782837, 1.003719687461853, -0.048998840153217316, 0.5703094601631165, -2.3437557220458984, 2.1887006759643555, -0.19116546213626862, 0.6170864701271057, 0.05968514829874039, -0.20665304362773895, 1.0274337530136108, 0.6902205944061279, 0.38148432970046997, -0.9740686416625977, 0.7233186364173889, -0.4625532031059265, 1.177707314491272, 1.0361076593399048, -0.7858808636665344, 0.09744829684495926, 1.271807074546814, 0.532443642616272, -0.560543417930603, -0.9532052278518677, -0.9141224026679993, 0.9690732955932617, 1.7350987195968628, -0.11320225894451141, -0.08940766751766205, 0.8349719643592834, 0.5338034629821777, -0.9782052040100098, -0.05723090469837189, -0.7718567848205566, -0.7105340957641602, 1.7078925371170044, 2.0538761615753174, -0.07911594957113266, -0.07237991690635681, -0.7022173404693604, -1.2182114124298096, 0.8975220918655396, -0.1493147909641266, 0.02016640082001686, 0.665677011013031, -0.6534419059753418, 1.138344168663025, 0.7004314064979553, 0.888215959072113, 0.051105938851833344, 0.2699531316757202, 0.4660853445529938, -0.20281973481178284, -1.172171950340271, -0.36593517661094666, -1.1125447750091553, -2.3614156246185303, 0.22408892214298248, -0.27280479669570923, -1.562269687652588, -0.010630819946527481, -0.9681228995323181, 1.0073561668395996, -0.5381346940994263, -1.0230615139007568, -1.5000497102737427, 0.25413262844085693, -0.05396249145269394, 0.9416929483413696, -1.5369294881820679, -0.22344970703125, 1.2525553703308105, 0.7859117984771729, -0.530034065246582, 1.0399483442306519, 0.24549682438373566, 1.035576343536377, 0.8241380453109741, -0.3182174861431122, 0.6617528200149536, 0.06853826344013214, -1.3649934530258179, 0.40156590938568115, 1.2793735265731812, 0.1600898802280426, 1.3974069356918335, -0.3138997554779053, 0.07228877395391464, 0.2667998969554901, -0.6274521350860596, -0.4928196966648102, -0.43857884407043457, 0.6896906495094299, 0.032406874001026154, -0.9248433709144592, -0.1678076684474945, -0.19126909971237183, -0.34579282999038696, 0.17714589834213257, -1.5525912046432495, -0.21336160600185394, -0.4880410134792328, -0.4213224947452545, -1.4027875661849976, -0.012298766523599625, 1.4887241125106812, -0.767462968826294, -0.15656763315200806, 0.47943776845932007, 0.39876285195350647, 0.438839316368103, 0.6353324055671692, -0.7286699414253235, -0.3220076262950897, -0.4507732093334198, -0.32773542404174805, 0.22974804043769836, 1.221882700920105, 0.052363887429237366, -1.0628015995025635, 0.6955997347831726, -0.420453816652298, 0.11112701147794724, 2.0305674076080322, 0.166895791888237, -0.6442045569419861, 0.41117674112319946, -0.6912734508514404, 1.8538448810577393, 1.6356173753738403, 1.3068430423736572, -0.2040262371301651, -0.8912390470504761, 0.5853335857391357, -0.42342254519462585, -0.33017539978027344, 0.7717180848121643, 0.30507969856262207, -0.32638823986053467, -1.4212870597839355, 0.6340969204902649, 1.2463353872299194, -0.7548611164093018, -0.762160062789917, 0.15647979080677032, -0.8473032712936401, 1.128656268119812, 0.6570854783058167, 0.353654146194458, 0.3903355002403259, 1.7576395273208618, 0.693265438079834, -0.537330687046051, 0.4640273153781891, 0.5056695938110352, -0.2490612268447876, -2.0124690532684326, -1.02131986618042, 0.2652781009674072, -0.47814297676086426, -1.513360857963562, 1.469556450843811, -1.2783722877502441, -0.9902746081352234, 0.5490556359291077, -0.021169982850551605, 1.272510051727295, 0.3738947808742523, 1.5955644845962524, 2.185940742492676, 0.7358602285385132, 0.4669186770915985, 1.1774276494979858, -0.19373077154159546, -0.5299825072288513, 1.9288250207901, -0.4312375485897064, 0.570655345916748, 1.1048208475112915, -0.3487636148929596, -1.013084053993225, -0.8628743290901184, -1.2227338552474976, -0.7099727988243103, 1.1299761533737183, 0.04841005802154541, -1.1571011543273926, 0.3184661567211151, 1.6112335920333862, 0.2101016640663147, -0.41784006357192993, 0.6268324851989746, 0.4205283224582672, -0.8859579563140869, -0.21807697415351868, -0.9653403162956238, 0.531537652015686, -0.1415487676858902, -0.2674785256385803, 0.22506974637508392, 0.6020324230194092, 1.3294332027435303, -0.08456447720527649, 0.18610794842243195, 1.0671674013137817, -1.3481659889221191, 1.5393954515457153, -0.6251574158668518, 0.26258397102355957, -2.414869785308838, 1.3858792781829834, -0.750669002532959, 1.9522136449813843, -2.699718475341797, 0.4963211119174957, -0.3926944434642792, -0.5067473649978638, 0.2017085999250412, -0.3781494200229645, 0.21459642052650452, -0.07095982879400253, -1.0494210720062256, 0.02322857640683651, -0.5087811350822449, 0.7075551748275757, 1.1326080560684204, 1.4189764261245728, -1.1315046548843384, -0.3033699691295624, -1.6813607215881348, -0.1948172003030777, -0.8376539945602417, 0.20299795269966125, -1.978402018547058, -0.19600725173950195, -1.9955148696899414, -2.44610857963562, -1.4245123863220215, -0.8717852234840393, 1.1443524360656738, 0.17833390831947327, -1.0126564502716064, 1.2720338106155396, -0.41270390152931213, -1.9013962745666504, 1.1554781198501587, -2.156050682067871 ]
https://github.com/huggingface/datasets/issues/4591
Can't push Images to hub with manual Dataset
Hi, thanks for reporting! This issue stems from the changes introduced in https://github.com/huggingface/datasets/pull/4282 (cc @lhoestq), in which list casts are ignored if they don't change the list type (required to preserve `null` values). And `push_to_hub` does a special cast to embed external image files but doesn't change the types, hence the failure.
## Describe the bug If I create a dataset including an 'Image' feature manually, when pushing to hub decoded images are not pushed, instead it looks for image where image local path is/used to be. This doesn't (at least didn't used to) happen with imagefolder. I want to build dataset manually because it is complicated. This happens even though the dataset is looking like decoded images: ![image](https://user-images.githubusercontent.com/15624271/176322689-2cc819cf-9d5c-4a8f-9f3d-83ae8ec06f20.png) and I use `embed_external_files=True` while `push_to_hub` (same with false) ## Steps to reproduce the bug ```python from PIL import Image from datasets import Image as ImageFeature from datasets import Features,Dataset #manually create dataset feats=Features( { "images": [ImageFeature()], #same even if explicitly ImageFeature(decode=True) "input_image": ImageFeature(), } ) test_data={"images":[[Image.open("test.jpg"),Image.open("test.jpg"),Image.open("test.jpg")]], "input_image":[Image.open("test.jpg")]} test_dataset=Dataset.from_dict(test_data,features=feats) print(test_dataset) test_dataset.push_to_hub("ceyda/image_test_public",private=False,token="",embed_external_files=True) # clear cache rm -r ~/.cache/huggingface # remove "test.jpg" # remove to see that it is looking for image on the local path test_dataset=load_dataset("ceyda/image_test_public",use_auth_token="") print(test_dataset) print(test_dataset['train'][0]) ``` ## Expected results should be able to push image bytes if dataset has `Image(decode=True)` ## Actual results errors because it is trying to decode file from the non existing local path. ``` ----> print(test_dataset['train'][0]) File ~/.local/lib/python3.8/site-packages/datasets/arrow_dataset.py:2154, in Dataset.__getitem__(self, key) 2152 def __getitem__(self, key): # noqa: F811 2153 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 2154 return self._getitem( 2155 key, 2156 ) File ~/.local/lib/python3.8/site-packages/datasets/arrow_dataset.py:2139, in Dataset._getitem(self, key, decoded, **kwargs) 2137 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs) 2138 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 2139 formatted_output = format_table( 2140 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 2141 ) 2142 return formatted_output File ~/.local/lib/python3.8/site-packages/datasets/formatting/formatting.py:532, in format_table(table, key, formatter, format_columns, output_all_columns) 530 python_formatter = PythonFormatter(features=None) 531 if format_columns is None: ... -> 3068 fp = builtins.open(filename, "rb") 3069 exclusive_fp = True 3071 try: FileNotFoundError: [Errno 2] No such file or directory: 'test.jpg' ``` ## Environment info - `datasets` version: 2.3.2 - Platform: Linux-5.4.0-1074-azure-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 8.0.0 - Pandas version: 1.4.2
676
52
Can't push Images to hub with manual Dataset ## Describe the bug If I create a dataset including an 'Image' feature manually, when pushing to hub decoded images are not pushed, instead it looks for image where image local path is/used to be. This doesn't (at least didn't used to) happen with imagefolder. I want to build dataset manually because it is complicated. This happens even though the dataset is looking like decoded images: ![image](https://user-images.githubusercontent.com/15624271/176322689-2cc819cf-9d5c-4a8f-9f3d-83ae8ec06f20.png) and I use `embed_external_files=True` while `push_to_hub` (same with false) ## Steps to reproduce the bug ```python from PIL import Image from datasets import Image as ImageFeature from datasets import Features,Dataset #manually create dataset feats=Features( { "images": [ImageFeature()], #same even if explicitly ImageFeature(decode=True) "input_image": ImageFeature(), } ) test_data={"images":[[Image.open("test.jpg"),Image.open("test.jpg"),Image.open("test.jpg")]], "input_image":[Image.open("test.jpg")]} test_dataset=Dataset.from_dict(test_data,features=feats) print(test_dataset) test_dataset.push_to_hub("ceyda/image_test_public",private=False,token="",embed_external_files=True) # clear cache rm -r ~/.cache/huggingface # remove "test.jpg" # remove to see that it is looking for image on the local path test_dataset=load_dataset("ceyda/image_test_public",use_auth_token="") print(test_dataset) print(test_dataset['train'][0]) ``` ## Expected results should be able to push image bytes if dataset has `Image(decode=True)` ## Actual results errors because it is trying to decode file from the non existing local path. ``` ----> print(test_dataset['train'][0]) File ~/.local/lib/python3.8/site-packages/datasets/arrow_dataset.py:2154, in Dataset.__getitem__(self, key) 2152 def __getitem__(self, key): # noqa: F811 2153 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 2154 return self._getitem( 2155 key, 2156 ) File ~/.local/lib/python3.8/site-packages/datasets/arrow_dataset.py:2139, in Dataset._getitem(self, key, decoded, **kwargs) 2137 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs) 2138 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 2139 formatted_output = format_table( 2140 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 2141 ) 2142 return formatted_output File ~/.local/lib/python3.8/site-packages/datasets/formatting/formatting.py:532, in format_table(table, key, formatter, format_columns, output_all_columns) 530 python_formatter = PythonFormatter(features=None) 531 if format_columns is None: ... -> 3068 fp = builtins.open(filename, "rb") 3069 exclusive_fp = True 3071 try: FileNotFoundError: [Errno 2] No such file or directory: 'test.jpg' ``` ## Environment info - `datasets` version: 2.3.2 - Platform: Linux-5.4.0-1074-azure-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 8.0.0 - Pandas version: 1.4.2 Hi, thanks for reporting! This issue stems from the changes introduced in https://github.com/huggingface/datasets/pull/4282 (cc @lhoestq), in which list casts are ignored if they don't change the list type (required to preserve `null` values). And `push_to_hub` does a special cast to embed external image files but doesn't change the types, hence the failure.
[ -1.2240992784500122, -0.9178783297538757, -0.7141251564025879, 1.4918408393859863, -0.19459551572799683, -1.156701922416687, 0.05455949902534485, -1.065116047859192, 1.576612949371338, -0.8484400510787964, 0.33731773495674133, -1.6567602157592773, 0.017410892993211746, -0.573675274848938, -0.7119676470756531, -0.8851824998855591, -0.43262338638305664, -0.6864791512489319, 1.203946828842163, 2.4761147499084473, 1.1992796659469604, -1.3205375671386719, 2.7608537673950195, 0.6980974078178406, -0.24267753958702087, -0.9993809461593628, 0.5572999715805054, 0.09377410262823105, -1.2808195352554321, -0.4610014259815216, -0.90876704454422, -0.04502148926258087, -0.5710508227348328, -0.4520348012447357, 0.008481684140861034, 0.4099006652832031, -0.3049299418926239, -0.480682373046875, -0.6625854969024658, -0.7607070207595825, 0.46835267543792725, -0.4585699439048767, 0.9686944484710693, -0.3249692916870117, 1.780788540840149, -0.6478307843208313, 0.44540199637413025, 0.7250120639801025, 1.2607195377349854, 0.22202180325984955, 0.03380287438631058, 0.37034839391708374, 0.3383694589138031, -0.08333374559879303, 0.5100805163383484, 1.167436122894287, 0.6310340166091919, 0.5653517246246338, 0.7305013537406921, -2.239159107208252, 1.2946951389312744, -1.0289158821105957, 0.26121652126312256, 1.420265555381775, -0.8293023109436035, 0.45181459188461304, -1.698327660560608, -0.06786902248859406, 0.5583682060241699, -2.186863422393799, 0.26905763149261475, -1.3237082958221436, -0.47389283776283264, 0.9642825126647949, 0.39670056104660034, -1.105391263961792, 0.15974430739879608, -0.5714804530143738, 1.051291584968567, 0.43074095249176025, 1.062998652458191, -1.6612794399261475, -0.08906843513250351, -0.26770535111427307, 0.15929654240608215, -1.337018370628357, -1.5945688486099243, 0.55174720287323, 0.6241886615753174, 0.6237748265266418, -0.10137929022312164, 1.133763313293457, -1.0536288022994995, 0.699298620223999, -1.018563985824585, -1.607979416847229, -1.5348190069198608, -2.2751359939575195, -2.254434585571289, 0.6893588304519653, -0.4799330234527588, -0.5789592266082764, 2.068434238433838, -1.007252812385559, -1.7081665992736816, 1.1508946418762207, 0.26902028918266296, -0.014788185246288776, 2.4564833641052246, 0.20031945407390594, -0.6950627565383911, 0.504393994808197, -0.7928453087806702, 0.827871561050415, -0.32334238290786743, 1.386738896369934, 0.38667190074920654, -1.0463018417358398, 1.620307445526123, -0.3539239764213562, 0.6226431727409363, -0.5307623744010925, -0.4881499707698822, -0.8261992335319519, 0.2424156814813614, 1.8378849029541016, -0.26032066345214844, 1.5577572584152222, -0.3683779835700989, -1.571189284324646, -1.6897262334823608, 0.8243115544319153, 0.5026942491531372, -0.7449867129325867, 0.07234547287225723, -0.4088452160358429, 0.11258456856012344, -0.0390494205057621, 1.1626695394515991, 1.279422402381897, 0.7334157824516296, -0.38779500126838684, -0.8061522841453552, 0.16297847032546997, -0.011790665797889233, -0.7512420415878296, -1.7210246324539185, -0.35009080171585083, 0.19488514959812164, 0.6113094687461853, -1.2643550634384155, 1.8219889402389526, 0.948885440826416, 1.8959629535675049, 1.0018430948257446, -0.4136270582675934, 1.3858932256698608, 0.10168305039405823, 1.7046940326690674, -0.5255599617958069, 0.6783385276794434, -0.2845464050769806, -1.204101800918579, 0.8259249329566956, -0.32198309898376465, -2.0997374057769775, -0.8347469568252563, -0.6797443628311157, -0.275734007358551, -0.7930228114128113, 0.8398653864860535, -0.34847310185432434, -1.4326542615890503, 0.14696167409420013, -0.6555312275886536, 0.17937612533569336, -1.2141318321228027, 0.25115281343460083, 0.7041593194007874, -0.6579991579055786, 0.0740375816822052, -0.11042650043964386, -1.2792824506759644, -0.34011831879615784, 0.2528817057609558, 1.8814671039581299, -0.7301316857337952, 0.9061181545257568, 1.0674138069152832, -0.673801600933075, -0.00888578686863184, 0.2368963062763214, -0.2432389259338379, 0.8289404511451721, -0.9930901527404785, -0.4845888316631317, 1.2384310960769653, -0.26762694120407104, -0.6194842457771301, 1.4717930555343628, 0.744539737701416, -0.9886600971221924, -0.25059202313423157, -0.1252659410238266, -0.9196826219558716, -0.040469761937856674, -1.542007327079773, -0.12662579119205475, 0.48337459564208984, -1.5222800970077515, -0.3707825541496277, -0.1984723061323166, 1.3090317249298096, -0.2869238257408142, 1.4426655769348145, -0.40271368622779846, -0.2636282444000244, -0.3246091902256012, -0.45997354388237, 0.19774369895458221, -0.1653616726398468, -0.6392924785614014, 0.12859737873077393, -0.8376221656799316, 0.3791247308254242, 1.5094001293182373, 0.4021238088607788, 0.06492773443460464, 0.40758952498435974, 1.0868916511535645, 0.37691551446914673, -0.10342778265476227, -0.9281463623046875, -1.5480704307556152, 1.9743776321411133, -1.4323691129684448, 2.00233793258667, 0.7946588397026062, -0.050373487174510956, -1.8436393737792969, -1.7821547985076904, 1.313419222831726, 1.1896390914916992, 2.307586908340454, 0.4783066213130951, 0.40511608123779297, -0.8462464213371277, -0.7687013745307922, 0.2969157099723816, -0.9886370897293091, -0.6634477972984314, 0.19071629643440247, 2.304152727127075, 1.7696998119354248, -0.46355482935905457, -0.12687338888645172, -1.0777329206466675, 1.4419149160385132, -0.13902497291564941, 0.27566006779670715, 1.993440866470337, -0.29419493675231934, -1.035330057144165, 1.3546862602233887, -2.2979800701141357, 0.16412100195884705, 1.9377306699752808, 0.32393792271614075, 0.08520103245973587, -1.359928846359253, -0.6769413352012634, -0.3856353163719177, -0.3963664472103119, -1.2828902006149292, 0.5015076398849487, -0.22183889150619507, -0.7061528563499451, -1.435007095336914, 0.05262792482972145, -1.1923456192016602, -1.6242796182632446, 0.31206953525543213, 1.8667603731155396, 2.084705352783203, -0.7886723279953003, 1.4357086420059204, -0.33472320437431335, 0.10476947575807571, 1.1495254039764404, 1.307928204536438, 3.034515380859375, 1.8510408401489258, -1.2923836708068848, 0.6189149618148804, -0.19884727895259857, -0.446102499961853, 1.1601859331130981, -1.2204238176345825, 1.304345726966858, -0.05854616314172745, -1.2011743783950806, -1.1912411451339722, 0.9692434668540955, 0.42091235518455505, 0.1121809184551239, -0.502754807472229, 1.1635452508926392, 0.13130998611450195, 1.3443686962127686, 0.6773436665534973, -0.33906108140945435, 0.626463770866394, -0.40111595392227173, -0.5408713817596436, 1.4910943508148193, 0.13458223640918732, -1.576697587966919, -2.2699310779571533, -0.265973299741745, -0.8283518552780151, 0.07682739198207855, -0.5569842457771301, -1.0773460865020752, 1.723193645477295, 0.3540025055408478, -1.2249276638031006, -0.25949499011039734, -0.3251758813858032, -0.5775315761566162, 2.825658082962036, -1.2704025506973267, -0.16042110323905945, -1.0254065990447998, -0.7052656412124634, 1.6110553741455078, -1.1686972379684448, -0.15956319868564606, -0.9782043695449829, -0.49648037552833557, -1.4212231636047363, -0.551104724407196, 0.016533076763153076, -0.9095920920372009, 0.7739896178245544, 0.227122962474823, -1.1255991458892822, -0.39250314235687256, -0.8287444114685059, 0.9306053519248962, -0.24761809408664703, 0.18702656030654907, 1.9263697862625122, 0.34665340185165405, -0.3061857521533966, 0.831117570400238, 1.215659260749817, 0.7227436900138855, -0.6365728378295898, 0.07992301881313324, -0.7100378274917603, 0.30469247698783875, -1.2658835649490356, 0.16102208197116852, -2.8598783016204834, 0.67998206615448, -0.04887869581580162, -0.089700847864151, 0.030518420040607452, -1.3183462619781494, 1.0200848579406738, 2.5619876384735107, -1.241029977798462, 0.44084617495536804, 0.36752817034721375, 1.1550098657608032, -1.59990394115448, 0.28333330154418945, -0.5196980834007263, 2.078415870666504, 0.29298660159111023, 1.2284454107284546, -0.5389184355735779, -2.232236862182617, 0.6689982414245605, -1.299911379814148, -1.1367518901824951, 0.7658061981201172, -0.9695436954498291, 0.19574329257011414, -1.4194594621658325, -0.3042149245738983, -0.9662185311317444, -1.1677813529968262, 0.5938299894332886, 0.08642695099115372, 0.44528982043266296, -0.48679909110069275, 0.3232766389846802, -2.3481829166412354, -1.395715594291687, -0.2433774322271347, -0.9896250367164612, 0.5876277089118958, -0.42668628692626953, 0.6902153491973877, -0.14364509284496307, 0.03525646775960922, 0.3437447249889374, 1.5847960710525513, 3.4124908447265625, 0.2391238957643509, 0.2555146813392639, -0.2119823396205902, -0.9992626905441284, 1.4531375169754028, 0.8907140493392944, -0.026240237057209015, -0.5469558835029602, -1.0552234649658203, 1.2236226797103882, 1.9645743370056152, 1.02988600730896, -0.08724801987409592, -0.8461493253707886, -0.7344979047775269, -0.011440098285675049, 0.12325281649827957, 0.42588409781455994, 0.9308366179466248, 0.03940888121724129, 0.14966343343257904, 1.5420854091644287, 1.2653048038482666, -0.4609781503677368, 0.2523547410964966, -0.810614287853241, -0.46370747685432434, 0.4611201584339142, 0.23779314756393433, -0.01724260114133358, 0.5024811029434204, -1.042716383934021, -0.2678508758544922, -0.4435102641582489, -0.8880430459976196, -0.7157146334648132, -0.3729732036590576, -0.3819102644920349, 1.5517053604125977, 0.14105291664600372, -0.5142693519592285, -0.028475359082221985, -0.751685380935669, -0.22849774360656738, -1.012567400932312, 0.25291043519973755, -0.06965523958206177, -0.1507004052400589, -0.18492254614830017, 1.752614974975586, -0.8905237913131714, -2.044835329055786, 0.19430579245090485, 0.27259719371795654, -0.24536487460136414, 0.19862301647663116, 1.663142204284668, 0.4939998984336853, 1.4582997560501099, 1.3453516960144043, 0.8771529197692871, -0.6003978252410889, -1.2960796356201172, 0.6605837345123291, 0.9980320334434509, -1.2984299659729004, 0.8233528137207031, -0.187381774187088, -0.5335732698440552, 0.6508819460868835, 1.3329278230667114, 0.5435009598731995, -1.9463131427764893, 0.7795246839523315, -0.9873013496398926, 0.7805739045143127, 0.7732822895050049, 0.652040421962738, 0.18483665585517883, 0.8351962566375732, -1.1651667356491089, -1.0781939029693604, -0.7023698687553406, -0.6672974228858948, 1.9597843885421753, -0.41077882051467896, 0.6832146048545837, -0.2696123719215393, -1.2668728828430176, -0.08126969635486603, 0.7380996942520142, 0.33187761902809143, -0.48398515582084656, 0.853984534740448, -0.5901831388473511, -1.1080341339111328, -1.3074229955673218, -0.3854544460773468, -1.0708043575286865, -0.9834316968917847, 1.0444964170455933, 0.7182936072349548, 0.2983162999153137, 1.8766355514526367, 0.6835509538650513, 0.29221653938293457, -2.6434504985809326, 0.88057541847229, 0.1581113338470459, 0.029036521911621094, 0.8967173099517822, 0.32843509316444397, 0.9484715461730957, -0.08364357799291611, 0.5855216979980469, -2.360654592514038, 2.303205728530884, -0.2195020318031311, 0.7645264267921448, -0.07475312054157257, -0.1435963213443756, 1.1351714134216309, 0.6425299644470215, 0.4655797481536865, -1.0385078191757202, 0.6166784167289734, -0.5139459371566772, 1.1541905403137207, 0.8611273169517517, -0.7712543606758118, 0.051753848791122437, 1.446823000907898, 0.4215075671672821, -0.4790649116039276, -0.9840218424797058, -0.9069096446037292, 0.9987220168113708, 1.7037454843521118, -0.018996719270944595, -0.0553208626806736, 0.8133909106254578, 0.6069772839546204, -1.2839258909225464, 0.10908340662717819, -0.703531801700592, -0.575688362121582, 1.7040338516235352, 2.1159253120422363, -0.17661987245082855, -0.16513536870479584, -0.6163836121559143, -1.2648626565933228, 0.7360922694206238, -0.018292494118213654, 0.16312570869922638, 0.6117662787437439, -0.6659421920776367, 1.1071527004241943, 0.8506149053573608, 0.8881886005401611, 0.2507093846797943, 0.28564733266830444, 0.369468629360199, -0.36279740929603577, -1.2026671171188354, -0.24757298827171326, -1.0622444152832031, -2.4820539951324463, 0.32312726974487305, -0.20781052112579346, -1.459062099456787, 0.0436585508286953, -1.0565869808197021, 0.8722154498100281, -0.5578678250312805, -1.0259836912155151, -1.6048821210861206, 0.22182811796665192, -0.001083320938050747, 0.9884172081947327, -1.5495684146881104, -0.2213181108236313, 1.138041615486145, 0.8752195835113525, -0.6671329140663147, 1.0125176906585693, 0.19271837174892426, 1.0387499332427979, 0.8050218224525452, -0.4218456447124481, 0.539573609828949, -0.005474525969475508, -1.3565692901611328, 0.3996199071407318, 1.1441876888275146, 0.22279298305511475, 1.5081313848495483, -0.4519340991973877, 0.031992048025131226, 0.41148433089256287, -0.5711216926574707, -0.41694769263267517, -0.4516335427761078, 0.6102098226547241, 0.10591018944978714, -0.9088186621665955, -0.07550769299268723, -0.03186951205134392, -0.3041454255580902, 0.2412431687116623, -1.4698909521102905, -0.12764109671115875, -0.4909686744213104, -0.6404426097869873, -1.2036352157592773, -0.04523729532957077, 1.4718424081802368, -0.8615998029708862, -0.21456991136074066, 0.5227377414703369, 0.27886855602264404, 0.5623580813407898, 0.6415402293205261, -0.7201683521270752, -0.26130348443984985, -0.2347089946269989, -0.22774550318717957, 0.37494534254074097, 1.3162723779678345, -0.16612094640731812, -0.9717146158218384, 0.7284788489341736, -0.41199547052383423, 0.08594951778650284, 1.894863247871399, 0.030170593410730362, -0.7590427994728088, 0.3331248164176941, -0.7384645342826843, 1.9128999710083008, 1.6836538314819336, 1.340067744255066, -0.054222144186496735, -0.8613606095314026, 0.647400975227356, -0.23994500935077667, -0.3755494952201843, 0.8896042108535767, 0.3383820652961731, -0.2082698494195938, -1.4839719533920288, 0.8017566204071045, 1.2898129224777222, -0.8573279976844788, -0.7733758091926575, 0.20112335681915283, -0.8608022332191467, 1.1793060302734375, 0.5713395476341248, 0.3251979947090149, 0.2696217894554138, 1.658319115638733, 0.8786949515342712, -0.39926958084106445, 0.5304543375968933, 0.5915701985359192, -0.21789896488189697, -2.179569721221924, -1.1191318035125732, 0.3159759044647217, -0.5878991484642029, -1.606917381286621, 1.3961668014526367, -1.1771173477172852, -1.013391137123108, 0.6214506030082703, 0.11638060957193375, 1.3483742475509644, 0.3292987644672394, 1.5572543144226074, 2.048956871032715, 0.8978425860404968, 0.41921430826187134, 1.2457914352416992, -0.1493883579969406, -0.4417509436607361, 1.805340051651001, -0.46654242277145386, 0.47795960307121277, 1.0530885457992554, -0.34482333064079285, -1.0596752166748047, -0.7251207232475281, -1.2351903915405273, -0.7362386584281921, 1.2436928749084473, 0.12305941432714462, -1.0648541450500488, 0.13402017951011658, 1.4800498485565186, 0.13171832263469696, -0.28898298740386963, 0.6941162943840027, 0.44693589210510254, -0.7998879551887512, -0.08662500977516174, -0.9118228554725647, 0.5595510005950928, -0.2127036452293396, -0.3305342197418213, 0.21073909103870392, 0.4419988989830017, 1.3564205169677734, -0.08672630786895752, 0.13619522750377655, 1.0436471700668335, -1.3631422519683838, 1.4939738512039185, -0.678734302520752, 0.24984724819660187, -2.4810774326324463, 1.377772569656372, -0.7380861043930054, 1.9710572957992554, -2.6098241806030273, 0.4864601194858551, -0.6215491890907288, -0.456351101398468, 0.34280821681022644, -0.37769296765327454, 0.1054379865527153, -0.09323224425315857, -1.1377382278442383, -0.05456925183534622, -0.6858969330787659, 0.6015448570251465, 1.125982642173767, 1.3973541259765625, -1.1842702627182007, -0.3086202144622803, -1.726719617843628, -0.10187402367591858, -0.7607935070991516, 0.3593909740447998, -2.004429578781128, -0.1424761712551117, -1.8460475206375122, -2.4537057876586914, -1.3319225311279297, -0.7497904896736145, 1.1105188131332397, 0.10425002127885818, -0.9159740209579468, 1.3211686611175537, -0.4157872796058655, -1.8694959878921509, 1.2318998575210571, -2.165168523788452 ]
https://github.com/huggingface/datasets/issues/4581
Dataset Viewer issue for pn_summary
Note that I refreshed twice this dataset, and I still have (another) error on one of the splits ``` Status code: 400 Exception: ClientResponseError Message: 403, message='Forbidden', url=URL('https://doc-14-4c-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/pgotjmcuh77q0lk7p44rparfrhv459kp/1656403650000/11771870722949762109/*/16OgJ_OrfzUF_i3ftLjFn9kpcyoi7UJeO?e=download') ``` Like the three splits are processed in parallel by the workers, I imagine that the Google hosting is rate-limiting us. cc @albertvillanova
### Link https://huggingface.co/datasets/pn_summary/viewer/1.0.0/validation ### Description Getting an index error on the `validation` and `test` splits: ``` Server error Status code: 400 Exception: IndexError Message: list index out of range ``` ### Owner No
677
51
Dataset Viewer issue for pn_summary ### Link https://huggingface.co/datasets/pn_summary/viewer/1.0.0/validation ### Description Getting an index error on the `validation` and `test` splits: ``` Server error Status code: 400 Exception: IndexError Message: list index out of range ``` ### Owner No Note that I refreshed twice this dataset, and I still have (another) error on one of the splits ``` Status code: 400 Exception: ClientResponseError Message: 403, message='Forbidden', url=URL('https://doc-14-4c-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/pgotjmcuh77q0lk7p44rparfrhv459kp/1656403650000/11771870722949762109/*/16OgJ_OrfzUF_i3ftLjFn9kpcyoi7UJeO?e=download') ``` Like the three splits are processed in parallel by the workers, I imagine that the Google hosting is rate-limiting us. cc @albertvillanova
[ -1.17963445186615, -0.9177787899971008, -0.7904837131500244, 1.484328269958496, -0.0709192231297493, -1.2244013547897339, 0.17483897507190704, -1.0090469121932983, 1.6782642602920532, -0.7508647441864014, 0.3739735782146454, -1.7034218311309814, -0.03752174973487854, -0.6923360228538513, -0.7329156994819641, -0.8860763311386108, -0.27179235219955444, -0.7885878086090088, 1.0089958906173706, 2.5016891956329346, 1.2542099952697754, -1.3838545083999634, 2.7512855529785156, 0.7320555448532104, -0.3241768479347229, -0.9920560717582703, 0.47175294160842896, -0.06863848865032196, -1.21773099899292, -0.4526368975639343, -0.9036542773246765, -0.06357920914888382, -0.5584484338760376, -0.5811024308204651, 0.06406852602958679, 0.3955513834953308, -0.2723345160484314, -0.3793843984603882, -0.43796828389167786, -0.8266270160675049, 0.4727157652378082, -0.37286704778671265, 0.8984851837158203, -0.34883949160575867, 1.8420780897140503, -0.6219229102134705, 0.363036185503006, 0.7160801887512207, 1.3662890195846558, 0.1837020218372345, -0.16535209119319916, 0.2811952829360962, 0.3357481062412262, -0.05439029633998871, 0.4753877520561218, 1.209085464477539, 0.597901463508606, 0.5013814568519592, 0.7196401357650757, -2.2150614261627197, 1.2603861093521118, -1.0497146844863892, 0.1947133094072342, 1.417802333831787, -0.9913340210914612, 0.30931344628334045, -1.8931819200515747, -0.0012865206226706505, 0.5388718247413635, -2.311333417892456, 0.2776138186454773, -1.2961806058883667, -0.5446915626525879, 0.9852918386459351, 0.2996467053890228, -1.2513067722320557, 0.1467374563217163, -0.40661418437957764, 1.0357434749603271, 0.49772167205810547, 1.0876878499984741, -1.7671581506729126, -0.13531392812728882, -0.36698389053344727, 0.06447289884090424, -1.3885762691497803, -1.535307765007019, 0.5564103722572327, 0.6826062798500061, 0.667471706867218, -0.09750144183635712, 0.9679481983184814, -0.9603079557418823, 0.7723770141601562, -0.9711802005767822, -1.6785935163497925, -1.4490573406219482, -2.2463066577911377, -2.24747633934021, 0.8088157176971436, -0.5430494546890259, -0.4958154559135437, 1.9962091445922852, -1.0165117979049683, -1.8342989683151245, 1.160215973854065, 0.3448244333267212, -0.025728914886713028, 2.3541722297668457, 0.3109142780303955, -0.7553562521934509, 0.4233974516391754, -0.7407515048980713, 0.7947297692298889, -0.4106614291667938, 1.361306071281433, 0.5545417070388794, -1.013818621635437, 1.6068733930587769, -0.5233471393585205, 0.5316281318664551, -0.7401562929153442, -0.5357640385627747, -0.7627581357955933, 0.4131386876106262, 1.9379175901412964, -0.3939673602581024, 1.5464823246002197, -0.3580532371997833, -1.5062518119812012, -1.537257432937622, 0.8219097256660461, 0.46867337822914124, -0.8756752014160156, 0.19878630340099335, -0.3937242329120636, 0.16661259531974792, -0.0447407104074955, 1.0771939754486084, 1.2206001281738281, 0.6381065249443054, -0.21833927929401398, -0.8325932621955872, 0.2599208950996399, 0.030253231525421143, -0.7619245052337646, -1.7660819292068481, -0.4003361463546753, 0.15584518015384674, 0.6467720866203308, -1.2820404767990112, 1.7374241352081299, 0.8175340294837952, 1.9562147855758667, 1.006692886352539, -0.2902652621269226, 1.4884225130081177, 0.05444743111729622, 1.9085416793823242, -0.42947623133659363, 0.709774374961853, -0.33584922552108765, -1.1174689531326294, 0.8008677959442139, -0.43286946415901184, -2.087090253829956, -0.7073154449462891, -0.8717608451843262, -0.12514324486255646, -0.782460629940033, 0.9812492728233337, -0.2831675112247467, -1.4111829996109009, 0.1670284867286682, -0.7154535055160522, 0.18902425467967987, -1.3098498582839966, 0.23690225183963776, 0.701970636844635, -0.5685415863990784, 0.06134486570954323, -0.2538755238056183, -1.1540920734405518, -0.47584831714630127, 0.21505852043628693, 1.9912371635437012, -0.7020154595375061, 0.9669483304023743, 1.0204286575317383, -0.6636301279067993, 0.02688564732670784, 0.4542911946773529, -0.2674783170223236, 0.9122421741485596, -1.0820820331573486, -0.3620654046535492, 1.197342038154602, -0.11001156270503998, -0.6505885124206543, 1.461572527885437, 0.857435405254364, -1.0147910118103027, -0.21433204412460327, -0.16495691239833832, -0.7099512815475464, 0.009008737280964851, -1.588075876235962, -0.09327821433544159, 0.35056987404823303, -1.389424443244934, -0.43675902485847473, -0.21485690772533417, 1.3312857151031494, -0.19506950676441193, 1.4326251745224, -0.3692284822463989, -0.262250155210495, -0.3190068304538727, -0.39278706908226013, 0.12174935638904572, -0.24536137282848358, -0.6978193521499634, 0.2250659465789795, -0.7050576210021973, 0.2825676202774048, 1.4070770740509033, 0.32984399795532227, 0.1105794757604599, 0.506776750087738, 1.188719630241394, 0.2684023976325989, -0.060628749430179596, -0.9922241568565369, -1.5138031244277954, 2.007631301879883, -1.4773160219192505, 1.933198094367981, 0.7972243428230286, -0.012164208106696606, -1.7510868310928345, -1.8951075077056885, 1.4097710847854614, 1.2303541898727417, 2.416788101196289, 0.5799367427825928, 0.4618160128593445, -0.8941556215286255, -0.6607122421264648, 0.32234257459640503, -0.9988260269165039, -0.7722630500793457, 0.14420326054096222, 2.3504879474639893, 1.7689929008483887, -0.5471066236495972, -0.30617040395736694, -1.016533613204956, 1.2748044729232788, -0.1572473645210266, 0.17785952985286713, 1.9669826030731201, -0.2639535367488861, -1.146973967552185, 1.1939723491668701, -2.312849760055542, 0.08412185311317444, 1.9820984601974487, 0.24925418198108673, 0.034146301448345184, -1.4647374153137207, -0.6644889116287231, -0.25210434198379517, -0.4197899103164673, -1.1610134840011597, 0.4934616684913635, -0.29278460144996643, -0.7740885615348816, -1.5016897916793823, 0.16076616942882538, -1.077163577079773, -1.6846199035644531, 0.2048615664243698, 1.810312032699585, 2.0073208808898926, -0.8238868713378906, 1.57491934299469, -0.3455156683921814, 0.1288716197013855, 1.3587700128555298, 1.2527344226837158, 3.1369473934173584, 1.866033911705017, -1.2889496088027954, 0.7372528910636902, -0.1329941302537918, -0.4859977960586548, 1.1877859830856323, -1.1187134981155396, 1.1511207818984985, -0.22483515739440918, -1.1938021183013916, -1.2277413606643677, 0.8245370388031006, 0.4142342805862427, 0.026108194142580032, -0.578921377658844, 1.2358647584915161, 0.04092961549758911, 1.3305689096450806, 0.6030316948890686, -0.2921313941478729, 0.6369116306304932, -0.3703652322292328, -0.45700374245643616, 1.561119794845581, 0.13412848114967346, -1.3627208471298218, -2.323003053665161, -0.16084270179271698, -0.8530611395835876, -0.04062909632921219, -0.7261431813240051, -1.1111894845962524, 1.6300922632217407, 0.3764965832233429, -1.2808704376220703, -0.34103527665138245, -0.3562643527984619, -0.5640852451324463, 2.6836366653442383, -1.4379637241363525, -0.2548423409461975, -1.0306682586669922, -0.4803166687488556, 1.624523401260376, -1.1321789026260376, -0.08679591119289398, -1.0688087940216064, -0.6530713438987732, -1.3538551330566406, -0.49424129724502563, -0.09197081625461578, -0.8518126010894775, 0.7728723883628845, 0.16791898012161255, -1.1565337181091309, -0.28023603558540344, -0.8338037133216858, 0.7951748967170715, -0.1150355190038681, 0.3573532700538635, 1.8970273733139038, 0.4062235355377197, -0.4201062023639679, 0.7372235059738159, 1.1394705772399902, 0.5721210241317749, -0.6520434617996216, 0.30079755187034607, -0.6279642581939697, 0.27351629734039307, -1.379995584487915, 0.3259727954864502, -2.8541884422302246, 0.629905641078949, -0.051282480359077454, -0.0998205840587616, -0.0494835302233696, -1.3533685207366943, 1.0780160427093506, 2.550427198410034, -1.147534728050232, 0.44285863637924194, 0.27274563908576965, 1.2877405881881714, -1.6473734378814697, 0.2714166045188904, -0.4045078754425049, 2.1622564792633057, 0.13893167674541473, 1.2252625226974487, -0.4767795205116272, -2.2545127868652344, 0.5281081199645996, -1.2536894083023071, -1.0895819664001465, 0.8339217305183411, -0.8119216561317444, 0.08110742270946503, -1.3727338314056396, -0.16390545666217804, -0.9222667217254639, -1.2121775150299072, 0.9383456110954285, 0.13128244876861572, 0.47608980536460876, -0.6143916845321655, 0.4134588837623596, -2.182499885559082, -1.39056396484375, -0.22980326414108276, -0.9114552736282349, 0.3874475359916687, -0.31117451190948486, 0.7145914435386658, -0.1917761266231537, -0.005417552776634693, 0.3496134579181671, 1.477423906326294, 3.355180501937866, 0.23175548017024994, 0.47130703926086426, -0.18910109996795654, -0.8440520763397217, 1.5516107082366943, 0.9337465167045593, -0.14389415085315704, -0.6070058941841125, -0.9843584299087524, 1.3512355089187622, 1.9088822603225708, 1.0015112161636353, 0.06563256680965424, -0.8912902474403381, -0.7189680933952332, -0.04346509277820587, 0.17074719071388245, 0.4447084069252014, 0.8585469126701355, 0.08585669100284576, 0.11793728172779083, 1.389259696006775, 1.1875723600387573, -0.5233973264694214, 0.4839944839477539, -0.8680398464202881, -0.34159374237060547, 0.46282958984375, 0.31162115931510925, 0.004396803677082062, 0.37075987458229065, -1.0621594190597534, -0.35602807998657227, -0.315250426530838, -0.9058801531791687, -0.7282712459564209, -0.47363632917404175, -0.36241841316223145, 1.6376349925994873, 0.06982976198196411, -0.43138623237609863, 0.06759871542453766, -0.7986063361167908, -0.15224280953407288, -1.1823606491088867, 0.19000427424907684, -0.14087264239788055, -0.049017518758773804, -0.05869158357381821, 1.695769190788269, -0.8896112442016602, -2.12760329246521, 0.26689016819000244, 0.29313451051712036, -0.38432776927948, 0.1367378979921341, 1.7661564350128174, 0.5243213176727295, 1.3719456195831299, 1.317846655845642, 1.0180437564849854, -0.677973210811615, -1.2396948337554932, 0.6590833067893982, 0.9760498404502869, -1.4502668380737305, 0.8793765306472778, -0.049394894391298294, -0.45387178659439087, 0.5759847164154053, 1.3283666372299194, 0.3152236342430115, -1.9324969053268433, 0.7450554370880127, -0.8292171955108643, 0.7608431577682495, 0.6366688013076782, 0.7440181970596313, 0.27570509910583496, 0.8418892025947571, -1.286439061164856, -1.14675772190094, -0.739757239818573, -0.560610294342041, 1.955631136894226, -0.0977119505405426, 0.5313284993171692, -0.1662435531616211, -1.2738171815872192, -0.09366601705551147, 0.7194128632545471, 0.35053738951683044, -0.31597426533699036, 0.8043683767318726, -0.6630332469940186, -1.0168474912643433, -1.3453710079193115, -0.5187658071517944, -0.911400556564331, -0.9549973607063293, 0.9701342582702637, 0.849014401435852, 0.28821617364883423, 1.9169789552688599, 0.6882135272026062, 0.23714740574359894, -2.565298080444336, 0.9402350187301636, 0.2573533356189728, -0.05979270860552788, 0.9406280517578125, 0.2893167734146118, 1.1785163879394531, 0.05617336556315422, 0.5022482872009277, -2.4403586387634277, 2.2585418224334717, -0.24771349132061005, 0.6215012073516846, -0.023095089942216873, -0.20755337178707123, 1.13214910030365, 0.4983900785446167, 0.48972710967063904, -1.068467617034912, 0.6568539142608643, -0.6713094115257263, 1.211977243423462, 0.9499402046203613, -0.9356006979942322, 0.0969652533531189, 1.2650319337844849, 0.400424987077713, -0.4507666528224945, -0.9381651878356934, -0.8374961018562317, 0.954567015171051, 1.5965944528579712, 0.06480248272418976, 0.03130904957652092, 0.9037878513336182, 0.6451795697212219, -1.2153902053833008, 0.13060306012630463, -0.6585363149642944, -0.7754586338996887, 1.688674807548523, 2.106524705886841, -0.10779471695423126, -0.2353612184524536, -0.7897911071777344, -1.1877793073654175, 0.8102664947509766, 0.010368550196290016, 0.11404700577259064, 0.6316070556640625, -0.722199022769928, 1.1051090955734253, 0.8163230419158936, 0.9409077167510986, 0.16996052861213684, 0.32176467776298523, 0.4626784920692444, -0.35356801748275757, -1.1802347898483276, -0.285955011844635, -1.1469463109970093, -2.568904161453247, 0.5766226649284363, -0.19054961204528809, -1.370070457458496, 0.1261541098356247, -1.0703781843185425, 0.868587076663971, -0.7098842859268188, -1.0595853328704834, -1.5223827362060547, 0.23554976284503937, -0.21648474037647247, 0.8351826071739197, -1.5771493911743164, -0.05381385609507561, 1.1801807880401611, 0.8976837992668152, -0.5647823810577393, 0.9517478346824646, 0.24697183072566986, 1.0509812831878662, 0.9401830434799194, -0.3319211006164551, 0.5927225351333618, 0.10233533382415771, -1.417919635772705, 0.47279027104377747, 1.2407599687576294, 0.2338222861289978, 1.5499733686447144, -0.506568968296051, 0.08552777767181396, 0.48254498839378357, -0.4907110929489136, -0.5032244324684143, -0.6414332985877991, 0.6991135478019714, 0.1899956315755844, -0.986909806728363, 0.03369414433836937, -0.02462712675333023, -0.16498252749443054, 0.24645070731639862, -1.536273717880249, -0.14092020690441132, -0.3430311977863312, -0.5706987977027893, -1.3115804195404053, -0.017201172187924385, 1.3298145532608032, -0.7255825996398926, -0.18235988914966583, 0.5546335577964783, 0.35069015622138977, 0.45780766010284424, 0.5719051361083984, -0.6824157238006592, -0.389021635055542, -0.2805720269680023, -0.38045838475227356, 0.40893813967704773, 1.2539515495300293, -0.06345770508050919, -1.0415414571762085, 0.6362259984016418, -0.41110339760780334, 0.1010170578956604, 1.9469178915023804, 0.07755286991596222, -0.8671010732650757, 0.2806677222251892, -0.6309511661529541, 1.9688929319381714, 1.6665781736373901, 1.253369927406311, -0.13107739388942719, -0.9860416650772095, 0.6244344711303711, -0.2360345423221588, -0.3591820001602173, 0.9427951574325562, 0.4104861915111542, -0.2054813653230667, -1.4690338373184204, 0.5964576601982117, 1.3342812061309814, -0.8981226682662964, -0.8570783138275146, 0.07573454082012177, -0.7798400521278381, 1.0608245134353638, 0.7116773128509521, 0.29878631234169006, 0.2945247292518616, 1.6258621215820312, 0.7256682515144348, -0.43070000410079956, 0.5266762971878052, 0.390551894903183, -0.14222750067710876, -2.1291377544403076, -1.0542917251586914, 0.36622872948646545, -0.3435106575489044, -1.4969515800476074, 1.3291128873825073, -1.1194210052490234, -0.9069764018058777, 0.5770845413208008, 0.10996170341968536, 1.4519224166870117, 0.3349979519844055, 1.615795612335205, 2.056272506713867, 0.8302184343338013, 0.24984391033649445, 1.2275298833847046, -0.20876887440681458, -0.4760700464248657, 1.8228176832199097, -0.5050039291381836, 0.4994319677352905, 1.0339653491973877, -0.3783012628555298, -1.1512690782546997, -0.7946676015853882, -1.2723156213760376, -0.6886184215545654, 1.2086220979690552, 0.17925535142421722, -1.2033767700195312, 0.21532419323921204, 1.6492102146148682, 0.0015379739925265312, -0.2602222263813019, 0.698491096496582, 0.43201524019241333, -0.8086816668510437, 0.023989245295524597, -0.9509130120277405, 0.5393952131271362, -0.03605867922306061, -0.30150356888771057, 0.3070048987865448, 0.5705098509788513, 1.2388412952423096, 0.044802043586969376, 0.07245321571826935, 1.2004331350326538, -1.3652324676513672, 1.4980533123016357, -0.6630906462669373, 0.32658645510673523, -2.345782518386841, 1.366449236869812, -0.8969011902809143, 1.8406530618667603, -2.5599987506866455, 0.39509475231170654, -0.6051627397537231, -0.5036554336547852, 0.3411399722099304, -0.3904544711112976, 0.10423070192337036, -0.17368921637535095, -1.0667873620986938, -0.1420924812555313, -0.8234528303146362, 0.5714030265808105, 1.116619348526001, 1.3365291357040405, -1.0769364833831787, -0.18481984734535217, -1.8039017915725708, -0.06795047223567963, -0.7025421857833862, 0.2160111665725708, -1.9549614191055298, -0.13707658648490906, -2.046879529953003, -2.2579009532928467, -1.4489727020263672, -0.8612214922904968, 1.0870150327682495, 0.14957557618618011, -0.9500172734260559, 1.0671758651733398, -0.35193124413490295, -1.6967664957046509, 1.085569143295288, -2.1670196056365967 ]
https://github.com/huggingface/datasets/issues/4580
Dataset Viewer issue for multi_news
Thanks for reporting, @lewtun. I forced the refreshing of the preview and it worked OK for train and validation splits. I guess the error has to do with the data files being hosted at Google Drive: this gives errors when requested automatically using scripts. We should host them to fix the error. Let's see if the license allows that.
### Link https://huggingface.co/datasets/multi_news ### Description Not sure what the index error is referring to here: ``` Status code: 400 Exception: IndexError Message: list index out of range ``` ### Owner No
678
59
Dataset Viewer issue for multi_news ### Link https://huggingface.co/datasets/multi_news ### Description Not sure what the index error is referring to here: ``` Status code: 400 Exception: IndexError Message: list index out of range ``` ### Owner No Thanks for reporting, @lewtun. I forced the refreshing of the preview and it worked OK for train and validation splits. I guess the error has to do with the data files being hosted at Google Drive: this gives errors when requested automatically using scripts. We should host them to fix the error. Let's see if the license allows that.
[ -1.218442678451538, -0.904047966003418, -0.7915112376213074, 1.5386137962341309, -0.22909137606620789, -1.231903076171875, 0.2851405441761017, -1.0371031761169434, 1.6374735832214355, -0.6910821199417114, 0.24209997057914734, -1.569000482559204, 0.0981127917766571, -0.5314128398895264, -0.6579949855804443, -0.8944855332374573, -0.5287511348724365, -0.714185893535614, 1.0929878950119019, 2.529240131378174, 1.3550266027450562, -1.3725264072418213, 2.66987943649292, 0.7407242655754089, -0.2267812043428421, -1.0910580158233643, 0.5921326875686646, -0.006396575830876827, -1.3088704347610474, -0.3719959557056427, -0.9895555377006531, -0.14090868830680847, -0.5207087993621826, -0.5680580139160156, -0.0327305868268013, 0.44236263632774353, -0.15991881489753723, -0.46513643860816956, -0.5181572437286377, -0.7970949411392212, 0.4157352149486542, -0.30200010538101196, 0.825557291507721, -0.47126999497413635, 1.8583420515060425, -0.5182467103004456, 0.4304998517036438, 0.7633979916572571, 1.4684680700302124, 0.08713386952877045, -0.24764806032180786, 0.2992715835571289, 0.39693576097488403, -0.04819776117801666, 0.37619054317474365, 1.1047829389572144, 0.48848965764045715, 0.539726197719574, 0.6028674840927124, -2.171639919281006, 1.2150651216506958, -1.0223498344421387, 0.29839763045310974, 1.4694924354553223, -1.1643073558807373, 0.2856833338737488, -1.734100103378296, -0.019695919007062912, 0.4711624085903168, -2.274148464202881, 0.2581591010093689, -1.118302822113037, -0.5443676114082336, 1.029670000076294, 0.36697718501091003, -1.2605465650558472, 0.05792110785841942, -0.4017956554889679, 1.0523357391357422, 0.5681009292602539, 1.1420955657958984, -1.68083918094635, 0.05209966003894806, -0.4094192683696747, -0.04958450421690941, -1.323340892791748, -1.4269862174987793, 0.5181578993797302, 0.7527461647987366, 0.6443990468978882, -0.05555051192641258, 0.94056236743927, -0.9270714521408081, 0.8790472149848938, -0.8654320240020752, -1.6933066844940186, -1.3376153707504272, -2.2923874855041504, -2.260831832885742, 0.7765567302703857, -0.5118157863616943, -0.54867023229599, 2.061565637588501, -0.8802666664123535, -1.8826942443847656, 1.2521162033081055, 0.23429353535175323, -0.024238696321845055, 2.357111692428589, 0.3304363489151001, -0.5856757164001465, 0.44301238656044006, -0.7770865559577942, 0.8738652467727661, -0.5646968483924866, 1.366797685623169, 0.4422472417354584, -0.9756306409835815, 1.6446932554244995, -0.409137099981308, 0.6870014667510986, -0.7265883088111877, -0.5932424068450928, -0.8078523874282837, 0.39425382018089294, 1.8979732990264893, -0.4452885687351227, 1.5485721826553345, -0.3567250967025757, -1.5344069004058838, -1.5437090396881104, 0.926460325717926, 0.5124568939208984, -0.7866474390029907, 0.22874239087104797, -0.18868856132030487, -0.009680064395070076, -0.1158088743686676, 1.0564970970153809, 1.3100907802581787, 0.6764721870422363, -0.33265694975852966, -0.9599571824073792, 0.2971931993961334, -0.04982146620750427, -0.8338042497634888, -1.7265008687973022, -0.3866035044193268, -0.07863757014274597, 0.5936670303344727, -1.174211025238037, 1.6902402639389038, 0.8584657311439514, 2.035426378250122, 0.9411303997039795, -0.3454855978488922, 1.452294945716858, -0.01069047674536705, 1.8856950998306274, -0.461488276720047, 0.6699373722076416, -0.2715801000595093, -1.217873215675354, 0.8616716861724854, -0.36137905716896057, -2.0195181369781494, -0.7502629160881042, -0.9271135926246643, -0.19506123661994934, -0.6290742754936218, 1.086033821105957, -0.23718364536762238, -1.3534314632415771, 0.2010124921798706, -0.617777407169342, 0.19406624138355255, -1.3707630634307861, 0.3601045608520508, 0.6788930296897888, -0.5627580285072327, 0.027303490787744522, -0.2585470676422119, -1.1965793371200562, -0.5315955281257629, 0.36822509765625, 1.8616089820861816, -0.77775639295578, 0.9564641118049622, 0.8987322449684143, -0.8108686804771423, 0.028620384633541107, 0.31780317425727844, -0.2561761140823364, 0.9134244322776794, -1.1430283784866333, -0.5205420851707458, 1.1443583965301514, -0.262363463640213, -0.6808973550796509, 1.5035033226013184, 0.6985260248184204, -1.0223398208618164, -0.1280994564294815, -0.19042421877384186, -0.8648597598075867, -0.006186069454997778, -1.7124097347259521, -0.06980742514133453, 0.22786054015159607, -1.5576813220977783, -0.6059784889221191, -0.20984525978565216, 1.3659298419952393, 0.00728599913418293, 1.3871431350708008, -0.36823639273643494, -0.19100870192050934, -0.4248817563056946, -0.37803012132644653, 0.11088965833187103, -0.28952816128730774, -0.5443947911262512, 0.172237828373909, -0.7260804772377014, 0.35905179381370544, 1.4642971754074097, 0.3028022050857544, 0.1760772317647934, 0.6167778372764587, 0.9656504988670349, 0.39307063817977905, -0.17291191220283508, -0.9345932006835938, -1.4732306003570557, 1.9957382678985596, -1.3444502353668213, 1.9394183158874512, 0.7714943289756775, -0.08279208838939667, -1.792121171951294, -1.9384580850601196, 1.4148961305618286, 1.222623348236084, 2.2102861404418945, 0.6360551714897156, 0.4835408329963684, -0.8772602081298828, -0.6364048719406128, 0.18939873576164246, -1.0281803607940674, -0.7657599449157715, 0.19130921363830566, 2.2764816284179688, 1.7198565006256104, -0.542933464050293, -0.19672928750514984, -1.1047313213348389, 1.1824434995651245, -0.04381382465362549, 0.13914932310581207, 1.8716447353363037, -0.30495506525039673, -0.9878703355789185, 1.1969711780548096, -2.3600680828094482, 0.09592477977275848, 2.0798370838165283, 0.23954421281814575, 0.12479293346405029, -1.4773343801498413, -0.6922592520713806, -0.08423611521720886, -0.3513663709163666, -1.1365636587142944, 0.6017076373100281, -0.36973002552986145, -0.7521573901176453, -1.461705207824707, 0.19058021903038025, -1.0271644592285156, -1.7065486907958984, 0.31312209367752075, 1.9030426740646362, 1.897936224937439, -0.7458546161651611, 1.5269166231155396, -0.25898054242134094, 0.07490254938602448, 1.3360874652862549, 1.117895245552063, 3.018587350845337, 1.9569883346557617, -1.2234141826629639, 0.7392759919166565, 0.033571626991033554, -0.4397698640823364, 1.1610100269317627, -1.1470415592193604, 1.3411591053009033, -0.3083193302154541, -1.20377516746521, -1.250501275062561, 0.8716753721237183, 0.49998030066490173, 0.19344060122966766, -0.45862406492233276, 1.313797950744629, 0.09013603627681732, 1.3457207679748535, 0.5155918598175049, -0.4101642370223999, 0.6622219681739807, -0.36126869916915894, -0.39235153794288635, 1.5615339279174805, 0.2752740979194641, -1.4305446147918701, -2.288465738296509, -0.1748053878545761, -0.7725059390068054, -0.028510572388768196, -0.6854032874107361, -0.9944661855697632, 1.6363545656204224, 0.5370884537696838, -1.2489818334579468, -0.4637202024459839, -0.30264735221862793, -0.6105889081954956, 2.7402896881103516, -1.5741592645645142, -0.3374105989933014, -0.9618650078773499, -0.5281946659088135, 1.7421306371688843, -1.2703298330307007, -0.18575002253055573, -1.0446579456329346, -0.6243938207626343, -1.313215732574463, -0.5721819400787354, 0.06710334122180939, -0.8967365622520447, 0.874200701713562, 0.14503885805606842, -1.1459287405014038, -0.25560638308525085, -0.832459032535553, 0.8813720941543579, -0.05038067698478699, 0.3383394479751587, 2.025228261947632, 0.41215571761131287, -0.420263409614563, 0.7764551043510437, 1.2041670083999634, 0.5736958980560303, -0.6709297299385071, 0.29080283641815186, -0.5659641623497009, 0.3405681550502777, -1.3619171380996704, 0.31480681896209717, -2.881709575653076, 0.4872862994670868, -0.10397878289222717, 0.0039902012795209885, -0.00483736814931035, -1.4112308025360107, 1.1131691932678223, 2.5588982105255127, -1.2285476922988892, 0.5091021656990051, 0.3628350496292114, 1.2257438898086548, -1.5045208930969238, 0.30882295966148376, -0.4795777499675751, 2.048611879348755, 0.0766429752111435, 1.179908037185669, -0.4756926894187927, -2.1645946502685547, 0.6408096551895142, -1.2453863620758057, -1.1747550964355469, 0.6387686133384705, -0.7655158638954163, -0.010296830907464027, -1.4142019748687744, -0.19407866895198822, -0.7919002175331116, -1.3506492376327515, 0.7714502811431885, 0.23221968114376068, 0.38948360085487366, -0.634579062461853, 0.3889603614807129, -2.1250622272491455, -1.377331256866455, -0.21148645877838135, -0.8871660828590393, 0.27134594321250916, -0.4266819655895233, 0.774870753288269, -0.31879961490631104, 0.031873513013124466, 0.24269920587539673, 1.3402265310287476, 3.46405029296875, 0.20327849686145782, 0.3127266466617584, -0.15387049317359924, -0.8849238753318787, 1.5930231809616089, 1.0297881364822388, -0.0701710656285286, -0.5713894963264465, -0.9154296517372131, 1.2473154067993164, 1.9968886375427246, 0.9495823979377747, 0.08496522903442383, -0.873316764831543, -0.5438205003738403, -0.11844055354595184, 0.15346968173980713, 0.5153328776359558, 0.9328515529632568, 0.08441004157066345, 0.013656627386808395, 1.3648228645324707, 1.2225439548492432, -0.48042380809783936, 0.47294163703918457, -0.8454864025115967, -0.4647557735443115, 0.5132660269737244, 0.4557768702507019, 0.10047580301761627, 0.39377400279045105, -1.0570645332336426, -0.25348538160324097, -0.32817724347114563, -0.9913502335548401, -0.6904769539833069, -0.3815305829048157, -0.39862293004989624, 1.665183663368225, 0.06780369579792023, -0.48619797825813293, -0.14635324478149414, -0.8073982000350952, 0.009400743991136551, -1.0067384243011475, 0.29535481333732605, -0.1564444750547409, -0.035151928663253784, -0.05755013972520828, 1.8095695972442627, -0.9704073071479797, -2.2625064849853516, 0.3765024244785309, 0.22784481942653656, -0.36027079820632935, 0.13719673454761505, 1.5879024267196655, 0.5410306453704834, 1.4761773347854614, 1.3813323974609375, 0.9625731706619263, -0.7355974912643433, -1.3062876462936401, 0.6672300696372986, 1.080008864402771, -1.5884150266647339, 0.6765714883804321, 0.10216285288333893, -0.4894286096096039, 0.6835829615592957, 1.275238275527954, 0.5430426001548767, -1.9705052375793457, 0.793263852596283, -0.8325429558753967, 0.9628686308860779, 0.7384506464004517, 0.6962780356407166, 0.26942580938339233, 0.8608779907226562, -1.2780635356903076, -1.1966030597686768, -0.7761414647102356, -0.7341892123222351, 1.9983744621276855, -0.2472018152475357, 0.6518305540084839, -0.13973307609558105, -1.355575442314148, -0.12218497693538666, 0.6408842206001282, 0.29712599515914917, -0.36263424158096313, 0.7647416591644287, -0.6337427496910095, -1.111090064048767, -1.3979411125183105, -0.47940877079963684, -0.9506566524505615, -0.9487443566322327, 1.1214618682861328, 0.760407567024231, 0.33333808183670044, 1.890381097793579, 0.5751867890357971, 0.2195274829864502, -2.61568546295166, 0.9496134519577026, 0.3761310577392578, 0.07210318744182587, 0.8848863244056702, 0.34428685903549194, 1.0077173709869385, 0.0018007466569542885, 0.43659985065460205, -2.2596914768218994, 2.299116373062134, -0.27343568205833435, 0.5674368143081665, 0.13043871521949768, -0.0867118239402771, 1.059536337852478, 0.5241269469261169, 0.5124911665916443, -1.1301143169403076, 0.6960107684135437, -0.6735472083091736, 1.3198670148849487, 0.8289697766304016, -0.7694475650787354, -0.016878793016076088, 1.2841596603393555, 0.6480236649513245, -0.4703886806964874, -0.8985117673873901, -0.8605386018753052, 0.9552122950553894, 1.6544722318649292, 0.051390595734119415, 0.10744954645633698, 0.9079536199569702, 0.5767835378646851, -1.2817902565002441, 0.01378517597913742, -0.7394143342971802, -0.6776435375213623, 1.5635234117507935, 1.9595431089401245, -0.10544969141483307, -0.20231454074382782, -0.797559380531311, -1.289033055305481, 0.7468999624252319, -0.042587459087371826, 0.18231382966041565, 0.6708589196205139, -0.6333279609680176, 1.0890448093414307, 0.6966654658317566, 0.7963539361953735, 0.10085292160511017, 0.3401660621166229, 0.3461724519729614, -0.2812868654727936, -1.197575330734253, -0.16037917137145996, -1.1477725505828857, -2.4773776531219482, 0.5260672569274902, -0.236189067363739, -1.454023838043213, 0.07530394196510315, -1.0315958261489868, 0.9272568225860596, -0.6231198310852051, -1.0298415422439575, -1.5734339952468872, 0.15860030055046082, -0.14056318998336792, 0.8087158203125, -1.5067178010940552, -0.061560504138469696, 1.2801164388656616, 0.876705527305603, -0.8258845210075378, 1.1094624996185303, 0.24783837795257568, 1.1359057426452637, 0.7326526045799255, -0.3809514045715332, 0.39742374420166016, 0.06697185337543488, -1.4221208095550537, 0.5775401592254639, 1.1166560649871826, 0.07577742636203766, 1.4841302633285522, -0.6127657890319824, -0.008326271548867226, 0.5464881658554077, -0.45992201566696167, -0.5847529768943787, -0.5860642790794373, 0.6628977060317993, -0.037602052092552185, -1.0049415826797485, 0.10295192897319794, -0.1567627638578415, -0.21337145566940308, 0.2099696397781372, -1.6372138261795044, -0.17969608306884766, -0.4457280933856964, -0.6144226789474487, -1.3219765424728394, 0.08046890795230865, 1.4144028425216675, -0.6039278507232666, -0.27355673909187317, 0.5484042167663574, 0.39513278007507324, 0.3936304748058319, 0.6558226346969604, -0.5805744528770447, -0.308231920003891, -0.274264931678772, -0.3800331652164459, 0.41990458965301514, 1.3004478216171265, -0.27913859486579895, -1.020081639289856, 0.7207089066505432, -0.35407283902168274, -0.038620539009571075, 1.980438470840454, 0.21564190089702606, -0.8383586406707764, 0.25113973021507263, -0.7368354797363281, 1.9508880376815796, 1.5798455476760864, 1.3620140552520752, -0.1117013543844223, -0.9550893902778625, 0.5824307203292847, -0.22640886902809143, -0.2605224549770355, 0.8064450621604919, 0.4670487344264984, -0.20287765562534332, -1.4042212963104248, 0.5066509246826172, 1.2152460813522339, -0.8979008793830872, -0.9252861142158508, 0.12977690994739532, -0.7429929375648499, 1.0202854871749878, 0.8054602146148682, 0.5060350298881531, 0.30026933550834656, 1.5835962295532227, 0.778128981590271, -0.42028412222862244, 0.526007890701294, 0.44964417815208435, -0.05698889493942261, -1.9365075826644897, -1.0964291095733643, 0.399061918258667, -0.6038662791252136, -1.6459758281707764, 1.3883780241012573, -1.1847492456436157, -0.9446322321891785, 0.3893793523311615, 0.1318436563014984, 1.4634658098220825, 0.27436453104019165, 1.6149013042449951, 2.0059752464294434, 0.9831027984619141, 0.29745063185691833, 1.4001591205596924, -0.1478772759437561, -0.5093671679496765, 1.955863118171692, -0.4216894209384918, 0.4050399959087372, 1.1890349388122559, -0.45523738861083984, -1.0098702907562256, -0.8085863590240479, -1.2382649183273315, -0.6306741237640381, 1.142748236656189, 0.18418781459331512, -1.2178813219070435, 0.19588702917099, 1.4305037260055542, 0.10219216346740723, -0.3242095410823822, 0.6204690933227539, 0.3951391279697418, -0.8833379149436951, 0.023033589124679565, -0.795301079750061, 0.5328311920166016, -0.156161829829216, -0.48365339636802673, 0.37754175066947937, 0.38777753710746765, 1.2443653345108032, -0.094154953956604, 0.13187411427497864, 1.1629971265792847, -1.4905692338943481, 1.5012410879135132, -0.5823773741722107, 0.1984761655330658, -2.369173526763916, 1.3716408014297485, -0.6891997456550598, 1.7777615785598755, -2.7255189418792725, 0.3755991458892822, -0.6304933428764343, -0.3902183771133423, 0.387239933013916, -0.4908672869205475, 0.06919531524181366, -0.2324472814798355, -1.1610304117202759, -0.06512890011072159, -0.689295768737793, 0.650041937828064, 1.1418769359588623, 1.2860084772109985, -1.016235113143921, -0.29731935262680054, -1.78196120262146, -0.13912339508533478, -0.5797966122627258, 0.4715280532836914, -2.082490921020508, -0.2043122500181198, -1.8890937566757202, -2.2744641304016113, -1.2658082246780396, -0.8014203310012817, 1.0525325536727905, 0.2131832093000412, -0.9102166295051575, 1.0757704973220825, -0.3427622318267822, -1.7336335182189941, 1.004799485206604, -2.1946890354156494 ]
https://github.com/huggingface/datasets/issues/4578
[Multi Configs] Use directories to differentiate between subsets/configurations
How to set new split names, instead of train/test/validation? For example, I have a local dataset, consists of several subsets, named "A", "B", and "C". How can I create a huggingface dataset, with splits A/B/C ? The document in https://huggingface.co/docs/datasets/dataset_script only tells me how to create datasets with subsets that is hosted on another server. How to do it if my datasets are local?
Currently to define several subsets/configurations of your dataset, you need to use a dataset script. However it would be nice to have a no-code way to to this. For example we could specify different configurations of a dataset (for example, if a dataset contains different languages) with one directory per configuration. These structures are not supported right now, but would be nice to have: ``` my_dataset_repository/ ├── README.md ├── en/ │ ├── train.csv │ └── test.csv └── fr/ ├── train.csv └── test.csv ``` Or with one directory per split: ``` my_dataset_repository/ ├── README.md ├── en/ │ ├── train/ │ │ ├── shard_0.csv │ │ └── shard_1.csv │ └── test/ │ ├── shard_0.csv │ └── shard_1.csv └── fr/ ├── train/ │ ├── shard_0.csv │ └── shard_1.csv └── test/ ├── shard_0.csv └── shard_1.csv ``` cc @stevhliu @albertvillanova This can be specified in the README as YAML with ``` configs: - config_name: en data_dir: en - config_name: fr data_dir: fr ```
679
64
[Multi Configs] Use directories to differentiate between subsets/configurations Currently to define several subsets/configurations of your dataset, you need to use a dataset script. However it would be nice to have a no-code way to to this. For example we could specify different configurations of a dataset (for example, if a dataset contains different languages) with one directory per configuration. These structures are not supported right now, but would be nice to have: ``` my_dataset_repository/ ├── README.md ├── en/ │ ├── train.csv │ └── test.csv └── fr/ ├── train.csv └── test.csv ``` Or with one directory per split: ``` my_dataset_repository/ ├── README.md ├── en/ │ ├── train/ │ │ ├── shard_0.csv │ │ └── shard_1.csv │ └── test/ │ ├── shard_0.csv │ └── shard_1.csv └── fr/ ├── train/ │ ├── shard_0.csv │ └── shard_1.csv └── test/ ├── shard_0.csv └── shard_1.csv ``` cc @stevhliu @albertvillanova This can be specified in the README as YAML with ``` configs: - config_name: en data_dir: en - config_name: fr data_dir: fr ``` How to set new split names, instead of train/test/validation? For example, I have a local dataset, consists of several subsets, named "A", "B", and "C". How can I create a huggingface dataset, with splits A/B/C ? The document in https://huggingface.co/docs/datasets/dataset_script only tells me how to create datasets with subsets that is hosted on another server. How to do it if my datasets are local?
[ -1.0899837017059326, -0.8527883887290955, -0.755726158618927, 1.388759732246399, -0.1399444192647934, -1.2069926261901855, 0.2072938233613968, -1.041068196296692, 1.5534517765045166, -0.752539336681366, 0.37065792083740234, -1.668782353401184, 0.09138254821300507, -0.5835593938827515, -0.7233922481536865, -0.8682123422622681, -0.5274365544319153, -0.7757099866867065, 1.0188175439834595, 2.514960527420044, 1.11256742477417, -1.2977206707000732, 2.603200674057007, 0.7629011869430542, -0.18567048013210297, -1.025033950805664, 0.638719916343689, 0.0021185744553804398, -1.3120779991149902, -0.3450929820537567, -0.8447938561439514, 0.02022787183523178, -0.6154887080192566, -0.4522872567176819, 0.06989897042512894, 0.4841022789478302, -0.24892160296440125, -0.3049304187297821, -0.5691767334938049, -0.7138822078704834, 0.5657681226730347, -0.5041991472244263, 1.011942982673645, -0.36999544501304626, 1.8502167463302612, -0.6246477961540222, 0.467998206615448, 0.7734106183052063, 1.3016794919967651, 0.1005367562174797, 0.04868553578853607, 0.2287978082895279, 0.40271639823913574, 0.005894599482417107, 0.43397200107574463, 1.2187910079956055, 0.6487628817558289, 0.46907010674476624, 0.6851376295089722, -2.2689223289489746, 1.347987413406372, -0.9472669363021851, 0.39306992292404175, 1.348863124847412, -0.7324430346488953, 0.3706471025943756, -1.7321105003356934, -0.10057123750448227, 0.5597262382507324, -2.261953592300415, 0.14369353652000427, -1.3329969644546509, -0.44710880517959595, 0.9619430303573608, 0.3779153525829315, -1.251356601715088, 0.2988733947277069, -0.41873636841773987, 1.063299536705017, 0.48990416526794434, 1.1438844203948975, -1.5988298654556274, -0.0150657519698143, -0.25949713587760925, 0.05687097832560539, -1.3342828750610352, -1.5229424238204956, 0.5016477704048157, 0.6543903946876526, 0.5928158760070801, -0.15450216829776764, 0.9533975124359131, -1.0681185722351074, 0.8750640749931335, -0.9315744638442993, -1.675952672958374, -1.4206678867340088, -2.2822744846343994, -2.345573902130127, 0.7724448442459106, -0.4437246024608612, -0.484443724155426, 1.9325592517852783, -1.0444040298461914, -1.6421326398849487, 1.1135331392288208, 0.308583527803421, 0.06200086697936058, 2.339287757873535, 0.20613515377044678, -0.6769089698791504, 0.3459094762802124, -0.7477273941040039, 0.9519832134246826, -0.38056278228759766, 1.3598997592926025, 0.5240517258644104, -1.0865854024887085, 1.5920155048370361, -0.40630677342414856, 0.5998662114143372, -0.7744713425636292, -0.43537867069244385, -0.8857589364051819, 0.32004034519195557, 1.7651375532150269, -0.39716997742652893, 1.6354278326034546, -0.30041244626045227, -1.6487709283828735, -1.5969182252883911, 0.8399896621704102, 0.45126083493232727, -0.7254157066345215, 0.09236909449100494, -0.46386006474494934, 0.13491608202457428, 0.07907664030790329, 1.129355788230896, 1.156866192817688, 0.7676239609718323, -0.4261152744293213, -0.8846599459648132, 0.2060849368572235, -0.06479255855083466, -0.7185150384902954, -1.9108632802963257, -0.32737594842910767, 0.19889190793037415, 0.5544638633728027, -1.1367930173873901, 1.8301639556884766, 0.8419480919837952, 2.066830635070801, 1.0178958177566528, -0.440000057220459, 1.550052285194397, -0.163434699177742, 1.929629921913147, -0.5196624398231506, 0.5769742727279663, -0.35236918926239014, -1.196476697921753, 0.894963800907135, -0.25496068596839905, -2.1400363445281982, -0.8376021981239319, -0.8823343515396118, -0.23798683285713196, -0.7130641937255859, 0.9127990007400513, -0.31524544954299927, -1.403719425201416, 0.15319685637950897, -0.6460850238800049, 0.04188432916998863, -1.210304856300354, 0.2628937363624573, 0.749375581741333, -0.6677031517028809, 0.012921026907861233, -0.2531455457210541, -1.2534314393997192, -0.4195844829082489, 0.3387313783168793, 1.8131428956985474, -0.6724420189857483, 0.8904430866241455, 0.9873526692390442, -0.6998324990272522, 0.10570133477449417, 0.24721235036849976, -0.38696593046188354, 0.6888974905014038, -1.067474603652954, -0.4079170227050781, 1.1670664548873901, -0.1270921379327774, -0.6832446455955505, 1.5405752658843994, 0.7859590649604797, -1.086427092552185, -0.2606136202812195, -0.2127707153558731, -0.8156795501708984, 0.05874476209282875, -1.6749353408813477, -0.09723734110593796, 0.3732714056968689, -1.4649158716201782, -0.3651212751865387, -0.21881495416164398, 1.189315676689148, -0.2662005126476288, 1.3873001337051392, -0.31108325719833374, -0.1884576976299286, -0.4644693434238434, -0.5135457515716553, 0.24981221556663513, -0.12806296348571777, -0.7439531087875366, 0.33246731758117676, -0.8166296482086182, 0.3285674452781677, 1.4078394174575806, 0.3123214542865753, 0.10884678363800049, 0.4794699549674988, 1.0423176288604736, 0.3804450035095215, -0.012365688569843769, -0.9271309971809387, -1.6250386238098145, 2.130613327026367, -1.4344249963760376, 1.831717848777771, 0.8096923828125, 0.033907946199178696, -1.8570674657821655, -1.840520977973938, 1.334445834159851, 1.203282117843628, 2.3922626972198486, 0.4847894310951233, 0.37291696667671204, -0.7563484311103821, -0.7474103569984436, 0.5092829465866089, -1.1148991584777832, -0.6669909358024597, 0.13988924026489258, 2.3872926235198975, 1.8350954055786133, -0.4446433484554291, -0.20022758841514587, -0.9773011207580566, 1.3623223304748535, -0.07040763646364212, 0.23854577541351318, 2.1744909286499023, -0.2491496354341507, -1.03350830078125, 1.2244874238967896, -2.315823793411255, 0.27217042446136475, 1.985569953918457, 0.23975884914398193, 0.15030084550380707, -1.4581186771392822, -0.5181265473365784, -0.2697257101535797, -0.5227664113044739, -1.2338719367980957, 0.6517127156257629, -0.24593545496463776, -0.8017416000366211, -1.5017296075820923, 0.1603226363658905, -1.1973122358322144, -1.636046290397644, 0.3016241192817688, 1.7743713855743408, 2.0574936866760254, -0.7443470358848572, 1.4383602142333984, -0.2870276868343353, 0.021589886397123337, 1.2022203207015991, 1.2497307062149048, 3.124723434448242, 1.9112272262573242, -1.2449573278427124, 0.6941000819206238, -0.25862181186676025, -0.5282087326049805, 1.0476140975952148, -1.0968971252441406, 1.2148447036743164, -0.23702402412891388, -1.202135682106018, -1.2288084030151367, 1.0725364685058594, 0.4252322018146515, 0.11058244854211807, -0.42360827326774597, 1.3268108367919922, 0.13336928188800812, 1.3558948040008545, 0.5990661382675171, -0.32088565826416016, 0.5327598452568054, -0.4831984043121338, -0.5184812545776367, 1.5369291305541992, 0.29134804010391235, -1.4350364208221436, -2.3053605556488037, -0.26947128772735596, -0.8960262537002563, 0.013816763646900654, -0.6015519499778748, -0.9006502032279968, 1.6582391262054443, 0.32041773200035095, -1.392118215560913, -0.2816985845565796, -0.33845776319503784, -0.5383233428001404, 2.646279811859131, -1.4740082025527954, -0.0810914859175682, -0.9819855093955994, -0.6256635189056396, 1.5646934509277344, -1.2282758951187134, -0.2733346223831177, -1.0191208124160767, -0.5961405038833618, -1.2150958776474, -0.5635692477226257, 0.07954578846693039, -0.9379915595054626, 0.7663636207580566, 0.13930785655975342, -1.0314583778381348, -0.3327026069164276, -0.9331318140029907, 0.9758079648017883, -0.12603184580802917, 0.23521541059017181, 1.8212404251098633, 0.3906913697719574, -0.3217606246471405, 0.6959691047668457, 1.2120403051376343, 0.6847110986709595, -0.6498162746429443, 0.10263405740261078, -0.8139820098876953, 0.25748687982559204, -1.2922455072402954, 0.2860460877418518, -2.813218116760254, 0.6002541780471802, -0.11878003180027008, -0.12995456159114838, -0.1086515411734581, -1.377840518951416, 1.1218650341033936, 2.6119368076324463, -1.2306950092315674, 0.500652551651001, 0.28111690282821655, 1.1378918886184692, -1.4999645948410034, 0.3354185223579407, -0.3536109924316406, 1.9836030006408691, 0.14723016321659088, 1.2101620435714722, -0.4581173360347748, -2.1844189167022705, 0.7095833420753479, -1.2695807218551636, -1.0796059370040894, 0.8753974437713623, -0.843506395816803, 0.11790662258863449, -1.3858190774917603, -0.2586188018321991, -0.9177649021148682, -1.35929274559021, 0.6651670932769775, 0.1805952489376068, 0.48554232716560364, -0.6030893325805664, 0.256492018699646, -2.2663826942443848, -1.3643872737884521, -0.2610641419887543, -1.0721259117126465, 0.4933598041534424, -0.2820509076118469, 0.6543635129928589, -0.04465664178133011, 0.1004253402352333, 0.3800990879535675, 1.4116039276123047, 3.499777317047119, 0.21018031239509583, 0.36543384194374084, -0.11608444899320602, -1.0371254682540894, 1.3465532064437866, 0.8808109164237976, -0.04610547423362732, -0.5631616115570068, -0.9596468806266785, 1.2365745306015015, 1.9965192079544067, 1.2279447317123413, 0.03335697576403618, -0.836753785610199, -0.836542546749115, 0.03849266842007637, 0.1898694783449173, 0.4820288121700287, 0.8683226108551025, -0.010095803998410702, 0.09525234252214432, 1.402510643005371, 1.2196044921875, -0.41405606269836426, 0.3599854111671448, -0.8604861497879028, -0.3843174874782562, 0.5172271132469177, 0.2293519824743271, 0.1228535994887352, 0.48896104097366333, -1.0109803676605225, -0.24582195281982422, -0.34788626432418823, -0.9496918320655823, -0.7532613277435303, -0.4857495427131653, -0.3775376081466675, 1.6313508749008179, 0.07639352232217789, -0.49292388558387756, -0.01788187026977539, -0.7581622004508972, -0.17960108816623688, -1.0561882257461548, 0.11873931437730789, -0.06340459734201431, -0.08682999759912491, -0.2085164189338684, 1.7743257284164429, -1.0004442930221558, -2.0268826484680176, 0.30541127920150757, 0.2844718098640442, -0.4196934103965759, 0.16277676820755005, 1.6813327074050903, 0.4979822039604187, 1.3201597929000854, 1.2270715236663818, 1.0197776556015015, -0.6797710061073303, -1.2901924848556519, 0.5761299729347229, 0.9831752181053162, -1.3431044816970825, 0.8133903741836548, 0.009281770326197147, -0.4685083329677582, 0.7330542206764221, 1.1877598762512207, 0.4580015242099762, -2.0945775508880615, 0.8253199458122253, -1.0184441804885864, 0.7545093297958374, 0.7227330803871155, 0.7166937589645386, 0.2395423799753189, 0.7523950934410095, -1.2063651084899902, -1.0755072832107544, -0.8029093146324158, -0.5886872410774231, 1.9997791051864624, -0.1538742631673813, 0.5805000066757202, -0.06172896549105644, -1.3486948013305664, -0.018743913620710373, 0.7520396709442139, 0.3681464195251465, -0.5549397468566895, 0.9038428068161011, -0.6736278533935547, -1.0637060403823853, -1.4122564792633057, -0.48498573899269104, -0.9693576097488403, -0.8742789626121521, 1.1771149635314941, 0.7846499681472778, 0.35471266508102417, 1.905259609222412, 0.6841819882392883, 0.302938312292099, -2.6932873725891113, 0.8546258807182312, 0.21412549912929535, 0.02312919870018959, 0.8010498285293579, 0.3576444387435913, 0.9777753949165344, -0.17906901240348816, 0.536828339099884, -2.464287519454956, 2.3535714149475098, -0.20816275477409363, 0.619495153427124, 0.0112476060166955, -0.19251593947410583, 1.0785832405090332, 0.5792335867881775, 0.6098772883415222, -1.1951298713684082, 0.6675518155097961, -0.6657056212425232, 1.1797889471054077, 0.8639575839042664, -0.769493579864502, -0.013370243832468987, 1.3695400953292847, 0.41298818588256836, -0.5052376985549927, -0.8242971897125244, -0.8777438998222351, 0.9317150115966797, 1.7624952793121338, -0.12569773197174072, -0.04545033350586891, 0.8030580878257751, 0.6511166095733643, -1.2834341526031494, 0.04707091674208641, -0.6932185292243958, -0.8088595867156982, 1.5231096744537354, 2.0711963176727295, -0.17372366786003113, -0.029314957559108734, -0.8314767479896545, -1.1137309074401855, 0.7686161398887634, 0.03449222445487976, 0.08953854441642761, 0.5752652883529663, -0.646563708782196, 1.1538838148117065, 0.818008303642273, 0.9522709846496582, 0.15365594625473022, 0.3137202560901642, 0.35049736499786377, -0.29663336277008057, -1.0247544050216675, -0.48042482137680054, -1.034584403038025, -2.5929746627807617, 0.5227764844894409, -0.2934284210205078, -1.4667408466339111, -0.13550440967082977, -0.9924220442771912, 0.9236081838607788, -0.4800545573234558, -0.9412556290626526, -1.498284935951233, 0.360183984041214, -0.10107347369194031, 0.9268819093704224, -1.7592467069625854, -0.1457078903913498, 1.1652395725250244, 0.912036657333374, -0.6668109893798828, 1.038650631904602, 0.3178107738494873, 0.8666602373123169, 0.8626256585121155, -0.3004157543182373, 0.4728364646434784, 0.2063145935535431, -1.3158708810806274, 0.3229289948940277, 1.2033390998840332, 0.09664198011159897, 1.3015379905700684, -0.5133106708526611, 0.1176924929022789, 0.2961790859699249, -0.5817211270332336, -0.5080951452255249, -0.45499032735824585, 0.7534314393997192, 0.12726272642612457, -1.0317424535751343, 0.08504947274923325, -0.26353538036346436, -0.13550184667110443, 0.23345988988876343, -1.4572110176086426, -0.2706713080406189, -0.2415003627538681, -0.4658239483833313, -1.2722854614257812, -0.10164821147918701, 1.4170520305633545, -0.7162193655967712, -0.1551034152507782, 0.4991368055343628, 0.43855488300323486, 0.704576849937439, 0.6567645072937012, -0.7050012946128845, -0.3727251887321472, -0.26922380924224854, -0.23100711405277252, 0.3146415948867798, 1.4043715000152588, -0.08287761360406876, -0.9714318513870239, 0.8438058495521545, -0.38697853684425354, 0.10784899443387985, 2.071903705596924, 0.1863114982843399, -0.8476658463478088, 0.38958215713500977, -0.7052322030067444, 1.7321439981460571, 1.8554757833480835, 1.32314133644104, 0.00016227923333644867, -0.9908312559127808, 0.5712661147117615, -0.27211686968803406, -0.3762545883655548, 0.9125290513038635, 0.3110390901565552, -0.3707832396030426, -1.3746949434280396, 0.5311950445175171, 1.2757357358932495, -0.9122403264045715, -0.7728477716445923, 0.06728304177522659, -0.8991492986679077, 1.2554049491882324, 0.6137209534645081, 0.44551822543144226, 0.16567808389663696, 1.5188548564910889, 0.7719550728797913, -0.493042528629303, 0.5726867914199829, 0.5150701403617859, -0.19054767489433289, -2.0406062602996826, -1.0640202760696411, 0.353868693113327, -0.44876885414123535, -1.6155048608779907, 1.3510632514953613, -1.212039589881897, -0.9806362390518188, 0.591518759727478, -0.008240906521677971, 1.4601143598556519, 0.39489397406578064, 1.585347056388855, 2.082210063934326, 0.8695890307426453, 0.37859728932380676, 1.3685258626937866, -0.15187254548072815, -0.4926674962043762, 1.7825335264205933, -0.3942795991897583, 0.4935528635978699, 1.0573854446411133, -0.3160082995891571, -0.9814146161079407, -0.7483382225036621, -1.110660195350647, -0.6859750747680664, 1.2805713415145874, -0.0038638939149677753, -1.1214220523834229, 0.35840076208114624, 1.6469045877456665, 0.0879988744854927, -0.2952347695827484, 0.5912894010543823, 0.4691706895828247, -0.8049913644790649, -0.10764183849096298, -1.048099398612976, 0.5279855132102966, -0.2088342308998108, -0.21263068914413452, 0.3502452075481415, 0.40952399373054504, 1.1698765754699707, -0.01003802940249443, 0.18973955512046814, 1.1311964988708496, -1.4289345741271973, 1.5439023971557617, -0.5951119661331177, 0.21681532263755798, -2.4008779525756836, 1.3633993864059448, -0.7416952252388, 1.9169132709503174, -2.56467342376709, 0.32430315017700195, -0.5627885460853577, -0.5938755869865417, 0.29537132382392883, -0.3607272803783417, 0.1592867374420166, -0.232093945145607, -1.0692224502563477, -0.05709190294146538, -0.7267827391624451, 0.5581229329109192, 1.0812106132507324, 1.3502426147460938, -1.122118353843689, -0.4501458406448364, -1.7287999391555786, -0.22798307240009308, -0.6645104289054871, 0.40502500534057617, -1.9325852394104004, -0.23733998835086823, -1.9634331464767456, -2.313943862915039, -1.4418518543243408, -0.8962030410766602, 1.0989720821380615, 0.23185807466506958, -0.8112672567367554, 1.0587631464004517, -0.4206579029560089, -1.9878919124603271, 1.0066585540771484, -2.0763001441955566 ]
https://github.com/huggingface/datasets/issues/4578
[Multi Configs] Use directories to differentiate between subsets/configurations
> The document in https://huggingface.co/docs/datasets/dataset_script only tells me how to create datasets with subsets that is hosted on another server. How to do it if my datasets are local? It works the same - you just need to use local paths instead of URLs
Currently to define several subsets/configurations of your dataset, you need to use a dataset script. However it would be nice to have a no-code way to to this. For example we could specify different configurations of a dataset (for example, if a dataset contains different languages) with one directory per configuration. These structures are not supported right now, but would be nice to have: ``` my_dataset_repository/ ├── README.md ├── en/ │ ├── train.csv │ └── test.csv └── fr/ ├── train.csv └── test.csv ``` Or with one directory per split: ``` my_dataset_repository/ ├── README.md ├── en/ │ ├── train/ │ │ ├── shard_0.csv │ │ └── shard_1.csv │ └── test/ │ ├── shard_0.csv │ └── shard_1.csv └── fr/ ├── train/ │ ├── shard_0.csv │ └── shard_1.csv └── test/ ├── shard_0.csv └── shard_1.csv ``` cc @stevhliu @albertvillanova This can be specified in the README as YAML with ``` configs: - config_name: en data_dir: en - config_name: fr data_dir: fr ```
679
44
[Multi Configs] Use directories to differentiate between subsets/configurations Currently to define several subsets/configurations of your dataset, you need to use a dataset script. However it would be nice to have a no-code way to to this. For example we could specify different configurations of a dataset (for example, if a dataset contains different languages) with one directory per configuration. These structures are not supported right now, but would be nice to have: ``` my_dataset_repository/ ├── README.md ├── en/ │ ├── train.csv │ └── test.csv └── fr/ ├── train.csv └── test.csv ``` Or with one directory per split: ``` my_dataset_repository/ ├── README.md ├── en/ │ ├── train/ │ │ ├── shard_0.csv │ │ └── shard_1.csv │ └── test/ │ ├── shard_0.csv │ └── shard_1.csv └── fr/ ├── train/ │ ├── shard_0.csv │ └── shard_1.csv └── test/ ├── shard_0.csv └── shard_1.csv ``` cc @stevhliu @albertvillanova This can be specified in the README as YAML with ``` configs: - config_name: en data_dir: en - config_name: fr data_dir: fr ``` > The document in https://huggingface.co/docs/datasets/dataset_script only tells me how to create datasets with subsets that is hosted on another server. How to do it if my datasets are local? It works the same - you just need to use local paths instead of URLs
[ -1.1245250701904297, -0.8361812829971313, -0.741517961025238, 1.423004150390625, -0.11096441745758057, -1.2018373012542725, 0.21752767264842987, -0.9977591633796692, 1.5453871488571167, -0.7530364394187927, 0.38860341906547546, -1.653873324394226, 0.10693325102329254, -0.5618457198143005, -0.7425384521484375, -0.8691855669021606, -0.5708292722702026, -0.7457767724990845, 1.047610878944397, 2.502657413482666, 1.1162105798721313, -1.307584285736084, 2.5812172889709473, 0.7677966952323914, -0.1712367832660675, -1.0331207513809204, 0.6096183657646179, 0.02826457843184471, -1.3515381813049316, -0.36965808272361755, -0.8130440711975098, 0.023575875908136368, -0.6389080882072449, -0.4698445796966553, 0.13684512674808502, 0.4777904152870178, -0.23743274807929993, -0.3021122217178345, -0.5610286593437195, -0.6858199238777161, 0.566523551940918, -0.5119426846504211, 0.9950246810913086, -0.3722541034221649, 1.8614068031311035, -0.647443413734436, 0.4722813665866852, 0.7711141109466553, 1.3385529518127441, 0.0864749401807785, -0.004334753844887018, 0.2861737310886383, 0.39651814103126526, 0.037859272211790085, 0.4189596474170685, 1.2226015329360962, 0.6377197504043579, 0.4451996386051178, 0.6842342019081116, -2.264355421066284, 1.357771635055542, -0.946952760219574, 0.3622833490371704, 1.3314833641052246, -0.7803797721862793, 0.37736907601356506, -1.737795352935791, -0.057302165776491165, 0.5507298707962036, -2.2774298191070557, 0.135525181889534, -1.3146699666976929, -0.4073428511619568, 0.9951534271240234, 0.3678969144821167, -1.2885850667953491, 0.2861933708190918, -0.40568095445632935, 1.0868126153945923, 0.47281619906425476, 1.145925760269165, -1.6034272909164429, 0.022984791547060013, -0.2703472077846527, 0.0564468689262867, -1.335290789604187, -1.5132579803466797, 0.45674559473991394, 0.6795618534088135, 0.580452024936676, -0.14542099833488464, 0.9344167113304138, -1.047692894935608, 0.8870216608047485, -0.9247875809669495, -1.663773775100708, -1.4239832162857056, -2.300605535507202, -2.3387081623077393, 0.7742173671722412, -0.46088841557502747, -0.4890275299549103, 1.8992564678192139, -1.0416373014450073, -1.654554843902588, 1.1077065467834473, 0.3134879171848297, 0.06897512078285217, 2.323469638824463, 0.19295012950897217, -0.6919466853141785, 0.3039778470993042, -0.74385005235672, 0.9464642405509949, -0.3723079562187195, 1.3508222103118896, 0.5137178897857666, -1.1112674474716187, 1.5826201438903809, -0.3901618421077728, 0.6106429696083069, -0.7846494913101196, -0.4260035753250122, -0.8966302275657654, 0.3227439522743225, 1.814965844154358, -0.38153839111328125, 1.65364408493042, -0.29403117299079895, -1.6482797861099243, -1.575603723526001, 0.8321593403816223, 0.4756866991519928, -0.6790899634361267, 0.109524667263031, -0.4523492157459259, 0.11862380802631378, 0.10756190121173859, 1.1047821044921875, 1.1549532413482666, 0.7260846495628357, -0.4308014512062073, -0.8958361744880676, 0.2314809113740921, -0.02852005511522293, -0.677602231502533, -1.9514765739440918, -0.344003826379776, 0.17970097064971924, 0.584628164768219, -1.150227427482605, 1.7891076803207397, 0.812713623046875, 2.0856568813323975, 1.016969919204712, -0.42473286390304565, 1.5829508304595947, -0.16388316452503204, 1.9524290561676025, -0.5177580714225769, 0.5933919548988342, -0.32703566551208496, -1.2058589458465576, 0.8876517415046692, -0.266201913356781, -2.1540169715881348, -0.8164029121398926, -0.8735564351081848, -0.22062663733959198, -0.6803252100944519, 0.9374433159828186, -0.3202279508113861, -1.3886889219284058, 0.16912545263767242, -0.6708968281745911, 0.07450361549854279, -1.222672462463379, 0.261364221572876, 0.7753392457962036, -0.6886833310127258, 0.0127638541162014, -0.299940824508667, -1.2678946256637573, -0.4200248420238495, 0.3471747636795044, 1.7609251737594604, -0.6828097701072693, 0.8855570554733276, 0.9805091619491577, -0.676141619682312, 0.1005391776561737, 0.2530723810195923, -0.38656729459762573, 0.6983155608177185, -1.0698260068893433, -0.4057330787181854, 1.169859766960144, -0.11092187464237213, -0.7037591338157654, 1.5521236658096313, 0.7753410339355469, -1.0926494598388672, -0.2516472637653351, -0.22422926127910614, -0.8375123739242554, 0.07624077796936035, -1.7161787748336792, -0.1269921213388443, 0.3470882773399353, -1.484843373298645, -0.35015666484832764, -0.19886422157287598, 1.2232455015182495, -0.27510756254196167, 1.4346100091934204, -0.3078453540802002, -0.15978111326694489, -0.4809097349643707, -0.5154570937156677, 0.23853996396064758, -0.0900936871767044, -0.7736676931381226, 0.3773232102394104, -0.7967790961265564, 0.3548389971256256, 1.3624117374420166, 0.3420933187007904, 0.0951765924692154, 0.48945167660713196, 1.0631318092346191, 0.34272265434265137, -0.03490670770406723, -0.933480978012085, -1.7101237773895264, 2.1464641094207764, -1.424859881401062, 1.826816439628601, 0.8302988409996033, 0.047222770750522614, -1.8419095277786255, -1.8050934076309204, 1.3684399127960205, 1.1909384727478027, 2.3988566398620605, 0.5105406045913696, 0.36229410767555237, -0.7536119222640991, -0.7542523145675659, 0.5374342203140259, -1.1348936557769775, -0.7037173509597778, 0.12725315988063812, 2.393836259841919, 1.8071593046188354, -0.38747552037239075, -0.183571457862854, -0.9664840698242188, 1.3241829872131348, -0.07494750618934631, 0.24140484631061554, 2.186452865600586, -0.17922130227088928, -1.042311668395996, 1.184204339981079, -2.2775187492370605, 0.2933344542980194, 1.9934978485107422, 0.2386384904384613, 0.15536148846149445, -1.4827593564987183, -0.530214250087738, -0.24680744111537933, -0.4785553812980652, -1.23002028465271, 0.6424097418785095, -0.24683883786201477, -0.7874229550361633, -1.5017839670181274, 0.1761738508939743, -1.1935275793075562, -1.6133357286453247, 0.33125558495521545, 1.7869542837142944, 2.0287671089172363, -0.7023299932479858, 1.4373650550842285, -0.29488757252693176, 0.018556632101535797, 1.1831814050674438, 1.2327709197998047, 3.112950086593628, 1.9319467544555664, -1.2339128255844116, 0.6817446351051331, -0.2606969177722931, -0.5283514857292175, 1.0688683986663818, -1.0922739505767822, 1.2231312990188599, -0.25784292817115784, -1.2164865732192993, -1.257464051246643, 1.0920710563659668, 0.44428306818008423, 0.0910574346780777, -0.4286637306213379, 1.367893934249878, 0.11663644015789032, 1.368759274482727, 0.5747137665748596, -0.32986119389533997, 0.5184196829795837, -0.5016598701477051, -0.538989245891571, 1.5507861375808716, 0.2695789635181427, -1.4200433492660522, -2.333421468734741, -0.26251494884490967, -0.873784065246582, 0.014938360080122948, -0.6122294068336487, -0.8538630604743958, 1.6371886730194092, 0.29384440183639526, -1.4044626951217651, -0.28542360663414, -0.3455415368080139, -0.5588241219520569, 2.6458005905151367, -1.49233078956604, -0.053836897015571594, -0.977682888507843, -0.595598042011261, 1.5421385765075684, -1.2085286378860474, -0.29876479506492615, -1.0266010761260986, -0.5882976651191711, -1.1818636655807495, -0.6100073456764221, 0.040744274854660034, -0.9207689762115479, 0.7345360517501831, 0.10426421463489532, -1.0480254888534546, -0.3648453652858734, -0.9245015978813171, 0.9793558120727539, -0.10386717319488525, 0.24879910051822662, 1.8065780401229858, 0.4085327386856079, -0.30159637331962585, 0.7243306636810303, 1.2030000686645508, 0.7064523100852966, -0.6435729265213013, 0.11950841546058655, -0.7875972986221313, 0.21633371710777283, -1.2943451404571533, 0.3176426887512207, -2.823671579360962, 0.6020165085792542, -0.09029306471347809, -0.08775106072425842, -0.12910877168178558, -1.375640630722046, 1.1227737665176392, 2.6610443592071533, -1.2469044923782349, 0.48974230885505676, 0.28915929794311523, 1.1041182279586792, -1.4948710203170776, 0.3419554829597473, -0.38222548365592957, 2.0125701427459717, 0.13566453754901886, 1.221727728843689, -0.49101316928863525, -2.2007248401641846, 0.7132476568222046, -1.257126808166504, -1.116255283355713, 0.8941802382469177, -0.8527766466140747, 0.1125352531671524, -1.3593145608901978, -0.24728113412857056, -0.9085977077484131, -1.3696671724319458, 0.6521372199058533, 0.1805550903081894, 0.4807676374912262, -0.5568485260009766, 0.25182148814201355, -2.279139995574951, -1.3518803119659424, -0.2644405961036682, -1.1103054285049438, 0.4882103204727173, -0.2676483988761902, 0.6434893012046814, -0.02637065201997757, 0.10102978348731995, 0.362649530172348, 1.3826972246170044, 3.4975554943084717, 0.22061945497989655, 0.36258721351623535, -0.10538958013057709, -1.0249927043914795, 1.3325575590133667, 0.8842637538909912, -0.06896136701107025, -0.5904458165168762, -0.9181454181671143, 1.2344489097595215, 2.00995135307312, 1.219775676727295, 0.0327371209859848, -0.8471382260322571, -0.8575053811073303, 0.07691510021686554, 0.16044208407402039, 0.5110632181167603, 0.862704873085022, 0.026336830109357834, 0.09548965096473694, 1.3796192407608032, 1.232936143875122, -0.4301024079322815, 0.36562973260879517, -0.8499969244003296, -0.3929285705089569, 0.5255289673805237, 0.25392988324165344, 0.1165795773267746, 0.4687286615371704, -0.9862340092658997, -0.20276640355587006, -0.33368128538131714, -0.95979243516922, -0.7551470994949341, -0.45918411016464233, -0.39259809255599976, 1.6524969339370728, 0.06581097841262817, -0.4755246937274933, -0.033216752111911774, -0.7743234634399414, -0.18586839735507965, -1.0714926719665527, 0.13360218703746796, -0.04418119043111801, -0.0695105791091919, -0.22505632042884827, 1.7626298666000366, -1.0305982828140259, -2.0416336059570312, 0.32220128178596497, 0.28811678290367126, -0.44326159358024597, 0.12339521944522858, 1.7021887302398682, 0.5061399340629578, 1.2969567775726318, 1.2250635623931885, 1.0099719762802124, -0.6960184574127197, -1.315813422203064, 0.5170756578445435, 1.0210461616516113, -1.354573369026184, 0.7802719473838806, 0.01401611976325512, -0.444790244102478, 0.730959415435791, 1.2194173336029053, 0.47304975986480713, -2.0973381996154785, 0.8287931680679321, -0.9935312271118164, 0.7291789650917053, 0.7413325309753418, 0.6979414820671082, 0.20855681598186493, 0.7673642039299011, -1.1992759704589844, -1.0694019794464111, -0.8278622031211853, -0.5632713437080383, 1.9757376909255981, -0.15914109349250793, 0.5337033867835999, 0.000532323494553566, -1.384555697441101, -0.01631852798163891, 0.7440822720527649, 0.357795774936676, -0.510570228099823, 0.9425602555274963, -0.6920334100723267, -1.101936936378479, -1.4395532608032227, -0.49227374792099, -0.8875759840011597, -0.8763436079025269, 1.1877049207687378, 0.7984339594841003, 0.3559875190258026, 1.8848445415496826, 0.6558965444564819, 0.2674700915813446, -2.7234108448028564, 0.8478251695632935, 0.21059925854206085, 0.039631426334381104, 0.8050012588500977, 0.3505555987358093, 0.9969241619110107, -0.1610165238380432, 0.5241339802742004, -2.474830150604248, 2.3560266494750977, -0.22796325385570526, 0.6018548607826233, 0.05650123581290245, -0.20870424807071686, 1.0447564125061035, 0.5650364756584167, 0.6614516377449036, -1.1896871328353882, 0.7209818363189697, -0.6974002718925476, 1.1862622499465942, 0.8514317274093628, -0.7772321701049805, -0.03200594335794449, 1.3555371761322021, 0.3554896414279938, -0.5220452547073364, -0.8046595454216003, -0.8762269020080566, 0.9222845435142517, 1.7624117136001587, -0.10755755007266998, -0.040554583072662354, 0.7910565733909607, 0.6552900671958923, -1.281760573387146, 0.06029787287116051, -0.7189660668373108, -0.8451599478721619, 1.4942477941513062, 2.0535247325897217, -0.15128807723522186, -0.058151546865701675, -0.8749013543128967, -1.0582398176193237, 0.7439267039299011, 0.03306115046143532, 0.07848440110683441, 0.5723499059677124, -0.627964198589325, 1.1422247886657715, 0.8254746794700623, 0.9677025079727173, 0.12734472751617432, 0.3189519941806793, 0.32470861077308655, -0.25424638390541077, -1.0516974925994873, -0.5050675868988037, -1.0160588026046753, -2.6092023849487305, 0.5138182044029236, -0.326120525598526, -1.4488723278045654, -0.11478011310100555, -1.0051569938659668, 0.8924775719642639, -0.4623733162879944, -0.9581973552703857, -1.486497163772583, 0.33246293663978577, -0.1135002076625824, 0.8784464597702026, -1.750077247619629, -0.14737209677696228, 1.151421070098877, 0.9035733342170715, -0.6611462831497192, 1.0517603158950806, 0.3291773796081543, 0.8600239157676697, 0.888660192489624, -0.2678508460521698, 0.4649517834186554, 0.26313385367393494, -1.2905960083007812, 0.34556999802589417, 1.1757051944732666, 0.11478333175182343, 1.3041174411773682, -0.5187330842018127, 0.11602611839771271, 0.27296629548072815, -0.604979932308197, -0.49539217352867126, -0.5133733749389648, 0.7858933210372925, 0.13498136401176453, -1.0123800039291382, 0.11088117957115173, -0.310380220413208, -0.08482138812541962, 0.220057874917984, -1.5061068534851074, -0.23657363653182983, -0.20952108502388, -0.48639625310897827, -1.2690585851669312, -0.10833552479743958, 1.4075361490249634, -0.7263748645782471, -0.19021733105182648, 0.49153226613998413, 0.4620686173439026, 0.7109875082969666, 0.6981421113014221, -0.6909318566322327, -0.3890107572078705, -0.2756558060646057, -0.21791207790374756, 0.34697800874710083, 1.3717455863952637, -0.07580631971359253, -0.9516472816467285, 0.8396124243736267, -0.3913050889968872, 0.10183712840080261, 2.0999248027801514, 0.20873092114925385, -0.8828792572021484, 0.38287344574928284, -0.7286975383758545, 1.721555471420288, 1.827270746231079, 1.3335059881210327, -0.02230970934033394, -1.0413949489593506, 0.6151314973831177, -0.2721998691558838, -0.4022679030895233, 0.9105575084686279, 0.3534195125102997, -0.35211798548698425, -1.3377057313919067, 0.49401575326919556, 1.276533842086792, -0.8978548049926758, -0.7837761640548706, 0.06418055295944214, -0.9026038646697998, 1.2296591997146606, 0.6348233222961426, 0.42328161001205444, 0.13096246123313904, 1.517126441001892, 0.7384230494499207, -0.49100765585899353, 0.5486898422241211, 0.5019005537033081, -0.22621501982212067, -2.022265672683716, -1.0618410110473633, 0.39988234639167786, -0.4264853596687317, -1.6414467096328735, 1.3515421152114868, -1.2450031042099, -0.9532511234283447, 0.5664447546005249, -0.02060127817094326, 1.4809337854385376, 0.35133710503578186, 1.622631311416626, 2.029829263687134, 0.8788953423500061, 0.37758952379226685, 1.385353446006775, -0.1300320029258728, -0.5073438882827759, 1.755172848701477, -0.42944571375846863, 0.48143187165260315, 1.0938847064971924, -0.3413954973220825, -0.9904178380966187, -0.7388061881065369, -1.0981462001800537, -0.6683875918388367, 1.2702423334121704, 0.019858743995428085, -1.1583880186080933, 0.3584519326686859, 1.615593671798706, 0.11376427114009857, -0.24569885432720184, 0.5838413834571838, 0.46587035059928894, -0.8167328834533691, -0.11414843797683716, -1.0777438879013062, 0.4979754090309143, -0.18680791556835175, -0.21089132130146027, 0.31315040588378906, 0.380842924118042, 1.133061408996582, 0.02978241816163063, 0.18782015144824982, 1.161251425743103, -1.383998990058899, 1.5141513347625732, -0.6007629632949829, 0.2547115087509155, -2.4145584106445312, 1.359750509262085, -0.7903165221214294, 1.8970476388931274, -2.5305209159851074, 0.3326405882835388, -0.5977855920791626, -0.5735260844230652, 0.3051520884037018, -0.34424516558647156, 0.16543099284172058, -0.23329472541809082, -1.0820449590682983, -0.08458197116851807, -0.7432833909988403, 0.5869820713996887, 1.0637198686599731, 1.3362241983413696, -1.103963017463684, -0.43788012862205505, -1.7209482192993164, -0.27163609862327576, -0.6357761025428772, 0.45616579055786133, -1.907565951347351, -0.22438281774520874, -1.992484211921692, -2.3125319480895996, -1.4349881410598755, -0.8563953042030334, 1.104311466217041, 0.25822317600250244, -0.7852550745010376, 1.037904977798462, -0.3910712003707886, -1.9579834938049316, 0.9960696697235107, -2.031496047973633 ]
https://github.com/huggingface/datasets/issues/4575
Problem about wmt17 zh-en dataset
@winterfell2021 Hi, I wonder where the code you provided should be added. I tried to add them in the `datasets/table.py` in `array_cast` function, however, the 'zh' item is none.
It seems that in subset casia2015, some samples are like `{'c[hn]':'xxx', 'en': 'aa'}`. So when using `data = load_dataset('wmt17', "zh-en")` to load the wmt17 zh-en dataset, which will raise the exception: ``` Traceback (most recent call last): File "train.py", line 78, in <module> data = load_dataset(args.dataset, "zh-en") File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 1684, in load_dataset use_auth_token=use_auth_token, File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 705, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 1221, in _download_and_prepare super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos) File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 793, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 1215, in _prepare_split num_examples, num_bytes = writer.finalize() File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 533, in finalize self.write_examples_on_file() File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 410, in write_examples_on_file self.write_batch(batch_examples=batch_examples) File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 503, in write_batch arrays.append(pa.array(typed_sequence)) File "pyarrow/array.pxi", line 230, in pyarrow.lib.array File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 198, in __arrow_array__ out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1675, in wrapper return func(array, *args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1846, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1675, in wrapper return func(array, *args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1756, in array_cast raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{pa_type}") TypeError: Couldn't cast array of type struct<c[hn]: string, en: string, zh: string> to struct<en: string, zh: string> ``` So the solution of this problem is to change the original array manually: ``` if 'c[hn]' in str(array.type): py_array = array.to_pylist() data_list = [] for vo in py_array: tmp = { 'en': vo['en'], } if 'zh' not in vo: tmp['zh'] = vo['c[hn]'] else: tmp['zh'] = vo['zh'] data_list.append(tmp) array = pa.array(data_list, type=pa.struct([ pa.field('en', pa.string()), pa.field('zh', pa.string()), ])) ``` Therefore, maybe a correct version of original casia2015 file need to be updated
680
29
Problem about wmt17 zh-en dataset It seems that in subset casia2015, some samples are like `{'c[hn]':'xxx', 'en': 'aa'}`. So when using `data = load_dataset('wmt17', "zh-en")` to load the wmt17 zh-en dataset, which will raise the exception: ``` Traceback (most recent call last): File "train.py", line 78, in <module> data = load_dataset(args.dataset, "zh-en") File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 1684, in load_dataset use_auth_token=use_auth_token, File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 705, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 1221, in _download_and_prepare super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos) File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 793, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 1215, in _prepare_split num_examples, num_bytes = writer.finalize() File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 533, in finalize self.write_examples_on_file() File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 410, in write_examples_on_file self.write_batch(batch_examples=batch_examples) File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 503, in write_batch arrays.append(pa.array(typed_sequence)) File "pyarrow/array.pxi", line 230, in pyarrow.lib.array File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 198, in __arrow_array__ out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1675, in wrapper return func(array, *args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1846, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1675, in wrapper return func(array, *args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1756, in array_cast raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{pa_type}") TypeError: Couldn't cast array of type struct<c[hn]: string, en: string, zh: string> to struct<en: string, zh: string> ``` So the solution of this problem is to change the original array manually: ``` if 'c[hn]' in str(array.type): py_array = array.to_pylist() data_list = [] for vo in py_array: tmp = { 'en': vo['en'], } if 'zh' not in vo: tmp['zh'] = vo['c[hn]'] else: tmp['zh'] = vo['zh'] data_list.append(tmp) array = pa.array(data_list, type=pa.struct([ pa.field('en', pa.string()), pa.field('zh', pa.string()), ])) ``` Therefore, maybe a correct version of original casia2015 file need to be updated @winterfell2021 Hi, I wonder where the code you provided should be added. I tried to add them in the `datasets/table.py` in `array_cast` function, however, the 'zh' item is none.
[ -1.2363417148590088, -0.9432647228240967, -0.6092330813407898, 1.503603458404541, -0.15438736975193024, -1.2010492086410522, 0.09360925108194351, -1.0192445516586304, 1.5152342319488525, -0.7283371686935425, 0.2194286286830902, -1.5868315696716309, -0.10805092006921768, -0.4903579354286194, -0.7310218811035156, -0.8925963044166565, -0.34962478280067444, -0.8764292001724243, 1.1420944929122925, 2.4303152561187744, 1.2967332601547241, -1.3660120964050293, 2.7429616451263428, 0.67769855260849, -0.2872936427593231, -1.051123023033142, 0.559363842010498, 0.03063911944627762, -1.1042404174804688, -0.4528363049030304, -0.9919502139091492, -0.07028687000274658, -0.5589746236801147, -0.25610455870628357, 0.0540245845913887, 0.4737675189971924, -0.2932954728603363, -0.2328893393278122, -0.6599498391151428, -0.6990514993667603, 0.48525044322013855, -0.32423558831214905, 0.9325090050697327, -0.27232444286346436, 1.7648049592971802, -0.6134210824966431, 0.42238786816596985, 0.7138518691062927, 1.2429423332214355, 0.1821947991847992, 0.11479827016592026, 0.20996397733688354, 0.3283059298992157, 0.006215221248567104, 0.6603561043739319, 1.2089402675628662, 0.5698800683021545, 0.48567432165145874, 0.6505070328712463, -2.2549378871917725, 1.3014726638793945, -0.9824269413948059, 0.29145941138267517, 1.3433858156204224, -0.7908472418785095, 0.3670215606689453, -1.7380174398422241, -0.0232822485268116, 0.6409074068069458, -2.257256269454956, 0.3293209373950958, -1.3028000593185425, -0.5089272856712341, 0.871850311756134, 0.38642269372940063, -1.2143919467926025, 0.22470152378082275, -0.521321713924408, 1.1365299224853516, 0.4261159300804138, 0.9856951236724854, -1.6320644617080688, -0.012132035568356514, -0.11028338223695755, 0.07833842188119888, -1.2973839044570923, -1.6380484104156494, 0.5555004477500916, 0.5639263987541199, 0.734915018081665, -0.1130099669098854, 1.0798776149749756, -1.1962218284606934, 0.8248516917228699, -1.0490535497665405, -1.5654352903366089, -1.3782789707183838, -2.4594523906707764, -2.3190174102783203, 0.8276914954185486, -0.6034563779830933, -0.4960207939147949, 2.0913312435150146, -0.9256725311279297, -1.7111340761184692, 1.1368637084960938, 0.30307912826538086, 0.10440199077129364, 2.4285736083984375, 0.18033367395401, -0.7334181666374207, 0.47837698459625244, -0.8004974126815796, 0.7987267374992371, -0.3139932155609131, 1.3079800605773926, 0.5329536199569702, -1.0086119174957275, 1.585371971130371, -0.39572080969810486, 0.5938944816589355, -0.5336071848869324, -0.5709126591682434, -0.7768789529800415, 0.25804638862609863, 1.853137493133545, -0.27006760239601135, 1.5707125663757324, -0.25695037841796875, -1.4703903198242188, -1.597564935684204, 0.928649365901947, 0.4539235532283783, -0.9089316725730896, 0.026568211615085602, -0.5120911002159119, 0.24081836640834808, -0.07666388899087906, 1.1788135766983032, 1.233325481414795, 0.7453387379646301, -0.3873143792152405, -0.7550697326660156, 0.16645459830760956, -0.2135637253522873, -0.6554955840110779, -1.843319296836853, -0.2867233455181122, 0.20965038239955902, 0.6360129117965698, -1.1782132387161255, 1.7983731031417847, 0.8752841949462891, 1.9825825691223145, 0.8832924962043762, -0.3673624098300934, 1.4558799266815186, -0.07980430871248245, 1.8072524070739746, -0.5113967657089233, 0.5695038437843323, -0.42675772309303284, -1.1722230911254883, 0.9256341457366943, -0.36959314346313477, -1.9400420188903809, -0.8709524273872375, -0.7507109642028809, -0.19371414184570312, -0.7620698809623718, 0.8276574611663818, -0.33861756324768066, -1.5212562084197998, 0.04420991241931915, -0.6723752021789551, 0.22008304297924042, -1.2235777378082275, 0.25940945744514465, 0.7126619815826416, -0.6916654109954834, -0.12398813664913177, -0.24240534007549286, -1.2354223728179932, -0.5607743263244629, 0.39257174730300903, 1.9620893001556396, -0.5544829368591309, 0.9020748734474182, 1.0069910287857056, -0.7733336091041565, 0.09084965288639069, 0.13566835224628448, -0.2875647246837616, 0.7426000833511353, -1.0272750854492188, -0.5554516315460205, 1.2192096710205078, -0.33434009552001953, -0.7512385845184326, 1.4332925081253052, 0.8072232604026794, -1.1038217544555664, -0.33138787746429443, -0.24671702086925507, -0.8237857818603516, 0.019237730652093887, -1.4736641645431519, -0.18050746619701385, 0.4720059335231781, -1.5282108783721924, -0.2911493480205536, -0.1640074998140335, 1.3799927234649658, -0.24536843597888947, 1.5074936151504517, -0.27124711871147156, -0.17182284593582153, -0.19214262068271637, -0.5673242211341858, 0.2791655659675598, -0.16485083103179932, -0.5565931797027588, 0.09309565275907516, -0.8142817616462708, 0.3271300494670868, 1.4783353805541992, 0.31907474994659424, 0.0970846489071846, 0.42512625455856323, 1.047503113746643, 0.42316368222236633, 0.004808914847671986, -0.928231954574585, -1.4733006954193115, 1.9033489227294922, -1.4141511917114258, 1.9965349435806274, 0.7518318295478821, -0.10934121161699295, -1.7853678464889526, -1.8750243186950684, 1.184144139289856, 1.1296827793121338, 2.2887630462646484, 0.4660862684249878, 0.44085928797721863, -0.8198981285095215, -0.7972664833068848, 0.2848759889602661, -0.9708119630813599, -0.567657470703125, 0.1477745771408081, 2.374009847640991, 1.8582149744033813, -0.5299528241157532, -0.23849047720432281, -0.886480450630188, 1.3334603309631348, -0.29476720094680786, 0.32636043429374695, 2.0840041637420654, -0.35603681206703186, -0.9881267547607422, 1.3499025106430054, -2.489368200302124, 0.2791888415813446, 2.1020565032958984, 0.2915586829185486, 0.19440025091171265, -1.4294854402542114, -0.582365095615387, -0.3207147717475891, -0.4516317844390869, -1.2283408641815186, 0.637994647026062, -0.2628414034843445, -0.8234825134277344, -1.3836965560913086, 0.06314751505851746, -1.1737303733825684, -1.8016841411590576, 0.3570922017097473, 2.0030927658081055, 2.1304545402526855, -0.7996895909309387, 1.420318603515625, -0.268729567527771, 0.021920446306467056, 1.3148109912872314, 1.3861671686172485, 3.0199244022369385, 1.844562292098999, -1.2544595003128052, 0.6299182176589966, -0.2561119794845581, -0.5008350610733032, 1.1443284749984741, -1.173237919807434, 1.128335952758789, -0.16007257997989655, -1.1796537637710571, -1.3053784370422363, 1.1128497123718262, 0.4601355493068695, -0.02608317881822586, -0.5293701887130737, 1.2615970373153687, 0.15295875072479248, 1.3860770463943481, 0.6683538556098938, -0.47225886583328247, 0.5012927055358887, -0.40749818086624146, -0.592750608921051, 1.695000171661377, 0.12051291018724442, -1.536711573600769, -2.373347759246826, -0.2792625427246094, -0.966440737247467, 0.03158349171280861, -0.6013656258583069, -1.0981972217559814, 1.5439422130584717, 0.3336217701435089, -1.2436226606369019, -0.2746789753437042, -0.2909986972808838, -0.4885960519313812, 2.7063403129577637, -1.2253700494766235, -0.10184378921985626, -0.9387275576591492, -0.61238032579422, 1.61854088306427, -1.215273141860962, -0.23409348726272583, -1.0332573652267456, -0.6383916139602661, -1.3024446964263916, -0.37106290459632874, 0.07626043260097504, -1.063815712928772, 0.8168565034866333, 0.1862110197544098, -1.1072238683700562, -0.37849050760269165, -0.7961971759796143, 1.0877765417099, -0.08509352058172226, 0.19337373971939087, 1.8272899389266968, 0.22662916779518127, -0.38388118147850037, 0.7960435748100281, 1.1786435842514038, 0.6527705192565918, -0.6518649458885193, -0.02400110475718975, -0.6706898212432861, 0.44250041246414185, -1.367045521736145, 0.17604494094848633, -2.980203151702881, 0.7178707122802734, -0.2656829357147217, -0.15234050154685974, -0.13233943283557892, -1.3556259870529175, 1.046079397201538, 2.5927679538726807, -1.1782804727554321, 0.5235066413879395, 0.42109379172325134, 1.1580668687820435, -1.6045942306518555, 0.2784925401210785, -0.4933933913707733, 2.0682480335235596, 0.12419050186872482, 1.2417904138565063, -0.515850305557251, -2.2546002864837646, 0.649511992931366, -1.2758971452713013, -1.024371862411499, 0.7999958992004395, -0.9042348265647888, 0.4335843324661255, -1.4413855075836182, -0.1731889843940735, -0.9676264524459839, -1.2322335243225098, 0.6090742349624634, 0.12689609825611115, 0.34553927183151245, -0.5344370603561401, 0.4220859110355377, -2.200723648071289, -1.4615298509597778, -0.15741023421287537, -0.9731912612915039, 0.606766939163208, -0.4730006158351898, 0.5857939720153809, -0.07674349099397659, 0.1275959312915802, 0.2090080976486206, 1.5785655975341797, 3.3953311443328857, 0.09083136916160583, 0.15081357955932617, -0.13447082042694092, -1.01552152633667, 1.4868278503417969, 0.8476117253303528, -0.11200079321861267, -0.6074094772338867, -1.0585007667541504, 1.3185151815414429, 2.0051944255828857, 1.1118550300598145, 0.06868918240070343, -0.7892683148384094, -0.6752443909645081, -0.029447954148054123, 0.16688179969787598, 0.5414718985557556, 0.9338996410369873, -0.0658135637640953, 0.08315856009721756, 1.3256372213363647, 1.2174798250198364, -0.2970183789730072, 0.2866520285606384, -0.9547932147979736, -0.45057064294815063, 0.4288102984428406, 0.12594471871852875, -0.06069573014974594, 0.5288694500923157, -1.0149232149124146, -0.26934903860092163, -0.29866430163383484, -0.7699498534202576, -0.7243605852127075, -0.35137125849723816, -0.4926271140575409, 1.5403144359588623, 0.14475053548812866, -0.5381038188934326, 0.07805877178907394, -0.6447199583053589, -0.13485269248485565, -1.1440335512161255, 0.11762098222970963, -0.0927005261182785, -0.09501270949840546, -0.2661730647087097, 1.6592320203781128, -0.8847950100898743, -2.0154478549957275, 0.12580877542495728, 0.33326202630996704, -0.2382783591747284, 0.19094939529895782, 1.7780053615570068, 0.4206105172634125, 1.432690978050232, 1.269860029220581, 0.9449946284294128, -0.5975500345230103, -1.2924280166625977, 0.774499237537384, 0.9788095951080322, -1.3343356847763062, 0.9337153434753418, -0.20811845362186432, -0.4932436943054199, 0.6317214369773865, 1.3526017665863037, 0.45060041546821594, -1.992231845855713, 0.9867646098136902, -1.0739719867706299, 0.8380047082901001, 0.7200814485549927, 0.7406607866287231, 0.28428882360458374, 0.8681342005729675, -1.182435393333435, -1.1731388568878174, -0.6848288774490356, -0.6900654435157776, 1.9540218114852905, -0.30544719099998474, 0.6126670837402344, -0.13916346430778503, -1.1446025371551514, -0.15082015097141266, 0.7872157096862793, 0.4482300281524658, -0.34854912757873535, 0.8982301950454712, -0.6014662981033325, -0.9502348899841309, -1.2568310499191284, -0.3916499614715576, -1.0864996910095215, -0.8751828670501709, 1.0526584386825562, 0.7464443445205688, 0.4996245205402374, 1.878051996231079, 0.5776361227035522, 0.4309493899345398, -2.525087356567383, 0.8560823798179626, 0.3056168854236603, -0.12702205777168274, 0.793914794921875, 0.25988709926605225, 1.1514092683792114, 0.021203860640525818, 0.601582407951355, -2.3052923679351807, 2.2105653285980225, -0.16679930686950684, 0.6469120979309082, 0.013592795468866825, -0.1432574838399887, 1.1406275033950806, 0.5744354128837585, 0.5150738954544067, -1.1142619848251343, 0.7099640965461731, -0.4776179790496826, 1.0929681062698364, 0.9690735936164856, -0.835435152053833, 0.0540534108877182, 1.5578553676605225, 0.45392295718193054, -0.5069582462310791, -0.9760517477989197, -0.84346604347229, 0.9846070408821106, 1.6956785917282104, -0.12991365790367126, -0.046051815152168274, 0.7835280895233154, 0.6425489187240601, -1.1938433647155762, -0.00977570004761219, -0.6649799346923828, -0.6491092443466187, 1.700652837753296, 2.0507445335388184, -0.18334873020648956, -0.20075777173042297, -0.7476755976676941, -1.332078456878662, 0.73859041929245, -0.14342975616455078, -0.004802389070391655, 0.6640928983688354, -0.6031219363212585, 0.9590407013893127, 0.5522058606147766, 0.951428234577179, 0.0032172473147511482, 0.26100245118141174, 0.4356233775615692, -0.3273093104362488, -1.1840498447418213, -0.3808823227882385, -1.1431224346160889, -2.636582851409912, 0.3455077111721039, -0.28161659836769104, -1.444618582725525, 0.020152229815721512, -1.0033680200576782, 0.9739440679550171, -0.5392841696739197, -1.1201130151748657, -1.4512319564819336, 0.3568252623081207, -0.1404433697462082, 0.9712658524513245, -1.7537840604782104, -0.22877104580402374, 1.21366548538208, 0.8449028730392456, -0.6274521946907043, 0.9547305703163147, 0.23152072727680206, 0.9919742345809937, 0.6591379642486572, -0.4084921181201935, 0.7213513255119324, -0.05452059954404831, -1.3142921924591064, 0.45026281476020813, 1.2716692686080933, 0.13638979196548462, 1.380138874053955, -0.43801623582839966, 0.04277069866657257, 0.45938825607299805, -0.7088204622268677, -0.5403821468353271, -0.2711813449859619, 0.677359938621521, -0.00828460045158863, -1.012060284614563, -0.18784376978874207, -0.09274783730506897, -0.37622660398483276, 0.21243025362491608, -1.457724928855896, -0.2778584361076355, -0.4178744852542877, -0.399113267660141, -1.4168205261230469, 0.02472420036792755, 1.3561915159225464, -0.7421242594718933, -0.23915502429008484, 0.36081016063690186, 0.42528510093688965, 0.5270387530326843, 0.6227478981018066, -0.8245871663093567, -0.25316518545150757, -0.3636016547679901, -0.28064727783203125, 0.3079594373703003, 1.2537667751312256, -0.08308647572994232, -0.9477689266204834, 0.6272614598274231, -0.2897386848926544, 0.19125860929489136, 1.9901617765426636, 0.030629314482212067, -0.7268349528312683, 0.35517600178718567, -0.7404829263687134, 1.6957324743270874, 1.6737864017486572, 1.2171049118041992, -0.1356011927127838, -0.7537099123001099, 0.6021428108215332, -0.306240975856781, -0.27694159746170044, 0.8578671813011169, 0.34019407629966736, -0.2678857147693634, -1.4734992980957031, 0.7304112315177917, 1.2277451753616333, -0.7719840407371521, -0.7345095276832581, 0.13124564290046692, -0.88838130235672, 1.2291591167449951, 0.4748365879058838, 0.2821492850780487, 0.2880575656890869, 1.6078968048095703, 0.7951340675354004, -0.5146308541297913, 0.5224399566650391, 0.5236181020736694, -0.2704189717769623, -2.0841064453125, -1.0815593004226685, 0.27555611729621887, -0.5273911356925964, -1.5921114683151245, 1.3954187631607056, -1.025964379310608, -1.0298703908920288, 0.6270909309387207, 0.0944870188832283, 1.25448477268219, 0.3694072961807251, 1.6840054988861084, 2.1158745288848877, 0.8771697282791138, 0.4570603668689728, 1.2553671598434448, -0.14714200794696808, -0.5037109851837158, 1.8466933965682983, -0.4000551998615265, 0.4832116663455963, 1.056680679321289, -0.3670678436756134, -1.0861074924468994, -0.847656786441803, -1.1643799543380737, -0.5909916162490845, 1.17112135887146, 0.10599793493747711, -1.0291130542755127, 0.1859816461801529, 1.615821361541748, 0.17055489122867584, -0.17696116864681244, 0.7330176830291748, 0.3927324414253235, -0.7098051309585571, -0.07189752161502838, -0.8345046639442444, 0.48421382904052734, -0.20143400132656097, -0.2470906525850296, 0.22551104426383972, 0.5095866918563843, 1.3557645082473755, -0.10611891001462936, 0.1700134128332138, 1.0278773307800293, -1.4100154638290405, 1.5141643285751343, -0.5512308478355408, 0.332636296749115, -2.445958375930786, 1.378859043121338, -0.7964398860931396, 2.048027515411377, -2.5391008853912354, 0.43308019638061523, -0.5504517555236816, -0.5114266872406006, 0.21616142988204956, -0.4193326532840729, 0.08744384348392487, -0.06808455288410187, -0.9971380829811096, 0.01483162771910429, -0.6744690537452698, 0.6119876503944397, 1.1467268466949463, 1.4497442245483398, -1.140633225440979, -0.2637268900871277, -1.6550824642181396, -0.2043452262878418, -0.8307868838310242, 0.3212283253669739, -1.9925520420074463, -0.2049552947282791, -1.9781771898269653, -2.260131597518921, -1.277100682258606, -0.8683270812034607, 1.1054879426956177, 0.13834790885448456, -0.9475012421607971, 1.2708078622817993, -0.2624189257621765, -1.8603720664978027, 1.1756017208099365, -2.2312777042388916 ]
https://github.com/huggingface/datasets/issues/4575
Problem about wmt17 zh-en dataset
I found some 'zh' item is none while 'c[hn]' is not. So the code may change to: ```python if 'c[hn]' in str(array.type): py_array = array.to_pylist() data_list = [] for vo in py_array: tmp = { 'en': vo['en'], } if vo.get('zh'): tmp['zh'] = vo['zh'] else: tmp['zh'] = vo['c[hn]'] data_list.append(tmp) array = pa.array(data_list, type=pa.struct([ pa.field('en', pa.string()), pa.field('zh', pa.string()), ])) ```
It seems that in subset casia2015, some samples are like `{'c[hn]':'xxx', 'en': 'aa'}`. So when using `data = load_dataset('wmt17', "zh-en")` to load the wmt17 zh-en dataset, which will raise the exception: ``` Traceback (most recent call last): File "train.py", line 78, in <module> data = load_dataset(args.dataset, "zh-en") File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 1684, in load_dataset use_auth_token=use_auth_token, File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 705, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 1221, in _download_and_prepare super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos) File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 793, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 1215, in _prepare_split num_examples, num_bytes = writer.finalize() File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 533, in finalize self.write_examples_on_file() File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 410, in write_examples_on_file self.write_batch(batch_examples=batch_examples) File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 503, in write_batch arrays.append(pa.array(typed_sequence)) File "pyarrow/array.pxi", line 230, in pyarrow.lib.array File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 198, in __arrow_array__ out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1675, in wrapper return func(array, *args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1846, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1675, in wrapper return func(array, *args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1756, in array_cast raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{pa_type}") TypeError: Couldn't cast array of type struct<c[hn]: string, en: string, zh: string> to struct<en: string, zh: string> ``` So the solution of this problem is to change the original array manually: ``` if 'c[hn]' in str(array.type): py_array = array.to_pylist() data_list = [] for vo in py_array: tmp = { 'en': vo['en'], } if 'zh' not in vo: tmp['zh'] = vo['c[hn]'] else: tmp['zh'] = vo['zh'] data_list.append(tmp) array = pa.array(data_list, type=pa.struct([ pa.field('en', pa.string()), pa.field('zh', pa.string()), ])) ``` Therefore, maybe a correct version of original casia2015 file need to be updated
680
58
Problem about wmt17 zh-en dataset It seems that in subset casia2015, some samples are like `{'c[hn]':'xxx', 'en': 'aa'}`. So when using `data = load_dataset('wmt17', "zh-en")` to load the wmt17 zh-en dataset, which will raise the exception: ``` Traceback (most recent call last): File "train.py", line 78, in <module> data = load_dataset(args.dataset, "zh-en") File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 1684, in load_dataset use_auth_token=use_auth_token, File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 705, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 1221, in _download_and_prepare super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos) File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 793, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 1215, in _prepare_split num_examples, num_bytes = writer.finalize() File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 533, in finalize self.write_examples_on_file() File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 410, in write_examples_on_file self.write_batch(batch_examples=batch_examples) File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 503, in write_batch arrays.append(pa.array(typed_sequence)) File "pyarrow/array.pxi", line 230, in pyarrow.lib.array File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 198, in __arrow_array__ out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1675, in wrapper return func(array, *args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1846, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1675, in wrapper return func(array, *args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1756, in array_cast raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{pa_type}") TypeError: Couldn't cast array of type struct<c[hn]: string, en: string, zh: string> to struct<en: string, zh: string> ``` So the solution of this problem is to change the original array manually: ``` if 'c[hn]' in str(array.type): py_array = array.to_pylist() data_list = [] for vo in py_array: tmp = { 'en': vo['en'], } if 'zh' not in vo: tmp['zh'] = vo['c[hn]'] else: tmp['zh'] = vo['zh'] data_list.append(tmp) array = pa.array(data_list, type=pa.struct([ pa.field('en', pa.string()), pa.field('zh', pa.string()), ])) ``` Therefore, maybe a correct version of original casia2015 file need to be updated I found some 'zh' item is none while 'c[hn]' is not. So the code may change to: ```python if 'c[hn]' in str(array.type): py_array = array.to_pylist() data_list = [] for vo in py_array: tmp = { 'en': vo['en'], } if vo.get('zh'): tmp['zh'] = vo['zh'] else: tmp['zh'] = vo['c[hn]'] data_list.append(tmp) array = pa.array(data_list, type=pa.struct([ pa.field('en', pa.string()), pa.field('zh', pa.string()), ])) ```
[ -1.2363417148590088, -0.9432647228240967, -0.6092330813407898, 1.503603458404541, -0.15438736975193024, -1.2010492086410522, 0.09360925108194351, -1.0192445516586304, 1.5152342319488525, -0.7283371686935425, 0.2194286286830902, -1.5868315696716309, -0.10805092006921768, -0.4903579354286194, -0.7310218811035156, -0.8925963044166565, -0.34962478280067444, -0.8764292001724243, 1.1420944929122925, 2.4303152561187744, 1.2967332601547241, -1.3660120964050293, 2.7429616451263428, 0.67769855260849, -0.2872936427593231, -1.051123023033142, 0.559363842010498, 0.03063911944627762, -1.1042404174804688, -0.4528363049030304, -0.9919502139091492, -0.07028687000274658, -0.5589746236801147, -0.25610455870628357, 0.0540245845913887, 0.4737675189971924, -0.2932954728603363, -0.2328893393278122, -0.6599498391151428, -0.6990514993667603, 0.48525044322013855, -0.32423558831214905, 0.9325090050697327, -0.27232444286346436, 1.7648049592971802, -0.6134210824966431, 0.42238786816596985, 0.7138518691062927, 1.2429423332214355, 0.1821947991847992, 0.11479827016592026, 0.20996397733688354, 0.3283059298992157, 0.006215221248567104, 0.6603561043739319, 1.2089402675628662, 0.5698800683021545, 0.48567432165145874, 0.6505070328712463, -2.2549378871917725, 1.3014726638793945, -0.9824269413948059, 0.29145941138267517, 1.3433858156204224, -0.7908472418785095, 0.3670215606689453, -1.7380174398422241, -0.0232822485268116, 0.6409074068069458, -2.257256269454956, 0.3293209373950958, -1.3028000593185425, -0.5089272856712341, 0.871850311756134, 0.38642269372940063, -1.2143919467926025, 0.22470152378082275, -0.521321713924408, 1.1365299224853516, 0.4261159300804138, 0.9856951236724854, -1.6320644617080688, -0.012132035568356514, -0.11028338223695755, 0.07833842188119888, -1.2973839044570923, -1.6380484104156494, 0.5555004477500916, 0.5639263987541199, 0.734915018081665, -0.1130099669098854, 1.0798776149749756, -1.1962218284606934, 0.8248516917228699, -1.0490535497665405, -1.5654352903366089, -1.3782789707183838, -2.4594523906707764, -2.3190174102783203, 0.8276914954185486, -0.6034563779830933, -0.4960207939147949, 2.0913312435150146, -0.9256725311279297, -1.7111340761184692, 1.1368637084960938, 0.30307912826538086, 0.10440199077129364, 2.4285736083984375, 0.18033367395401, -0.7334181666374207, 0.47837698459625244, -0.8004974126815796, 0.7987267374992371, -0.3139932155609131, 1.3079800605773926, 0.5329536199569702, -1.0086119174957275, 1.585371971130371, -0.39572080969810486, 0.5938944816589355, -0.5336071848869324, -0.5709126591682434, -0.7768789529800415, 0.25804638862609863, 1.853137493133545, -0.27006760239601135, 1.5707125663757324, -0.25695037841796875, -1.4703903198242188, -1.597564935684204, 0.928649365901947, 0.4539235532283783, -0.9089316725730896, 0.026568211615085602, -0.5120911002159119, 0.24081836640834808, -0.07666388899087906, 1.1788135766983032, 1.233325481414795, 0.7453387379646301, -0.3873143792152405, -0.7550697326660156, 0.16645459830760956, -0.2135637253522873, -0.6554955840110779, -1.843319296836853, -0.2867233455181122, 0.20965038239955902, 0.6360129117965698, -1.1782132387161255, 1.7983731031417847, 0.8752841949462891, 1.9825825691223145, 0.8832924962043762, -0.3673624098300934, 1.4558799266815186, -0.07980430871248245, 1.8072524070739746, -0.5113967657089233, 0.5695038437843323, -0.42675772309303284, -1.1722230911254883, 0.9256341457366943, -0.36959314346313477, -1.9400420188903809, -0.8709524273872375, -0.7507109642028809, -0.19371414184570312, -0.7620698809623718, 0.8276574611663818, -0.33861756324768066, -1.5212562084197998, 0.04420991241931915, -0.6723752021789551, 0.22008304297924042, -1.2235777378082275, 0.25940945744514465, 0.7126619815826416, -0.6916654109954834, -0.12398813664913177, -0.24240534007549286, -1.2354223728179932, -0.5607743263244629, 0.39257174730300903, 1.9620893001556396, -0.5544829368591309, 0.9020748734474182, 1.0069910287857056, -0.7733336091041565, 0.09084965288639069, 0.13566835224628448, -0.2875647246837616, 0.7426000833511353, -1.0272750854492188, -0.5554516315460205, 1.2192096710205078, -0.33434009552001953, -0.7512385845184326, 1.4332925081253052, 0.8072232604026794, -1.1038217544555664, -0.33138787746429443, -0.24671702086925507, -0.8237857818603516, 0.019237730652093887, -1.4736641645431519, -0.18050746619701385, 0.4720059335231781, -1.5282108783721924, -0.2911493480205536, -0.1640074998140335, 1.3799927234649658, -0.24536843597888947, 1.5074936151504517, -0.27124711871147156, -0.17182284593582153, -0.19214262068271637, -0.5673242211341858, 0.2791655659675598, -0.16485083103179932, -0.5565931797027588, 0.09309565275907516, -0.8142817616462708, 0.3271300494670868, 1.4783353805541992, 0.31907474994659424, 0.0970846489071846, 0.42512625455856323, 1.047503113746643, 0.42316368222236633, 0.004808914847671986, -0.928231954574585, -1.4733006954193115, 1.9033489227294922, -1.4141511917114258, 1.9965349435806274, 0.7518318295478821, -0.10934121161699295, -1.7853678464889526, -1.8750243186950684, 1.184144139289856, 1.1296827793121338, 2.2887630462646484, 0.4660862684249878, 0.44085928797721863, -0.8198981285095215, -0.7972664833068848, 0.2848759889602661, -0.9708119630813599, -0.567657470703125, 0.1477745771408081, 2.374009847640991, 1.8582149744033813, -0.5299528241157532, -0.23849047720432281, -0.886480450630188, 1.3334603309631348, -0.29476720094680786, 0.32636043429374695, 2.0840041637420654, -0.35603681206703186, -0.9881267547607422, 1.3499025106430054, -2.489368200302124, 0.2791888415813446, 2.1020565032958984, 0.2915586829185486, 0.19440025091171265, -1.4294854402542114, -0.582365095615387, -0.3207147717475891, -0.4516317844390869, -1.2283408641815186, 0.637994647026062, -0.2628414034843445, -0.8234825134277344, -1.3836965560913086, 0.06314751505851746, -1.1737303733825684, -1.8016841411590576, 0.3570922017097473, 2.0030927658081055, 2.1304545402526855, -0.7996895909309387, 1.420318603515625, -0.268729567527771, 0.021920446306467056, 1.3148109912872314, 1.3861671686172485, 3.0199244022369385, 1.844562292098999, -1.2544595003128052, 0.6299182176589966, -0.2561119794845581, -0.5008350610733032, 1.1443284749984741, -1.173237919807434, 1.128335952758789, -0.16007257997989655, -1.1796537637710571, -1.3053784370422363, 1.1128497123718262, 0.4601355493068695, -0.02608317881822586, -0.5293701887130737, 1.2615970373153687, 0.15295875072479248, 1.3860770463943481, 0.6683538556098938, -0.47225886583328247, 0.5012927055358887, -0.40749818086624146, -0.592750608921051, 1.695000171661377, 0.12051291018724442, -1.536711573600769, -2.373347759246826, -0.2792625427246094, -0.966440737247467, 0.03158349171280861, -0.6013656258583069, -1.0981972217559814, 1.5439422130584717, 0.3336217701435089, -1.2436226606369019, -0.2746789753437042, -0.2909986972808838, -0.4885960519313812, 2.7063403129577637, -1.2253700494766235, -0.10184378921985626, -0.9387275576591492, -0.61238032579422, 1.61854088306427, -1.215273141860962, -0.23409348726272583, -1.0332573652267456, -0.6383916139602661, -1.3024446964263916, -0.37106290459632874, 0.07626043260097504, -1.063815712928772, 0.8168565034866333, 0.1862110197544098, -1.1072238683700562, -0.37849050760269165, -0.7961971759796143, 1.0877765417099, -0.08509352058172226, 0.19337373971939087, 1.8272899389266968, 0.22662916779518127, -0.38388118147850037, 0.7960435748100281, 1.1786435842514038, 0.6527705192565918, -0.6518649458885193, -0.02400110475718975, -0.6706898212432861, 0.44250041246414185, -1.367045521736145, 0.17604494094848633, -2.980203151702881, 0.7178707122802734, -0.2656829357147217, -0.15234050154685974, -0.13233943283557892, -1.3556259870529175, 1.046079397201538, 2.5927679538726807, -1.1782804727554321, 0.5235066413879395, 0.42109379172325134, 1.1580668687820435, -1.6045942306518555, 0.2784925401210785, -0.4933933913707733, 2.0682480335235596, 0.12419050186872482, 1.2417904138565063, -0.515850305557251, -2.2546002864837646, 0.649511992931366, -1.2758971452713013, -1.024371862411499, 0.7999958992004395, -0.9042348265647888, 0.4335843324661255, -1.4413855075836182, -0.1731889843940735, -0.9676264524459839, -1.2322335243225098, 0.6090742349624634, 0.12689609825611115, 0.34553927183151245, -0.5344370603561401, 0.4220859110355377, -2.200723648071289, -1.4615298509597778, -0.15741023421287537, -0.9731912612915039, 0.606766939163208, -0.4730006158351898, 0.5857939720153809, -0.07674349099397659, 0.1275959312915802, 0.2090080976486206, 1.5785655975341797, 3.3953311443328857, 0.09083136916160583, 0.15081357955932617, -0.13447082042694092, -1.01552152633667, 1.4868278503417969, 0.8476117253303528, -0.11200079321861267, -0.6074094772338867, -1.0585007667541504, 1.3185151815414429, 2.0051944255828857, 1.1118550300598145, 0.06868918240070343, -0.7892683148384094, -0.6752443909645081, -0.029447954148054123, 0.16688179969787598, 0.5414718985557556, 0.9338996410369873, -0.0658135637640953, 0.08315856009721756, 1.3256372213363647, 1.2174798250198364, -0.2970183789730072, 0.2866520285606384, -0.9547932147979736, -0.45057064294815063, 0.4288102984428406, 0.12594471871852875, -0.06069573014974594, 0.5288694500923157, -1.0149232149124146, -0.26934903860092163, -0.29866430163383484, -0.7699498534202576, -0.7243605852127075, -0.35137125849723816, -0.4926271140575409, 1.5403144359588623, 0.14475053548812866, -0.5381038188934326, 0.07805877178907394, -0.6447199583053589, -0.13485269248485565, -1.1440335512161255, 0.11762098222970963, -0.0927005261182785, -0.09501270949840546, -0.2661730647087097, 1.6592320203781128, -0.8847950100898743, -2.0154478549957275, 0.12580877542495728, 0.33326202630996704, -0.2382783591747284, 0.19094939529895782, 1.7780053615570068, 0.4206105172634125, 1.432690978050232, 1.269860029220581, 0.9449946284294128, -0.5975500345230103, -1.2924280166625977, 0.774499237537384, 0.9788095951080322, -1.3343356847763062, 0.9337153434753418, -0.20811845362186432, -0.4932436943054199, 0.6317214369773865, 1.3526017665863037, 0.45060041546821594, -1.992231845855713, 0.9867646098136902, -1.0739719867706299, 0.8380047082901001, 0.7200814485549927, 0.7406607866287231, 0.28428882360458374, 0.8681342005729675, -1.182435393333435, -1.1731388568878174, -0.6848288774490356, -0.6900654435157776, 1.9540218114852905, -0.30544719099998474, 0.6126670837402344, -0.13916346430778503, -1.1446025371551514, -0.15082015097141266, 0.7872157096862793, 0.4482300281524658, -0.34854912757873535, 0.8982301950454712, -0.6014662981033325, -0.9502348899841309, -1.2568310499191284, -0.3916499614715576, -1.0864996910095215, -0.8751828670501709, 1.0526584386825562, 0.7464443445205688, 0.4996245205402374, 1.878051996231079, 0.5776361227035522, 0.4309493899345398, -2.525087356567383, 0.8560823798179626, 0.3056168854236603, -0.12702205777168274, 0.793914794921875, 0.25988709926605225, 1.1514092683792114, 0.021203860640525818, 0.601582407951355, -2.3052923679351807, 2.2105653285980225, -0.16679930686950684, 0.6469120979309082, 0.013592795468866825, -0.1432574838399887, 1.1406275033950806, 0.5744354128837585, 0.5150738954544067, -1.1142619848251343, 0.7099640965461731, -0.4776179790496826, 1.0929681062698364, 0.9690735936164856, -0.835435152053833, 0.0540534108877182, 1.5578553676605225, 0.45392295718193054, -0.5069582462310791, -0.9760517477989197, -0.84346604347229, 0.9846070408821106, 1.6956785917282104, -0.12991365790367126, -0.046051815152168274, 0.7835280895233154, 0.6425489187240601, -1.1938433647155762, -0.00977570004761219, -0.6649799346923828, -0.6491092443466187, 1.700652837753296, 2.0507445335388184, -0.18334873020648956, -0.20075777173042297, -0.7476755976676941, -1.332078456878662, 0.73859041929245, -0.14342975616455078, -0.004802389070391655, 0.6640928983688354, -0.6031219363212585, 0.9590407013893127, 0.5522058606147766, 0.951428234577179, 0.0032172473147511482, 0.26100245118141174, 0.4356233775615692, -0.3273093104362488, -1.1840498447418213, -0.3808823227882385, -1.1431224346160889, -2.636582851409912, 0.3455077111721039, -0.28161659836769104, -1.444618582725525, 0.020152229815721512, -1.0033680200576782, 0.9739440679550171, -0.5392841696739197, -1.1201130151748657, -1.4512319564819336, 0.3568252623081207, -0.1404433697462082, 0.9712658524513245, -1.7537840604782104, -0.22877104580402374, 1.21366548538208, 0.8449028730392456, -0.6274521946907043, 0.9547305703163147, 0.23152072727680206, 0.9919742345809937, 0.6591379642486572, -0.4084921181201935, 0.7213513255119324, -0.05452059954404831, -1.3142921924591064, 0.45026281476020813, 1.2716692686080933, 0.13638979196548462, 1.380138874053955, -0.43801623582839966, 0.04277069866657257, 0.45938825607299805, -0.7088204622268677, -0.5403821468353271, -0.2711813449859619, 0.677359938621521, -0.00828460045158863, -1.012060284614563, -0.18784376978874207, -0.09274783730506897, -0.37622660398483276, 0.21243025362491608, -1.457724928855896, -0.2778584361076355, -0.4178744852542877, -0.399113267660141, -1.4168205261230469, 0.02472420036792755, 1.3561915159225464, -0.7421242594718933, -0.23915502429008484, 0.36081016063690186, 0.42528510093688965, 0.5270387530326843, 0.6227478981018066, -0.8245871663093567, -0.25316518545150757, -0.3636016547679901, -0.28064727783203125, 0.3079594373703003, 1.2537667751312256, -0.08308647572994232, -0.9477689266204834, 0.6272614598274231, -0.2897386848926544, 0.19125860929489136, 1.9901617765426636, 0.030629314482212067, -0.7268349528312683, 0.35517600178718567, -0.7404829263687134, 1.6957324743270874, 1.6737864017486572, 1.2171049118041992, -0.1356011927127838, -0.7537099123001099, 0.6021428108215332, -0.306240975856781, -0.27694159746170044, 0.8578671813011169, 0.34019407629966736, -0.2678857147693634, -1.4734992980957031, 0.7304112315177917, 1.2277451753616333, -0.7719840407371521, -0.7345095276832581, 0.13124564290046692, -0.88838130235672, 1.2291591167449951, 0.4748365879058838, 0.2821492850780487, 0.2880575656890869, 1.6078968048095703, 0.7951340675354004, -0.5146308541297913, 0.5224399566650391, 0.5236181020736694, -0.2704189717769623, -2.0841064453125, -1.0815593004226685, 0.27555611729621887, -0.5273911356925964, -1.5921114683151245, 1.3954187631607056, -1.025964379310608, -1.0298703908920288, 0.6270909309387207, 0.0944870188832283, 1.25448477268219, 0.3694072961807251, 1.6840054988861084, 2.1158745288848877, 0.8771697282791138, 0.4570603668689728, 1.2553671598434448, -0.14714200794696808, -0.5037109851837158, 1.8466933965682983, -0.4000551998615265, 0.4832116663455963, 1.056680679321289, -0.3670678436756134, -1.0861074924468994, -0.847656786441803, -1.1643799543380737, -0.5909916162490845, 1.17112135887146, 0.10599793493747711, -1.0291130542755127, 0.1859816461801529, 1.615821361541748, 0.17055489122867584, -0.17696116864681244, 0.7330176830291748, 0.3927324414253235, -0.7098051309585571, -0.07189752161502838, -0.8345046639442444, 0.48421382904052734, -0.20143400132656097, -0.2470906525850296, 0.22551104426383972, 0.5095866918563843, 1.3557645082473755, -0.10611891001462936, 0.1700134128332138, 1.0278773307800293, -1.4100154638290405, 1.5141643285751343, -0.5512308478355408, 0.332636296749115, -2.445958375930786, 1.378859043121338, -0.7964398860931396, 2.048027515411377, -2.5391008853912354, 0.43308019638061523, -0.5504517555236816, -0.5114266872406006, 0.21616142988204956, -0.4193326532840729, 0.08744384348392487, -0.06808455288410187, -0.9971380829811096, 0.01483162771910429, -0.6744690537452698, 0.6119876503944397, 1.1467268466949463, 1.4497442245483398, -1.140633225440979, -0.2637268900871277, -1.6550824642181396, -0.2043452262878418, -0.8307868838310242, 0.3212283253669739, -1.9925520420074463, -0.2049552947282791, -1.9781771898269653, -2.260131597518921, -1.277100682258606, -0.8683270812034607, 1.1054879426956177, 0.13834790885448456, -0.9475012421607971, 1.2708078622817993, -0.2624189257621765, -1.8603720664978027, 1.1756017208099365, -2.2312777042388916 ]
https://github.com/huggingface/datasets/issues/4575
Problem about wmt17 zh-en dataset
I just pushed a fix, we'll do a new release of `datasets` soon to include this fix. In the meantime you can use the fixed dataset by passing `revision="main"` to `load_dataset`
It seems that in subset casia2015, some samples are like `{'c[hn]':'xxx', 'en': 'aa'}`. So when using `data = load_dataset('wmt17', "zh-en")` to load the wmt17 zh-en dataset, which will raise the exception: ``` Traceback (most recent call last): File "train.py", line 78, in <module> data = load_dataset(args.dataset, "zh-en") File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 1684, in load_dataset use_auth_token=use_auth_token, File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 705, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 1221, in _download_and_prepare super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos) File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 793, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 1215, in _prepare_split num_examples, num_bytes = writer.finalize() File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 533, in finalize self.write_examples_on_file() File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 410, in write_examples_on_file self.write_batch(batch_examples=batch_examples) File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 503, in write_batch arrays.append(pa.array(typed_sequence)) File "pyarrow/array.pxi", line 230, in pyarrow.lib.array File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 198, in __arrow_array__ out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1675, in wrapper return func(array, *args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1846, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1675, in wrapper return func(array, *args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1756, in array_cast raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{pa_type}") TypeError: Couldn't cast array of type struct<c[hn]: string, en: string, zh: string> to struct<en: string, zh: string> ``` So the solution of this problem is to change the original array manually: ``` if 'c[hn]' in str(array.type): py_array = array.to_pylist() data_list = [] for vo in py_array: tmp = { 'en': vo['en'], } if 'zh' not in vo: tmp['zh'] = vo['c[hn]'] else: tmp['zh'] = vo['zh'] data_list.append(tmp) array = pa.array(data_list, type=pa.struct([ pa.field('en', pa.string()), pa.field('zh', pa.string()), ])) ``` Therefore, maybe a correct version of original casia2015 file need to be updated
680
31
Problem about wmt17 zh-en dataset It seems that in subset casia2015, some samples are like `{'c[hn]':'xxx', 'en': 'aa'}`. So when using `data = load_dataset('wmt17', "zh-en")` to load the wmt17 zh-en dataset, which will raise the exception: ``` Traceback (most recent call last): File "train.py", line 78, in <module> data = load_dataset(args.dataset, "zh-en") File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 1684, in load_dataset use_auth_token=use_auth_token, File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 705, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 1221, in _download_and_prepare super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos) File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 793, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/builder.py", line 1215, in _prepare_split num_examples, num_bytes = writer.finalize() File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 533, in finalize self.write_examples_on_file() File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 410, in write_examples_on_file self.write_batch(batch_examples=batch_examples) File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 503, in write_batch arrays.append(pa.array(typed_sequence)) File "pyarrow/array.pxi", line 230, in pyarrow.lib.array File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py", line 198, in __arrow_array__ out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1675, in wrapper return func(array, *args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1846, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1675, in wrapper return func(array, *args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/datasets/table.py", line 1756, in array_cast raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{pa_type}") TypeError: Couldn't cast array of type struct<c[hn]: string, en: string, zh: string> to struct<en: string, zh: string> ``` So the solution of this problem is to change the original array manually: ``` if 'c[hn]' in str(array.type): py_array = array.to_pylist() data_list = [] for vo in py_array: tmp = { 'en': vo['en'], } if 'zh' not in vo: tmp['zh'] = vo['c[hn]'] else: tmp['zh'] = vo['zh'] data_list.append(tmp) array = pa.array(data_list, type=pa.struct([ pa.field('en', pa.string()), pa.field('zh', pa.string()), ])) ``` Therefore, maybe a correct version of original casia2015 file need to be updated I just pushed a fix, we'll do a new release of `datasets` soon to include this fix. In the meantime you can use the fixed dataset by passing `revision="main"` to `load_dataset`
[ -1.2363417148590088, -0.9432647228240967, -0.6092330813407898, 1.503603458404541, -0.15438736975193024, -1.2010492086410522, 0.09360925108194351, -1.0192445516586304, 1.5152342319488525, -0.7283371686935425, 0.2194286286830902, -1.5868315696716309, -0.10805092006921768, -0.4903579354286194, -0.7310218811035156, -0.8925963044166565, -0.34962478280067444, -0.8764292001724243, 1.1420944929122925, 2.4303152561187744, 1.2967332601547241, -1.3660120964050293, 2.7429616451263428, 0.67769855260849, -0.2872936427593231, -1.051123023033142, 0.559363842010498, 0.03063911944627762, -1.1042404174804688, -0.4528363049030304, -0.9919502139091492, -0.07028687000274658, -0.5589746236801147, -0.25610455870628357, 0.0540245845913887, 0.4737675189971924, -0.2932954728603363, -0.2328893393278122, -0.6599498391151428, -0.6990514993667603, 0.48525044322013855, -0.32423558831214905, 0.9325090050697327, -0.27232444286346436, 1.7648049592971802, -0.6134210824966431, 0.42238786816596985, 0.7138518691062927, 1.2429423332214355, 0.1821947991847992, 0.11479827016592026, 0.20996397733688354, 0.3283059298992157, 0.006215221248567104, 0.6603561043739319, 1.2089402675628662, 0.5698800683021545, 0.48567432165145874, 0.6505070328712463, -2.2549378871917725, 1.3014726638793945, -0.9824269413948059, 0.29145941138267517, 1.3433858156204224, -0.7908472418785095, 0.3670215606689453, -1.7380174398422241, -0.0232822485268116, 0.6409074068069458, -2.257256269454956, 0.3293209373950958, -1.3028000593185425, -0.5089272856712341, 0.871850311756134, 0.38642269372940063, -1.2143919467926025, 0.22470152378082275, -0.521321713924408, 1.1365299224853516, 0.4261159300804138, 0.9856951236724854, -1.6320644617080688, -0.012132035568356514, -0.11028338223695755, 0.07833842188119888, -1.2973839044570923, -1.6380484104156494, 0.5555004477500916, 0.5639263987541199, 0.734915018081665, -0.1130099669098854, 1.0798776149749756, -1.1962218284606934, 0.8248516917228699, -1.0490535497665405, -1.5654352903366089, -1.3782789707183838, -2.4594523906707764, -2.3190174102783203, 0.8276914954185486, -0.6034563779830933, -0.4960207939147949, 2.0913312435150146, -0.9256725311279297, -1.7111340761184692, 1.1368637084960938, 0.30307912826538086, 0.10440199077129364, 2.4285736083984375, 0.18033367395401, -0.7334181666374207, 0.47837698459625244, -0.8004974126815796, 0.7987267374992371, -0.3139932155609131, 1.3079800605773926, 0.5329536199569702, -1.0086119174957275, 1.585371971130371, -0.39572080969810486, 0.5938944816589355, -0.5336071848869324, -0.5709126591682434, -0.7768789529800415, 0.25804638862609863, 1.853137493133545, -0.27006760239601135, 1.5707125663757324, -0.25695037841796875, -1.4703903198242188, -1.597564935684204, 0.928649365901947, 0.4539235532283783, -0.9089316725730896, 0.026568211615085602, -0.5120911002159119, 0.24081836640834808, -0.07666388899087906, 1.1788135766983032, 1.233325481414795, 0.7453387379646301, -0.3873143792152405, -0.7550697326660156, 0.16645459830760956, -0.2135637253522873, -0.6554955840110779, -1.843319296836853, -0.2867233455181122, 0.20965038239955902, 0.6360129117965698, -1.1782132387161255, 1.7983731031417847, 0.8752841949462891, 1.9825825691223145, 0.8832924962043762, -0.3673624098300934, 1.4558799266815186, -0.07980430871248245, 1.8072524070739746, -0.5113967657089233, 0.5695038437843323, -0.42675772309303284, -1.1722230911254883, 0.9256341457366943, -0.36959314346313477, -1.9400420188903809, -0.8709524273872375, -0.7507109642028809, -0.19371414184570312, -0.7620698809623718, 0.8276574611663818, -0.33861756324768066, -1.5212562084197998, 0.04420991241931915, -0.6723752021789551, 0.22008304297924042, -1.2235777378082275, 0.25940945744514465, 0.7126619815826416, -0.6916654109954834, -0.12398813664913177, -0.24240534007549286, -1.2354223728179932, -0.5607743263244629, 0.39257174730300903, 1.9620893001556396, -0.5544829368591309, 0.9020748734474182, 1.0069910287857056, -0.7733336091041565, 0.09084965288639069, 0.13566835224628448, -0.2875647246837616, 0.7426000833511353, -1.0272750854492188, -0.5554516315460205, 1.2192096710205078, -0.33434009552001953, -0.7512385845184326, 1.4332925081253052, 0.8072232604026794, -1.1038217544555664, -0.33138787746429443, -0.24671702086925507, -0.8237857818603516, 0.019237730652093887, -1.4736641645431519, -0.18050746619701385, 0.4720059335231781, -1.5282108783721924, -0.2911493480205536, -0.1640074998140335, 1.3799927234649658, -0.24536843597888947, 1.5074936151504517, -0.27124711871147156, -0.17182284593582153, -0.19214262068271637, -0.5673242211341858, 0.2791655659675598, -0.16485083103179932, -0.5565931797027588, 0.09309565275907516, -0.8142817616462708, 0.3271300494670868, 1.4783353805541992, 0.31907474994659424, 0.0970846489071846, 0.42512625455856323, 1.047503113746643, 0.42316368222236633, 0.004808914847671986, -0.928231954574585, -1.4733006954193115, 1.9033489227294922, -1.4141511917114258, 1.9965349435806274, 0.7518318295478821, -0.10934121161699295, -1.7853678464889526, -1.8750243186950684, 1.184144139289856, 1.1296827793121338, 2.2887630462646484, 0.4660862684249878, 0.44085928797721863, -0.8198981285095215, -0.7972664833068848, 0.2848759889602661, -0.9708119630813599, -0.567657470703125, 0.1477745771408081, 2.374009847640991, 1.8582149744033813, -0.5299528241157532, -0.23849047720432281, -0.886480450630188, 1.3334603309631348, -0.29476720094680786, 0.32636043429374695, 2.0840041637420654, -0.35603681206703186, -0.9881267547607422, 1.3499025106430054, -2.489368200302124, 0.2791888415813446, 2.1020565032958984, 0.2915586829185486, 0.19440025091171265, -1.4294854402542114, -0.582365095615387, -0.3207147717475891, -0.4516317844390869, -1.2283408641815186, 0.637994647026062, -0.2628414034843445, -0.8234825134277344, -1.3836965560913086, 0.06314751505851746, -1.1737303733825684, -1.8016841411590576, 0.3570922017097473, 2.0030927658081055, 2.1304545402526855, -0.7996895909309387, 1.420318603515625, -0.268729567527771, 0.021920446306467056, 1.3148109912872314, 1.3861671686172485, 3.0199244022369385, 1.844562292098999, -1.2544595003128052, 0.6299182176589966, -0.2561119794845581, -0.5008350610733032, 1.1443284749984741, -1.173237919807434, 1.128335952758789, -0.16007257997989655, -1.1796537637710571, -1.3053784370422363, 1.1128497123718262, 0.4601355493068695, -0.02608317881822586, -0.5293701887130737, 1.2615970373153687, 0.15295875072479248, 1.3860770463943481, 0.6683538556098938, -0.47225886583328247, 0.5012927055358887, -0.40749818086624146, -0.592750608921051, 1.695000171661377, 0.12051291018724442, -1.536711573600769, -2.373347759246826, -0.2792625427246094, -0.966440737247467, 0.03158349171280861, -0.6013656258583069, -1.0981972217559814, 1.5439422130584717, 0.3336217701435089, -1.2436226606369019, -0.2746789753437042, -0.2909986972808838, -0.4885960519313812, 2.7063403129577637, -1.2253700494766235, -0.10184378921985626, -0.9387275576591492, -0.61238032579422, 1.61854088306427, -1.215273141860962, -0.23409348726272583, -1.0332573652267456, -0.6383916139602661, -1.3024446964263916, -0.37106290459632874, 0.07626043260097504, -1.063815712928772, 0.8168565034866333, 0.1862110197544098, -1.1072238683700562, -0.37849050760269165, -0.7961971759796143, 1.0877765417099, -0.08509352058172226, 0.19337373971939087, 1.8272899389266968, 0.22662916779518127, -0.38388118147850037, 0.7960435748100281, 1.1786435842514038, 0.6527705192565918, -0.6518649458885193, -0.02400110475718975, -0.6706898212432861, 0.44250041246414185, -1.367045521736145, 0.17604494094848633, -2.980203151702881, 0.7178707122802734, -0.2656829357147217, -0.15234050154685974, -0.13233943283557892, -1.3556259870529175, 1.046079397201538, 2.5927679538726807, -1.1782804727554321, 0.5235066413879395, 0.42109379172325134, 1.1580668687820435, -1.6045942306518555, 0.2784925401210785, -0.4933933913707733, 2.0682480335235596, 0.12419050186872482, 1.2417904138565063, -0.515850305557251, -2.2546002864837646, 0.649511992931366, -1.2758971452713013, -1.024371862411499, 0.7999958992004395, -0.9042348265647888, 0.4335843324661255, -1.4413855075836182, -0.1731889843940735, -0.9676264524459839, -1.2322335243225098, 0.6090742349624634, 0.12689609825611115, 0.34553927183151245, -0.5344370603561401, 0.4220859110355377, -2.200723648071289, -1.4615298509597778, -0.15741023421287537, -0.9731912612915039, 0.606766939163208, -0.4730006158351898, 0.5857939720153809, -0.07674349099397659, 0.1275959312915802, 0.2090080976486206, 1.5785655975341797, 3.3953311443328857, 0.09083136916160583, 0.15081357955932617, -0.13447082042694092, -1.01552152633667, 1.4868278503417969, 0.8476117253303528, -0.11200079321861267, -0.6074094772338867, -1.0585007667541504, 1.3185151815414429, 2.0051944255828857, 1.1118550300598145, 0.06868918240070343, -0.7892683148384094, -0.6752443909645081, -0.029447954148054123, 0.16688179969787598, 0.5414718985557556, 0.9338996410369873, -0.0658135637640953, 0.08315856009721756, 1.3256372213363647, 1.2174798250198364, -0.2970183789730072, 0.2866520285606384, -0.9547932147979736, -0.45057064294815063, 0.4288102984428406, 0.12594471871852875, -0.06069573014974594, 0.5288694500923157, -1.0149232149124146, -0.26934903860092163, -0.29866430163383484, -0.7699498534202576, -0.7243605852127075, -0.35137125849723816, -0.4926271140575409, 1.5403144359588623, 0.14475053548812866, -0.5381038188934326, 0.07805877178907394, -0.6447199583053589, -0.13485269248485565, -1.1440335512161255, 0.11762098222970963, -0.0927005261182785, -0.09501270949840546, -0.2661730647087097, 1.6592320203781128, -0.8847950100898743, -2.0154478549957275, 0.12580877542495728, 0.33326202630996704, -0.2382783591747284, 0.19094939529895782, 1.7780053615570068, 0.4206105172634125, 1.432690978050232, 1.269860029220581, 0.9449946284294128, -0.5975500345230103, -1.2924280166625977, 0.774499237537384, 0.9788095951080322, -1.3343356847763062, 0.9337153434753418, -0.20811845362186432, -0.4932436943054199, 0.6317214369773865, 1.3526017665863037, 0.45060041546821594, -1.992231845855713, 0.9867646098136902, -1.0739719867706299, 0.8380047082901001, 0.7200814485549927, 0.7406607866287231, 0.28428882360458374, 0.8681342005729675, -1.182435393333435, -1.1731388568878174, -0.6848288774490356, -0.6900654435157776, 1.9540218114852905, -0.30544719099998474, 0.6126670837402344, -0.13916346430778503, -1.1446025371551514, -0.15082015097141266, 0.7872157096862793, 0.4482300281524658, -0.34854912757873535, 0.8982301950454712, -0.6014662981033325, -0.9502348899841309, -1.2568310499191284, -0.3916499614715576, -1.0864996910095215, -0.8751828670501709, 1.0526584386825562, 0.7464443445205688, 0.4996245205402374, 1.878051996231079, 0.5776361227035522, 0.4309493899345398, -2.525087356567383, 0.8560823798179626, 0.3056168854236603, -0.12702205777168274, 0.793914794921875, 0.25988709926605225, 1.1514092683792114, 0.021203860640525818, 0.601582407951355, -2.3052923679351807, 2.2105653285980225, -0.16679930686950684, 0.6469120979309082, 0.013592795468866825, -0.1432574838399887, 1.1406275033950806, 0.5744354128837585, 0.5150738954544067, -1.1142619848251343, 0.7099640965461731, -0.4776179790496826, 1.0929681062698364, 0.9690735936164856, -0.835435152053833, 0.0540534108877182, 1.5578553676605225, 0.45392295718193054, -0.5069582462310791, -0.9760517477989197, -0.84346604347229, 0.9846070408821106, 1.6956785917282104, -0.12991365790367126, -0.046051815152168274, 0.7835280895233154, 0.6425489187240601, -1.1938433647155762, -0.00977570004761219, -0.6649799346923828, -0.6491092443466187, 1.700652837753296, 2.0507445335388184, -0.18334873020648956, -0.20075777173042297, -0.7476755976676941, -1.332078456878662, 0.73859041929245, -0.14342975616455078, -0.004802389070391655, 0.6640928983688354, -0.6031219363212585, 0.9590407013893127, 0.5522058606147766, 0.951428234577179, 0.0032172473147511482, 0.26100245118141174, 0.4356233775615692, -0.3273093104362488, -1.1840498447418213, -0.3808823227882385, -1.1431224346160889, -2.636582851409912, 0.3455077111721039, -0.28161659836769104, -1.444618582725525, 0.020152229815721512, -1.0033680200576782, 0.9739440679550171, -0.5392841696739197, -1.1201130151748657, -1.4512319564819336, 0.3568252623081207, -0.1404433697462082, 0.9712658524513245, -1.7537840604782104, -0.22877104580402374, 1.21366548538208, 0.8449028730392456, -0.6274521946907043, 0.9547305703163147, 0.23152072727680206, 0.9919742345809937, 0.6591379642486572, -0.4084921181201935, 0.7213513255119324, -0.05452059954404831, -1.3142921924591064, 0.45026281476020813, 1.2716692686080933, 0.13638979196548462, 1.380138874053955, -0.43801623582839966, 0.04277069866657257, 0.45938825607299805, -0.7088204622268677, -0.5403821468353271, -0.2711813449859619, 0.677359938621521, -0.00828460045158863, -1.012060284614563, -0.18784376978874207, -0.09274783730506897, -0.37622660398483276, 0.21243025362491608, -1.457724928855896, -0.2778584361076355, -0.4178744852542877, -0.399113267660141, -1.4168205261230469, 0.02472420036792755, 1.3561915159225464, -0.7421242594718933, -0.23915502429008484, 0.36081016063690186, 0.42528510093688965, 0.5270387530326843, 0.6227478981018066, -0.8245871663093567, -0.25316518545150757, -0.3636016547679901, -0.28064727783203125, 0.3079594373703003, 1.2537667751312256, -0.08308647572994232, -0.9477689266204834, 0.6272614598274231, -0.2897386848926544, 0.19125860929489136, 1.9901617765426636, 0.030629314482212067, -0.7268349528312683, 0.35517600178718567, -0.7404829263687134, 1.6957324743270874, 1.6737864017486572, 1.2171049118041992, -0.1356011927127838, -0.7537099123001099, 0.6021428108215332, -0.306240975856781, -0.27694159746170044, 0.8578671813011169, 0.34019407629966736, -0.2678857147693634, -1.4734992980957031, 0.7304112315177917, 1.2277451753616333, -0.7719840407371521, -0.7345095276832581, 0.13124564290046692, -0.88838130235672, 1.2291591167449951, 0.4748365879058838, 0.2821492850780487, 0.2880575656890869, 1.6078968048095703, 0.7951340675354004, -0.5146308541297913, 0.5224399566650391, 0.5236181020736694, -0.2704189717769623, -2.0841064453125, -1.0815593004226685, 0.27555611729621887, -0.5273911356925964, -1.5921114683151245, 1.3954187631607056, -1.025964379310608, -1.0298703908920288, 0.6270909309387207, 0.0944870188832283, 1.25448477268219, 0.3694072961807251, 1.6840054988861084, 2.1158745288848877, 0.8771697282791138, 0.4570603668689728, 1.2553671598434448, -0.14714200794696808, -0.5037109851837158, 1.8466933965682983, -0.4000551998615265, 0.4832116663455963, 1.056680679321289, -0.3670678436756134, -1.0861074924468994, -0.847656786441803, -1.1643799543380737, -0.5909916162490845, 1.17112135887146, 0.10599793493747711, -1.0291130542755127, 0.1859816461801529, 1.615821361541748, 0.17055489122867584, -0.17696116864681244, 0.7330176830291748, 0.3927324414253235, -0.7098051309585571, -0.07189752161502838, -0.8345046639442444, 0.48421382904052734, -0.20143400132656097, -0.2470906525850296, 0.22551104426383972, 0.5095866918563843, 1.3557645082473755, -0.10611891001462936, 0.1700134128332138, 1.0278773307800293, -1.4100154638290405, 1.5141643285751343, -0.5512308478355408, 0.332636296749115, -2.445958375930786, 1.378859043121338, -0.7964398860931396, 2.048027515411377, -2.5391008853912354, 0.43308019638061523, -0.5504517555236816, -0.5114266872406006, 0.21616142988204956, -0.4193326532840729, 0.08744384348392487, -0.06808455288410187, -0.9971380829811096, 0.01483162771910429, -0.6744690537452698, 0.6119876503944397, 1.1467268466949463, 1.4497442245483398, -1.140633225440979, -0.2637268900871277, -1.6550824642181396, -0.2043452262878418, -0.8307868838310242, 0.3212283253669739, -1.9925520420074463, -0.2049552947282791, -1.9781771898269653, -2.260131597518921, -1.277100682258606, -0.8683270812034607, 1.1054879426956177, 0.13834790885448456, -0.9475012421607971, 1.2708078622817993, -0.2624189257621765, -1.8603720664978027, 1.1756017208099365, -2.2312777042388916 ]
https://github.com/huggingface/datasets/issues/4572
Dataset Viewer issue for mlsum
Thanks for reporting, @lewtun. After investigation, it seems that the server https://gitlab.lip6.fr does not allow HTTP Range requests. We are trying to find a workaround...
### Link https://huggingface.co/datasets/mlsum/viewer/de/train ### Description There's seems to be a problem with the download / streaming of this dataset: ``` Server error Status code: 400 Exception: BadZipFile Message: File is not a zip file ``` ### Owner No
681
25
Dataset Viewer issue for mlsum ### Link https://huggingface.co/datasets/mlsum/viewer/de/train ### Description There's seems to be a problem with the download / streaming of this dataset: ``` Server error Status code: 400 Exception: BadZipFile Message: File is not a zip file ``` ### Owner No Thanks for reporting, @lewtun. After investigation, it seems that the server https://gitlab.lip6.fr does not allow HTTP Range requests. We are trying to find a workaround...
[ -1.114675760269165, -0.8635764122009277, -0.8974065184593201, 1.4824775457382202, -0.2447052150964737, -1.3465007543563843, 0.2531489133834839, -1.0225974321365356, 1.6469782590866089, -0.6110632419586182, 0.2863573729991913, -1.7408803701400757, -0.117007315158844, -0.5011574029922485, -0.678691029548645, -0.8906813263893127, -0.4704688489437103, -0.7894835472106934, 0.9869083762168884, 2.5853171348571777, 1.2549173831939697, -1.239159107208252, 2.6540720462799072, 0.6964569687843323, -0.2405075877904892, -1.0165131092071533, 0.5572726726531982, 0.05284576863050461, -1.3031052350997925, -0.4920286238193512, -1.0348501205444336, -0.11091303080320358, -0.40291768312454224, -0.5551388263702393, -0.03337258845567703, 0.5720623135566711, -0.1432138979434967, -0.4561276137828827, -0.5192434191703796, -0.7460890412330627, 0.46201497316360474, -0.4797479510307312, 0.8820725679397583, -0.41612401604652405, 1.8674819469451904, -0.5686861276626587, 0.41865313053131104, 0.6265414953231812, 1.4280695915222168, 0.05712508410215378, -0.043986231088638306, 0.2090590000152588, 0.49102526903152466, -0.06747490167617798, 0.4455249309539795, 1.1426724195480347, 0.5013444423675537, 0.6258652210235596, 0.5836531519889832, -2.181091547012329, 1.2628947496414185, -0.9382029175758362, 0.3070928454399109, 1.4841866493225098, -1.1467684507369995, 0.3165453374385834, -1.751199722290039, -0.010470151901245117, 0.5069124102592468, -2.10784649848938, 0.3407214283943176, -1.1960331201553345, -0.6091710329055786, 0.8950622081756592, 0.44078344106674194, -1.3382550477981567, 0.0944361537694931, -0.42325782775878906, 1.0024492740631104, 0.4475735127925873, 1.1629664897918701, -1.6699106693267822, 0.07058088481426239, -0.3258225917816162, -0.07655918598175049, -1.3075717687606812, -1.4134140014648438, 0.5577329993247986, 0.7597478032112122, 0.7577749490737915, -0.09718296676874161, 0.7623900175094604, -0.9102315306663513, 0.8120557069778442, -0.8371219038963318, -1.7688791751861572, -1.3963353633880615, -2.329458236694336, -2.3180699348449707, 0.8786872625350952, -0.4201107323169708, -0.5336777567863464, 1.9269315004348755, -0.8593607544898987, -1.8377844095230103, 1.1666206121444702, 0.2626171410083771, -0.055217236280441284, 2.366678476333618, 0.37185096740722656, -0.6252413988113403, 0.41988861560821533, -0.8679357767105103, 0.7928745150566101, -0.623649537563324, 1.4846599102020264, 0.4376867413520813, -0.9543788433074951, 1.7231138944625854, -0.5714625120162964, 0.6773837208747864, -0.7619612216949463, -0.46291103959083557, -0.7368629574775696, 0.3650003671646118, 1.9292337894439697, -0.37005138397216797, 1.5366946458816528, -0.3882695138454437, -1.5927568674087524, -1.5226339101791382, 0.8704603314399719, 0.3406529724597931, -0.7834740877151489, 0.28358641266822815, -0.354854941368103, 0.031641654670238495, -0.10597892105579376, 0.9687840342521667, 1.236506700515747, 0.6933174729347229, -0.2730461061000824, -0.8384202122688293, 0.3930613696575165, -0.023510891944169998, -0.7532241940498352, -1.651924967765808, -0.3910817801952362, 0.04043599218130112, 0.5479652285575867, -1.1783969402313232, 1.7537868022918701, 0.7912219166755676, 2.032458782196045, 0.9122053384780884, -0.4678892195224762, 1.3910456895828247, 0.011110777035355568, 1.9179024696350098, -0.5187356472015381, 0.6814154386520386, -0.3145998418331146, -1.2346725463867188, 0.80623859167099, -0.36573976278305054, -1.958765983581543, -0.7984854578971863, -0.957467257976532, -0.17292022705078125, -0.7521254420280457, 1.0325881242752075, -0.2499830573797226, -1.3837612867355347, 0.1505245566368103, -0.7520884275436401, 0.17441171407699585, -1.362897515296936, 0.2282712310552597, 0.8243496417999268, -0.5902226567268372, 0.13889102637767792, -0.24811199307441711, -1.360778570175171, -0.3962981104850769, 0.35967788100242615, 1.9388166666030884, -0.7325053811073303, 0.91136634349823, 0.9023260474205017, -0.7595340609550476, 0.07697770744562149, 0.38703396916389465, -0.33479416370391846, 0.806691586971283, -1.111244559288025, -0.4180552363395691, 1.2483818531036377, -0.18280324339866638, -0.695492148399353, 1.5095460414886475, 0.776139497756958, -0.9661714434623718, -0.1129864752292633, -0.29785922169685364, -0.8477969169616699, 0.024367863312363625, -1.7360730171203613, -0.02067200466990471, 0.24151186645030975, -1.3550782203674316, -0.5961710810661316, -0.22292491793632507, 1.2499055862426758, -0.06802954524755478, 1.376703143119812, -0.17497524619102478, -0.2110171765089035, -0.444744348526001, -0.3288957178592682, 0.1739313155412674, -0.45179441571235657, -0.5294447541236877, 0.2585194408893585, -0.7840124368667603, 0.33007222414016724, 1.4959112405776978, 0.2218146175146103, 0.18620836734771729, 0.6025459170341492, 1.0115667581558228, 0.3280978798866272, -0.18479155004024506, -0.8996953368186951, -1.420339822769165, 1.9779763221740723, -1.3440910577774048, 1.8491456508636475, 0.7037163972854614, -0.03372543305158615, -1.8503304719924927, -1.9454048871994019, 1.3139253854751587, 1.3415991067886353, 2.326528787612915, 0.6932435035705566, 0.40919002890586853, -0.8106203675270081, -0.6991056799888611, 0.1659267544746399, -1.0687323808670044, -0.8188695907592773, 0.19285045564174652, 2.3768842220306396, 1.7383984327316284, -0.5862327814102173, -0.18956805765628815, -1.2130239009857178, 1.2154499292373657, -0.19312909245491028, 0.1951880156993866, 1.9638142585754395, -0.3570638597011566, -0.92992103099823, 1.1188123226165771, -2.339817523956299, 0.15831522643566132, 1.966493010520935, 0.23078137636184692, 0.19944581389427185, -1.5021239519119263, -0.7074171900749207, -0.17203395068645477, -0.2710150480270386, -1.129729151725769, 0.6628120541572571, -0.22912076115608215, -0.8765341639518738, -1.446638584136963, 0.12373113632202148, -0.9676203727722168, -1.6276799440383911, 0.21846789121627808, 1.8852579593658447, 1.8640525341033936, -0.8836221694946289, 1.487492322921753, -0.1622195541858673, -0.020156141370534897, 1.3719685077667236, 1.170379877090454, 3.029773235321045, 2.0862762928009033, -1.2359548807144165, 0.8751964569091797, -0.05951062589883804, -0.4215366244316101, 1.2611334323883057, -1.1640489101409912, 1.2196521759033203, -0.31607523560523987, -1.1820316314697266, -1.2484550476074219, 0.889134407043457, 0.6088903546333313, 0.00864771381020546, -0.5209560394287109, 1.3043800592422485, 0.07929320633411407, 1.3439600467681885, 0.5876779556274414, -0.4263412058353424, 0.617684006690979, -0.2998451590538025, -0.29583612084388733, 1.5223197937011719, 0.38080084323883057, -1.3847416639328003, -2.3641366958618164, -0.15676091611385345, -0.9699408411979675, -0.1915174424648285, -0.60623699426651, -1.1057157516479492, 1.6210144758224487, 0.608851969242096, -1.151286005973816, -0.32694992423057556, -0.2780705392360687, -0.6185780763626099, 2.796158790588379, -1.467060923576355, -0.25256991386413574, -1.0338575839996338, -0.3862801492214203, 1.8281950950622559, -1.1694787740707397, -0.20295360684394836, -1.2137986421585083, -0.6128503084182739, -1.3074429035186768, -0.6124886870384216, -0.010087655857205391, -0.8527728319168091, 0.7727461457252502, 0.0603429451584816, -1.2256531715393066, -0.24752187728881836, -0.7889468669891357, 0.901392936706543, -0.048641011118888855, 0.2844124436378479, 1.9803811311721802, 0.4694732129573822, -0.4319089353084564, 0.7411658763885498, 1.179736852645874, 0.5085139870643616, -0.6884323954582214, 0.30439552664756775, -0.6586462259292603, 0.3377825617790222, -1.4631149768829346, 0.19964787364006042, -2.864926815032959, 0.6127811670303345, -0.07295329123735428, -0.06510243564844131, -0.03377596288919449, -1.3686717748641968, 1.2133971452713013, 2.4873032569885254, -1.2338229417800903, 0.5614181160926819, 0.30247762799263, 1.2391670942306519, -1.4407235383987427, 0.30080026388168335, -0.4490809142589569, 2.1159965991973877, 0.09599574655294418, 1.1230113506317139, -0.46214306354522705, -2.0769362449645996, 0.5792973637580872, -1.3212045431137085, -1.0646023750305176, 0.7692735195159912, -0.7945501208305359, -0.061871111392974854, -1.3806804418563843, -0.04743596166372299, -0.826433002948761, -1.3992915153503418, 0.7686716318130493, 0.09101984649896622, 0.4392120838165283, -0.6593942642211914, 0.48413920402526855, -2.0886800289154053, -1.3905390501022339, -0.3166881501674652, -0.8643393516540527, 0.34529897570610046, -0.2963681221008301, 0.7113108038902283, -0.24924492835998535, 0.04684445261955261, 0.3686281442642212, 1.331824779510498, 3.443903684616089, 0.15643669664859772, 0.315499871969223, -0.07756524533033371, -0.9645398259162903, 1.4355956315994263, 1.0046898126602173, -0.10832410305738449, -0.5835548639297485, -0.8825461864471436, 1.266358733177185, 1.9908978939056396, 1.138683557510376, 0.14704389870166779, -0.9054137468338013, -0.7067966461181641, -0.08045436441898346, 0.06182052195072174, 0.4224125146865845, 0.8737717270851135, 0.03255177289247513, 0.05960124731063843, 1.2930107116699219, 1.1178975105285645, -0.378005713224411, 0.4760965406894684, -0.9056865572929382, -0.39290332794189453, 0.48650169372558594, 0.4049154222011566, 0.0827048048377037, 0.34528452157974243, -1.0336390733718872, -0.3028998374938965, -0.20737330615520477, -0.9445335865020752, -0.8033167719841003, -0.41127118468284607, -0.2973325252532959, 1.653276801109314, 0.1328750103712082, -0.5805355906486511, -0.05468086153268814, -0.83870929479599, 0.04694073647260666, -1.0723342895507812, 0.23449154198169708, -0.13369442522525787, 0.0067804791033267975, -0.017584485933184624, 1.855907678604126, -1.0481141805648804, -2.2505035400390625, 0.2752320468425751, 0.40836501121520996, -0.4466709494590759, 0.13948090374469757, 1.5266112089157104, 0.5389278531074524, 1.4114691019058228, 1.3169846534729004, 1.1078124046325684, -0.7140898108482361, -1.3774627447128296, 0.6616663932800293, 0.9709739685058594, -1.4623202085494995, 0.8352783918380737, 0.040303103625774384, -0.3642188012599945, 0.5561657547950745, 1.3041348457336426, 0.3813825249671936, -1.9842724800109863, 0.6727135181427002, -0.8248087763786316, 0.915797770023346, 0.781903862953186, 0.8832864761352539, 0.3671809136867523, 0.7396023273468018, -1.290268063545227, -1.2134488821029663, -0.7661435604095459, -0.6089375019073486, 1.9407469034194946, -0.2060580551624298, 0.6417176127433777, -0.16171157360076904, -1.3451828956604004, -0.083147332072258, 0.720477283000946, 0.3484232425689697, -0.5188271999359131, 0.8029080033302307, -0.5446027517318726, -1.0885815620422363, -1.247407078742981, -0.638008713722229, -0.9788424968719482, -0.9864169955253601, 1.0145747661590576, 0.8836138248443604, 0.4315086305141449, 1.877134919166565, 0.5502942204475403, 0.2273816168308258, -2.6070382595062256, 0.9770659804344177, 0.3954356908798218, 0.13102783262729645, 0.7500354647636414, 0.3319733440876007, 1.0745971202850342, -0.1511252373456955, 0.5123139023780823, -2.3177952766418457, 2.3346219062805176, -0.20150242745876312, 0.5166223645210266, 0.07402383536100388, -0.10285180807113647, 1.1111897230148315, 0.5060330629348755, 0.5404875874519348, -1.0290310382843018, 0.6946096420288086, -0.5894025564193726, 1.2668508291244507, 0.8921315670013428, -0.8172663450241089, 0.06394839286804199, 1.3775876760482788, 0.5102707147598267, -0.4195173382759094, -0.9571471810340881, -0.7940078973770142, 1.019296646118164, 1.6520785093307495, 0.0605173259973526, 0.05520346760749817, 0.9652999639511108, 0.39183375239372253, -1.2575488090515137, 0.002816426567733288, -0.7552730441093445, -0.5754660367965698, 1.7445249557495117, 2.0558457374572754, -0.040127966552972794, -0.17704106867313385, -0.8605104684829712, -1.246102213859558, 0.724109411239624, 0.0015629101544618607, 0.11140663921833038, 0.742009699344635, -0.5562561750411987, 1.0394163131713867, 0.6038220524787903, 0.9561607241630554, 0.01515311561524868, 0.3389334976673126, 0.3236141502857208, -0.2811124622821808, -1.211606740951538, -0.2484338879585266, -1.243370532989502, -2.547645092010498, 0.4746602773666382, -0.2880401015281677, -1.4580775499343872, 0.08446860313415527, -1.1449297666549683, 0.9830683469772339, -0.6332977414131165, -1.0445098876953125, -1.4567582607269287, 0.19767382740974426, -0.17387640476226807, 0.8324739933013916, -1.5819889307022095, -0.042028628289699554, 1.2295929193496704, 0.8787727952003479, -0.8306487798690796, 1.1094173192977905, 0.19803671538829803, 1.1960594654083252, 0.8744600415229797, -0.1995607167482376, 0.4114440977573395, -0.020930496975779533, -1.3815959692001343, 0.534164309501648, 1.2084009647369385, 0.07651004940271378, 1.4404147863388062, -0.6172676682472229, 0.05600373446941376, 0.493202805519104, -0.4834249019622803, -0.536253809928894, -0.41266894340515137, 0.67336106300354, 0.15743564069271088, -1.0644198656082153, -0.006791612133383751, -0.07457990944385529, -0.07099585980176926, 0.18311554193496704, -1.5159342288970947, -0.20370671153068542, -0.3106366991996765, -0.5634828805923462, -1.2724990844726562, 0.03836313635110855, 1.259002447128296, -0.6421921849250793, -0.23838481307029724, 0.5066980123519897, 0.2818477153778076, 0.5523703098297119, 0.5412590503692627, -0.6342989802360535, -0.2233264446258545, -0.18600015342235565, -0.31082072854042053, 0.39158618450164795, 1.362205982208252, -0.15258647501468658, -0.9468926191329956, 0.689254879951477, -0.47746556997299194, 0.08868580311536789, 2.020158290863037, 0.15193983912467957, -0.8567596077919006, 0.21089734137058258, -0.721104085445404, 1.9580981731414795, 1.5442698001861572, 1.2121816873550415, -0.05050390958786011, -0.9508412480354309, 0.5594456195831299, -0.18128566443920135, -0.37372827529907227, 0.7702834606170654, 0.29420849680900574, -0.1951063871383667, -1.4322024583816528, 0.5275633335113525, 1.3045120239257812, -0.8939173817634583, -0.9667111039161682, 0.09002617746591568, -0.8661813139915466, 1.0333220958709717, 0.7940562963485718, 0.40608420968055725, 0.28514671325683594, 1.4427924156188965, 0.767858624458313, -0.46735402941703796, 0.5940829515457153, 0.41336312890052795, 0.015734266489744186, -2.0021467208862305, -1.0004069805145264, 0.37345635890960693, -0.44761520624160767, -1.5938974618911743, 1.256629467010498, -1.2769397497177124, -0.9121556282043457, 0.482866495847702, 0.3057548403739929, 1.5295716524124146, 0.3375595211982727, 1.5356037616729736, 1.9701917171478271, 0.9479095935821533, 0.1946120411157608, 1.332451581954956, -0.10840138047933578, -0.5262229442596436, 1.82390296459198, -0.4824245572090149, 0.517536461353302, 1.0983041524887085, -0.4070189595222473, -1.152958631515503, -0.7374944686889648, -1.2138797044754028, -0.5782250761985779, 1.1640883684158325, 0.21864017844200134, -1.1068556308746338, 0.23081538081169128, 1.508791208267212, -0.008774829097092152, -0.3391973078250885, 0.6249625086784363, 0.5097216963768005, -0.9515078067779541, 0.07492107152938843, -0.8172656893730164, 0.4752461314201355, 0.0008203545585274696, -0.37840598821640015, 0.3961744010448456, 0.530291736125946, 1.2549093961715698, 0.025764627382159233, 0.17133653163909912, 1.1155356168746948, -1.3994395732879639, 1.598358154296875, -0.6065394878387451, 0.1068960428237915, -2.447340488433838, 1.4212782382965088, -0.6874161958694458, 1.7400522232055664, -2.710482358932495, 0.4419066309928894, -0.4914444386959076, -0.47080323100090027, 0.23410193622112274, -0.47041255235671997, 0.10711099207401276, -0.14055779576301575, -1.1686387062072754, 0.020913122221827507, -0.7407335042953491, 0.5002521276473999, 1.125058650970459, 1.3421707153320312, -1.0988669395446777, -0.3023951053619385, -1.8426623344421387, -0.07909172773361206, -0.7482011914253235, 0.40497517585754395, -2.051286458969116, -0.24128206074237823, -1.8846198320388794, -2.241034984588623, -1.4269412755966187, -0.7858684659004211, 1.050112247467041, 0.15356312692165375, -0.8873103857040405, 1.093283772468567, -0.37955161929130554, -1.9082996845245361, 0.86257404088974, -2.259782552719116 ]
https://github.com/huggingface/datasets/issues/4571
Dataset Viewer issue for gsarti/flores_101
I'm just wondering why we don't have this dataset under: - the `facebook` namespace - or the canonical dataset `flores`: why does this only have 2 languages?
### Link https://huggingface.co/datasets/gsarti/flores_101 ### Description It seems like streaming isn't supported for this dataset: ``` Server Error Status code: 400 Exception: NotImplementedError Message: Extraction protocol for TAR archives like 'https://dl.fbaipublicfiles.com/flores101/dataset/flores101_dataset.tar.gz' is not implemented in streaming mode. Please use `dl_manager.iter_archive` instead. ``` ### Owner No
682
27
Dataset Viewer issue for gsarti/flores_101 ### Link https://huggingface.co/datasets/gsarti/flores_101 ### Description It seems like streaming isn't supported for this dataset: ``` Server Error Status code: 400 Exception: NotImplementedError Message: Extraction protocol for TAR archives like 'https://dl.fbaipublicfiles.com/flores101/dataset/flores101_dataset.tar.gz' is not implemented in streaming mode. Please use `dl_manager.iter_archive` instead. ``` ### Owner No I'm just wondering why we don't have this dataset under: - the `facebook` namespace - or the canonical dataset `flores`: why does this only have 2 languages?
[ -1.1226149797439575, -0.9208711385726929, -0.7993073463439941, 1.517277479171753, -0.16991044580936432, -1.3597687482833862, 0.09606122225522995, -0.8915512561798096, 1.674255132675171, -0.7851266860961914, 0.295752614736557, -1.7066410779953003, -0.0839005634188652, -0.616068959236145, -0.6208148002624512, -0.8561346530914307, -0.4034518301486969, -0.7302643060684204, 1.0384498834609985, 2.541677713394165, 1.2136268615722656, -1.3573012351989746, 2.749917984008789, 0.6551650762557983, -0.17357508838176727, -1.0973392724990845, 0.4944742023944855, -0.03815162926912308, -1.2600044012069702, -0.369196355342865, -0.9834145307540894, -0.0048317862674593925, -0.49225664138793945, -0.5611765384674072, -0.05484159290790558, 0.484857976436615, -0.303943395614624, -0.459058940410614, -0.49603769183158875, -0.8595720529556274, 0.4646790325641632, -0.3700651228427887, 0.9120360612869263, -0.40276768803596497, 1.8126550912857056, -0.5362887382507324, 0.3048895299434662, 0.6961407661437988, 1.308447003364563, 0.08633618801832199, 0.04277393966913223, 0.18896342813968658, 0.43573516607284546, 0.00952361524105072, 0.42496225237846375, 1.0845861434936523, 0.5275808572769165, 0.5296008586883545, 0.5745913982391357, -2.286699056625366, 1.203842043876648, -0.987449049949646, 0.27328523993492126, 1.4050180912017822, -1.1288882493972778, 0.2760128378868103, -1.776106834411621, 0.02803395316004753, 0.49304768443107605, -2.051091194152832, 0.18775731325149536, -1.2258878946304321, -0.45452114939689636, 0.9603675603866577, 0.30698686838150024, -1.3053604364395142, 0.05716780573129654, -0.3941023647785187, 1.0574312210083008, 0.4863344728946686, 1.1148502826690674, -1.6649564504623413, 0.014752214774489403, -0.29097798466682434, 0.07747922837734222, -1.2936298847198486, -1.5139880180358887, 0.47534269094467163, 0.809442400932312, 0.6699316501617432, -0.10803867876529694, 0.9767627716064453, -0.8987350463867188, 0.6722303628921509, -1.007004737854004, -1.7333438396453857, -1.424314022064209, -2.3648934364318848, -2.298879861831665, 0.8076592683792114, -0.40559396147727966, -0.4932020902633667, 1.9547641277313232, -0.9648643732070923, -1.8871886730194092, 1.1823878288269043, 0.24969473481178284, 0.0657581239938736, 2.1951775550842285, 0.27217164635658264, -0.7391864061355591, 0.36429375410079956, -0.7236783504486084, 0.7206581830978394, -0.3832375705242157, 1.4046303033828735, 0.5211951732635498, -1.0173687934875488, 1.6329065561294556, -0.3934014141559601, 0.6364232301712036, -0.7045952081680298, -0.3844183683395386, -0.8339540958404541, 0.368571937084198, 1.9487175941467285, -0.4241558313369751, 1.622560977935791, -0.299022912979126, -1.4927555322647095, -1.5036834478378296, 0.8044518232345581, 0.4355606436729431, -0.6514517068862915, 0.16502821445465088, -0.3979843556880951, 0.09095291793346405, -0.08019167929887772, 1.034629464149475, 1.2099968194961548, 0.6595255136489868, -0.3496231436729431, -0.8879398107528687, 0.35458824038505554, 0.06219138950109482, -0.7418150901794434, -1.8170063495635986, -0.30716779828071594, 0.20141150057315826, 0.6652947664260864, -1.1410517692565918, 1.7252404689788818, 0.7573539018630981, 2.046544075012207, 0.9940294027328491, -0.2553468644618988, 1.4293041229248047, -0.013656246475875378, 1.9828169345855713, -0.43466344475746155, 0.6394999027252197, -0.3065750300884247, -1.2322754859924316, 0.8760687112808228, -0.37901753187179565, -2.024435043334961, -0.867424726486206, -0.971570611000061, -0.1161268800497055, -0.8040493726730347, 0.9507031440734863, -0.18745768070220947, -1.370395541191101, 0.16130609810352325, -0.6800439357757568, 0.13646163046360016, -1.2808023691177368, 0.19925419986248016, 0.747689962387085, -0.5749334096908569, 0.0032942667603492737, -0.23539794981479645, -1.3498142957687378, -0.42172080278396606, 0.37413209676742554, 1.9015964269638062, -0.73740553855896, 0.97409987449646, 1.0322345495224, -0.7584867477416992, 0.09663478285074234, 0.2294674962759018, -0.2890723645687103, 0.8555231094360352, -1.038730263710022, -0.3823452293872833, 1.2539182901382446, -0.14933736622333527, -0.7665265798568726, 1.4523515701293945, 0.9196567535400391, -0.978762149810791, -0.19194750487804413, -0.24627669155597687, -0.6820882558822632, -0.052589353173971176, -1.6631081104278564, -0.10929732769727707, 0.26773500442504883, -1.4139355421066284, -0.48717835545539856, -0.24603252112865448, 1.3501756191253662, -0.09317836910486221, 1.338192343711853, -0.28461408615112305, -0.20529787242412567, -0.459435373544693, -0.4540930390357971, 0.15087337791919708, -0.21939286589622498, -0.6236835718154907, 0.20256270468235016, -0.8708769083023071, 0.316487580537796, 1.3836978673934937, 0.2857833206653595, 0.11562509834766388, 0.6789714097976685, 1.0775060653686523, 0.29892441630363464, -0.037782177329063416, -0.9166944026947021, -1.580224633216858, 1.9868993759155273, -1.3390834331512451, 1.963023066520691, 0.7088083028793335, -0.018028119578957558, -1.846350908279419, -1.8921451568603516, 1.452318787574768, 1.2170885801315308, 2.263286828994751, 0.6484935283660889, 0.4527219533920288, -0.9833118915557861, -0.6751894950866699, 0.2821963429450989, -1.0533275604248047, -0.7093585729598999, 0.15582628548145294, 2.357588052749634, 1.8398276567459106, -0.5665535926818848, -0.16955748200416565, -0.9889590740203857, 1.2267345190048218, -0.10005208849906921, 0.2563641667366028, 2.0411088466644287, -0.29566624760627747, -0.924373984336853, 1.1696979999542236, -2.375324249267578, 0.23327602446079254, 2.014061212539673, 0.17230455577373505, 0.09186727553606033, -1.4770128726959229, -0.7585147619247437, -0.19701559841632843, -0.29480206966400146, -1.2555221319198608, 0.6345119476318359, -0.2764420211315155, -0.8334846496582031, -1.4226359128952026, 0.256576806306839, -0.9309765100479126, -1.708036184310913, 0.2317592352628708, 1.825990915298462, 1.9199798107147217, -0.8761802911758423, 1.5546551942825317, -0.20877902209758759, 0.25644105672836304, 1.3622287511825562, 1.1917712688446045, 3.12489914894104, 2.055295467376709, -1.2817362546920776, 0.8223849534988403, -0.07019487768411636, -0.43649834394454956, 1.2690447568893433, -1.1784017086029053, 1.2810908555984497, -0.36536526679992676, -1.2264018058776855, -1.3984373807907104, 0.9371747970581055, 0.5437926054000854, -0.015991676598787308, -0.460232138633728, 1.3057920932769775, 0.04502174258232117, 1.309005618095398, 0.5646133422851562, -0.4243431091308594, 0.6300644874572754, -0.4244389235973358, -0.44504913687705994, 1.5478770732879639, 0.21144220232963562, -1.4036259651184082, -2.1778039932250977, -0.2726530134677887, -0.8784980773925781, -0.20689836144447327, -0.656735897064209, -1.0291287899017334, 1.607007384300232, 0.5052495002746582, -1.2276661396026611, -0.3362312316894531, -0.3715524673461914, -0.5985673666000366, 2.682023525238037, -1.3379263877868652, -0.21476860344409943, -1.0457123517990112, -0.5111739635467529, 1.8139861822128296, -1.1886675357818604, -0.19830504059791565, -1.106026530265808, -0.6069235801696777, -1.353432297706604, -0.5923178195953369, 0.02208780124783516, -0.8368432521820068, 0.8605793714523315, 0.08908875286579132, -1.1881412267684937, -0.2463269978761673, -0.8051837682723999, 0.9574463367462158, -0.19088466465473175, 0.21449945867061615, 1.9379132986068726, 0.40313640236854553, -0.358456552028656, 0.6626847982406616, 1.1077661514282227, 0.5979770421981812, -0.6936967372894287, 0.38017749786376953, -0.6719537973403931, 0.24182739853858948, -1.3850868940353394, 0.1937524974346161, -3.0113675594329834, 0.6331528425216675, -0.06482881307601929, 0.01372360996901989, -0.056643009185791016, -1.3485801219940186, 1.0760716199874878, 2.510133743286133, -1.3064371347427368, 0.43529626727104187, 0.3921545147895813, 1.1842947006225586, -1.59170663356781, 0.26203376054763794, -0.43767693638801575, 2.1247806549072266, 0.06947581470012665, 1.2864021062850952, -0.45552611351013184, -2.131269931793213, 0.6462748050689697, -1.2278813123703003, -1.1680989265441895, 0.7684628963470459, -0.8296500444412231, 0.025838453322649002, -1.4011437892913818, -0.1901637464761734, -0.8527958393096924, -1.3452675342559814, 0.8363238573074341, 0.037089988589286804, 0.4603627920150757, -0.5706340074539185, 0.37475892901420593, -2.1448004245758057, -1.2969716787338257, -0.18647632002830505, -1.024977445602417, 0.2709529399871826, -0.3290769159793854, 0.6925039291381836, -0.1775588095188141, 0.04376544803380966, 0.27040013670921326, 1.3277040719985962, 3.570347785949707, 0.1689230054616928, 0.37234216928482056, -0.03421197086572647, -0.9697768688201904, 1.4999687671661377, 0.9438982009887695, -0.10325931757688522, -0.4127603769302368, -0.9302798509597778, 1.2508562803268433, 2.0171496868133545, 1.0199129581451416, 0.12622106075286865, -0.8609869480133057, -0.7420344352722168, 0.012572964653372765, 0.1191326230764389, 0.5028550624847412, 0.7767084836959839, 0.0988873839378357, 0.03760270029306412, 1.392798900604248, 1.1116561889648438, -0.423353374004364, 0.40922659635543823, -0.9378830194473267, -0.37231388688087463, 0.545936107635498, 0.37895718216896057, 0.04957381263375282, 0.3237040340900421, -1.0782407522201538, -0.29264307022094727, -0.2671547830104828, -0.8525443077087402, -0.7028205394744873, -0.4674038887023926, -0.309086412191391, 1.5155500173568726, 0.06693324446678162, -0.5640872716903687, -0.09776107221841812, -0.816567063331604, -0.13059405982494354, -1.0721542835235596, 0.16711819171905518, -0.2534186840057373, -0.01931498944759369, -0.11548296362161636, 1.7171190977096558, -1.0654492378234863, -2.189157009124756, 0.2849925458431244, 0.3381657898426056, -0.39597851037979126, 0.1255728155374527, 1.6242356300354004, 0.5558078289031982, 1.3610426187515259, 1.3179268836975098, 1.166749119758606, -0.7332695722579956, -1.3418349027633667, 0.6639314889907837, 0.9417456388473511, -1.416916012763977, 0.7927455902099609, -0.07557442039251328, -0.46631327271461487, 0.6521908044815063, 1.3514615297317505, 0.4383563995361328, -1.9156112670898438, 0.679476261138916, -0.8075599670410156, 0.7035237550735474, 0.7617547512054443, 0.9153791666030884, 0.1813618689775467, 0.7467211484909058, -1.261487603187561, -1.0675386190414429, -0.8341212272644043, -0.6192184686660767, 1.8631740808486938, -0.16164931654930115, 0.5357877016067505, -0.09846124053001404, -1.404632568359375, -0.028842827305197716, 0.7119126319885254, 0.3041873872280121, -0.42781147360801697, 0.7282525300979614, -0.6762247085571289, -1.0250071287155151, -1.3057763576507568, -0.477347731590271, -1.030527114868164, -1.0183053016662598, 1.0291906595230103, 0.825853705406189, 0.4188291132450104, 1.8494020700454712, 0.7233508825302124, 0.2646748721599579, -2.692096710205078, 0.9945322275161743, 0.24348583817481995, 0.22994829714298248, 0.7671904563903809, 0.29213306307792664, 1.0411546230316162, -0.055541448295116425, 0.5551096200942993, -2.3434340953826904, 2.2433273792266846, -0.26268357038497925, 0.4788888394832611, -0.05287262424826622, -0.24360151588916779, 1.0398032665252686, 0.40973785519599915, 0.5540221929550171, -1.1026716232299805, 0.8229198455810547, -0.5964169502258301, 1.242702841758728, 0.9516338109970093, -0.832844614982605, 0.005886919796466827, 1.3500562906265259, 0.6042830944061279, -0.5152890682220459, -0.9547349214553833, -0.9142074584960938, 1.0177680253982544, 1.658909797668457, 0.014975219964981079, -0.05854080989956856, 0.9493081569671631, 0.531057596206665, -1.233237385749817, -0.013709018006920815, -0.7776720523834229, -0.5796676874160767, 1.7415276765823364, 2.0023250579833984, -0.0990779921412468, -0.21141278743743896, -0.7853517532348633, -1.1261128187179565, 0.6775250434875488, 0.03648974001407623, -0.10247491300106049, 0.7905256748199463, -0.6301686763763428, 1.0913565158843994, 0.6624624729156494, 0.9585356712341309, 0.09806732088327408, 0.3666018545627594, 0.43577125668525696, -0.30084919929504395, -1.2487177848815918, -0.37620022892951965, -1.1106548309326172, -2.542903423309326, 0.4936404526233673, -0.19803552329540253, -1.3185179233551025, -0.010454519651830196, -1.0837525129318237, 0.9577460289001465, -0.5717759132385254, -1.0754362344741821, -1.4127379655838013, 0.22471411526203156, -0.14345471560955048, 0.7998054027557373, -1.6059807538986206, -0.0034143365919589996, 1.3068211078643799, 0.9213124513626099, -0.8064839839935303, 1.1040751934051514, 0.20462602376937866, 1.1480529308319092, 0.8738203048706055, -0.3047832250595093, 0.4598533511161804, 0.07863624393939972, -1.2908122539520264, 0.581070065498352, 1.0956909656524658, 0.14910174906253815, 1.4780042171478271, -0.5295958518981934, 0.05943146347999573, 0.520255446434021, -0.529770016670227, -0.49332138895988464, -0.618606686592102, 0.7964177131652832, 0.11465476453304291, -0.8418596982955933, 0.06531856209039688, -0.12300463020801544, -0.11913592368364334, 0.2109316736459732, -1.509896993637085, -0.11280445754528046, -0.2249860167503357, -0.583085298538208, -1.250205397605896, -0.0071285502053797245, 1.413196325302124, -0.721037745475769, -0.21280784904956818, 0.6072258949279785, 0.23040705919265747, 0.5189187526702881, 0.52137291431427, -0.6431050300598145, -0.32945358753204346, -0.3693535327911377, -0.2874606251716614, 0.37966468930244446, 1.3000552654266357, -0.0483706034719944, -1.0811059474945068, 0.7695791721343994, -0.48431989550590515, 0.07376343756914139, 2.040238857269287, 0.1587531715631485, -0.8730651140213013, 0.2553323805332184, -0.6445749998092651, 1.9452146291732788, 1.6412816047668457, 1.3551872968673706, -0.038197122514247894, -0.9184293746948242, 0.5933877229690552, -0.17039592564105988, -0.4290434420108795, 0.9103512763977051, 0.47034141421318054, -0.16773995757102966, -1.3834031820297241, 0.5809956789016724, 1.3147701025009155, -0.8826694488525391, -0.760633111000061, 0.09031884372234344, -0.8210606575012207, 1.010687232017517, 0.711529016494751, 0.39015519618988037, 0.31852179765701294, 1.5935842990875244, 0.6864809989929199, -0.4640773832798004, 0.48551395535469055, 0.487520694732666, -0.05005718767642975, -2.08392071723938, -0.9514535665512085, 0.4064970314502716, -0.4625728130340576, -1.571668267250061, 1.3112235069274902, -1.2677217721939087, -0.8734245300292969, 0.5005407333374023, 0.13014931976795197, 1.4294542074203491, 0.28723764419555664, 1.5943783521652222, 1.9379628896713257, 0.9078059196472168, 0.30121663212776184, 1.2879981994628906, -0.19542649388313293, -0.5170993804931641, 1.8060952425003052, -0.5163742303848267, 0.5161794424057007, 1.045556664466858, -0.4637437164783478, -1.1300361156463623, -0.7777719497680664, -1.3057667016983032, -0.5546267032623291, 1.131474256515503, 0.154323011636734, -1.21905517578125, 0.19840697944164276, 1.521823525428772, 0.08656430244445801, -0.3140835165977478, 0.7307039499282837, 0.4393162429332733, -0.8620637655258179, 0.0540284663438797, -0.8556616306304932, 0.5569907426834106, -0.12331552803516388, -0.2453138530254364, 0.379865437746048, 0.5319555997848511, 1.2896896600723267, 0.027829863131046295, 0.1546757072210312, 1.221990704536438, -1.2760285139083862, 1.5012227296829224, -0.6148993968963623, 0.24011510610580444, -2.4834742546081543, 1.3443560600280762, -0.7877435684204102, 1.7977138757705688, -2.684896230697632, 0.3375767171382904, -0.5779509544372559, -0.41904306411743164, 0.2873672544956207, -0.41692107915878296, -0.009406821802258492, -0.12090132385492325, -1.1656434535980225, -0.019623611122369766, -0.7497783899307251, 0.5949326753616333, 1.176999568939209, 1.38557767868042, -1.1837953329086304, -0.2600412368774414, -1.8487200736999512, -0.11360262334346771, -0.7173770666122437, 0.357875257730484, -2.001884698867798, -0.08573221415281296, -1.9108338356018066, -2.4041547775268555, -1.3507033586502075, -0.7979110479354858, 0.963040828704834, 0.20720668137073517, -0.9251194000244141, 0.9846624135971069, -0.2996003329753876, -1.7070393562316895, 1.0976780652999878, -2.096923589706421 ]
https://github.com/huggingface/datasets/issues/4570
Dataset sharding non-contiguous?
This was silly; I was sure I'd looked for a `contiguous` argument, and was certain there wasn't one the first time I looked :smile: Sorry about that.
## Describe the bug I'm not sure if this is a bug; more likely normal behavior but i wanted to double check. Is it normal that `datasets.shard` does not produce chunks that, when concatenated produce the original ordering of the sharded dataset? This might be related to this pull request (https://github.com/huggingface/datasets/pull/4466) but I have to admit I did not properly look into the changes made. ## Steps to reproduce the bug ```python max_shard_size = convert_file_size_to_int('300MB') dataset_nbytes = dataset.data.nbytes num_shards = int(dataset_nbytes / max_shard_size) + 1 num_shards = max(num_shards, 1) print(f"{num_shards=}") for shard_index in range(num_shards): shard = dataset.shard(num_shards=num_shards, index=shard_index) shard.to_parquet(f"tokenized/tokenized-{shard_index:03d}.parquet") os.listdir('tokenized/') ``` ## Expected results I expected the shards to match the order of the data of the original dataset; i.e. `dataset[10]` being the same as `shard_1[10]` for example ## Actual results Only the first element is the same; i.e. `dataset[0]` is the same as `shard_1[0]` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-4.15.0-176-generic-x86_64-with-glibc2.31 - Python version: 3.10.4 - PyArrow version: 8.0.0 - Pandas version: 1.4.2
683
27
Dataset sharding non-contiguous? ## Describe the bug I'm not sure if this is a bug; more likely normal behavior but i wanted to double check. Is it normal that `datasets.shard` does not produce chunks that, when concatenated produce the original ordering of the sharded dataset? This might be related to this pull request (https://github.com/huggingface/datasets/pull/4466) but I have to admit I did not properly look into the changes made. ## Steps to reproduce the bug ```python max_shard_size = convert_file_size_to_int('300MB') dataset_nbytes = dataset.data.nbytes num_shards = int(dataset_nbytes / max_shard_size) + 1 num_shards = max(num_shards, 1) print(f"{num_shards=}") for shard_index in range(num_shards): shard = dataset.shard(num_shards=num_shards, index=shard_index) shard.to_parquet(f"tokenized/tokenized-{shard_index:03d}.parquet") os.listdir('tokenized/') ``` ## Expected results I expected the shards to match the order of the data of the original dataset; i.e. `dataset[10]` being the same as `shard_1[10]` for example ## Actual results Only the first element is the same; i.e. `dataset[0]` is the same as `shard_1[0]` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-4.15.0-176-generic-x86_64-with-glibc2.31 - Python version: 3.10.4 - PyArrow version: 8.0.0 - Pandas version: 1.4.2 This was silly; I was sure I'd looked for a `contiguous` argument, and was certain there wasn't one the first time I looked :smile: Sorry about that.
[ -1.300174593925476, -0.8646246790885925, -0.6881301999092102, 1.409796118736267, -0.11944107711315155, -1.2563308477401733, 0.11739765852689743, -0.9787282943725586, 1.6649268865585327, -0.7743805050849915, 0.27906888723373413, -1.6146979331970215, 0.11965347081422806, -0.5485950708389282, -0.7290458679199219, -0.8312106132507324, -0.43095314502716064, -0.7075037956237793, 1.0884891748428345, 2.4136669635772705, 1.2233582735061646, -1.4291142225265503, 2.6880862712860107, 0.6987456679344177, -0.1606633961200714, -1.0193251371383667, 0.5500954389572144, -0.03936333954334259, -1.3235812187194824, -0.37546032667160034, -0.8864310383796692, -0.021807335317134857, -0.602621853351593, -0.5564417839050293, 0.03674692288041115, 0.4653644561767578, -0.18599700927734375, -0.49130576848983765, -0.5325649380683899, -0.7447495460510254, 0.4974432587623596, -0.3627859055995941, 0.8615190386772156, -0.3758717179298401, 1.8176995515823364, -0.5982881188392639, 0.5306435227394104, 0.761845052242279, 1.3493893146514893, 0.1624707579612732, -0.03506601229310036, 0.39225339889526367, 0.40425461530685425, -0.026765132322907448, 0.47476139664649963, 1.1856355667114258, 0.6781477332115173, 0.49785202741622925, 0.7639939188957214, -2.258958578109741, 1.3353450298309326, -0.9957035183906555, 0.3216576874256134, 1.3031889200210571, -1.020304560661316, 0.40530890226364136, -1.763845443725586, -0.055837344378232956, 0.5439883470535278, -2.257500171661377, 0.19295990467071533, -1.3187209367752075, -0.4436240494251251, 1.0178030729293823, 0.4090116024017334, -1.195532202720642, 0.0418088436126709, -0.4566503167152405, 1.0192539691925049, 0.4651415944099426, 1.1753787994384766, -1.580348014831543, 0.015367856249213219, -0.2715595066547394, 0.1776975691318512, -1.2795997858047485, -1.583718180656433, 0.5568379163742065, 0.7352777123451233, 0.5162118077278137, -0.18584668636322021, 1.056030035018921, -0.9641570448875427, 0.7736679911613464, -0.9321295022964478, -1.7526342868804932, -1.4911530017852783, -2.31958270072937, -2.2997260093688965, 0.7770716547966003, -0.4567018449306488, -0.47920480370521545, 2.0778913497924805, -1.1222403049468994, -1.8045315742492676, 1.106463074684143, 0.24570822715759277, 0.04432768374681473, 2.310067892074585, 0.1601041555404663, -0.7642890214920044, 0.46272069215774536, -0.7759418487548828, 0.7213781476020813, -0.3316357731819153, 1.2750693559646606, 0.44607555866241455, -1.0609828233718872, 1.5815916061401367, -0.32245349884033203, 0.5828537940979004, -0.6744270324707031, -0.4270293414592743, -0.7559627890586853, 0.29252147674560547, 1.9209553003311157, -0.3232771158218384, 1.5477946996688843, -0.358544260263443, -1.6202025413513184, -1.5722894668579102, 0.8052994608879089, 0.5695130825042725, -0.7437396049499512, 0.12574216723442078, -0.39651522040367126, 0.17325064539909363, -0.029025889933109283, 1.1195316314697266, 1.259989619255066, 0.7827413082122803, -0.3656087815761566, -0.8928244709968567, 0.21487319469451904, 0.015177346765995026, -0.6670512557029724, -1.8022091388702393, -0.30493319034576416, 0.12561991810798645, 0.6680536866188049, -1.1202595233917236, 1.8289024829864502, 0.8905168771743774, 1.9471299648284912, 1.0228501558303833, -0.3505493700504303, 1.5371466875076294, 0.10064344108104706, 1.8891510963439941, -0.41718789935112, 0.6536701321601868, -0.36726877093315125, -1.1774306297302246, 0.8229840993881226, -0.29575082659721375, -2.076226234436035, -0.7353034019470215, -0.7636124491691589, -0.15018615126609802, -0.7939088940620422, 0.912267804145813, -0.2979174554347992, -1.371565818786621, 0.25823312997817993, -0.674574077129364, 0.19064432382583618, -1.1894086599349976, 0.2723292410373688, 0.7562285661697388, -0.671199381351471, 0.07384060323238373, -0.330824613571167, -1.241674780845642, -0.49441051483154297, 0.314554899930954, 1.7827986478805542, -0.7532608509063721, 0.9892189502716064, 1.068421483039856, -0.6553369760513306, -0.04574117809534073, 0.31766077876091003, -0.24998998641967773, 0.8820723295211792, -1.0400867462158203, -0.4163632094860077, 1.2146108150482178, -0.24781569838523865, -0.5890182852745056, 1.5176388025283813, 0.7324942350387573, -0.9554672241210938, -0.18478509783744812, -0.09773752838373184, -0.8596799373626709, -0.034128621220588684, -1.655682921409607, -0.13369691371917725, 0.45050111413002014, -1.5253994464874268, -0.47703224420547485, -0.13729804754257202, 1.3139935731887817, -0.10623202472925186, 1.4258112907409668, -0.31173351407051086, -0.15303924679756165, -0.4323001205921173, -0.3423909842967987, 0.1541500687599182, -0.1491784155368805, -0.6631717681884766, 0.26419347524642944, -0.8552707433700562, 0.3544454574584961, 1.3868367671966553, 0.3471614420413971, 0.014033455401659012, 0.5619111657142639, 1.2005112171173096, 0.35117462277412415, -0.09352709352970123, -0.8741863965988159, -1.591679573059082, 2.0083446502685547, -1.4446642398834229, 1.966619610786438, 0.7421289086341858, -0.047120023518800735, -1.7779772281646729, -1.841834306716919, 1.4087238311767578, 1.0893043279647827, 2.3592870235443115, 0.5111954212188721, 0.41026782989501953, -0.7871541380882263, -0.6685192584991455, 0.3896040916442871, -0.992728054523468, -0.7783269882202148, 0.08958011865615845, 2.3239243030548096, 1.7637042999267578, -0.3726520240306854, -0.2383001744747162, -1.0019253492355347, 1.35603666305542, -0.1336083710193634, 0.21677333116531372, 1.9852397441864014, -0.2677290141582489, -1.0244344472885132, 1.2722541093826294, -2.3281781673431396, 0.1954875886440277, 2.0425796508789062, 0.26891690492630005, 0.07943759113550186, -1.4322564601898193, -0.6026267409324646, -0.20175513625144958, -0.46261659264564514, -1.2934833765029907, 0.5579180717468262, -0.26974064111709595, -0.7945307493209839, -1.3379086256027222, 0.15759876370429993, -1.167539119720459, -1.6673256158828735, 0.2578237056732178, 1.8772976398468018, 2.009061813354492, -0.6775121688842773, 1.5096852779388428, -0.26989710330963135, 0.16236287355422974, 1.2205523252487183, 1.1813290119171143, 3.1774699687957764, 1.8716399669647217, -1.3671181201934814, 0.6122126579284668, -0.2086247205734253, -0.46375030279159546, 1.1246267557144165, -1.2013263702392578, 1.2237046957015991, -0.2053968608379364, -1.2736356258392334, -1.2237930297851562, 0.9962236881256104, 0.4600188434123993, 0.08972718566656113, -0.4538329839706421, 1.263420581817627, 0.08886576443910599, 1.3962832689285278, 0.5385245680809021, -0.33625349402427673, 0.6169872879981995, -0.3571360111236572, -0.5540162324905396, 1.5343300104141235, 0.14582106471061707, -1.4401664733886719, -2.2159576416015625, -0.1968415379524231, -0.8413817882537842, 0.08245281875133514, -0.6546555757522583, -0.9655102491378784, 1.5697503089904785, 0.4004274904727936, -1.2880796194076538, -0.24593350291252136, -0.37503781914711, -0.6337845921516418, 2.6619372367858887, -1.3470162153244019, -0.290443480014801, -1.027178168296814, -0.595961332321167, 1.5893077850341797, -1.2270479202270508, -0.24408939480781555, -0.9661288857460022, -0.5053628087043762, -1.2244797945022583, -0.6352208852767944, -0.015042971819639206, -0.9449847340583801, 0.7920190691947937, 0.11067859828472137, -1.1719584465026855, -0.31789329648017883, -0.9159508943557739, 0.8804660439491272, -0.14675718545913696, 0.1605387032032013, 1.8358409404754639, 0.37335100769996643, -0.39766958355903625, 0.7851262092590332, 1.1072957515716553, 0.631883978843689, -0.5950192213058472, 0.21867036819458008, -0.6438518166542053, 0.3484252095222473, -1.3019086122512817, 0.3001782298088074, -2.8685340881347656, 0.6123663783073425, -0.06285829842090607, 0.022580187767744064, -0.0961698442697525, -1.3291813135147095, 1.0026808977127075, 2.5972182750701904, -1.1786460876464844, 0.556272029876709, 0.3149000406265259, 1.1928505897521973, -1.5713638067245483, 0.30108505487442017, -0.5260382294654846, 2.134556770324707, 0.20250722765922546, 1.2738672494888306, -0.4590670168399811, -2.331437826156616, 0.635746419429779, -1.225698709487915, -1.1366956233978271, 0.8061784505844116, -0.8882282376289368, 0.14229968190193176, -1.349377155303955, -0.2919202446937561, -0.8290806412696838, -1.1663063764572144, 0.664922297000885, 0.13166415691375732, 0.4598066806793213, -0.6423894762992859, 0.29475653171539307, -2.2415146827697754, -1.3268340826034546, -0.2909366488456726, -1.0050544738769531, 0.40144824981689453, -0.350170373916626, 0.6848642230033875, -0.12284321337938309, -0.024501526728272438, 0.26003751158714294, 1.4404747486114502, 3.3485324382781982, 0.25001057982444763, 0.30179303884506226, -0.19481974840164185, -0.9507294297218323, 1.4966484308242798, 0.8943110108375549, -0.1955147385597229, -0.619844377040863, -1.0558085441589355, 1.302263855934143, 1.8990395069122314, 0.9750988483428955, -0.01547978911548853, -0.8398188948631287, -0.7922958135604858, 0.03475552797317505, 0.12303169816732407, 0.5656033754348755, 0.8650055527687073, 0.0769893079996109, 0.11118166893720627, 1.3708845376968384, 1.181777834892273, -0.3923410475254059, 0.34164008498191833, -0.9301000237464905, -0.4337310791015625, 0.5291517972946167, 0.2873397767543793, 0.02536792680621147, 0.32515203952789307, -1.0400946140289307, -0.15920034050941467, -0.3207978308200836, -0.9542011022567749, -0.7551891803741455, -0.3772673010826111, -0.3766920268535614, 1.6034685373306274, 0.1375027596950531, -0.5696682333946228, -0.030842140316963196, -0.7831739187240601, -0.17992544174194336, -1.02377188205719, 0.32626399397850037, -0.11338701099157333, -0.03979010879993439, -0.15919435024261475, 1.7226454019546509, -0.9735170602798462, -2.1178762912750244, 0.30204394459724426, 0.16219794750213623, -0.3455328941345215, 0.17004767060279846, 1.7538080215454102, 0.5716594457626343, 1.3437227010726929, 1.4187723398208618, 0.951368510723114, -0.6056680679321289, -1.252879023551941, 0.6990842223167419, 0.9452864527702332, -1.4480164051055908, 0.7879518270492554, -0.025900518521666527, -0.5334070324897766, 0.692254900932312, 1.3000396490097046, 0.5054985880851746, -2.091811418533325, 0.7855793833732605, -0.9939491152763367, 0.751041054725647, 0.7532722353935242, 0.7293035984039307, 0.17849934101104736, 0.8410528302192688, -1.2582051753997803, -1.1316341161727905, -0.6534429788589478, -0.6929595470428467, 1.9665453433990479, -0.3057650029659271, 0.5556368827819824, -0.19589978456497192, -1.3344875574111938, -0.12075767666101456, 0.6341579556465149, 0.21451511979103088, -0.4265657067298889, 0.8000394105911255, -0.7025700807571411, -1.1616601943969727, -1.3741412162780762, -0.48859378695487976, -0.9978373646736145, -0.8557084798812866, 1.0360511541366577, 0.711596667766571, 0.34778445959091187, 1.8474935293197632, 0.6324705481529236, 0.1920866072177887, -2.69206166267395, 0.8580108284950256, 0.2747354805469513, -0.07685407251119614, 0.8220837712287903, 0.2793865501880646, 1.0365242958068848, -0.04387461394071579, 0.5384939312934875, -2.493928909301758, 2.299772262573242, -0.2791668772697449, 0.7311408519744873, 0.005802595056593418, -0.1342546045780182, 1.1222928762435913, 0.626061201095581, 0.6143059730529785, -1.1103739738464355, 0.7547405362129211, -0.6265344619750977, 1.194105625152588, 0.8119069337844849, -0.8151678442955017, -0.047044675797224045, 1.3360925912857056, 0.4374735653400421, -0.5194161534309387, -0.909692645072937, -0.9703354239463806, 0.9509127736091614, 1.8164197206497192, -0.03139526769518852, 0.05763963609933853, 0.8404977917671204, 0.7033559083938599, -1.2656495571136475, 0.08295773714780807, -0.7031434774398804, -0.673888087272644, 1.658058762550354, 2.0566184520721436, -0.14338314533233643, -0.14937081933021545, -0.7707350850105286, -1.3022994995117188, 0.7736336588859558, -0.04090915247797966, 0.0532868430018425, 0.6393750309944153, -0.6121847033500671, 1.1565272808074951, 0.8993219137191772, 0.9281936883926392, 0.17465436458587646, 0.22995460033416748, 0.30901873111724854, -0.2911796271800995, -1.1807572841644287, -0.25311288237571716, -1.0202338695526123, -2.497344970703125, 0.4078824520111084, -0.2260945439338684, -1.373207449913025, 0.03180385380983353, -1.0410468578338623, 0.8611453175544739, -0.592046856880188, -1.104697823524475, -1.466545820236206, 0.20408231019973755, -0.0028385897167026997, 0.8361057639122009, -1.6319414377212524, -0.11595579236745834, 1.2319658994674683, 0.9012991786003113, -0.6481807827949524, 1.019101858139038, 0.3239651620388031, 0.9250709414482117, 0.8637171387672424, -0.42759329080581665, 0.4604050815105438, 0.1685163974761963, -1.3605854511260986, 0.4315541982650757, 1.190192699432373, 0.1109323650598526, 1.5192984342575073, -0.555866003036499, 0.0188945010304451, 0.383943110704422, -0.5576483607292175, -0.5057511329650879, -0.5606465339660645, 0.6748794913291931, 0.026847388595342636, -0.943035364151001, -0.005060275550931692, -0.05195486173033714, -0.24505573511123657, 0.24793606996536255, -1.4839344024658203, -0.1851448118686676, -0.3358144760131836, -0.6466537117958069, -1.265693187713623, -0.02260037139058113, 1.417585849761963, -0.8163009285926819, -0.21310153603553772, 0.5430445671081543, 0.2804378867149353, 0.5266351699829102, 0.636741042137146, -0.6848596930503845, -0.2883693277835846, -0.2107102870941162, -0.3092687129974365, 0.2808673083782196, 1.2844910621643066, -0.12224048376083374, -0.9516596794128418, 0.6860575079917908, -0.283389151096344, 0.06530474871397018, 1.9509406089782715, 0.12209198623895645, -0.7624132633209229, 0.31634974479675293, -0.812365710735321, 1.9060615301132202, 1.6954967975616455, 1.38737952709198, -0.09843544661998749, -0.9420376420021057, 0.5855727791786194, -0.3395109474658966, -0.3806654214859009, 0.8836822509765625, 0.4839283525943756, -0.23124635219573975, -1.3256025314331055, 0.6894745826721191, 1.2231820821762085, -0.9052064418792725, -0.7714727520942688, 0.061366453766822815, -0.7509060502052307, 1.139122724533081, 0.7000794410705566, 0.3893500864505768, 0.18745794892311096, 1.670512318611145, 0.7718139290809631, -0.45001718401908875, 0.5446858406066895, 0.47183865308761597, -0.11827078461647034, -2.143882989883423, -1.1235692501068115, 0.3124014139175415, -0.39530253410339355, -1.609901785850525, 1.4172641038894653, -1.1792067289352417, -0.9930925369262695, 0.5502610206604004, 0.04978903383016586, 1.4100357294082642, 0.350395530462265, 1.6624765396118164, 1.9831596612930298, 0.9122273921966553, 0.4157882034778595, 1.2905991077423096, -0.16095221042633057, -0.396138995885849, 1.804937720298767, -0.46534106135368347, 0.4535307288169861, 1.0915298461914062, -0.35768336057662964, -1.0700154304504395, -0.768749475479126, -1.228079080581665, -0.7677930593490601, 1.1301708221435547, 0.07816711813211441, -1.1028540134429932, 0.30720254778862, 1.5308359861373901, 0.11382117122411728, -0.18704324960708618, 0.620119035243988, 0.4541458189487457, -0.7765033841133118, -0.11358834058046341, -0.9227831363677979, 0.5501843690872192, -0.2967216372489929, -0.4339253604412079, 0.33658480644226074, 0.46503424644470215, 1.3001381158828735, -0.03316502273082733, 0.06122578680515289, 1.2708115577697754, -1.4717386960983276, 1.4755346775054932, -0.7380455136299133, 0.3195895552635193, -2.3623058795928955, 1.3778760433197021, -0.8276398777961731, 1.9589369297027588, -2.6645119190216064, 0.4405059814453125, -0.6253899335861206, -0.4578436315059662, 0.3071810305118561, -0.2871107757091522, 0.04920974746346474, -0.15571391582489014, -1.1527169942855835, -0.09378957748413086, -0.7367063760757446, 0.6383193135261536, 1.156713604927063, 1.3939428329467773, -1.1084034442901611, -0.21287092566490173, -1.6699213981628418, -0.21860453486442566, -0.6704375147819519, 0.3775169551372528, -1.9521344900131226, -0.11736201494932175, -2.006098508834839, -2.3898532390594482, -1.2643827199935913, -0.8607239127159119, 1.1213005781173706, 0.16473296284675598, -0.8499265313148499, 1.1614795923233032, -0.3670746982097626, -1.8499090671539307, 1.1299630403518677, -2.166543960571289 ]
https://github.com/huggingface/datasets/issues/4570
Dataset sharding non-contiguous?
Hi! You can pass `contiguous=True` to `.shard()` get contiguous shards. More info on this and the default behavior can be found in the [docs](https://huggingface.co/docs/datasets/v2.3.2/en/package_reference/main_classes#datasets.Dataset.shard). EDIT: Answered as you closed the thread 😄
## Describe the bug I'm not sure if this is a bug; more likely normal behavior but i wanted to double check. Is it normal that `datasets.shard` does not produce chunks that, when concatenated produce the original ordering of the sharded dataset? This might be related to this pull request (https://github.com/huggingface/datasets/pull/4466) but I have to admit I did not properly look into the changes made. ## Steps to reproduce the bug ```python max_shard_size = convert_file_size_to_int('300MB') dataset_nbytes = dataset.data.nbytes num_shards = int(dataset_nbytes / max_shard_size) + 1 num_shards = max(num_shards, 1) print(f"{num_shards=}") for shard_index in range(num_shards): shard = dataset.shard(num_shards=num_shards, index=shard_index) shard.to_parquet(f"tokenized/tokenized-{shard_index:03d}.parquet") os.listdir('tokenized/') ``` ## Expected results I expected the shards to match the order of the data of the original dataset; i.e. `dataset[10]` being the same as `shard_1[10]` for example ## Actual results Only the first element is the same; i.e. `dataset[0]` is the same as `shard_1[0]` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-4.15.0-176-generic-x86_64-with-glibc2.31 - Python version: 3.10.4 - PyArrow version: 8.0.0 - Pandas version: 1.4.2
683
32
Dataset sharding non-contiguous? ## Describe the bug I'm not sure if this is a bug; more likely normal behavior but i wanted to double check. Is it normal that `datasets.shard` does not produce chunks that, when concatenated produce the original ordering of the sharded dataset? This might be related to this pull request (https://github.com/huggingface/datasets/pull/4466) but I have to admit I did not properly look into the changes made. ## Steps to reproduce the bug ```python max_shard_size = convert_file_size_to_int('300MB') dataset_nbytes = dataset.data.nbytes num_shards = int(dataset_nbytes / max_shard_size) + 1 num_shards = max(num_shards, 1) print(f"{num_shards=}") for shard_index in range(num_shards): shard = dataset.shard(num_shards=num_shards, index=shard_index) shard.to_parquet(f"tokenized/tokenized-{shard_index:03d}.parquet") os.listdir('tokenized/') ``` ## Expected results I expected the shards to match the order of the data of the original dataset; i.e. `dataset[10]` being the same as `shard_1[10]` for example ## Actual results Only the first element is the same; i.e. `dataset[0]` is the same as `shard_1[0]` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-4.15.0-176-generic-x86_64-with-glibc2.31 - Python version: 3.10.4 - PyArrow version: 8.0.0 - Pandas version: 1.4.2 Hi! You can pass `contiguous=True` to `.shard()` get contiguous shards. More info on this and the default behavior can be found in the [docs](https://huggingface.co/docs/datasets/v2.3.2/en/package_reference/main_classes#datasets.Dataset.shard). EDIT: Answered as you closed the thread 😄
[ -1.2908140420913696, -0.8572862148284912, -0.6754499673843384, 1.4188450574874878, -0.1245664581656456, -1.259812355041504, 0.11899888515472412, -0.9813809394836426, 1.6679095029830933, -0.7765709161758423, 0.29810410737991333, -1.617021918296814, 0.11463482677936554, -0.546627402305603, -0.7404041290283203, -0.8351126909255981, -0.4415246248245239, -0.695136308670044, 1.0852916240692139, 2.4089176654815674, 1.230008602142334, -1.4101191759109497, 2.6870946884155273, 0.709444522857666, -0.16329838335514069, -1.0225976705551147, 0.5452837944030762, -0.03189336881041527, -1.3292081356048584, -0.3707057237625122, -0.888137936592102, -0.026543844491243362, -0.6071596145629883, -0.5631817579269409, 0.044849943369627, 0.4567355811595917, -0.17956332862377167, -0.48434126377105713, -0.534027099609375, -0.7436091899871826, 0.5109724998474121, -0.37158599495887756, 0.8633742332458496, -0.38090699911117554, 1.8100260496139526, -0.6146689653396606, 0.5442177057266235, 0.7670443058013916, 1.355595350265503, 0.1644691824913025, -0.030356252565979958, 0.40089908242225647, 0.40836918354034424, -0.023779720067977905, 0.47536516189575195, 1.2022640705108643, 0.6778813600540161, 0.49818435311317444, 0.7554978132247925, -2.2692513465881348, 1.3248237371444702, -0.994697093963623, 0.32415807247161865, 1.2956007719039917, -1.0257149934768677, 0.39577579498291016, -1.7676559686660767, -0.07024459540843964, 0.5370757579803467, -2.2563250064849854, 0.1895163655281067, -1.3348885774612427, -0.44090551137924194, 1.0294477939605713, 0.421064555644989, -1.1919306516647339, 0.04430714249610901, -0.44673633575439453, 1.0127756595611572, 0.458779901266098, 1.1647971868515015, -1.5831053256988525, 0.013458449393510818, -0.2711131274700165, 0.16801771521568298, -1.2725220918655396, -1.5708298683166504, 0.5489857196807861, 0.7312918901443481, 0.5128644704818726, -0.19416362047195435, 1.0461056232452393, -0.9667606353759766, 0.7846729755401611, -0.9288197755813599, -1.7415438890457153, -1.4845868349075317, -2.311511516571045, -2.2918643951416016, 0.7764790058135986, -0.4504356384277344, -0.48584285378456116, 2.0726001262664795, -1.1348328590393066, -1.8059712648391724, 1.09066641330719, 0.24172157049179077, 0.04143906384706497, 2.304995536804199, 0.15851369500160217, -0.7525452375411987, 0.453669011592865, -0.7676504850387573, 0.7230888605117798, -0.32984116673469543, 1.285531997680664, 0.44228413701057434, -1.0874942541122437, 1.5871846675872803, -0.3171673119068146, 0.5781583786010742, -0.6865822076797485, -0.42956364154815674, -0.7467069625854492, 0.28826263546943665, 1.924085259437561, -0.34199920296669006, 1.5483468770980835, -0.3465167284011841, -1.6139801740646362, -1.5703822374343872, 0.7964111566543579, 0.585991621017456, -0.7272807359695435, 0.1146153137087822, -0.40529942512512207, 0.17751944065093994, -0.03678297623991966, 1.1187094449996948, 1.2617104053497314, 0.7935632467269897, -0.364186555147171, -0.8855888843536377, 0.19908645749092102, 0.026895202696323395, -0.6736816167831421, -1.8064610958099365, -0.31689342856407166, 0.12059421837329865, 0.6562608480453491, -1.1143656969070435, 1.8267853260040283, 0.8857380151748657, 1.9468905925750732, 1.0159010887145996, -0.3541003465652466, 1.5425775051116943, 0.10097838193178177, 1.906151294708252, -0.41598567366600037, 0.6632819175720215, -0.38328230381011963, -1.2004282474517822, 0.8204195499420166, -0.28656768798828125, -2.0863845348358154, -0.7296942472457886, -0.7535064220428467, -0.14369580149650574, -0.7950643301010132, 0.9081465005874634, -0.3009268641471863, -1.3624640703201294, 0.2387738972902298, -0.6798782348632812, 0.1916186362504959, -1.1906079053878784, 0.28305163979530334, 0.7612532377243042, -0.678133487701416, 0.08220663666725159, -0.32048189640045166, -1.2319751977920532, -0.5058842301368713, 0.29260092973709106, 1.791888952255249, -0.7636171579360962, 0.9938305616378784, 1.073769450187683, -0.6519944667816162, -0.0512658953666687, 0.3249756097793579, -0.2605830729007721, 0.8755444288253784, -1.0447320938110352, -0.41470783948898315, 1.2258641719818115, -0.2412729412317276, -0.6035563945770264, 1.5196337699890137, 0.7328912019729614, -0.9637302160263062, -0.19237250089645386, -0.09570971876382828, -0.8509074449539185, -0.0241929292678833, -1.6566555500030518, -0.12858879566192627, 0.46283993124961853, -1.5098048448562622, -0.47878575325012207, -0.13749323785305023, 1.334167242050171, -0.11034848541021347, 1.4281271696090698, -0.30095264315605164, -0.1447496861219406, -0.4525969326496124, -0.34459826350212097, 0.15276814997196198, -0.14379675686359406, -0.6621954441070557, 0.2753944993019104, -0.8406838178634644, 0.34437820315361023, 1.3978313207626343, 0.33457228541374207, 0.02361268922686577, 0.5586937665939331, 1.1995376348495483, 0.34840327501296997, -0.1032261922955513, -0.8834906816482544, -1.598222017288208, 2.0064444541931152, -1.4331252574920654, 1.9741780757904053, 0.7498056888580322, -0.045110102742910385, -1.7759311199188232, -1.8463685512542725, 1.3966970443725586, 1.0872344970703125, 2.3577091693878174, 0.5115616321563721, 0.4316871762275696, -0.7893762588500977, -0.6536300182342529, 0.4164668619632721, -1.0026285648345947, -0.7764993906021118, 0.10487822443246841, 2.3246560096740723, 1.759145975112915, -0.3639741539955139, -0.23298004269599915, -1.015766978263855, 1.3469305038452148, -0.1300225555896759, 0.23306286334991455, 1.9870741367340088, -0.2575207054615021, -1.0349292755126953, 1.2648863792419434, -2.3125243186950684, 0.1933022439479828, 2.0391151905059814, 0.26200416684150696, 0.07682432234287262, -1.4366642236709595, -0.5980615615844727, -0.1831393986940384, -0.46282175183296204, -1.2906039953231812, 0.5524886846542358, -0.2766820788383484, -0.8055012226104736, -1.3195139169692993, 0.14625242352485657, -1.1687244176864624, -1.6733025312423706, 0.25837060809135437, 1.8619588613510132, 2.004612684249878, -0.6724768877029419, 1.5085375308990479, -0.27224600315093994, 0.15485121309757233, 1.2075918912887573, 1.2041422128677368, 3.178799629211426, 1.8846944570541382, -1.3961228132247925, 0.6192045211791992, -0.21166090667247772, -0.4581536650657654, 1.134742259979248, -1.2025898694992065, 1.2221342325210571, -0.20712819695472717, -1.2938570976257324, -1.2223734855651855, 1.0092222690582275, 0.4595774710178375, 0.08360933512449265, -0.4465700685977936, 1.2670992612838745, 0.0890866369009018, 1.4152531623840332, 0.5465335845947266, -0.3333640992641449, 0.6251981258392334, -0.3551831543445587, -0.5530201196670532, 1.5326712131500244, 0.1485293060541153, -1.430328607559204, -2.2318198680877686, -0.19483129680156708, -0.8592745065689087, 0.07234492152929306, -0.6586517095565796, -0.9633384943008423, 1.5769195556640625, 0.39775577187538147, -1.2989022731781006, -0.25299808382987976, -0.3652297258377075, -0.6264923810958862, 2.669513702392578, -1.348129153251648, -0.2826783359050751, -1.0237122774124146, -0.5965762138366699, 1.6023485660552979, -1.220772385597229, -0.23534414172172546, -0.9544923305511475, -0.49573490023612976, -1.2049708366394043, -0.6486715078353882, -0.006794973276555538, -0.9411520957946777, 0.7890644073486328, 0.12295152246952057, -1.1756945848464966, -0.3316442370414734, -0.9078642129898071, 0.8861948251724243, -0.14524608850479126, 0.15075689554214478, 1.8453198671340942, 0.3815225064754486, -0.39792174100875854, 0.7745345830917358, 1.1163814067840576, 0.6325535774230957, -0.5898712873458862, 0.2368432730436325, -0.6485728025436401, 0.33065271377563477, -1.3100358247756958, 0.301307737827301, -2.866433620452881, 0.6125936508178711, -0.06093795970082283, 0.012986350804567337, -0.09569495916366577, -1.3239610195159912, 0.980819582939148, 2.5943386554718018, -1.1819918155670166, 0.5649701356887817, 0.30577731132507324, 1.1851143836975098, -1.5832611322402954, 0.2868955135345459, -0.5242847204208374, 2.126812219619751, 0.20841696858406067, 1.2802058458328247, -0.4543335437774658, -2.326036214828491, 0.6444872617721558, -1.2183936834335327, -1.1308205127716064, 0.8065320253372192, -0.9004828929901123, 0.1434955894947052, -1.3405683040618896, -0.2856089770793915, -0.8309457302093506, -1.1676732301712036, 0.6596971750259399, 0.13646848499774933, 0.47848281264305115, -0.6422877311706543, 0.29939424991607666, -2.233189821243286, -1.2967122793197632, -0.29043832421302795, -0.9989415407180786, 0.41670840978622437, -0.3351965546607971, 0.6913975477218628, -0.13727876543998718, -0.03212776780128479, 0.28002655506134033, 1.4325429201126099, 3.348257541656494, 0.24921464920043945, 0.28727588057518005, -0.20567922294139862, -0.9513828754425049, 1.480954885482788, 0.9189783334732056, -0.20304478704929352, -0.6284435987472534, -1.0549044609069824, 1.2887649536132812, 1.8938943147659302, 0.9764831066131592, -0.016395820304751396, -0.8540569543838501, -0.8075670003890991, 0.043841246515512466, 0.12470971047878265, 0.5557560920715332, 0.8618896007537842, 0.08187070488929749, 0.11163626611232758, 1.3580552339553833, 1.190904140472412, -0.4009343683719635, 0.3262374699115753, -0.9287413358688354, -0.4416021704673767, 0.5271562337875366, 0.2996334731578827, 0.02846454083919525, 0.3174959123134613, -1.0387223958969116, -0.16563905775547028, -0.3216877579689026, -0.9496314525604248, -0.7615945339202881, -0.38604310154914856, -0.3867114186286926, 1.5975240468978882, 0.11273910105228424, -0.5559084415435791, -0.03764517977833748, -0.7842276096343994, -0.18644118309020996, -1.0300612449645996, 0.32943210005760193, -0.12178923934698105, -0.03290664404630661, -0.16531893610954285, 1.7140741348266602, -0.9611467123031616, -2.1112265586853027, 0.306301474571228, 0.1512325257062912, -0.365530788898468, 0.17674706876277924, 1.7672796249389648, 0.5782178640365601, 1.3315142393112183, 1.4240533113479614, 0.9531816244125366, -0.5992914438247681, -1.2353523969650269, 0.6892118453979492, 0.944022536277771, -1.4668747186660767, 0.7786649465560913, -0.021749358624219894, -0.5237019062042236, 0.6987777948379517, 1.2963902950286865, 0.5189715623855591, -2.0927629470825195, 0.7987569570541382, -0.9952621459960938, 0.7527956962585449, 0.7665187120437622, 0.7280303239822388, 0.16750949621200562, 0.8263590335845947, -1.259863257408142, -1.1343071460723877, -0.6436156034469604, -0.6992224454879761, 1.9459009170532227, -0.2981307804584503, 0.5478343963623047, -0.21257846057415009, -1.3360862731933594, -0.12702378630638123, 0.6226329803466797, 0.20033219456672668, -0.4370954930782318, 0.805716872215271, -0.7034307718276978, -1.1510357856750488, -1.3750483989715576, -0.49075859785079956, -1.0034245252609253, -0.8473814725875854, 1.0375474691390991, 0.7107027769088745, 0.35447564721107483, 1.8384238481521606, 0.6322498321533203, 0.1998293399810791, -2.6919212341308594, 0.8583799600601196, 0.2861573100090027, -0.08908749371767044, 0.8242297172546387, 0.27433517575263977, 1.0424875020980835, -0.06321064382791519, 0.5411393642425537, -2.5105323791503906, 2.3167028427124023, -0.27668508887290955, 0.7139750719070435, 0.01702575944364071, -0.1290043294429779, 1.107107400894165, 0.6180765628814697, 0.5971935987472534, -1.1099389791488647, 0.7506814002990723, -0.6433882713317871, 1.1884217262268066, 0.7981781959533691, -0.8270542621612549, -0.05404028296470642, 1.3307665586471558, 0.43421146273612976, -0.5329588651657104, -0.8874551057815552, -0.9824857711791992, 0.9482669830322266, 1.8216193914413452, -0.04339316487312317, 0.06480184942483902, 0.852566123008728, 0.6990718841552734, -1.2607967853546143, 0.08095155656337738, -0.7040948867797852, -0.6755235195159912, 1.645085096359253, 2.0401484966278076, -0.13875597715377808, -0.14740391075611115, -0.7713534832000732, -1.283053994178772, 0.7862370014190674, -0.04920106381177902, 0.06117592006921768, 0.6352200508117676, -0.6064192056655884, 1.156324863433838, 0.9077967405319214, 0.9294214248657227, 0.18276627361774445, 0.23370786011219025, 0.3062058985233307, -0.3013662099838257, -1.1740708351135254, -0.24279935657978058, -1.0120049715042114, -2.5038230419158936, 0.4160621762275696, -0.22052326798439026, -1.3699249029159546, 0.026074163615703583, -1.0422945022583008, 0.8497925996780396, -0.59937584400177, -1.1077929735183716, -1.4605011940002441, 0.2045864760875702, -0.00939343124628067, 0.836173415184021, -1.6370124816894531, -0.1226004958152771, 1.2287181615829468, 0.9092663526535034, -0.656253457069397, 1.0237733125686646, 0.33705809712409973, 0.9357399940490723, 0.8737444877624512, -0.4256359338760376, 0.4651486277580261, 0.1652049720287323, -1.3514560461044312, 0.4255833625793457, 1.1896778345108032, 0.10631129145622253, 1.5252330303192139, -0.5547438859939575, 0.02026018686592579, 0.3755195736885071, -0.5583173036575317, -0.5054968595504761, -0.5678740739822388, 0.6769140958786011, 0.02541777864098549, -0.9377144575119019, -0.002437138929963112, -0.06262083351612091, -0.23997779190540314, 0.22985321283340454, -1.4754314422607422, -0.1742173731327057, -0.3322547972202301, -0.6510971784591675, -1.2492843866348267, -0.026695294305682182, 1.4150199890136719, -0.8170711994171143, -0.2104937881231308, 0.5442686080932617, 0.26437249779701233, 0.537830114364624, 0.6486423015594482, -0.6861276626586914, -0.30087336897850037, -0.2015451043844223, -0.30891332030296326, 0.2895950675010681, 1.3043782711029053, -0.11017497628927231, -0.9372342824935913, 0.6950423717498779, -0.28621232509613037, 0.07888147234916687, 1.9336940050125122, 0.12557776272296906, -0.7634549140930176, 0.3130073547363281, -0.8096799850463867, 1.9131474494934082, 1.7077513933181763, 1.3939385414123535, -0.08904723823070526, -0.9522799253463745, 0.5776251554489136, -0.3402217924594879, -0.3831023573875427, 0.8789364099502563, 0.47715696692466736, -0.2218051701784134, -1.3301841020584106, 0.6896111965179443, 1.226386308670044, -0.8978769779205322, -0.7681540250778198, 0.07433614134788513, -0.7496169805526733, 1.1424343585968018, 0.6991344690322876, 0.37765008211135864, 0.20110154151916504, 1.6556426286697388, 0.7924507856369019, -0.4486404061317444, 0.5543369054794312, 0.46249523758888245, -0.11944308876991272, -2.13663911819458, -1.1259618997573853, 0.3247799575328827, -0.39673036336898804, -1.6173406839370728, 1.4118530750274658, -1.1836931705474854, -0.9900251626968384, 0.5506360530853271, 0.047498736530542374, 1.420293927192688, 0.34957459568977356, 1.6618553400039673, 1.9891550540924072, 0.911585807800293, 0.40024039149284363, 1.313215732574463, -0.1404813528060913, -0.39048150181770325, 1.7952065467834473, -0.48605185747146606, 0.4473561644554138, 1.0706723928451538, -0.3463171422481537, -1.0679378509521484, -0.7585397958755493, -1.2468169927597046, -0.7767117023468018, 1.1390398740768433, 0.07959017157554626, -1.1044336557388306, 0.3065943121910095, 1.5249805450439453, 0.10403043776750565, -0.17945511639118195, 0.6346346139907837, 0.446778804063797, -0.7719215154647827, -0.11289634555578232, -0.9129563570022583, 0.5469917058944702, -0.285054087638855, -0.42792290449142456, 0.33636921644210815, 0.4667888879776001, 1.290087103843689, -0.031929127871990204, 0.04287093132734299, 1.2717515230178833, -1.4711122512817383, 1.4741923809051514, -0.7501296997070312, 0.32054075598716736, -2.3684537410736084, 1.3779834508895874, -0.8288223743438721, 1.949647068977356, -2.666569232940674, 0.4439023435115814, -0.6126223802566528, -0.46863535046577454, 0.29705387353897095, -0.28013962507247925, 0.04818213731050491, -0.15758728981018066, -1.1695733070373535, -0.09011451154947281, -0.7325716018676758, 0.6565171480178833, 1.1459325551986694, 1.396219253540039, -1.1236567497253418, -0.21132193505764008, -1.6720893383026123, -0.1989171952009201, -0.6515934467315674, 0.3788425326347351, -1.9490846395492554, -0.1277330219745636, -1.9966788291931152, -2.3810625076293945, -1.2778273820877075, -0.8508293628692627, 1.1265358924865723, 0.16058656573295593, -0.8333048820495605, 1.1440950632095337, -0.3732834458351135, -1.8617342710494995, 1.1059669256210327, -2.1786584854125977 ]
https://github.com/huggingface/datasets/issues/4570
Dataset sharding non-contiguous?
Hahaha I'm sorry; my excuse is: it's Sunday. (Which makes me all the more grateful for your response :smiley:
## Describe the bug I'm not sure if this is a bug; more likely normal behavior but i wanted to double check. Is it normal that `datasets.shard` does not produce chunks that, when concatenated produce the original ordering of the sharded dataset? This might be related to this pull request (https://github.com/huggingface/datasets/pull/4466) but I have to admit I did not properly look into the changes made. ## Steps to reproduce the bug ```python max_shard_size = convert_file_size_to_int('300MB') dataset_nbytes = dataset.data.nbytes num_shards = int(dataset_nbytes / max_shard_size) + 1 num_shards = max(num_shards, 1) print(f"{num_shards=}") for shard_index in range(num_shards): shard = dataset.shard(num_shards=num_shards, index=shard_index) shard.to_parquet(f"tokenized/tokenized-{shard_index:03d}.parquet") os.listdir('tokenized/') ``` ## Expected results I expected the shards to match the order of the data of the original dataset; i.e. `dataset[10]` being the same as `shard_1[10]` for example ## Actual results Only the first element is the same; i.e. `dataset[0]` is the same as `shard_1[0]` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-4.15.0-176-generic-x86_64-with-glibc2.31 - Python version: 3.10.4 - PyArrow version: 8.0.0 - Pandas version: 1.4.2
683
19
Dataset sharding non-contiguous? ## Describe the bug I'm not sure if this is a bug; more likely normal behavior but i wanted to double check. Is it normal that `datasets.shard` does not produce chunks that, when concatenated produce the original ordering of the sharded dataset? This might be related to this pull request (https://github.com/huggingface/datasets/pull/4466) but I have to admit I did not properly look into the changes made. ## Steps to reproduce the bug ```python max_shard_size = convert_file_size_to_int('300MB') dataset_nbytes = dataset.data.nbytes num_shards = int(dataset_nbytes / max_shard_size) + 1 num_shards = max(num_shards, 1) print(f"{num_shards=}") for shard_index in range(num_shards): shard = dataset.shard(num_shards=num_shards, index=shard_index) shard.to_parquet(f"tokenized/tokenized-{shard_index:03d}.parquet") os.listdir('tokenized/') ``` ## Expected results I expected the shards to match the order of the data of the original dataset; i.e. `dataset[10]` being the same as `shard_1[10]` for example ## Actual results Only the first element is the same; i.e. `dataset[0]` is the same as `shard_1[0]` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-4.15.0-176-generic-x86_64-with-glibc2.31 - Python version: 3.10.4 - PyArrow version: 8.0.0 - Pandas version: 1.4.2 Hahaha I'm sorry; my excuse is: it's Sunday. (Which makes me all the more grateful for your response :smiley:
[ -1.2943203449249268, -0.8839811682701111, -0.687293529510498, 1.4278627634048462, -0.10730022192001343, -1.257835865020752, 0.11214650422334671, -0.9738796949386597, 1.6680831909179688, -0.7713564038276672, 0.28017520904541016, -1.6261131763458252, 0.09992462396621704, -0.5330336093902588, -0.7276362180709839, -0.8258154392242432, -0.4290800988674164, -0.7199044823646545, 1.0893653631210327, 2.417850971221924, 1.2111985683441162, -1.4268232583999634, 2.7044670581817627, 0.6931214928627014, -0.14699044823646545, -1.0270417928695679, 0.5558086037635803, -0.03522031754255295, -1.3336670398712158, -0.37888506054878235, -0.8825304508209229, -0.017923207953572273, -0.6029195189476013, -0.5531083941459656, 0.041256632655858994, 0.45163002610206604, -0.16381993889808655, -0.501338541507721, -0.538711428642273, -0.7429791688919067, 0.5037630796432495, -0.37244221568107605, 0.8561525344848633, -0.3754868507385254, 1.807008147239685, -0.596613347530365, 0.5336849689483643, 0.7623669505119324, 1.3534629344940186, 0.1749608814716339, -0.03013228438794613, 0.39311930537223816, 0.4099859893321991, -0.028776993975043297, 0.4709133207798004, 1.1918224096298218, 0.6625329852104187, 0.5002967119216919, 0.7574504613876343, -2.270521879196167, 1.3443524837493896, -0.9959865808486938, 0.3257702887058258, 1.2968475818634033, -1.0275920629501343, 0.39020320773124695, -1.7650916576385498, -0.05963849276304245, 0.5472243428230286, -2.2401695251464844, 0.20341289043426514, -1.316185474395752, -0.4407743215560913, 1.0111156702041626, 0.42523232102394104, -1.186971664428711, 0.041379570960998535, -0.4508146643638611, 1.0056097507476807, 0.46314680576324463, 1.1818286180496216, -1.5780301094055176, 0.010096782818436623, -0.2670614719390869, 0.16675245761871338, -1.273805856704712, -1.5863606929779053, 0.5500114560127258, 0.7271581292152405, 0.5115013718605042, -0.1842629313468933, 1.038040041923523, -0.9764534831047058, 0.7853221297264099, -0.9310940504074097, -1.7377837896347046, -1.4720546007156372, -2.3209707736968994, -2.2967569828033447, 0.7713374495506287, -0.4627291262149811, -0.47951555252075195, 2.072951316833496, -1.135274052619934, -1.7997299432754517, 1.1004287004470825, 0.25186553597450256, 0.05598633736371994, 2.310698986053467, 0.1707475781440735, -0.7641633749008179, 0.45310360193252563, -0.7778809070587158, 0.7170640230178833, -0.32055777311325073, 1.2796002626419067, 0.4444740116596222, -1.0491031408309937, 1.5808285474777222, -0.3127516508102417, 0.5902782678604126, -0.6798253059387207, -0.42186257243156433, -0.7481288909912109, 0.29156237840652466, 1.9221711158752441, -0.32930102944374084, 1.5516818761825562, -0.34714511036872864, -1.620615839958191, -1.5773054361343384, 0.7950500845909119, 0.5697459578514099, -0.7479410171508789, 0.12439582496881485, -0.41607666015625, 0.18443071842193604, -0.03597252815961838, 1.123433232307434, 1.2702773809432983, 0.7915589213371277, -0.36465635895729065, -0.9040039777755737, 0.1951647400856018, 0.017621632665395737, -0.6642270684242249, -1.8087855577468872, -0.3144644796848297, 0.12429878860712051, 0.675219714641571, -1.1283293962478638, 1.8123053312301636, 0.9027469158172607, 1.9560812711715698, 1.023881196975708, -0.3499332666397095, 1.5314286947250366, 0.10802114754915237, 1.8806096315383911, -0.42205822467803955, 0.6588934659957886, -0.3852057456970215, -1.1833775043487549, 0.8265424370765686, -0.2933023273944855, -2.0701136589050293, -0.7433448433876038, -0.7795832753181458, -0.15561527013778687, -0.7884348630905151, 0.914627194404602, -0.29938390851020813, -1.3694788217544556, 0.25227245688438416, -0.6923373937606812, 0.19409021735191345, -1.1822125911712646, 0.27527132630348206, 0.7569221258163452, -0.6652477383613586, 0.07428213208913803, -0.312102347612381, -1.2570258378982544, -0.49308937788009644, 0.3131294250488281, 1.790414571762085, -0.7746597528457642, 0.9883410930633545, 1.0786209106445312, -0.6523715257644653, -0.032639600336551666, 0.3165826201438904, -0.251264363527298, 0.8722957968711853, -1.0523182153701782, -0.41479605436325073, 1.2186813354492188, -0.24112451076507568, -0.6071144938468933, 1.528939127922058, 0.7271855473518372, -0.9682915210723877, -0.18984168767929077, -0.0882435292005539, -0.8604444861412048, -0.027980877086520195, -1.6565353870391846, -0.1449742317199707, 0.441999226808548, -1.5152957439422607, -0.4938699007034302, -0.14449098706245422, 1.3386743068695068, -0.09767930954694748, 1.4240031242370605, -0.3016369938850403, -0.14624324440956116, -0.45131969451904297, -0.3369152843952179, 0.16666215658187866, -0.16025570034980774, -0.654304563999176, 0.27882257103919983, -0.8567258715629578, 0.33865252137184143, 1.3955873250961304, 0.35613420605659485, 0.018378660082817078, 0.5600411295890808, 1.1950562000274658, 0.35560986399650574, -0.08489644527435303, -0.878507137298584, -1.5989995002746582, 2.0117270946502686, -1.4480161666870117, 1.9782713651657104, 0.7415627837181091, -0.05763418227434158, -1.773607611656189, -1.8596062660217285, 1.3998150825500488, 1.0822006464004517, 2.3516533374786377, 0.5101924538612366, 0.4178142547607422, -0.7929079532623291, -0.6603513956069946, 0.40571796894073486, -0.9943050146102905, -0.7703120112419128, 0.08389600366353989, 2.3290393352508545, 1.7531853914260864, -0.38146471977233887, -0.22230932116508484, -0.9942348003387451, 1.3467822074890137, -0.1341763436794281, 0.23301973938941956, 2.004394054412842, -0.25072574615478516, -1.031960129737854, 1.2637360095977783, -2.3210251331329346, 0.2082766890525818, 2.0475146770477295, 0.2697255611419678, 0.07422950118780136, -1.443699598312378, -0.6022838950157166, -0.19640231132507324, -0.45228034257888794, -1.2879183292388916, 0.5665193796157837, -0.2603314518928528, -0.8158164620399475, -1.338742733001709, 0.15021270513534546, -1.164483666419983, -1.679471731185913, 0.2694765329360962, 1.8633582592010498, 2.0189871788024902, -0.6752654314041138, 1.4912683963775635, -0.2683529257774353, 0.15521690249443054, 1.2101311683654785, 1.1778404712677002, 3.165952205657959, 1.8766006231307983, -1.3858404159545898, 0.6097225546836853, -0.1971435248851776, -0.4594760835170746, 1.1241201162338257, -1.190337061882019, 1.206652283668518, -0.20422330498695374, -1.270574688911438, -1.207790732383728, 1.0071871280670166, 0.4588460326194763, 0.07493622601032257, -0.45251956582069397, 1.2677433490753174, 0.07883288711309433, 1.4017499685287476, 0.5363196134567261, -0.33485880494117737, 0.6207746267318726, -0.3606700599193573, -0.5627630352973938, 1.53364098072052, 0.14960068464279175, -1.4558013677597046, -2.2264788150787354, -0.19439968466758728, -0.8558558225631714, 0.08451724052429199, -0.6488287448883057, -0.9723206162452698, 1.5707942247390747, 0.3987062871456146, -1.280771255493164, -0.25294435024261475, -0.379138320684433, -0.6296940445899963, 2.6582822799682617, -1.3449877500534058, -0.28237152099609375, -1.02438223361969, -0.5860163569450378, 1.5963811874389648, -1.224997639656067, -0.23405730724334717, -0.9766625761985779, -0.5059489011764526, -1.2093899250030518, -0.6369770169258118, -0.00584638025611639, -0.9371435046195984, 0.7915278077125549, 0.11386483907699585, -1.1701570749282837, -0.3026922047138214, -0.9051624536514282, 0.8866119980812073, -0.13526612520217896, 0.16296052932739258, 1.834928035736084, 0.36892640590667725, -0.40982088446617126, 0.7706164717674255, 1.1223441362380981, 0.6383805274963379, -0.595367968082428, 0.21314430236816406, -0.6263872385025024, 0.34079092741012573, -1.3182110786437988, 0.2960081398487091, -2.8733913898468018, 0.6173990964889526, -0.05149522051215172, 0.023716527968645096, -0.08993048220872879, -1.3218110799789429, 0.9995369911193848, 2.593424081802368, -1.184892177581787, 0.5642526149749756, 0.315701425075531, 1.1872596740722656, -1.5770870447158813, 0.3032130300998688, -0.5235053300857544, 2.1350340843200684, 0.21630516648292542, 1.26393461227417, -0.46082547307014465, -2.320098400115967, 0.6395689249038696, -1.2252366542816162, -1.121489405632019, 0.7983123660087585, -0.9158946871757507, 0.13906216621398926, -1.3547800779342651, -0.2733460068702698, -0.8305109143257141, -1.1608238220214844, 0.6532502174377441, 0.12768197059631348, 0.4632892310619354, -0.6423020362854004, 0.2953222692012787, -2.24594783782959, -1.3153386116027832, -0.28087908029556274, -1.001050591468811, 0.413339763879776, -0.3551449775695801, 0.6848068237304688, -0.12434080243110657, -0.023210901767015457, 0.27478930354118347, 1.4255900382995605, 3.3521323204040527, 0.23753118515014648, 0.2972794473171234, -0.20057085156440735, -0.9524606466293335, 1.4959611892700195, 0.9189419746398926, -0.19273966550827026, -0.6247981786727905, -1.058419942855835, 1.3044674396514893, 1.9231160879135132, 0.987180233001709, -0.02646348439157009, -0.8505549430847168, -0.7992106676101685, 0.044927362352609634, 0.1341504156589508, 0.5776997804641724, 0.8671969771385193, 0.07179432362318039, 0.10449294000864029, 1.3643348217010498, 1.1785725355148315, -0.39926156401634216, 0.3344184458255768, -0.9367812871932983, -0.44137945771217346, 0.5263048410415649, 0.2933341860771179, 0.03225989639759064, 0.32450804114341736, -1.0388102531433105, -0.16002967953681946, -0.3118085563182831, -0.9381204843521118, -0.7577427625656128, -0.3849218487739563, -0.3762763738632202, 1.6049188375473022, 0.132083922624588, -0.5635187029838562, -0.02957243099808693, -0.783666729927063, -0.1782042384147644, -1.0400022268295288, 0.32729628682136536, -0.11784296482801437, -0.03389240801334381, -0.16436341404914856, 1.713719129562378, -0.9727541208267212, -2.1152939796447754, 0.2994703948497772, 0.1521451771259308, -0.35441112518310547, 0.17008408904075623, 1.756796956062317, 0.5697881579399109, 1.3281595706939697, 1.417889952659607, 0.9550052285194397, -0.6097003221511841, -1.2454307079315186, 0.6740109324455261, 0.9373461604118347, -1.4463809728622437, 0.7871845364570618, -0.044041309505701065, -0.5322219729423523, 0.6934146285057068, 1.3137810230255127, 0.5149771571159363, -2.090982437133789, 0.8032093644142151, -1.000269889831543, 0.7620655298233032, 0.7564957737922668, 0.7419692277908325, 0.16890743374824524, 0.8205550909042358, -1.2521607875823975, -1.1247823238372803, -0.6585433483123779, -0.7111861705780029, 1.945929765701294, -0.3024139702320099, 0.5298383831977844, -0.19782808423042297, -1.3305108547210693, -0.11420781910419464, 0.6371447443962097, 0.19487711787223816, -0.4172045588493347, 0.7908767461776733, -0.7032228112220764, -1.1649731397628784, -1.3624675273895264, -0.4899945855140686, -0.9848567843437195, -0.8596570491790771, 1.0497385263442993, 0.707423746585846, 0.3609512746334076, 1.849502682685852, 0.6266458034515381, 0.20101764798164368, -2.688675880432129, 0.8669753670692444, 0.2968539893627167, -0.07919847220182419, 0.835442066192627, 0.26893940567970276, 1.0528545379638672, -0.058332644402980804, 0.5428199172019958, -2.4947190284729004, 2.307595729827881, -0.2813848555088043, 0.7262089848518372, 0.010938279330730438, -0.1316867470741272, 1.1145859956741333, 0.6221356391906738, 0.6188986301422119, -1.1126129627227783, 0.7551658749580383, -0.634147584438324, 1.1779589653015137, 0.8115746974945068, -0.8170581459999084, -0.0493205226957798, 1.322576642036438, 0.4387151598930359, -0.527694582939148, -0.9085108637809753, -0.9747359156608582, 0.9496236443519592, 1.825636386871338, -0.04983580857515335, 0.06852863729000092, 0.8488509058952332, 0.6881210803985596, -1.2638218402862549, 0.07310811430215836, -0.7085440158843994, -0.6764314770698547, 1.658807396888733, 2.057304620742798, -0.13696902990341187, -0.13704842329025269, -0.7670300602912903, -1.2952669858932495, 0.7703620791435242, -0.055861279368400574, 0.05645009130239487, 0.6326613426208496, -0.6010693311691284, 1.1625198125839233, 0.8814889192581177, 0.9326775074005127, 0.1528247892856598, 0.23574772477149963, 0.3022145926952362, -0.28330546617507935, -1.173763394355774, -0.25886407494544983, -1.0132652521133423, -2.499171733856201, 0.40851661562919617, -0.22369790077209473, -1.3831861019134521, 0.022098485380411148, -1.0314675569534302, 0.8548927903175354, -0.5837528109550476, -1.0918469429016113, -1.459603190422058, 0.19571372866630554, -0.01710077002644539, 0.8352132439613342, -1.6316791772842407, -0.13219811022281647, 1.241094946861267, 0.9000890254974365, -0.6523169875144958, 1.0153141021728516, 0.3381108343601227, 0.9322525858879089, 0.8608447313308716, -0.42874160408973694, 0.46655410528182983, 0.17283806204795837, -1.3425230979919434, 0.4351200461387634, 1.196088194847107, 0.1194140836596489, 1.5149075984954834, -0.5419795513153076, 0.01672554388642311, 0.38772308826446533, -0.5603375434875488, -0.4996708333492279, -0.5614997744560242, 0.6836881637573242, 0.03192024677991867, -0.9371368288993835, -0.011757979169487953, -0.06047968193888664, -0.22597181797027588, 0.23379555344581604, -1.4820154905319214, -0.185222327709198, -0.34674301743507385, -0.6513168811798096, -1.259893774986267, -0.02592320367693901, 1.4138219356536865, -0.8194013833999634, -0.22021359205245972, 0.5220569372177124, 0.2838428020477295, 0.5387421250343323, 0.6490848064422607, -0.6853341460227966, -0.30682241916656494, -0.20159801840782166, -0.29996734857559204, 0.2870114743709564, 1.2910226583480835, -0.11366774141788483, -0.9452782869338989, 0.6879364252090454, -0.28571817278862, 0.07984482496976852, 1.9431344270706177, 0.116363026201725, -0.7605657577514648, 0.3031384348869324, -0.8069369792938232, 1.920436143875122, 1.6895266771316528, 1.387035608291626, -0.11015642434358597, -0.9563183188438416, 0.5709715485572815, -0.3382095396518707, -0.3829708695411682, 0.8775919675827026, 0.4836368262767792, -0.22646436095237732, -1.333450198173523, 0.6781539916992188, 1.2234450578689575, -0.905559778213501, -0.7694290280342102, 0.06967280060052872, -0.7586549520492554, 1.1468818187713623, 0.6959311962127686, 0.3896840214729309, 0.19462311267852783, 1.657854437828064, 0.7754997611045837, -0.4640088677406311, 0.5288219451904297, 0.47644126415252686, -0.12652212381362915, -2.1431875228881836, -1.111136555671692, 0.3234138488769531, -0.39533790946006775, -1.6034119129180908, 1.4178682565689087, -1.181705117225647, -0.9892909526824951, 0.537017285823822, 0.053562067449092865, 1.4112317562103271, 0.34372445940971375, 1.6645947694778442, 1.982452630996704, 0.9090663194656372, 0.4258025884628296, 1.3096588850021362, -0.15287548303604126, -0.39843279123306274, 1.8003329038619995, -0.46802037954330444, 0.4469311833381653, 1.0889695882797241, -0.3690391182899475, -1.0631096363067627, -0.7645913362503052, -1.2302591800689697, -0.7598019242286682, 1.1228742599487305, 0.08935517817735672, -1.1205633878707886, 0.3031456768512726, 1.5255441665649414, 0.12148430198431015, -0.19515913724899292, 0.6292802691459656, 0.45900630950927734, -0.7712937593460083, -0.11079888790845871, -0.9290544390678406, 0.5441312193870544, -0.2982717454433441, -0.43079230189323425, 0.3334653079509735, 0.461785227060318, 1.29647958278656, -0.03540193289518356, 0.060375653207302094, 1.2909014225006104, -1.4634437561035156, 1.4781737327575684, -0.7372725605964661, 0.3131122887134552, -2.359919548034668, 1.373445987701416, -0.826674222946167, 1.9666471481323242, -2.6632497310638428, 0.4405415952205658, -0.626151978969574, -0.461785227060318, 0.2934337854385376, -0.27466368675231934, 0.034962113946676254, -0.15502724051475525, -1.1633719205856323, -0.08746437728404999, -0.7443715333938599, 0.6513246297836304, 1.153740644454956, 1.3915103673934937, -1.1075108051300049, -0.20878049731254578, -1.6681451797485352, -0.21333083510398865, -0.6761523485183716, 0.37023836374282837, -1.948008418083191, -0.11632613837718964, -2.013437509536743, -2.3727188110351562, -1.2749557495117188, -0.8508546948432922, 1.132995367050171, 0.17007499933242798, -0.835996150970459, 1.1339411735534668, -0.3690546452999115, -1.8511438369750977, 1.1259593963623047, -2.161414623260498 ]
https://github.com/huggingface/datasets/issues/4570
Dataset sharding non-contiguous?
@mariosasko Sorry for reviving this, but I was curious as to why `contiguous=False` was the default. This might be a personal bias, but I feel that a user would expect the opposite to be the default. :thinking:
## Describe the bug I'm not sure if this is a bug; more likely normal behavior but i wanted to double check. Is it normal that `datasets.shard` does not produce chunks that, when concatenated produce the original ordering of the sharded dataset? This might be related to this pull request (https://github.com/huggingface/datasets/pull/4466) but I have to admit I did not properly look into the changes made. ## Steps to reproduce the bug ```python max_shard_size = convert_file_size_to_int('300MB') dataset_nbytes = dataset.data.nbytes num_shards = int(dataset_nbytes / max_shard_size) + 1 num_shards = max(num_shards, 1) print(f"{num_shards=}") for shard_index in range(num_shards): shard = dataset.shard(num_shards=num_shards, index=shard_index) shard.to_parquet(f"tokenized/tokenized-{shard_index:03d}.parquet") os.listdir('tokenized/') ``` ## Expected results I expected the shards to match the order of the data of the original dataset; i.e. `dataset[10]` being the same as `shard_1[10]` for example ## Actual results Only the first element is the same; i.e. `dataset[0]` is the same as `shard_1[0]` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-4.15.0-176-generic-x86_64-with-glibc2.31 - Python version: 3.10.4 - PyArrow version: 8.0.0 - Pandas version: 1.4.2
683
37
Dataset sharding non-contiguous? ## Describe the bug I'm not sure if this is a bug; more likely normal behavior but i wanted to double check. Is it normal that `datasets.shard` does not produce chunks that, when concatenated produce the original ordering of the sharded dataset? This might be related to this pull request (https://github.com/huggingface/datasets/pull/4466) but I have to admit I did not properly look into the changes made. ## Steps to reproduce the bug ```python max_shard_size = convert_file_size_to_int('300MB') dataset_nbytes = dataset.data.nbytes num_shards = int(dataset_nbytes / max_shard_size) + 1 num_shards = max(num_shards, 1) print(f"{num_shards=}") for shard_index in range(num_shards): shard = dataset.shard(num_shards=num_shards, index=shard_index) shard.to_parquet(f"tokenized/tokenized-{shard_index:03d}.parquet") os.listdir('tokenized/') ``` ## Expected results I expected the shards to match the order of the data of the original dataset; i.e. `dataset[10]` being the same as `shard_1[10]` for example ## Actual results Only the first element is the same; i.e. `dataset[0]` is the same as `shard_1[0]` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-4.15.0-176-generic-x86_64-with-glibc2.31 - Python version: 3.10.4 - PyArrow version: 8.0.0 - Pandas version: 1.4.2 @mariosasko Sorry for reviving this, but I was curious as to why `contiguous=False` was the default. This might be a personal bias, but I feel that a user would expect the opposite to be the default. :thinking:
[ -1.297368049621582, -0.8736146688461304, -0.6865039467811584, 1.4169508218765259, -0.12677551805973053, -1.2570104598999023, 0.11768413335084915, -0.9865431785583496, 1.657961130142212, -0.7787442803382874, 0.2828361988067627, -1.627236008644104, 0.11579763144254684, -0.5470183491706848, -0.7243902087211609, -0.8335344195365906, -0.4352671504020691, -0.7114875912666321, 1.0867546796798706, 2.4186348915100098, 1.2250168323516846, -1.4206308126449585, 2.699429750442505, 0.704696536064148, -0.16287511587142944, -1.0184906721115112, 0.5416005253791809, -0.036787115037441254, -1.326096773147583, -0.37692540884017944, -0.8944920301437378, -0.02070419304072857, -0.6099283695220947, -0.5498253703117371, 0.044259123504161835, 0.45431438088417053, -0.17782831192016602, -0.4823402762413025, -0.5362316370010376, -0.7461100220680237, 0.5051298141479492, -0.37237849831581116, 0.8589110970497131, -0.3717416226863861, 1.8154641389846802, -0.6131844520568848, 0.5330869555473328, 0.7637265920639038, 1.3466062545776367, 0.1648455262184143, -0.02532464638352394, 0.3920529782772064, 0.40242457389831543, -0.02832067757844925, 0.4795386493206024, 1.1878530979156494, 0.673529863357544, 0.4982791543006897, 0.7476660013198853, -2.253462791442871, 1.336201786994934, -0.9908447265625, 0.3187144100666046, 1.3094213008880615, -1.024288535118103, 0.39992985129356384, -1.7707462310791016, -0.06034218892455101, 0.5491058230400085, -2.252708673477173, 0.19127608835697174, -1.324280858039856, -0.44762900471687317, 1.0255274772644043, 0.4120881259441376, -1.1935594081878662, 0.04640248790383339, -0.4500810503959656, 1.017006278038025, 0.46642741560935974, 1.1689928770065308, -1.591185450553894, 0.014321384020149708, -0.2628135681152344, 0.16744519770145416, -1.2857320308685303, -1.5787166357040405, 0.5457908511161804, 0.736985445022583, 0.5158828496932983, -0.18575498461723328, 1.0509775876998901, -0.9744908809661865, 0.7747825980186462, -0.9241970181465149, -1.7399227619171143, -1.4825196266174316, -2.32480525970459, -2.2982537746429443, 0.7753015160560608, -0.45206958055496216, -0.48142313957214355, 2.0715365409851074, -1.1256749629974365, -1.7969344854354858, 1.1005752086639404, 0.2410918027162552, 0.04390741139650345, 2.314249038696289, 0.16172602772712708, -0.7541729807853699, 0.4503045082092285, -0.7685442566871643, 0.7221261858940125, -0.32893306016921997, 1.279957890510559, 0.4484492540359497, -1.0708117485046387, 1.5866310596466064, -0.3179662823677063, 0.5767619609832764, -0.6896334290504456, -0.4225468337535858, -0.7564465999603271, 0.29290369153022766, 1.9221750497817993, -0.33072513341903687, 1.547489881515503, -0.3516775071620941, -1.6157715320587158, -1.5742473602294922, 0.8017920255661011, 0.5759061574935913, -0.733433723449707, 0.12097599357366562, -0.4041590392589569, 0.177066832780838, -0.03586896136403084, 1.1141022443771362, 1.265708565711975, 0.786056637763977, -0.36547619104385376, -0.8898321986198425, 0.19989414513111115, 0.019529040902853012, -0.6787663698196411, -1.8128975629806519, -0.29502665996551514, 0.12293290346860886, 0.6655488610267639, -1.1146767139434814, 1.823491096496582, 0.899032711982727, 1.9309810400009155, 1.0295430421829224, -0.34705036878585815, 1.531187653541565, 0.10093075037002563, 1.880212426185608, -0.4225388169288635, 0.6600279808044434, -0.37754756212234497, -1.1803385019302368, 0.8291983008384705, -0.28412872552871704, -2.078495502471924, -0.7387036681175232, -0.7550973296165466, -0.15337421000003815, -0.7974299788475037, 0.9086488485336304, -0.2993655800819397, -1.3710997104644775, 0.24973605573177338, -0.6683586239814758, 0.19738560914993286, -1.1899268627166748, 0.27739185094833374, 0.750004231929779, -0.6792921423912048, 0.0732242688536644, -0.3299486041069031, -1.2377814054489136, -0.4962502121925354, 0.2967347800731659, 1.793489694595337, -0.7585732936859131, 0.9923651814460754, 1.0770618915557861, -0.6535043120384216, -0.04135489463806152, 0.33063194155693054, -0.2594367265701294, 0.8753666877746582, -1.043445348739624, -0.4111894965171814, 1.2171170711517334, -0.2371172308921814, -0.5938586592674255, 1.5174708366394043, 0.7337902784347534, -0.9607932567596436, -0.19867657124996185, -0.10314003378152847, -0.8540956974029541, -0.023408193141222, -1.6574921607971191, -0.1377817541360855, 0.44132938981056213, -1.5160224437713623, -0.48087233304977417, -0.13727909326553345, 1.337290644645691, -0.12412366271018982, 1.432433843612671, -0.308165043592453, -0.15435399115085602, -0.4421287775039673, -0.34376758337020874, 0.15627627074718475, -0.136477530002594, -0.6516234874725342, 0.2687698304653168, -0.8494108319282532, 0.33974260091781616, 1.3950275182724, 0.34456029534339905, 0.01696585863828659, 0.5478758215904236, 1.1942572593688965, 0.3469979465007782, -0.08401793241500854, -0.8831782937049866, -1.5916885137557983, 1.9930421113967896, -1.434979796409607, 1.9792845249176025, 0.752209484577179, -0.04528941959142685, -1.7834280729293823, -1.8438068628311157, 1.3919912576675415, 1.0955946445465088, 2.3664724826812744, 0.5103467106819153, 0.41890522837638855, -0.7931177616119385, -0.6623386740684509, 0.4021036922931671, -0.9988694190979004, -0.7804473638534546, 0.09508943557739258, 2.3239586353302, 1.7584887742996216, -0.3792071044445038, -0.23582705855369568, -1.0075637102127075, 1.3318678140640259, -0.12799598276615143, 0.23722603917121887, 1.9988471269607544, -0.26798051595687866, -1.0290719270706177, 1.2774850130081177, -2.325132369995117, 0.18850445747375488, 2.035254716873169, 0.265147864818573, 0.07308778911828995, -1.437652826309204, -0.6085547804832458, -0.19552761316299438, -0.4640359878540039, -1.293128490447998, 0.5551838874816895, -0.2698572874069214, -0.8048573136329651, -1.3289564847946167, 0.14865852892398834, -1.175454020500183, -1.6625980138778687, 0.2618112564086914, 1.8638768196105957, 2.0117599964141846, -0.6788341403007507, 1.4999877214431763, -0.2636013925075531, 0.15670345723628998, 1.2149626016616821, 1.2002419233322144, 3.178436756134033, 1.8783217668533325, -1.3870316743850708, 0.6242382526397705, -0.20871108770370483, -0.45104900002479553, 1.1269657611846924, -1.195353627204895, 1.2166250944137573, -0.1991373598575592, -1.2907426357269287, -1.2231833934783936, 1.0064330101013184, 0.4618825912475586, 0.08498428016901016, -0.4476136267185211, 1.2716963291168213, 0.08362562954425812, 1.3987236022949219, 0.5395274758338928, -0.33828863501548767, 0.6208533048629761, -0.3546557128429413, -0.5525028705596924, 1.5344191789627075, 0.1480948030948639, -1.4413431882858276, -2.2196710109710693, -0.1847551017999649, -0.8488934636116028, 0.06602785736322403, -0.6520373225212097, -0.976431667804718, 1.577067255973816, 0.399267315864563, -1.2911558151245117, -0.2486906349658966, -0.37097445130348206, -0.6378422379493713, 2.6543829441070557, -1.3498623371124268, -0.2834552824497223, -1.0209485292434692, -0.5900313258171082, 1.5990277528762817, -1.2243616580963135, -0.23539835214614868, -0.9586769938468933, -0.506360650062561, -1.2197829484939575, -0.6323552131652832, -0.007385969627648592, -0.9412450194358826, 0.794614851474762, 0.11737249046564102, -1.1690584421157837, -0.323472797870636, -0.9094988107681274, 0.8778563737869263, -0.1377522051334381, 0.17098020017147064, 1.8351730108261108, 0.37842315435409546, -0.3986954689025879, 0.7740432024002075, 1.1134870052337646, 0.632399320602417, -0.5936462879180908, 0.2298882156610489, -0.6445162892341614, 0.3384603261947632, -1.3015300035476685, 0.3117418587207794, -2.8726677894592285, 0.6189855337142944, -0.05227040499448776, 0.023504596203565598, -0.10024222731590271, -1.3265827894210815, 0.9903452396392822, 2.593064546585083, -1.171689510345459, 0.5551301836967468, 0.31742173433303833, 1.1927214860916138, -1.5711930990219116, 0.2918769419193268, -0.5169199705123901, 2.1236603260040283, 0.2075902819633484, 1.2700388431549072, -0.4536034166812897, -2.3286995887756348, 0.636988639831543, -1.212262749671936, -1.1346126794815063, 0.8064784407615662, -0.888854444026947, 0.14317353069782257, -1.3489426374435425, -0.28773078322410583, -0.8374477624893188, -1.1647181510925293, 0.6669519543647766, 0.13792723417282104, 0.4729402959346771, -0.6475741267204285, 0.2876977026462555, -2.246135711669922, -1.3077362775802612, -0.2827833294868469, -0.9934459924697876, 0.4088638424873352, -0.3423774540424347, 0.6884996891021729, -0.12853313982486725, -0.025607679039239883, 0.2691642940044403, 1.4344497919082642, 3.357089042663574, 0.2420920878648758, 0.30141520500183105, -0.19940504431724548, -0.9488047361373901, 1.4848408699035645, 0.9084876775741577, -0.19115205109119415, -0.6301665902137756, -1.05418860912323, 1.2982828617095947, 1.896013855934143, 0.9848544001579285, -0.014120535925030708, -0.8500354290008545, -0.8014680743217468, 0.040049515664577484, 0.13103120028972626, 0.5617409348487854, 0.8700373768806458, 0.0684649720788002, 0.11193424463272095, 1.3726989030838013, 1.1868796348571777, -0.3983699083328247, 0.3305664360523224, -0.9333930015563965, -0.4353339374065399, 0.5231054425239563, 0.2902279794216156, 0.04215589538216591, 0.3208692967891693, -1.036468505859375, -0.16211846470832825, -0.31368961930274963, -0.9625187516212463, -0.7568379640579224, -0.3900596797466278, -0.37732958793640137, 1.5931836366653442, 0.13410168886184692, -0.5530696511268616, -0.03210161626338959, -0.7908632755279541, -0.1949535757303238, -1.0320932865142822, 0.3257404863834381, -0.11610137671232224, -0.04300801083445549, -0.1636699140071869, 1.7210522890090942, -0.9749054908752441, -2.113736152648926, 0.3008284568786621, 0.1566937267780304, -0.3497401177883148, 0.18236620724201202, 1.7626850605010986, 0.5759896636009216, 1.3411545753479004, 1.4171265363693237, 0.9577260613441467, -0.5974991917610168, -1.242903470993042, 0.6935939192771912, 0.9386899471282959, -1.4584460258483887, 0.7975118160247803, -0.03806016221642494, -0.5225831270217896, 0.6917592287063599, 1.3051618337631226, 0.5035241842269897, -2.090618848800659, 0.7921816110610962, -1.0017346143722534, 0.7387363910675049, 0.7588714957237244, 0.7334231734275818, 0.17301036417484283, 0.8290443420410156, -1.258495569229126, -1.1297940015792847, -0.643693745136261, -0.6983016729354858, 1.9534993171691895, -0.2973270118236542, 0.5464820861816406, -0.21363845467567444, -1.3375663757324219, -0.11992507427930832, 0.6391755938529968, 0.2116648405790329, -0.4275604486465454, 0.8001235723495483, -0.7043899297714233, -1.1487302780151367, -1.3740642070770264, -0.4852975606918335, -0.9956859350204468, -0.8420137763023376, 1.044041633605957, 0.7214935421943665, 0.34038054943084717, 1.844584584236145, 0.6260968446731567, 0.20487144589424133, -2.696760892868042, 0.8537718653678894, 0.28174418210983276, -0.0793614387512207, 0.845676839351654, 0.26728785037994385, 1.0425199270248413, -0.047176510095596313, 0.5388341546058655, -2.509671449661255, 2.3111565113067627, -0.2797780930995941, 0.7157451510429382, 0.017223108559846878, -0.12881878018379211, 1.1184781789779663, 0.6256362795829773, 0.6131772994995117, -1.1117355823516846, 0.7472461462020874, -0.6389817595481873, 1.1869564056396484, 0.8231064081192017, -0.8226158022880554, -0.048817072063684464, 1.3227849006652832, 0.4366227686405182, -0.5179839134216309, -0.886542558670044, -0.9816855192184448, 0.9394649267196655, 1.828159213066101, -0.03868411108851433, 0.06517264991998672, 0.8419705629348755, 0.6935970783233643, -1.261749505996704, 0.07805022597312927, -0.7086448669433594, -0.6748660802841187, 1.6395877599716187, 2.044673204421997, -0.1378955841064453, -0.14513446390628815, -0.7659968733787537, -1.2882962226867676, 0.7745725512504578, -0.05448346585035324, 0.06510808318853378, 0.6392807960510254, -0.610876202583313, 1.1503729820251465, 0.8989242315292358, 0.9340327978134155, 0.17598390579223633, 0.24082784354686737, 0.31995558738708496, -0.29328012466430664, -1.1700985431671143, -0.26153814792633057, -1.0202076435089111, -2.500077962875366, 0.4115040600299835, -0.22383663058280945, -1.379968523979187, 0.031302787363529205, -1.0416474342346191, 0.8495643734931946, -0.5937771201133728, -1.1053587198257446, -1.469296932220459, 0.2034853994846344, -0.017134029418230057, 0.8343011140823364, -1.6223411560058594, -0.11510592699050903, 1.234696626663208, 0.9036500453948975, -0.6378878355026245, 1.0188566446304321, 0.33613643050193787, 0.928411602973938, 0.862471342086792, -0.43215858936309814, 0.4595088064670563, 0.16639582812786102, -1.3492578268051147, 0.4268324673175812, 1.1867833137512207, 0.11123818904161453, 1.522470235824585, -0.548255205154419, 0.02047649398446083, 0.3753766119480133, -0.559379518032074, -0.5073096752166748, -0.5556792616844177, 0.6734794974327087, 0.028500769287347794, -0.9332274794578552, -0.006848348770290613, -0.05900006368756294, -0.2356429398059845, 0.23178309202194214, -1.4706752300262451, -0.18301823735237122, -0.34343671798706055, -0.6550500988960266, -1.2661751508712769, -0.022943343967199326, 1.4202494621276855, -0.8179248571395874, -0.22347672283649445, 0.5283364057540894, 0.2677144706249237, 0.5366474986076355, 0.6479520201683044, -0.6816540956497192, -0.3026384711265564, -0.20318511128425598, -0.3108387589454651, 0.28380194306373596, 1.293067216873169, -0.12289097160100937, -0.9565876722335815, 0.6950909495353699, -0.2898803949356079, 0.07739228010177612, 1.9459471702575684, 0.1293405145406723, -0.750899076461792, 0.3204956352710724, -0.8013229370117188, 1.9124252796173096, 1.7059968709945679, 1.3976473808288574, -0.1013859435915947, -0.9511266350746155, 0.5755547285079956, -0.34153613448143005, -0.37973976135253906, 0.8915500640869141, 0.48301783204078674, -0.23290462791919708, -1.3386907577514648, 0.6783131957054138, 1.2212738990783691, -0.8939670920372009, -0.7623630166053772, 0.0643412321805954, -0.7620177268981934, 1.1395492553710938, 0.6951797008514404, 0.3873211741447449, 0.1983548253774643, 1.6533199548721313, 0.7680094838142395, -0.4532933235168457, 0.5472914576530457, 0.46939584612846375, -0.11933223158121109, -2.1371889114379883, -1.1219862699508667, 0.31826862692832947, -0.3936964273452759, -1.612793207168579, 1.411217212677002, -1.1858083009719849, -0.9966720342636108, 0.5518506765365601, 0.049975812435150146, 1.4065279960632324, 0.3436131477355957, 1.6668418645858765, 1.9958542585372925, 0.9178057312965393, 0.4027762711048126, 1.2940045595169067, -0.14221903681755066, -0.3946095407009125, 1.8014216423034668, -0.47256946563720703, 0.44783008098602295, 1.077845811843872, -0.34592798352241516, -1.0663533210754395, -0.7626098990440369, -1.2229219675064087, -0.7654203176498413, 1.1370726823806763, 0.07692845165729523, -1.1055479049682617, 0.3025858402252197, 1.5299934148788452, 0.10865821689367294, -0.18345506489276886, 0.6355633735656738, 0.45754867792129517, -0.779087483882904, -0.1087379902601242, -0.9127251505851746, 0.5563994646072388, -0.2995787560939789, -0.426273912191391, 0.3383232355117798, 0.4650183916091919, 1.301712989807129, -0.03977140784263611, 0.056969333440065384, 1.2837940454483032, -1.4697191715240479, 1.475084662437439, -0.7338768243789673, 0.3155824840068817, -2.3708763122558594, 1.3752580881118774, -0.8189200758934021, 1.954007863998413, -2.6648223400115967, 0.44740739464759827, -0.6163415908813477, -0.4659802317619324, 0.2970997095108032, -0.2805820107460022, 0.04923544451594353, -0.1535302698612213, -1.1575546264648438, -0.09255196154117584, -0.737818717956543, 0.644641637802124, 1.1545403003692627, 1.387779712677002, -1.1191312074661255, -0.20668891072273254, -1.6704095602035522, -0.20770031213760376, -0.6737382411956787, 0.3648456335067749, -1.955942153930664, -0.12685252726078033, -2.0033440589904785, -2.382535457611084, -1.2782882452011108, -0.8608918786048889, 1.1332507133483887, 0.1661728471517563, -0.846490740776062, 1.1460787057876587, -0.3751961588859558, -1.8606140613555908, 1.1167809963226318, -2.166748046875 ]
https://github.com/huggingface/datasets/issues/4569
Dataset Viewer issue for sst2
Hi @lewtun, thanks for reporting. I have checked locally and refreshed the preview and it seems working smooth now: ```python In [8]: ds Out[8]: DatasetDict({ train: Dataset({ features: ['idx', 'sentence', 'label'], num_rows: 67349 }) validation: Dataset({ features: ['idx', 'sentence', 'label'], num_rows: 872 }) test: Dataset({ features: ['idx', 'sentence', 'label'], num_rows: 1821 }) }) ``` Could you confirm?
### Link https://huggingface.co/datasets/sst2 ### Description Not sure what is causing this, however it seems that `load_dataset("sst2")` also hangs (even though it downloads the files without problem): ``` Status code: 400 Exception: Exception Message: Give up after 5 attempts with ConnectionError ``` ### Owner No
684
57
Dataset Viewer issue for sst2 ### Link https://huggingface.co/datasets/sst2 ### Description Not sure what is causing this, however it seems that `load_dataset("sst2")` also hangs (even though it downloads the files without problem): ``` Status code: 400 Exception: Exception Message: Give up after 5 attempts with ConnectionError ``` ### Owner No Hi @lewtun, thanks for reporting. I have checked locally and refreshed the preview and it seems working smooth now: ```python In [8]: ds Out[8]: DatasetDict({ train: Dataset({ features: ['idx', 'sentence', 'label'], num_rows: 67349 }) validation: Dataset({ features: ['idx', 'sentence', 'label'], num_rows: 872 }) test: Dataset({ features: ['idx', 'sentence', 'label'], num_rows: 1821 }) }) ``` Could you confirm?
[ -1.1410002708435059, -0.9134712815284729, -0.8809219598770142, 1.6513053178787231, -0.18507534265518188, -1.1462024450302124, 0.03317008167505264, -0.9438244104385376, 1.6704236268997192, -0.6846057772636414, 0.30345892906188965, -1.7111127376556396, 0.025384467095136642, -0.7636823058128357, -0.7698326706886292, -0.7867886424064636, -0.3665671944618225, -0.7541715502738953, 1.030327320098877, 2.522923707962036, 1.1111873388290405, -1.4549447298049927, 2.7244040966033936, 0.7681996822357178, -0.1607094407081604, -1.103430986404419, 0.6082727313041687, -0.09586815536022186, -1.1345105171203613, -0.3515833616256714, -0.9744037389755249, -0.111573725938797, -0.4676755964756012, -0.5583284497261047, -0.11890123784542084, 0.5502904653549194, -0.258157342672348, -0.4843643605709076, -0.4805242419242859, -0.8495562076568604, 0.45469382405281067, -0.37221983075141907, 0.9478145837783813, -0.250895619392395, 1.777168869972229, -0.38977962732315063, 0.306311696767807, 0.5695499777793884, 1.4339094161987305, 0.12214338779449463, -0.09128597378730774, 0.38875335454940796, 0.36239421367645264, -0.01297517865896225, 0.5071055293083191, 1.1782561540603638, 0.7007110118865967, 0.4301685690879822, 0.8886250853538513, -2.309561014175415, 1.1787291765213013, -1.202904462814331, 0.35673660039901733, 1.380785346031189, -1.0065386295318604, 0.3759915828704834, -1.6999434232711792, 0.06746223568916321, 0.6292448043823242, -2.0111517906188965, 0.3977722227573395, -1.1899192333221436, -0.4473058581352234, 0.9389175176620483, 0.4051275849342346, -1.2384216785430908, 0.047383375465869904, -0.3291650414466858, 1.1637274026870728, 0.344633549451828, 1.0487020015716553, -1.6870038509368896, 0.16668161749839783, -0.3224201202392578, 0.05206070467829704, -1.3436084985733032, -1.4800336360931396, 0.5309526920318604, 0.6438478231430054, 0.6698317527770996, -0.1407548189163208, 0.9166646003723145, -1.0374780893325806, 0.6173683404922485, -1.0325207710266113, -1.651891827583313, -1.39451003074646, -2.2370567321777344, -2.2697267532348633, 0.6551675200462341, -0.4795418083667755, -0.5507218241691589, 1.9701250791549683, -0.8544318675994873, -1.7809704542160034, 1.2444595098495483, 0.3826381266117096, 0.11807523667812347, 2.3559467792510986, 0.25728797912597656, -0.7776482105255127, 0.4813591539859772, -0.8356552720069885, 0.841673731803894, -0.3559107184410095, 1.4770838022232056, 0.4863585829734802, -0.9198890328407288, 1.7361040115356445, -0.45172205567359924, 0.5636506676673889, -0.659465491771698, -0.5238712430000305, -0.8336239457130432, 0.34296858310699463, 1.9172977209091187, -0.32234084606170654, 1.4935487508773804, -0.3776761591434479, -1.4864439964294434, -1.460268259048462, 0.8590319752693176, 0.47199150919914246, -0.8584898114204407, 0.1877317875623703, -0.37272536754608154, 0.11491578817367554, -0.20495149493217468, 1.1708147525787354, 1.233926773071289, 0.6144620180130005, -0.3217712640762329, -0.9463139176368713, 0.274257630109787, -0.031201226636767387, -0.7804403901100159, -1.777547836303711, -0.3023053705692291, 0.08322539925575256, 0.6853010654449463, -1.2041126489639282, 1.6351306438446045, 0.7501017451286316, 1.9653645753860474, 0.9526816606521606, -0.3335084021091461, 1.4631786346435547, 0.05369572713971138, 1.8522086143493652, -0.6440259218215942, 0.6372935771942139, -0.3991227149963379, -1.159195065498352, 0.961668074131012, -0.36912500858306885, -2.022237777709961, -0.7947177290916443, -0.9408797025680542, -0.24022601544857025, -0.7893737554550171, 0.9681887626647949, -0.395486444234848, -1.4636908769607544, 0.3763880133628845, -0.8040253520011902, 0.2401166409254074, -1.185500979423523, 0.25699537992477417, 0.712565541267395, -0.5253042578697205, -0.016713066026568413, -0.20370741188526154, -1.2581255435943604, -0.38199886679649353, 0.3640240728855133, 1.909575343132019, -0.8282291293144226, 0.8450146317481995, 1.052151083946228, -0.6373875737190247, -0.022650888189673424, 0.21588140726089478, -0.22327326238155365, 0.8568350672721863, -1.068942904472351, -0.6665271520614624, 1.2174440622329712, -0.09342080354690552, -0.6871603727340698, 1.43564772605896, 0.7913414835929871, -1.0397980213165283, -0.2551644742488861, -0.14329639077186584, -0.7548159956932068, -0.055098991841077805, -1.646282434463501, -0.09157024323940277, 0.4022596478462219, -1.477239966392517, -0.5009344816207886, -0.19551242887973785, 1.299109935760498, -0.25896456837654114, 1.3780663013458252, -0.4185571074485779, -0.22482635080814362, -0.2324216514825821, -0.45384296774864197, 0.1571861058473587, -0.22306162118911743, -0.5423723459243774, 0.08908943831920624, -0.8110864758491516, 0.46826717257499695, 1.35514497756958, 0.3628321886062622, 0.11098659038543701, 0.5765842795372009, 1.1564618349075317, 0.42588499188423157, 0.172300323843956, -0.8642698526382446, -1.5676884651184082, 1.9986634254455566, -1.482495665550232, 2.0207321643829346, 0.6571317315101624, 0.06798310577869415, -1.7293400764465332, -1.8812816143035889, 1.4374423027038574, 1.2181034088134766, 2.174229621887207, 0.7293421626091003, 0.37055182456970215, -0.9702590107917786, -0.6372067332267761, 0.2156297266483307, -1.0207552909851074, -0.6359043121337891, 0.14389774203300476, 2.431880235671997, 1.825606107711792, -0.38138288259506226, -0.23473317921161652, -0.9575486183166504, 1.4060299396514893, -0.19488690793514252, 0.30239835381507874, 1.9757401943206787, -0.198364719748497, -1.1381410360336304, 1.2375123500823975, -2.449357271194458, 0.15183298289775848, 2.020625114440918, 0.29090890288352966, 0.22485660016536713, -1.4240283966064453, -0.7083222270011902, -0.12345284223556519, -0.40717974305152893, -1.2514108419418335, 0.6016332507133484, -0.2902912199497223, -0.7944295406341553, -1.4180593490600586, 0.282325804233551, -1.0641380548477173, -1.6216570138931274, 0.27227216958999634, 1.8269516229629517, 2.1196820735931396, -0.8715800642967224, 1.6993967294692993, -0.23381662368774414, 0.4050189256668091, 1.3794431686401367, 1.1882054805755615, 3.0004007816314697, 1.890782117843628, -1.2501901388168335, 0.652133584022522, -0.11090444028377533, -0.5194020867347717, 1.3084415197372437, -1.1817247867584229, 1.1418455839157104, -0.1900956630706787, -1.1378775835037231, -1.2562530040740967, 0.8365316987037659, 0.4596717357635498, 0.06362052261829376, -0.4701383709907532, 1.2523022890090942, -0.11473987996578217, 1.2198070287704468, 0.6751713752746582, -0.3949473202228546, 0.5013831257820129, -0.39260146021842957, -0.449087530374527, 1.5130412578582764, 0.1483508050441742, -1.3936491012573242, -2.271160125732422, -0.2529127597808838, -0.735409140586853, -0.060212649405002594, -0.5909366011619568, -1.0888818502426147, 1.6307711601257324, 0.29726284742355347, -1.2879656553268433, -0.25543898344039917, -0.34984099864959717, -0.5006266236305237, 2.6651904582977295, -1.4702476263046265, -0.38795486092567444, -1.0736788511276245, -0.631110429763794, 1.7662111520767212, -1.0637691020965576, -0.25688257813453674, -1.0064862966537476, -0.6038349270820618, -1.4247475862503052, -0.7109501361846924, -0.004176728427410126, -0.8347525000572205, 0.8360689878463745, 0.18348334729671478, -1.1321221590042114, -0.23085491359233856, -0.7989304065704346, 0.8868477940559387, -0.32364633679389954, 0.34678661823272705, 2.015749931335449, 0.4441871643066406, -0.2974303066730499, 0.7617417573928833, 1.137527585029602, 0.698610782623291, -0.6614139676094055, 0.23075008392333984, -0.6455702185630798, 0.2868623435497284, -1.4379533529281616, 0.2481507509946823, -2.8616433143615723, 0.6100090146064758, 0.059298012405633926, -0.00872824713587761, 0.037909917533397675, -1.3786425590515137, 1.109514832496643, 2.592707633972168, -1.312660813331604, 0.47106263041496277, 0.2756328880786896, 1.3422576189041138, -1.7305183410644531, 0.2057681828737259, -0.33301103115081787, 2.2045319080352783, 0.10165919363498688, 1.264011263847351, -0.3406737744808197, -2.3750226497650146, 0.6274686455726624, -1.407221794128418, -1.1107486486434937, 0.676596462726593, -0.8649165034294128, 0.1333104968070984, -1.598265290260315, -0.23585723340511322, -0.9796851277351379, -1.2546464204788208, 0.7669439315795898, 0.09717865288257599, 0.2595555782318115, -0.5707326531410217, 0.4455546736717224, -2.118927478790283, -1.452432632446289, -0.13205954432487488, -0.9300802946090698, 0.4522453844547272, -0.32592615485191345, 0.6729778051376343, -0.1938808262348175, -0.08497677743434906, 0.31711629033088684, 1.4237070083618164, 3.526702642440796, 0.34749653935432434, 0.36063340306282043, -0.1552121490240097, -0.8800721168518066, 1.4418216943740845, 0.9633975625038147, -0.02178701013326645, -0.460298627614975, -0.9989101886749268, 1.3897956609725952, 2.0099129676818848, 0.9527668356895447, -0.0030848216265439987, -0.7386084198951721, -0.6686917543411255, -0.04768421873450279, 0.1391482651233673, 0.43680647015571594, 0.7382034659385681, 0.05772194638848305, -0.0010839402675628662, 1.2681461572647095, 1.0898646116256714, -0.4622531533241272, 0.3492845296859741, -0.878493070602417, -0.4278928339481354, 0.5492625832557678, 0.2109396904706955, -0.017893826588988304, 0.4319296181201935, -1.0369917154312134, -0.3537066578865051, -0.3272216320037842, -0.8687028288841248, -0.6607666611671448, -0.41289767622947693, -0.2733005881309509, 1.4283493757247925, 0.22735323011875153, -0.6787527799606323, -0.09541331231594086, -0.7504115700721741, -0.08298899233341217, -1.1092454195022583, 0.12455980479717255, -0.23185013234615326, -0.12418484687805176, -0.11568079888820648, 1.7288273572921753, -0.8746299147605896, -2.0998451709747314, 0.18427714705467224, 0.43724316358566284, -0.3348205089569092, 0.1378127783536911, 1.6490271091461182, 0.5781474709510803, 1.341199517250061, 1.3194321393966675, 0.999419093132019, -0.7118794322013855, -1.3292884826660156, 0.6611048579216003, 1.0273916721343994, -1.4545109272003174, 0.8232554793357849, -0.017554642632603645, -0.5062718391418457, 0.6041060090065002, 1.4321471452713013, 0.5346649289131165, -1.9945216178894043, 0.6376472115516663, -0.9431369304656982, 0.854815661907196, 0.7779222130775452, 0.7164972424507141, 0.3037499189376831, 0.7250549793243408, -1.2189921140670776, -1.062677264213562, -0.9139675498008728, -0.6944705247879028, 1.8346647024154663, -0.232052743434906, 0.6229310035705566, -0.08266995847225189, -1.3059113025665283, -0.15463879704475403, 0.682239294052124, 0.21881213784217834, -0.4538955092430115, 0.8094374537467957, -0.6593246459960938, -1.1081933975219727, -1.3099838495254517, -0.49953100085258484, -0.8660083413124084, -1.0563366413116455, 1.0503190755844116, 0.8033798336982727, 0.3311491012573242, 1.8441568613052368, 0.7166993618011475, 0.036192454397678375, -2.4829626083374023, 0.9443291425704956, 0.2796493470668793, -0.012774210423231125, 0.7756980657577515, 0.35839056968688965, 1.0133353471755981, -0.030840478837490082, 0.578490674495697, -2.3058249950408936, 2.1436755657196045, -0.15634429454803467, 0.6088448762893677, -0.027214255183935165, -0.20501747727394104, 1.0468941926956177, 0.418253630399704, 0.5129188299179077, -1.0902998447418213, 0.6240754723548889, -0.5929180383682251, 1.2689965963363647, 0.9396232962608337, -0.8368685841560364, -0.06924191117286682, 1.4157865047454834, 0.38703787326812744, -0.6500473022460938, -0.932030975818634, -0.8066386580467224, 0.9280507564544678, 1.601813793182373, -0.08135364949703217, -0.0730089396238327, 0.9848245978355408, 0.6374444365501404, -1.1786410808563232, -0.029924968257546425, -0.6856476068496704, -0.5871866345405579, 1.851524829864502, 2.0142054557800293, -0.2745024561882019, -0.1262049376964569, -0.8129014372825623, -1.26938796043396, 0.6991338133811951, -0.059827908873558044, -0.004661255050450563, 0.6697192788124084, -0.7165022492408752, 1.0385531187057495, 0.7887418270111084, 0.7676793336868286, 0.09646657109260559, 0.39479103684425354, 0.41278308629989624, -0.37174925208091736, -1.1400575637817383, -0.32790714502334595, -1.1818472146987915, -2.5170366764068604, 0.5091630220413208, -0.19361428916454315, -1.2664191722869873, 0.059245940297842026, -1.021001935005188, 1.1161459684371948, -0.5724425911903381, -1.076939344406128, -1.4378055334091187, 0.359345018863678, -0.004086552187800407, 0.9321725964546204, -1.6476620435714722, 0.0040587978437542915, 1.2602977752685547, 0.9089714884757996, -0.838307797908783, 1.0654159784317017, 0.26198843121528625, 1.1486585140228271, 0.7570741772651672, -0.38552725315093994, 0.5720020532608032, 0.022569607943296432, -1.3222987651824951, 0.6281801462173462, 1.1478205919265747, 0.10028603672981262, 1.5726691484451294, -0.3943468928337097, -0.040685586631298065, 0.4787631034851074, -0.6544169783592224, -0.45428088307380676, -0.524624228477478, 0.6526631116867065, 0.17107819020748138, -0.8262444734573364, 0.04533683881163597, 0.06945186853408813, -0.26136669516563416, 0.17603911459445953, -1.584464192390442, -0.20528540015220642, -0.28581422567367554, -0.5925722718238831, -1.2167776823043823, -0.12477870285511017, 1.4039146900177002, -0.6145333647727966, -0.20968195796012878, 0.5722846388816833, 0.2884938418865204, 0.38584598898887634, 0.6040704250335693, -0.5926458239555359, -0.38423556089401245, -0.2212158590555191, -0.3617374002933502, 0.30291610956192017, 1.3131626844406128, -0.1289336383342743, -1.0183337926864624, 0.7287288308143616, -0.3730636537075043, -0.04159777611494064, 1.7551491260528564, 0.09134036302566528, -0.8631223440170288, 0.3031635582447052, -0.7480125427246094, 2.06715989112854, 1.6775782108306885, 1.3146073818206787, -0.2019357830286026, -0.91834557056427, 0.7025238275527954, -0.3223802149295807, -0.3469648063182831, 0.7390124797821045, 0.3591654598712921, -0.17699339985847473, -1.3736037015914917, 0.6828332543373108, 1.3197036981582642, -1.0076274871826172, -0.9078606963157654, 0.2884764075279236, -0.7461511492729187, 1.0750991106033325, 0.6741313338279724, 0.4784699082374573, 0.35680925846099854, 1.6148295402526855, 0.7355198264122009, -0.48321273922920227, 0.4953462779521942, 0.5562024712562561, -0.07489827275276184, -2.0815377235412598, -1.1699674129486084, 0.31832337379455566, -0.48117223381996155, -1.6672706604003906, 1.2699331045150757, -1.1770073175430298, -0.8592576384544373, 0.5684759020805359, 0.1244383305311203, 1.431597113609314, 0.30501922965049744, 1.4777017831802368, 1.891109824180603, 0.7086161375045776, 0.3297746777534485, 1.3164730072021484, -0.1533774584531784, -0.5263552665710449, 1.7923721075057983, -0.46458563208580017, 0.5708308219909668, 1.0948408842086792, -0.3581691086292267, -1.2204806804656982, -0.7379290461540222, -1.33817458152771, -0.6647776961326599, 1.1064456701278687, 0.15657269954681396, -1.3126875162124634, 0.23985759913921356, 1.5883338451385498, 0.0440283827483654, -0.4432976245880127, 0.6395401358604431, 0.40642985701560974, -0.8973767161369324, 0.01905059441924095, -0.8944470882415771, 0.5163961052894592, -0.1106385737657547, -0.20595453679561615, 0.4326828122138977, 0.4883882403373718, 1.2822619676589966, 0.056300919502973557, 0.1276387721300125, 1.0442219972610474, -1.4397333860397339, 1.578841209411621, -0.6038463711738586, 0.27305397391319275, -2.3848183155059814, 1.24909245967865, -0.7218284010887146, 2.030468702316284, -2.7010762691497803, 0.32146093249320984, -0.6326313614845276, -0.4607909619808197, 0.28816479444503784, -0.387324720621109, 0.08291302621364594, -0.041446179151535034, -1.1109766960144043, 0.02795589715242386, -0.7357788681983948, 0.6003865599632263, 1.2360868453979492, 1.4158062934875488, -1.1838128566741943, -0.30594292283058167, -1.8172831535339355, -0.18204307556152344, -0.6614125967025757, 0.25634661316871643, -2.154280662536621, -0.10173356533050537, -1.862873911857605, -2.244701623916626, -1.3174395561218262, -0.7790437936782837, 1.0551564693450928, 0.09440430998802185, -0.8860955834388733, 1.217598795890808, -0.2761102020740509, -1.7078415155410767, 1.0273817777633667, -2.011827230453491 ]
https://github.com/huggingface/datasets/issues/4569
Dataset Viewer issue for sst2
Thanks @albertvillanova - it is indeed working now (not sure what caused the error in the first place). Closing this :)
### Link https://huggingface.co/datasets/sst2 ### Description Not sure what is causing this, however it seems that `load_dataset("sst2")` also hangs (even though it downloads the files without problem): ``` Status code: 400 Exception: Exception Message: Give up after 5 attempts with ConnectionError ``` ### Owner No
684
21
Dataset Viewer issue for sst2 ### Link https://huggingface.co/datasets/sst2 ### Description Not sure what is causing this, however it seems that `load_dataset("sst2")` also hangs (even though it downloads the files without problem): ``` Status code: 400 Exception: Exception Message: Give up after 5 attempts with ConnectionError ``` ### Owner No Thanks @albertvillanova - it is indeed working now (not sure what caused the error in the first place). Closing this :)
[ -1.1297277212142944, -0.8188043832778931, -0.8326928019523621, 1.546431064605713, -0.09397260844707489, -1.2625662088394165, 0.17645643651485443, -0.9236863255500793, 1.7090030908584595, -0.6895830631256104, 0.2885577380657196, -1.6382911205291748, -0.0688900351524353, -0.5643382668495178, -0.6788817644119263, -0.7809107303619385, -0.5228068828582764, -0.7179189324378967, 1.039341926574707, 2.627352237701416, 1.3054172992706299, -1.342057466506958, 2.751086950302124, 0.7134366035461426, -0.14621981978416443, -0.9805046319961548, 0.5195141434669495, -0.08865653723478317, -1.2965919971466064, -0.4745968282222748, -0.9551568627357483, -0.14746466279029846, -0.40207692980766296, -0.6088315844535828, -0.11948200315237045, 0.5205934047698975, -0.17615073919296265, -0.5287521481513977, -0.551059365272522, -0.8436447978019714, 0.4530946612358093, -0.28627532720565796, 0.9216130375862122, -0.3868970274925232, 1.8548320531845093, -0.5126034021377563, 0.445236474275589, 0.5630157589912415, 1.4512848854064941, 0.182167187333107, -0.2491062581539154, 0.40709352493286133, 0.3886864483356476, -0.06258968263864517, 0.5015057325363159, 1.133927583694458, 0.6338483691215515, 0.6018062233924866, 0.7664089202880859, -2.182053565979004, 1.1838123798370361, -1.1348375082015991, 0.22475169599056244, 1.3516653776168823, -1.1746639013290405, 0.1825830489397049, -1.6863021850585938, -0.029685143381357193, 0.4770382046699524, -2.1175620555877686, 0.2604396343231201, -1.090014934539795, -0.4894316494464874, 0.991763710975647, 0.4185633659362793, -1.3884501457214355, -0.14997412264347076, -0.2349710911512375, 1.0470885038375854, 0.44118496775627136, 1.2179228067398071, -1.6435531377792358, 0.2070014625787735, -0.34567153453826904, 0.014513812027871609, -1.2302592992782593, -1.4429293870925903, 0.5465203523635864, 0.6714823246002197, 0.673542857170105, -0.09927520900964737, 0.9373013973236084, -0.9788857102394104, 0.7772208452224731, -0.8913209438323975, -1.6957491636276245, -1.4381535053253174, -2.362989902496338, -2.2957499027252197, 0.7348005175590515, -0.5378729104995728, -0.5517933368682861, 1.9940704107284546, -0.8953348994255066, -1.8627500534057617, 1.1635206937789917, 0.2827709913253784, -0.0005804300308227539, 2.3051185607910156, 0.39995282888412476, -0.7093371748924255, 0.3473013937473297, -0.741081953048706, 0.9035477638244629, -0.48756566643714905, 1.4098498821258545, 0.41942593455314636, -1.0164247751235962, 1.6744955778121948, -0.44299957156181335, 0.7346459031105042, -0.6734011173248291, -0.5404334664344788, -0.8425533175468445, 0.3593361973762512, 1.939780831336975, -0.35729503631591797, 1.5675283670425415, -0.39124682545661926, -1.5565420389175415, -1.4938621520996094, 0.8586311340332031, 0.5221657752990723, -0.663283109664917, 0.20798422396183014, -0.28994467854499817, -0.04414161667227745, -0.042783111333847046, 1.0150424242019653, 1.3276273012161255, 0.5876191258430481, -0.35416120290756226, -0.8829908967018127, 0.2864968180656433, 0.13404391705989838, -0.7638983726501465, -1.642940878868103, -0.3291299045085907, -0.0010911505669355392, 0.5563375949859619, -1.1034986972808838, 1.6760106086730957, 0.8068025708198547, 2.045316219329834, 0.9599975943565369, -0.2882128953933716, 1.4350364208221436, -0.02767585590481758, 1.9185930490493774, -0.5192582607269287, 0.5481182932853699, -0.3789144456386566, -1.2515859603881836, 0.8741176724433899, -0.41394636034965515, -2.069735527038574, -0.8205080628395081, -0.9377390742301941, -0.17516398429870605, -0.6852503418922424, 1.1212297677993774, -0.18004591763019562, -1.2747596502304077, 0.1329714059829712, -0.7965701222419739, 0.16601663827896118, -1.37887442111969, 0.37599706649780273, 0.7336726188659668, -0.6595869064331055, 0.07060007750988007, -0.23592336475849152, -1.305748701095581, -0.3154819905757904, 0.24123413860797882, 1.879186987876892, -0.8960888385772705, 0.9544908404350281, 0.9602623581886292, -0.8362325429916382, 0.05042009800672531, 0.26395562291145325, -0.2225392609834671, 0.9594781994819641, -1.138867735862732, -0.41179290413856506, 1.3250153064727783, -0.1421257108449936, -0.6381469368934631, 1.4009438753128052, 0.6211153864860535, -1.0490950345993042, -0.06376916915178299, -0.12223364412784576, -0.8575587272644043, -0.07567528635263443, -1.6365853548049927, -0.03533736616373062, 0.2165774703025818, -1.3496116399765015, -0.5901358127593994, -0.16169077157974243, 1.4113364219665527, -0.10732896625995636, 1.4410945177078247, -0.3660002648830414, -0.19035999476909637, -0.40317413210868835, -0.35921087861061096, 0.046450626105070114, -0.23780566453933716, -0.5642530918121338, 0.21311300992965698, -0.7266631126403809, 0.3267109990119934, 1.4664216041564941, 0.31578099727630615, 0.10264968872070312, 0.5987681746482849, 1.0539287328720093, 0.4300243854522705, -0.10795556753873825, -0.7426009774208069, -1.5872515439987183, 2.031872034072876, -1.3570687770843506, 1.867546796798706, 0.7891872525215149, -0.0054812077432870865, -1.729723334312439, -1.9728553295135498, 1.4656397104263306, 1.3287537097930908, 2.3294529914855957, 0.6236450672149658, 0.3789055347442627, -0.9509142637252808, -0.693078875541687, 0.2928435206413269, -1.090081810951233, -0.6686844229698181, 0.12841525673866272, 2.262392044067383, 1.7582799196243286, -0.44607844948768616, -0.15307386219501495, -1.1444053649902344, 1.2352614402770996, -0.1529683917760849, 0.16517283022403717, 1.7964950799942017, -0.2875289022922516, -1.0264596939086914, 1.1841394901275635, -2.270627737045288, 0.14592181146144867, 2.1215567588806152, 0.36910465359687805, 0.23911775648593903, -1.4597147703170776, -0.6879144310951233, -0.09572969377040863, -0.28911110758781433, -1.1722726821899414, 0.7596900463104248, -0.229436993598938, -0.7718568444252014, -1.40386962890625, 0.2533167004585266, -0.977734386920929, -1.7008166313171387, 0.24154071509838104, 1.8380900621414185, 1.8851780891418457, -0.8272737860679626, 1.5774016380310059, -0.22409141063690186, 0.2834824323654175, 1.3308286666870117, 1.1711093187332153, 3.049623727798462, 2.071617364883423, -1.2033309936523438, 0.7586162686347961, 0.034369826316833496, -0.5043444633483887, 1.3103963136672974, -1.1840862035751343, 1.2468916177749634, -0.26404762268066406, -1.1480660438537598, -1.27667236328125, 0.7300881147384644, 0.5332521796226501, 0.04894765838980675, -0.48634886741638184, 1.309773564338684, 0.00861435104161501, 1.2261931896209717, 0.6258493661880493, -0.492826372385025, 0.6912155747413635, -0.4000473618507385, -0.3142200708389282, 1.5096540451049805, 0.3257061243057251, -1.3679548501968384, -2.267876625061035, -0.051465872675180435, -0.9501927495002747, -0.09755045175552368, -0.6529209613800049, -0.9385538101196289, 1.619152545928955, 0.522835910320282, -1.2316434383392334, -0.41433921456336975, -0.3264983892440796, -0.59795743227005, 2.7239179611206055, -1.5152242183685303, -0.33305203914642334, -1.0603619813919067, -0.6179975271224976, 1.738256812095642, -1.1803820133209229, -0.25772973895072937, -1.1152082681655884, -0.5397842526435852, -1.3233866691589355, -0.8037052750587463, -0.0190185084939003, -0.7603357434272766, 0.851569652557373, 0.06596391648054123, -1.2249623537063599, -0.1440100222826004, -0.756816029548645, 0.9179739356040955, -0.2598470449447632, 0.278039813041687, 1.9915883541107178, 0.43151411414146423, -0.3491910994052887, 0.7766278386116028, 1.2433717250823975, 0.5086217522621155, -0.5566821098327637, 0.30971017479896545, -0.6881256103515625, 0.3221060335636139, -1.4267988204956055, 0.25877615809440613, -2.8447072505950928, 0.5137463808059692, -0.09348835051059723, -0.021670417860150337, -0.035318177193403244, -1.4034936428070068, 1.022221565246582, 2.5065226554870605, -1.2923073768615723, 0.5483312010765076, 0.3045656979084015, 1.3725647926330566, -1.6249675750732422, 0.20147967338562012, -0.5664314031600952, 2.149085760116577, 0.19613297283649445, 1.1610183715820312, -0.4092102348804474, -2.0762555599212646, 0.6122409105300903, -1.3396368026733398, -1.1818546056747437, 0.7707521319389343, -0.8696111440658569, -0.09640683978796005, -1.278566598892212, -0.06027304753661156, -0.7323945760726929, -1.3008155822753906, 0.7557381987571716, 0.1235378161072731, 0.3984028697013855, -0.5498040318489075, 0.41665369272232056, -2.169347047805786, -1.3350104093551636, -0.24107453227043152, -0.9557988047599792, 0.2751956880092621, -0.4471204876899719, 0.7306932806968689, -0.38267815113067627, -0.039182379841804504, 0.3191572427749634, 1.2603754997253418, 3.498603343963623, 0.21793429553508759, 0.36228063702583313, -0.20708273351192474, -0.8644635677337646, 1.582059621810913, 1.011865496635437, -0.17293290793895721, -0.5474364161491394, -0.919331967830658, 1.2254339456558228, 1.8718210458755493, 1.0427429676055908, 0.05181427672505379, -0.9832994937896729, -0.7178717255592346, -0.06361008435487747, 0.04897826164960861, 0.3539572060108185, 0.837638258934021, 0.10108978301286697, 0.09235653281211853, 1.329110026359558, 1.0675246715545654, -0.4317663311958313, 0.49790331721305847, -0.7516918778419495, -0.4481337070465088, 0.6048728823661804, 0.4045277535915375, 0.12568169832229614, 0.3786754310131073, -1.0274550914764404, -0.3519609272480011, -0.30344608426094055, -0.8824366331100464, -0.7536383867263794, -0.3718821406364441, -0.23555433750152588, 1.6513959169387817, 0.007842396385967731, -0.6453340649604797, -0.09098123759031296, -0.8088914155960083, -0.0006380416452884674, -1.0073397159576416, 0.34013304114341736, -0.1398325115442276, -0.08071829378604889, 0.04526452347636223, 1.7215769290924072, -1.1315867900848389, -2.3310983180999756, 0.42701613903045654, 0.3319719135761261, -0.3349005877971649, 0.0025590630248188972, 1.5243185758590698, 0.6422218084335327, 1.365686297416687, 1.3902437686920166, 1.0310742855072021, -0.7984984517097473, -1.3632147312164307, 0.6497520208358765, 0.9957218170166016, -1.5650221109390259, 0.7502555847167969, 0.024020452052354813, -0.43252018094062805, 0.5110081434249878, 1.2978036403656006, 0.43671879172325134, -1.9317395687103271, 0.7525132298469543, -0.7911137342453003, 0.8424712419509888, 0.7765738368034363, 0.7836796045303345, 0.26883360743522644, 0.7337577939033508, -1.1302757263183594, -1.2565382719039917, -0.7725083231925964, -0.7323524951934814, 1.8808399438858032, -0.2563786506652832, 0.6036286950111389, -0.17690451443195343, -1.4373915195465088, -0.0915987640619278, 0.6857596635818481, 0.0778278186917305, -0.48234519362449646, 0.7968003153800964, -0.5631556510925293, -1.0337257385253906, -1.5136440992355347, -0.563586413860321, -0.9642401337623596, -1.0653249025344849, 1.0806832313537598, 0.7734131217002869, 0.3667869567871094, 1.8628641366958618, 0.661475419998169, 0.23600907623767853, -2.6153388023376465, 0.9530287981033325, 0.3273378014564514, 0.14034470915794373, 0.8192088603973389, 0.44392165541648865, 0.9690167903900146, -0.11573712527751923, 0.5340285897254944, -2.342707395553589, 2.265272617340088, -0.23741041123867035, 0.49753615260124207, 0.1354384571313858, -0.2851552963256836, 1.0160174369812012, 0.513110876083374, 0.551581859588623, -1.2201238870620728, 0.653386652469635, -0.581931471824646, 1.1836148500442505, 0.7995374202728271, -0.7761722803115845, 0.007336840964853764, 1.3771476745605469, 0.5556004643440247, -0.5043554306030273, -0.887120246887207, -0.8433837890625, 1.05601167678833, 1.599337100982666, 0.1044694185256958, 0.15279363095760345, 1.0122946500778198, 0.5483542084693909, -1.1452291011810303, -0.06066044792532921, -0.782110333442688, -0.5933146476745605, 1.7096482515335083, 1.998414158821106, -0.03677545487880707, -0.21683435142040253, -0.8436747789382935, -1.2486568689346313, 0.6925245523452759, -0.03506559506058693, 0.1013902872800827, 0.7178424596786499, -0.7491610646247864, 1.1317658424377441, 0.7812955379486084, 0.791087806224823, 0.08760736882686615, 0.30229148268699646, 0.44136396050453186, -0.19021724164485931, -1.2570734024047852, -0.2691725492477417, -1.1312059164047241, -2.4548604488372803, 0.5204001665115356, -0.295944482088089, -1.3648574352264404, 0.1617945432662964, -1.0677464008331299, 0.9274510145187378, -0.5049250721931458, -1.0801935195922852, -1.5999459028244019, 0.11815089732408524, -0.11183027178049088, 0.9168494939804077, -1.5867743492126465, -0.1601450890302658, 1.2620829343795776, 0.9338821172714233, -0.9298143982887268, 1.1263177394866943, 0.2308247685432434, 1.1511921882629395, 0.8834707736968994, -0.3209197223186493, 0.4984138309955597, 0.05978982895612717, -1.38924241065979, 0.5651708245277405, 1.2256311178207397, 0.11696901172399521, 1.641321063041687, -0.5382672548294067, -0.0026327460072934628, 0.5110429525375366, -0.536151647567749, -0.5808352828025818, -0.6309341788291931, 0.6848298907279968, 0.1776035726070404, -0.9129399061203003, -0.007280676160007715, -0.04627774655818939, -0.16345946490764618, 0.13137371838092804, -1.6713545322418213, -0.050453074276447296, -0.30461329221725464, -0.6342024207115173, -1.1780282258987427, -0.09193650633096695, 1.3712018728256226, -0.6933006048202515, -0.23477277159690857, 0.545673131942749, 0.2916612923145294, 0.4045776128768921, 0.6226611733436584, -0.6471311450004578, -0.2435356080532074, -0.2106131762266159, -0.4342651963233948, 0.3847401738166809, 1.364917516708374, -0.08141033351421356, -1.0283950567245483, 0.7158176898956299, -0.4073900580406189, 0.0596071258187294, 1.9135984182357788, 0.18142125010490417, -0.864777684211731, 0.25481295585632324, -0.7060426473617554, 1.9848476648330688, 1.5981992483139038, 1.3730347156524658, 0.013111167587339878, -0.9978640079498291, 0.6614706516265869, -0.1724672019481659, -0.3791186213493347, 0.7586536407470703, 0.3532131016254425, -0.2537457048892975, -1.4471436738967896, 0.5319198966026306, 1.2870301008224487, -1.0140756368637085, -0.9096134305000305, 0.06834553182125092, -0.7625805139541626, 0.9675557613372803, 0.7758159637451172, 0.4139604866504669, 0.2782529294490814, 1.535079002380371, 0.7402153015136719, -0.40452104806900024, 0.5639042258262634, 0.4933672845363617, 0.006392455659806728, -2.0134525299072266, -1.0741878747940063, 0.5069631934165955, -0.48774686455726624, -1.5629217624664307, 1.3222991228103638, -1.2213681936264038, -0.9089877605438232, 0.4284921884536743, 0.19062213599681854, 1.520290732383728, 0.24509908258914948, 1.5645742416381836, 1.9601126909255981, 0.8615161776542664, 0.2615995705127716, 1.320980429649353, -0.20369936525821686, -0.4528043866157532, 1.7909563779830933, -0.4333631098270416, 0.48671630024909973, 0.9851281046867371, -0.49829521775245667, -1.2429225444793701, -0.7442108988761902, -1.3324671983718872, -0.6994147896766663, 1.0228779315948486, 0.16148187220096588, -1.1897755861282349, 0.27960091829299927, 1.450249195098877, 0.0689082145690918, -0.39681312441825867, 0.5834683179855347, 0.39584267139434814, -0.8985643982887268, 0.06080399453639984, -0.8632029891014099, 0.4524206519126892, -0.12386180460453033, -0.4685560464859009, 0.31940025091171265, 0.48744335770606995, 1.235496163368225, 0.06591103971004486, 0.061172328889369965, 1.2077864408493042, -1.394980549812317, 1.55636465549469, -0.6728436946868896, 0.16315869987010956, -2.311258554458618, 1.416707158088684, -0.7407990097999573, 1.8052937984466553, -2.7033565044403076, 0.4019036889076233, -0.5123609304428101, -0.44162362813949585, 0.3287862241268158, -0.3513748347759247, 0.11545397341251373, -0.13431809842586517, -1.2069634199142456, -0.0644596740603447, -0.6453114151954651, 0.6591932773590088, 1.0935124158859253, 1.3700734376907349, -1.0841922760009766, -0.3052823841571808, -1.8805148601531982, -0.051275867968797684, -0.521192193031311, 0.3325953781604767, -2.074120283126831, -0.18652363121509552, -1.8503681421279907, -2.27294921875, -1.2760980129241943, -0.6796107888221741, 1.055708885192871, 0.27652642130851746, -0.9103007912635803, 1.0852489471435547, -0.4127762019634247, -1.803778052330017, 0.9693713188171387, -2.1426193714141846 ]
https://github.com/huggingface/datasets/issues/4568
XNLI cache reload is very slow
Hi, Could you tell us how you are running this code? I tested on my machine (M1 Mac). And it is running fine both on and off internet. <img width="1033" alt="Screen Shot 2022-07-03 at 1 32 25 AM" src="https://user-images.githubusercontent.com/8711912/177026364-4ad7cedb-e524-4513-97f7-7961bbb34c90.png"> Tested on both stable and dev version.
### Reproduce Using `2.3.3.dev0` `from datasets import load_dataset` `load_dataset("xnli", "en")` Turn off Internet `load_dataset("xnli", "en")` I cancelled the second `load_dataset` eventually cuz it took super long. It would be great to have something to specify e.g. `only_load_from_cache` and avoid the library trying to download when there is no Internet. If I leave it running it works but takes way longer than when there is Internet. I would expect loading from cache to take the same amount of time regardless of whether there is Internet. ``` --------------------------------------------------------------------------- gaierror Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 174 conn = connection.create_connection( --> 175 (self._dns_host, self.port), self.timeout, **extra_kw 176 ) /opt/conda/lib/python3.7/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options) 71 ---> 72 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 73 af, socktype, proto, canonname, sa = res /opt/conda/lib/python3.7/socket.py in getaddrinfo(host, port, family, type, proto, flags) 751 addrlist = [] --> 752 for res in _socket.getaddrinfo(host, port, family, type, proto, flags): 753 af, socktype, proto, canonname, sa = res gaierror: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: KeyboardInterrupt Traceback (most recent call last) /tmp/ipykernel_33/3594208039.py in <module> ----> 1 load_dataset("xnli", "en") /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, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs) 1673 revision=revision, 1674 use_auth_token=use_auth_token, -> 1675 **config_kwargs, 1676 ) 1677 /opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs) 1494 download_mode=download_mode, 1495 data_dir=data_dir, -> 1496 data_files=data_files, 1497 ) 1498 /opt/conda/lib/python3.7/site-packages/datasets/load.py in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1182 download_config=download_config, 1183 download_mode=download_mode, -> 1184 dynamic_modules_path=dynamic_modules_path, 1185 ).get_module() 1186 elif path.count("/") == 1: # community dataset on the Hub /opt/conda/lib/python3.7/site-packages/datasets/load.py in __init__(self, name, revision, download_config, download_mode, dynamic_modules_path) 506 self.dynamic_modules_path = dynamic_modules_path 507 assert self.name.count("/") == 0 --> 508 increase_load_count(name, resource_type="dataset") 509 510 def download_loading_script(self, revision: Optional[str]) -> str: /opt/conda/lib/python3.7/site-packages/datasets/load.py in increase_load_count(name, resource_type) 166 if not config.HF_DATASETS_OFFLINE and config.HF_UPDATE_DOWNLOAD_COUNTS: 167 try: --> 168 head_hf_s3(name, filename=name + ".py", dataset=(resource_type == "dataset")) 169 except Exception: 170 pass /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in head_hf_s3(identifier, filename, use_cdn, dataset, max_retries) 93 return http_head( 94 hf_bucket_url(identifier=identifier, filename=filename, use_cdn=use_cdn, dataset=dataset), ---> 95 max_retries=max_retries, 96 ) 97 /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in http_head(url, proxies, headers, cookies, allow_redirects, timeout, max_retries) 445 allow_redirects=allow_redirects, 446 timeout=timeout, --> 447 max_retries=max_retries, 448 ) 449 return response /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in _request_with_retry(method, url, max_retries, base_wait_time, max_wait_time, timeout, **params) 366 tries += 1 367 try: --> 368 response = requests.request(method=method.upper(), url=url, timeout=timeout, **params) 369 success = True 370 except (requests.exceptions.ConnectTimeout, requests.exceptions.ConnectionError) as err: /opt/conda/lib/python3.7/site-packages/requests/api.py in request(method, url, **kwargs) 59 # cases, and look like a memory leak in others. 60 with sessions.Session() as session: ---> 61 return session.request(method=method, url=url, **kwargs) 62 63 /opt/conda/lib/python3.7/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json) 527 } 528 send_kwargs.update(settings) --> 529 resp = self.send(prep, **send_kwargs) 530 531 return resp /opt/conda/lib/python3.7/site-packages/requests/sessions.py in send(self, request, **kwargs) 643 644 # Send the request --> 645 r = adapter.send(request, **kwargs) 646 647 # Total elapsed time of the request (approximately) /opt/conda/lib/python3.7/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 448 decode_content=False, 449 retries=self.max_retries, --> 450 timeout=timeout 451 ) 452 /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 708 body=body, 709 headers=headers, --> 710 chunked=chunked, 711 ) 712 /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 384 # Trigger any extra validation we need to do. 385 try: --> 386 self._validate_conn(conn) 387 except (SocketTimeout, BaseSSLError) as e: 388 # Py2 raises this as a BaseSSLError, Py3 raises it as socket timeout. /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in _validate_conn(self, conn) 1038 # Force connect early to allow us to validate the connection. 1039 if not getattr(conn, "sock", None): # AppEngine might not have `.sock` -> 1040 conn.connect() 1041 1042 if not conn.is_verified: /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in connect(self) 356 def connect(self): 357 # Add certificate verification --> 358 self.sock = conn = self._new_conn() 359 hostname = self.host 360 tls_in_tls = False /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 173 try: 174 conn = connection.create_connection( --> 175 (self._dns_host, self.port), self.timeout, **extra_kw 176 ) 177 KeyboardInterrupt: ```
685
46
XNLI cache reload is very slow ### Reproduce Using `2.3.3.dev0` `from datasets import load_dataset` `load_dataset("xnli", "en")` Turn off Internet `load_dataset("xnli", "en")` I cancelled the second `load_dataset` eventually cuz it took super long. It would be great to have something to specify e.g. `only_load_from_cache` and avoid the library trying to download when there is no Internet. If I leave it running it works but takes way longer than when there is Internet. I would expect loading from cache to take the same amount of time regardless of whether there is Internet. ``` --------------------------------------------------------------------------- gaierror Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 174 conn = connection.create_connection( --> 175 (self._dns_host, self.port), self.timeout, **extra_kw 176 ) /opt/conda/lib/python3.7/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options) 71 ---> 72 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 73 af, socktype, proto, canonname, sa = res /opt/conda/lib/python3.7/socket.py in getaddrinfo(host, port, family, type, proto, flags) 751 addrlist = [] --> 752 for res in _socket.getaddrinfo(host, port, family, type, proto, flags): 753 af, socktype, proto, canonname, sa = res gaierror: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: KeyboardInterrupt Traceback (most recent call last) /tmp/ipykernel_33/3594208039.py in <module> ----> 1 load_dataset("xnli", "en") /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, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs) 1673 revision=revision, 1674 use_auth_token=use_auth_token, -> 1675 **config_kwargs, 1676 ) 1677 /opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs) 1494 download_mode=download_mode, 1495 data_dir=data_dir, -> 1496 data_files=data_files, 1497 ) 1498 /opt/conda/lib/python3.7/site-packages/datasets/load.py in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1182 download_config=download_config, 1183 download_mode=download_mode, -> 1184 dynamic_modules_path=dynamic_modules_path, 1185 ).get_module() 1186 elif path.count("/") == 1: # community dataset on the Hub /opt/conda/lib/python3.7/site-packages/datasets/load.py in __init__(self, name, revision, download_config, download_mode, dynamic_modules_path) 506 self.dynamic_modules_path = dynamic_modules_path 507 assert self.name.count("/") == 0 --> 508 increase_load_count(name, resource_type="dataset") 509 510 def download_loading_script(self, revision: Optional[str]) -> str: /opt/conda/lib/python3.7/site-packages/datasets/load.py in increase_load_count(name, resource_type) 166 if not config.HF_DATASETS_OFFLINE and config.HF_UPDATE_DOWNLOAD_COUNTS: 167 try: --> 168 head_hf_s3(name, filename=name + ".py", dataset=(resource_type == "dataset")) 169 except Exception: 170 pass /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in head_hf_s3(identifier, filename, use_cdn, dataset, max_retries) 93 return http_head( 94 hf_bucket_url(identifier=identifier, filename=filename, use_cdn=use_cdn, dataset=dataset), ---> 95 max_retries=max_retries, 96 ) 97 /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in http_head(url, proxies, headers, cookies, allow_redirects, timeout, max_retries) 445 allow_redirects=allow_redirects, 446 timeout=timeout, --> 447 max_retries=max_retries, 448 ) 449 return response /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in _request_with_retry(method, url, max_retries, base_wait_time, max_wait_time, timeout, **params) 366 tries += 1 367 try: --> 368 response = requests.request(method=method.upper(), url=url, timeout=timeout, **params) 369 success = True 370 except (requests.exceptions.ConnectTimeout, requests.exceptions.ConnectionError) as err: /opt/conda/lib/python3.7/site-packages/requests/api.py in request(method, url, **kwargs) 59 # cases, and look like a memory leak in others. 60 with sessions.Session() as session: ---> 61 return session.request(method=method, url=url, **kwargs) 62 63 /opt/conda/lib/python3.7/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json) 527 } 528 send_kwargs.update(settings) --> 529 resp = self.send(prep, **send_kwargs) 530 531 return resp /opt/conda/lib/python3.7/site-packages/requests/sessions.py in send(self, request, **kwargs) 643 644 # Send the request --> 645 r = adapter.send(request, **kwargs) 646 647 # Total elapsed time of the request (approximately) /opt/conda/lib/python3.7/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 448 decode_content=False, 449 retries=self.max_retries, --> 450 timeout=timeout 451 ) 452 /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 708 body=body, 709 headers=headers, --> 710 chunked=chunked, 711 ) 712 /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 384 # Trigger any extra validation we need to do. 385 try: --> 386 self._validate_conn(conn) 387 except (SocketTimeout, BaseSSLError) as e: 388 # Py2 raises this as a BaseSSLError, Py3 raises it as socket timeout. /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in _validate_conn(self, conn) 1038 # Force connect early to allow us to validate the connection. 1039 if not getattr(conn, "sock", None): # AppEngine might not have `.sock` -> 1040 conn.connect() 1041 1042 if not conn.is_verified: /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in connect(self) 356 def connect(self): 357 # Add certificate verification --> 358 self.sock = conn = self._new_conn() 359 hostname = self.host 360 tls_in_tls = False /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 173 try: 174 conn = connection.create_connection( --> 175 (self._dns_host, self.port), self.timeout, **extra_kw 176 ) 177 KeyboardInterrupt: ``` Hi, Could you tell us how you are running this code? I tested on my machine (M1 Mac). And it is running fine both on and off internet. <img width="1033" alt="Screen Shot 2022-07-03 at 1 32 25 AM" src="https://user-images.githubusercontent.com/8711912/177026364-4ad7cedb-e524-4513-97f7-7961bbb34c90.png"> Tested on both stable and dev version.
[ -1.134673833847046, -0.7720680236816406, -0.6108931303024292, 1.406455636024475, -0.046117667108774185, -1.3684138059616089, 0.1877940446138382, -0.8942205905914307, 1.5669593811035156, -0.8929093480110168, 0.4064018726348877, -1.727515459060669, 0.06133737042546272, -0.6680017113685608, -0.62983638048172, -0.6665216088294983, -0.3601488769054413, -0.7547736167907715, 1.090676188468933, 2.417607307434082, 1.2420052289962769, -1.3118599653244019, 2.8078951835632324, 0.6264305114746094, -0.21745489537715912, -0.8706058859825134, 0.4028034806251526, -0.05400010570883751, -1.4137191772460938, -0.3916208744049072, -1.0060292482376099, -0.13254646956920624, -0.7276644706726074, -0.5065678954124451, 0.08740027248859406, 0.4761256277561188, -0.21149078011512756, -0.3388866186141968, -0.41671088337898254, -0.8013585209846497, 0.6508010625839233, -0.3056899905204773, 0.9196504950523376, -0.2811785638332367, 1.7559841871261597, -0.6090209484100342, 0.5110931992530823, 0.5784671902656555, 1.2022523880004883, 0.18590585887432098, -0.02732747234404087, 0.30052152276039124, 0.22570256888866425, 0.07249274849891663, 0.6299976110458374, 1.2063636779785156, 0.7011944055557251, 0.6257848739624023, 0.6764400601387024, -2.1429903507232666, 1.357056975364685, -0.9159385561943054, 0.2770964205265045, 1.374285340309143, -1.0394551753997803, 0.43406879901885986, -1.8558927774429321, -0.20802001655101776, 0.35988470911979675, -2.2256574630737305, 0.13863681256771088, -1.2349070310592651, -0.5503186583518982, 0.9470050930976868, 0.3889802396297455, -1.3117049932479858, -0.024439308792352676, -0.40461859107017517, 0.8989964127540588, 0.35960009694099426, 1.070981740951538, -1.7037951946258545, 0.08965307474136353, -0.2731872797012329, 0.37144792079925537, -1.1315513849258423, -1.5842740535736084, 0.6335495114326477, 0.7266390919685364, 0.5941415429115295, -0.2120562493801117, 0.9117780923843384, -1.1837868690490723, 0.8173136711120605, -0.9936770796775818, -1.727128505706787, -1.3844045400619507, -2.4528791904449463, -2.469066619873047, 0.804233729839325, -0.4109434187412262, -0.42248597741127014, 2.1018927097320557, -1.1674680709838867, -1.6444252729415894, 1.0208690166473389, 0.2508649230003357, -0.07822833955287933, 2.422832727432251, 0.17390675842761993, -0.8790171146392822, 0.6739140152931213, -0.8817844390869141, 0.6785921454429626, -0.33384403586387634, 1.2904689311981201, 0.3654463589191437, -1.09882652759552, 1.7067315578460693, -0.4348228871822357, 0.4457452893257141, -0.6911173462867737, -0.37650176882743835, -0.5781430602073669, 0.19822147488594055, 1.9526684284210205, -0.0711808055639267, 1.5438774824142456, -0.1476650983095169, -1.4638947248458862, -1.3167929649353027, 0.7477601170539856, 0.4052749574184418, -0.8498703837394714, 0.16693107783794403, -0.44850680232048035, 0.223016619682312, 0.19444172084331512, 1.1301171779632568, 1.3537540435791016, 0.8371363282203674, -0.20789745450019836, -0.9126368165016174, 0.13023360073566437, -0.11986897885799408, -0.646142840385437, -1.6984823942184448, -0.3455020487308502, 0.05608915910124779, 0.6882095336914062, -1.188204288482666, 2.039762496948242, 0.9430649280548096, 2.024566888809204, 0.9942874908447266, -0.4161839485168457, 1.5426490306854248, 0.08314208686351776, 1.8971619606018066, -0.3272404372692108, 0.7496440410614014, -0.5297115445137024, -1.1552051305770874, 0.7399166226387024, -0.3271046578884125, -1.9672044515609741, -0.4040895104408264, -0.8662149310112, -0.12772618234157562, -0.9278696179389954, 1.0958157777786255, -0.15776178240776062, -1.3716591596603394, 0.21685388684272766, -0.6365370750427246, 0.1186414361000061, -1.3973511457443237, 0.31867924332618713, 0.7129823565483093, -0.7458760738372803, 0.07930561900138855, -0.4901672899723053, -1.4507297277450562, -0.5801146626472473, 0.3337222933769226, 1.7225655317306519, -0.6118158102035522, 0.9686269760131836, 1.024905800819397, -0.6082738041877747, -0.14024126529693604, 0.5542981624603271, -0.35819724202156067, 0.8062037229537964, -1.013269066810608, -0.4451310932636261, 1.1555664539337158, -0.29294565320014954, -0.46927517652511597, 1.298743486404419, 0.7632737755775452, -1.0356545448303223, -0.2754972577095032, -0.11840356886386871, -0.8347360491752625, 0.12944096326828003, -1.5606510639190674, -0.06246061623096466, 0.4294765591621399, -1.4395555257797241, -0.40604525804519653, 0.010631082579493523, 1.281583547592163, 0.025842301547527313, 1.3933486938476562, -0.24749204516410828, -0.13076907396316528, -0.516068696975708, -0.5214877128601074, 0.14328965544700623, -0.0015906821936368942, -0.6139550805091858, 0.3624895215034485, -0.7450006604194641, 0.2143726497888565, 1.5364789962768555, 0.15015684068202972, 0.1288202404975891, 0.5080187320709229, 1.1196022033691406, 0.31466618180274963, -0.11175882816314697, -0.9047318696975708, -1.5990222692489624, 2.0386829376220703, -1.6292965412139893, 1.9169228076934814, 0.7989873290061951, -0.042457304894924164, -1.8385146856307983, -1.7529526948928833, 1.4564164876937866, 1.143211007118225, 2.4667327404022217, 0.5598489046096802, 0.39350301027297974, -0.8282663226127625, -0.655846118927002, 0.4871278703212738, -0.8572996854782104, -0.8868730664253235, 0.2164553701877594, 2.3753745555877686, 1.7234416007995605, -0.39694270491600037, -0.142797589302063, -0.9559719562530518, 1.310463309288025, -0.3199860453605652, 0.26262518763542175, 1.9235472679138184, -0.4680007994174957, -1.0929747819900513, 1.3269044160842896, -2.3884975910186768, 0.3662168085575104, 1.9889159202575684, 0.3661963939666748, 0.06540274620056152, -1.237889289855957, -0.7292175889015198, -0.12093797326087952, -0.4455024302005768, -1.294389247894287, 0.4524938762187958, -0.20138958096504211, -0.8838379383087158, -1.3831779956817627, 0.03784856200218201, -1.1337252855300903, -1.7072685956954956, 0.3255397081375122, 1.7163680791854858, 2.205709457397461, -0.7758100628852844, 1.2950472831726074, -0.3011731505393982, 0.25767388939857483, 1.1228562593460083, 1.2187193632125854, 3.1522934436798096, 1.9694936275482178, -1.2587248086929321, 0.7318320870399475, -0.21949167549610138, -0.5241554379463196, 1.1886845827102661, -1.0659446716308594, 1.1585019826889038, -0.27716657519340515, -1.3154606819152832, -1.1862766742706299, 0.9338312745094299, 0.3820326626300812, -0.04940410330891609, -0.38309505581855774, 1.098175048828125, 0.2881515324115753, 1.2867002487182617, 0.6486227512359619, -0.27877387404441833, 0.5118309855461121, -0.43872061371803284, -0.4980912506580353, 1.6182472705841064, 0.1370740383863449, -1.519457459449768, -2.2887041568756104, -0.1490584760904312, -1.0838944911956787, 0.052394572645425797, -0.8648986220359802, -0.9343138933181763, 1.54398775100708, 0.4350053668022156, -0.9677265286445618, -0.06030912697315216, -0.40052711963653564, -0.552230179309845, 2.6973729133605957, -1.3426599502563477, -0.29535552859306335, -0.942493200302124, -0.7056857347488403, 1.4948481321334839, -1.2517049312591553, -0.2436736673116684, -0.9900481104850769, -0.5277680158615112, -1.223707914352417, -0.40006452798843384, -0.045432861894369125, -0.7870623469352722, 0.6438795328140259, 0.02359805256128311, -1.2715270519256592, -0.37222370505332947, -1.0738896131515503, 0.7850942015647888, -0.20145370066165924, 0.05620148405432701, 1.6140497922897339, 0.21649838984012604, -0.3807143270969391, 0.8118951320648193, 1.231421947479248, 0.5992119312286377, -0.5475369691848755, 0.19761031866073608, -0.6370906829833984, 0.464702308177948, -1.1597574949264526, 0.3642369508743286, -2.9461965560913086, 0.673585057258606, -0.0636024996638298, -0.10052657127380371, -0.17234455049037933, -1.529934048652649, 0.9605899453163147, 2.4021079540252686, -1.102465033531189, 0.6356310844421387, 0.3017008900642395, 1.1915233135223389, -1.6274659633636475, 0.06896618008613586, -0.6888858079910278, 2.102416515350342, 0.10417425632476807, 1.0770219564437866, -0.5743394494056702, -2.3854777812957764, 0.5501946210861206, -1.2100403308868408, -0.9388965964317322, 0.7801005840301514, -0.8846368789672852, 0.1699369102716446, -1.0919692516326904, -0.1181865781545639, -0.8896802663803101, -1.1713825464248657, 0.5164446830749512, 0.0957990437746048, 0.6780959367752075, -0.6295151114463806, 0.24602487683296204, -2.25407075881958, -1.3626545667648315, -0.1414513885974884, -0.9355493783950806, 0.4837088882923126, -0.42301520705223083, 0.7104606032371521, -0.12195725739002228, -0.006905942223966122, 0.3058418929576874, 1.5161734819412231, 3.2588043212890625, -0.07125714421272278, 0.38377952575683594, -0.28224605321884155, -1.1244031190872192, 1.4945719242095947, 0.8837217688560486, -0.14752858877182007, -0.6156762838363647, -0.9592902660369873, 1.363300085067749, 1.9253603219985962, 1.0332367420196533, 0.10469095408916473, -0.9315792322158813, -0.713271975517273, 0.12076568603515625, 0.1877281218767166, 0.40139660239219666, 1.0176829099655151, 0.12325607240200043, 0.12966352701187134, 1.3966225385665894, 1.0302608013153076, -0.28907349705696106, 0.4343512952327728, -0.8796455264091492, -0.2989605665206909, 0.577343225479126, 0.3678029477596283, 0.0013247095048427582, 0.23806039988994598, -1.0106085538864136, -0.2246447652578354, -0.21448050439357758, -0.8676037192344666, -0.8272402882575989, -0.3944867253303528, -0.42956680059432983, 1.7955009937286377, -0.11565341055393219, -0.560137152671814, 0.05723914876580238, -0.788776695728302, -0.04681653156876564, -1.077985167503357, 0.21270114183425903, -0.06570804864168167, 0.006229382008314133, -0.17623798549175262, 1.74176824092865, -0.9212462306022644, -2.214897632598877, 0.152136892080307, 0.2456687092781067, -0.2532241940498352, -0.052651748061180115, 1.7481979131698608, 0.4953939914703369, 1.3935669660568237, 1.5745813846588135, 1.1499162912368774, -0.5771210789680481, -1.388604760169983, 0.781987726688385, 0.9516232013702393, -1.3797065019607544, 0.9249000549316406, -0.1841134876012802, -0.5637074708938599, 0.5362054109573364, 1.1925690174102783, 0.4213484823703766, -1.993851900100708, 0.8280630111694336, -1.135657787322998, 0.8768242001533508, 0.8097249865531921, 0.8335734605789185, 0.1668165922164917, 0.8390157222747803, -1.2890621423721313, -1.0650287866592407, -0.5102620720863342, -0.6669780015945435, 1.8359702825546265, -0.23807315528392792, 0.43188661336898804, -0.3040655553340912, -1.2950387001037598, 0.13356417417526245, 0.7160056829452515, 0.2650749385356903, -0.3969535827636719, 0.7558459639549255, -0.7252107262611389, -1.1271231174468994, -1.3482329845428467, -0.4681209623813629, -1.1165615320205688, -0.8760100603103638, 1.0754814147949219, 0.7189726233482361, 0.5521379113197327, 2.009308338165283, 0.7205957770347595, 0.25988027453422546, -2.575284719467163, 0.7893834710121155, 0.35925862193107605, -0.07294335961341858, 0.8291662335395813, 0.36037689447402954, 1.2217837572097778, -0.13357022404670715, 0.5750759243965149, -2.401653528213501, 2.2872300148010254, -0.28141114115715027, 0.7473286986351013, 0.1319682002067566, -0.04191245138645172, 0.9732484817504883, 0.631686270236969, 0.5234874486923218, -1.1104069948196411, 0.8242641091346741, -0.6407008767127991, 1.167335867881775, 0.8431435227394104, -0.8623201251029968, 0.17546537518501282, 1.1652449369430542, 0.315032958984375, -0.5205708146095276, -1.027076005935669, -0.8882582187652588, 0.8801206350326538, 1.7153277397155762, -0.04006575793027878, 0.052390556782484055, 0.7616979479789734, 0.7731211185455322, -1.2333111763000488, -0.023013845086097717, -0.6021442413330078, -0.7276259660720825, 1.8036186695098877, 2.046790361404419, -0.05595552176237106, -0.05482061207294464, -0.7357048392295837, -1.4386323690414429, 0.8572119474411011, 0.10246571898460388, -0.07859165966510773, 0.7326139807701111, -0.6623414754867554, 1.1642875671386719, 0.8115394711494446, 0.8919784426689148, 0.3351525366306305, 0.03788159415125847, 0.24523776769638062, -0.3602047860622406, -1.1990067958831787, -0.32142508029937744, -0.9947327375411987, -2.783888816833496, 0.39754337072372437, -0.29973161220550537, -1.5100338459014893, 0.16137224435806274, -0.9454512596130371, 0.6809780597686768, -0.4780194163322449, -1.1985729932785034, -1.2971192598342896, 0.328203409910202, -0.14798957109451294, 0.8350459933280945, -1.6804829835891724, -0.12993629276752472, 1.108137607574463, 0.9661808609962463, -0.6523602604866028, 0.8897499442100525, 0.3171631395816803, 0.9898694753646851, 0.9137023687362671, -0.3673804700374603, 0.5068837404251099, 0.23380954563617706, -1.365089774131775, 0.33138707280158997, 1.388721227645874, 0.19899068772792816, 1.3075189590454102, -0.42146480083465576, 0.07607132196426392, 0.377408891916275, -0.37433403730392456, -0.538587212562561, -0.6609638333320618, 0.688353955745697, -0.1253754198551178, -0.9622514843940735, -0.19799625873565674, 0.02904406562447548, -0.11087499558925629, 0.26271548867225647, -1.4659992456436157, -0.14502540230751038, -0.5047415494918823, -0.5622474551200867, -1.4608780145645142, -0.13442260026931763, 1.3277008533477783, -0.7504373788833618, -0.04014591872692108, 0.5733280777931213, 0.2020597755908966, 0.5579245686531067, 0.599009096622467, -0.724776029586792, -0.3082561492919922, -0.10420799255371094, -0.4463329315185547, 0.322764128446579, 1.3257204294204712, -0.05499331280589104, -0.9290491938591003, 0.5458580255508423, -0.1816750317811966, 0.2590652406215668, 1.8956903219223022, 0.09284797310829163, -0.9070630669593811, 0.33437421917915344, -0.7195953726768494, 1.8398598432540894, 1.6581077575683594, 1.1799312829971313, -0.044503871351480484, -0.8595359325408936, 0.6313842535018921, -0.3730437457561493, -0.3831016719341278, 0.8253694772720337, 0.29553982615470886, -0.27267664670944214, -1.3855831623077393, 0.749473512172699, 1.338692307472229, -0.624421238899231, -0.8398402333259583, 0.09070560336112976, -0.8019678592681885, 1.2403849363327026, 0.6242402791976929, 0.34974193572998047, 0.3290591239929199, 1.6542760133743286, 0.7784177660942078, -0.5300633311271667, 0.5823891758918762, 0.4127461016178131, -0.14991649985313416, -2.0556135177612305, -1.1695797443389893, 0.23758991062641144, -0.48499223589897156, -1.473285436630249, 1.4328296184539795, -1.2776352167129517, -1.0775784254074097, 0.5255487561225891, 0.1870707869529724, 1.2901349067687988, 0.41050395369529724, 1.6393382549285889, 1.994072437286377, 0.9311237931251526, 0.5165095925331116, 1.1463779211044312, -0.2232515811920166, -0.26941630244255066, 1.7081295251846313, -0.45174509286880493, 0.6473721861839294, 1.088777780532837, -0.39430952072143555, -1.1732991933822632, -0.860687255859375, -1.1518161296844482, -0.7652068734169006, 1.0516096353530884, 0.12530739605426788, -1.1269946098327637, 0.3530549108982086, 1.6512571573257446, 0.0024918382987380028, -0.13638193905353546, 0.6337167620658875, 0.35001659393310547, -0.5902076363563538, -0.04173842817544937, -1.0571789741516113, 0.5677148103713989, -0.42923077940940857, -0.3836853504180908, 0.22356393933296204, 0.6461501121520996, 1.2300465106964111, 0.11579480767250061, 0.11419878900051117, 1.232703447341919, -1.4534881114959717, 1.2373442649841309, -0.9169506430625916, 0.34958699345588684, -2.2485604286193848, 1.4077112674713135, -0.882666289806366, 1.9540514945983887, -2.722236394882202, 0.40085405111312866, -0.37361806631088257, -0.6878340244293213, 0.2152683287858963, -0.16852501034736633, 0.11792293190956116, -0.07670964300632477, -1.0075063705444336, -0.04255468025803566, -0.8780719637870789, 0.43071448802948, 1.1565195322036743, 1.4041719436645508, -0.9461771249771118, -0.31473952531814575, -1.6330286264419556, -0.09040063619613647, -0.43324989080429077, 0.10299122333526611, -1.8271546363830566, -0.19147224724292755, -2.0813918113708496, -2.3522064685821533, -1.3678998947143555, -1.0705945491790771, 1.38714599609375, 0.10597233474254608, -0.8674067258834839, 1.088313341140747, -0.39195573329925537, -1.8171721696853638, 1.1680859327316284, -2.224883794784546 ]
https://github.com/huggingface/datasets/issues/4568
XNLI cache reload is very slow
Sure, I was running it on a Linux machine. I found that if I turn the Internet off, it would still try to make a HTTPS call which would slow down the cache loading. If you can't reproduce then we can close the issue.
### Reproduce Using `2.3.3.dev0` `from datasets import load_dataset` `load_dataset("xnli", "en")` Turn off Internet `load_dataset("xnli", "en")` I cancelled the second `load_dataset` eventually cuz it took super long. It would be great to have something to specify e.g. `only_load_from_cache` and avoid the library trying to download when there is no Internet. If I leave it running it works but takes way longer than when there is Internet. I would expect loading from cache to take the same amount of time regardless of whether there is Internet. ``` --------------------------------------------------------------------------- gaierror Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 174 conn = connection.create_connection( --> 175 (self._dns_host, self.port), self.timeout, **extra_kw 176 ) /opt/conda/lib/python3.7/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options) 71 ---> 72 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 73 af, socktype, proto, canonname, sa = res /opt/conda/lib/python3.7/socket.py in getaddrinfo(host, port, family, type, proto, flags) 751 addrlist = [] --> 752 for res in _socket.getaddrinfo(host, port, family, type, proto, flags): 753 af, socktype, proto, canonname, sa = res gaierror: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: KeyboardInterrupt Traceback (most recent call last) /tmp/ipykernel_33/3594208039.py in <module> ----> 1 load_dataset("xnli", "en") /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, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs) 1673 revision=revision, 1674 use_auth_token=use_auth_token, -> 1675 **config_kwargs, 1676 ) 1677 /opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs) 1494 download_mode=download_mode, 1495 data_dir=data_dir, -> 1496 data_files=data_files, 1497 ) 1498 /opt/conda/lib/python3.7/site-packages/datasets/load.py in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1182 download_config=download_config, 1183 download_mode=download_mode, -> 1184 dynamic_modules_path=dynamic_modules_path, 1185 ).get_module() 1186 elif path.count("/") == 1: # community dataset on the Hub /opt/conda/lib/python3.7/site-packages/datasets/load.py in __init__(self, name, revision, download_config, download_mode, dynamic_modules_path) 506 self.dynamic_modules_path = dynamic_modules_path 507 assert self.name.count("/") == 0 --> 508 increase_load_count(name, resource_type="dataset") 509 510 def download_loading_script(self, revision: Optional[str]) -> str: /opt/conda/lib/python3.7/site-packages/datasets/load.py in increase_load_count(name, resource_type) 166 if not config.HF_DATASETS_OFFLINE and config.HF_UPDATE_DOWNLOAD_COUNTS: 167 try: --> 168 head_hf_s3(name, filename=name + ".py", dataset=(resource_type == "dataset")) 169 except Exception: 170 pass /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in head_hf_s3(identifier, filename, use_cdn, dataset, max_retries) 93 return http_head( 94 hf_bucket_url(identifier=identifier, filename=filename, use_cdn=use_cdn, dataset=dataset), ---> 95 max_retries=max_retries, 96 ) 97 /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in http_head(url, proxies, headers, cookies, allow_redirects, timeout, max_retries) 445 allow_redirects=allow_redirects, 446 timeout=timeout, --> 447 max_retries=max_retries, 448 ) 449 return response /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in _request_with_retry(method, url, max_retries, base_wait_time, max_wait_time, timeout, **params) 366 tries += 1 367 try: --> 368 response = requests.request(method=method.upper(), url=url, timeout=timeout, **params) 369 success = True 370 except (requests.exceptions.ConnectTimeout, requests.exceptions.ConnectionError) as err: /opt/conda/lib/python3.7/site-packages/requests/api.py in request(method, url, **kwargs) 59 # cases, and look like a memory leak in others. 60 with sessions.Session() as session: ---> 61 return session.request(method=method, url=url, **kwargs) 62 63 /opt/conda/lib/python3.7/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json) 527 } 528 send_kwargs.update(settings) --> 529 resp = self.send(prep, **send_kwargs) 530 531 return resp /opt/conda/lib/python3.7/site-packages/requests/sessions.py in send(self, request, **kwargs) 643 644 # Send the request --> 645 r = adapter.send(request, **kwargs) 646 647 # Total elapsed time of the request (approximately) /opt/conda/lib/python3.7/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 448 decode_content=False, 449 retries=self.max_retries, --> 450 timeout=timeout 451 ) 452 /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 708 body=body, 709 headers=headers, --> 710 chunked=chunked, 711 ) 712 /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 384 # Trigger any extra validation we need to do. 385 try: --> 386 self._validate_conn(conn) 387 except (SocketTimeout, BaseSSLError) as e: 388 # Py2 raises this as a BaseSSLError, Py3 raises it as socket timeout. /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in _validate_conn(self, conn) 1038 # Force connect early to allow us to validate the connection. 1039 if not getattr(conn, "sock", None): # AppEngine might not have `.sock` -> 1040 conn.connect() 1041 1042 if not conn.is_verified: /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in connect(self) 356 def connect(self): 357 # Add certificate verification --> 358 self.sock = conn = self._new_conn() 359 hostname = self.host 360 tls_in_tls = False /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 173 try: 174 conn = connection.create_connection( --> 175 (self._dns_host, self.port), self.timeout, **extra_kw 176 ) 177 KeyboardInterrupt: ```
685
44
XNLI cache reload is very slow ### Reproduce Using `2.3.3.dev0` `from datasets import load_dataset` `load_dataset("xnli", "en")` Turn off Internet `load_dataset("xnli", "en")` I cancelled the second `load_dataset` eventually cuz it took super long. It would be great to have something to specify e.g. `only_load_from_cache` and avoid the library trying to download when there is no Internet. If I leave it running it works but takes way longer than when there is Internet. I would expect loading from cache to take the same amount of time regardless of whether there is Internet. ``` --------------------------------------------------------------------------- gaierror Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 174 conn = connection.create_connection( --> 175 (self._dns_host, self.port), self.timeout, **extra_kw 176 ) /opt/conda/lib/python3.7/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options) 71 ---> 72 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 73 af, socktype, proto, canonname, sa = res /opt/conda/lib/python3.7/socket.py in getaddrinfo(host, port, family, type, proto, flags) 751 addrlist = [] --> 752 for res in _socket.getaddrinfo(host, port, family, type, proto, flags): 753 af, socktype, proto, canonname, sa = res gaierror: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: KeyboardInterrupt Traceback (most recent call last) /tmp/ipykernel_33/3594208039.py in <module> ----> 1 load_dataset("xnli", "en") /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, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs) 1673 revision=revision, 1674 use_auth_token=use_auth_token, -> 1675 **config_kwargs, 1676 ) 1677 /opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs) 1494 download_mode=download_mode, 1495 data_dir=data_dir, -> 1496 data_files=data_files, 1497 ) 1498 /opt/conda/lib/python3.7/site-packages/datasets/load.py in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1182 download_config=download_config, 1183 download_mode=download_mode, -> 1184 dynamic_modules_path=dynamic_modules_path, 1185 ).get_module() 1186 elif path.count("/") == 1: # community dataset on the Hub /opt/conda/lib/python3.7/site-packages/datasets/load.py in __init__(self, name, revision, download_config, download_mode, dynamic_modules_path) 506 self.dynamic_modules_path = dynamic_modules_path 507 assert self.name.count("/") == 0 --> 508 increase_load_count(name, resource_type="dataset") 509 510 def download_loading_script(self, revision: Optional[str]) -> str: /opt/conda/lib/python3.7/site-packages/datasets/load.py in increase_load_count(name, resource_type) 166 if not config.HF_DATASETS_OFFLINE and config.HF_UPDATE_DOWNLOAD_COUNTS: 167 try: --> 168 head_hf_s3(name, filename=name + ".py", dataset=(resource_type == "dataset")) 169 except Exception: 170 pass /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in head_hf_s3(identifier, filename, use_cdn, dataset, max_retries) 93 return http_head( 94 hf_bucket_url(identifier=identifier, filename=filename, use_cdn=use_cdn, dataset=dataset), ---> 95 max_retries=max_retries, 96 ) 97 /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in http_head(url, proxies, headers, cookies, allow_redirects, timeout, max_retries) 445 allow_redirects=allow_redirects, 446 timeout=timeout, --> 447 max_retries=max_retries, 448 ) 449 return response /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in _request_with_retry(method, url, max_retries, base_wait_time, max_wait_time, timeout, **params) 366 tries += 1 367 try: --> 368 response = requests.request(method=method.upper(), url=url, timeout=timeout, **params) 369 success = True 370 except (requests.exceptions.ConnectTimeout, requests.exceptions.ConnectionError) as err: /opt/conda/lib/python3.7/site-packages/requests/api.py in request(method, url, **kwargs) 59 # cases, and look like a memory leak in others. 60 with sessions.Session() as session: ---> 61 return session.request(method=method, url=url, **kwargs) 62 63 /opt/conda/lib/python3.7/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json) 527 } 528 send_kwargs.update(settings) --> 529 resp = self.send(prep, **send_kwargs) 530 531 return resp /opt/conda/lib/python3.7/site-packages/requests/sessions.py in send(self, request, **kwargs) 643 644 # Send the request --> 645 r = adapter.send(request, **kwargs) 646 647 # Total elapsed time of the request (approximately) /opt/conda/lib/python3.7/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 448 decode_content=False, 449 retries=self.max_retries, --> 450 timeout=timeout 451 ) 452 /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 708 body=body, 709 headers=headers, --> 710 chunked=chunked, 711 ) 712 /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 384 # Trigger any extra validation we need to do. 385 try: --> 386 self._validate_conn(conn) 387 except (SocketTimeout, BaseSSLError) as e: 388 # Py2 raises this as a BaseSSLError, Py3 raises it as socket timeout. /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in _validate_conn(self, conn) 1038 # Force connect early to allow us to validate the connection. 1039 if not getattr(conn, "sock", None): # AppEngine might not have `.sock` -> 1040 conn.connect() 1041 1042 if not conn.is_verified: /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in connect(self) 356 def connect(self): 357 # Add certificate verification --> 358 self.sock = conn = self._new_conn() 359 hostname = self.host 360 tls_in_tls = False /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 173 try: 174 conn = connection.create_connection( --> 175 (self._dns_host, self.port), self.timeout, **extra_kw 176 ) 177 KeyboardInterrupt: ``` Sure, I was running it on a Linux machine. I found that if I turn the Internet off, it would still try to make a HTTPS call which would slow down the cache loading. If you can't reproduce then we can close the issue.
[ -1.134673833847046, -0.7720680236816406, -0.6108931303024292, 1.406455636024475, -0.046117667108774185, -1.3684138059616089, 0.1877940446138382, -0.8942205905914307, 1.5669593811035156, -0.8929093480110168, 0.4064018726348877, -1.727515459060669, 0.06133737042546272, -0.6680017113685608, -0.62983638048172, -0.6665216088294983, -0.3601488769054413, -0.7547736167907715, 1.090676188468933, 2.417607307434082, 1.2420052289962769, -1.3118599653244019, 2.8078951835632324, 0.6264305114746094, -0.21745489537715912, -0.8706058859825134, 0.4028034806251526, -0.05400010570883751, -1.4137191772460938, -0.3916208744049072, -1.0060292482376099, -0.13254646956920624, -0.7276644706726074, -0.5065678954124451, 0.08740027248859406, 0.4761256277561188, -0.21149078011512756, -0.3388866186141968, -0.41671088337898254, -0.8013585209846497, 0.6508010625839233, -0.3056899905204773, 0.9196504950523376, -0.2811785638332367, 1.7559841871261597, -0.6090209484100342, 0.5110931992530823, 0.5784671902656555, 1.2022523880004883, 0.18590585887432098, -0.02732747234404087, 0.30052152276039124, 0.22570256888866425, 0.07249274849891663, 0.6299976110458374, 1.2063636779785156, 0.7011944055557251, 0.6257848739624023, 0.6764400601387024, -2.1429903507232666, 1.357056975364685, -0.9159385561943054, 0.2770964205265045, 1.374285340309143, -1.0394551753997803, 0.43406879901885986, -1.8558927774429321, -0.20802001655101776, 0.35988470911979675, -2.2256574630737305, 0.13863681256771088, -1.2349070310592651, -0.5503186583518982, 0.9470050930976868, 0.3889802396297455, -1.3117049932479858, -0.024439308792352676, -0.40461859107017517, 0.8989964127540588, 0.35960009694099426, 1.070981740951538, -1.7037951946258545, 0.08965307474136353, -0.2731872797012329, 0.37144792079925537, -1.1315513849258423, -1.5842740535736084, 0.6335495114326477, 0.7266390919685364, 0.5941415429115295, -0.2120562493801117, 0.9117780923843384, -1.1837868690490723, 0.8173136711120605, -0.9936770796775818, -1.727128505706787, -1.3844045400619507, -2.4528791904449463, -2.469066619873047, 0.804233729839325, -0.4109434187412262, -0.42248597741127014, 2.1018927097320557, -1.1674680709838867, -1.6444252729415894, 1.0208690166473389, 0.2508649230003357, -0.07822833955287933, 2.422832727432251, 0.17390675842761993, -0.8790171146392822, 0.6739140152931213, -0.8817844390869141, 0.6785921454429626, -0.33384403586387634, 1.2904689311981201, 0.3654463589191437, -1.09882652759552, 1.7067315578460693, -0.4348228871822357, 0.4457452893257141, -0.6911173462867737, -0.37650176882743835, -0.5781430602073669, 0.19822147488594055, 1.9526684284210205, -0.0711808055639267, 1.5438774824142456, -0.1476650983095169, -1.4638947248458862, -1.3167929649353027, 0.7477601170539856, 0.4052749574184418, -0.8498703837394714, 0.16693107783794403, -0.44850680232048035, 0.223016619682312, 0.19444172084331512, 1.1301171779632568, 1.3537540435791016, 0.8371363282203674, -0.20789745450019836, -0.9126368165016174, 0.13023360073566437, -0.11986897885799408, -0.646142840385437, -1.6984823942184448, -0.3455020487308502, 0.05608915910124779, 0.6882095336914062, -1.188204288482666, 2.039762496948242, 0.9430649280548096, 2.024566888809204, 0.9942874908447266, -0.4161839485168457, 1.5426490306854248, 0.08314208686351776, 1.8971619606018066, -0.3272404372692108, 0.7496440410614014, -0.5297115445137024, -1.1552051305770874, 0.7399166226387024, -0.3271046578884125, -1.9672044515609741, -0.4040895104408264, -0.8662149310112, -0.12772618234157562, -0.9278696179389954, 1.0958157777786255, -0.15776178240776062, -1.3716591596603394, 0.21685388684272766, -0.6365370750427246, 0.1186414361000061, -1.3973511457443237, 0.31867924332618713, 0.7129823565483093, -0.7458760738372803, 0.07930561900138855, -0.4901672899723053, -1.4507297277450562, -0.5801146626472473, 0.3337222933769226, 1.7225655317306519, -0.6118158102035522, 0.9686269760131836, 1.024905800819397, -0.6082738041877747, -0.14024126529693604, 0.5542981624603271, -0.35819724202156067, 0.8062037229537964, -1.013269066810608, -0.4451310932636261, 1.1555664539337158, -0.29294565320014954, -0.46927517652511597, 1.298743486404419, 0.7632737755775452, -1.0356545448303223, -0.2754972577095032, -0.11840356886386871, -0.8347360491752625, 0.12944096326828003, -1.5606510639190674, -0.06246061623096466, 0.4294765591621399, -1.4395555257797241, -0.40604525804519653, 0.010631082579493523, 1.281583547592163, 0.025842301547527313, 1.3933486938476562, -0.24749204516410828, -0.13076907396316528, -0.516068696975708, -0.5214877128601074, 0.14328965544700623, -0.0015906821936368942, -0.6139550805091858, 0.3624895215034485, -0.7450006604194641, 0.2143726497888565, 1.5364789962768555, 0.15015684068202972, 0.1288202404975891, 0.5080187320709229, 1.1196022033691406, 0.31466618180274963, -0.11175882816314697, -0.9047318696975708, -1.5990222692489624, 2.0386829376220703, -1.6292965412139893, 1.9169228076934814, 0.7989873290061951, -0.042457304894924164, -1.8385146856307983, -1.7529526948928833, 1.4564164876937866, 1.143211007118225, 2.4667327404022217, 0.5598489046096802, 0.39350301027297974, -0.8282663226127625, -0.655846118927002, 0.4871278703212738, -0.8572996854782104, -0.8868730664253235, 0.2164553701877594, 2.3753745555877686, 1.7234416007995605, -0.39694270491600037, -0.142797589302063, -0.9559719562530518, 1.310463309288025, -0.3199860453605652, 0.26262518763542175, 1.9235472679138184, -0.4680007994174957, -1.0929747819900513, 1.3269044160842896, -2.3884975910186768, 0.3662168085575104, 1.9889159202575684, 0.3661963939666748, 0.06540274620056152, -1.237889289855957, -0.7292175889015198, -0.12093797326087952, -0.4455024302005768, -1.294389247894287, 0.4524938762187958, -0.20138958096504211, -0.8838379383087158, -1.3831779956817627, 0.03784856200218201, -1.1337252855300903, -1.7072685956954956, 0.3255397081375122, 1.7163680791854858, 2.205709457397461, -0.7758100628852844, 1.2950472831726074, -0.3011731505393982, 0.25767388939857483, 1.1228562593460083, 1.2187193632125854, 3.1522934436798096, 1.9694936275482178, -1.2587248086929321, 0.7318320870399475, -0.21949167549610138, -0.5241554379463196, 1.1886845827102661, -1.0659446716308594, 1.1585019826889038, -0.27716657519340515, -1.3154606819152832, -1.1862766742706299, 0.9338312745094299, 0.3820326626300812, -0.04940410330891609, -0.38309505581855774, 1.098175048828125, 0.2881515324115753, 1.2867002487182617, 0.6486227512359619, -0.27877387404441833, 0.5118309855461121, -0.43872061371803284, -0.4980912506580353, 1.6182472705841064, 0.1370740383863449, -1.519457459449768, -2.2887041568756104, -0.1490584760904312, -1.0838944911956787, 0.052394572645425797, -0.8648986220359802, -0.9343138933181763, 1.54398775100708, 0.4350053668022156, -0.9677265286445618, -0.06030912697315216, -0.40052711963653564, -0.552230179309845, 2.6973729133605957, -1.3426599502563477, -0.29535552859306335, -0.942493200302124, -0.7056857347488403, 1.4948481321334839, -1.2517049312591553, -0.2436736673116684, -0.9900481104850769, -0.5277680158615112, -1.223707914352417, -0.40006452798843384, -0.045432861894369125, -0.7870623469352722, 0.6438795328140259, 0.02359805256128311, -1.2715270519256592, -0.37222370505332947, -1.0738896131515503, 0.7850942015647888, -0.20145370066165924, 0.05620148405432701, 1.6140497922897339, 0.21649838984012604, -0.3807143270969391, 0.8118951320648193, 1.231421947479248, 0.5992119312286377, -0.5475369691848755, 0.19761031866073608, -0.6370906829833984, 0.464702308177948, -1.1597574949264526, 0.3642369508743286, -2.9461965560913086, 0.673585057258606, -0.0636024996638298, -0.10052657127380371, -0.17234455049037933, -1.529934048652649, 0.9605899453163147, 2.4021079540252686, -1.102465033531189, 0.6356310844421387, 0.3017008900642395, 1.1915233135223389, -1.6274659633636475, 0.06896618008613586, -0.6888858079910278, 2.102416515350342, 0.10417425632476807, 1.0770219564437866, -0.5743394494056702, -2.3854777812957764, 0.5501946210861206, -1.2100403308868408, -0.9388965964317322, 0.7801005840301514, -0.8846368789672852, 0.1699369102716446, -1.0919692516326904, -0.1181865781545639, -0.8896802663803101, -1.1713825464248657, 0.5164446830749512, 0.0957990437746048, 0.6780959367752075, -0.6295151114463806, 0.24602487683296204, -2.25407075881958, -1.3626545667648315, -0.1414513885974884, -0.9355493783950806, 0.4837088882923126, -0.42301520705223083, 0.7104606032371521, -0.12195725739002228, -0.006905942223966122, 0.3058418929576874, 1.5161734819412231, 3.2588043212890625, -0.07125714421272278, 0.38377952575683594, -0.28224605321884155, -1.1244031190872192, 1.4945719242095947, 0.8837217688560486, -0.14752858877182007, -0.6156762838363647, -0.9592902660369873, 1.363300085067749, 1.9253603219985962, 1.0332367420196533, 0.10469095408916473, -0.9315792322158813, -0.713271975517273, 0.12076568603515625, 0.1877281218767166, 0.40139660239219666, 1.0176829099655151, 0.12325607240200043, 0.12966352701187134, 1.3966225385665894, 1.0302608013153076, -0.28907349705696106, 0.4343512952327728, -0.8796455264091492, -0.2989605665206909, 0.577343225479126, 0.3678029477596283, 0.0013247095048427582, 0.23806039988994598, -1.0106085538864136, -0.2246447652578354, -0.21448050439357758, -0.8676037192344666, -0.8272402882575989, -0.3944867253303528, -0.42956680059432983, 1.7955009937286377, -0.11565341055393219, -0.560137152671814, 0.05723914876580238, -0.788776695728302, -0.04681653156876564, -1.077985167503357, 0.21270114183425903, -0.06570804864168167, 0.006229382008314133, -0.17623798549175262, 1.74176824092865, -0.9212462306022644, -2.214897632598877, 0.152136892080307, 0.2456687092781067, -0.2532241940498352, -0.052651748061180115, 1.7481979131698608, 0.4953939914703369, 1.3935669660568237, 1.5745813846588135, 1.1499162912368774, -0.5771210789680481, -1.388604760169983, 0.781987726688385, 0.9516232013702393, -1.3797065019607544, 0.9249000549316406, -0.1841134876012802, -0.5637074708938599, 0.5362054109573364, 1.1925690174102783, 0.4213484823703766, -1.993851900100708, 0.8280630111694336, -1.135657787322998, 0.8768242001533508, 0.8097249865531921, 0.8335734605789185, 0.1668165922164917, 0.8390157222747803, -1.2890621423721313, -1.0650287866592407, -0.5102620720863342, -0.6669780015945435, 1.8359702825546265, -0.23807315528392792, 0.43188661336898804, -0.3040655553340912, -1.2950387001037598, 0.13356417417526245, 0.7160056829452515, 0.2650749385356903, -0.3969535827636719, 0.7558459639549255, -0.7252107262611389, -1.1271231174468994, -1.3482329845428467, -0.4681209623813629, -1.1165615320205688, -0.8760100603103638, 1.0754814147949219, 0.7189726233482361, 0.5521379113197327, 2.009308338165283, 0.7205957770347595, 0.25988027453422546, -2.575284719467163, 0.7893834710121155, 0.35925862193107605, -0.07294335961341858, 0.8291662335395813, 0.36037689447402954, 1.2217837572097778, -0.13357022404670715, 0.5750759243965149, -2.401653528213501, 2.2872300148010254, -0.28141114115715027, 0.7473286986351013, 0.1319682002067566, -0.04191245138645172, 0.9732484817504883, 0.631686270236969, 0.5234874486923218, -1.1104069948196411, 0.8242641091346741, -0.6407008767127991, 1.167335867881775, 0.8431435227394104, -0.8623201251029968, 0.17546537518501282, 1.1652449369430542, 0.315032958984375, -0.5205708146095276, -1.027076005935669, -0.8882582187652588, 0.8801206350326538, 1.7153277397155762, -0.04006575793027878, 0.052390556782484055, 0.7616979479789734, 0.7731211185455322, -1.2333111763000488, -0.023013845086097717, -0.6021442413330078, -0.7276259660720825, 1.8036186695098877, 2.046790361404419, -0.05595552176237106, -0.05482061207294464, -0.7357048392295837, -1.4386323690414429, 0.8572119474411011, 0.10246571898460388, -0.07859165966510773, 0.7326139807701111, -0.6623414754867554, 1.1642875671386719, 0.8115394711494446, 0.8919784426689148, 0.3351525366306305, 0.03788159415125847, 0.24523776769638062, -0.3602047860622406, -1.1990067958831787, -0.32142508029937744, -0.9947327375411987, -2.783888816833496, 0.39754337072372437, -0.29973161220550537, -1.5100338459014893, 0.16137224435806274, -0.9454512596130371, 0.6809780597686768, -0.4780194163322449, -1.1985729932785034, -1.2971192598342896, 0.328203409910202, -0.14798957109451294, 0.8350459933280945, -1.6804829835891724, -0.12993629276752472, 1.108137607574463, 0.9661808609962463, -0.6523602604866028, 0.8897499442100525, 0.3171631395816803, 0.9898694753646851, 0.9137023687362671, -0.3673804700374603, 0.5068837404251099, 0.23380954563617706, -1.365089774131775, 0.33138707280158997, 1.388721227645874, 0.19899068772792816, 1.3075189590454102, -0.42146480083465576, 0.07607132196426392, 0.377408891916275, -0.37433403730392456, -0.538587212562561, -0.6609638333320618, 0.688353955745697, -0.1253754198551178, -0.9622514843940735, -0.19799625873565674, 0.02904406562447548, -0.11087499558925629, 0.26271548867225647, -1.4659992456436157, -0.14502540230751038, -0.5047415494918823, -0.5622474551200867, -1.4608780145645142, -0.13442260026931763, 1.3277008533477783, -0.7504373788833618, -0.04014591872692108, 0.5733280777931213, 0.2020597755908966, 0.5579245686531067, 0.599009096622467, -0.724776029586792, -0.3082561492919922, -0.10420799255371094, -0.4463329315185547, 0.322764128446579, 1.3257204294204712, -0.05499331280589104, -0.9290491938591003, 0.5458580255508423, -0.1816750317811966, 0.2590652406215668, 1.8956903219223022, 0.09284797310829163, -0.9070630669593811, 0.33437421917915344, -0.7195953726768494, 1.8398598432540894, 1.6581077575683594, 1.1799312829971313, -0.044503871351480484, -0.8595359325408936, 0.6313842535018921, -0.3730437457561493, -0.3831016719341278, 0.8253694772720337, 0.29553982615470886, -0.27267664670944214, -1.3855831623077393, 0.749473512172699, 1.338692307472229, -0.624421238899231, -0.8398402333259583, 0.09070560336112976, -0.8019678592681885, 1.2403849363327026, 0.6242402791976929, 0.34974193572998047, 0.3290591239929199, 1.6542760133743286, 0.7784177660942078, -0.5300633311271667, 0.5823891758918762, 0.4127461016178131, -0.14991649985313416, -2.0556135177612305, -1.1695797443389893, 0.23758991062641144, -0.48499223589897156, -1.473285436630249, 1.4328296184539795, -1.2776352167129517, -1.0775784254074097, 0.5255487561225891, 0.1870707869529724, 1.2901349067687988, 0.41050395369529724, 1.6393382549285889, 1.994072437286377, 0.9311237931251526, 0.5165095925331116, 1.1463779211044312, -0.2232515811920166, -0.26941630244255066, 1.7081295251846313, -0.45174509286880493, 0.6473721861839294, 1.088777780532837, -0.39430952072143555, -1.1732991933822632, -0.860687255859375, -1.1518161296844482, -0.7652068734169006, 1.0516096353530884, 0.12530739605426788, -1.1269946098327637, 0.3530549108982086, 1.6512571573257446, 0.0024918382987380028, -0.13638193905353546, 0.6337167620658875, 0.35001659393310547, -0.5902076363563538, -0.04173842817544937, -1.0571789741516113, 0.5677148103713989, -0.42923077940940857, -0.3836853504180908, 0.22356393933296204, 0.6461501121520996, 1.2300465106964111, 0.11579480767250061, 0.11419878900051117, 1.232703447341919, -1.4534881114959717, 1.2373442649841309, -0.9169506430625916, 0.34958699345588684, -2.2485604286193848, 1.4077112674713135, -0.882666289806366, 1.9540514945983887, -2.722236394882202, 0.40085405111312866, -0.37361806631088257, -0.6878340244293213, 0.2152683287858963, -0.16852501034736633, 0.11792293190956116, -0.07670964300632477, -1.0075063705444336, -0.04255468025803566, -0.8780719637870789, 0.43071448802948, 1.1565195322036743, 1.4041719436645508, -0.9461771249771118, -0.31473952531814575, -1.6330286264419556, -0.09040063619613647, -0.43324989080429077, 0.10299122333526611, -1.8271546363830566, -0.19147224724292755, -2.0813918113708496, -2.3522064685821533, -1.3678998947143555, -1.0705945491790771, 1.38714599609375, 0.10597233474254608, -0.8674067258834839, 1.088313341140747, -0.39195573329925537, -1.8171721696853638, 1.1680859327316284, -2.224883794784546 ]
https://github.com/huggingface/datasets/issues/4568
XNLI cache reload is very slow
Hi @Muennighoff! You can set the env variable `HF_DATASETS_OFFLINE` to `1` to avoid this behavior in offline mode. More info is available [here](https://huggingface.co/docs/datasets/master/en/loading#offline).
### Reproduce Using `2.3.3.dev0` `from datasets import load_dataset` `load_dataset("xnli", "en")` Turn off Internet `load_dataset("xnli", "en")` I cancelled the second `load_dataset` eventually cuz it took super long. It would be great to have something to specify e.g. `only_load_from_cache` and avoid the library trying to download when there is no Internet. If I leave it running it works but takes way longer than when there is Internet. I would expect loading from cache to take the same amount of time regardless of whether there is Internet. ``` --------------------------------------------------------------------------- gaierror Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 174 conn = connection.create_connection( --> 175 (self._dns_host, self.port), self.timeout, **extra_kw 176 ) /opt/conda/lib/python3.7/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options) 71 ---> 72 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 73 af, socktype, proto, canonname, sa = res /opt/conda/lib/python3.7/socket.py in getaddrinfo(host, port, family, type, proto, flags) 751 addrlist = [] --> 752 for res in _socket.getaddrinfo(host, port, family, type, proto, flags): 753 af, socktype, proto, canonname, sa = res gaierror: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: KeyboardInterrupt Traceback (most recent call last) /tmp/ipykernel_33/3594208039.py in <module> ----> 1 load_dataset("xnli", "en") /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, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs) 1673 revision=revision, 1674 use_auth_token=use_auth_token, -> 1675 **config_kwargs, 1676 ) 1677 /opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs) 1494 download_mode=download_mode, 1495 data_dir=data_dir, -> 1496 data_files=data_files, 1497 ) 1498 /opt/conda/lib/python3.7/site-packages/datasets/load.py in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1182 download_config=download_config, 1183 download_mode=download_mode, -> 1184 dynamic_modules_path=dynamic_modules_path, 1185 ).get_module() 1186 elif path.count("/") == 1: # community dataset on the Hub /opt/conda/lib/python3.7/site-packages/datasets/load.py in __init__(self, name, revision, download_config, download_mode, dynamic_modules_path) 506 self.dynamic_modules_path = dynamic_modules_path 507 assert self.name.count("/") == 0 --> 508 increase_load_count(name, resource_type="dataset") 509 510 def download_loading_script(self, revision: Optional[str]) -> str: /opt/conda/lib/python3.7/site-packages/datasets/load.py in increase_load_count(name, resource_type) 166 if not config.HF_DATASETS_OFFLINE and config.HF_UPDATE_DOWNLOAD_COUNTS: 167 try: --> 168 head_hf_s3(name, filename=name + ".py", dataset=(resource_type == "dataset")) 169 except Exception: 170 pass /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in head_hf_s3(identifier, filename, use_cdn, dataset, max_retries) 93 return http_head( 94 hf_bucket_url(identifier=identifier, filename=filename, use_cdn=use_cdn, dataset=dataset), ---> 95 max_retries=max_retries, 96 ) 97 /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in http_head(url, proxies, headers, cookies, allow_redirects, timeout, max_retries) 445 allow_redirects=allow_redirects, 446 timeout=timeout, --> 447 max_retries=max_retries, 448 ) 449 return response /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in _request_with_retry(method, url, max_retries, base_wait_time, max_wait_time, timeout, **params) 366 tries += 1 367 try: --> 368 response = requests.request(method=method.upper(), url=url, timeout=timeout, **params) 369 success = True 370 except (requests.exceptions.ConnectTimeout, requests.exceptions.ConnectionError) as err: /opt/conda/lib/python3.7/site-packages/requests/api.py in request(method, url, **kwargs) 59 # cases, and look like a memory leak in others. 60 with sessions.Session() as session: ---> 61 return session.request(method=method, url=url, **kwargs) 62 63 /opt/conda/lib/python3.7/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json) 527 } 528 send_kwargs.update(settings) --> 529 resp = self.send(prep, **send_kwargs) 530 531 return resp /opt/conda/lib/python3.7/site-packages/requests/sessions.py in send(self, request, **kwargs) 643 644 # Send the request --> 645 r = adapter.send(request, **kwargs) 646 647 # Total elapsed time of the request (approximately) /opt/conda/lib/python3.7/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 448 decode_content=False, 449 retries=self.max_retries, --> 450 timeout=timeout 451 ) 452 /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 708 body=body, 709 headers=headers, --> 710 chunked=chunked, 711 ) 712 /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 384 # Trigger any extra validation we need to do. 385 try: --> 386 self._validate_conn(conn) 387 except (SocketTimeout, BaseSSLError) as e: 388 # Py2 raises this as a BaseSSLError, Py3 raises it as socket timeout. /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in _validate_conn(self, conn) 1038 # Force connect early to allow us to validate the connection. 1039 if not getattr(conn, "sock", None): # AppEngine might not have `.sock` -> 1040 conn.connect() 1041 1042 if not conn.is_verified: /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in connect(self) 356 def connect(self): 357 # Add certificate verification --> 358 self.sock = conn = self._new_conn() 359 hostname = self.host 360 tls_in_tls = False /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 173 try: 174 conn = connection.create_connection( --> 175 (self._dns_host, self.port), self.timeout, **extra_kw 176 ) 177 KeyboardInterrupt: ```
685
23
XNLI cache reload is very slow ### Reproduce Using `2.3.3.dev0` `from datasets import load_dataset` `load_dataset("xnli", "en")` Turn off Internet `load_dataset("xnli", "en")` I cancelled the second `load_dataset` eventually cuz it took super long. It would be great to have something to specify e.g. `only_load_from_cache` and avoid the library trying to download when there is no Internet. If I leave it running it works but takes way longer than when there is Internet. I would expect loading from cache to take the same amount of time regardless of whether there is Internet. ``` --------------------------------------------------------------------------- gaierror Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 174 conn = connection.create_connection( --> 175 (self._dns_host, self.port), self.timeout, **extra_kw 176 ) /opt/conda/lib/python3.7/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options) 71 ---> 72 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 73 af, socktype, proto, canonname, sa = res /opt/conda/lib/python3.7/socket.py in getaddrinfo(host, port, family, type, proto, flags) 751 addrlist = [] --> 752 for res in _socket.getaddrinfo(host, port, family, type, proto, flags): 753 af, socktype, proto, canonname, sa = res gaierror: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: KeyboardInterrupt Traceback (most recent call last) /tmp/ipykernel_33/3594208039.py in <module> ----> 1 load_dataset("xnli", "en") /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, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs) 1673 revision=revision, 1674 use_auth_token=use_auth_token, -> 1675 **config_kwargs, 1676 ) 1677 /opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs) 1494 download_mode=download_mode, 1495 data_dir=data_dir, -> 1496 data_files=data_files, 1497 ) 1498 /opt/conda/lib/python3.7/site-packages/datasets/load.py in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1182 download_config=download_config, 1183 download_mode=download_mode, -> 1184 dynamic_modules_path=dynamic_modules_path, 1185 ).get_module() 1186 elif path.count("/") == 1: # community dataset on the Hub /opt/conda/lib/python3.7/site-packages/datasets/load.py in __init__(self, name, revision, download_config, download_mode, dynamic_modules_path) 506 self.dynamic_modules_path = dynamic_modules_path 507 assert self.name.count("/") == 0 --> 508 increase_load_count(name, resource_type="dataset") 509 510 def download_loading_script(self, revision: Optional[str]) -> str: /opt/conda/lib/python3.7/site-packages/datasets/load.py in increase_load_count(name, resource_type) 166 if not config.HF_DATASETS_OFFLINE and config.HF_UPDATE_DOWNLOAD_COUNTS: 167 try: --> 168 head_hf_s3(name, filename=name + ".py", dataset=(resource_type == "dataset")) 169 except Exception: 170 pass /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in head_hf_s3(identifier, filename, use_cdn, dataset, max_retries) 93 return http_head( 94 hf_bucket_url(identifier=identifier, filename=filename, use_cdn=use_cdn, dataset=dataset), ---> 95 max_retries=max_retries, 96 ) 97 /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in http_head(url, proxies, headers, cookies, allow_redirects, timeout, max_retries) 445 allow_redirects=allow_redirects, 446 timeout=timeout, --> 447 max_retries=max_retries, 448 ) 449 return response /opt/conda/lib/python3.7/site-packages/datasets/utils/file_utils.py in _request_with_retry(method, url, max_retries, base_wait_time, max_wait_time, timeout, **params) 366 tries += 1 367 try: --> 368 response = requests.request(method=method.upper(), url=url, timeout=timeout, **params) 369 success = True 370 except (requests.exceptions.ConnectTimeout, requests.exceptions.ConnectionError) as err: /opt/conda/lib/python3.7/site-packages/requests/api.py in request(method, url, **kwargs) 59 # cases, and look like a memory leak in others. 60 with sessions.Session() as session: ---> 61 return session.request(method=method, url=url, **kwargs) 62 63 /opt/conda/lib/python3.7/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json) 527 } 528 send_kwargs.update(settings) --> 529 resp = self.send(prep, **send_kwargs) 530 531 return resp /opt/conda/lib/python3.7/site-packages/requests/sessions.py in send(self, request, **kwargs) 643 644 # Send the request --> 645 r = adapter.send(request, **kwargs) 646 647 # Total elapsed time of the request (approximately) /opt/conda/lib/python3.7/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 448 decode_content=False, 449 retries=self.max_retries, --> 450 timeout=timeout 451 ) 452 /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 708 body=body, 709 headers=headers, --> 710 chunked=chunked, 711 ) 712 /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 384 # Trigger any extra validation we need to do. 385 try: --> 386 self._validate_conn(conn) 387 except (SocketTimeout, BaseSSLError) as e: 388 # Py2 raises this as a BaseSSLError, Py3 raises it as socket timeout. /opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py in _validate_conn(self, conn) 1038 # Force connect early to allow us to validate the connection. 1039 if not getattr(conn, "sock", None): # AppEngine might not have `.sock` -> 1040 conn.connect() 1041 1042 if not conn.is_verified: /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in connect(self) 356 def connect(self): 357 # Add certificate verification --> 358 self.sock = conn = self._new_conn() 359 hostname = self.host 360 tls_in_tls = False /opt/conda/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 173 try: 174 conn = connection.create_connection( --> 175 (self._dns_host, self.port), self.timeout, **extra_kw 176 ) 177 KeyboardInterrupt: ``` Hi @Muennighoff! You can set the env variable `HF_DATASETS_OFFLINE` to `1` to avoid this behavior in offline mode. More info is available [here](https://huggingface.co/docs/datasets/master/en/loading#offline).
[ -1.134673833847046, -0.7720680236816406, -0.6108931303024292, 1.406455636024475, -0.046117667108774185, -1.3684138059616089, 0.1877940446138382, -0.8942205905914307, 1.5669593811035156, -0.8929093480110168, 0.4064018726348877, -1.727515459060669, 0.06133737042546272, -0.6680017113685608, -0.62983638048172, -0.6665216088294983, -0.3601488769054413, -0.7547736167907715, 1.090676188468933, 2.417607307434082, 1.2420052289962769, -1.3118599653244019, 2.8078951835632324, 0.6264305114746094, -0.21745489537715912, -0.8706058859825134, 0.4028034806251526, -0.05400010570883751, -1.4137191772460938, -0.3916208744049072, -1.0060292482376099, -0.13254646956920624, -0.7276644706726074, -0.5065678954124451, 0.08740027248859406, 0.4761256277561188, -0.21149078011512756, -0.3388866186141968, -0.41671088337898254, -0.8013585209846497, 0.6508010625839233, -0.3056899905204773, 0.9196504950523376, -0.2811785638332367, 1.7559841871261597, -0.6090209484100342, 0.5110931992530823, 0.5784671902656555, 1.2022523880004883, 0.18590585887432098, -0.02732747234404087, 0.30052152276039124, 0.22570256888866425, 0.07249274849891663, 0.6299976110458374, 1.2063636779785156, 0.7011944055557251, 0.6257848739624023, 0.6764400601387024, -2.1429903507232666, 1.357056975364685, -0.9159385561943054, 0.2770964205265045, 1.374285340309143, -1.0394551753997803, 0.43406879901885986, -1.8558927774429321, -0.20802001655101776, 0.35988470911979675, -2.2256574630737305, 0.13863681256771088, -1.2349070310592651, -0.5503186583518982, 0.9470050930976868, 0.3889802396297455, -1.3117049932479858, -0.024439308792352676, -0.40461859107017517, 0.8989964127540588, 0.35960009694099426, 1.070981740951538, -1.7037951946258545, 0.08965307474136353, -0.2731872797012329, 0.37144792079925537, -1.1315513849258423, -1.5842740535736084, 0.6335495114326477, 0.7266390919685364, 0.5941415429115295, -0.2120562493801117, 0.9117780923843384, -1.1837868690490723, 0.8173136711120605, -0.9936770796775818, -1.727128505706787, -1.3844045400619507, -2.4528791904449463, -2.469066619873047, 0.804233729839325, -0.4109434187412262, -0.42248597741127014, 2.1018927097320557, -1.1674680709838867, -1.6444252729415894, 1.0208690166473389, 0.2508649230003357, -0.07822833955287933, 2.422832727432251, 0.17390675842761993, -0.8790171146392822, 0.6739140152931213, -0.8817844390869141, 0.6785921454429626, -0.33384403586387634, 1.2904689311981201, 0.3654463589191437, -1.09882652759552, 1.7067315578460693, -0.4348228871822357, 0.4457452893257141, -0.6911173462867737, -0.37650176882743835, -0.5781430602073669, 0.19822147488594055, 1.9526684284210205, -0.0711808055639267, 1.5438774824142456, -0.1476650983095169, -1.4638947248458862, -1.3167929649353027, 0.7477601170539856, 0.4052749574184418, -0.8498703837394714, 0.16693107783794403, -0.44850680232048035, 0.223016619682312, 0.19444172084331512, 1.1301171779632568, 1.3537540435791016, 0.8371363282203674, -0.20789745450019836, -0.9126368165016174, 0.13023360073566437, -0.11986897885799408, -0.646142840385437, -1.6984823942184448, -0.3455020487308502, 0.05608915910124779, 0.6882095336914062, -1.188204288482666, 2.039762496948242, 0.9430649280548096, 2.024566888809204, 0.9942874908447266, -0.4161839485168457, 1.5426490306854248, 0.08314208686351776, 1.8971619606018066, -0.3272404372692108, 0.7496440410614014, -0.5297115445137024, -1.1552051305770874, 0.7399166226387024, -0.3271046578884125, -1.9672044515609741, -0.4040895104408264, -0.8662149310112, -0.12772618234157562, -0.9278696179389954, 1.0958157777786255, -0.15776178240776062, -1.3716591596603394, 0.21685388684272766, -0.6365370750427246, 0.1186414361000061, -1.3973511457443237, 0.31867924332618713, 0.7129823565483093, -0.7458760738372803, 0.07930561900138855, -0.4901672899723053, -1.4507297277450562, -0.5801146626472473, 0.3337222933769226, 1.7225655317306519, -0.6118158102035522, 0.9686269760131836, 1.024905800819397, -0.6082738041877747, -0.14024126529693604, 0.5542981624603271, -0.35819724202156067, 0.8062037229537964, -1.013269066810608, -0.4451310932636261, 1.1555664539337158, -0.29294565320014954, -0.46927517652511597, 1.298743486404419, 0.7632737755775452, -1.0356545448303223, -0.2754972577095032, -0.11840356886386871, -0.8347360491752625, 0.12944096326828003, -1.5606510639190674, -0.06246061623096466, 0.4294765591621399, -1.4395555257797241, -0.40604525804519653, 0.010631082579493523, 1.281583547592163, 0.025842301547527313, 1.3933486938476562, -0.24749204516410828, -0.13076907396316528, -0.516068696975708, -0.5214877128601074, 0.14328965544700623, -0.0015906821936368942, -0.6139550805091858, 0.3624895215034485, -0.7450006604194641, 0.2143726497888565, 1.5364789962768555, 0.15015684068202972, 0.1288202404975891, 0.5080187320709229, 1.1196022033691406, 0.31466618180274963, -0.11175882816314697, -0.9047318696975708, -1.5990222692489624, 2.0386829376220703, -1.6292965412139893, 1.9169228076934814, 0.7989873290061951, -0.042457304894924164, -1.8385146856307983, -1.7529526948928833, 1.4564164876937866, 1.143211007118225, 2.4667327404022217, 0.5598489046096802, 0.39350301027297974, -0.8282663226127625, -0.655846118927002, 0.4871278703212738, -0.8572996854782104, -0.8868730664253235, 0.2164553701877594, 2.3753745555877686, 1.7234416007995605, -0.39694270491600037, -0.142797589302063, -0.9559719562530518, 1.310463309288025, -0.3199860453605652, 0.26262518763542175, 1.9235472679138184, -0.4680007994174957, -1.0929747819900513, 1.3269044160842896, -2.3884975910186768, 0.3662168085575104, 1.9889159202575684, 0.3661963939666748, 0.06540274620056152, -1.237889289855957, -0.7292175889015198, -0.12093797326087952, -0.4455024302005768, -1.294389247894287, 0.4524938762187958, -0.20138958096504211, -0.8838379383087158, -1.3831779956817627, 0.03784856200218201, -1.1337252855300903, -1.7072685956954956, 0.3255397081375122, 1.7163680791854858, 2.205709457397461, -0.7758100628852844, 1.2950472831726074, -0.3011731505393982, 0.25767388939857483, 1.1228562593460083, 1.2187193632125854, 3.1522934436798096, 1.9694936275482178, -1.2587248086929321, 0.7318320870399475, -0.21949167549610138, -0.5241554379463196, 1.1886845827102661, -1.0659446716308594, 1.1585019826889038, -0.27716657519340515, -1.3154606819152832, -1.1862766742706299, 0.9338312745094299, 0.3820326626300812, -0.04940410330891609, -0.38309505581855774, 1.098175048828125, 0.2881515324115753, 1.2867002487182617, 0.6486227512359619, -0.27877387404441833, 0.5118309855461121, -0.43872061371803284, -0.4980912506580353, 1.6182472705841064, 0.1370740383863449, -1.519457459449768, -2.2887041568756104, -0.1490584760904312, -1.0838944911956787, 0.052394572645425797, -0.8648986220359802, -0.9343138933181763, 1.54398775100708, 0.4350053668022156, -0.9677265286445618, -0.06030912697315216, -0.40052711963653564, -0.552230179309845, 2.6973729133605957, -1.3426599502563477, -0.29535552859306335, -0.942493200302124, -0.7056857347488403, 1.4948481321334839, -1.2517049312591553, -0.2436736673116684, -0.9900481104850769, -0.5277680158615112, -1.223707914352417, -0.40006452798843384, -0.045432861894369125, -0.7870623469352722, 0.6438795328140259, 0.02359805256128311, -1.2715270519256592, -0.37222370505332947, -1.0738896131515503, 0.7850942015647888, -0.20145370066165924, 0.05620148405432701, 1.6140497922897339, 0.21649838984012604, -0.3807143270969391, 0.8118951320648193, 1.231421947479248, 0.5992119312286377, -0.5475369691848755, 0.19761031866073608, -0.6370906829833984, 0.464702308177948, -1.1597574949264526, 0.3642369508743286, -2.9461965560913086, 0.673585057258606, -0.0636024996638298, -0.10052657127380371, -0.17234455049037933, -1.529934048652649, 0.9605899453163147, 2.4021079540252686, -1.102465033531189, 0.6356310844421387, 0.3017008900642395, 1.1915233135223389, -1.6274659633636475, 0.06896618008613586, -0.6888858079910278, 2.102416515350342, 0.10417425632476807, 1.0770219564437866, -0.5743394494056702, -2.3854777812957764, 0.5501946210861206, -1.2100403308868408, -0.9388965964317322, 0.7801005840301514, -0.8846368789672852, 0.1699369102716446, -1.0919692516326904, -0.1181865781545639, -0.8896802663803101, -1.1713825464248657, 0.5164446830749512, 0.0957990437746048, 0.6780959367752075, -0.6295151114463806, 0.24602487683296204, -2.25407075881958, -1.3626545667648315, -0.1414513885974884, -0.9355493783950806, 0.4837088882923126, -0.42301520705223083, 0.7104606032371521, -0.12195725739002228, -0.006905942223966122, 0.3058418929576874, 1.5161734819412231, 3.2588043212890625, -0.07125714421272278, 0.38377952575683594, -0.28224605321884155, -1.1244031190872192, 1.4945719242095947, 0.8837217688560486, -0.14752858877182007, -0.6156762838363647, -0.9592902660369873, 1.363300085067749, 1.9253603219985962, 1.0332367420196533, 0.10469095408916473, -0.9315792322158813, -0.713271975517273, 0.12076568603515625, 0.1877281218767166, 0.40139660239219666, 1.0176829099655151, 0.12325607240200043, 0.12966352701187134, 1.3966225385665894, 1.0302608013153076, -0.28907349705696106, 0.4343512952327728, -0.8796455264091492, -0.2989605665206909, 0.577343225479126, 0.3678029477596283, 0.0013247095048427582, 0.23806039988994598, -1.0106085538864136, -0.2246447652578354, -0.21448050439357758, -0.8676037192344666, -0.8272402882575989, -0.3944867253303528, -0.42956680059432983, 1.7955009937286377, -0.11565341055393219, -0.560137152671814, 0.05723914876580238, -0.788776695728302, -0.04681653156876564, -1.077985167503357, 0.21270114183425903, -0.06570804864168167, 0.006229382008314133, -0.17623798549175262, 1.74176824092865, -0.9212462306022644, -2.214897632598877, 0.152136892080307, 0.2456687092781067, -0.2532241940498352, -0.052651748061180115, 1.7481979131698608, 0.4953939914703369, 1.3935669660568237, 1.5745813846588135, 1.1499162912368774, -0.5771210789680481, -1.388604760169983, 0.781987726688385, 0.9516232013702393, -1.3797065019607544, 0.9249000549316406, -0.1841134876012802, -0.5637074708938599, 0.5362054109573364, 1.1925690174102783, 0.4213484823703766, -1.993851900100708, 0.8280630111694336, -1.135657787322998, 0.8768242001533508, 0.8097249865531921, 0.8335734605789185, 0.1668165922164917, 0.8390157222747803, -1.2890621423721313, -1.0650287866592407, -0.5102620720863342, -0.6669780015945435, 1.8359702825546265, -0.23807315528392792, 0.43188661336898804, -0.3040655553340912, -1.2950387001037598, 0.13356417417526245, 0.7160056829452515, 0.2650749385356903, -0.3969535827636719, 0.7558459639549255, -0.7252107262611389, -1.1271231174468994, -1.3482329845428467, -0.4681209623813629, -1.1165615320205688, -0.8760100603103638, 1.0754814147949219, 0.7189726233482361, 0.5521379113197327, 2.009308338165283, 0.7205957770347595, 0.25988027453422546, -2.575284719467163, 0.7893834710121155, 0.35925862193107605, -0.07294335961341858, 0.8291662335395813, 0.36037689447402954, 1.2217837572097778, -0.13357022404670715, 0.5750759243965149, -2.401653528213501, 2.2872300148010254, -0.28141114115715027, 0.7473286986351013, 0.1319682002067566, -0.04191245138645172, 0.9732484817504883, 0.631686270236969, 0.5234874486923218, -1.1104069948196411, 0.8242641091346741, -0.6407008767127991, 1.167335867881775, 0.8431435227394104, -0.8623201251029968, 0.17546537518501282, 1.1652449369430542, 0.315032958984375, -0.5205708146095276, -1.027076005935669, -0.8882582187652588, 0.8801206350326538, 1.7153277397155762, -0.04006575793027878, 0.052390556782484055, 0.7616979479789734, 0.7731211185455322, -1.2333111763000488, -0.023013845086097717, -0.6021442413330078, -0.7276259660720825, 1.8036186695098877, 2.046790361404419, -0.05595552176237106, -0.05482061207294464, -0.7357048392295837, -1.4386323690414429, 0.8572119474411011, 0.10246571898460388, -0.07859165966510773, 0.7326139807701111, -0.6623414754867554, 1.1642875671386719, 0.8115394711494446, 0.8919784426689148, 0.3351525366306305, 0.03788159415125847, 0.24523776769638062, -0.3602047860622406, -1.1990067958831787, -0.32142508029937744, -0.9947327375411987, -2.783888816833496, 0.39754337072372437, -0.29973161220550537, -1.5100338459014893, 0.16137224435806274, -0.9454512596130371, 0.6809780597686768, -0.4780194163322449, -1.1985729932785034, -1.2971192598342896, 0.328203409910202, -0.14798957109451294, 0.8350459933280945, -1.6804829835891724, -0.12993629276752472, 1.108137607574463, 0.9661808609962463, -0.6523602604866028, 0.8897499442100525, 0.3171631395816803, 0.9898694753646851, 0.9137023687362671, -0.3673804700374603, 0.5068837404251099, 0.23380954563617706, -1.365089774131775, 0.33138707280158997, 1.388721227645874, 0.19899068772792816, 1.3075189590454102, -0.42146480083465576, 0.07607132196426392, 0.377408891916275, -0.37433403730392456, -0.538587212562561, -0.6609638333320618, 0.688353955745697, -0.1253754198551178, -0.9622514843940735, -0.19799625873565674, 0.02904406562447548, -0.11087499558925629, 0.26271548867225647, -1.4659992456436157, -0.14502540230751038, -0.5047415494918823, -0.5622474551200867, -1.4608780145645142, -0.13442260026931763, 1.3277008533477783, -0.7504373788833618, -0.04014591872692108, 0.5733280777931213, 0.2020597755908966, 0.5579245686531067, 0.599009096622467, -0.724776029586792, -0.3082561492919922, -0.10420799255371094, -0.4463329315185547, 0.322764128446579, 1.3257204294204712, -0.05499331280589104, -0.9290491938591003, 0.5458580255508423, -0.1816750317811966, 0.2590652406215668, 1.8956903219223022, 0.09284797310829163, -0.9070630669593811, 0.33437421917915344, -0.7195953726768494, 1.8398598432540894, 1.6581077575683594, 1.1799312829971313, -0.044503871351480484, -0.8595359325408936, 0.6313842535018921, -0.3730437457561493, -0.3831016719341278, 0.8253694772720337, 0.29553982615470886, -0.27267664670944214, -1.3855831623077393, 0.749473512172699, 1.338692307472229, -0.624421238899231, -0.8398402333259583, 0.09070560336112976, -0.8019678592681885, 1.2403849363327026, 0.6242402791976929, 0.34974193572998047, 0.3290591239929199, 1.6542760133743286, 0.7784177660942078, -0.5300633311271667, 0.5823891758918762, 0.4127461016178131, -0.14991649985313416, -2.0556135177612305, -1.1695797443389893, 0.23758991062641144, -0.48499223589897156, -1.473285436630249, 1.4328296184539795, -1.2776352167129517, -1.0775784254074097, 0.5255487561225891, 0.1870707869529724, 1.2901349067687988, 0.41050395369529724, 1.6393382549285889, 1.994072437286377, 0.9311237931251526, 0.5165095925331116, 1.1463779211044312, -0.2232515811920166, -0.26941630244255066, 1.7081295251846313, -0.45174509286880493, 0.6473721861839294, 1.088777780532837, -0.39430952072143555, -1.1732991933822632, -0.860687255859375, -1.1518161296844482, -0.7652068734169006, 1.0516096353530884, 0.12530739605426788, -1.1269946098327637, 0.3530549108982086, 1.6512571573257446, 0.0024918382987380028, -0.13638193905353546, 0.6337167620658875, 0.35001659393310547, -0.5902076363563538, -0.04173842817544937, -1.0571789741516113, 0.5677148103713989, -0.42923077940940857, -0.3836853504180908, 0.22356393933296204, 0.6461501121520996, 1.2300465106964111, 0.11579480767250061, 0.11419878900051117, 1.232703447341919, -1.4534881114959717, 1.2373442649841309, -0.9169506430625916, 0.34958699345588684, -2.2485604286193848, 1.4077112674713135, -0.882666289806366, 1.9540514945983887, -2.722236394882202, 0.40085405111312866, -0.37361806631088257, -0.6878340244293213, 0.2152683287858963, -0.16852501034736633, 0.11792293190956116, -0.07670964300632477, -1.0075063705444336, -0.04255468025803566, -0.8780719637870789, 0.43071448802948, 1.1565195322036743, 1.4041719436645508, -0.9461771249771118, -0.31473952531814575, -1.6330286264419556, -0.09040063619613647, -0.43324989080429077, 0.10299122333526611, -1.8271546363830566, -0.19147224724292755, -2.0813918113708496, -2.3522064685821533, -1.3678998947143555, -1.0705945491790771, 1.38714599609375, 0.10597233474254608, -0.8674067258834839, 1.088313341140747, -0.39195573329925537, -1.8171721696853638, 1.1680859327316284, -2.224883794784546 ]
https://github.com/huggingface/datasets/issues/4566
Document link #load_dataset_enhancing_performance points to nowhere
Hi! This is indeed the link the docstring should point to. Are you interested in submitting a PR to fix this?
## Describe the bug A clear and concise description of what the bug is. ![image](https://user-images.githubusercontent.com/11674033/175752806-5b066b92-9d28-4771-9112-5c8606f07741.png) The [load_dataset_enhancing_performance](https://huggingface.co/docs/datasets/v2.3.2/en/package_reference/main_classes#load_dataset_enhancing_performance) link [here](https://huggingface.co/docs/datasets/v2.3.2/en/package_reference/main_classes#datasets.Dataset.load_from_disk.keep_in_memory) points to nowhere, I guess it should point to https://huggingface.co/docs/datasets/v2.3.2/en/cache#improve-performance?
686
21
Document link #load_dataset_enhancing_performance points to nowhere ## Describe the bug A clear and concise description of what the bug is. ![image](https://user-images.githubusercontent.com/11674033/175752806-5b066b92-9d28-4771-9112-5c8606f07741.png) The [load_dataset_enhancing_performance](https://huggingface.co/docs/datasets/v2.3.2/en/package_reference/main_classes#load_dataset_enhancing_performance) link [here](https://huggingface.co/docs/datasets/v2.3.2/en/package_reference/main_classes#datasets.Dataset.load_from_disk.keep_in_memory) points to nowhere, I guess it should point to https://huggingface.co/docs/datasets/v2.3.2/en/cache#improve-performance? Hi! This is indeed the link the docstring should point to. Are you interested in submitting a PR to fix this?
[ -1.2520647048950195, -0.8310880064964294, -0.7842016220092773, 1.4322017431259155, 0.006297583691775799, -1.284946322441101, 0.033839739859104156, -0.9903494119644165, 1.6102118492126465, -0.717989981174469, 0.25790536403656006, -1.6791329383850098, -0.09818828105926514, -0.5468782782554626, -0.6642351746559143, -0.9380481839179993, -0.3484284281730652, -0.8081363439559937, 0.9458534121513367, 2.527817726135254, 1.2522236108779907, -1.3596904277801514, 2.8000292778015137, 0.7285457253456116, -0.28618234395980835, -1.0665006637573242, 0.443920761346817, 0.03292863443493843, -1.2650953531265259, -0.47971099615097046, -0.9086646437644958, 0.000454803928732872, -0.47445791959762573, -0.4983213543891907, 0.06752936542034149, 0.3816754221916199, -0.25886520743370056, -0.26706159114837646, -0.6121630668640137, -0.756827175617218, 0.4704170227050781, -0.2901253402233124, 0.9079186916351318, -0.3511013388633728, 1.7954281568527222, -0.5516847968101501, 0.42213013768196106, 0.6480906009674072, 1.2197515964508057, 0.08834626525640488, 0.023538272827863693, 0.2695021331310272, 0.36170437932014465, 0.03559895604848862, 0.5310273170471191, 1.2041490077972412, 0.6166198253631592, 0.5009716749191284, 0.6188899278640747, -2.175778388977051, 1.3906617164611816, -0.9176892042160034, 0.1942024677991867, 1.5060259103775024, -0.9739102721214294, 0.3451094925403595, -1.7390393018722534, -0.06814184784889221, 0.6717507839202881, -2.4005441665649414, 0.15670360624790192, -1.392778992652893, -0.5927212238311768, 0.9322218894958496, 0.319391131401062, -1.1879785060882568, 0.17647868394851685, -0.5506433248519897, 1.0783262252807617, 0.5509518384933472, 1.1183505058288574, -1.6449295282363892, -0.07518622279167175, -0.11727692186832428, 0.03629307448863983, -1.345241904258728, -1.5712685585021973, 0.5892651677131653, 0.616112232208252, 0.7187684774398804, -0.015600579790771008, 0.9220085144042969, -0.9361046552658081, 0.8226391673088074, -0.8999427556991577, -1.648683786392212, -1.381801724433899, -2.414344310760498, -2.318408250808716, 0.8243769407272339, -0.4266867935657501, -0.48685580492019653, 2.0275282859802246, -1.1299279928207397, -1.7495534420013428, 0.9836571216583252, 0.2670343518257141, 0.13028685748577118, 2.4702117443084717, 0.2652290463447571, -0.7909930348396301, 0.45042258501052856, -0.6614736914634705, 0.8142038583755493, -0.350125789642334, 1.303617238998413, 0.5895147919654846, -1.0186667442321777, 1.5656204223632812, -0.4568575322628021, 0.5031811594963074, -0.7273970246315002, -0.5257129669189453, -0.8599539995193481, 0.2044495940208435, 1.8816698789596558, -0.35150381922721863, 1.6313941478729248, -0.2864771783351898, -1.4785711765289307, -1.5293617248535156, 0.7548673152923584, 0.43312862515449524, -0.89903324842453, 0.08932483941316605, -0.48646262288093567, 0.13239707052707672, -0.009095005691051483, 1.1556158065795898, 1.235102891921997, 0.6015875935554504, -0.2926613688468933, -0.8444265127182007, 0.206372931599617, -0.097225122153759, -0.6768622994422913, -1.8607568740844727, -0.26881322264671326, 0.26853233575820923, 0.6338786482810974, -1.2527858018875122, 1.703223705291748, 0.8047710657119751, 1.9711750745773315, 0.9510573744773865, -0.33848944306373596, 1.5049898624420166, -0.03984815999865532, 1.8975218534469604, -0.5319716930389404, 0.6668596267700195, -0.27663734555244446, -1.0500746965408325, 0.7577155232429504, -0.3322206735610962, -1.990681767463684, -0.7439549565315247, -0.8014145493507385, -0.11024227738380432, -0.677531898021698, 0.940227210521698, -0.27598580718040466, -1.3478375673294067, 0.1312667727470398, -0.7028318047523499, 0.17003919184207916, -1.2889511585235596, 0.1829546093940735, 0.8236624002456665, -0.5788542628288269, -0.11251755803823471, -0.22240807116031647, -1.3365414142608643, -0.4616299569606781, 0.31265586614608765, 1.8935818672180176, -0.6020392775535583, 0.9910642504692078, 0.9762911200523376, -0.6150996088981628, 0.11288579553365707, 0.31004947423934937, -0.230829119682312, 0.8785699009895325, -1.0943894386291504, -0.2767679691314697, 1.1875945329666138, -0.25122174620628357, -0.7310061454772949, 1.5342907905578613, 0.8309535980224609, -1.0327502489089966, -0.2700326442718506, -0.18073725700378418, -0.8254193663597107, -0.03048205003142357, -1.5633294582366943, -0.20498640835285187, 0.30355939269065857, -1.508500099182129, -0.34465715289115906, -0.11769845336675644, 1.446791410446167, -0.20251992344856262, 1.502102017402649, -0.35966548323631287, -0.189828023314476, -0.34995245933532715, -0.5264297127723694, 0.07615122199058533, -0.17949296534061432, -0.5844138860702515, 0.19849354028701782, -0.8775789737701416, 0.2649087607860565, 1.4130970239639282, 0.37709349393844604, 0.15293467044830322, 0.4827711284160614, 1.073786973953247, 0.3126711845397949, -0.1403629034757614, -0.8773305416107178, -1.6742000579833984, 2.083585500717163, -1.3521569967269897, 1.981549859046936, 0.845935583114624, -0.11702464520931244, -1.696513295173645, -1.8187973499298096, 1.3448904752731323, 1.1182266473770142, 2.3417956829071045, 0.4808424413204193, 0.4422924518585205, -0.79927659034729, -0.752383291721344, 0.321551650762558, -0.9411669969558716, -0.7006893754005432, 0.08998331427574158, 2.341883897781372, 1.8249688148498535, -0.514055073261261, -0.281937837600708, -0.983396589756012, 1.2787375450134277, -0.26451364159584045, 0.1584395319223404, 2.0218312740325928, -0.26863279938697815, -0.9470106363296509, 1.3346198797225952, -2.3327102661132812, 0.22665898501873016, 2.139324188232422, 0.3080904483795166, 0.0778002142906189, -1.4818121194839478, -0.6558074951171875, -0.39226827025413513, -0.39561623334884644, -1.230260968208313, 0.5303493142127991, -0.40694209933280945, -1.017926812171936, -1.4506276845932007, 0.02751268818974495, -1.113974928855896, -1.7796356678009033, 0.42046764492988586, 1.8521462678909302, 2.019512891769409, -0.7357316613197327, 1.40679132938385, -0.1800350844860077, 0.11317132413387299, 1.3213608264923096, 1.3456687927246094, 3.1354281902313232, 1.8874200582504272, -1.2831567525863647, 0.7814804315567017, -0.17085915803909302, -0.43595004081726074, 1.1472073793411255, -1.1392300128936768, 1.1860233545303345, -0.17961880564689636, -1.4231008291244507, -1.369930386543274, 1.122133731842041, 0.5509446263313293, 0.00875298585742712, -0.6199412941932678, 1.386849045753479, -0.011053034104406834, 1.2959198951721191, 0.5339710712432861, -0.4711681306362152, 0.5138972997665405, -0.41447052359580994, -0.6177979707717896, 1.5966850519180298, 0.14021040499210358, -1.6110599040985107, -2.240189790725708, -0.29648005962371826, -0.8278464078903198, -0.11968957632780075, -0.6440274715423584, -1.0355210304260254, 1.7315903902053833, 0.46948233246803284, -1.2670423984527588, -0.36449554562568665, -0.3530603349208832, -0.561491847038269, 2.6731975078582764, -1.3288285732269287, -0.10307907313108444, -1.082689881324768, -0.4720609188079834, 1.692572832107544, -1.2281827926635742, -0.1624588519334793, -0.9335648417472839, -0.7881653308868408, -1.2944415807724, -0.442731648683548, -0.09396982938051224, -0.9146615266799927, 0.6185995936393738, -0.0063618253916502, -1.0484386682510376, -0.21672388911247253, -0.8292980790138245, 1.0045051574707031, -0.14862902462482452, 0.1493733525276184, 1.8478355407714844, 0.35358139872550964, -0.47642621397972107, 0.6209407448768616, 1.2152177095413208, 0.6013168692588806, -0.7822790741920471, 0.06036565825343132, -0.6889411211013794, 0.3469317853450775, -1.3928226232528687, 0.2830733358860016, -2.9808602333068848, 0.6443527936935425, -0.14962086081504822, -0.1497294157743454, -0.037600208073854446, -1.1972119808197021, 1.1107271909713745, 2.562045097351074, -1.2332535982131958, 0.5080502033233643, 0.3789072036743164, 1.096434473991394, -1.6535195112228394, 0.3892984390258789, -0.4459894597530365, 2.030149221420288, 0.21929767727851868, 1.2168853282928467, -0.4422987997531891, -2.1391751766204834, 0.6217610836029053, -1.1499048471450806, -0.9330492615699768, 0.8248348832130432, -0.889316737651825, 0.22682222723960876, -1.3876250982284546, -0.06569879502058029, -0.9298518896102905, -1.2813611030578613, 0.7199589610099792, 0.12125467509031296, 0.40609121322631836, -0.502648115158081, 0.300422340631485, -2.164067506790161, -1.3136872053146362, -0.1616859883069992, -1.0073003768920898, 0.5855573415756226, -0.3337539732456207, 0.6073508262634277, -0.08066218346357346, 0.1412627398967743, 0.3254234492778778, 1.361559510231018, 3.3500211238861084, 0.18312887847423553, 0.26145485043525696, -0.11514393985271454, -0.977387011051178, 1.4984955787658691, 0.9972930550575256, -0.09631132334470749, -0.5606170296669006, -0.9003515243530273, 1.3860533237457275, 2.0472259521484375, 1.053760290145874, 0.1272524744272232, -0.9555901288986206, -0.8432695865631104, 0.07474160194396973, 0.20631693303585052, 0.49316704273223877, 0.9694592356681824, -0.02790975570678711, 0.14434193074703217, 1.439761757850647, 1.2581106424331665, -0.2949708104133606, 0.40695542097091675, -0.9704698920249939, -0.3566274642944336, 0.37913328409194946, 0.33786168694496155, 0.05959538742899895, 0.5194749236106873, -1.0397605895996094, -0.1966436505317688, -0.3234196901321411, -0.8329894542694092, -0.7578886151313782, -0.4751049280166626, -0.4160826802253723, 1.5687861442565918, 0.12557466328144073, -0.428357869386673, 0.04091475531458855, -0.7838976383209229, -0.2534562051296234, -1.0882797241210938, 0.33273792266845703, -0.054765984416007996, -0.00518077565357089, -0.09065593034029007, 1.6636316776275635, -0.9285716414451599, -2.226224899291992, 0.20937921106815338, 0.213481605052948, -0.4463031589984894, 0.14137482643127441, 1.6744579076766968, 0.5400207042694092, 1.4029309749603271, 1.2807724475860596, 0.9718179106712341, -0.6884276866912842, -1.2597423791885376, 0.7399417757987976, 0.9441158771514893, -1.444065809249878, 0.945146381855011, -0.263963520526886, -0.48546430468559265, 0.7222484946250916, 1.307692050933838, 0.38074594736099243, -1.9330370426177979, 0.8889011740684509, -0.9252984523773193, 0.8345006704330444, 0.6298179030418396, 0.7258830666542053, 0.24682943522930145, 0.9432910084724426, -1.3121401071548462, -1.1667664051055908, -0.7598603367805481, -0.592460036277771, 1.794514536857605, -0.25954699516296387, 0.6288478374481201, -0.2187623679637909, -1.184641718864441, -0.053525980561971664, 0.8030726909637451, 0.33710330724716187, -0.3290940523147583, 0.944055438041687, -0.6423103213310242, -1.0813415050506592, -1.2760999202728271, -0.4564098119735718, -0.9398140907287598, -0.8635830283164978, 1.016177773475647, 0.7539585828781128, 0.4505572021007538, 1.9274474382400513, 0.5153671503067017, 0.34877896308898926, -2.685178756713867, 0.8821662664413452, 0.22076153755187988, -0.009879270568490028, 0.9941267371177673, 0.2629166543483734, 1.1436491012573242, -0.004904414992779493, 0.48416760563850403, -2.2930803298950195, 2.210353136062622, -0.22153636813163757, 0.6454479098320007, -0.013593465089797974, -0.16282722353935242, 1.063173532485962, 0.5716404318809509, 0.6018521785736084, -1.1764147281646729, 0.8347806930541992, -0.558611273765564, 1.0780823230743408, 0.8700427412986755, -0.8118466734886169, 0.002375524491071701, 1.4129676818847656, 0.4981951117515564, -0.4517033100128174, -0.934721827507019, -0.8996446132659912, 0.795745849609375, 1.6386321783065796, -0.0017391755245625973, -0.01813455857336521, 0.898230791091919, 0.6537100076675415, -1.1967296600341797, 0.0773141086101532, -0.6778473854064941, -0.6108148694038391, 1.719661831855774, 2.113374948501587, -0.07238637655973434, -0.13120828568935394, -0.6956470012664795, -1.1976284980773926, 0.6131659150123596, -0.08565005660057068, 0.06215232238173485, 0.7255768775939941, -0.71144038438797, 1.1186538934707642, 0.606624960899353, 0.9508146047592163, -0.013584011234343052, 0.36925190687179565, 0.41915372014045715, -0.3782525360584259, -1.249206781387329, -0.41573548316955566, -1.0911071300506592, -2.489091157913208, 0.4371640980243683, -0.28432968258857727, -1.4892921447753906, 0.14390438795089722, -1.1072477102279663, 0.7931547164916992, -0.6296457052230835, -1.0644463300704956, -1.3774645328521729, 0.2657812833786011, -0.2270757555961609, 0.9759325385093689, -1.563346028327942, -0.1592463254928589, 1.2868863344192505, 0.8265337944030762, -0.5339704155921936, 1.0886352062225342, 0.23590289056301117, 1.006321668624878, 0.7522822618484497, -0.36645975708961487, 0.5422120690345764, 0.23379763960838318, -1.3859225511550903, 0.4821043610572815, 1.124363660812378, 0.2451087087392807, 1.4019415378570557, -0.5122448801994324, 0.12422541528940201, 0.5132272839546204, -0.5664839744567871, -0.4468388259410858, -0.4949834644794464, 0.754700243473053, 0.09556058794260025, -0.9679696559906006, -0.023611295968294144, -0.21341904997825623, -0.2245744913816452, 0.14602333307266235, -1.5085070133209229, -0.2637440860271454, -0.38977983593940735, -0.4924525022506714, -1.3448251485824585, 0.07256530225276947, 1.3136837482452393, -0.895579993724823, -0.12955835461616516, 0.45777156949043274, 0.43409186601638794, 0.566891610622406, 0.6268947720527649, -0.6696797609329224, -0.22519610822200775, -0.37442925572395325, -0.21377943456172943, 0.27576425671577454, 1.1649750471115112, -0.09961404651403427, -1.0139254331588745, 0.7234882116317749, -0.4579709768295288, 0.11022663861513138, 2.028024911880493, 0.032409168779850006, -0.6849116086959839, 0.3654177486896515, -0.6864402890205383, 1.8463797569274902, 1.6433714628219604, 1.387191653251648, -0.18349149823188782, -0.8517557978630066, 0.45647650957107544, -0.22578760981559753, -0.2984899878501892, 0.9064486026763916, 0.4388090968132019, -0.26693153381347656, -1.3682162761688232, 0.516353964805603, 1.245877981185913, -0.9446061253547668, -0.7147533297538757, 0.1526479721069336, -0.8716565370559692, 1.107173204421997, 0.6477736830711365, 0.32343539595603943, 0.2687312066555023, 1.5644025802612305, 0.6590349078178406, -0.5792832374572754, 0.3882150948047638, 0.4590078890323639, -0.23803648352622986, -2.0533714294433594, -0.9133339524269104, 0.28859439492225647, -0.4111984372138977, -1.504453182220459, 1.2718350887298584, -1.1894400119781494, -1.0074859857559204, 0.45969757437705994, 0.15554705262184143, 1.362874150276184, 0.25485000014305115, 1.6713833808898926, 2.1899871826171875, 0.8972103595733643, 0.3121758699417114, 1.3307572603225708, -0.10416358709335327, -0.44396737217903137, 1.7728521823883057, -0.43872663378715515, 0.6109905242919922, 0.9656471610069275, -0.48238545656204224, -1.0715174674987793, -0.8036350011825562, -1.1236461400985718, -0.5478745698928833, 1.1196458339691162, 0.21954859793186188, -1.104201078414917, 0.12930269539356232, 1.4619004726409912, 0.19999408721923828, -0.20671048760414124, 0.6265785098075867, 0.40550974011421204, -0.6509841680526733, -0.06733298301696777, -0.9100344181060791, 0.6572460532188416, -0.11239421367645264, -0.3531758189201355, 0.24857871234416962, 0.5081477165222168, 1.14033043384552, -0.05132436752319336, 0.1576131284236908, 1.3157824277877808, -1.3372610807418823, 1.5612382888793945, -0.5170117616653442, 0.24979056417942047, -2.3918771743774414, 1.4149227142333984, -0.7393919825553894, 1.886773943901062, -2.6031394004821777, 0.3970288932323456, -0.6053789854049683, -0.5716272592544556, 0.2789064943790436, -0.36437225341796875, 0.09594123810529709, -0.18912369012832642, -1.0514250993728638, -0.017608381807804108, -0.7653586864471436, 0.5261788368225098, 1.1875483989715576, 1.4372200965881348, -1.0996781587600708, -0.2069161981344223, -1.8015222549438477, -0.17152255773544312, -0.8613885045051575, 0.32853230834007263, -1.9931249618530273, -0.10487200319766998, -2.0634243488311768, -2.455047130584717, -1.5758934020996094, -0.804538369178772, 1.0418208837509155, 0.1661851406097412, -0.9341331720352173, 1.1825288534164429, -0.3141585886478424, -1.7835408449172974, 0.9894026517868042, -2.1599843502044678 ]
https://github.com/huggingface/datasets/issues/4566
Document link #load_dataset_enhancing_performance points to nowhere
https://github.com/huggingface/datasets/blame/master/docs/source/cache.mdx#L93 There seems already an anchor here. Somehow it doesn't work. I am not very familiar with how this online documentation works.
## Describe the bug A clear and concise description of what the bug is. ![image](https://user-images.githubusercontent.com/11674033/175752806-5b066b92-9d28-4771-9112-5c8606f07741.png) The [load_dataset_enhancing_performance](https://huggingface.co/docs/datasets/v2.3.2/en/package_reference/main_classes#load_dataset_enhancing_performance) link [here](https://huggingface.co/docs/datasets/v2.3.2/en/package_reference/main_classes#datasets.Dataset.load_from_disk.keep_in_memory) points to nowhere, I guess it should point to https://huggingface.co/docs/datasets/v2.3.2/en/cache#improve-performance?
686
22
Document link #load_dataset_enhancing_performance points to nowhere ## Describe the bug A clear and concise description of what the bug is. ![image](https://user-images.githubusercontent.com/11674033/175752806-5b066b92-9d28-4771-9112-5c8606f07741.png) The [load_dataset_enhancing_performance](https://huggingface.co/docs/datasets/v2.3.2/en/package_reference/main_classes#load_dataset_enhancing_performance) link [here](https://huggingface.co/docs/datasets/v2.3.2/en/package_reference/main_classes#datasets.Dataset.load_from_disk.keep_in_memory) points to nowhere, I guess it should point to https://huggingface.co/docs/datasets/v2.3.2/en/cache#improve-performance? https://github.com/huggingface/datasets/blame/master/docs/source/cache.mdx#L93 There seems already an anchor here. Somehow it doesn't work. I am not very familiar with how this online documentation works.
[ -1.214173436164856, -0.8937612771987915, -0.7593221068382263, 1.4348704814910889, 0.009769373573362827, -1.2509828805923462, 0.026815291494131088, -0.9315252304077148, 1.6010698080062866, -0.6948490738868713, 0.2605605721473694, -1.6819491386413574, -0.13950999081134796, -0.5100206136703491, -0.6654543280601501, -0.899017333984375, -0.3159625828266144, -0.8151442408561707, 1.0016006231307983, 2.5157642364501953, 1.2509053945541382, -1.3608168363571167, 2.771841287612915, 0.7110384106636047, -0.2794118821620941, -1.0822786092758179, 0.46798834204673767, 0.02952825278043747, -1.2848442792892456, -0.4498067796230316, -0.8905476331710815, 0.043638668954372406, -0.48498764634132385, -0.47091734409332275, 0.08006998151540756, 0.39497268199920654, -0.2721290588378906, -0.2997738718986511, -0.6344943642616272, -0.7233532071113586, 0.43030330538749695, -0.2812395691871643, 0.8765507936477661, -0.305798202753067, 1.8011341094970703, -0.5503075122833252, 0.41651439666748047, 0.6149516701698303, 1.2386186122894287, 0.10931279510259628, 0.0749470442533493, 0.2440178096294403, 0.383437842130661, 0.04872964695096016, 0.5453030467033386, 1.2338788509368896, 0.6128783822059631, 0.46266719698905945, 0.5755030512809753, -2.1865651607513428, 1.362612009048462, -0.8774667382240295, 0.20015309751033783, 1.4621243476867676, -0.9576950669288635, 0.32138583064079285, -1.7535890340805054, -0.0645388811826706, 0.6524067521095276, -2.3812472820281982, 0.14975480735301971, -1.3579039573669434, -0.5473031401634216, 0.9486245512962341, 0.2813667058944702, -1.2450224161148071, 0.17364080250263214, -0.5527887940406799, 1.1036485433578491, 0.5602431893348694, 1.1660637855529785, -1.6249688863754272, -0.09894337505102158, -0.11093448102474213, 0.04066534712910652, -1.3308254480361938, -1.5988937616348267, 0.5491209626197815, 0.6415636539459229, 0.7536917924880981, -0.03251218423247337, 0.908202588558197, -0.9751695990562439, 0.8351746201515198, -0.8789772391319275, -1.6546717882156372, -1.3793004751205444, -2.4210567474365234, -2.3556480407714844, 0.836700439453125, -0.4405898153781891, -0.43768781423568726, 1.9796953201293945, -1.097522258758545, -1.7825305461883545, 1.017045021057129, 0.3250594437122345, 0.12240564823150635, 2.4490973949432373, 0.274164617061615, -0.8019271492958069, 0.42326340079307556, -0.6871739029884338, 0.7742708325386047, -0.3491564095020294, 1.3471646308898926, 0.5996990203857422, -0.988233745098114, 1.588863730430603, -0.4713258743286133, 0.5043724179267883, -0.7366220951080322, -0.4669634997844696, -0.8351227045059204, 0.20108278095722198, 1.9087551832199097, -0.3910411596298218, 1.6912108659744263, -0.30301544070243835, -1.511641025543213, -1.5434023141860962, 0.7461293935775757, 0.44234499335289, -0.8719462752342224, 0.050006765872240067, -0.5086185932159424, 0.1268433779478073, -0.01555209793150425, 1.1012213230133057, 1.21627676486969, 0.6238020062446594, -0.32470276951789856, -0.8451929688453674, 0.2504304051399231, -0.0887923538684845, -0.6189549565315247, -1.8742787837982178, -0.26648372411727905, 0.29762035608291626, 0.6165350675582886, -1.2882509231567383, 1.7303529977798462, 0.7710176110267639, 2.0296547412872314, 0.8967806696891785, -0.3665245771408081, 1.5011965036392212, -0.015063822269439697, 1.9056859016418457, -0.5171963572502136, 0.676072359085083, -0.2335456907749176, -1.0658149719238281, 0.7627204656600952, -0.36146485805511475, -1.9574472904205322, -0.7501904368400574, -0.8225427865982056, -0.08867337554693222, -0.7069811820983887, 0.9278841018676758, -0.23494449257850647, -1.422601342201233, 0.10061134397983551, -0.7256382703781128, 0.18612079322338104, -1.3105027675628662, 0.12437276542186737, 0.8556529879570007, -0.5993623733520508, -0.07123933732509613, -0.2181340903043747, -1.3414194583892822, -0.4505283832550049, 0.3525414764881134, 1.902248740196228, -0.5903823375701904, 0.9843504428863525, 0.981210470199585, -0.6418666839599609, 0.18649528920650482, 0.30997756123542786, -0.2807701528072357, 0.8534801006317139, -1.0767340660095215, -0.2788908779621124, 1.1834124326705933, -0.26543107628822327, -0.7298715114593506, 1.5007696151733398, 0.8708871006965637, -1.0173794031143188, -0.2412244826555252, -0.16337426006793976, -0.7568262219429016, -0.026125598698854446, -1.5641688108444214, -0.19006972014904022, 0.27812084555625916, -1.4726781845092773, -0.3685935437679291, -0.19015216827392578, 1.4333045482635498, -0.2380961775779724, 1.514141321182251, -0.3351694345474243, -0.16184532642364502, -0.3438487648963928, -0.523771345615387, 0.1078907921910286, -0.2080760896205902, -0.6068345904350281, 0.26672646403312683, -0.9267266392707825, 0.269309937953949, 1.4389140605926514, 0.4286072552204132, 0.13472099602222443, 0.502566397190094, 1.0825111865997314, 0.34813573956489563, -0.1347762644290924, -0.8931313157081604, -1.6904282569885254, 2.0735957622528076, -1.3215833902359009, 2.0107181072235107, 0.8396847248077393, -0.16293619573116302, -1.7117164134979248, -1.842256784439087, 1.2956981658935547, 1.1052448749542236, 2.4044041633605957, 0.48690545558929443, 0.4467266798019409, -0.7666760087013245, -0.7630799412727356, 0.30060848593711853, -0.9318215847015381, -0.7107449173927307, 0.09398980438709259, 2.3264784812927246, 1.800276756286621, -0.5147201418876648, -0.28021591901779175, -0.9767369031906128, 1.2428117990493774, -0.2844744920730591, 0.2116878777742386, 2.009207248687744, -0.2888832688331604, -0.9313808083534241, 1.324537754058838, -2.352414131164551, 0.32410335540771484, 2.110126256942749, 0.2949681878089905, 0.06895141303539276, -1.5071839094161987, -0.6635072231292725, -0.3942188322544098, -0.39627593755722046, -1.2085890769958496, 0.5430267453193665, -0.37711888551712036, -1.0391383171081543, -1.4557565450668335, 0.008677874691784382, -1.0815764665603638, -1.8156626224517822, 0.4335300028324127, 1.8882156610488892, 1.9923096895217896, -0.7981492280960083, 1.3660695552825928, -0.14494143426418304, 0.108514703810215, 1.3122758865356445, 1.333958625793457, 3.1127188205718994, 1.8665751218795776, -1.2980629205703735, 0.8259219527244568, -0.18035997450351715, -0.4356398582458496, 1.1500626802444458, -1.136946201324463, 1.1277363300323486, -0.2232641577720642, -1.404314398765564, -1.3728646039962769, 1.137956976890564, 0.562404215335846, -0.0370289571583271, -0.5887311697006226, 1.3661234378814697, 0.03372547775506973, 1.3126544952392578, 0.5774638056755066, -0.46937984228134155, 0.5226514339447021, -0.3512473702430725, -0.6234771013259888, 1.6045724153518677, 0.11196921765804291, -1.5951714515686035, -2.251272201538086, -0.3049432337284088, -0.8660578727722168, -0.13668270409107208, -0.6381767392158508, -1.0384629964828491, 1.670455813407898, 0.49524980783462524, -1.2324236631393433, -0.33914437890052795, -0.3328470289707184, -0.5595405101776123, 2.670153856277466, -1.2822192907333374, -0.11080900579690933, -1.070315957069397, -0.4815901219844818, 1.668965458869934, -1.1733283996582031, -0.16602018475532532, -0.9873894453048706, -0.8018282651901245, -1.3003894090652466, -0.49496909976005554, -0.03152826428413391, -0.877255380153656, 0.5817846655845642, -0.007151755504310131, -1.03300940990448, -0.2611532509326935, -0.8557286262512207, 1.0510534048080444, -0.13808274269104004, 0.17867803573608398, 1.8427475690841675, 0.37229761481285095, -0.5014736652374268, 0.6508530378341675, 1.2016701698303223, 0.5951972603797913, -0.7852394580841064, 0.08184686303138733, -0.6973246932029724, 0.3287554383277893, -1.4618425369262695, 0.26093655824661255, -2.987028121948242, 0.661512017250061, -0.16622893512248993, -0.15909287333488464, -0.07727385312318802, -1.208976149559021, 1.169432282447815, 2.546222448348999, -1.2205513715744019, 0.5094012022018433, 0.42594191431999207, 1.1246154308319092, -1.6342793703079224, 0.379290372133255, -0.43964293599128723, 2.0561256408691406, 0.23537857830524445, 1.237367868423462, -0.48457130789756775, -2.0933375358581543, 0.6474289298057556, -1.1615478992462158, -0.8938854336738586, 0.8606060147285461, -0.929295003414154, 0.2889356315135956, -1.3873127698898315, -0.07171478867530823, -0.9220150709152222, -1.2891348600387573, 0.6564780473709106, 0.08368275314569473, 0.3895576596260071, -0.5071725249290466, 0.35814571380615234, -2.147237777709961, -1.3323613405227661, -0.16101863980293274, -1.0557770729064941, 0.5569532513618469, -0.32732054591178894, 0.5995666980743408, -0.06016749516129494, 0.11659853160381317, 0.3061385750770569, 1.3654052019119263, 3.355299949645996, 0.21668481826782227, 0.2507149875164032, -0.04222271591424942, -0.9989691972732544, 1.4984813928604126, 0.9534209966659546, -0.14414367079734802, -0.5445882678031921, -0.900686502456665, 1.4014531373977661, 2.0730998516082764, 1.1419833898544312, 0.11766411364078522, -0.9275870323181152, -0.8793309926986694, 0.07799751311540604, 0.19670230150222778, 0.4617616534233093, 0.9377906322479248, -0.02658863738179207, 0.14613331854343414, 1.435129165649414, 1.2946537733078003, -0.3294849097728729, 0.47700661420822144, -1.0185147523880005, -0.4092218577861786, 0.33637163043022156, 0.3248977065086365, 0.10359834134578705, 0.4964466691017151, -1.1147754192352295, -0.22039218246936798, -0.3008929193019867, -0.8361935019493103, -0.7571657299995422, -0.4627722203731537, -0.41763028502464294, 1.5723481178283691, 0.10160662233829498, -0.4482029676437378, 0.052378036081790924, -0.7866524457931519, -0.19576582312583923, -1.0853843688964844, 0.32873693108558655, -0.06802688539028168, 0.04820835590362549, -0.08026545494794846, 1.6463568210601807, -0.964440643787384, -2.2394301891326904, 0.1939706802368164, 0.2358769029378891, -0.46180498600006104, 0.1480305939912796, 1.7006332874298096, 0.5164222121238708, 1.381723403930664, 1.281310796737671, 0.9896377921104431, -0.6980870366096497, -1.234301209449768, 0.7551836967468262, 0.9349820613861084, -1.3867413997650146, 0.9356803894042969, -0.25198498368263245, -0.4777831733226776, 0.6897563338279724, 1.3390904664993286, 0.3366677165031433, -1.9434151649475098, 0.8821570873260498, -0.882702112197876, 0.7895752787590027, 0.6242638826370239, 0.7619149088859558, 0.20325075089931488, 0.9099035263061523, -1.3288750648498535, -1.1200087070465088, -0.7717025279998779, -0.5639923214912415, 1.7765164375305176, -0.23022675514221191, 0.575029194355011, -0.1829916089773178, -1.1542341709136963, -0.07515008002519608, 0.7728257179260254, 0.3269466161727905, -0.3702590763568878, 0.9538868069648743, -0.5992321372032166, -1.0742881298065186, -1.2752608060836792, -0.45323601365089417, -0.9557866454124451, -0.8966808915138245, 0.9928340315818787, 0.7500672340393066, 0.45725563168525696, 1.910849928855896, 0.4600910246372223, 0.38040006160736084, -2.679302930831909, 0.9278557300567627, 0.24622145295143127, 0.0004627937451004982, 0.9508428573608398, 0.2260744273662567, 1.164854645729065, 0.0020334823057055473, 0.5407605767250061, -2.2558786869049072, 2.175316095352173, -0.21966105699539185, 0.624212384223938, 0.017699960619211197, -0.17060540616512299, 1.0895016193389893, 0.5602375864982605, 0.6162837743759155, -1.2268455028533936, 0.8402522802352905, -0.5696442127227783, 1.051392912864685, 0.8786917328834534, -0.8552820682525635, 0.032911282032728195, 1.3889535665512085, 0.4818830192089081, -0.41728103160858154, -0.970853328704834, -0.8638045787811279, 0.8426925539970398, 1.6066052913665771, -0.003658842295408249, -0.04088037088513374, 0.9080461263656616, 0.6648826599121094, -1.2474366426467896, 0.0577315017580986, -0.6892097592353821, -0.5767802596092224, 1.7398797273635864, 2.127934694290161, -0.04679077863693237, -0.20347104966640472, -0.6886383891105652, -1.2118958234786987, 0.5925214290618896, -0.11072730273008347, 0.10253483057022095, 0.7902355194091797, -0.727024257183075, 1.121737003326416, 0.5361175537109375, 0.9565576910972595, -0.0586906298995018, 0.327987939119339, 0.39164432883262634, -0.34235185384750366, -1.2408632040023804, -0.43272924423217773, -1.1240575313568115, -2.482809066772461, 0.39573419094085693, -0.2746252417564392, -1.4847636222839355, 0.15329276025295258, -1.1191781759262085, 0.8150194883346558, -0.6299206614494324, -1.0455074310302734, -1.3550093173980713, 0.32432448863983154, -0.2503974735736847, 0.9022178649902344, -1.5839780569076538, -0.1684083342552185, 1.3012001514434814, 0.8470093607902527, -0.5100993514060974, 1.0923161506652832, 0.22431199252605438, 1.0240931510925293, 0.7681980133056641, -0.32148510217666626, 0.5341477990150452, 0.22567082941532135, -1.3780006170272827, 0.441531777381897, 1.1429522037506104, 0.26261061429977417, 1.4305744171142578, -0.5222606658935547, 0.21406689286231995, 0.5464878678321838, -0.5926552414894104, -0.5164786577224731, -0.4611591696739197, 0.7456524968147278, 0.0618806928396225, -1.00643789768219, -0.040725305676460266, -0.1952238827943802, -0.18014457821846008, 0.17850308120250702, -1.5262037515640259, -0.2540256977081299, -0.31888529658317566, -0.5135583281517029, -1.3135906457901, 0.10726944357156754, 1.293962001800537, -0.955858588218689, -0.17750808596611023, 0.4476621150970459, 0.40433233976364136, 0.5763959288597107, 0.62413489818573, -0.6977565288543701, -0.22684983909130096, -0.3703101575374603, -0.19919471442699432, 0.28014764189720154, 1.1564204692840576, -0.09158135950565338, -0.9981065392494202, 0.7088445425033569, -0.4862931966781616, 0.1240263283252716, 2.047701120376587, 0.034417103976011276, -0.713553786277771, 0.32192057371139526, -0.6889705061912537, 1.8316961526870728, 1.6559829711914062, 1.3956966400146484, -0.14514482021331787, -0.825166642665863, 0.46205851435661316, -0.21898868680000305, -0.33315280079841614, 0.9080153107643127, 0.434316486120224, -0.24251598119735718, -1.376019835472107, 0.4939683675765991, 1.26744544506073, -0.9902031421661377, -0.7075462937355042, 0.14622437953948975, -0.9311243295669556, 1.1587549448013306, 0.6247875690460205, 0.2874445617198944, 0.2589036524295807, 1.5262641906738281, 0.6690395474433899, -0.550828754901886, 0.3697677254676819, 0.4703974723815918, -0.2563380002975464, -2.049241781234741, -0.8686043620109558, 0.288418710231781, -0.4157111942768097, -1.4876165390014648, 1.270876407623291, -1.1968328952789307, -0.9726382493972778, 0.4770616590976715, 0.20646129548549652, 1.335800051689148, 0.28815317153930664, 1.7301326990127563, 2.1682138442993164, 0.8959689736366272, 0.25791969895362854, 1.2970134019851685, -0.06199447810649872, -0.4532715380191803, 1.7436822652816772, -0.43349477648735046, 0.6138697266578674, 0.963661789894104, -0.4903489649295807, -1.0997940301895142, -0.8327507972717285, -1.1306098699569702, -0.5227508544921875, 1.1485553979873657, 0.23374652862548828, -1.111254334449768, 0.13714274764060974, 1.4750200510025024, 0.16943195462226868, -0.21131297945976257, 0.6845806837081909, 0.4087975323200226, -0.6467394828796387, -0.044964537024497986, -0.8678213953971863, 0.6196028590202332, -0.0947728157043457, -0.3333754241466522, 0.18621961772441864, 0.5396434664726257, 1.1778825521469116, -0.04798611253499985, 0.15936727821826935, 1.3293293714523315, -1.3111660480499268, 1.5615968704223633, -0.5411556363105774, 0.27822738885879517, -2.412198781967163, 1.3936749696731567, -0.7883404493331909, 1.8482468128204346, -2.5688066482543945, 0.44441044330596924, -0.5747222304344177, -0.5502516031265259, 0.2621031701564789, -0.40927654504776, 0.09526579827070236, -0.14530295133590698, -1.0273714065551758, -0.08778957277536392, -0.7861016988754272, 0.5086871385574341, 1.1782317161560059, 1.3951921463012695, -1.119892954826355, -0.2532152831554413, -1.832647681236267, -0.20786501467227936, -0.854076623916626, 0.3991208076477051, -1.9354143142700195, -0.14718835055828094, -2.0384955406188965, -2.4341423511505127, -1.5254687070846558, -0.8035531640052795, 0.9793202877044678, 0.139102965593338, -0.8903071880340576, 1.1763774156570435, -0.3023022413253784, -1.8065364360809326, 0.9768011569976807, -2.2032887935638428 ]
https://github.com/huggingface/datasets/issues/4562
Dataset Viewer issue for allocine
Note that the underlying issue is that datasets containing TAR files are not streamable out of the box: they need being iterated with `dl_manager.iter_archive` to avoid performance issues because they access their file content *sequentially* (no random access).
### Link https://huggingface.co/datasets/allocine ### Description Not sure if this is a problem with `bz2` compression, but I thought these datasets could be streamed: ``` Status code: 400 Exception: AttributeError Message: 'TarContainedFile' object has no attribute 'readable' ``` ### Owner No
688
38
Dataset Viewer issue for allocine ### Link https://huggingface.co/datasets/allocine ### Description Not sure if this is a problem with `bz2` compression, but I thought these datasets could be streamed: ``` Status code: 400 Exception: AttributeError Message: 'TarContainedFile' object has no attribute 'readable' ``` ### Owner No Note that the underlying issue is that datasets containing TAR files are not streamable out of the box: they need being iterated with `dl_manager.iter_archive` to avoid performance issues because they access their file content *sequentially* (no random access).
[ -1.0984501838684082, -0.8452213406562805, -0.8238654732704163, 1.462043285369873, -0.15364906191825867, -1.235145092010498, 0.13313435018062592, -0.9643965363502502, 1.6575899124145508, -0.6162674427032471, 0.22710326313972473, -1.6776928901672363, -0.02909330651164055, -0.6093558073043823, -0.6673197150230408, -0.7776907086372375, -0.4658205807209015, -0.736528754234314, 1.0269838571548462, 2.516509771347046, 1.1736809015274048, -1.4324743747711182, 2.6841602325439453, 0.8022847175598145, -0.18820984661579132, -1.058137059211731, 0.5554350018501282, -0.018265116959810257, -1.2211089134216309, -0.4750237464904785, -0.951337993144989, -0.12169253826141357, -0.5481530427932739, -0.5917558670043945, -0.10867320001125336, 0.3967411518096924, -0.19540412724018097, -0.4407583773136139, -0.5445101857185364, -0.7179514765739441, 0.37813615798950195, -0.33326178789138794, 0.9513682126998901, -0.44270846247673035, 1.8218826055526733, -0.5137073397636414, 0.2826591432094574, 0.6783541440963745, 1.4618606567382812, 0.23138324916362762, -0.13279274106025696, 0.3240205943584442, 0.4451230764389038, -0.11340446025133133, 0.36937955021858215, 1.035178303718567, 0.5741434693336487, 0.5587133765220642, 0.6005083322525024, -2.2492005825042725, 1.2441045045852661, -1.0465569496154785, 0.2481192648410797, 1.4044716358184814, -1.0556279420852661, 0.23220187425613403, -1.7471656799316406, 0.07730873674154282, 0.5130853056907654, -2.2401866912841797, 0.2049008309841156, -1.1739835739135742, -0.5563791990280151, 1.1286460161209106, 0.3824786841869354, -1.380143642425537, -0.011964020319283009, -0.2808246314525604, 1.0822418928146362, 0.3414745330810547, 1.1150918006896973, -1.6916680335998535, 0.058202799409627914, -0.4106331169605255, -0.05705287307500839, -1.2831820249557495, -1.406746506690979, 0.44176098704338074, 0.7273610234260559, 0.7020018696784973, -0.11555563658475876, 0.9549146294593811, -0.8761343955993652, 0.7412018775939941, -0.9574527144432068, -1.7659475803375244, -1.4245232343673706, -2.2833070755004883, -2.301891803741455, 0.8434560298919678, -0.5278967618942261, -0.5185636281967163, 1.9638421535491943, -0.8577747344970703, -1.8092235326766968, 1.2298460006713867, 0.3143923282623291, 0.03359755128622055, 2.355281352996826, 0.2968931198120117, -0.6316808462142944, 0.28954434394836426, -0.7726901173591614, 0.793304443359375, -0.47619524598121643, 1.4837470054626465, 0.4405277371406555, -1.0224734544754028, 1.6940706968307495, -0.48069360852241516, 0.7289754152297974, -0.7757973670959473, -0.6098464131355286, -0.9052736759185791, 0.4484913945198059, 1.967561960220337, -0.3398098945617676, 1.5577597618103027, -0.47050532698631287, -1.647109866142273, -1.5287983417510986, 0.8677540421485901, 0.4483683407306671, -0.7497457265853882, 0.23319528996944427, -0.34296560287475586, 0.0677192434668541, -0.04247637465596199, 1.119172215461731, 1.2630674839019775, 0.5976461172103882, -0.34180694818496704, -0.9657801985740662, 0.3223731517791748, 0.07244729995727539, -0.7811442613601685, -1.814314365386963, -0.35515451431274414, 0.05013802647590637, 0.5923295021057129, -1.1643133163452148, 1.7488243579864502, 0.7752568125724792, 2.051612377166748, 0.9066383838653564, -0.2639891505241394, 1.3826967477798462, -0.04937843978404999, 1.9514812231063843, -0.4810732305049896, 0.6401463150978088, -0.30205121636390686, -1.1167330741882324, 0.8937819004058838, -0.3981375992298126, -2.120715379714966, -0.878213107585907, -0.914788544178009, -0.17218263447284698, -0.6998633742332458, 0.9690811038017273, -0.22033478319644928, -1.344153881072998, 0.1300090104341507, -0.6597591638565063, 0.16660331189632416, -1.328711748123169, 0.2716020345687866, 0.7387243509292603, -0.580756664276123, 0.08655097335577011, -0.18379634618759155, -1.2361525297164917, -0.4144649803638458, 0.2710968255996704, 1.911746859550476, -0.8058653473854065, 0.9748483896255493, 1.036901593208313, -0.7414484024047852, 0.01563733071088791, 0.313356876373291, -0.21380937099456787, 0.9344373345375061, -1.1600300073623657, -0.40918073058128357, 1.2716453075408936, -0.1296471804380417, -0.6617048978805542, 1.403678297996521, 0.8072251081466675, -1.0644632577896118, -0.13041037321090698, -0.1961463838815689, -0.8010872602462769, -0.027582179754972458, -1.7326148748397827, -0.03209460526704788, 0.23491495847702026, -1.4491932392120361, -0.5554298162460327, -0.23378287255764008, 1.3210843801498413, -0.1333158016204834, 1.3743693828582764, -0.347322016954422, -0.21254085004329681, -0.37418586015701294, -0.38473883271217346, 0.09256662428379059, -0.312409907579422, -0.619804322719574, 0.17935700714588165, -0.7652010917663574, 0.3257597088813782, 1.4066274166107178, 0.3337557017803192, 0.09442602097988129, 0.5042398571968079, 1.0080944299697876, 0.3333089053630829, -0.026819240301847458, -0.9113048911094666, -1.5228785276412964, 1.890390157699585, -1.362478494644165, 1.8891047239303589, 0.825920581817627, -0.060765381902456284, -1.7356256246566772, -1.9816139936447144, 1.416298747062683, 1.2987409830093384, 2.3262903690338135, 0.6595285534858704, 0.4151839017868042, -0.9654809832572937, -0.6871615648269653, 0.24722489714622498, -1.1315168142318726, -0.7000731825828552, 0.10212451964616776, 2.353430986404419, 1.7576454877853394, -0.49603086709976196, -0.11460398137569427, -1.0429677963256836, 1.2193633317947388, -0.09834809601306915, 0.2804650068283081, 2.042720317840576, -0.3325602412223816, -1.0222753286361694, 1.2066470384597778, -2.335179567337036, 0.21695208549499512, 2.0292155742645264, 0.2639549970626831, 0.23503665626049042, -1.5139774084091187, -0.6859849095344543, -0.15702727437019348, -0.33513182401657104, -1.1374213695526123, 0.6635194420814514, -0.2391931414604187, -0.810046374797821, -1.3983145952224731, 0.2704309821128845, -1.0055378675460815, -1.6781859397888184, 0.33672860264778137, 1.8639304637908936, 1.9456815719604492, -0.8389396667480469, 1.552391767501831, -0.2138223946094513, 0.18570995330810547, 1.4001147747039795, 1.1240253448486328, 3.1015334129333496, 2.0402743816375732, -1.198264241218567, 0.7226199507713318, -0.054373133927583694, -0.4755290746688843, 1.2846630811691284, -1.13511323928833, 1.3128010034561157, -0.2596226632595062, -1.2077691555023193, -1.3508152961730957, 0.7469808459281921, 0.48484325408935547, 0.051391541957855225, -0.46877458691596985, 1.2557510137557983, 0.03571150451898575, 1.2761609554290771, 0.5483403205871582, -0.4033084809780121, 0.6116294860839844, -0.36395177245140076, -0.3606923222541809, 1.5362509489059448, 0.293018102645874, -1.3566358089447021, -2.190670967102051, -0.20878328382968903, -0.8783702254295349, -0.03073204681277275, -0.735301673412323, -0.9998372197151184, 1.6213550567626953, 0.4235529899597168, -1.2504494190216064, -0.4372490346431732, -0.30039381980895996, -0.5632491707801819, 2.6612870693206787, -1.5445128679275513, -0.2851313352584839, -0.989539384841919, -0.5263626575469971, 1.78207266330719, -1.181107759475708, -0.23608464002609253, -1.104644536972046, -0.6437374353408813, -1.2196276187896729, -0.5438609719276428, -0.011995675973594189, -0.8457542061805725, 0.9677994847297668, 0.21179212629795074, -1.1457260847091675, -0.23267260193824768, -0.8575523495674133, 0.8035622835159302, -0.20190846920013428, 0.36618486046791077, 1.8842346668243408, 0.46537789702415466, -0.33170363306999207, 0.7512842416763306, 1.2140777111053467, 0.5326547622680664, -0.6246707439422607, 0.29177725315093994, -0.6213089227676392, 0.3163737952709198, -1.4260895252227783, 0.2611881196498871, -2.844604015350342, 0.5252460241317749, -0.11221625655889511, -0.014358141459524632, -0.043451156467199326, -1.3256518840789795, 1.066197395324707, 2.4546189308166504, -1.2661687135696411, 0.5053554177284241, 0.2658948004245758, 1.2286914587020874, -1.6275858879089355, 0.2601204216480255, -0.4391311705112457, 2.1819300651550293, 0.03002236783504486, 1.1761054992675781, -0.4774327874183655, -2.2137646675109863, 0.7258116602897644, -1.234135627746582, -1.0521777868270874, 0.7788410186767578, -0.8018073439598083, -0.03196844086050987, -1.4878613948822021, -0.19530324637889862, -0.8098265528678894, -1.3033138513565063, 0.8145231604576111, 0.1311090588569641, 0.3957424759864807, -0.6698328852653503, 0.3587808907032013, -2.16256046295166, -1.358499526977539, -0.2254994660615921, -0.9350302815437317, 0.3433760702610016, -0.3281894326210022, 0.6283748745918274, -0.24765078723430634, 0.05234899744391441, 0.34963610768318176, 1.3897420167922974, 3.4614405632019043, 0.18989507853984833, 0.42303958535194397, -0.08504076302051544, -0.8083686232566833, 1.3884776830673218, 1.0306452512741089, -0.026782706379890442, -0.5831036567687988, -1.0364863872528076, 1.3204494714736938, 1.9355595111846924, 0.9407650828361511, 0.08957798779010773, -0.859291672706604, -0.6653448343276978, -0.05258264020085335, 0.14403261244297028, 0.4844931662082672, 0.8695027828216553, 0.048414234071969986, 0.032859209924936295, 1.3488460779190063, 1.1414330005645752, -0.4744751453399658, 0.39445260167121887, -0.908068060874939, -0.4325547218322754, 0.591526448726654, 0.398804634809494, 0.09889442473649979, 0.2940300703048706, -1.0810567140579224, -0.21230638027191162, -0.30262982845306396, -0.9510816931724548, -0.7830166220664978, -0.3879374861717224, -0.25046220421791077, 1.577865719795227, 0.03785233199596405, -0.59095698595047, -0.0769454762339592, -0.7824192643165588, -0.09915380924940109, -0.9873201847076416, 0.2310260832309723, -0.12740705907344818, -0.1167428195476532, -0.11997026205062866, 1.749468207359314, -1.0300709009170532, -2.204861640930176, 0.28329795598983765, 0.41342830657958984, -0.3636655807495117, 0.1840766817331314, 1.637382984161377, 0.5486541390419006, 1.4763195514678955, 1.3764476776123047, 1.0421761274337769, -0.7783061861991882, -1.39164137840271, 0.5749848484992981, 1.0767314434051514, -1.4683611392974854, 0.7273659110069275, 0.054780419915914536, -0.39742720127105713, 0.6422966718673706, 1.4040478467941284, 0.490394651889801, -1.933035969734192, 0.7647237777709961, -0.795505940914154, 0.8880080580711365, 0.7116352319717407, 0.8680434226989746, 0.29819008708000183, 0.8058716058731079, -1.2068567276000977, -1.1831387281417847, -0.8697947263717651, -0.6552568078041077, 1.9263700246810913, -0.23386874794960022, 0.5736632943153381, -0.11225785315036774, -1.3394635915756226, -0.11786153167486191, 0.7016153335571289, 0.3168184757232666, -0.4660567343235016, 0.8066769242286682, -0.49396535754203796, -1.0505167245864868, -1.4285292625427246, -0.49664950370788574, -0.9667879343032837, -0.9772226214408875, 1.014988899230957, 0.8120647668838501, 0.37419751286506653, 1.8738868236541748, 0.6611416339874268, 0.2070799320936203, -2.6233503818511963, 0.9340982437133789, 0.3234253525733948, 0.06472944468259811, 0.8200397491455078, 0.37177518010139465, 0.9976844787597656, -0.0494626984000206, 0.4618576169013977, -2.2886672019958496, 2.313624858856201, -0.2634791433811188, 0.4966169595718384, -0.007995393127202988, -0.2053581327199936, 0.9763457179069519, 0.5149340629577637, 0.4602159261703491, -1.1807032823562622, 0.6440252661705017, -0.6160186529159546, 1.2371110916137695, 0.7997990846633911, -0.6592387557029724, 0.0264400914311409, 1.263588547706604, 0.49692124128341675, -0.5086174011230469, -0.8748922944068909, -0.8068910837173462, 1.0307751893997192, 1.6096203327178955, 0.05662744119763374, -0.018672224134206772, 0.8759150505065918, 0.555912971496582, -1.1861743927001953, -0.04244980588555336, -0.7589172720909119, -0.7085886597633362, 1.6337156295776367, 2.052870035171509, -0.12556158006191254, -0.18093472719192505, -0.8531885743141174, -1.2186964750289917, 0.703562319278717, 0.07075964659452438, 0.0005889600142836571, 0.7124475240707397, -0.6897129416465759, 1.2212409973144531, 0.7412880659103394, 0.8518514633178711, 0.06415024399757385, 0.44146662950515747, 0.4318447709083557, -0.24266290664672852, -1.314213752746582, -0.3566305637359619, -1.2031240463256836, -2.518903970718384, 0.4687027633190155, -0.2741456627845764, -1.3993500471115112, 0.00476305466145277, -1.1303988695144653, 1.0023647546768188, -0.6265115737915039, -1.057892918586731, -1.607833743095398, 0.19816789031028748, -0.09160515666007996, 0.8418388962745667, -1.6158696413040161, -0.1199234277009964, 1.2192670106887817, 0.9341688752174377, -0.7945442199707031, 1.0693626403808594, 0.2634761333465576, 1.085045337677002, 0.8151574730873108, -0.3073965013027191, 0.47775712609291077, 0.0878467932343483, -1.3152753114700317, 0.5710631012916565, 1.1453731060028076, 0.10413969308137894, 1.5888519287109375, -0.5184538960456848, -0.015726285055279732, 0.4171978533267975, -0.568109929561615, -0.5467069745063782, -0.6071837544441223, 0.7178968191146851, 0.12736578285694122, -0.8803109526634216, 0.0772630125284195, -0.08858451247215271, -0.0650976300239563, 0.2205647975206375, -1.5509377717971802, -0.2339155077934265, -0.26173609495162964, -0.4854956865310669, -1.2235251665115356, -0.0794936940073967, 1.387144923210144, -0.525449275970459, -0.25977200269699097, 0.6534802317619324, 0.30261602997779846, 0.43530213832855225, 0.6029658913612366, -0.6713637709617615, -0.38592129945755005, -0.2323620617389679, -0.34056520462036133, 0.3720540702342987, 1.3164145946502686, -0.028123602271080017, -0.9478344321250916, 0.7382742762565613, -0.3546385169029236, 0.04052294045686722, 1.9064960479736328, 0.15521205961704254, -1.0149232149124146, 0.30490875244140625, -0.713570237159729, 1.9780877828598022, 1.666760802268982, 1.2888052463531494, -0.036558110266923904, -0.9877658486366272, 0.6220162510871887, -0.1753811091184616, -0.3611973822116852, 0.8287445306777954, 0.48815464973449707, -0.2765040397644043, -1.3347700834274292, 0.5501981973648071, 1.2981934547424316, -0.9667656421661377, -0.9113839864730835, 0.13986296951770782, -0.786140501499176, 0.9846317768096924, 0.7298548221588135, 0.4348088204860687, 0.2701496183872223, 1.604041576385498, 0.6864842176437378, -0.38970059156417847, 0.6155144572257996, 0.44616103172302246, -0.04610579088330269, -2.0025699138641357, -1.1921143531799316, 0.42349377274513245, -0.5014404058456421, -1.5070486068725586, 1.4362150430679321, -1.1479837894439697, -0.8821504712104797, 0.5185892581939697, 0.15217450261116028, 1.4828134775161743, 0.3020610809326172, 1.5665645599365234, 2.0240185260772705, 1.0008187294006348, 0.2372536063194275, 1.3794065713882446, -0.17088736593723297, -0.5003514885902405, 1.9324923753738403, -0.4688029885292053, 0.38883674144744873, 1.0392351150512695, -0.4479072391986847, -1.1126141548156738, -0.7266576290130615, -1.2575167417526245, -0.7372849583625793, 1.124938726425171, 0.176255002617836, -1.182336688041687, 0.27081507444381714, 1.5243312120437622, 0.11223170161247253, -0.30221912264823914, 0.613968551158905, 0.42189547419548035, -1.0031639337539673, 0.04420887306332588, -0.8646445870399475, 0.474011093378067, -0.1353975385427475, -0.3402195870876312, 0.3720521330833435, 0.46674391627311707, 1.2802660465240479, 0.014371355064213276, 0.06250107288360596, 1.1144416332244873, -1.4925602674484253, 1.5694646835327148, -0.6735719442367554, 0.19373786449432373, -2.3568248748779297, 1.440246820449829, -0.7379921078681946, 1.8135603666305542, -2.6735894680023193, 0.3928011357784271, -0.6053289175033569, -0.4653046131134033, 0.29810547828674316, -0.39340975880622864, 0.1860046237707138, -0.17308050394058228, -1.171391487121582, -0.01944049820303917, -0.6566041707992554, 0.6293452382087708, 1.1786322593688965, 1.294826865196228, -1.0860952138900757, -0.2866707742214203, -1.8591976165771484, -0.19818685948848724, -0.5652825832366943, 0.33370259404182434, -2.1241772174835205, -0.16267596185207367, -1.8171377182006836, -2.203761100769043, -1.374984622001648, -0.744610071182251, 1.0179986953735352, 0.15472152829170227, -0.8658835887908936, 1.1377679109573364, -0.287814736366272, -1.739425539970398, 1.0022120475769043, -2.120265483856201 ]
https://github.com/huggingface/datasets/issues/4562
Dataset Viewer issue for allocine
> Note that the underlying issue is that datasets containing TAR files are not streamable out of the box: they need being iterated with `dl_manager.iter_archive` to avoid performance issues because they access their file content _sequentially_ (no random access). Ah thanks for the clarification! I'll look out for this next time and implement the fix myself :)
### Link https://huggingface.co/datasets/allocine ### Description Not sure if this is a problem with `bz2` compression, but I thought these datasets could be streamed: ``` Status code: 400 Exception: AttributeError Message: 'TarContainedFile' object has no attribute 'readable' ``` ### Owner No
688
57
Dataset Viewer issue for allocine ### Link https://huggingface.co/datasets/allocine ### Description Not sure if this is a problem with `bz2` compression, but I thought these datasets could be streamed: ``` Status code: 400 Exception: AttributeError Message: 'TarContainedFile' object has no attribute 'readable' ``` ### Owner No > Note that the underlying issue is that datasets containing TAR files are not streamable out of the box: they need being iterated with `dl_manager.iter_archive` to avoid performance issues because they access their file content _sequentially_ (no random access). Ah thanks for the clarification! I'll look out for this next time and implement the fix myself :)
[ -1.1418564319610596, -0.8314626216888428, -0.8329567313194275, 1.5495359897613525, -0.16119234263896942, -1.2824715375900269, 0.08039464801549911, -1.0114634037017822, 1.663556694984436, -0.750012218952179, 0.2433592826128006, -1.6703664064407349, 0.030747823417186737, -0.63045734167099, -0.6510190367698669, -0.8191049695014954, -0.4177697002887726, -0.7530916929244995, 1.0422974824905396, 2.4910247325897217, 1.1920037269592285, -1.441710114479065, 2.7297630310058594, 0.7877408862113953, -0.2380673885345459, -1.09385347366333, 0.5727616548538208, -0.02811017632484436, -1.2261043787002563, -0.45378971099853516, -0.9697268009185791, -0.09356261044740677, -0.5649735927581787, -0.5260336995124817, -0.0800757110118866, 0.36738261580467224, -0.20535704493522644, -0.45851805806159973, -0.5207573771476746, -0.7782189846038818, 0.38343122601509094, -0.34485313296318054, 0.9640295505523682, -0.41602692008018494, 1.797627329826355, -0.462605744600296, 0.25238659977912903, 0.7309412360191345, 1.4894754886627197, 0.17386379837989807, -0.09942271560430527, 0.2327948957681656, 0.38888704776763916, -0.06140389293432236, 0.4172621965408325, 1.061784267425537, 0.5947198867797852, 0.5823590755462646, 0.5920881628990173, -2.2368369102478027, 1.2403115034103394, -1.0617152452468872, 0.22634361684322357, 1.3945447206497192, -1.0328097343444824, 0.25529053807258606, -1.7533081769943237, 0.07561196386814117, 0.5138178467750549, -2.212092638015747, 0.18635982275009155, -1.188880443572998, -0.5391052961349487, 1.1193777322769165, 0.3650316298007965, -1.36203134059906, -0.03790517523884773, -0.3333171308040619, 1.1135562658309937, 0.40449729561805725, 1.1136376857757568, -1.6404441595077515, 0.1177361011505127, -0.3816596567630768, -0.01253579556941986, -1.31240975856781, -1.4251742362976074, 0.45680442452430725, 0.7181193232536316, 0.6675623059272766, -0.0382465124130249, 0.9846288561820984, -0.8743941783905029, 0.7401030659675598, -0.9345559477806091, -1.7372673749923706, -1.4054874181747437, -2.3085548877716064, -2.2949283123016357, 0.7899367809295654, -0.5401439070701599, -0.5044493079185486, 2.014767646789551, -0.8888511061668396, -1.8262802362442017, 1.208976149559021, 0.2571292519569397, 0.0826038345694542, 2.32729172706604, 0.3086264431476593, -0.6480984687805176, 0.30136191844940186, -0.7380872368812561, 0.778885006904602, -0.4533424973487854, 1.4385255575180054, 0.47581806778907776, -1.0322508811950684, 1.6680206060409546, -0.42339080572128296, 0.6472864151000977, -0.742538332939148, -0.5124091506004333, -0.8892078399658203, 0.42266714572906494, 1.8957840204238892, -0.3556637763977051, 1.5793240070343018, -0.43180185556411743, -1.6055610179901123, -1.5279061794281006, 0.8449348211288452, 0.46289822459220886, -0.7345321178436279, 0.24235670268535614, -0.3538093566894531, 0.036525752395391464, -0.04622962698340416, 1.1177030801773071, 1.2406423091888428, 0.6418155431747437, -0.35873982310295105, -0.9880002737045288, 0.33753103017807007, 0.09494885802268982, -0.7892141342163086, -1.8084856271743774, -0.3454000651836395, 0.08036167919635773, 0.6163223385810852, -1.1529451608657837, 1.7457420825958252, 0.7908800840377808, 1.977226734161377, 0.9502130746841431, -0.2506856620311737, 1.4558346271514893, -0.03836648538708687, 1.9344820976257324, -0.43172627687454224, 0.6329387426376343, -0.2727949619293213, -1.1261188983917236, 0.8555726408958435, -0.39980167150497437, -2.06095027923584, -0.8625802993774414, -0.8904628157615662, -0.19729983806610107, -0.722314178943634, 0.9766330122947693, -0.2918184697628021, -1.3411593437194824, 0.1674669235944748, -0.6476024389266968, 0.20919974148273468, -1.2456694841384888, 0.3223856985569, 0.7141469717025757, -0.5795937776565552, 0.08909136801958084, -0.25628891587257385, -1.2232415676116943, -0.3992445468902588, 0.28386813402175903, 1.9038172960281372, -0.7736210823059082, 0.956822395324707, 1.0326292514801025, -0.7450003027915955, -0.014707295224070549, 0.3212796151638031, -0.27704891562461853, 0.9460717439651489, -1.1222976446151733, -0.45143118500709534, 1.2303742170333862, -0.18765921890735626, -0.721444845199585, 1.4372878074645996, 0.7915642857551575, -1.063438057899475, -0.20037861168384552, -0.20364700257778168, -0.8069051504135132, 0.006066416390240192, -1.6693817377090454, -0.1096406802535057, 0.27972880005836487, -1.4947431087493896, -0.5209177732467651, -0.1946014016866684, 1.319048523902893, -0.1775369495153427, 1.4206721782684326, -0.38565754890441895, -0.2243613600730896, -0.32868605852127075, -0.37905454635620117, 0.16947898268699646, -0.23744311928749084, -0.6080905199050903, 0.14086724817752838, -0.799424946308136, 0.3372538387775421, 1.391139030456543, 0.3281252980232239, 0.05439978092908859, 0.4920462369918823, 1.0413486957550049, 0.35714536905288696, -0.020261067897081375, -0.9029101133346558, -1.503607153892517, 1.94225013256073, -1.3929948806762695, 1.8632558584213257, 0.837532639503479, -0.055293306708335876, -1.8037585020065308, -1.9128504991531372, 1.4064244031906128, 1.3159055709838867, 2.2641611099243164, 0.5947503447532654, 0.41777586936950684, -0.9327383041381836, -0.6974043846130371, 0.29549282789230347, -1.0848151445388794, -0.7122283577919006, 0.08783598989248276, 2.312211513519287, 1.7935373783111572, -0.3836405575275421, -0.16275447607040405, -0.9915183782577515, 1.2373898029327393, -0.10188291221857071, 0.27395981550216675, 2.020712375640869, -0.33873188495635986, -1.0301684141159058, 1.1868200302124023, -2.3858911991119385, 0.21802832186222076, 2.0439562797546387, 0.22678349912166595, 0.15662051737308502, -1.5143386125564575, -0.6806485652923584, -0.1922895610332489, -0.32251834869384766, -1.1835534572601318, 0.6335143446922302, -0.2414417564868927, -0.7834010720252991, -1.4319088459014893, 0.28466135263442993, -1.0319031476974487, -1.6531589031219482, 0.26815468072891235, 1.8585354089736938, 1.9896904230117798, -0.8185715079307556, 1.567894697189331, -0.251821905374527, 0.19328951835632324, 1.361480474472046, 1.1225236654281616, 3.1778199672698975, 1.9460855722427368, -1.2551604509353638, 0.675624430179596, -0.029440533369779587, -0.47968724370002747, 1.2422901391983032, -1.1471939086914062, 1.3064289093017578, -0.23098428547382355, -1.19534432888031, -1.311476230621338, 0.787084698677063, 0.48244330286979675, 0.050119806081056595, -0.4504113793373108, 1.2669157981872559, 0.04144275188446045, 1.2712823152542114, 0.5375744104385376, -0.4078795909881592, 0.5807578563690186, -0.39820581674575806, -0.37821945548057556, 1.5021872520446777, 0.23126541078090668, -1.3469188213348389, -2.1925809383392334, -0.20564760267734528, -0.8205609321594238, -0.00019980501383543015, -0.7179599404335022, -0.9782398343086243, 1.609993577003479, 0.42892298102378845, -1.2733690738677979, -0.46903982758522034, -0.34010136127471924, -0.5870620012283325, 2.644167423248291, -1.488667368888855, -0.23416268825531006, -0.9580169320106506, -0.5457066893577576, 1.7785546779632568, -1.2134711742401123, -0.26563340425491333, -1.0694228410720825, -0.6429035067558289, -1.2857511043548584, -0.5666998028755188, -0.0009526126086711884, -0.8938409686088562, 0.8976665139198303, 0.22142282128334045, -1.106114149093628, -0.2664780616760254, -0.8243063688278198, 0.8376390933990479, -0.19359587132930756, 0.352532297372818, 1.8905260562896729, 0.4414388835430145, -0.36119920015335083, 0.7671834826469421, 1.1683831214904785, 0.5342683792114258, -0.6551353335380554, 0.27714747190475464, -0.6535243391990662, 0.34601449966430664, -1.3866174221038818, 0.2914264500141144, -2.921799659729004, 0.5668426752090454, -0.09973195195198059, -0.03847691789269447, -0.034882646054029465, -1.3156554698944092, 1.0757845640182495, 2.505215644836426, -1.2956933975219727, 0.47726699709892273, 0.27699562907218933, 1.2381598949432373, -1.631521463394165, 0.3042198717594147, -0.39339521527290344, 2.18266224861145, 0.02772296965122223, 1.267202615737915, -0.4524849057197571, -2.3010475635528564, 0.7318148612976074, -1.292240858078003, -1.0914881229400635, 0.8296040296554565, -0.7764968872070312, -0.01982627995312214, -1.4652799367904663, -0.25158271193504333, -0.8004806041717529, -1.2844820022583008, 0.8092688918113708, 0.13013944029808044, 0.39864543080329895, -0.6468788981437683, 0.3155646026134491, -2.133273124694824, -1.3885692358016968, -0.18227380514144897, -0.941952645778656, 0.32589757442474365, -0.3816607594490051, 0.612906813621521, -0.22870184481143951, 0.0589803084731102, 0.34729254245758057, 1.4281878471374512, 3.4588820934295654, 0.24957676231861115, 0.4210107922554016, -0.10383641719818115, -0.8127124309539795, 1.4197640419006348, 0.9391822814941406, -0.02279275469481945, -0.5531343817710876, -1.0523840188980103, 1.3064014911651611, 1.8691468238830566, 0.8786025047302246, 0.11004510521888733, -0.830190896987915, -0.6633046865463257, -0.1042012944817543, 0.13643458485603333, 0.5307562947273254, 0.8373602032661438, 0.02626127377152443, 0.052649036049842834, 1.382423996925354, 1.0969918966293335, -0.48002755641937256, 0.36620500683784485, -0.9230763912200928, -0.4488227665424347, 0.5839415192604065, 0.33602237701416016, -0.008862297981977463, 0.33244162797927856, -0.9840861558914185, -0.2587428689002991, -0.34152641892433167, -0.9046892523765564, -0.705390214920044, -0.40372708439826965, -0.25815895199775696, 1.521596908569336, 0.07648029178380966, -0.5800504684448242, -0.05575776845216751, -0.8206450343132019, -0.12512165307998657, -1.000882863998413, 0.20177000761032104, -0.17555880546569824, -0.1194445788860321, -0.13723555207252502, 1.7917932271957397, -0.9724882245063782, -2.1758012771606445, 0.2910693883895874, 0.3962038457393646, -0.33849823474884033, 0.16870471835136414, 1.6546684503555298, 0.49812597036361694, 1.4746108055114746, 1.3983300924301147, 1.032559871673584, -0.7761443853378296, -1.36708664894104, 0.6309350728988647, 1.0918865203857422, -1.4311728477478027, 0.7336545586585999, 0.019536428153514862, -0.4477100074291229, 0.6858461499214172, 1.4139726161956787, 0.4966506361961365, -1.9810717105865479, 0.7507935166358948, -0.8138628602027893, 0.8554461598396301, 0.7670424580574036, 0.8527094721794128, 0.2702843248844147, 0.8208920359611511, -1.1811425685882568, -1.2232173681259155, -0.8174061179161072, -0.6692615747451782, 1.9030864238739014, -0.25716158747673035, 0.6097607016563416, -0.1252252459526062, -1.357405185699463, -0.160010427236557, 0.6598935723304749, 0.27350863814353943, -0.42744848132133484, 0.8204415440559387, -0.6342076659202576, -1.0457220077514648, -1.4690897464752197, -0.483483225107193, -0.9576942324638367, -0.9907028675079346, 1.0202330350875854, 0.8450669646263123, 0.3028883934020996, 1.8895130157470703, 0.6438276171684265, 0.18552011251449585, -2.611240863800049, 0.9012438654899597, 0.2652166485786438, 0.07840868085622787, 0.8229510188102722, 0.31448161602020264, 1.032440185546875, 0.03916693478822708, 0.41357260942459106, -2.287020444869995, 2.302168369293213, -0.24358558654785156, 0.5503296852111816, -0.04917704686522484, -0.2728612720966339, 1.0368739366531372, 0.48939186334609985, 0.5329750180244446, -1.149417757987976, 0.7144386768341064, -0.617455005645752, 1.2407242059707642, 0.8733338713645935, -0.7204145193099976, -0.03194088488817215, 1.2818562984466553, 0.5054106116294861, -0.5702098608016968, -0.8666480183601379, -0.891839325428009, 1.046053409576416, 1.649183988571167, 0.10629991441965103, -0.01714920997619629, 0.8429220914840698, 0.5889075994491577, -1.11851167678833, -0.040677450597286224, -0.7526460886001587, -0.7221161723136902, 1.628831148147583, 2.048236131668091, -0.14212365448474884, -0.18516740202903748, -0.8342236876487732, -1.175023078918457, 0.6753438711166382, 0.004600862041115761, -0.04281759262084961, 0.6920573115348816, -0.7266629934310913, 1.1825050115585327, 0.7815660834312439, 0.8589601516723633, 0.07629895210266113, 0.42306840419769287, 0.3958483338356018, -0.21030806005001068, -1.2980504035949707, -0.29061466455459595, -1.2276302576065063, -2.526371955871582, 0.47650599479675293, -0.26735612750053406, -1.3929163217544556, 0.06458932161331177, -1.0819016695022583, 1.0233547687530518, -0.6700745820999146, -1.0493080615997314, -1.5510685443878174, 0.20292237401008606, -0.11573275178670883, 0.8231275081634521, -1.5845385789871216, -0.05722333863377571, 1.235511302947998, 0.9745477437973022, -0.7477222084999084, 1.0799009799957275, 0.26400285959243774, 1.0622615814208984, 0.832011878490448, -0.32859379053115845, 0.46758511662483215, 0.10445241630077362, -1.3405966758728027, 0.5451106429100037, 1.1059414148330688, 0.13671159744262695, 1.5618994235992432, -0.49634504318237305, -0.015041740611195564, 0.42741695046424866, -0.5662804841995239, -0.5017154216766357, -0.561257541179657, 0.760483980178833, 0.12903548777103424, -0.8342612981796265, 0.10890578478574753, -0.1021357849240303, -0.181226447224617, 0.21064946055412292, -1.5918368101119995, -0.26184192299842834, -0.30069413781166077, -0.5410853624343872, -1.289061427116394, 0.00004570186138153076, 1.4298202991485596, -0.5763633251190186, -0.2883903682231903, 0.6096474528312683, 0.3024003505706787, 0.45220285654067993, 0.6397719383239746, -0.6893299221992493, -0.3786166310310364, -0.24833457171916962, -0.286940336227417, 0.34492456912994385, 1.2698551416397095, -0.0498572438955307, -0.9292947053909302, 0.7258960604667664, -0.34493398666381836, 0.04251035302877426, 1.9185121059417725, 0.17301833629608154, -0.9215506911277771, 0.32152459025382996, -0.7421392202377319, 2.0003483295440674, 1.6561212539672852, 1.313517451286316, -0.03858918324112892, -0.9812955856323242, 0.6930867433547974, -0.20777326822280884, -0.3356274366378784, 0.843691885471344, 0.4780087471008301, -0.21113449335098267, -1.300454020500183, 0.5604352355003357, 1.2542548179626465, -0.9445076584815979, -0.9045022130012512, 0.1291559338569641, -0.7553359270095825, 0.9959475994110107, 0.7305312752723694, 0.41032615303993225, 0.2491932064294815, 1.6499452590942383, 0.7105549573898315, -0.44256576895713806, 0.6063603758811951, 0.47597527503967285, -0.0939231663942337, -1.992782711982727, -1.1148350238800049, 0.3970329165458679, -0.48280707001686096, -1.5244452953338623, 1.4552615880966187, -1.1299370527267456, -0.8386638164520264, 0.5027428865432739, 0.11066342145204544, 1.4864848852157593, 0.3142711818218231, 1.5403895378112793, 2.0295462608337402, 0.9531645178794861, 0.2796280086040497, 1.3551673889160156, -0.1669590175151825, -0.49536561965942383, 1.9625144004821777, -0.4974735677242279, 0.3761460781097412, 1.1038347482681274, -0.4441855251789093, -1.090577244758606, -0.7554506063461304, -1.1858904361724854, -0.7842199206352234, 1.1550158262252808, 0.17595236003398895, -1.2084144353866577, 0.2992365062236786, 1.5137488842010498, 0.1296064257621765, -0.3001054525375366, 0.624620795249939, 0.46725842356681824, -0.9518131613731384, 0.028955217450857162, -0.8903471231460571, 0.5187506675720215, -0.19209261238574982, -0.3266826570034027, 0.3716718852519989, 0.4313617944717407, 1.3213211297988892, -0.0031406120397150517, 0.04783419892191887, 1.145701289176941, -1.4570362567901611, 1.5336908102035522, -0.6307601928710938, 0.19549809396266937, -2.366724967956543, 1.43543541431427, -0.7642485499382019, 1.8700863122940063, -2.6673765182495117, 0.3844772279262543, -0.6366260647773743, -0.4474274814128876, 0.3100910782814026, -0.43730705976486206, 0.15631601214408875, -0.2006891518831253, -1.1419209241867065, -0.07404206693172455, -0.6441462635993958, 0.6365569829940796, 1.1903769969940186, 1.2753098011016846, -1.1393933296203613, -0.279975563287735, -1.8099780082702637, -0.17971134185791016, -0.5622769594192505, 0.299239844083786, -2.138563394546509, -0.19629976153373718, -1.902323603630066, -2.259058713912964, -1.3269133567810059, -0.7302389144897461, 1.0535310506820679, 0.175417959690094, -0.8674639463424683, 1.1584324836730957, -0.24126875400543213, -1.7186715602874756, 1.016957402229309, -2.120279312133789 ]
https://github.com/huggingface/datasets/issues/4550
imdb source error
Thanks for reporting, @Muhtasham. Indeed IMDB dataset is not accessible from yesterday, because the data is hosted on the data owners servers at Stanford (http://ai.stanford.edu/) and these are down due to a power outage originated by a fire: https://twitter.com/StanfordAILab/status/1539472302399623170?s=20&t=1HU1hrtaXprtn14U61P55w As a temporary workaroud, you can load the IMDB dataset with this tweak: ```python ds = load_dataset("imdb", revision="tmp-fix-imdb") ```
## Describe the bug imdb dataset not loading ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("imdb") ``` ## Expected results ## Actual results ```bash 06/23/2022 14:45:18 - INFO - datasets.builder - Dataset not on Hf google storage. Downloading and preparing it from source 06/23/2022 14:46:34 - INFO - datasets.utils.file_utils - HEAD request to http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz timed out, retrying... [1.0] ..... ConnectionError: Couldn't reach http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz (ConnectTimeout(MaxRetryError("HTTPConnectionPool(host='ai.stanford.edu', port=80): Max retries exceeded with url: /~amaas/data/sentiment/aclImdb_v1.tar.gz (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f2d750cf690>, 'Connection to ai.stanford.edu timed out. (connect timeout=100)'))"))) ``` ## Environment info - `datasets` version: 2.3.2 - Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.13 - PyArrow version: 6.0.1 - Pandas version: 1.3.5
691
58
imdb source error ## Describe the bug imdb dataset not loading ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("imdb") ``` ## Expected results ## Actual results ```bash 06/23/2022 14:45:18 - INFO - datasets.builder - Dataset not on Hf google storage. Downloading and preparing it from source 06/23/2022 14:46:34 - INFO - datasets.utils.file_utils - HEAD request to http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz timed out, retrying... [1.0] ..... ConnectionError: Couldn't reach http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz (ConnectTimeout(MaxRetryError("HTTPConnectionPool(host='ai.stanford.edu', port=80): Max retries exceeded with url: /~amaas/data/sentiment/aclImdb_v1.tar.gz (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f2d750cf690>, 'Connection to ai.stanford.edu timed out. (connect timeout=100)'))"))) ``` ## Environment info - `datasets` version: 2.3.2 - Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.13 - PyArrow version: 6.0.1 - Pandas version: 1.3.5 Thanks for reporting, @Muhtasham. Indeed IMDB dataset is not accessible from yesterday, because the data is hosted on the data owners servers at Stanford (http://ai.stanford.edu/) and these are down due to a power outage originated by a fire: https://twitter.com/StanfordAILab/status/1539472302399623170?s=20&t=1HU1hrtaXprtn14U61P55w As a temporary workaroud, you can load the IMDB dataset with this tweak: ```python ds = load_dataset("imdb", revision="tmp-fix-imdb") ```
[ -1.2096521854400635, -0.9521178603172302, -0.6611171364784241, 1.4664232730865479, -0.1522616297006607, -1.2280384302139282, 0.15799513459205627, -1.0021857023239136, 1.6243712902069092, -0.675862729549408, 0.2343566119670868, -1.6511576175689697, -0.032492317259311676, -0.5008758306503296, -0.6976291537284851, -0.8736615180969238, -0.453575998544693, -0.7656445503234863, 1.007209062576294, 2.4954216480255127, 1.195770025253296, -1.332696795463562, 2.7241599559783936, 0.7684933543205261, -0.22289612889289856, -1.0982601642608643, 0.49338117241859436, 0.003986712545156479, -1.3791770935058594, -0.32577893137931824, -0.966124415397644, -0.07340289652347565, -0.5811822414398193, -0.5327306985855103, 0.15970762073993683, 0.3831922709941864, -0.21797525882720947, -0.4381648302078247, -0.5856538414955139, -0.7031468749046326, 0.5097830295562744, -0.3846825361251831, 0.9385338425636292, -0.3390646278858185, 1.6943646669387817, -0.6031895279884338, 0.5127108693122864, 0.7130042910575867, 1.338196873664856, 0.22644208371639252, -0.03653017058968544, 0.43651461601257324, 0.37604349851608276, 0.11989825963973999, 0.5086366534233093, 1.209516167640686, 0.6182692050933838, 0.39455848932266235, 0.6701653003692627, -2.2518088817596436, 1.2971456050872803, -0.8739141225814819, 0.28612592816352844, 1.327435851097107, -0.9150340557098389, 0.3611374497413635, -1.8229663372039795, -0.05874517560005188, 0.5298439264297485, -2.2724826335906982, 0.22339656949043274, -1.3845685720443726, -0.5045976638793945, 1.0651949644088745, 0.386564701795578, -1.192352294921875, 0.07699988037347794, -0.48711633682250977, 1.0293734073638916, 0.43523937463760376, 1.1837217807769775, -1.6827610731124878, -0.00818110816180706, -0.23414741456508636, 0.15790502727031708, -1.1943092346191406, -1.5599006414413452, 0.5573451519012451, 0.7589890956878662, 0.5938986539840698, -0.15083684027194977, 0.9464677572250366, -1.01041841506958, 0.7879207134246826, -0.9161468148231506, -1.8191583156585693, -1.3999544382095337, -2.3357913494110107, -2.2746171951293945, 0.7450733780860901, -0.41388362646102905, -0.444426566362381, 2.1075665950775146, -0.9878370761871338, -1.822092056274414, 1.0408066511154175, 0.19594261050224304, 0.02831578627228737, 2.343895673751831, 0.2327325940132141, -0.7919965982437134, 0.46410906314849854, -0.7890228629112244, 0.6909016966819763, -0.34919273853302, 1.3875408172607422, 0.45972275733947754, -0.9941826462745667, 1.5926684141159058, -0.3615092635154724, 0.5575824975967407, -0.6591398119926453, -0.4769430458545685, -0.6583436131477356, 0.25265535712242126, 1.9624522924423218, -0.3572210967540741, 1.5116498470306396, -0.3227537274360657, -1.5632679462432861, -1.53896963596344, 0.7737449407577515, 0.5673089623451233, -0.6835139393806458, 0.07781895250082016, -0.41467607021331787, 0.1328299194574356, -0.0028957584872841835, 1.1288435459136963, 1.2903172969818115, 0.850640058517456, -0.40246954560279846, -0.9163038730621338, 0.19690348207950592, 0.027207259088754654, -0.7684997916221619, -1.793479084968567, -0.38440242409706116, 0.17133280634880066, 0.6410374641418457, -1.3164101839065552, 1.6960299015045166, 0.8024185299873352, 2.0233852863311768, 0.9920691251754761, -0.39743050932884216, 1.5245822668075562, 0.08693201839923859, 1.8863736391067505, -0.4685458242893219, 0.6016092896461487, -0.35399848222732544, -1.1405712366104126, 0.7078410387039185, -0.26589298248291016, -2.078618049621582, -0.6884850263595581, -0.8187863826751709, -0.08950456231832504, -0.744107186794281, 0.8849896192550659, -0.25885865092277527, -1.392102837562561, 0.14412376284599304, -0.8368809819221497, 0.11562742292881012, -1.302718162536621, 0.2039782702922821, 0.7236578464508057, -0.691637396812439, 0.1388554722070694, -0.2881292998790741, -1.280937910079956, -0.5290621519088745, 0.3061971068382263, 1.813781499862671, -0.7244662046432495, 0.9581332206726074, 1.0334964990615845, -0.7486632466316223, 0.10464155673980713, 0.34262678027153015, -0.2549768090248108, 0.8688942790031433, -1.0811136960983276, -0.3863202929496765, 1.2084320783615112, -0.16297122836112976, -0.6297436356544495, 1.4589203596115112, 0.7754623889923096, -1.026242733001709, -0.293546587228775, -0.11894185096025467, -0.7248254418373108, 0.02365187555551529, -1.6311925649642944, -0.15952520072460175, 0.37570470571517944, -1.5537528991699219, -0.4465849697589874, -0.32154580950737, 1.387292504310608, -0.02626032382249832, 1.3918136358261108, -0.2369251698255539, -0.17392995953559875, -0.3885068893432617, -0.403887540102005, 0.11805631220340729, -0.22438177466392517, -0.5790765285491943, 0.25762277841567993, -0.8416013121604919, 0.35281726717948914, 1.464172124862671, 0.30314475297927856, 0.05688028782606125, 0.5923646092414856, 1.046237826347351, 0.4122227132320404, -0.12507805228233337, -0.8934311270713806, -1.5930942296981812, 2.0065226554870605, -1.3879544734954834, 1.9526041746139526, 0.8196098804473877, -0.0742778331041336, -1.8291441202163696, -1.947246789932251, 1.3046663999557495, 1.0693105459213257, 2.43206787109375, 0.5542789101600647, 0.4823884665966034, -0.813194990158081, -0.6520677208900452, 0.3182176649570465, -0.9401556849479675, -0.806374192237854, 0.17099981009960175, 2.4152982234954834, 1.7172926664352417, -0.41962671279907227, -0.2180652767419815, -1.0554734468460083, 1.4087494611740112, -0.1909450888633728, 0.21251316368579865, 1.989588975906372, -0.1904672533273697, -1.0603229999542236, 1.3474045991897583, -2.285386800765991, 0.3082231283187866, 2.025786876678467, 0.18834801018238068, 0.11050163954496384, -1.4506627321243286, -0.7178798317909241, -0.28239917755126953, -0.470384806394577, -1.1626938581466675, 0.5641379356384277, -0.27685919404029846, -0.8830903768539429, -1.4561066627502441, 0.09341628849506378, -1.1266485452651978, -1.8055168390274048, 0.23760837316513062, 1.874627709388733, 1.9809681177139282, -0.698697030544281, 1.457149624824524, -0.26736173033714294, 0.07014578580856323, 1.2422879934310913, 1.2303600311279297, 3.1089189052581787, 1.933366060256958, -1.2647637128829956, 0.8181378245353699, -0.14919419586658478, -0.38826143741607666, 1.1178908348083496, -1.2133903503417969, 1.177499532699585, -0.24865180253982544, -1.2644022703170776, -1.117145299911499, 1.0069166421890259, 0.4907754957675934, -0.044849660247564316, -0.45262444019317627, 1.1687880754470825, 0.12437984347343445, 1.38611900806427, 0.5692479610443115, -0.3359931707382202, 0.6589477062225342, -0.3406861424446106, -0.49028459191322327, 1.5407705307006836, 0.16275747120380402, -1.4690115451812744, -2.272402048110962, -0.26610472798347473, -0.9369652271270752, -0.04640384018421173, -0.6516114473342896, -1.0120903253555298, 1.6569510698318481, 0.43559277057647705, -1.2134326696395874, -0.2866608798503876, -0.39018678665161133, -0.536669135093689, 2.659579038619995, -1.3575198650360107, -0.16723774373531342, -0.9489604830741882, -0.5484058856964111, 1.6103086471557617, -1.1521313190460205, -0.1880539059638977, -0.9559788703918457, -0.5913280248641968, -1.3080939054489136, -0.6503400802612305, -0.021632101386785507, -0.8981732130050659, 0.7275075912475586, 0.18302865326404572, -1.163522720336914, -0.2640026807785034, -0.8917124271392822, 0.9879747629165649, -0.0770314484834671, 0.14359953999519348, 1.8621525764465332, 0.42424511909484863, -0.3218485713005066, 0.6365917921066284, 1.127139925956726, 0.6232702136039734, -0.6369631886482239, 0.207605242729187, -0.6845230460166931, 0.3577035963535309, -1.3745354413986206, 0.26095059514045715, -2.892533779144287, 0.7012135982513428, -0.05877659097313881, -0.07047522068023682, -0.08172684907913208, -1.2433574199676514, 1.1357927322387695, 2.6286354064941406, -1.2602342367172241, 0.45913615822792053, 0.3416648507118225, 1.0892702341079712, -1.4625918865203857, 0.21181634068489075, -0.5221428871154785, 2.065974473953247, 0.1997617781162262, 1.2884385585784912, -0.46094197034835815, -2.2538464069366455, 0.6801567077636719, -1.2330918312072754, -1.0684969425201416, 0.7775226831436157, -0.8633536696434021, 0.1524302214384079, -1.3650174140930176, -0.13407273590564728, -0.8521238565444946, -1.2409154176712036, 0.6920101642608643, 0.14965735375881195, 0.48670509457588196, -0.6157298684120178, 0.3983905613422394, -2.181872606277466, -1.3105100393295288, -0.20694109797477722, -0.9977092146873474, 0.49124404788017273, -0.33398666977882385, 0.7008716464042664, -0.1626022756099701, -0.04742133244872093, 0.37311887741088867, 1.364875078201294, 3.3450121879577637, 0.14670994877815247, 0.21629910171031952, -0.13979938626289368, -1.0985950231552124, 1.389243721961975, 0.9815717339515686, -0.1758851557970047, -0.5889966487884521, -1.04857337474823, 1.2285207509994507, 2.0294013023376465, 1.1307438611984253, 0.14185087382793427, -0.9108592867851257, -0.8095594644546509, 0.0967823788523674, 0.20231179893016815, 0.501324474811554, 0.98894202709198, 0.05458950996398926, 0.0805261954665184, 1.4643927812576294, 1.1902518272399902, -0.32467249035835266, 0.40053316950798035, -0.8734045028686523, -0.5058807730674744, 0.5143746733665466, 0.2538793385028839, 0.021707192063331604, 0.3368413746356964, -1.1689528226852417, -0.1862894892692566, -0.3829214572906494, -0.8977847099304199, -0.7308419346809387, -0.3943730890750885, -0.39298662543296814, 1.6131330728530884, 0.07602930068969727, -0.44956931471824646, -0.02028660848736763, -0.725220263004303, -0.0619192011654377, -0.9952532649040222, 0.355963796377182, -0.19975432753562927, 0.0012880722060799599, -0.14931075274944305, 1.6638290882110596, -0.8988807201385498, -2.087481737136841, 0.23854240775108337, 0.19057777523994446, -0.4496700167655945, 0.24183820188045502, 1.674212098121643, 0.6084808707237244, 1.4042092561721802, 1.33620023727417, 0.9663240909576416, -0.6332706809043884, -1.2197169065475464, 0.6548458337783813, 0.9268130660057068, -1.4204763174057007, 0.7668867707252502, -0.08645176142454147, -0.506689727306366, 0.6284129023551941, 1.3313450813293457, 0.4195878803730011, -2.0531699657440186, 0.7969178557395935, -0.8936973810195923, 0.727278470993042, 0.6801750063896179, 0.7740801572799683, 0.13171018660068512, 0.7901367545127869, -1.264513373374939, -1.0719168186187744, -0.7064069509506226, -0.6759843230247498, 1.916412353515625, -0.24268701672554016, 0.5167487263679504, -0.2067614197731018, -1.3085743188858032, -0.10817752033472061, 0.6815161108970642, 0.3229062259197235, -0.596393883228302, 0.8693758845329285, -0.6050346493721008, -1.1015571355819702, -1.3195809125900269, -0.5144032835960388, -0.9672958850860596, -0.858891487121582, 0.9985202550888062, 0.7662866711616516, 0.39611244201660156, 1.8693104982376099, 0.5730631947517395, 0.21247470378875732, -2.730659008026123, 0.914760410785675, 0.3080795705318451, 0.032373640686273575, 0.9419530630111694, 0.22483837604522705, 1.0502233505249023, -0.12575820088386536, 0.64619380235672, -2.3121917247772217, 2.2786760330200195, -0.18342053890228271, 0.6526921987533569, 0.03961166366934776, -0.06840202212333679, 1.0151106119155884, 0.592482328414917, 0.5996360778808594, -1.0785412788391113, 0.7408799529075623, -0.6348541378974915, 1.2144476175308228, 0.7748258709907532, -0.8613291382789612, -0.02231973595917225, 1.3009716272354126, 0.517166793346405, -0.4678017795085907, -0.9180417060852051, -0.9752408862113953, 0.9377629160881042, 1.7944730520248413, -0.1098037138581276, 0.11703060567378998, 0.9231216311454773, 0.6702231168746948, -1.3666279315948486, -0.029251445084810257, -0.7504519820213318, -0.6432676315307617, 1.649877667427063, 2.1287777423858643, -0.1326541155576706, -0.2569376230239868, -0.7538542151451111, -1.2560197114944458, 0.746613621711731, -0.06239043176174164, 0.02429637685418129, 0.7129623293876648, -0.6075536608695984, 1.2694098949432373, 0.7670050263404846, 0.9669593572616577, 0.1693657487630844, 0.26745831966400146, 0.20658384263515472, -0.3520238995552063, -1.2792584896087646, -0.2716849446296692, -1.0294541120529175, -2.492417097091675, 0.4686957001686096, -0.17248517274856567, -1.4778625965118408, 0.07805769890546799, -1.0107096433639526, 0.8661649823188782, -0.538415789604187, -1.0846986770629883, -1.3539936542510986, 0.24457253515720367, -0.1597604602575302, 0.9546321630477905, -1.6264851093292236, -0.11182543635368347, 1.2445791959762573, 0.9974030256271362, -0.669549286365509, 0.950912356376648, 0.3117334842681885, 1.0220471620559692, 0.8928232789039612, -0.26831045746803284, 0.49448367953300476, 0.16153189539909363, -1.2338142395019531, 0.3995119035243988, 1.1625137329101562, 0.22934529185295105, 1.4618611335754395, -0.6175692677497864, 0.011666138656437397, 0.41467973589897156, -0.5133160948753357, -0.43664905428886414, -0.5352689623832703, 0.685031533241272, -0.04457337036728859, -1.0602878332138062, 0.0040128761902451515, -0.06254154443740845, -0.12726043164730072, 0.18674875795841217, -1.499635934829712, -0.24620355665683746, -0.27737191319465637, -0.6178971529006958, -1.1989326477050781, -0.0543789379298687, 1.3262696266174316, -0.872120201587677, -0.17804807424545288, 0.5038567781448364, 0.273034006357193, 0.6331357359886169, 0.6629055142402649, -0.7134085893630981, -0.39739879965782166, -0.2081097811460495, -0.39384347200393677, 0.3356283903121948, 1.3554167747497559, -0.03016792982816696, -1.040795087814331, 0.7532858848571777, -0.41322633624076843, 0.11189887672662735, 1.937431812286377, 0.04243254289031029, -0.8171159625053406, 0.30640143156051636, -0.6557958722114563, 1.8474218845367432, 1.6847515106201172, 1.3034312725067139, -0.14924435317516327, -0.9214296936988831, 0.5534816980361938, -0.27161234617233276, -0.396389365196228, 0.9128243923187256, 0.42040732502937317, -0.2028093785047531, -1.325257658958435, 0.6030241847038269, 1.2931673526763916, -0.941053569316864, -0.85208660364151, 0.1895066797733307, -0.7933279275894165, 1.1421422958374023, 0.7572602033615112, 0.2815638780593872, 0.1787024736404419, 1.6330407857894897, 0.7610094547271729, -0.44672077894210815, 0.5385324358940125, 0.44900843501091003, -0.2318950742483139, -2.1080942153930664, -1.048163890838623, 0.30938243865966797, -0.46143484115600586, -1.5885881185531616, 1.2701995372772217, -1.2092586755752563, -0.9800092577934265, 0.5710019469261169, 0.12412229180335999, 1.4427484273910522, 0.35890060663223267, 1.6628972291946411, 2.1134438514709473, 0.9709609150886536, 0.3318319022655487, 1.2924950122833252, -0.07998760789632797, -0.4057239592075348, 1.7342687845230103, -0.5088368058204651, 0.5649559497833252, 1.0627762079238892, -0.40202346444129944, -1.0374419689178467, -0.8066968321800232, -1.2169934511184692, -0.7913139462471008, 1.166818618774414, 0.14823757112026215, -1.1396152973175049, 0.22971877455711365, 1.5810092687606812, 0.13332264125347137, -0.25236406922340393, 0.6843705177307129, 0.3785514831542969, -0.7150964140892029, -0.0723685473203659, -0.8993223309516907, 0.4348163306713104, -0.22217585146427155, -0.38981345295906067, 0.3155081570148468, 0.4014104902744293, 1.2782971858978271, 0.02126338705420494, 0.11405998468399048, 1.2189100980758667, -1.3877182006835938, 1.5906540155410767, -0.6531791687011719, 0.31636667251586914, -2.4239797592163086, 1.3852101564407349, -0.8373866081237793, 1.8850022554397583, -2.6794466972351074, 0.47476035356521606, -0.49853599071502686, -0.4650250971317291, 0.14843806624412537, -0.41015052795410156, 0.09340962022542953, -0.15937474370002747, -1.1089489459991455, -0.17495110630989075, -0.7735534310340881, 0.6087273359298706, 1.114525318145752, 1.407644510269165, -1.1138839721679688, -0.2608509957790375, -1.7935491800308228, -0.19580748677253723, -0.7211713790893555, 0.4514138102531433, -1.8787052631378174, -0.18125088512897491, -1.9081425666809082, -2.3800315856933594, -1.2857515811920166, -0.8564139604568481, 1.1191784143447876, 0.033504802733659744, -0.7983458042144775, 1.0595782995224, -0.41174018383026123, -1.855689287185669, 1.098168969154358, -2.3135437965393066 ]
https://github.com/huggingface/datasets/issues/4548
Metadata.jsonl for Imagefolder is ignored if it's in a parent directory to the splits directories/do not have "{split}_" prefix
I agree it would be nice to support this. It doesn't fit really well in the current data_files.py, where files of each splits are separated in different folder though, maybe we have to modify a bit the logic here. One idea would be to extend `get_patterns_in_dataset_repository` and `get_patterns_locally` to additionally check for `metadata.json`, but feel free to comment if you have better ideas (I feel like we're reaching the limits of what the current implementation IMO, so we could think of a different way of resolving the data files if necessary)
If data contains a single `metadata.jsonl` file for several splits, it won't be included in a dataset's `data_files` and therefore ignored. This happens when a directory is structured like as follows: ``` train/ file_1.jpg file_2.jpg test/ file_3.jpg file_4.jpg metadata.jsonl ``` or like as follows: ``` train_file_1.jpg train_file_2.jpg test_file_3.jpg test_file_4.jpg metadata.jsonl ``` The same for HF repos. because it's ignored by the patterns [here](https://github.com/huggingface/datasets/blob/master/src/datasets/data_files.py#L29) @lhoestq @mariosasko Do you think it's better to add this functionality in `data_files.py` or just specifically in imagefolder/audiofolder code? In `data_files.py` would me more general but I don't know if there are any other cases when that might be needed.
693
91
Metadata.jsonl for Imagefolder is ignored if it's in a parent directory to the splits directories/do not have "{split}_" prefix If data contains a single `metadata.jsonl` file for several splits, it won't be included in a dataset's `data_files` and therefore ignored. This happens when a directory is structured like as follows: ``` train/ file_1.jpg file_2.jpg test/ file_3.jpg file_4.jpg metadata.jsonl ``` or like as follows: ``` train_file_1.jpg train_file_2.jpg test_file_3.jpg test_file_4.jpg metadata.jsonl ``` The same for HF repos. because it's ignored by the patterns [here](https://github.com/huggingface/datasets/blob/master/src/datasets/data_files.py#L29) @lhoestq @mariosasko Do you think it's better to add this functionality in `data_files.py` or just specifically in imagefolder/audiofolder code? In `data_files.py` would me more general but I don't know if there are any other cases when that might be needed. I agree it would be nice to support this. It doesn't fit really well in the current data_files.py, where files of each splits are separated in different folder though, maybe we have to modify a bit the logic here. One idea would be to extend `get_patterns_in_dataset_repository` and `get_patterns_locally` to additionally check for `metadata.json`, but feel free to comment if you have better ideas (I feel like we're reaching the limits of what the current implementation IMO, so we could think of a different way of resolving the data files if necessary)
[ -1.1308221817016602, -0.9317970871925354, -0.7179958820343018, 1.6436245441436768, -0.15835173428058624, -1.179413914680481, 0.09370183944702148, -0.9890587329864502, 1.754193902015686, -0.8083963990211487, 0.3350153863430023, -1.7177810668945312, 0.05231483280658722, -0.5735754370689392, -0.7144131064414978, -0.882486879825592, -0.47460541129112244, -0.7586617469787598, 1.0540939569473267, 2.4296584129333496, 1.191014289855957, -1.3814464807510376, 2.6327285766601562, 0.6200663447380066, -0.23239555954933167, -1.049615740776062, 0.49816107749938965, 0.01648583635687828, -1.1687815189361572, -0.45734918117523193, -0.8375909328460693, -0.0167609304189682, -0.6511341333389282, -0.4836246967315674, -0.01934628002345562, 0.4258449375629425, -0.2980402708053589, -0.37067827582359314, -0.6025999188423157, -0.7981148362159729, 0.4824468791484833, -0.3585512638092041, 0.9216004610061646, -0.2886509299278259, 1.8175338506698608, -0.5472928881645203, 0.4434468150138855, 0.8022123575210571, 1.3427704572677612, 0.2172827571630478, 0.03297163173556328, 0.21116989850997925, 0.4464847445487976, -0.02735324203968048, 0.48742160201072693, 1.126586675643921, 0.6870070695877075, 0.5158263444900513, 0.6958066821098328, -2.310966968536377, 1.3541219234466553, -1.0741469860076904, 0.20977728068828583, 1.2729709148406982, -0.9209886789321899, 0.36563098430633545, -1.7614353895187378, 0.07988068461418152, 0.6440785527229309, -2.2160186767578125, 0.22786186635494232, -1.3380860090255737, -0.46302497386932373, 1.0270923376083374, 0.27436792850494385, -1.1907240152359009, 0.21304424107074738, -0.373319536447525, 1.0564683675765991, 0.49738043546676636, 1.0139484405517578, -1.784378170967102, -0.02750883251428604, -0.24442104995250702, 0.1016400158405304, -1.3029837608337402, -1.5123857259750366, 0.4812923073768616, 0.6939054131507874, 0.5385552644729614, -0.06011183559894562, 1.081606388092041, -1.012630820274353, 0.7591681480407715, -1.0342036485671997, -1.672102928161621, -1.3551898002624512, -2.2526862621307373, -2.35050368309021, 0.7104881405830383, -0.44969114661216736, -0.5270098447799683, 2.0812861919403076, -0.9490054845809937, -1.7193737030029297, 1.2339000701904297, 0.24951523542404175, 0.03005892038345337, 2.3854968547821045, 0.12295214831829071, -0.7797272801399231, 0.32659241557121277, -0.7842035889625549, 0.8144956231117249, -0.32587307691574097, 1.3510178327560425, 0.462198942899704, -1.0374032258987427, 1.5703407526016235, -0.403841495513916, 0.5950756072998047, -0.6190100908279419, -0.6173577308654785, -0.6885228753089905, 0.3316729962825775, 1.9131627082824707, -0.2929403483867645, 1.5388400554656982, -0.33600983023643494, -1.5684760808944702, -1.5695525407791138, 0.9283326864242554, 0.43686988949775696, -0.8257521390914917, 0.02734895423054695, -0.31035637855529785, 0.20231294631958008, -0.09772130101919174, 1.1404038667678833, 1.2521681785583496, 0.7432831525802612, -0.4389626383781433, -0.8441704511642456, 0.1650417000055313, -0.09255869686603546, -0.6576510071754456, -1.8215992450714111, -0.35451069474220276, 0.17457593977451324, 0.6462498307228088, -1.1762616634368896, 1.8109620809555054, 0.8686290979385376, 1.9584852457046509, 0.9571549296379089, -0.375718355178833, 1.507001519203186, -0.02521754801273346, 1.9746383428573608, -0.48489323258399963, 0.6091405153274536, -0.3580969572067261, -1.1529759168624878, 0.8676819205284119, -0.31871065497398376, -1.9663894176483154, -0.8093698620796204, -0.7506822943687439, -0.20588651299476624, -0.7362625002861023, 0.837055504322052, -0.25128209590911865, -1.4771584272384644, 0.21573244035243988, -0.6192625164985657, 0.14831700921058655, -1.1841800212860107, 0.29440224170684814, 0.6856604218482971, -0.6679308414459229, 0.15716104209423065, -0.26821261644363403, -1.295359492301941, -0.5529158711433411, 0.41289135813713074, 1.8285059928894043, -0.7149273753166199, 0.9540510773658752, 1.0757603645324707, -0.7488597631454468, 0.04482026398181915, 0.28049319982528687, -0.22573931515216827, 0.837581992149353, -1.0327346324920654, -0.44185271859169006, 1.179891586303711, -0.3319891691207886, -0.7032760977745056, 1.4323256015777588, 0.7675662040710449, -1.0512446165084839, -0.23442324995994568, -0.22847914695739746, -0.8296776413917542, 0.07458370178937912, -1.5882940292358398, -0.1461421698331833, 0.43268004059791565, -1.503720760345459, -0.3843439221382141, -0.18729273974895477, 1.3629850149154663, -0.2151237279176712, 1.396860122680664, -0.34188491106033325, -0.26243507862091064, -0.3123083710670471, -0.4470602571964264, 0.16672246158123016, -0.20881971716880798, -0.5513665676116943, 0.15405911207199097, -0.8409163951873779, 0.3862321674823761, 1.433129072189331, 0.3103678226470947, 0.0660272091627121, 0.34393900632858276, 1.1829134225845337, 0.39502209424972534, 0.002088780514895916, -0.9298103451728821, -1.478036880493164, 2.0159311294555664, -1.4249992370605469, 1.9822489023208618, 0.7403642535209656, -0.07843779027462006, -1.7084964513778687, -1.8316932916641235, 1.361514687538147, 1.1282801628112793, 2.3280410766601562, 0.6148295998573303, 0.35363540053367615, -0.8646279573440552, -0.7174102663993835, 0.31545716524124146, -1.0713728666305542, -0.7050474882125854, 0.18391159176826477, 2.4094064235687256, 1.6926320791244507, -0.391040563583374, -0.18483343720436096, -0.9891868233680725, 1.4231021404266357, -0.13751861453056335, 0.30160149931907654, 2.0290768146514893, -0.28778931498527527, -1.1280794143676758, 1.1689369678497314, -2.3994672298431396, 0.13604766130447388, 2.0397934913635254, 0.27856096625328064, 0.18726131319999695, -1.5100300312042236, -0.6771757006645203, -0.2565793991088867, -0.42777130007743835, -1.1678448915481567, 0.6361441016197205, -0.3019440174102783, -0.7500330209732056, -1.4207874536514282, 0.193144753575325, -1.0891995429992676, -1.777843952178955, 0.2292453497648239, 1.9634963274002075, 2.005486488342285, -0.8199170231819153, 1.5401062965393066, -0.29874834418296814, 0.12431754171848297, 1.387640357017517, 1.2415986061096191, 3.107304096221924, 1.8910269737243652, -1.207932710647583, 0.6025347709655762, -0.20634260773658752, -0.478047251701355, 1.1347675323486328, -1.236379861831665, 1.2773023843765259, -0.17795993387699127, -1.127031683921814, -1.3480366468429565, 0.9972063899040222, 0.4589530825614929, 0.06674717366695404, -0.5174993276596069, 1.1642451286315918, 0.1542341113090515, 1.2920504808425903, 0.5319098830223083, -0.3484328091144562, 0.6260634660720825, -0.46385785937309265, -0.5630483627319336, 1.6241493225097656, 0.1897856444120407, -1.396691083908081, -2.2867157459259033, -0.28377917408943176, -0.8187611103057861, 0.00619396660476923, -0.5296194553375244, -0.9713859558105469, 1.6028296947479248, 0.3591744601726532, -1.362776279449463, -0.19188228249549866, -0.3471614718437195, -0.5874541997909546, 2.7468841075897217, -1.3357329368591309, -0.18742157518863678, -0.9536123275756836, -0.6682766675949097, 1.6216083765029907, -1.1655652523040771, -0.23502859473228455, -0.9734199643135071, -0.5627971291542053, -1.359963059425354, -0.48684000968933105, -0.004038939252495766, -0.8923028111457825, 0.8047470450401306, 0.2252839356660843, -1.149185299873352, -0.4115912914276123, -0.7898063659667969, 0.8706368803977966, -0.1438702642917633, 0.34682416915893555, 1.9128119945526123, 0.38178491592407227, -0.33074018359184265, 0.7429591417312622, 1.058598518371582, 0.6255613565444946, -0.5559054613113403, 0.205025777220726, -0.6453117728233337, 0.3073103725910187, -1.2941721677780151, 0.28789210319519043, -2.8896355628967285, 0.6308825612068176, -0.08127372711896896, -0.1262083798646927, -0.03865309804677963, -1.3534642457962036, 1.0773022174835205, 2.579922676086426, -1.1605336666107178, 0.4434893727302551, 0.3793488144874573, 1.1730290651321411, -1.524863362312317, 0.3018716275691986, -0.37545666098594666, 2.217400312423706, 0.1370675414800644, 1.2931514978408813, -0.4514467418193817, -2.3218252658843994, 0.6328951716423035, -1.2237025499343872, -1.1442691087722778, 0.8129391670227051, -0.7928937077522278, 0.02450735494494438, -1.37653648853302, -0.32671937346458435, -0.9137427806854248, -1.2858386039733887, 0.7914301156997681, 0.19291026890277863, 0.45667794346809387, -0.6557815074920654, 0.3616184592247009, -2.1698200702667236, -1.447543740272522, -0.26588115096092224, -0.9999601244926453, 0.4516741931438446, -0.40542691946029663, 0.6399677395820618, -0.2083517611026764, 0.08195643872022629, 0.3225453197956085, 1.5259461402893066, 3.4584498405456543, 0.2622500956058502, 0.315091997385025, -0.15268473327159882, -0.935494601726532, 1.403006672859192, 0.8983309268951416, -0.14793358743190765, -0.46971267461776733, -1.1092808246612549, 1.1686574220657349, 2.0374138355255127, 0.9379959106445312, 0.008831285871565342, -0.7080488204956055, -0.7940362691879272, 0.004442274570465088, 0.13450977206230164, 0.5332880020141602, 0.7804979085922241, 0.07461360841989517, 0.06498998403549194, 1.324170708656311, 1.2254869937896729, -0.4423634707927704, 0.3696470558643341, -0.8587701320648193, -0.42184337973594666, 0.46032992005348206, 0.27789804339408875, 0.027333062142133713, 0.300604909658432, -0.9790447354316711, -0.18757477402687073, -0.4215233325958252, -0.9306827187538147, -0.8138687610626221, -0.41937005519866943, -0.3472674787044525, 1.6022502183914185, 0.1765775978565216, -0.5577515363693237, -0.01081604789942503, -0.6991003751754761, -0.1799163967370987, -1.0201445817947388, 0.21674123406410217, -0.1758517473936081, -0.11655013263225555, -0.2078079730272293, 1.745242953300476, -1.0472122430801392, -2.0857415199279785, 0.31036028265953064, 0.21078099310398102, -0.3393040895462036, 0.3012511432170868, 1.6762782335281372, 0.4462054967880249, 1.458573341369629, 1.3328416347503662, 0.976701557636261, -0.6640493273735046, -1.3467110395431519, 0.6610552668571472, 0.9187349081039429, -1.4245160818099976, 0.7841514945030212, -0.030915960669517517, -0.40945735573768616, 0.6967625617980957, 1.28513503074646, 0.44671276211738586, -2.0653278827667236, 0.7168489694595337, -0.8792713284492493, 0.7019606232643127, 0.7197275757789612, 0.6976430416107178, 0.15082566440105438, 0.7583142518997192, -1.087923526763916, -1.1617366075515747, -0.742999792098999, -0.7266268134117126, 1.9851609468460083, -0.3170534670352936, 0.6030428409576416, -0.04930386319756508, -1.3240687847137451, -0.15990039706230164, 0.7707197070121765, 0.4696580469608307, -0.5173617601394653, 0.8501834273338318, -0.632463812828064, -1.075128197669983, -1.3402122259140015, -0.465328186750412, -1.0768985748291016, -0.9829732775688171, 0.9482501149177551, 0.7952135801315308, 0.35982879996299744, 1.8664071559906006, 0.6644534468650818, 0.3519100248813629, -2.612529754638672, 0.9681599736213684, 0.33030936121940613, -0.10588768869638443, 0.8726624846458435, 0.3609532117843628, 0.9896512031555176, -0.07094616442918777, 0.5517213344573975, -2.351579427719116, 2.3241593837738037, -0.23900307714939117, 0.7044067978858948, -0.07359233498573303, -0.27178311347961426, 1.1124011278152466, 0.5247039198875427, 0.5644420981407166, -1.1290873289108276, 0.7616748213768005, -0.5906791687011719, 1.1910922527313232, 0.7974154353141785, -0.8354905247688293, -0.06950461864471436, 1.401222825050354, 0.44638803601264954, -0.5052225589752197, -0.8482241034507751, -0.9881015419960022, 0.9072350263595581, 1.7117451429367065, -0.12292236089706421, -0.04625573381781578, 0.8364229202270508, 0.6025856137275696, -1.1961616277694702, 0.13239549100399017, -0.7669398188591003, -0.7380000352859497, 1.6044327020645142, 2.023703098297119, -0.14047430455684662, -0.2181527465581894, -0.8339864611625671, -1.1699812412261963, 0.74192875623703, 0.04988553747534752, -0.03676281496882439, 0.604587972164154, -0.6824315786361694, 1.1021771430969238, 0.896265983581543, 0.9844153523445129, 0.14673581719398499, 0.38289692997932434, 0.396280974149704, -0.3769907057285309, -1.1992799043655396, -0.3681633472442627, -1.1243983507156372, -2.4634063243865967, 0.4377998113632202, -0.18291537463665009, -1.4562419652938843, -0.022608373314142227, -1.0206292867660522, 0.8487154841423035, -0.5554018020629883, -1.1403404474258423, -1.5012744665145874, 0.21760033071041107, -0.11160436272621155, 0.9443958401679993, -1.608002781867981, -0.12149985879659653, 1.2205623388290405, 0.9139921069145203, -0.7149584889411926, 0.9833351969718933, 0.16450215876102448, 1.033347249031067, 0.8543576002120972, -0.3220228850841522, 0.5890389084815979, 0.03231370076537132, -1.342272400856018, 0.4183957874774933, 1.0683499574661255, 0.1804618239402771, 1.4918134212493896, -0.597169816493988, -0.02113308385014534, 0.40169814229011536, -0.5819008350372314, -0.4810602068901062, -0.5314281582832336, 0.7718981504440308, 0.02198115736246109, -0.8362018465995789, 0.16244952380657196, -0.04416511580348015, -0.13293704390525818, 0.1728450506925583, -1.5206154584884644, -0.24139857292175293, -0.3363911807537079, -0.4971294105052948, -1.2355836629867554, -0.03288961201906204, 1.3972444534301758, -0.64493727684021, -0.23419232666492462, 0.5207862854003906, 0.4194463789463043, 0.4586171805858612, 0.5799282789230347, -0.6329874992370605, -0.34718477725982666, -0.3049260675907135, -0.2708732783794403, 0.4652559757232666, 1.2809172868728638, -0.06025015190243721, -0.943199634552002, 0.777810275554657, -0.4050237834453583, 0.04374796524643898, 1.9442499876022339, 0.06918647885322571, -0.8112660646438599, 0.38460347056388855, -0.7700484991073608, 1.9153352975845337, 1.8219677209854126, 1.2335972785949707, -0.09180434793233871, -1.0184193849563599, 0.6912527680397034, -0.41252952814102173, -0.383395791053772, 0.9884694218635559, 0.37417760491371155, -0.23637151718139648, -1.3600810766220093, 0.7161628603935242, 1.246931791305542, -0.8465113043785095, -0.8017972111701965, 0.20092138648033142, -0.75722336769104, 1.0601038932800293, 0.6631737351417542, 0.42183613777160645, 0.20729030668735504, 1.6077758073806763, 0.8938581347465515, -0.37974977493286133, 0.5771605968475342, 0.47560253739356995, -0.17691487073898315, -2.14745831489563, -1.2434316873550415, 0.3296203911304474, -0.5669814944267273, -1.5399328470230103, 1.4185431003570557, -1.1530423164367676, -0.9331060647964478, 0.5822722911834717, 0.0192861407995224, 1.384873867034912, 0.22917510569095612, 1.6189682483673096, 2.1373074054718018, 0.8920894861221313, 0.4358062148094177, 1.3815969228744507, -0.1861761212348938, -0.5363591909408569, 1.8343793153762817, -0.5528678297996521, 0.40278682112693787, 1.153788685798645, -0.3373779058456421, -1.052013874053955, -0.8402498364448547, -1.182985782623291, -0.6464058756828308, 1.1180899143218994, 0.05501549318432808, -1.0821982622146606, 0.2920272648334503, 1.5925506353378296, 0.09120141714811325, -0.29642438888549805, 0.6134529113769531, 0.38935473561286926, -0.852063775062561, -0.07778209447860718, -0.89177006483078, 0.5129472613334656, -0.223809614777565, -0.31207624077796936, 0.4032736122608185, 0.28657418489456177, 1.3047174215316772, -0.028905589133501053, 0.11664952337741852, 1.0572489500045776, -1.4554507732391357, 1.5480281114578247, -0.6348505616188049, 0.33854249119758606, -2.3216326236724854, 1.302514910697937, -0.7679077386856079, 1.94546377658844, -2.577755928039551, 0.3556583523750305, -0.6077678203582764, -0.5568020939826965, 0.33429789543151855, -0.3507252037525177, 0.09344292432069778, -0.1303185671567917, -1.0821248292922974, -0.07266698032617569, -0.7608790993690491, 0.6261148452758789, 1.0981413125991821, 1.427298903465271, -1.0894979238510132, -0.25012683868408203, -1.7835958003997803, -0.158819317817688, -0.6862397193908691, 0.40168264508247375, -2.009874105453491, -0.1774936318397522, -1.8942265510559082, -2.323918581008911, -1.3071774244308472, -0.7976900339126587, 0.9685150980949402, 0.12223304808139801, -0.8546804189682007, 1.2213261127471924, -0.3483361005783081, -1.8671469688415527, 1.0774974822998047, -2.0794010162353516 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
This has so much potential to be great! Also I think you tagged some poor random dude on the internet whose name is also Joao, lol, edited that for you!
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
30
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data This has so much potential to be great! Also I think you tagged some poor random dude on the internet whose name is also Joao, lol, edited that for you!
[ -1.221340298652649, -0.9479671716690063, -0.7303358316421509, 1.4038046598434448, -0.14695119857788086, -1.1842471361160278, 0.048447344452142715, -1.166764736175537, 1.6695853471755981, -0.7684126496315002, 0.3287583887577057, -1.648667335510254, 0.04548131674528122, -0.6078303456306458, -0.7515771985054016, -0.8807715177536011, -0.4005546271800995, -0.8345804214477539, 1.0556190013885498, 2.5234012603759766, 1.1926898956298828, -1.4505255222320557, 2.681196689605713, 0.7247490882873535, -0.2556975185871124, -1.0008716583251953, 0.5116182565689087, 0.08570756763219833, -1.2029706239700317, -0.4812586009502411, -0.8667359352111816, -0.07702381908893585, -0.5716754794120789, -0.4205799996852875, -0.053397294133901596, 0.30442628264427185, -0.21969370543956757, -0.3098955750465393, -0.5596721172332764, -0.7396039962768555, 0.4675635099411011, -0.38683921098709106, 1.0080009698867798, -0.2754732072353363, 1.8860074281692505, -0.49671727418899536, 0.40960484743118286, 0.7050783038139343, 1.3418128490447998, 0.19504785537719727, 0.0033703548833727837, 0.26499679684638977, 0.38946670293807983, -0.11304815113544464, 0.4467097222805023, 1.1132721900939941, 0.7086302042007446, 0.44384461641311646, 0.6811054348945618, -2.1951942443847656, 1.32286536693573, -1.0893443822860718, 0.28444212675094604, 1.3767592906951904, -0.9138391613960266, 0.4282081723213196, -1.7503021955490112, -0.12673062086105347, 0.6379343271255493, -2.2783541679382324, 0.2366594523191452, -1.2844462394714355, -0.5710512399673462, 0.9345123767852783, 0.27317363023757935, -1.2354682683944702, 0.31088972091674805, -0.41117700934410095, 1.0404627323150635, 0.4501570761203766, 1.221526861190796, -1.7122337818145752, 0.021053485572338104, -0.3395977020263672, 0.10121297091245651, -1.3462597131729126, -1.4596843719482422, 0.5374038815498352, 0.6370440125465393, 0.5325372219085693, -0.05812622606754303, 0.9865257143974304, -1.0180442333221436, 0.8318431377410889, -1.0066707134246826, -1.5881612300872803, -1.4259685277938843, -2.27836275100708, -2.3042008876800537, 0.8058352470397949, -0.47563061118125916, -0.6188593506813049, 2.05631947517395, -1.0636714696884155, -1.7308534383773804, 1.2304997444152832, 0.3598797917366028, -0.03813711926341057, 2.4555325508117676, 0.12519294023513794, -0.6937381029129028, 0.3933770954608917, -0.773627758026123, 0.8399397134780884, -0.42679575085639954, 1.4080595970153809, 0.44986972212791443, -1.0605310201644897, 1.5674784183502197, -0.457977294921875, 0.5245736837387085, -0.6577262282371521, -0.6048881411552429, -0.803035318851471, 0.3961043655872345, 1.8948661088943481, -0.3009057939052582, 1.5968464612960815, -0.4218589663505554, -1.4964038133621216, -1.5548474788665771, 0.8719101548194885, 0.5205129384994507, -0.8912718892097473, 0.06623013317584991, -0.3750917911529541, 0.13543091714382172, 0.0056121014058589935, 1.0529361963272095, 1.2400380373001099, 0.5812705159187317, -0.3081572651863098, -0.868962287902832, 0.1937267780303955, -0.17465569078922272, -0.6994032859802246, -1.8803731203079224, -0.28525683283805847, 0.16915184259414673, 0.5936353802680969, -1.283666968345642, 1.7435919046401978, 0.9369273781776428, 1.9912358522415161, 0.9470720291137695, -0.3281291723251343, 1.4980897903442383, -0.011501814238727093, 1.7779971361160278, -0.47042033076286316, 0.7356396913528442, -0.3816163241863251, -1.1291221380233765, 0.7982752323150635, -0.34860867261886597, -1.9909197092056274, -0.7965562343597412, -0.8325924277305603, -0.26395484805107117, -0.761711835861206, 0.8734683394432068, -0.22367334365844727, -1.3508503437042236, 0.29220056533813477, -0.6220202445983887, 0.1760171502828598, -1.2038772106170654, 0.3788442611694336, 0.7085037231445312, -0.6120398640632629, -0.004961423575878143, -0.21156413853168488, -1.2851611375808716, -0.4696718454360962, 0.25191280245780945, 1.8501808643341064, -0.7745686173439026, 0.8959771394729614, 1.0668675899505615, -0.6373479962348938, 0.008380611427128315, 0.3131571412086487, -0.33013254404067993, 0.8409616351127625, -1.0094269514083862, -0.4315328001976013, 1.1766114234924316, -0.21440553665161133, -0.5904695391654968, 1.4597606658935547, 0.7370741963386536, -0.979641318321228, -0.24205832183361053, -0.1938943862915039, -0.7965123057365417, 0.03260207176208496, -1.6403628587722778, -0.18566842377185822, 0.2970094084739685, -1.5110759735107422, -0.4282311797142029, -0.24482697248458862, 1.345572829246521, -0.2358972430229187, 1.4649720191955566, -0.3880411982536316, -0.12607130408287048, -0.39849427342414856, -0.4143868386745453, 0.21079833805561066, -0.1812359243631363, -0.6038799285888672, 0.26921138167381287, -0.7717467546463013, 0.4089076817035675, 1.3854326009750366, 0.3454958498477936, 0.04843774810433388, 0.35232776403427124, 1.0680193901062012, 0.37961238622665405, -0.06349676102399826, -0.8731057047843933, -1.5339488983154297, 2.006298780441284, -1.502829909324646, 2.0418567657470703, 0.8815726041793823, 0.07476335763931274, -1.7387783527374268, -1.8424882888793945, 1.3517911434173584, 1.1890450716018677, 2.259796619415283, 0.5727388858795166, 0.3648180663585663, -0.8221175670623779, -0.5358834862709045, 0.3510456681251526, -1.0898606777191162, -0.664251446723938, 0.11839161068201065, 2.3623552322387695, 1.7414979934692383, -0.4878494441509247, -0.16005884110927582, -0.9798582792282104, 1.370648980140686, -0.12160918861627579, 0.21783459186553955, 2.093595027923584, -0.3030579090118408, -1.1563830375671387, 1.2317633628845215, -2.4356141090393066, 0.09324628859758377, 1.9214569330215454, 0.30241695046424866, 0.11873399466276169, -1.3637962341308594, -0.5514796376228333, -0.32127633690834045, -0.4469088912010193, -1.1544996500015259, 0.561581552028656, -0.25624603033065796, -0.8366841673851013, -1.5059423446655273, 0.20595169067382812, -1.2260711193084717, -1.589082956314087, 0.3867311179637909, 1.8784751892089844, 2.0488240718841553, -0.7906920909881592, 1.5218923091888428, -0.30780544877052307, 0.13713963329792023, 1.2258793115615845, 1.2172778844833374, 3.1180500984191895, 1.9017016887664795, -1.3074758052825928, 0.5001660585403442, -0.20900535583496094, -0.5033404231071472, 1.1211141347885132, -1.0994212627410889, 1.286263108253479, -0.06475890427827835, -1.1569044589996338, -1.2669572830200195, 0.9452266097068787, 0.502360463142395, 0.08378767222166061, -0.5841967463493347, 1.124417781829834, 0.10070739686489105, 1.3575741052627563, 0.4505029022693634, -0.3305310308933258, 0.5390905737876892, -0.4620211124420166, -0.5361248850822449, 1.5973823070526123, 0.12693500518798828, -1.4370366334915161, -2.319833278656006, -0.2359103411436081, -0.78181391954422, 0.020492058247327805, -0.6449528336524963, -0.9768855571746826, 1.609023928642273, 0.33397653698921204, -1.3545352220535278, -0.2551138401031494, -0.34228649735450745, -0.5444673895835876, 2.6499481201171875, -1.4346790313720703, -0.22736366093158722, -0.9557114243507385, -0.6113802194595337, 1.6283310651779175, -1.1622945070266724, -0.23240874707698822, -0.96580970287323, -0.5932007431983948, -1.269727349281311, -0.5169875025749207, -0.0071746353060007095, -0.9413203597068787, 0.7287506461143494, 0.2685924768447876, -1.1010079383850098, -0.3840877115726471, -0.8438299298286438, 0.8801800012588501, -0.09169802069664001, 0.2895011305809021, 1.8443443775177002, 0.3998410701751709, -0.41017505526542664, 0.670667290687561, 1.209035873413086, 0.6012539863586426, -0.6484529972076416, 0.17256894707679749, -0.7560935616493225, 0.32474544644355774, -1.3295918703079224, 0.3231084942817688, -2.9078354835510254, 0.6527731418609619, -0.009981436654925346, -0.07765602320432663, 0.07022469490766525, -1.3468459844589233, 1.1691668033599854, 2.6675236225128174, -1.1253180503845215, 0.4352913796901703, 0.3203953802585602, 1.1756497621536255, -1.5913273096084595, 0.3702123463153839, -0.40925949811935425, 2.1895105838775635, 0.2011435180902481, 1.2454854249954224, -0.5104997754096985, -2.363776683807373, 0.5548622012138367, -1.230316400527954, -1.184613585472107, 0.7735379338264465, -0.9625999331474304, 0.021529223769903183, -1.4685367345809937, -0.2376437783241272, -0.9074443578720093, -1.2335233688354492, 0.7770100831985474, 0.15822595357894897, 0.49934589862823486, -0.6672738790512085, 0.3277580142021179, -2.235473394393921, -1.3508586883544922, -0.20413215458393097, -0.9380695223808289, 0.4430393874645233, -0.3092365860939026, 0.5913727879524231, -0.09888353943824768, 0.08627526462078094, 0.2963288128376007, 1.3911967277526855, 3.361966848373413, 0.26598429679870605, 0.48630261421203613, -0.17320971190929413, -0.9446898102760315, 1.376744031906128, 0.8989260196685791, -0.10377126932144165, -0.561062216758728, -1.0092123746871948, 1.238608479499817, 1.9596211910247803, 0.9780488610267639, 0.05362492799758911, -0.7595269680023193, -0.6483166217803955, -0.011031119152903557, 0.23556086421012878, 0.4988684058189392, 0.9081516861915588, -0.03387914225459099, 0.1324755996465683, 1.3610451221466064, 1.2631750106811523, -0.5359705090522766, 0.35676613450050354, -0.8481718897819519, -0.41434183716773987, 0.39688995480537415, 0.28215739130973816, 0.0109710106626153, 0.4483242332935333, -0.8773086071014404, -0.2726339101791382, -0.3907459080219269, -0.9245935678482056, -0.7217230796813965, -0.4360025227069855, -0.3602335453033447, 1.662705659866333, 0.12618134915828705, -0.43610069155693054, 0.018126584589481354, -0.784221887588501, -0.12116371095180511, -1.0880547761917114, 0.2023645043373108, -0.020849965512752533, -0.06028590351343155, -0.07626109570264816, 1.8368829488754272, -0.9492964744567871, -2.0376696586608887, 0.26041263341903687, 0.18960510194301605, -0.3605985939502716, 0.2042512148618698, 1.7358731031417847, 0.4410203695297241, 1.4897781610488892, 1.2519378662109375, 0.9853178262710571, -0.6303454041481018, -1.3288233280181885, 0.7743164300918579, 0.987799346446991, -1.3683233261108398, 0.8813520073890686, 0.07011588662862778, -0.5083978176116943, 0.7102190256118774, 1.2225381135940552, 0.46492743492126465, -2.0681345462799072, 0.8897616267204285, -1.0064791440963745, 0.8164037466049194, 0.7040574550628662, 0.6981894969940186, 0.22739997506141663, 0.8674350380897522, -1.206903338432312, -1.1554046869277954, -0.76563960313797, -0.6390446424484253, 2.020251989364624, -0.21952912211418152, 0.5700287222862244, -0.11967838555574417, -1.2952882051467896, -0.06665543466806412, 0.7114881873130798, 0.3645816743373871, -0.39787572622299194, 0.8476718664169312, -0.6972061991691589, -1.1396516561508179, -1.4650843143463135, -0.36423754692077637, -0.971035361289978, -0.8617675304412842, 1.095402717590332, 0.8410064578056335, 0.20144346356391907, 1.8887522220611572, 0.6266196370124817, 0.2816535234451294, -2.6863796710968018, 1.0058170557022095, 0.29552075266838074, -0.17447833716869354, 0.8813517689704895, 0.3473282754421234, 0.9953288435935974, 0.10227179527282715, 0.4520675539970398, -2.444183588027954, 2.275036096572876, -0.2767294645309448, 0.7501846551895142, 0.01766234263777733, -0.12972275912761688, 1.085296630859375, 0.5211888551712036, 0.5568780303001404, -1.1204712390899658, 0.6866414546966553, -0.5366674065589905, 1.1870440244674683, 0.9827240109443665, -0.7874540686607361, -0.059251103550195694, 1.3373888731002808, 0.4963642358779907, -0.5409038066864014, -0.848404586315155, -0.9354546070098877, 0.8889430165290833, 1.739694356918335, -0.09703932702541351, -0.01868385076522827, 0.7797768115997314, 0.6935264468193054, -1.2664637565612793, 0.09449834376573563, -0.7452498078346252, -0.8538201451301575, 1.5588890314102173, 2.054513692855835, -0.09351601451635361, -0.23817627131938934, -0.7387089729309082, -1.2381447553634644, 0.7911005616188049, -0.08028616011142731, 0.23015710711479187, 0.5592549443244934, -0.6938738822937012, 1.1514482498168945, 0.9470422267913818, 0.9208773374557495, 0.2148972451686859, 0.20647089183330536, 0.4141792953014374, -0.32737332582473755, -1.0406163930892944, -0.2244357317686081, -1.0501106977462769, -2.563171148300171, 0.47422534227371216, -0.2222670465707779, -1.380143642425537, 0.003413332626223564, -1.0203560590744019, 0.897851288318634, -0.5482420921325684, -1.0338340997695923, -1.6096179485321045, 0.215112566947937, -0.12946929037570953, 0.9636460542678833, -1.6815797090530396, -0.13449954986572266, 1.1965687274932861, 0.8763507604598999, -0.6047216057777405, 1.0733838081359863, 0.20454064011573792, 1.0170869827270508, 0.9109901785850525, -0.431990385055542, 0.5177700519561768, 0.0782269760966301, -1.3488576412200928, 0.4456983208656311, 1.112514853477478, 0.17489342391490936, 1.3541240692138672, -0.5174556374549866, 0.027332283556461334, 0.38631993532180786, -0.5656948089599609, -0.47505831718444824, -0.5017223954200745, 0.7329976558685303, 0.1020279973745346, -0.9222851395606995, 0.040546949952840805, -0.16906318068504333, -0.24444982409477234, 0.1516023874282837, -1.5561950206756592, -0.2922166585922241, -0.3920304775238037, -0.530473530292511, -1.2835748195648193, -0.04786594212055206, 1.440305471420288, -0.7349523901939392, -0.16798308491706848, 0.5219576954841614, 0.5168706178665161, 0.5007678866386414, 0.6740169525146484, -0.6444933414459229, -0.4039615988731384, -0.23017765581607819, -0.32006868720054626, 0.30684635043144226, 1.3292759656906128, -0.07920915633440018, -0.892641007900238, 0.6725307703018188, -0.3219479024410248, 0.09134852886199951, 1.984450340270996, 0.13970446586608887, -0.8247641921043396, 0.36401185393333435, -0.751054584980011, 1.8812506198883057, 1.7369604110717773, 1.3466001749038696, -0.11154888570308685, -0.9971388578414917, 0.6663834452629089, -0.33225151896476746, -0.30320343375205994, 0.9356606006622314, 0.4512057602405548, -0.21073338389396667, -1.3838485479354858, 0.5214837193489075, 1.3021303415298462, -0.8567940592765808, -0.731594979763031, 0.046498432755470276, -0.811257541179657, 1.0543079376220703, 0.6318212747573853, 0.3561190962791443, 0.19985932111740112, 1.5084294080734253, 0.748226523399353, -0.5339778661727905, 0.5037307739257812, 0.4792172312736511, -0.18453143537044525, -2.149791717529297, -1.115634799003601, 0.2900586724281311, -0.4133543372154236, -1.5114398002624512, 1.4371426105499268, -1.1084601879119873, -0.9782716631889343, 0.5105745792388916, 0.013990824110805988, 1.4224464893341064, 0.34890681505203247, 1.5643357038497925, 2.1775944232940674, 0.8771886229515076, 0.3290223181247711, 1.364225149154663, -0.1975555270910263, -0.4350361227989197, 1.8372406959533691, -0.44443225860595703, 0.39865222573280334, 1.0967352390289307, -0.3253309428691864, -1.0058581829071045, -0.8063121438026428, -1.1678178310394287, -0.6868597269058228, 1.185699701309204, 0.09365611523389816, -1.041519045829773, 0.2534952163696289, 1.6429773569107056, 0.09583953022956848, -0.37389644980430603, 0.529496967792511, 0.4745315611362457, -0.7678567171096802, -0.11806356906890869, -0.9461065530776978, 0.552377462387085, -0.137139692902565, -0.3004114031791687, 0.39049002528190613, 0.3970305025577545, 1.2245854139328003, 0.02893935516476631, 0.1413837969303131, 1.1073154211044312, -1.451244592666626, 1.4898309707641602, -0.5937308073043823, 0.2723976969718933, -2.3629708290100098, 1.4355674982070923, -0.6516374349594116, 1.9826374053955078, -2.638550043106079, 0.37643247842788696, -0.6715434789657593, -0.4904840588569641, 0.31905099749565125, -0.35596001148223877, 0.20150478184223175, -0.1751386672258377, -1.0775964260101318, -0.10053852945566177, -0.7018745541572571, 0.5453178286552429, 1.0319976806640625, 1.2352652549743652, -1.0951815843582153, -0.3427668511867523, -1.6884807348251343, -0.1824246048927307, -0.7298864722251892, 0.24582448601722717, -2.0426738262176514, -0.22049017250537872, -1.9558731317520142, -2.3807785511016846, -1.4098140001296997, -0.8122854828834534, 1.0843737125396729, 0.10515014082193375, -0.9226969480514526, 1.1509133577346802, -0.3921407461166382, -1.813900351524353, 1.1124294996261597, -2.0521292686462402 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
Noted and I will look into the thread in detail tomorrow once I log back in.
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
16
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data Noted and I will look into the thread in detail tomorrow once I log back in.
[ -1.2228223085403442, -0.9362594485282898, -0.7108774781227112, 1.4071484804153442, -0.16012239456176758, -1.199553370475769, 0.043341562151908875, -1.1648637056350708, 1.6629852056503296, -0.7897204756736755, 0.3131258189678192, -1.653140664100647, 0.04416121542453766, -0.6183609366416931, -0.7454644441604614, -0.9126310348510742, -0.41936764121055603, -0.8211142420768738, 1.0390887260437012, 2.5136513710021973, 1.1931902170181274, -1.457802653312683, 2.6804862022399902, 0.7321663498878479, -0.2654656767845154, -1.0223437547683716, 0.5101832747459412, 0.1016656756401062, -1.2055054903030396, -0.4744991660118103, -0.868441641330719, -0.0726315900683403, -0.5779616832733154, -0.44369110465049744, -0.06465170532464981, 0.29864928126335144, -0.21791382133960724, -0.32118457555770874, -0.5468776226043701, -0.7622238397598267, 0.49171990156173706, -0.38914623856544495, 0.9933364391326904, -0.2952174246311188, 1.8762027025222778, -0.49817124009132385, 0.4425470530986786, 0.7014335989952087, 1.356736660003662, 0.20252320170402527, 0.0012287097051739693, 0.27969634532928467, 0.38417625427246094, -0.12125038355588913, 0.45106515288352966, 1.104852557182312, 0.7032826542854309, 0.4232202172279358, 0.6567179560661316, -2.194302797317505, 1.3221529722213745, -1.0566582679748535, 0.2829141616821289, 1.3732976913452148, -0.9218019247055054, 0.416636198759079, -1.7545522451400757, -0.14878079295158386, 0.6390339732170105, -2.2747092247009277, 0.22608688473701477, -1.294686198234558, -0.5745407342910767, 0.9269237518310547, 0.26757892966270447, -1.2234927415847778, 0.30126339197158813, -0.4263925552368164, 1.0346808433532715, 0.4796289801597595, 1.2111153602600098, -1.6925612688064575, 0.013667010702192783, -0.32470211386680603, 0.09885813295841217, -1.3264347314834595, -1.4365315437316895, 0.5280882120132446, 0.649939775466919, 0.522284209728241, -0.05062418058514595, 0.981210470199585, -1.0077040195465088, 0.8434848785400391, -0.9976609349250793, -1.6030832529067993, -1.4097404479980469, -2.276034355163574, -2.3109986782073975, 0.8143066167831421, -0.46312910318374634, -0.6214116215705872, 2.0726146697998047, -1.065491795539856, -1.7358355522155762, 1.2514971494674683, 0.3224058747291565, -0.03327159211039543, 2.4419004917144775, 0.12216882407665253, -0.7129271030426025, 0.38419318199157715, -0.7639486789703369, 0.817317545413971, -0.4507843852043152, 1.427869200706482, 0.4374294579029083, -1.0570136308670044, 1.5776628255844116, -0.4513224959373474, 0.5235466957092285, -0.6878625750541687, -0.6067374348640442, -0.7974478006362915, 0.40336424112319946, 1.8972439765930176, -0.3239033818244934, 1.5958741903305054, -0.3955015540122986, -1.4951180219650269, -1.5321006774902344, 0.8557457327842712, 0.5277401208877563, -0.881709635257721, 0.07296190410852432, -0.3678324222564697, 0.1321699321269989, 0.026637807488441467, 1.0152112245559692, 1.2316242456436157, 0.5973681807518005, -0.3078016936779022, -0.8810144066810608, 0.20304270088672638, -0.1638997495174408, -0.6985143423080444, -1.8775168657302856, -0.28240472078323364, 0.16986553370952606, 0.599233090877533, -1.30753493309021, 1.7390110492706299, 0.9308593273162842, 2.0163519382476807, 0.94230717420578, -0.33662232756614685, 1.491452693939209, -0.016418104991316795, 1.7920602560043335, -0.44738224148750305, 0.7605024576187134, -0.3646325170993805, -1.1350518465042114, 0.7994024157524109, -0.33526232838630676, -1.9969840049743652, -0.7861661314964294, -0.8540506958961487, -0.23862338066101074, -0.7609354257583618, 0.86832594871521, -0.22866113483905792, -1.3409008979797363, 0.3019513189792633, -0.6179348826408386, 0.19845955073833466, -1.2080239057540894, 0.3798425495624542, 0.7009180188179016, -0.6063635945320129, 0.005454495549201965, -0.23479725420475006, -1.285079002380371, -0.4543854296207428, 0.2567165195941925, 1.8517481088638306, -0.8046252727508545, 0.8812486529350281, 1.0615863800048828, -0.6277109384536743, 0.016637615859508514, 0.30634748935699463, -0.30600109696388245, 0.8582199811935425, -1.0185787677764893, -0.41894325613975525, 1.2008272409439087, -0.22756259143352509, -0.5913812518119812, 1.4692986011505127, 0.767154335975647, -0.9929494261741638, -0.2375134974718094, -0.20034287869930267, -0.7938545942306519, 0.028387241065502167, -1.643371820449829, -0.17062662541866302, 0.2843179404735565, -1.5110143423080444, -0.42687591910362244, -0.24461862444877625, 1.3526952266693115, -0.20166900753974915, 1.499189019203186, -0.40160220861434937, -0.1510661095380783, -0.41431188583374023, -0.4354464113712311, 0.21678777039051056, -0.19483649730682373, -0.6132135391235352, 0.2857784926891327, -0.7607734799385071, 0.40098267793655396, 1.3655357360839844, 0.3462623655796051, 0.040160082280635834, 0.3729635179042816, 1.054762840270996, 0.35166463255882263, -0.07706145942211151, -0.8615126013755798, -1.546102523803711, 2.0154218673706055, -1.4852298498153687, 2.0390357971191406, 0.8636419177055359, 0.09442943334579468, -1.7352577447891235, -1.8548784255981445, 1.3337914943695068, 1.1874713897705078, 2.258183717727661, 0.5828506946563721, 0.3621920347213745, -0.8341525793075562, -0.5362811088562012, 0.34075412154197693, -1.1041561365127563, -0.6657155752182007, 0.1058504730463028, 2.344646692276001, 1.7546755075454712, -0.4756244421005249, -0.16612383723258972, -0.9869621396064758, 1.3719301223754883, -0.11194655299186707, 0.21885573863983154, 2.0813820362091064, -0.3186863958835602, -1.1598763465881348, 1.2219175100326538, -2.4372262954711914, 0.06329435110092163, 1.9313963651657104, 0.2954444885253906, 0.11043194681406021, -1.3622461557388306, -0.5666203498840332, -0.3241903781890869, -0.45299720764160156, -1.1479533910751343, 0.547077476978302, -0.2727547883987427, -0.816969096660614, -1.508229374885559, 0.20905838906764984, -1.191296935081482, -1.592000126838684, 0.38907498121261597, 1.8641390800476074, 2.0294241905212402, -0.801372230052948, 1.5222043991088867, -0.31132441759109497, 0.17642885446548462, 1.230109691619873, 1.215646743774414, 3.1278529167175293, 1.9382673501968384, -1.3121147155761719, 0.5160107612609863, -0.20910316705703735, -0.48232778906822205, 1.111366868019104, -1.114229679107666, 1.2788316011428833, -0.09211774170398712, -1.1713112592697144, -1.2595007419586182, 0.9391080141067505, 0.49092191457748413, 0.09992244094610214, -0.6007481217384338, 1.1172884702682495, 0.09466017037630081, 1.3894239664077759, 0.426369845867157, -0.330837219953537, 0.5439552664756775, -0.4640149772167206, -0.5334673523902893, 1.5907206535339355, 0.13786855340003967, -1.4340277910232544, -2.3183226585388184, -0.2259395718574524, -0.7636961936950684, -0.0057607367634773254, -0.6357143521308899, -0.9741525650024414, 1.6282435655593872, 0.35018256306648254, -1.3374805450439453, -0.2565331757068634, -0.32445237040519714, -0.5213460922241211, 2.634202480316162, -1.4462815523147583, -0.24759751558303833, -0.955720067024231, -0.6108356714248657, 1.6389832496643066, -1.1436004638671875, -0.21709199249744415, -0.9356033205986023, -0.5846377015113831, -1.269889235496521, -0.5207088589668274, -0.012443911284208298, -0.9426364898681641, 0.7289940714836121, 0.2712152600288391, -1.102347731590271, -0.3567126989364624, -0.8552054762840271, 0.8943814039230347, -0.08824580907821655, 0.27770566940307617, 1.853176236152649, 0.40850281715393066, -0.39522960782051086, 0.6754536032676697, 1.2043641805648804, 0.6075380444526672, -0.6449532508850098, 0.1459810882806778, -0.7728159427642822, 0.31727904081344604, -1.3357150554656982, 0.30822038650512695, -2.919410467147827, 0.6453076601028442, -0.0023721489124000072, -0.05703644081950188, 0.06075422465801239, -1.3436685800552368, 1.1592185497283936, 2.6806771755218506, -1.126604437828064, 0.4420235753059387, 0.33641836047172546, 1.188469648361206, -1.574479579925537, 0.35973918437957764, -0.4025508463382721, 2.174863576889038, 0.19652535021305084, 1.261583685874939, -0.5000166296958923, -2.3541529178619385, 0.5697486996650696, -1.2382334470748901, -1.1846740245819092, 0.7826026082038879, -0.9478698372840881, 0.02119213342666626, -1.445427656173706, -0.21955803036689758, -0.882156491279602, -1.2243133783340454, 0.765964686870575, 0.16320936381816864, 0.4989504814147949, -0.6815654635429382, 0.31852245330810547, -2.227468967437744, -1.32877779006958, -0.22911407053470612, -0.9516785144805908, 0.4246428310871124, -0.3120342195034027, 0.5848984122276306, -0.10035090148448944, 0.09463569521903992, 0.2872406244277954, 1.3888179063796997, 3.361510753631592, 0.266962468624115, 0.472776859998703, -0.15338119864463806, -0.9361425042152405, 1.39460289478302, 0.8855236768722534, -0.12338002026081085, -0.546599805355072, -1.0003533363342285, 1.2247921228408813, 1.9452494382858276, 0.9927082061767578, 0.07675445824861526, -0.7694740295410156, -0.6595442891120911, -0.01140089426189661, 0.2392844259738922, 0.5011273622512817, 0.9068092107772827, -0.0654994323849678, 0.11146394908428192, 1.379164695739746, 1.2780263423919678, -0.54542475938797, 0.3506610691547394, -0.8666470050811768, -0.4202114939689636, 0.4118901789188385, 0.3013303875923157, 0.013595427386462688, 0.42922714352607727, -0.8852217793464661, -0.23217225074768066, -0.39148786664009094, -0.9113864898681641, -0.7103829979896545, -0.43283170461654663, -0.34566962718963623, 1.6599098443984985, 0.13513869047164917, -0.4406035542488098, 0.016325242817401886, -0.7608759999275208, -0.11521166563034058, -1.0612070560455322, 0.23065698146820068, -0.00555267371237278, -0.046623777598142624, -0.0722750574350357, 1.8388980627059937, -0.9667340517044067, -2.0551908016204834, 0.259732186794281, 0.1714070588350296, -0.37749701738357544, 0.19208285212516785, 1.7250466346740723, 0.4311104118824005, 1.5056309700012207, 1.2703826427459717, 0.9931879043579102, -0.6495426297187805, -1.3276251554489136, 0.7679688930511475, 0.9849185943603516, -1.3749736547470093, 0.8627328276634216, 0.09451267868280411, -0.5157974362373352, 0.6949227452278137, 1.224149227142334, 0.4578278660774231, -2.0684561729431152, 0.8814913034439087, -0.9971370100975037, 0.7981780767440796, 0.7163312435150146, 0.7170430421829224, 0.23387698829174042, 0.866181492805481, -1.200547456741333, -1.146407961845398, -0.7849262952804565, -0.6310153007507324, 2.024048328399658, -0.23528634011745453, 0.56396484375, -0.12168273329734802, -1.2960630655288696, -0.05081756412982941, 0.7266947627067566, 0.3527718186378479, -0.3822685480117798, 0.8446917533874512, -0.6942044496536255, -1.1605879068374634, -1.4679003953933716, -0.37949177622795105, -0.9670494198799133, -0.8863101601600647, 1.1097702980041504, 0.8275139331817627, 0.21322670578956604, 1.8976562023162842, 0.6343947649002075, 0.26932084560394287, -2.6775593757629395, 1.0012118816375732, 0.2877199649810791, -0.17516633868217468, 0.8819869756698608, 0.32164666056632996, 0.9702536463737488, 0.0983782559633255, 0.43989238142967224, -2.437220811843872, 2.2570297718048096, -0.28837791085243225, 0.7462860941886902, 0.017181668430566788, -0.11712352186441422, 1.07815682888031, 0.5017061829566956, 0.5651261210441589, -1.1232025623321533, 0.6968000531196594, -0.5362206697463989, 1.1806944608688354, 0.9618170857429504, -0.7690958976745605, -0.06798338890075684, 1.3235111236572266, 0.5000584125518799, -0.5375373363494873, -0.855526864528656, -0.9454483389854431, 0.8825101256370544, 1.7361069917678833, -0.11538376659154892, -0.031248968094587326, 0.7707018256187439, 0.705673098564148, -1.272542953491211, 0.06655991077423096, -0.7557215094566345, -0.8340967297554016, 1.5737152099609375, 2.052114725112915, -0.09204260259866714, -0.2362414300441742, -0.7619355916976929, -1.2388910055160522, 0.7929748892784119, -0.07652579247951508, 0.21603305637836456, 0.5784965753555298, -0.6718153953552246, 1.1749041080474854, 0.9432263970375061, 0.8921524286270142, 0.25045958161354065, 0.19398793578147888, 0.43094027042388916, -0.3235514163970947, -1.034475326538086, -0.22037938237190247, -1.0541647672653198, -2.55271053314209, 0.47042787075042725, -0.2243654429912567, -1.3621282577514648, 0.03170061856508255, -1.0187875032424927, 0.910147488117218, -0.532460629940033, -1.0343283414840698, -1.5845907926559448, 0.22567231953144073, -0.13360564410686493, 0.9503604173660278, -1.6543724536895752, -0.12334836274385452, 1.2428232431411743, 0.8833539485931396, -0.6024668216705322, 1.0820268392562866, 0.20729616284370422, 1.032156229019165, 0.9052566289901733, -0.42040902376174927, 0.5005074739456177, 0.061413586139678955, -1.3422520160675049, 0.44835174083709717, 1.1143471002578735, 0.16140207648277283, 1.3619561195373535, -0.5415593385696411, 0.012014136649668217, 0.3527127504348755, -0.5469500422477722, -0.4914897084236145, -0.5074743032455444, 0.7489033341407776, 0.09031128138303757, -0.9087927341461182, 0.04784543067216873, -0.1940770447254181, -0.2544969618320465, 0.16012540459632874, -1.5559314489364624, -0.2644514739513397, -0.3756185472011566, -0.5255602598190308, -1.2818726301193237, -0.03570709004998207, 1.446203351020813, -0.7520674467086792, -0.1451752781867981, 0.5299606323242188, 0.5004364252090454, 0.5229160785675049, 0.6737547516822815, -0.6519998908042908, -0.40019482374191284, -0.2405458241701126, -0.314186692237854, 0.3319523334503174, 1.3111954927444458, -0.07032384723424911, -0.8994612097740173, 0.6897085309028625, -0.3203945457935333, 0.07476356625556946, 1.9928148984909058, 0.1531415432691574, -0.8263541460037231, 0.3337431252002716, -0.76055508852005, 1.9024958610534668, 1.7310653924942017, 1.3465471267700195, -0.11940037459135056, -1.0052103996276855, 0.6408998370170593, -0.32514333724975586, -0.29328882694244385, 0.9230970740318298, 0.47823265194892883, -0.19854746758937836, -1.3701343536376953, 0.5044214129447937, 1.2925981283187866, -0.843592643737793, -0.7084558010101318, 0.03690598905086517, -0.7995734214782715, 1.0371265411376953, 0.6295477747917175, 0.37210357189178467, 0.19930298626422882, 1.5228246450424194, 0.7633684277534485, -0.5412312746047974, 0.4951505661010742, 0.490092933177948, -0.17570263147354126, -2.138550043106079, -1.1116751432418823, 0.31175655126571655, -0.41122502088546753, -1.5314867496490479, 1.4306597709655762, -1.1385064125061035, -0.9806522727012634, 0.5127411484718323, 0.018712062388658524, 1.437527060508728, 0.33182284235954285, 1.5546903610229492, 2.1614978313446045, 0.8732599020004272, 0.3262290060520172, 1.3538144826889038, -0.1972290277481079, -0.44884535670280457, 1.8322221040725708, -0.4247608780860901, 0.38851305842399597, 1.1043570041656494, -0.32386618852615356, -0.9997941851615906, -0.7943735122680664, -1.1551254987716675, -0.6928702592849731, 1.186004400253296, 0.10618987679481506, -1.0479601621627808, 0.23726622760295868, 1.6294606924057007, 0.10716939717531204, -0.40136751532554626, 0.5124852061271667, 0.4447888433933258, -0.7586253881454468, -0.0902261734008789, -0.9545577168464661, 0.53291916847229, -0.1304665207862854, -0.3146282732486725, 0.38994598388671875, 0.3866705000400543, 1.2477234601974487, 0.03391941636800766, 0.18203584849834442, 1.1338227987289429, -1.4529622793197632, 1.4742531776428223, -0.6141932010650635, 0.2615699768066406, -2.376424789428711, 1.4392507076263428, -0.6891825199127197, 1.9664628505706787, -2.655834674835205, 0.3894892930984497, -0.6374634504318237, -0.46615785360336304, 0.32707464694976807, -0.3694275915622711, 0.20618169009685516, -0.15195971727371216, -1.099679946899414, -0.11277676373720169, -0.7055280804634094, 0.5515714883804321, 1.0242552757263184, 1.214919090270996, -1.101489782333374, -0.34926843643188477, -1.7149579524993896, -0.20074288547039032, -0.7330697774887085, 0.27609527111053467, -2.0448496341705322, -0.2035701423883438, -1.949007272720337, -2.3926875591278076, -1.4141279458999634, -0.8081027865409851, 1.077959656715393, 0.1112496554851532, -0.9361417293548584, 1.1471304893493652, -0.4054994583129883, -1.824015498161316, 1.1476068496704102, -2.0842647552490234 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
@lhoestq I have used TFRecords with `tf.data` for both vision and text and I can say that they are quite performant. I haven't worked with Feather yet as similarly as I have with TFRecords. If you haven't started the benchmarking script yet, I can prepare a Colab notebook that loads Feather files, converts them into a `tf.data` pipeline, and does some basic preprocessing. But in my limited understanding, Feather might be better suited for CSV files. Not yet sure if it's good for modalities like images.
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
86
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data @lhoestq I have used TFRecords with `tf.data` for both vision and text and I can say that they are quite performant. I haven't worked with Feather yet as similarly as I have with TFRecords. If you haven't started the benchmarking script yet, I can prepare a Colab notebook that loads Feather files, converts them into a `tf.data` pipeline, and does some basic preprocessing. But in my limited understanding, Feather might be better suited for CSV files. Not yet sure if it's good for modalities like images.
[ -1.2188917398452759, -0.9972270131111145, -0.6970075368881226, 1.3666287660598755, -0.18148387968540192, -1.1963818073272705, 0.04268241673707962, -1.1979795694351196, 1.6877453327178955, -0.8010014891624451, 0.295219749212265, -1.6202374696731567, 0.07205193489789963, -0.5862851738929749, -0.7312232851982117, -0.8757637739181519, -0.39890629053115845, -0.9113728404045105, 1.085374116897583, 2.5087006092071533, 1.162321925163269, -1.4390356540679932, 2.6972384452819824, 0.719452977180481, -0.27276700735092163, -1.0245895385742188, 0.5194834470748901, 0.04722753167152405, -1.2485874891281128, -0.44458097219467163, -0.9238992929458618, -0.04001421481370926, -0.6133994460105896, -0.44591736793518066, -0.06092614680528641, 0.27076321840286255, -0.20092490315437317, -0.3498932421207428, -0.5469146966934204, -0.7221642732620239, 0.4776313602924347, -0.3799061179161072, 1.019748330116272, -0.26565244793891907, 1.8726239204406738, -0.47793543338775635, 0.44003966450691223, 0.6782238483428955, 1.3436697721481323, 0.22414779663085938, 0.011812116950750351, 0.2352527230978012, 0.43155890703201294, -0.11468422412872314, 0.4551127552986145, 1.1245155334472656, 0.6893635988235474, 0.45148128271102905, 0.6969013214111328, -2.196664333343506, 1.332623839378357, -1.0185338258743286, 0.3263970613479614, 1.341435194015503, -0.8711076974868774, 0.4060080051422119, -1.7503799200057983, -0.09276363998651505, 0.6110627055168152, -2.220897674560547, 0.2351461946964264, -1.2924412488937378, -0.5567164421081543, 0.9528524875640869, 0.2640807628631592, -1.2243568897247314, 0.3209071755409241, -0.4095477759838104, 1.0329945087432861, 0.44921332597732544, 1.1952229738235474, -1.680543303489685, 0.007607640698552132, -0.3118876814842224, 0.11440533399581909, -1.3014671802520752, -1.4645897150039673, 0.5230202674865723, 0.6944915652275085, 0.5580376386642456, -0.08042756468057632, 1.019619345664978, -1.0545823574066162, 0.8374019861221313, -0.9813987016677856, -1.5869865417480469, -1.360491394996643, -2.233135461807251, -2.309058666229248, 0.8057999610900879, -0.46938809752464294, -0.5871173143386841, 2.091625690460205, -1.07363760471344, -1.731157660484314, 1.2575536966323853, 0.28530752658843994, -0.0516476035118103, 2.385133981704712, 0.1365354061126709, -0.7032091021537781, 0.40790653228759766, -0.7925751805305481, 0.8359816670417786, -0.4250466525554657, 1.4219647645950317, 0.41579777002334595, -0.9760313630104065, 1.5557529926300049, -0.4243663549423218, 0.5342516303062439, -0.6516771912574768, -0.6045135855674744, -0.7944831848144531, 0.43625393509864807, 1.910987377166748, -0.32102033495903015, 1.5844829082489014, -0.42247799038887024, -1.5583821535110474, -1.5840743780136108, 0.85242760181427, 0.546983003616333, -0.8729285001754761, 0.06251861900091171, -0.3564700484275818, 0.14041104912757874, 0.03048144094645977, 1.0344665050506592, 1.2786980867385864, 0.6632156372070312, -0.317619651556015, -0.8949037194252014, 0.18830524384975433, -0.17971183359622955, -0.7146010398864746, -1.8549857139587402, -0.30475857853889465, 0.14169323444366455, 0.6395511031150818, -1.2715405225753784, 1.7465029954910278, 0.9111772179603577, 2.0083723068237305, 0.9478377103805542, -0.35542041063308716, 1.5085558891296387, 0.029793156310915947, 1.777384877204895, -0.4542697072029114, 0.7428512573242188, -0.41530805826187134, -1.1471667289733887, 0.8133294582366943, -0.3417551815509796, -1.9434791803359985, -0.7321615219116211, -0.8299585580825806, -0.2444702386856079, -0.7571408152580261, 0.8465206623077393, -0.23690544068813324, -1.407786250114441, 0.28132593631744385, -0.6067644953727722, 0.18156057596206665, -1.1787863969802856, 0.36948108673095703, 0.6930684447288513, -0.6629172563552856, 0.03556743264198303, -0.2307748794555664, -1.2891141176223755, -0.46887338161468506, 0.2622796297073364, 1.865263819694519, -0.8505192399024963, 0.894457221031189, 1.0733917951583862, -0.6482778787612915, 0.011582078412175179, 0.3677717447280884, -0.32003268599510193, 0.8213781118392944, -1.0626581907272339, -0.3977779448032379, 1.15673828125, -0.2130417674779892, -0.5180047750473022, 1.4116898775100708, 0.7406013607978821, -1.036603569984436, -0.21592457592487335, -0.17319756746292114, -0.7883502840995789, 0.015638956800103188, -1.6396549940109253, -0.18427349627017975, 0.3148752450942993, -1.5308139324188232, -0.4642682671546936, -0.2538684606552124, 1.2897586822509766, -0.1633993685245514, 1.476105809211731, -0.4209163188934326, -0.1588720828294754, -0.3982241153717041, -0.4259369671344757, 0.23454178869724274, -0.23095963895320892, -0.6126639246940613, 0.27515363693237305, -0.8051013350486755, 0.38697147369384766, 1.4048906564712524, 0.2980017066001892, 0.023120315745472908, 0.3571328818798065, 1.0470263957977295, 0.4002746641635895, -0.05793561786413193, -0.8811379671096802, -1.4916975498199463, 2.0099234580993652, -1.4990813732147217, 2.011615514755249, 0.8697690367698669, 0.06361470371484756, -1.766747236251831, -1.8674113750457764, 1.336851954460144, 1.1901013851165771, 2.308774709701538, 0.5668162107467651, 0.3869113326072693, -0.8381127715110779, -0.5337830781936646, 0.38660040497779846, -1.0683066844940186, -0.6693971157073975, 0.10026025027036667, 2.3572678565979004, 1.743753433227539, -0.5126436352729797, -0.18686679005622864, -0.9772003889083862, 1.359428882598877, -0.12852396070957184, 0.2479647696018219, 2.0626418590545654, -0.3390006422996521, -1.1350620985031128, 1.2948527336120605, -2.4138660430908203, 0.11582553386688232, 1.908408761024475, 0.2453264594078064, 0.11780942976474762, -1.3884433507919312, -0.5682573318481445, -0.28594183921813965, -0.45429161190986633, -1.1471185684204102, 0.5703111886978149, -0.2828054428100586, -0.8317784667015076, -1.5532777309417725, 0.19700171053409576, -1.2042251825332642, -1.6258909702301025, 0.39126983284950256, 1.9016499519348145, 2.032768487930298, -0.8416624665260315, 1.5188055038452148, -0.32029032707214355, 0.18318337202072144, 1.2038094997406006, 1.201979398727417, 3.1338725090026855, 1.928773045539856, -1.2931689023971558, 0.526889979839325, -0.1988387107849121, -0.47681793570518494, 1.0825761556625366, -1.0977210998535156, 1.2719134092330933, -0.09380462020635605, -1.1634198427200317, -1.2200608253479004, 0.9407497048377991, 0.46156802773475647, 0.10212253034114838, -0.5188486576080322, 1.1444710493087769, 0.08855023235082626, 1.3512464761734009, 0.4236065149307251, -0.3559796214103699, 0.5963922142982483, -0.4183482229709625, -0.5131496787071228, 1.5550695657730103, 0.12152011692523956, -1.3875163793563843, -2.270890474319458, -0.2290630042552948, -0.7925097346305847, 0.02455943636596203, -0.6381885409355164, -0.9837158918380737, 1.5734935998916626, 0.3700696527957916, -1.3515193462371826, -0.2503066062927246, -0.3122274875640869, -0.5207695364952087, 2.5964579582214355, -1.4241750240325928, -0.24485087394714355, -0.9545571208000183, -0.6156905889511108, 1.5808684825897217, -1.1653558015823364, -0.24330425262451172, -0.9580662846565247, -0.5402123332023621, -1.2698731422424316, -0.5002012252807617, 0.040369853377342224, -0.9187213778495789, 0.7628175616264343, 0.2917260229587555, -1.104601263999939, -0.3494521677494049, -0.8633966445922852, 0.9084779024124146, -0.10017270594835281, 0.24285262823104858, 1.8735536336898804, 0.3663916289806366, -0.42737051844596863, 0.6732036471366882, 1.2031399011611938, 0.6037509441375732, -0.6524129509925842, 0.16324028372764587, -0.7747311592102051, 0.3323105275630951, -1.3626768589019775, 0.3093394935131073, -2.9228007793426514, 0.6681278347969055, 0.02817326970398426, -0.07002689689397812, 0.07021063566207886, -1.3588359355926514, 1.1106412410736084, 2.6689581871032715, -1.0954630374908447, 0.44965633749961853, 0.34265074133872986, 1.2258461713790894, -1.5482677221298218, 0.36840882897377014, -0.3524910807609558, 2.1288113594055176, 0.1942911297082901, 1.291562557220459, -0.5102699398994446, -2.3692262172698975, 0.5936294198036194, -1.254754900932312, -1.1534762382507324, 0.7776204943656921, -0.9420599341392517, 0.010713456198573112, -1.4503974914550781, -0.240882009267807, -0.8716453909873962, -1.2192550897598267, 0.7102305889129639, 0.1761547327041626, 0.49065089225769043, -0.700846254825592, 0.351347953081131, -2.1914989948272705, -1.3343627452850342, -0.18659092485904694, -0.9379987120628357, 0.41288113594055176, -0.3591125011444092, 0.6132020950317383, -0.15662743151187897, 0.08654990047216415, 0.30425018072128296, 1.4125916957855225, 3.4187190532684326, 0.2521477937698364, 0.46253305673599243, -0.16636434197425842, -0.9502645134925842, 1.3996036052703857, 0.9040945768356323, -0.1050742045044899, -0.5654168725013733, -1.0426013469696045, 1.184946894645691, 1.9753674268722534, 1.0076755285263062, 0.04582272469997406, -0.7575973272323608, -0.6954047083854675, -0.007826847955584526, 0.21947355568408966, 0.49366894364356995, 0.9333017468452454, -0.0056715067476034164, 0.10217005014419556, 1.416853904724121, 1.230758786201477, -0.5430422425270081, 0.3571697771549225, -0.859825074672699, -0.4932281970977783, 0.4080948233604431, 0.30888134241104126, 0.025064149871468544, 0.36291953921318054, -0.9354864358901978, -0.22215205430984497, -0.4025415778160095, -0.9235329627990723, -0.6998890042304993, -0.410269170999527, -0.3062680661678314, 1.628503441810608, 0.13986988365650177, -0.47367942333221436, -0.019969429820775986, -0.7576113343238831, -0.11464416980743408, -1.0341095924377441, 0.20649226009845734, -0.02794111706316471, -0.07195764780044556, -0.0705292746424675, 1.8461002111434937, -0.9303860664367676, -1.994083046913147, 0.24801185727119446, 0.13500100374221802, -0.33072125911712646, 0.21101702749729156, 1.7227274179458618, 0.45634832978248596, 1.5159151554107666, 1.2862473726272583, 1.0013976097106934, -0.6399644017219543, -1.3207905292510986, 0.7838944792747498, 0.92406165599823, -1.3725416660308838, 0.8265030384063721, 0.07521312683820724, -0.5320366024971008, 0.7072859406471252, 1.2647194862365723, 0.47283345460891724, -2.0911569595336914, 0.8851879835128784, -1.0087194442749023, 0.7972601056098938, 0.7340671420097351, 0.7229489684104919, 0.21233528852462769, 0.8418053984642029, -1.2174183130264282, -1.124806523323059, -0.7528069615364075, -0.6502301096916199, 2.0373733043670654, -0.23859140276908875, 0.5816317796707153, -0.1511288285255432, -1.3011006116867065, -0.10032585263252258, 0.7308314442634583, 0.34745025634765625, -0.42966997623443604, 0.7869094610214233, -0.6826906204223633, -1.1065434217453003, -1.433903455734253, -0.38448354601860046, -1.026126742362976, -0.8829872012138367, 1.067919373512268, 0.810978353023529, 0.2619931995868683, 1.924195647239685, 0.6337934136390686, 0.2965613901615143, -2.6601364612579346, 1.0187232494354248, 0.31555426120758057, -0.17962391674518585, 0.8998084664344788, 0.32622072100639343, 1.0006097555160522, 0.06592478603124619, 0.4365246891975403, -2.4264163970947266, 2.2754852771759033, -0.2930049002170563, 0.7406286597251892, 0.003675287589430809, -0.12646734714508057, 1.1361991167068481, 0.5226357579231262, 0.5703809857368469, -1.1225262880325317, 0.6643033027648926, -0.5735198855400085, 1.1759575605392456, 0.9660033583641052, -0.7874114513397217, -0.026395104825496674, 1.3043562173843384, 0.4662119150161743, -0.5757095813751221, -0.8615610003471375, -1.0229086875915527, 0.9084792733192444, 1.7535210847854614, -0.13531295955181122, -0.03967660665512085, 0.7602943181991577, 0.7250202894210815, -1.304689645767212, 0.028468986973166466, -0.7522264719009399, -0.8330827951431274, 1.5939502716064453, 2.0738329887390137, -0.10067926347255707, -0.230740025639534, -0.7185177206993103, -1.2444478273391724, 0.792739748954773, -0.04790801554918289, 0.2163865566253662, 0.5958390235900879, -0.696907639503479, 1.184032917022705, 0.9401801228523254, 0.8870812654495239, 0.2375851273536682, 0.19204241037368774, 0.4441782236099243, -0.3467139005661011, -1.05055570602417, -0.2404356747865677, -1.0461275577545166, -2.517390012741089, 0.45478570461273193, -0.15600574016571045, -1.4089897871017456, 0.020787794142961502, -1.0146784782409668, 0.917412519454956, -0.5407594442367554, -1.0168097019195557, -1.603751301765442, 0.23524700105190277, -0.13278892636299133, 0.957110583782196, -1.6458226442337036, -0.12134795635938644, 1.2057013511657715, 0.9258114099502563, -0.6149231791496277, 1.0774211883544922, 0.2156527191400528, 1.0252163410186768, 0.8935973644256592, -0.41092702746391296, 0.4825025200843811, 0.09020233899354935, -1.3040475845336914, 0.4076223075389862, 1.1344082355499268, 0.16902199387550354, 1.3517498970031738, -0.5542758107185364, 0.0418277308344841, 0.4026907980442047, -0.5541089773178101, -0.4986270070075989, -0.48857253789901733, 0.7114275693893433, 0.05513136088848114, -0.8700875043869019, 0.004502670839428902, -0.16656754910945892, -0.2602526545524597, 0.19874601066112518, -1.5743812322616577, -0.2542209327220917, -0.3632240295410156, -0.5395343899726868, -1.271742343902588, -0.029033994302153587, 1.4837582111358643, -0.7322807908058167, -0.20939496159553528, 0.5194494724273682, 0.45519518852233887, 0.4608698785305023, 0.6483492851257324, -0.6398494243621826, -0.4094395339488983, -0.22821272909641266, -0.34496575593948364, 0.3266066908836365, 1.3913644552230835, -0.0919833704829216, -0.9245526194572449, 0.6839908957481384, -0.3456709384918213, 0.081463523209095, 1.9751144647598267, 0.1363101750612259, -0.830645740032196, 0.3049817383289337, -0.7392896413803101, 1.8622530698776245, 1.7785347700119019, 1.3271576166152954, -0.11442279070615768, -0.978645384311676, 0.63038569688797, -0.32754552364349365, -0.3096679747104645, 0.9802205562591553, 0.4346381425857544, -0.19841396808624268, -1.4088877439498901, 0.5389350056648254, 1.2621852159500122, -0.8502907752990723, -0.7022741436958313, 0.03257463127374649, -0.801142156124115, 1.0640703439712524, 0.6307269334793091, 0.4135395586490631, 0.19311031699180603, 1.5507398843765259, 0.7835909724235535, -0.5110336542129517, 0.5468389391899109, 0.4722633957862854, -0.16931627690792084, -2.1671640872955322, -1.1126298904418945, 0.2858225405216217, -0.4299914538860321, -1.5750013589859009, 1.45718514919281, -1.1512826681137085, -1.0051261186599731, 0.5159777402877808, 0.03142441809177399, 1.3871266841888428, 0.36437252163887024, 1.5677961111068726, 2.2064967155456543, 0.8688880205154419, 0.32636240124702454, 1.3187922239303589, -0.2148875892162323, -0.4519049823284149, 1.8595293760299683, -0.46289339661598206, 0.4203864634037018, 1.1182262897491455, -0.311931848526001, -0.963633120059967, -0.7982305288314819, -1.1531974077224731, -0.6801716089248657, 1.1241711378097534, 0.09756889939308167, -1.1012063026428223, 0.26074153184890747, 1.622050166130066, 0.09038633853197098, -0.3870326280593872, 0.5644559860229492, 0.4537840187549591, -0.7609700560569763, -0.10238457471132278, -0.8890289664268494, 0.5075398683547974, -0.21684609353542328, -0.3533071279525757, 0.40673378109931946, 0.37732142210006714, 1.239288330078125, -0.004692297428846359, 0.11730939149856567, 1.1456576585769653, -1.476455807685852, 1.4952822923660278, -0.6460758447647095, 0.30540117621421814, -2.384899854660034, 1.4209506511688232, -0.6789980530738831, 1.9650222063064575, -2.6462955474853516, 0.3914402425289154, -0.6118015646934509, -0.5181031227111816, 0.32590994238853455, -0.3514483571052551, 0.19607184827327728, -0.14306196570396423, -1.1141462326049805, -0.10525285452604294, -0.717853307723999, 0.5794745087623596, 1.0155001878738403, 1.2507084608078003, -1.09385347366333, -0.3222655653953552, -1.7129656076431274, -0.17473319172859192, -0.7022285461425781, 0.2677457928657532, -2.046494722366333, -0.25749197602272034, -1.93447744846344, -2.3344364166259766, -1.4037481546401978, -0.8228868246078491, 1.0459890365600586, 0.08624514937400818, -0.8977953791618347, 1.176236867904663, -0.3977140188217163, -1.8578282594680786, 1.1337698698043823, -2.1003658771514893 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
> Not yet sure if it's good for modalities like images. We store images pretty much the same way as tensorflow_datasets (i.e. storing the encoded image bytes, or a path to the local image, so that the image can be decoded on-the-fly), so as long as we use something similar as TFDS for image decoding it should be ok
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
59
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data > Not yet sure if it's good for modalities like images. We store images pretty much the same way as tensorflow_datasets (i.e. storing the encoded image bytes, or a path to the local image, so that the image can be decoded on-the-fly), so as long as we use something similar as TFDS for image decoding it should be ok
[ -1.2144696712493896, -0.9795989394187927, -0.7166197299957275, 1.3766618967056274, -0.17583346366882324, -1.2220568656921387, 0.042456235736608505, -1.1491633653640747, 1.6722503900527954, -0.7985475063323975, 0.3189448118209839, -1.6431502103805542, 0.06059906631708145, -0.6026718020439148, -0.745547890663147, -0.8581381440162659, -0.39898428320884705, -0.8656201362609863, 1.063341498374939, 2.511948585510254, 1.2020686864852905, -1.4505430459976196, 2.671542167663574, 0.7042255997657776, -0.2748557925224304, -0.9949159026145935, 0.4868364632129669, 0.07426538318395615, -1.248076319694519, -0.5005360841751099, -0.8752297759056091, -0.028121743351221085, -0.5803061127662659, -0.44791892170906067, -0.038561075925827026, 0.2842163145542145, -0.2169312834739685, -0.32955920696258545, -0.5757158398628235, -0.7349727749824524, 0.4812678098678589, -0.3675693869590759, 1.0202964544296265, -0.28065431118011475, 1.8784466981887817, -0.5042462348937988, 0.42788177728652954, 0.6794124841690063, 1.3435732126235962, 0.23549340665340424, -0.004770341794937849, 0.26991036534309387, 0.39974910020828247, -0.09587964415550232, 0.4654017388820648, 1.1038334369659424, 0.7253257632255554, 0.46619659662246704, 0.6924585700035095, -2.2078893184661865, 1.310530185699463, -1.0498121976852417, 0.28604575991630554, 1.3815608024597168, -0.8775547742843628, 0.43137669563293457, -1.7675913572311401, -0.1484079509973526, 0.5996764898300171, -2.2636878490448, 0.2347453534603119, -1.2899926900863647, -0.5482540130615234, 0.9252129793167114, 0.2574005722999573, -1.2130403518676758, 0.3374035656452179, -0.43651261925697327, 1.0177053213119507, 0.4438234865665436, 1.2118504047393799, -1.7076256275177002, -0.0014745267108082771, -0.30606818199157715, 0.11209466308355331, -1.2845189571380615, -1.4887645244598389, 0.5409467220306396, 0.6321523189544678, 0.5362528562545776, -0.07510789483785629, 1.0023006200790405, -0.9988064765930176, 0.8483654856681824, -1.0124105215072632, -1.6071909666061401, -1.3962856531143188, -2.2548654079437256, -2.3038904666900635, 0.8095573782920837, -0.4714590311050415, -0.5754179358482361, 2.0848758220672607, -1.0654735565185547, -1.7383968830108643, 1.2143582105636597, 0.31250062584877014, -0.056182533502578735, 2.4275004863739014, 0.13526864349842072, -0.6875098347663879, 0.41494232416152954, -0.7442508935928345, 0.8521448373794556, -0.4336909055709839, 1.4025236368179321, 0.4219043254852295, -1.0272177457809448, 1.587890863418579, -0.44760963320732117, 0.5074747204780579, -0.6668904423713684, -0.59800124168396, -0.8086415529251099, 0.4014607071876526, 1.897591233253479, -0.32615649700164795, 1.5964378118515015, -0.4335762560367584, -1.516437292098999, -1.5667352676391602, 0.8549227118492126, 0.5536931753158569, -0.8757966160774231, 0.052085746079683304, -0.37939438223838806, 0.13740335404872894, 0.02488962560892105, 1.0617036819458008, 1.2370219230651855, 0.6220704913139343, -0.34745556116104126, -0.9065726399421692, 0.1844245344400406, -0.17223525047302246, -0.6933051347732544, -1.8847297430038452, -0.2821640372276306, 0.1735672652721405, 0.6203854084014893, -1.295998215675354, 1.7481398582458496, 0.9537045955657959, 1.9934308528900146, 0.9468608498573303, -0.3480817675590515, 1.4532800912857056, -0.004290182143449783, 1.7784855365753174, -0.438735693693161, 0.7405730485916138, -0.39012610912323, -1.1625615358352661, 0.8264303207397461, -0.3176976442337036, -1.9798943996429443, -0.7573881149291992, -0.823411226272583, -0.28675195574760437, -0.7721972465515137, 0.8842741250991821, -0.22092315554618835, -1.3403891324996948, 0.2954918444156647, -0.6136230230331421, 0.17407245934009552, -1.1978633403778076, 0.3688116669654846, 0.7076521515846252, -0.6555796265602112, 0.027736127376556396, -0.2071344256401062, -1.3170968294143677, -0.46854233741760254, 0.2507781982421875, 1.8585222959518433, -0.8165318369865417, 0.8844797015190125, 1.066456913948059, -0.6275728344917297, 0.02298581972718239, 0.318750262260437, -0.3154172897338867, 0.8269234895706177, -1.028692603111267, -0.39901310205459595, 1.1510292291641235, -0.23204462230205536, -0.5508992075920105, 1.431269645690918, 0.7144637703895569, -1.0079680681228638, -0.2433430701494217, -0.14939850568771362, -0.8227275013923645, -0.006619640626013279, -1.6473350524902344, -0.183074951171875, 0.3114989995956421, -1.5292161703109741, -0.44371992349624634, -0.25164738297462463, 1.3216749429702759, -0.20681656897068024, 1.483327865600586, -0.4062577188014984, -0.17996522784233093, -0.3918800950050354, -0.4116954505443573, 0.19903893768787384, -0.18846195936203003, -0.6186556816101074, 0.2607538402080536, -0.7925646901130676, 0.3857991397380829, 1.4268145561218262, 0.34410354495048523, 0.01898866519331932, 0.349109947681427, 1.0858635902404785, 0.401309609413147, -0.06385976076126099, -0.85906982421875, -1.5147318840026855, 2.0158095359802246, -1.4857710599899292, 2.0338804721832275, 0.8558085560798645, 0.08673077821731567, -1.7775466442108154, -1.8605983257293701, 1.328554630279541, 1.1744213104248047, 2.278135299682617, 0.5863243937492371, 0.375476211309433, -0.8061313033103943, -0.5258288383483887, 0.3903089463710785, -1.07876455783844, -0.714729905128479, 0.10299563407897949, 2.359506845474243, 1.753512978553772, -0.49230146408081055, -0.16721279919147491, -1.010563850402832, 1.3577638864517212, -0.09619083255529404, 0.22678549587726593, 2.0548808574676514, -0.3348563611507416, -1.1550379991531372, 1.291330099105835, -2.4302423000335693, 0.13226084411144257, 1.9290035963058472, 0.2910623550415039, 0.10117693990468979, -1.3523943424224854, -0.5755574703216553, -0.2799686789512634, -0.4374905824661255, -1.1442087888717651, 0.5590570569038391, -0.2773709297180176, -0.8350030779838562, -1.524100422859192, 0.2074422836303711, -1.209991455078125, -1.6160614490509033, 0.3986589014530182, 1.884713888168335, 2.041620969772339, -0.7776452302932739, 1.4735664129257202, -0.31146013736724854, 0.15910150110721588, 1.2377680540084839, 1.226320743560791, 3.1158783435821533, 1.9081782102584839, -1.3182532787322998, 0.4984300136566162, -0.18341374397277832, -0.48392096161842346, 1.115909457206726, -1.0902080535888672, 1.2738678455352783, -0.09654665738344193, -1.188048005104065, -1.239996075630188, 0.9365224242210388, 0.46706587076187134, 0.1157187819480896, -0.5395002365112305, 1.1287567615509033, 0.1036040410399437, 1.3389712572097778, 0.4985584020614624, -0.37982964515686035, 0.5949644446372986, -0.4279770255088806, -0.5070753693580627, 1.5687713623046875, 0.13120216131210327, -1.444442868232727, -2.3384053707122803, -0.21451640129089355, -0.7935584783554077, 0.04832078889012337, -0.6253377795219421, -0.9837934970855713, 1.6213338375091553, 0.37445101141929626, -1.3239353895187378, -0.24382208287715912, -0.3249308168888092, -0.5181777477264404, 2.608248472213745, -1.4501328468322754, -0.22748160362243652, -1.0031031370162964, -0.6131520867347717, 1.6082528829574585, -1.1550592184066772, -0.2411634922027588, -0.9414771795272827, -0.5724812746047974, -1.2948812246322632, -0.4934362471103668, 0.0008521974086761475, -0.9203246831893921, 0.7337529063224792, 0.275835245847702, -1.0884151458740234, -0.3797668218612671, -0.8500209450721741, 0.8540360331535339, -0.1029537096619606, 0.2628512382507324, 1.8772480487823486, 0.4125511050224304, -0.42038071155548096, 0.6922819018363953, 1.212830662727356, 0.6173063516616821, -0.6221603155136108, 0.1404801309108734, -0.7444180846214294, 0.34543585777282715, -1.3271102905273438, 0.2961733043193817, -2.900702476501465, 0.6474195718765259, -0.03254075348377228, -0.06806693226099014, 0.07774574309587479, -1.367313265800476, 1.1298890113830566, 2.661616802215576, -1.1386332511901855, 0.45315054059028625, 0.3129759430885315, 1.1750750541687012, -1.5566116571426392, 0.3369466960430145, -0.39479854702949524, 2.1582155227661133, 0.2050018161535263, 1.256874918937683, -0.528343915939331, -2.3376431465148926, 0.5672109723091125, -1.2166407108306885, -1.1742867231369019, 0.7881442904472351, -0.9206668138504028, 0.02612099051475525, -1.4586588144302368, -0.234376460313797, -0.8960039615631104, -1.2554521560668945, 0.7413309216499329, 0.13291269540786743, 0.48919975757598877, -0.6654627323150635, 0.32062071561813354, -2.2385106086730957, -1.3165266513824463, -0.21982085704803467, -0.9738016724586487, 0.4616096615791321, -0.334580659866333, 0.6245903372764587, -0.13695964217185974, 0.07782614231109619, 0.2759045362472534, 1.3963446617126465, 3.3856897354125977, 0.2680216431617737, 0.46648675203323364, -0.19412437081336975, -0.9377412796020508, 1.3882975578308105, 0.9383452534675598, -0.11042250692844391, -0.5588438510894775, -1.026110291481018, 1.2194490432739258, 1.9564651250839233, 0.9783353805541992, 0.03124402090907097, -0.7622448801994324, -0.690805971622467, -0.015554796904325485, 0.24515528976917267, 0.48930680751800537, 0.9470881223678589, -0.005646222271025181, 0.11828304827213287, 1.3669291734695435, 1.2238198518753052, -0.5204392075538635, 0.34211280941963196, -0.8376471400260925, -0.4518001079559326, 0.4103752672672272, 0.32428446412086487, 0.016878925263881683, 0.443918377161026, -0.908822238445282, -0.24162422120571136, -0.41087934374809265, -0.911345362663269, -0.717514157295227, -0.4251862168312073, -0.3503339886665344, 1.6072540283203125, 0.12486386299133301, -0.44992250204086304, -0.02036968246102333, -0.7724947333335876, -0.1439998298883438, -1.046669602394104, 0.26614150404930115, -0.015934383496642113, -0.08251780271530151, -0.0865611657500267, 1.837447166442871, -0.9000716805458069, -2.017101764678955, 0.26108458638191223, 0.1703975945711136, -0.3535531461238861, 0.21176451444625854, 1.734637975692749, 0.4333244860172272, 1.4930692911148071, 1.3032474517822266, 0.9592394828796387, -0.6239821314811707, -1.307409644126892, 0.7790468335151672, 0.9486855268478394, -1.4045462608337402, 0.8353501558303833, 0.06330935657024384, -0.5191586017608643, 0.7003870606422424, 1.2435839176177979, 0.4659292697906494, -2.079343557357788, 0.8835882544517517, -1.001129150390625, 0.7996351718902588, 0.7598946690559387, 0.7322090268135071, 0.22314661741256714, 0.8238595724105835, -1.2061269283294678, -1.1419304609298706, -0.7323940992355347, -0.6467833518981934, 1.9959228038787842, -0.2367316335439682, 0.5883387327194214, -0.14097672700881958, -1.3007488250732422, -0.09438506513834, 0.7100903987884521, 0.34746867418289185, -0.4052772521972656, 0.8241133093833923, -0.6662904024124146, -1.143754243850708, -1.4300496578216553, -0.3924195468425751, -0.9887956380844116, -0.8612231612205505, 1.1057438850402832, 0.8616077303886414, 0.21849118173122406, 1.9249106645584106, 0.6236396431922913, 0.2780016362667084, -2.6903202533721924, 1.0059022903442383, 0.30869773030281067, -0.1813981533050537, 0.9310048818588257, 0.33234384655952454, 0.9751201868057251, 0.06521931290626526, 0.4691503047943115, -2.4265365600585938, 2.2840592861175537, -0.26228785514831543, 0.7899320721626282, -0.013379441574215889, -0.11416289210319519, 1.1256965398788452, 0.5432524681091309, 0.547210156917572, -1.1371688842773438, 0.7239903807640076, -0.5763400197029114, 1.1789109706878662, 0.9587246775627136, -0.7826031446456909, -0.052801892161369324, 1.3422551155090332, 0.4708513617515564, -0.5221655964851379, -0.8586153984069824, -0.9756200313568115, 0.8978432416915894, 1.7901498079299927, -0.10286629945039749, -0.020377829670906067, 0.7813745737075806, 0.6769811511039734, -1.290317177772522, 0.07919736951589584, -0.7274475693702698, -0.8111697435379028, 1.5692522525787354, 2.0051519870758057, -0.07656536251306534, -0.23932266235351562, -0.7232660055160522, -1.2817041873931885, 0.8012721538543701, -0.026128090918064117, 0.2386685311794281, 0.567994236946106, -0.6947236657142639, 1.1975294351577759, 0.9319028258323669, 0.8903846144676208, 0.20018073916435242, 0.21210497617721558, 0.4035680890083313, -0.33250683546066284, -1.0413693189620972, -0.22105427086353302, -1.0613901615142822, -2.504826307296753, 0.46045270562171936, -0.20972983539104462, -1.4271342754364014, 0.03052368387579918, -1.0043971538543701, 0.8832303881645203, -0.5341821312904358, -1.0614506006240845, -1.6240439414978027, 0.2210676223039627, -0.1364038735628128, 0.977026641368866, -1.6511719226837158, -0.11902874708175659, 1.191628336906433, 0.9101909399032593, -0.587635338306427, 1.0759785175323486, 0.193675234913826, 0.9997656941413879, 0.8978772759437561, -0.4271272122859955, 0.4734334647655487, 0.0765049085021019, -1.3376656770706177, 0.3989885747432709, 1.1074292659759521, 0.16998621821403503, 1.3518155813217163, -0.5417264699935913, 0.054955482482910156, 0.40279456973075867, -0.532595694065094, -0.47195571660995483, -0.4974612891674042, 0.7353397011756897, 0.07376153022050858, -0.8724972009658813, 0.025034435093402863, -0.1805998980998993, -0.2581333816051483, 0.18692763149738312, -1.5358173847198486, -0.27123501896858215, -0.4155226945877075, -0.5383491516113281, -1.261906623840332, -0.04138750955462456, 1.4687273502349854, -0.7450183033943176, -0.16284626722335815, 0.548176646232605, 0.4925495386123657, 0.4995756149291992, 0.6631666421890259, -0.6053845882415771, -0.4038357734680176, -0.20773707330226898, -0.32066527009010315, 0.336343377828598, 1.3267738819122314, -0.0799722671508789, -0.9366036653518677, 0.7136222124099731, -0.33405619859695435, 0.06948399543762207, 1.9464646577835083, 0.12028910219669342, -0.812652051448822, 0.33329063653945923, -0.7511941194534302, 1.8732925653457642, 1.7397773265838623, 1.3178719282150269, -0.09807775169610977, -1.0098278522491455, 0.6425660848617554, -0.31894394755363464, -0.2920357882976532, 0.9425745010375977, 0.4364934265613556, -0.2243620902299881, -1.4071916341781616, 0.5325605273246765, 1.2847740650177002, -0.8550899624824524, -0.6987155675888062, 0.03298428654670715, -0.8199053406715393, 1.0608829259872437, 0.6096305847167969, 0.38060468435287476, 0.17633609473705292, 1.5357332229614258, 0.7521578073501587, -0.4964914321899414, 0.5365882515907288, 0.5019019246101379, -0.17477402091026306, -2.1686835289001465, -1.1222875118255615, 0.3002685010433197, -0.4098098576068878, -1.542901873588562, 1.4428564310073853, -1.1383429765701294, -1.0128018856048584, 0.512225329875946, 0.03812338411808014, 1.4106050729751587, 0.3496043086051941, 1.5739942789077759, 2.205519437789917, 0.8802603483200073, 0.3297385275363922, 1.3471713066101074, -0.20226652920246124, -0.4384515881538391, 1.8231151103973389, -0.4515201151371002, 0.4272036850452423, 1.0779266357421875, -0.3392488658428192, -0.9893850684165955, -0.7784006595611572, -1.1921530961990356, -0.7096906304359436, 1.1609820127487183, 0.0840914323925972, -1.0305882692337036, 0.2706811726093292, 1.621108055114746, 0.09922187030315399, -0.35309863090515137, 0.540462076663971, 0.4570293426513672, -0.7461333870887756, -0.12468229979276657, -0.9049588441848755, 0.5349106192588806, -0.17855599522590637, -0.32466772198677063, 0.37769633531570435, 0.4017195999622345, 1.2594021558761597, 0.008886619471013546, 0.13829180598258972, 1.125818133354187, -1.4440367221832275, 1.5007786750793457, -0.6067057847976685, 0.2447919398546219, -2.404994249343872, 1.4611315727233887, -0.7048916816711426, 1.9758033752441406, -2.641385078430176, 0.39067816734313965, -0.6552355289459229, -0.4722871780395508, 0.32051506638526917, -0.34124520421028137, 0.21052886545658112, -0.15986214578151703, -1.0722577571868896, -0.10695645213127136, -0.7048550844192505, 0.5454804301261902, 1.054250717163086, 1.2555601596832275, -1.0962448120117188, -0.35176023840904236, -1.6983449459075928, -0.16777946054935455, -0.6979182362556458, 0.26122114062309265, -2.0393643379211426, -0.20997484028339386, -1.9461866617202759, -2.4048752784729004, -1.4043635129928589, -0.8144936561584473, 1.059881567955017, 0.08721613883972168, -0.8948044776916504, 1.159220576286316, -0.38915887475013733, -1.8569676876068115, 1.1086896657943726, -2.0952868461608887 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
So for image datasets, we could potentially store the paths in the feather format and decode and read them on the fly? But it introduces an I/O redundancy of having to read the images every time. With caching it could be somewhat mitigated but it's not a good solution for bigger image datasets.
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
53
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data So for image datasets, we could potentially store the paths in the feather format and decode and read them on the fly? But it introduces an I/O redundancy of having to read the images every time. With caching it could be somewhat mitigated but it's not a good solution for bigger image datasets.
[ -1.2088098526000977, -0.9552717804908752, -0.7190974950790405, 1.3901482820510864, -0.1501806676387787, -1.2097805738449097, 0.04930341616272926, -1.1472060680389404, 1.6787692308425903, -0.7914667725563049, 0.2963365912437439, -1.6639866828918457, 0.048315126448869705, -0.5909237861633301, -0.7838824987411499, -0.8866651058197021, -0.4003342390060425, -0.8554656505584717, 1.0645568370819092, 2.5022518634796143, 1.1937710046768188, -1.4427052736282349, 2.6857450008392334, 0.7025230526924133, -0.24699102342128754, -0.9976202249526978, 0.4927905201911926, 0.06643805652856827, -1.2292104959487915, -0.47324544191360474, -0.8657816052436829, -0.06710533797740936, -0.5700845718383789, -0.4430670142173767, -0.07742476463317871, 0.3085653781890869, -0.25594496726989746, -0.3320300579071045, -0.5532248616218567, -0.7306339740753174, 0.46358734369277954, -0.38216859102249146, 0.9950299859046936, -0.29303407669067383, 1.890533208847046, -0.47629833221435547, 0.43694084882736206, 0.681955873966217, 1.3543658256530762, 0.2150091975927353, 0.015811746940016747, 0.239004448056221, 0.3996209502220154, -0.12288297712802887, 0.46564966440200806, 1.1280680894851685, 0.7152923345565796, 0.47909361124038696, 0.667955756187439, -2.2053654193878174, 1.3327587842941284, -1.0599620342254639, 0.2793343663215637, 1.3729954957962036, -0.8890456557273865, 0.4304569959640503, -1.7462878227233887, -0.13192218542099, 0.6250033974647522, -2.2788124084472656, 0.2248034030199051, -1.3252137899398804, -0.5471782088279724, 0.9289165735244751, 0.29523980617523193, -1.1898131370544434, 0.30590665340423584, -0.409389853477478, 1.0442615747451782, 0.45246362686157227, 1.2326653003692627, -1.6969001293182373, -0.01117036398500204, -0.31318509578704834, 0.09207985550165176, -1.3240505456924438, -1.493774652481079, 0.5347738265991211, 0.624229371547699, 0.5480940341949463, -0.07604589313268661, 1.008115530014038, -1.020663857460022, 0.7991604208946228, -1.0095659494400024, -1.5912750959396362, -1.3914419412612915, -2.2386302947998047, -2.3201324939727783, 0.8138718008995056, -0.4682053327560425, -0.5924872159957886, 2.0911760330200195, -1.05045485496521, -1.72097909450531, 1.2065951824188232, 0.3205576539039612, -0.025686265900731087, 2.4294047355651855, 0.13759708404541016, -0.7036100029945374, 0.4272114634513855, -0.7564059495925903, 0.8303817510604858, -0.439505934715271, 1.4185559749603271, 0.4317014217376709, -1.0385689735412598, 1.5412964820861816, -0.4346674680709839, 0.5227859616279602, -0.6768336296081543, -0.5951951742172241, -0.8073240518569946, 0.39095598459243774, 1.8801857233047485, -0.3228030800819397, 1.600764274597168, -0.4231102466583252, -1.5134265422821045, -1.59617280960083, 0.864514946937561, 0.5359920859336853, -0.8763558864593506, 0.0432267040014267, -0.37411952018737793, 0.12970305979251862, 0.007073111832141876, 1.05197274684906, 1.2362412214279175, 0.6315464973449707, -0.34097588062286377, -0.881536066532135, 0.18519575893878937, -0.17191602289676666, -0.6847279667854309, -1.8402020931243896, -0.2736818194389343, 0.17722316086292267, 0.5753638744354248, -1.2927554845809937, 1.7465208768844604, 0.9230390787124634, 1.9961652755737305, 0.9540566802024841, -0.3484327793121338, 1.4562221765518188, -0.0008994387462735176, 1.7923835515975952, -0.45076119899749756, 0.7244679927825928, -0.3667795658111572, -1.1439929008483887, 0.7972939014434814, -0.35188668966293335, -1.999239444732666, -0.7794040441513062, -0.8397921919822693, -0.2723398804664612, -0.7618067860603333, 0.879919171333313, -0.24048902094364166, -1.3491785526275635, 0.2993507981300354, -0.6208975911140442, 0.19225947558879852, -1.1968507766723633, 0.3781469464302063, 0.7162004113197327, -0.6311011910438538, 0.004810824990272522, -0.196674644947052, -1.2841298580169678, -0.45539581775665283, 0.2773832678794861, 1.8911633491516113, -0.7937842011451721, 0.885309636592865, 1.085968017578125, -0.6504158973693848, 0.02646583318710327, 0.2961900234222412, -0.29347294569015503, 0.8390761613845825, -1.0211539268493652, -0.40450340509414673, 1.1875580549240112, -0.23826955258846283, -0.5772297382354736, 1.433289885520935, 0.7167730331420898, -0.9953423738479614, -0.22726263105869293, -0.1379629671573639, -0.8078145980834961, 0.002885838970541954, -1.618775486946106, -0.16285210847854614, 0.30311161279678345, -1.5341989994049072, -0.44728386402130127, -0.2548406422138214, 1.3244067430496216, -0.23771430552005768, 1.46613347530365, -0.38710540533065796, -0.1382567435503006, -0.38423871994018555, -0.40094125270843506, 0.18622787296772003, -0.2034556120634079, -0.5964816808700562, 0.2620518207550049, -0.7875493168830872, 0.3870505094528198, 1.4072024822235107, 0.3542104959487915, 0.020960038527846336, 0.3539242744445801, 1.0668139457702637, 0.40706557035446167, -0.05257914960384369, -0.8508356213569641, -1.536030888557434, 2.0060250759124756, -1.4781608581542969, 2.021084785461426, 0.8818550109863281, 0.08689311891794205, -1.755536675453186, -1.8765679597854614, 1.3116992712020874, 1.1534898281097412, 2.2942252159118652, 0.5621128678321838, 0.370114803314209, -0.801799476146698, -0.5436983704566956, 0.3795544505119324, -1.0730156898498535, -0.6824025511741638, 0.11052156239748001, 2.3526692390441895, 1.7317320108413696, -0.4803053140640259, -0.1835879683494568, -0.9780959486961365, 1.3530704975128174, -0.08773789554834366, 0.22786542773246765, 2.0835180282592773, -0.3207933306694031, -1.171339750289917, 1.253330111503601, -2.4120192527770996, 0.09919167309999466, 1.9192073345184326, 0.2972511053085327, 0.080682173371315, -1.3583868741989136, -0.5512891411781311, -0.3068922162055969, -0.4595526456832886, -1.1441394090652466, 0.5542548894882202, -0.2698953151702881, -0.8421107530593872, -1.5090644359588623, 0.18260090053081512, -1.2147960662841797, -1.6030770540237427, 0.39200663566589355, 1.9081999063491821, 2.028769016265869, -0.7870584726333618, 1.5035303831100464, -0.305081307888031, 0.13435907661914825, 1.236333966255188, 1.2110141515731812, 3.130077362060547, 1.8972710371017456, -1.3268578052520752, 0.5018720030784607, -0.17434880137443542, -0.481597363948822, 1.100386619567871, -1.09415602684021, 1.2963637113571167, -0.09563754498958588, -1.179611325263977, -1.2550654411315918, 0.9309918880462646, 0.48049628734588623, 0.0974377691745758, -0.5677461624145508, 1.1397757530212402, 0.10149148851633072, 1.3398892879486084, 0.4765627980232239, -0.3371700048446655, 0.5683090090751648, -0.4246317744255066, -0.5353468656539917, 1.571395754814148, 0.12658680975437164, -1.4321497678756714, -2.3143322467803955, -0.23886030912399292, -0.77128666639328, 0.04398386925458908, -0.6208298206329346, -0.9857556819915771, 1.6296156644821167, 0.3838779330253601, -1.3279836177825928, -0.2591482400894165, -0.3080235719680786, -0.5342479348182678, 2.6493804454803467, -1.4249933958053589, -0.22249597311019897, -0.9820500016212463, -0.6066768169403076, 1.602696180343628, -1.182194709777832, -0.20041510462760925, -0.9450366497039795, -0.5903581976890564, -1.2777622938156128, -0.5031923055648804, 0.01039053499698639, -0.9348880052566528, 0.7311521768569946, 0.2723007798194885, -1.079160451889038, -0.3381164073944092, -0.8571885824203491, 0.8950429558753967, -0.11133509874343872, 0.2793159484863281, 1.8895127773284912, 0.4179220199584961, -0.4159735441207886, 0.675773024559021, 1.224331259727478, 0.6195807456970215, -0.6335309147834778, 0.16617928445339203, -0.7729989886283875, 0.3342662453651428, -1.3441054821014404, 0.2900678515434265, -2.9186081886291504, 0.64505934715271, -0.03150036185979843, -0.07108109444379807, 0.08357014507055283, -1.356045126914978, 1.153606653213501, 2.642751932144165, -1.1341036558151245, 0.4403114318847656, 0.32653772830963135, 1.1788945198059082, -1.5866029262542725, 0.37398505210876465, -0.40200239419937134, 2.160614013671875, 0.21004576981067657, 1.2438122034072876, -0.511043906211853, -2.338838815689087, 0.5869044661521912, -1.2493270635604858, -1.1886100769042969, 0.8049558997154236, -0.9320176243782043, 0.030581489205360413, -1.4736467599868774, -0.22852633893489838, -0.8737684488296509, -1.236890435218811, 0.7738053798675537, 0.1352367103099823, 0.4637106657028198, -0.6688881516456604, 0.3414713144302368, -2.2258405685424805, -1.3584446907043457, -0.208281472325325, -0.9547398090362549, 0.4414498209953308, -0.3546464443206787, 0.6160212755203247, -0.1348142772912979, 0.06960321962833405, 0.30338752269744873, 1.3942734003067017, 3.366628885269165, 0.28715717792510986, 0.44291752576828003, -0.17733068764209747, -0.9475982785224915, 1.3747749328613281, 0.9210804104804993, -0.11835292726755142, -0.5416260957717896, -1.0193109512329102, 1.2245454788208008, 1.9691640138626099, 0.9952803254127502, 0.03669200465083122, -0.7377656698226929, -0.6868222951889038, -0.018520401790738106, 0.23448446393013, 0.5042247176170349, 0.9349333643913269, -0.021140720695257187, 0.12636445462703705, 1.3684883117675781, 1.250162124633789, -0.5275101661682129, 0.359965443611145, -0.8555260300636292, -0.4490494728088379, 0.4035288691520691, 0.30013734102249146, 0.011911123991012573, 0.4248483180999756, -0.9106676578521729, -0.23683896660804749, -0.42083895206451416, -0.9102435111999512, -0.7090781927108765, -0.423978328704834, -0.3516924977302551, 1.6223276853561401, 0.14551527798175812, -0.4748347997665405, 0.007652578875422478, -0.7609267830848694, -0.1269843876361847, -1.0746492147445679, 0.24637643992900848, -0.04304381459951401, -0.07477138936519623, -0.056621402502059937, 1.8297621011734009, -0.9333561658859253, -2.0227596759796143, 0.23124311864376068, 0.17923837900161743, -0.3801006078720093, 0.20327763259410858, 1.759515643119812, 0.4616267681121826, 1.5078861713409424, 1.2719522714614868, 0.9765093922615051, -0.6139429807662964, -1.3357995748519897, 0.7888273000717163, 0.9465766549110413, -1.3652679920196533, 0.8625038266181946, 0.09103251993656158, -0.5467231869697571, 0.7244407534599304, 1.225540280342102, 0.45383691787719727, -2.0737087726593018, 0.8825786709785461, -0.9971337914466858, 0.8069924116134644, 0.706633448600769, 0.7388454079627991, 0.21652035415172577, 0.8413445949554443, -1.2056410312652588, -1.162535548210144, -0.7568089962005615, -0.6548850536346436, 2.0045664310455322, -0.22753052413463593, 0.5735673308372498, -0.1192338764667511, -1.2853795289993286, -0.08178132027387619, 0.7008267641067505, 0.334770143032074, -0.4118233323097229, 0.8365474939346313, -0.69472736120224, -1.1392605304718018, -1.455802083015442, -0.3922860622406006, -0.9871664047241211, -0.870170533657074, 1.1092015504837036, 0.8209608793258667, 0.22840099036693573, 1.900903582572937, 0.6279888153076172, 0.28966450691223145, -2.688213348388672, 0.9798370599746704, 0.30784332752227783, -0.1643051654100418, 0.9092239141464233, 0.3486430048942566, 0.9589855670928955, 0.08430156111717224, 0.4513917565345764, -2.4276678562164307, 2.2613162994384766, -0.307428777217865, 0.750342607498169, -0.009913030080497265, -0.13729628920555115, 1.134253978729248, 0.521125078201294, 0.5573943257331848, -1.150874376296997, 0.7112354636192322, -0.5426610112190247, 1.1669939756393433, 0.961247980594635, -0.7900590896606445, -0.07413700968027115, 1.3422542810440063, 0.5143111348152161, -0.5479048490524292, -0.8546680808067322, -0.9782338738441467, 0.8972151279449463, 1.763472080230713, -0.08525002747774124, -0.01328447088599205, 0.7969030141830444, 0.6828194856643677, -1.285759687423706, 0.07619420439004898, -0.7258511781692505, -0.848045825958252, 1.5812703371047974, 2.035226821899414, -0.07183106243610382, -0.25958919525146484, -0.700499951839447, -1.2474775314331055, 0.8039620518684387, -0.06246457248926163, 0.2114233523607254, 0.576494574546814, -0.6923547983169556, 1.1531450748443604, 0.9332913160324097, 0.889416515827179, 0.18891853094100952, 0.22002701461315155, 0.43448489904403687, -0.3396517038345337, -1.0461459159851074, -0.19937065243721008, -1.0442708730697632, -2.510941505432129, 0.4671669602394104, -0.20728088915348053, -1.4083648920059204, 0.009433889761567116, -1.0140842199325562, 0.9120118618011475, -0.5198459029197693, -1.0516563653945923, -1.5987595319747925, 0.2094801664352417, -0.11968894302845001, 0.9742738008499146, -1.6358006000518799, -0.1575288027524948, 1.2105547189712524, 0.8897333741188049, -0.5887113213539124, 1.0691053867340088, 0.18655581772327423, 1.0214457511901855, 0.8919626474380493, -0.45203542709350586, 0.49359768629074097, 0.0821845605969429, -1.3446645736694336, 0.42032885551452637, 1.1287496089935303, 0.13238196074962616, 1.3737975358963013, -0.5322510004043579, 0.04260504990816116, 0.38041621446609497, -0.5706759691238403, -0.47541624307632446, -0.4911068081855774, 0.7229369282722473, 0.07088908553123474, -0.8562393188476562, 0.04770761728286743, -0.17289845645427704, -0.2538020610809326, 0.15178751945495605, -1.5482097864151, -0.25968003273010254, -0.3873637914657593, -0.5799428820610046, -1.2706047296524048, -0.027373017743229866, 1.4617319107055664, -0.7545475959777832, -0.17202775180339813, 0.5362711548805237, 0.47840744256973267, 0.5032874941825867, 0.6576277613639832, -0.6299211978912354, -0.3692737817764282, -0.20008157193660736, -0.3545951843261719, 0.345192015171051, 1.340856909751892, -0.0690123662352562, -0.9191752672195435, 0.6947823762893677, -0.2990294098854065, 0.06989935040473938, 1.9775521755218506, 0.12521187961101532, -0.8141998052597046, 0.3224080801010132, -0.7726641297340393, 1.8858213424682617, 1.7623670101165771, 1.3422313928604126, -0.10871352255344391, -0.9838074445724487, 0.620246171951294, -0.29781949520111084, -0.31523042917251587, 0.9564759135246277, 0.4487951993942261, -0.21508485078811646, -1.391588568687439, 0.49132370948791504, 1.267547845840454, -0.8871783018112183, -0.7040783762931824, 0.041854728013277054, -0.8070715069770813, 1.076006293296814, 0.5915651917457581, 0.3818276524543762, 0.1994418501853943, 1.5071814060211182, 0.7799178957939148, -0.5174477100372314, 0.537543535232544, 0.4964689016342163, -0.15291959047317505, -2.14811635017395, -1.091602087020874, 0.31512004137039185, -0.41409218311309814, -1.5170601606369019, 1.4449515342712402, -1.1178865432739258, -1.0240274667739868, 0.5180156826972961, 0.021598558872938156, 1.4289143085479736, 0.33845067024230957, 1.583681344985962, 2.1846325397491455, 0.8929259777069092, 0.3299117684364319, 1.3621692657470703, -0.20042510330677032, -0.4461246728897095, 1.8192106485366821, -0.42838090658187866, 0.39323097467422485, 1.0774013996124268, -0.33805614709854126, -1.0098952054977417, -0.7831118702888489, -1.188761830329895, -0.6941660046577454, 1.1465173959732056, 0.11561619490385056, -1.0441741943359375, 0.2663887143135071, 1.634649634361267, 0.1113475114107132, -0.3626628518104553, 0.5324875712394714, 0.4568391442298889, -0.7661713361740112, -0.12575563788414001, -0.9237282872200012, 0.5511301755905151, -0.16293728351593018, -0.34048038721084595, 0.3794456124305725, 0.3748112916946411, 1.270284652709961, 0.0036209290847182274, 0.14178450405597687, 1.1278483867645264, -1.4637311697006226, 1.4990794658660889, -0.6026208400726318, 0.2507578134536743, -2.387876033782959, 1.4516685009002686, -0.6804660558700562, 1.9899557828903198, -2.653724431991577, 0.40766441822052, -0.6727695465087891, -0.4809544086456299, 0.332683265209198, -0.36865782737731934, 0.21449333429336548, -0.1608872413635254, -1.0854490995407104, -0.1355859935283661, -0.7217003107070923, 0.5734269618988037, 1.056283712387085, 1.255606770515442, -1.0851538181304932, -0.3545631766319275, -1.6936752796173096, -0.21680021286010742, -0.7138605713844299, 0.23988355696201324, -2.035048007965088, -0.20342756807804108, -1.9458527565002441, -2.37923002243042, -1.407056450843811, -0.79933762550354, 1.0509313344955444, 0.09994412958621979, -0.909277617931366, 1.1540250778198242, -0.3885188698768616, -1.832655429840088, 1.1238938570022583, -2.106292486190796 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
> So for image datasets, we could potentially store the paths in the feather format and decode and read them on the fly? hopefully yes :) I double-checked the TFDS source code and they always save the bytes actually, not the path. Anyway we'll see if we run into issues or not (as a first step we can require the bytes to be in the feather file)
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
67
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data > So for image datasets, we could potentially store the paths in the feather format and decode and read them on the fly? hopefully yes :) I double-checked the TFDS source code and they always save the bytes actually, not the path. Anyway we'll see if we run into issues or not (as a first step we can require the bytes to be in the feather file)
[ -1.216094732284546, -0.9490969777107239, -0.7270565032958984, 1.3924543857574463, -0.17032888531684875, -1.2297950983047485, 0.046766143292188644, -1.1601942777633667, 1.676331639289856, -0.7960343956947327, 0.3109998106956482, -1.6585962772369385, 0.06427880376577377, -0.6049186587333679, -0.7558912634849548, -0.8626455664634705, -0.4120691120624542, -0.8428561687469482, 1.0498093366622925, 2.473952054977417, 1.236092209815979, -1.4465304613113403, 2.6725940704345703, 0.7289489507675171, -0.3095315992832184, -1.0107394456863403, 0.48077166080474854, 0.0641939640045166, -1.239415168762207, -0.4871980845928192, -0.9006128311157227, -0.033457063138484955, -0.5660150051116943, -0.4378805160522461, -0.07765469700098038, 0.2765966057777405, -0.2390746921300888, -0.3191896975040436, -0.5570695996284485, -0.7225114107131958, 0.478580117225647, -0.3438428044319153, 0.9844794273376465, -0.2758099436759949, 1.8855665922164917, -0.5194987058639526, 0.41524559259414673, 0.6854029893875122, 1.3567168712615967, 0.21904438734054565, -0.02598446235060692, 0.2741584777832031, 0.3824959397315979, -0.11385395377874374, 0.45432600378990173, 1.120516300201416, 0.7254047393798828, 0.44259676337242126, 0.6991397738456726, -2.197810649871826, 1.3186464309692383, -1.0513873100280762, 0.2844410836696625, 1.3899556398391724, -0.8976544737815857, 0.42804229259490967, -1.748091697692871, -0.13263991475105286, 0.6048569679260254, -2.2969329357147217, 0.23185749351978302, -1.3159139156341553, -0.5519963502883911, 0.9294796586036682, 0.2755122184753418, -1.181986689567566, 0.32820913195610046, -0.42460891604423523, 1.0149946212768555, 0.46287158131599426, 1.197913646697998, -1.6933953762054443, -0.03280257433652878, -0.296559602022171, 0.07232905179262161, -1.3072868585586548, -1.4871103763580322, 0.5309569835662842, 0.6410254240036011, 0.5297505855560303, -0.06592973321676254, 1.0273853540420532, -1.0063648223876953, 0.8294087648391724, -0.9578667879104614, -1.6014155149459839, -1.3969708681106567, -2.252526044845581, -2.265345573425293, 0.7979610562324524, -0.48467615246772766, -0.5987624526023865, 2.1291489601135254, -1.0804628133773804, -1.7337870597839355, 1.2557833194732666, 0.3398801386356354, -0.03354079648852348, 2.438006639480591, 0.1270340532064438, -0.692252516746521, 0.41631895303726196, -0.7444823384284973, 0.8431385159492493, -0.4571211636066437, 1.4009324312210083, 0.4226810038089752, -1.0336569547653198, 1.5822358131408691, -0.42036744952201843, 0.5000383257865906, -0.6992083191871643, -0.6051480174064636, -0.8174558877944946, 0.4121304452419281, 1.8970903158187866, -0.34426945447921753, 1.5785812139511108, -0.4259282946586609, -1.491531491279602, -1.576470136642456, 0.8655043244361877, 0.5551274418830872, -0.8936073780059814, 0.06221270188689232, -0.36442816257476807, 0.12853270769119263, 0.03613954037427902, 1.0709894895553589, 1.2556910514831543, 0.6109760999679565, -0.33553367853164673, -0.8830569386482239, 0.17999695241451263, -0.18545500934123993, -0.7041634917259216, -1.844721794128418, -0.269226610660553, 0.17578159272670746, 0.5972445011138916, -1.282766342163086, 1.7332549095153809, 0.9459283351898193, 1.9950058460235596, 0.9450837969779968, -0.3686850965023041, 1.4668852090835571, -0.013133428990840912, 1.791682243347168, -0.4666987955570221, 0.7432132959365845, -0.3807235062122345, -1.1737645864486694, 0.8238416314125061, -0.3356894254684448, -1.9791650772094727, -0.7592759728431702, -0.8381364345550537, -0.26659250259399414, -0.7650495171546936, 0.9095692038536072, -0.24666184186935425, -1.3220441341400146, 0.2825484275817871, -0.626024067401886, 0.19110621511936188, -1.2056970596313477, 0.39031538367271423, 0.730782687664032, -0.6347402930259705, -0.009597068652510643, -0.22563736140727997, -1.2857320308685303, -0.4530074894428253, 0.28444966673851013, 1.850731611251831, -0.8050193190574646, 0.8879028558731079, 1.0616263151168823, -0.636768639087677, 0.0365276113152504, 0.30533331632614136, -0.30144259333610535, 0.8692256808280945, -1.0202304124832153, -0.4164724051952362, 1.1798404455184937, -0.2390979677438736, -0.5906153917312622, 1.4329309463500977, 0.7139094471931458, -0.9844030141830444, -0.24453186988830566, -0.1614532619714737, -0.8303046226501465, -0.005627773702144623, -1.6372733116149902, -0.1792689710855484, 0.30502262711524963, -1.539646029472351, -0.44809019565582275, -0.24718481302261353, 1.3391228914260864, -0.20948174595832825, 1.4961497783660889, -0.4176847040653229, -0.16132161021232605, -0.40060991048812866, -0.393388569355011, 0.1993866264820099, -0.20964255928993225, -0.5907964110374451, 0.26242777705192566, -0.7849760055541992, 0.36191755533218384, 1.4091297388076782, 0.3552907705307007, 0.04218834638595581, 0.387812077999115, 1.0857504606246948, 0.3941004276275635, -0.09331972897052765, -0.8565717339515686, -1.561868667602539, 2.0144007205963135, -1.4808921813964844, 2.0252935886383057, 0.8725511431694031, 0.09001835435628891, -1.7378464937210083, -1.873968482017517, 1.3173723220825195, 1.1514679193496704, 2.2615902423858643, 0.5629523992538452, 0.3804020881652832, -0.8380501866340637, -0.5280212163925171, 0.3835184574127197, -1.0777010917663574, -0.6911414861679077, 0.08520086109638214, 2.3518476486206055, 1.7365440130233765, -0.4829416275024414, -0.18226903676986694, -0.9982094764709473, 1.3477344512939453, -0.09113914519548416, 0.2286316156387329, 2.0494186878204346, -0.3235587775707245, -1.1641488075256348, 1.2538864612579346, -2.4333438873291016, 0.06889186054468155, 1.944348931312561, 0.26368212699890137, 0.08947847038507462, -1.3343356847763062, -0.5584381818771362, -0.2785605192184448, -0.4489598870277405, -1.1324169635772705, 0.5507403016090393, -0.278441458940506, -0.8113554120063782, -1.5119611024856567, 0.18767835199832916, -1.2016310691833496, -1.60555899143219, 0.3963780403137207, 1.8992831707000732, 2.0070040225982666, -0.7819839715957642, 1.534232497215271, -0.3112568259239197, 0.15592919290065765, 1.2328141927719116, 1.2270969152450562, 3.1271586418151855, 1.9141292572021484, -1.3457154035568237, 0.4979783892631531, -0.154608815908432, -0.4940758943557739, 1.1128286123275757, -1.1021316051483154, 1.2852405309677124, -0.08665283769369125, -1.1988662481307983, -1.2451626062393188, 0.930261492729187, 0.47617974877357483, 0.10620053112506866, -0.5764064192771912, 1.139268398284912, 0.09229841828346252, 1.3301366567611694, 0.48576071858406067, -0.37758970260620117, 0.5671719908714294, -0.42995381355285645, -0.5170204043388367, 1.5863206386566162, 0.11355271935462952, -1.4098271131515503, -2.3308956623077393, -0.21224825084209442, -0.7685357928276062, 0.05340738967061043, -0.6460026502609253, -0.9668804407119751, 1.6304388046264648, 0.36915674805641174, -1.3388848304748535, -0.2795714735984802, -0.32854047417640686, -0.506019115447998, 2.608543634414673, -1.4462038278579712, -0.22334328293800354, -0.9874979853630066, -0.614045262336731, 1.6045836210250854, -1.1574146747589111, -0.24013996124267578, -0.9454151391983032, -0.5796992778778076, -1.273740530014038, -0.5032156109809875, 0.005495619960129261, -0.9384109377861023, 0.717563807964325, 0.2598671317100525, -1.100724220275879, -0.3446429967880249, -0.8620230555534363, 0.865966260433197, -0.09469696879386902, 0.2548213005065918, 1.892683744430542, 0.42127206921577454, -0.4176174998283386, 0.6929029822349548, 1.201072096824646, 0.6118909120559692, -0.5773694515228271, 0.1609535813331604, -0.7302480340003967, 0.3307477533817291, -1.357914924621582, 0.3117094039916992, -2.915532350540161, 0.6303867101669312, -0.013778913766145706, -0.037322934716939926, 0.08879490196704865, -1.3555502891540527, 1.1339783668518066, 2.6524648666381836, -1.1336325407028198, 0.47006553411483765, 0.3253045380115509, 1.2077490091323853, -1.5832009315490723, 0.32652348279953003, -0.38288187980651855, 2.1540887355804443, 0.20616255700588226, 1.2575783729553223, -0.4949304163455963, -2.323073387145996, 0.5704430937767029, -1.2149276733398438, -1.177842378616333, 0.7784755229949951, -0.9290281534194946, 0.026614733040332794, -1.4550610780715942, -0.23828275501728058, -0.8800129890441895, -1.2291786670684814, 0.7516382336616516, 0.13961733877658844, 0.47924911975860596, -0.685348629951477, 0.30413222312927246, -2.2237136363983154, -1.3068071603775024, -0.1949278712272644, -0.9461517930030823, 0.44970864057540894, -0.3500518202781677, 0.6188415288925171, -0.13911078870296478, 0.07746727019548416, 0.27283570170402527, 1.405737042427063, 3.3606462478637695, 0.2798444926738739, 0.459520161151886, -0.1774531900882721, -0.9218509197235107, 1.4090354442596436, 0.9419862627983093, -0.14056947827339172, -0.5693579316139221, -1.0150724649429321, 1.2317826747894287, 1.9443813562393188, 0.9781055450439453, 0.05719735100865364, -0.7450083494186401, -0.6935745477676392, -0.014381544664502144, 0.25340941548347473, 0.49504053592681885, 0.9309483766555786, -0.026536613702774048, 0.1044788584113121, 1.3479111194610596, 1.2491308450698853, -0.5162859559059143, 0.3560526371002197, -0.8315916061401367, -0.4665375053882599, 0.41748014092445374, 0.3240041136741638, 0.016699280589818954, 0.43303269147872925, -0.896139919757843, -0.2416432946920395, -0.4166664779186249, -0.8930311799049377, -0.6958296298980713, -0.417090505361557, -0.35766440629959106, 1.617050290107727, 0.13089780509471893, -0.45196402072906494, -0.021598123013973236, -0.7680709362030029, -0.1256808638572693, -1.0673500299453735, 0.2772711515426636, -0.013982947915792465, -0.0774674043059349, -0.06451006233692169, 1.8025026321411133, -0.9042506814002991, -2.0304605960845947, 0.24251708388328552, 0.14921905100345612, -0.384605348110199, 0.20908492803573608, 1.7587368488311768, 0.4331938326358795, 1.5038402080535889, 1.3040812015533447, 0.9490800499916077, -0.6291999220848083, -1.2950905561447144, 0.7838037610054016, 0.9378679990768433, -1.4203282594680786, 0.8596419095993042, 0.0883832797408104, -0.5530338287353516, 0.706136167049408, 1.2329343557357788, 0.4736303389072418, -2.1045687198638916, 0.8985048532485962, -1.0012787580490112, 0.8149767518043518, 0.726367712020874, 0.7277589440345764, 0.23317600786685944, 0.8529102802276611, -1.1957995891571045, -1.166550636291504, -0.7549784779548645, -0.6570348739624023, 2.022531032562256, -0.2338108867406845, 0.5600965023040771, -0.13895069062709808, -1.2755271196365356, -0.08923551440238953, 0.6770886778831482, 0.3460758328437805, -0.39588382840156555, 0.8523233532905579, -0.6965032815933228, -1.1537867784500122, -1.4351273775100708, -0.41682249307632446, -0.9897551536560059, -0.8779285550117493, 1.0951566696166992, 0.8675474524497986, 0.1761218160390854, 1.9043958187103271, 0.6060295701026917, 0.2577621638774872, -2.6638166904449463, 0.9935868382453918, 0.33490973711013794, -0.190715953707695, 0.9136890769004822, 0.33581623435020447, 0.9843032360076904, 0.08941630274057388, 0.4415214955806732, -2.4498205184936523, 2.264406204223633, -0.2812312841415405, 0.7734899520874023, -0.031729474663734436, -0.12157533317804337, 1.1397463083267212, 0.5137105584144592, 0.5489277839660645, -1.1372339725494385, 0.7337126135826111, -0.5581803917884827, 1.1724640130996704, 0.971233069896698, -0.7887652516365051, -0.06538299471139908, 1.3730441331863403, 0.5047464966773987, -0.5589439272880554, -0.8277503252029419, -0.9669943451881409, 0.8913856744766235, 1.798406958580017, -0.06813190132379532, 0.011064472608268261, 0.7700238227844238, 0.6987335681915283, -1.2746206521987915, 0.0933271273970604, -0.7267853021621704, -0.8379639387130737, 1.5584697723388672, 2.0161049365997314, -0.07284054905176163, -0.23584619164466858, -0.7231354713439941, -1.2694522142410278, 0.8055956363677979, -0.07557110488414764, 0.2334863245487213, 0.5921556353569031, -0.6994071006774902, 1.1818090677261353, 0.93520188331604, 0.8813042640686035, 0.20951730012893677, 0.19199848175048828, 0.446304053068161, -0.3305058479309082, -1.0448957681655884, -0.21138860285282135, -1.0590286254882812, -2.5051681995391846, 0.4907287657260895, -0.20549523830413818, -1.4142957925796509, 0.019549597054719925, -0.998663604259491, 0.9165769219398499, -0.5284550786018372, -1.0819181203842163, -1.5902312994003296, 0.20072104036808014, -0.1333523690700531, 0.9480412006378174, -1.6380647420883179, -0.1447947919368744, 1.2185081243515015, 0.8807787299156189, -0.5816730260848999, 1.0646815299987793, 0.18884775042533875, 1.039986491203308, 0.887109637260437, -0.44262510538101196, 0.4741023778915405, 0.057598669081926346, -1.3460679054260254, 0.4251457154750824, 1.118866205215454, 0.1292424350976944, 1.3779816627502441, -0.5248289704322815, 0.016422811895608902, 0.38285791873931885, -0.5161440372467041, -0.48392394185066223, -0.5002589821815491, 0.716410756111145, 0.049668606370687485, -0.8777366876602173, 0.043892789632081985, -0.1913520097732544, -0.29852133989334106, 0.17412467300891876, -1.5651733875274658, -0.2753928601741791, -0.41957423090934753, -0.5386561155319214, -1.265336036682129, -0.02709072455763817, 1.4465688467025757, -0.7408434748649597, -0.14239037036895752, 0.5600779056549072, 0.47120556235313416, 0.5020837187767029, 0.6843377351760864, -0.6380864381790161, -0.3656870126724243, -0.20147337019443512, -0.37623247504234314, 0.3463606536388397, 1.334551453590393, -0.06862045079469681, -0.9008156657218933, 0.6732981204986572, -0.30098971724510193, 0.06097520515322685, 1.9565008878707886, 0.127093106508255, -0.8088855743408203, 0.3361101448535919, -0.7503390312194824, 1.8876131772994995, 1.7426812648773193, 1.338606595993042, -0.12805162370204926, -1.0124658346176147, 0.6325509548187256, -0.3100784420967102, -0.29366058111190796, 0.9444705247879028, 0.44239145517349243, -0.22008028626441956, -1.3996589183807373, 0.5226901173591614, 1.2512937784194946, -0.8827580213546753, -0.6902165412902832, 0.022159382700920105, -0.8032248616218567, 1.0513560771942139, 0.6257516145706177, 0.3589940369129181, 0.20141316950321198, 1.5264112949371338, 0.7774050235748291, -0.5089833736419678, 0.5175604820251465, 0.49709177017211914, -0.16926071047782898, -2.153970956802368, -1.105544924736023, 0.31450071930885315, -0.40054985880851746, -1.5349136590957642, 1.4341639280319214, -1.1364153623580933, -1.013885259628296, 0.5111258029937744, 0.029363874346017838, 1.4247703552246094, 0.3295653760433197, 1.5860460996627808, 2.196831226348877, 0.8743440508842468, 0.3197345733642578, 1.3641408681869507, -0.17324906587600708, -0.44078773260116577, 1.8200058937072754, -0.4287033975124359, 0.40455928444862366, 1.086513638496399, -0.3657740652561188, -1.0115004777908325, -0.7813202738761902, -1.196103811264038, -0.724163830280304, 1.1691395044326782, 0.08275644481182098, -1.0077903270721436, 0.2782425284385681, 1.592352271080017, 0.11753623932600021, -0.37151530385017395, 0.5244070887565613, 0.4859704375267029, -0.7458929419517517, -0.13503316044807434, -0.8928698301315308, 0.5404766798019409, -0.16223964095115662, -0.337950199842453, 0.41342270374298096, 0.3744615912437439, 1.277119517326355, 0.022580265998840332, 0.1448124200105667, 1.125370979309082, -1.477713942527771, 1.4891579151153564, -0.6151487231254578, 0.251738965511322, -2.3857522010803223, 1.4731097221374512, -0.7058508396148682, 2.008462905883789, -2.6447455883026123, 0.3903578221797943, -0.6365089416503906, -0.47369444370269775, 0.33849579095840454, -0.34942275285720825, 0.2051345556974411, -0.1499849557876587, -1.0999445915222168, -0.12423979490995407, -0.6982263326644897, 0.566933810710907, 1.0756564140319824, 1.2472432851791382, -1.0889410972595215, -0.3490602672100067, -1.7089816331863403, -0.19661317765712738, -0.6961405873298645, 0.24995610117912292, -2.0334484577178955, -0.1945406198501587, -1.973775029182434, -2.38567852973938, -1.3843671083450317, -0.8290904760360718, 1.0703048706054688, 0.09802045673131943, -0.9169315695762634, 1.1658105850219727, -0.3964613676071167, -1.8421118259429932, 1.107552409172058, -2.0947611331939697 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
Yes. For images, TFDS actually prepares TFRecords first for encoding and then reuses them for every subsequent call.
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
18
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data Yes. For images, TFDS actually prepares TFRecords first for encoding and then reuses them for every subsequent call.
[ -1.2233988046646118, -0.9487031698226929, -0.7016202211380005, 1.4090217351913452, -0.1417044848203659, -1.19817054271698, 0.03449571505188942, -1.1578203439712524, 1.657949447631836, -0.7837871313095093, 0.3234139382839203, -1.6551940441131592, 0.06328849494457245, -0.6075983047485352, -0.7412574291229248, -0.8974782228469849, -0.40340691804885864, -0.8237759470939636, 1.0611804723739624, 2.528366804122925, 1.199853777885437, -1.4466241598129272, 2.650322437286377, 0.7253515124320984, -0.28974705934524536, -1.0047041177749634, 0.49737417697906494, 0.10372970253229141, -1.1957677602767944, -0.4722827076911926, -0.8866156339645386, -0.0737113431096077, -0.5746757388114929, -0.4438122510910034, -0.06374481320381165, 0.2882448732852936, -0.2572494149208069, -0.3179040551185608, -0.568193793296814, -0.741978108882904, 0.4566826820373535, -0.3863607347011566, 0.9983940720558167, -0.2680038809776306, 1.879482388496399, -0.4825865924358368, 0.4579984247684479, 0.6597199440002441, 1.3535714149475098, 0.20728711783885956, -0.0023099039681255817, 0.24742725491523743, 0.3894324004650116, -0.11816862225532532, 0.4592013359069824, 1.1155470609664917, 0.7080704569816589, 0.445748895406723, 0.6716060042381287, -2.183884859085083, 1.3133026361465454, -1.072098970413208, 0.26456597447395325, 1.4007090330123901, -0.8884170651435852, 0.4387981593608856, -1.7521007061004639, -0.14643193781375885, 0.6195101737976074, -2.282320499420166, 0.23183004558086395, -1.285217523574829, -0.5589250922203064, 0.931866466999054, 0.26916247606277466, -1.2316840887069702, 0.30854377150535583, -0.4336867928504944, 1.0450060367584229, 0.4477272927761078, 1.2005655765533447, -1.7028040885925293, 0.00044210441410541534, -0.3293561339378357, 0.0940893143415451, -1.333120346069336, -1.4423165321350098, 0.528925895690918, 0.6648009419441223, 0.533460795879364, -0.032567765563726425, 0.9879876971244812, -1.032708764076233, 0.8069072961807251, -1.0131309032440186, -1.5966746807098389, -1.4174748659133911, -2.280515193939209, -2.3324928283691406, 0.810817301273346, -0.4387738108634949, -0.6496337056159973, 2.064697265625, -1.0501600503921509, -1.7293621301651, 1.2401573657989502, 0.3481582701206207, -0.04629426822066307, 2.4657115936279297, 0.12068674713373184, -0.7118695974349976, 0.4085599482059479, -0.7743716239929199, 0.8094351887702942, -0.4443308115005493, 1.4394187927246094, 0.44047144055366516, -1.0524952411651611, 1.5825766324996948, -0.4296422004699707, 0.508086085319519, -0.6752946376800537, -0.6036590337753296, -0.7884566783905029, 0.4183124303817749, 1.9045828580856323, -0.3144405782222748, 1.5870935916900635, -0.3940022587776184, -1.4816606044769287, -1.529624581336975, 0.8592544198036194, 0.5260851383209229, -0.8699878454208374, 0.06643728166818619, -0.35005712509155273, 0.14082111418247223, 0.02371220663189888, 1.017789602279663, 1.2180149555206299, 0.5956898927688599, -0.3068114221096039, -0.900509774684906, 0.22071145474910736, -0.18225149810314178, -0.6972947120666504, -1.8723201751708984, -0.27909618616104126, 0.16471315920352936, 0.5996472835540771, -1.3101773262023926, 1.7324243783950806, 0.9186587333679199, 2.003034830093384, 0.9473935961723328, -0.35165780782699585, 1.4793519973754883, -0.011882669292390347, 1.7873731851577759, -0.46591389179229736, 0.7627706527709961, -0.3323022723197937, -1.134611964225769, 0.7845788598060608, -0.3418344259262085, -1.9846501350402832, -0.761078953742981, -0.824178159236908, -0.23734799027442932, -0.7638070583343506, 0.877732515335083, -0.21823596954345703, -1.3483229875564575, 0.3165554702281952, -0.6227415204048157, 0.19382862746715546, -1.2320876121520996, 0.38867682218551636, 0.7186099886894226, -0.6089770197868347, -0.00665285112336278, -0.2249167114496231, -1.2888654470443726, -0.45160794258117676, 0.2535974383354187, 1.8521567583084106, -0.7938808798789978, 0.8859880566596985, 1.058404803276062, -0.6459250450134277, 0.013304467312991619, 0.3152316212654114, -0.29718726873397827, 0.8535680174827576, -1.0126878023147583, -0.43902868032455444, 1.2125740051269531, -0.21526244282722473, -0.5807715058326721, 1.4464199542999268, 0.744098961353302, -1.0024745464324951, -0.22904525697231293, -0.19384244084358215, -0.7861518859863281, 0.03905635327100754, -1.650327205657959, -0.18649062514305115, 0.32286709547042847, -1.509376049041748, -0.4148901700973511, -0.23368732631206512, 1.341528058052063, -0.22904835641384125, 1.4965766668319702, -0.3961024284362793, -0.13445106148719788, -0.4077546298503876, -0.4194542467594147, 0.19316023588180542, -0.19892826676368713, -0.6112155318260193, 0.29601436853408813, -0.769327700138092, 0.4358310103416443, 1.3759230375289917, 0.33913862705230713, 0.03641774132847786, 0.351372629404068, 1.0529913902282715, 0.37838879227638245, -0.08190783858299255, -0.8809226751327515, -1.5346471071243286, 2.013453960418701, -1.4812164306640625, 2.0581576824188232, 0.8583512902259827, 0.07598962634801865, -1.7258102893829346, -1.845491886138916, 1.3446065187454224, 1.186970591545105, 2.2824292182922363, 0.5759989619255066, 0.35304176807403564, -0.8288861513137817, -0.5192495584487915, 0.34207671880722046, -1.0973591804504395, -0.6600587368011475, 0.12295664101839066, 2.3532049655914307, 1.7633843421936035, -0.4820236563682556, -0.1779499500989914, -0.9945316314697266, 1.3609875440597534, -0.11090746521949768, 0.21274253726005554, 2.0789525508880615, -0.3267306387424469, -1.1605592966079712, 1.255602240562439, -2.4246442317962646, 0.08930312097072601, 1.9204893112182617, 0.2990829646587372, 0.09948910772800446, -1.3834635019302368, -0.5705996155738831, -0.31940576434135437, -0.42933157086372375, -1.161121129989624, 0.5436975955963135, -0.24393068253993988, -0.8323020935058594, -1.5264674425125122, 0.2182861864566803, -1.2066096067428589, -1.6009540557861328, 0.40375030040740967, 1.8601351976394653, 2.0248470306396484, -0.7941420078277588, 1.5013060569763184, -0.28439003229141235, 0.15077483654022217, 1.2182756662368774, 1.2035441398620605, 3.1115288734436035, 1.927682876586914, -1.3137409687042236, 0.5175037980079651, -0.20554997026920319, -0.487334281206131, 1.1170012950897217, -1.122042179107666, 1.304366946220398, -0.07082118093967438, -1.1782861948013306, -1.274429440498352, 0.9428275227546692, 0.49222439527511597, 0.09648983180522919, -0.6046387553215027, 1.1233888864517212, 0.0991382971405983, 1.375980019569397, 0.42201152443885803, -0.340802401304245, 0.5566339492797852, -0.45576536655426025, -0.5254127383232117, 1.598429799079895, 0.11934826523065567, -1.434572458267212, -2.3188600540161133, -0.23865072429180145, -0.7614105343818665, 0.013124869205057621, -0.6350660920143127, -0.9738281965255737, 1.6449062824249268, 0.37337547540664673, -1.3400238752365112, -0.24880369007587433, -0.32501381635665894, -0.5341939926147461, 2.658958673477173, -1.4350110292434692, -0.21825829148292542, -0.9881072044372559, -0.593694806098938, 1.6068806648254395, -1.1454108953475952, -0.22584028542041779, -0.9428336024284363, -0.5999672412872314, -1.2680929899215698, -0.5135507583618164, 0.001872258260846138, -0.919506847858429, 0.7146762013435364, 0.279662162065506, -1.108934998512268, -0.3818124234676361, -0.8566405773162842, 0.8894968628883362, -0.09261726588010788, 0.2588365077972412, 1.848894715309143, 0.40896955132484436, -0.4003830552101135, 0.6748347878456116, 1.2088772058486938, 0.6171499490737915, -0.6456068754196167, 0.16266989707946777, -0.7619566917419434, 0.3132336735725403, -1.3377279043197632, 0.30107155442237854, -2.9236221313476562, 0.6572893261909485, -0.0029460187070071697, -0.04634389281272888, 0.09449639171361923, -1.314706563949585, 1.1712714433670044, 2.6933581829071045, -1.1160788536071777, 0.4328356385231018, 0.3382708430290222, 1.161487102508545, -1.56391441822052, 0.3816092908382416, -0.38518190383911133, 2.1775097846984863, 0.1906537264585495, 1.273329734802246, -0.5358933806419373, -2.359926462173462, 0.5786064267158508, -1.242785096168518, -1.1743882894515991, 0.7834117412567139, -0.9678097367286682, 0.019513599574565887, -1.4619598388671875, -0.22356048226356506, -0.8974417448043823, -1.2408204078674316, 0.7588707804679871, 0.15429246425628662, 0.49727463722229004, -0.6539066433906555, 0.3390182852745056, -2.223524808883667, -1.3337242603302002, -0.23165519535541534, -0.9734007120132446, 0.4235536754131317, -0.315743088722229, 0.5966014862060547, -0.1184559017419815, 0.07537242770195007, 0.280489444732666, 1.3942404985427856, 3.3607993125915527, 0.2782531678676605, 0.4874444603919983, -0.15829646587371826, -0.9602726101875305, 1.3767975568771362, 0.9027738571166992, -0.08886320143938065, -0.5622503161430359, -0.983077347278595, 1.227003574371338, 1.951203465461731, 1.008931040763855, 0.07297706604003906, -0.7633330225944519, -0.665628969669342, -0.00859195739030838, 0.24161815643310547, 0.4790767729282379, 0.9344207644462585, -0.045752376317977905, 0.12071018666028976, 1.3684489727020264, 1.2732633352279663, -0.5426546931266785, 0.30960968136787415, -0.842982292175293, -0.41644784808158875, 0.40412649512290955, 0.29813024401664734, 0.029463116079568863, 0.43979841470718384, -0.889483630657196, -0.23948059976100922, -0.3997245132923126, -0.920383095741272, -0.7075328230857849, -0.4426025152206421, -0.3526076674461365, 1.659668207168579, 0.13828687369823456, -0.43712741136550903, 0.004212657921016216, -0.7962656617164612, -0.10881464928388596, -1.0718541145324707, 0.21333330869674683, 0.005282163619995117, -0.06026441976428032, -0.06378484517335892, 1.8467670679092407, -0.9354973435401917, -2.0467591285705566, 0.2591717839241028, 0.16706357896327972, -0.365885466337204, 0.198625847697258, 1.7300279140472412, 0.4488427937030792, 1.5042314529418945, 1.252911925315857, 0.9956271052360535, -0.6403806805610657, -1.3294845819473267, 0.7986278533935547, 0.980830192565918, -1.3797858953475952, 0.8841437101364136, 0.09188749641180038, -0.502936601638794, 0.7015820145606995, 1.2498027086257935, 0.47011786699295044, -2.0538523197174072, 0.864717960357666, -1.0045264959335327, 0.7975112795829773, 0.7038237452507019, 0.69517582654953, 0.197027787566185, 0.8387589454650879, -1.2062610387802124, -1.1339091062545776, -0.7574191689491272, -0.6092994809150696, 2.0117952823638916, -0.2336229383945465, 0.5726255774497986, -0.12076254934072495, -1.2982558012008667, -0.053199753165245056, 0.7316384315490723, 0.366597980260849, -0.3887389302253723, 0.8615999221801758, -0.6819959878921509, -1.1327427625656128, -1.4545339345932007, -0.3841477632522583, -0.9658160209655762, -0.8606524467468262, 1.115445852279663, 0.8274134993553162, 0.21091774106025696, 1.8842482566833496, 0.6396815180778503, 0.2675521671772003, -2.693988084793091, 1.001194715499878, 0.291979044675827, -0.17176009714603424, 0.8738798499107361, 0.3252403438091278, 0.9776723980903625, 0.06593243032693863, 0.43951892852783203, -2.4288828372955322, 2.2591629028320312, -0.2670644521713257, 0.7398353815078735, 0.003675444982945919, -0.11884916573762894, 1.0786796808242798, 0.5050845742225647, 0.5588499307632446, -1.135455846786499, 0.700843334197998, -0.5438103079795837, 1.179238200187683, 0.9783891439437866, -0.7643217444419861, -0.06536202877759933, 1.3262805938720703, 0.49434906244277954, -0.5326434969902039, -0.8623548150062561, -0.9434749484062195, 0.8942074775695801, 1.7343244552612305, -0.10563872754573822, -0.030004382133483887, 0.8009331226348877, 0.7133519649505615, -1.2971436977386475, 0.0747888833284378, -0.7461170554161072, -0.8250179290771484, 1.5700814723968506, 2.0516116619110107, -0.08632469922304153, -0.27051088213920593, -0.7566016912460327, -1.2340331077575684, 0.794539213180542, -0.06983618438243866, 0.2400260865688324, 0.5643317103385925, -0.6742636561393738, 1.1705294847488403, 0.9352544546127319, 0.8869138956069946, 0.23750613629817963, 0.21358726918697357, 0.4214975833892822, -0.3452693521976471, -1.0612837076187134, -0.20969678461551666, -1.059923529624939, -2.562458038330078, 0.4644542634487152, -0.2201797068119049, -1.3714228868484497, 0.02087237685918808, -1.0267168283462524, 0.8963966369628906, -0.5371767282485962, -1.0347729921340942, -1.5924780368804932, 0.2155456244945526, -0.14472170174121857, 0.9594781398773193, -1.6662700176239014, -0.13398364186286926, 1.2258274555206299, 0.8885679841041565, -0.597612202167511, 1.0691697597503662, 0.18422995507717133, 1.0356884002685547, 0.9047043323516846, -0.443117618560791, 0.504532516002655, 0.07856079190969467, -1.345243215560913, 0.4334779977798462, 1.0920343399047852, 0.16635102033615112, 1.3413312435150146, -0.5189822316169739, 0.028451047837734222, 0.3627268970012665, -0.5518538355827332, -0.48382899165153503, -0.502934455871582, 0.748371422290802, 0.06945201009511948, -0.8903659582138062, 0.04513001814484596, -0.1855456382036209, -0.24318401515483856, 0.1501288264989853, -1.581018328666687, -0.27448570728302, -0.3819284737110138, -0.5436860918998718, -1.2807642221450806, -0.049247294664382935, 1.447300672531128, -0.7618998885154724, -0.15096250176429749, 0.5067269802093506, 0.5024122595787048, 0.5171031951904297, 0.6672727465629578, -0.6106477975845337, -0.3993256390094757, -0.24175439774990082, -0.3136179745197296, 0.3447172939777374, 1.3348575830459595, -0.07244552671909332, -0.9165279269218445, 0.6840396523475647, -0.3237146735191345, 0.0871957540512085, 1.989026665687561, 0.1399315744638443, -0.8281174302101135, 0.33075088262557983, -0.7326899766921997, 1.861937165260315, 1.727534532546997, 1.3388413190841675, -0.134823277592659, -0.9914054274559021, 0.6590856909751892, -0.3212157189846039, -0.31849154829978943, 0.9315600991249084, 0.45255953073501587, -0.20779836177825928, -1.3853591680526733, 0.49037447571754456, 1.2957872152328491, -0.8614808320999146, -0.7286643385887146, 0.04277931526303291, -0.832552433013916, 1.0365164279937744, 0.631161630153656, 0.3466460406780243, 0.21376237273216248, 1.527362585067749, 0.7491297721862793, -0.522489070892334, 0.49978476762771606, 0.4815964996814728, -0.20262955129146576, -2.1483659744262695, -1.1072568893432617, 0.29154089093208313, -0.41799402236938477, -1.5253021717071533, 1.422911524772644, -1.135190725326538, -0.9850594997406006, 0.5040875673294067, 0.03817237541079521, 1.4308526515960693, 0.34520378708839417, 1.560719609260559, 2.1819095611572266, 0.8666198253631592, 0.31319794058799744, 1.3557220697402954, -0.20938163995742798, -0.4492858946323395, 1.8492478132247925, -0.4345431625843048, 0.4168999195098877, 1.0953704118728638, -0.3118467330932617, -1.006899118423462, -0.8106411099433899, -1.1547093391418457, -0.6753009557723999, 1.1883522272109985, 0.13206443190574646, -1.0565626621246338, 0.23078888654708862, 1.6235365867614746, 0.10358399152755737, -0.39336854219436646, 0.5140575766563416, 0.44612443447113037, -0.7590387463569641, -0.09701988101005554, -0.9346799850463867, 0.5300240516662598, -0.1395883560180664, -0.308033287525177, 0.35951757431030273, 0.3991173505783081, 1.224023699760437, 0.02008223906159401, 0.18022169172763824, 1.1200737953186035, -1.4375107288360596, 1.493496060371399, -0.6068496108055115, 0.25595250725746155, -2.3632426261901855, 1.4431709051132202, -0.6745545864105225, 1.9661879539489746, -2.638181209564209, 0.3841373920440674, -0.642523467540741, -0.4911961257457733, 0.33721086382865906, -0.3955586850643158, 0.22948992252349854, -0.15201398730278015, -1.1120284795761108, -0.12488911300897598, -0.7004493474960327, 0.5457064509391785, 1.022189736366272, 1.231095552444458, -1.088523507118225, -0.35670581459999084, -1.7215688228607178, -0.19762028753757477, -0.7317143082618713, 0.2662755846977234, -2.0364575386047363, -0.2147899717092514, -1.943984866142273, -2.3872265815734863, -1.4069067239761353, -0.810675859451294, 1.0513925552368164, 0.09142748266458511, -0.9229770302772522, 1.1588441133499146, -0.397451788187027, -1.8428136110305786, 1.1414259672164917, -2.0907647609710693 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
@lhoestq @Rocketknight1 I worked on [this PoC](https://gist.github.com/sayakpaul/f7d5cc312cd01cb31098fad3fd9c6b59) that * Creates Feather files from a medium resolution dataset (`tf_flowers`). * Explores different options with TensorFlow IO to load the Feather files. I haven't benchmarked those different options yet. There's also a gotcha that I have noted in the PoC. I hope it gets us started but I'm sorry if this is redundant.
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
61
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data @lhoestq @Rocketknight1 I worked on [this PoC](https://gist.github.com/sayakpaul/f7d5cc312cd01cb31098fad3fd9c6b59) that * Creates Feather files from a medium resolution dataset (`tf_flowers`). * Explores different options with TensorFlow IO to load the Feather files. I haven't benchmarked those different options yet. There's also a gotcha that I have noted in the PoC. I hope it gets us started but I'm sorry if this is redundant.
[ -1.2335913181304932, -0.957751452922821, -0.6878731846809387, 1.389088749885559, -0.15704593062400818, -1.2063807249069214, 0.0838584303855896, -1.1392771005630493, 1.6994043588638306, -0.734506368637085, 0.31597742438316345, -1.642128586769104, 0.047508299350738525, -0.5960678458213806, -0.7734496593475342, -0.8486495018005371, -0.38723504543304443, -0.8764986991882324, 1.0927754640579224, 2.4867398738861084, 1.16314697265625, -1.4540878534317017, 2.739320993423462, 0.7214773297309875, -0.2897975742816925, -1.0062851905822754, 0.4831553101539612, 0.08078937232494354, -1.248990774154663, -0.47563639283180237, -0.9177420139312744, -0.044633857905864716, -0.5745142102241516, -0.4651610255241394, -0.040694646537303925, 0.31805792450904846, -0.18396353721618652, -0.3579697608947754, -0.5606280565261841, -0.6952287554740906, 0.4826907217502594, -0.3808690011501312, 0.9792246222496033, -0.2540642321109772, 1.87352454662323, -0.49635979533195496, 0.42938652634620667, 0.6912626624107361, 1.349153995513916, 0.20721277594566345, 0.0015236800536513329, 0.29313644766807556, 0.40333184599876404, -0.09024703502655029, 0.46559110283851624, 1.1553817987442017, 0.7100287079811096, 0.42295798659324646, 0.7079449892044067, -2.1963231563568115, 1.3420459032058716, -1.0269978046417236, 0.315417617559433, 1.3408540487289429, -0.9504735469818115, 0.40994831919670105, -1.7620090246200562, -0.09816804528236389, 0.5895645022392273, -2.2768704891204834, 0.24904048442840576, -1.3051902055740356, -0.5668652653694153, 0.9173763394355774, 0.2575196623802185, -1.2278779745101929, 0.31402796506881714, -0.4440026879310608, 1.0454480648040771, 0.4464261829853058, 1.2241582870483398, -1.6599937677383423, -0.030300894752144814, -0.3074817657470703, 0.13004298508167267, -1.2871124744415283, -1.4874317646026611, 0.5403026342391968, 0.6395798325538635, 0.5480672717094421, -0.10108920931816101, 1.0123615264892578, -1.0278780460357666, 0.8631231188774109, -0.960131824016571, -1.623542308807373, -1.403201937675476, -2.242905378341675, -2.2697970867156982, 0.8297747373580933, -0.4586242437362671, -0.5602629780769348, 2.0844831466674805, -1.0681848526000977, -1.7496861219406128, 1.2146036624908447, 0.31135401129722595, -0.050821661949157715, 2.3728551864624023, 0.13545121252536774, -0.713100254535675, 0.37335917353630066, -0.7821499705314636, 0.8611035346984863, -0.3884420692920685, 1.4086018800735474, 0.4253622591495514, -0.9844214916229248, 1.5479856729507446, -0.3739185631275177, 0.5339952707290649, -0.6545000076293945, -0.6267755031585693, -0.7946564555168152, 0.35337910056114197, 1.9399595260620117, -0.32309743762016296, 1.6193592548370361, -0.42390280961990356, -1.580755591392517, -1.5654363632202148, 0.8383845090866089, 0.5506022572517395, -0.8663716912269592, 0.0715426430106163, -0.4097274839878082, 0.14319299161434174, 0.015906568616628647, 1.0517358779907227, 1.2593704462051392, 0.650862455368042, -0.31368547677993774, -0.8903716206550598, 0.15170259773731232, -0.12482111901044846, -0.6880713105201721, -1.8918601274490356, -0.2898440957069397, 0.18428297340869904, 0.6321732401847839, -1.2939809560775757, 1.712918758392334, 0.9159401059150696, 2.0054051876068115, 0.9791222810745239, -0.3232496976852417, 1.5244749784469604, 0.016293978318572044, 1.7658464908599854, -0.45430171489715576, 0.7198233008384705, -0.3795020878314972, -1.1291463375091553, 0.7887069582939148, -0.3435691297054291, -2.0020673274993896, -0.7497453093528748, -0.8089441061019897, -0.23907482624053955, -0.7712168097496033, 0.8427630066871643, -0.2523215711116791, -1.4029273986816406, 0.29416385293006897, -0.5886985659599304, 0.19521676003932953, -1.188902497291565, 0.35266992449760437, 0.7187091112136841, -0.6183257699012756, 0.033510781824588776, -0.21102295815944672, -1.2866398096084595, -0.4468376934528351, 0.2544860541820526, 1.835836410522461, -0.8078612089157104, 0.9032971858978271, 1.098042607307434, -0.6553658246994019, 0.03245646506547928, 0.3206118047237396, -0.30723434686660767, 0.8501811027526855, -1.0658384561538696, -0.3790575861930847, 1.1606143712997437, -0.19703878462314606, -0.534680187702179, 1.4154255390167236, 0.770776629447937, -1.0054430961608887, -0.24568495154380798, -0.1526106745004654, -0.8210654258728027, 0.002464761957526207, -1.621098518371582, -0.1965494155883789, 0.29635220766067505, -1.5376421213150024, -0.44456908106803894, -0.28104400634765625, 1.3060238361358643, -0.18615247309207916, 1.4556074142456055, -0.3541755676269531, -0.1704668253660202, -0.3792257606983185, -0.4350283145904541, 0.20677347481250763, -0.2163865715265274, -0.6389347910881042, 0.26707106828689575, -0.757419228553772, 0.41626277565956116, 1.4227176904678345, 0.3461247384548187, 0.005992090329527855, 0.42206043004989624, 1.0670316219329834, 0.3757129907608032, -0.04056776314973831, -0.8406100273132324, -1.554918885231018, 2.0209619998931885, -1.4932883977890015, 2.020420789718628, 0.8461616635322571, 0.05518053472042084, -1.7615768909454346, -1.8723596334457397, 1.3452365398406982, 1.18551766872406, 2.289670705795288, 0.5626434087753296, 0.3693429231643677, -0.7865041494369507, -0.5485443472862244, 0.32772305607795715, -1.0846844911575317, -0.7019546031951904, 0.11288261413574219, 2.375903606414795, 1.772204875946045, -0.5140008926391602, -0.19159387052059174, -0.9752991795539856, 1.3345801830291748, -0.11444693058729172, 0.22659853100776672, 2.04329252243042, -0.29303616285324097, -1.1517711877822876, 1.2617955207824707, -2.4239652156829834, 0.1136438176035881, 1.934014916419983, 0.26559504866600037, 0.09520760178565979, -1.3907028436660767, -0.5680893659591675, -0.28963565826416016, -0.45926180481910706, -1.1534634828567505, 0.5509452819824219, -0.2681434452533722, -0.8384208679199219, -1.5358861684799194, 0.20382466912269592, -1.226514458656311, -1.6120917797088623, 0.4121060073375702, 1.9259223937988281, 2.0173377990722656, -0.7767888903617859, 1.4740569591522217, -0.33492937684059143, 0.17288270592689514, 1.2424535751342773, 1.2257245779037476, 3.142758846282959, 1.8961732387542725, -1.2967623472213745, 0.5337211489677429, -0.19963034987449646, -0.4795238673686981, 1.083275318145752, -1.1221615076065063, 1.2521731853485107, -0.06047126650810242, -1.1203038692474365, -1.2333804368972778, 0.9445962309837341, 0.48106932640075684, 0.0788547471165657, -0.5238173604011536, 1.119552731513977, 0.10015261173248291, 1.3543015718460083, 0.45775681734085083, -0.3319064676761627, 0.5711126923561096, -0.41086241602897644, -0.5121505260467529, 1.5421431064605713, 0.11082404106855392, -1.4191869497299194, -2.2949838638305664, -0.20212581753730774, -0.7712939977645874, 0.03199445456266403, -0.6234517693519592, -0.9769155383110046, 1.6027066707611084, 0.3636433184146881, -1.3195971250534058, -0.21611645817756653, -0.30758795142173767, -0.5082789659500122, 2.5934739112854004, -1.4158066511154175, -0.2621583044528961, -0.9503046870231628, -0.6005361080169678, 1.6034618616104126, -1.1246052980422974, -0.26525285840034485, -0.9399340748786926, -0.5742276906967163, -1.2682838439941406, -0.5201039910316467, 0.008414283394813538, -0.9090803861618042, 0.7317682504653931, 0.25964197516441345, -1.0763670206069946, -0.338542103767395, -0.8565768599510193, 0.9250894784927368, -0.10506230592727661, 0.22657646238803864, 1.8803062438964844, 0.3804471492767334, -0.41214436292648315, 0.6811912655830383, 1.1925647258758545, 0.6029615998268127, -0.6492908000946045, 0.15608404576778412, -0.752732515335083, 0.30184173583984375, -1.3915430307388306, 0.3265232443809509, -2.9036316871643066, 0.6807734370231628, -0.029747745022177696, -0.05982392281293869, 0.0744473859667778, -1.3656563758850098, 1.137693166732788, 2.6903624534606934, -1.107061505317688, 0.4424074590206146, 0.36457571387290955, 1.1986896991729736, -1.5488109588623047, 0.3528132736682892, -0.38822758197784424, 2.1742634773254395, 0.22931399941444397, 1.2847154140472412, -0.524780809879303, -2.364107608795166, 0.5598289370536804, -1.2387962341308594, -1.1843808889389038, 0.7552452087402344, -0.939581036567688, 0.016951756551861763, -1.4687221050262451, -0.2427636682987213, -0.8915198445320129, -1.2210172414779663, 0.7317926287651062, 0.1707795411348343, 0.45286107063293457, -0.7116481065750122, 0.3430541753768921, -2.195328950881958, -1.310619592666626, -0.1663946807384491, -0.9745358228683472, 0.45322781801223755, -0.3416227698326111, 0.5794909000396729, -0.1015881672501564, 0.06774251908063889, 0.27938055992126465, 1.431514859199524, 3.368882656097412, 0.23774144053459167, 0.42216140031814575, -0.17764002084732056, -0.9220399856567383, 1.3781296014785767, 0.9015724658966064, -0.11600938439369202, -0.5821083188056946, -1.0327297449111938, 1.2175594568252563, 1.9846452474594116, 1.0288742780685425, 0.06370564550161362, -0.7650622129440308, -0.7113248705863953, 0.001039806753396988, 0.222854346036911, 0.4983115792274475, 0.9171225428581238, -0.015612386167049408, 0.10087455809116364, 1.3954410552978516, 1.2406872510910034, -0.5320812463760376, 0.387506365776062, -0.8820111751556396, -0.44237154722213745, 0.3980334401130676, 0.2965417504310608, 0.020266611129045486, 0.4007149040699005, -0.9700958728790283, -0.24792437255382538, -0.4055230915546417, -0.9194058179855347, -0.7181832194328308, -0.38424602150917053, -0.3007497787475586, 1.6426317691802979, 0.13580510020256042, -0.4508640170097351, -0.02174551412463188, -0.7397457957267761, -0.13065871596336365, -1.0411674976348877, 0.2327287197113037, -0.05830128490924835, -0.023155607283115387, -0.046206727623939514, 1.788692831993103, -0.9260246753692627, -2.0361852645874023, 0.2450541853904724, 0.14442846179008484, -0.3700031340122223, 0.1841042935848236, 1.72030508518219, 0.47080057859420776, 1.502189040184021, 1.2762367725372314, 0.9622431993484497, -0.6150349974632263, -1.3049942255020142, 0.7448920011520386, 0.9134955406188965, -1.3560853004455566, 0.816550076007843, 0.04756676405668259, -0.5336866974830627, 0.7008287906646729, 1.2640595436096191, 0.46020203828811646, -2.103585958480835, 0.8884003162384033, -0.9818515181541443, 0.7679663300514221, 0.7280697226524353, 0.7444787621498108, 0.252421110868454, 0.8800446391105652, -1.2243098020553589, -1.128073811531067, -0.7938844561576843, -0.652163565158844, 2.0357608795166016, -0.2145977020263672, 0.5609919428825378, -0.13612587749958038, -1.2960275411605835, -0.08385749906301498, 0.7196075916290283, 0.31830158829689026, -0.4238584041595459, 0.8058884143829346, -0.7068079710006714, -1.122578740119934, -1.443731665611267, -0.40271371603012085, -0.9880405068397522, -0.8893113136291504, 1.0590238571166992, 0.8230037689208984, 0.2809869349002838, 1.94235098361969, 0.6178158521652222, 0.2862662672996521, -2.6869795322418213, 0.9955716729164124, 0.32345709204673767, -0.16604192554950714, 0.9124267101287842, 0.3219446837902069, 0.9938750863075256, 0.08064763993024826, 0.49644333124160767, -2.428076982498169, 2.2344698905944824, -0.26937413215637207, 0.7608745098114014, -0.0206310972571373, -0.16250568628311157, 1.1148958206176758, 0.5204137563705444, 0.5892941951751709, -1.1331037282943726, 0.7079221606254578, -0.5673550963401794, 1.174118161201477, 0.9448957443237305, -0.7668959498405457, -0.03299889340996742, 1.3346208333969116, 0.47464337944984436, -0.5274399518966675, -0.8499073386192322, -0.9681977033615112, 0.8814303278923035, 1.7755130529403687, -0.11251377314329147, 0.00007612258195877075, 0.7901947498321533, 0.710409939289093, -1.3077555894851685, 0.040190935134887695, -0.7522228360176086, -0.8286243677139282, 1.599472999572754, 2.0628225803375244, -0.11019129306077957, -0.27009499073028564, -0.7645447850227356, -1.2264125347137451, 0.7755240201950073, -0.05668618530035019, 0.1946837455034256, 0.6115219593048096, -0.7091853022575378, 1.1780529022216797, 0.9119760394096375, 0.9290706515312195, 0.1881381720304489, 0.2545027732849121, 0.4337690770626068, -0.32936331629753113, -1.0621802806854248, -0.28926146030426025, -1.0443142652511597, -2.5231332778930664, 0.47437575459480286, -0.18954116106033325, -1.4040590524673462, 0.04739709943532944, -1.0247082710266113, 0.8639768958091736, -0.5703137516975403, -1.0429929494857788, -1.579461932182312, 0.22961267828941345, -0.13755488395690918, 0.9476149678230286, -1.6521464586257935, -0.12677359580993652, 1.2165827751159668, 0.9257680177688599, -0.5808716416358948, 1.0678569078445435, 0.21193447709083557, 1.012947916984558, 0.916346549987793, -0.4492058753967285, 0.4948232173919678, 0.08574370294809341, -1.2992807626724243, 0.4495896100997925, 1.1353521347045898, 0.19010354578495026, 1.3663811683654785, -0.5504614114761353, 0.021590542048215866, 0.42184317111968994, -0.5831583738327026, -0.506483793258667, -0.4833354651927948, 0.7114472389221191, 0.0671505331993103, -0.9160433411598206, 0.009285124018788338, -0.18102703988552094, -0.2750007212162018, 0.1819593608379364, -1.5558620691299438, -0.2621384263038635, -0.38393688201904297, -0.5395292639732361, -1.2673323154449463, -0.010869067162275314, 1.4357637166976929, -0.7532750964164734, -0.22086521983146667, 0.5274627208709717, 0.491038978099823, 0.4778042435646057, 0.6612871885299683, -0.7019426822662354, -0.39623579382896423, -0.24553009867668152, -0.3583936393260956, 0.3338349163532257, 1.3276965618133545, -0.07977965474128723, -0.9473194479942322, 0.6540758609771729, -0.3428337872028351, 0.0738130509853363, 1.9693422317504883, 0.11845022439956665, -0.7938335537910461, 0.32793816924095154, -0.7658296227455139, 1.9138705730438232, 1.7223320007324219, 1.3683750629425049, -0.130592480301857, -0.9950027465820312, 0.6344451308250427, -0.29465150833129883, -0.3237961232662201, 0.9418685436248779, 0.445075124502182, -0.1748606562614441, -1.40608549118042, 0.5261136293411255, 1.2994372844696045, -0.9096182584762573, -0.7023785710334778, 0.04081868380308151, -0.7960811853408813, 1.0824480056762695, 0.6163286566734314, 0.3414635956287384, 0.19963592290878296, 1.5483688116073608, 0.7447482943534851, -0.5053532123565674, 0.5295701622962952, 0.4614045023918152, -0.16635936498641968, -2.1711251735687256, -1.094404935836792, 0.28965044021606445, -0.4101018011569977, -1.5601694583892822, 1.4203652143478394, -1.108324408531189, -0.9899120330810547, 0.498340368270874, 0.029516706243157387, 1.3940403461456299, 0.3543505072593689, 1.5866117477416992, 2.1732144355773926, 0.864459216594696, 0.3137037754058838, 1.3200539350509644, -0.18840031325817108, -0.4763725697994232, 1.8315616846084595, -0.45347562432289124, 0.439553827047348, 1.09678053855896, -0.3280014097690582, -1.002388596534729, -0.8204305171966553, -1.186705470085144, -0.6894954442977905, 1.1478456258773804, 0.09021783620119095, -1.0753417015075684, 0.24767017364501953, 1.613088607788086, 0.13543173670768738, -0.4058690667152405, 0.5452980399131775, 0.4410770833492279, -0.7503249645233154, -0.11063717305660248, -0.929322361946106, 0.5372028350830078, -0.17243798077106476, -0.36410269141197205, 0.3517915606498718, 0.40173450112342834, 1.24198579788208, 0.03865877538919449, 0.1146983653306961, 1.177340030670166, -1.457340955734253, 1.498426079750061, -0.6319898962974548, 0.29150888323783875, -2.4005038738250732, 1.4401553869247437, -0.7375102043151855, 1.9859403371810913, -2.616878032684326, 0.40540629625320435, -0.6246292591094971, -0.4557468593120575, 0.32269662618637085, -0.31651216745376587, 0.19949299097061157, -0.12275537103414536, -1.0884298086166382, -0.10315253585577011, -0.7268128395080566, 0.5750772953033447, 1.034562110900879, 1.2558563947677612, -1.1050012111663818, -0.3232309818267822, -1.7220624685287476, -0.20371106266975403, -0.693789541721344, 0.2444494068622589, -2.024785280227661, -0.2213047742843628, -1.9407624006271362, -2.3878238201141357, -1.3619657754898071, -0.8190516233444214, 1.0492836236953735, 0.09185397624969482, -0.9228126406669617, 1.1533950567245483, -0.39721912145614624, -1.819458246231079, 1.1306922435760498, -2.0892422199249268 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
Cool thanks ! If I understand correctly in your PoC you store the flattened array of pixels in the feather file. This will take a lot of disk space. Maybe we could just save the encoded bytes and let users apply a `map` to decode/transform them into the format they need for training ? Users can use tf.image to do so for example
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
63
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data Cool thanks ! If I understand correctly in your PoC you store the flattened array of pixels in the feather file. This will take a lot of disk space. Maybe we could just save the encoded bytes and let users apply a `map` to decode/transform them into the format they need for training ? Users can use tf.image to do so for example
[ -1.1808947324752808, -0.9449931383132935, -0.7145631909370422, 1.4141396284103394, -0.16871657967567444, -1.218480110168457, 0.06364137679338455, -1.1471102237701416, 1.687779426574707, -0.7927039265632629, 0.326999306678772, -1.6468055248260498, 0.05990851670503616, -0.6132830381393433, -0.7650818228721619, -0.8545626401901245, -0.4160296320915222, -0.8328422904014587, 1.0366499423980713, 2.5064120292663574, 1.1915366649627686, -1.4454758167266846, 2.6812334060668945, 0.7159557342529297, -0.29160037636756897, -0.9960599541664124, 0.4831174612045288, 0.10578908026218414, -1.1981086730957031, -0.46986737847328186, -0.8766655325889587, -0.06578955799341202, -0.5729348659515381, -0.43771007657051086, -0.08926564455032349, 0.3115960359573364, -0.23442122340202332, -0.33494850993156433, -0.5481037497520447, -0.739769458770752, 0.46908119320869446, -0.374420166015625, 0.9811398983001709, -0.28692862391471863, 1.8821802139282227, -0.5010181069374084, 0.42651936411857605, 0.6990657448768616, 1.3351953029632568, 0.20689648389816284, 0.0074003394693136215, 0.23977556824684143, 0.4087510406970978, -0.14049705862998962, 0.4645369052886963, 1.1213029623031616, 0.7214294672012329, 0.47200751304626465, 0.6683387160301208, -2.195030689239502, 1.341572880744934, -1.0364807844161987, 0.2774217128753662, 1.372470498085022, -0.9056275486946106, 0.43449532985687256, -1.7457536458969116, -0.13253240287303925, 0.6082271337509155, -2.266599416732788, 0.2505287826061249, -1.3195545673370361, -0.5668240785598755, 0.9128463864326477, 0.2636430859565735, -1.2156612873077393, 0.32951703667640686, -0.418923020362854, 1.0438802242279053, 0.42822685837745667, 1.2090140581130981, -1.7107864618301392, -0.0023038717918097973, -0.31484124064445496, 0.07737596333026886, -1.3056796789169312, -1.4721390008926392, 0.5385634303092957, 0.6228588223457336, 0.5280393958091736, -0.05000404268503189, 1.0031087398529053, -1.0195120573043823, 0.8356054425239563, -0.9842528104782104, -1.626030683517456, -1.3781015872955322, -2.242774248123169, -2.2979414463043213, 0.809849202632904, -0.45686760544776917, -0.5964658856391907, 2.0832903385162354, -1.0452684164047241, -1.7334569692611694, 1.2226190567016602, 0.3126737177371979, -0.04782893508672714, 2.4333455562591553, 0.13358497619628906, -0.6754117608070374, 0.40800556540489197, -0.7578485012054443, 0.8187389969825745, -0.4450562298297882, 1.4051283597946167, 0.40731698274612427, -1.057034969329834, 1.5817593336105347, -0.44150304794311523, 0.5169357657432556, -0.6792102456092834, -0.6322053074836731, -0.7737245559692383, 0.3940080404281616, 1.8870857954025269, -0.3345586061477661, 1.5749874114990234, -0.428743451833725, -1.4987304210662842, -1.5815892219543457, 0.8757779002189636, 0.5219053626060486, -0.8920197486877441, 0.06943414360284805, -0.3662417232990265, 0.12590813636779785, 0.019960809499025345, 1.0515378713607788, 1.26192307472229, 0.6382416486740112, -0.3355889916419983, -0.8639125823974609, 0.18166545033454895, -0.17061161994934082, -0.6891588568687439, -1.8820854425430298, -0.2719465494155884, 0.2021573781967163, 0.5966493487358093, -1.2810585498809814, 1.7470791339874268, 0.9309425950050354, 1.997775912284851, 0.9718262553215027, -0.3456456959247589, 1.4684886932373047, -0.014609688892960548, 1.7870291471481323, -0.44860050082206726, 0.7373746633529663, -0.3835779130458832, -1.1494545936584473, 0.807565450668335, -0.328044593334198, -1.9908361434936523, -0.7617084383964539, -0.8172827959060669, -0.24474623799324036, -0.7551746964454651, 0.8729077577590942, -0.2412276268005371, -1.351841926574707, 0.298267126083374, -0.6075496077537537, 0.19290971755981445, -1.1892977952957153, 0.3839556872844696, 0.7189329862594604, -0.6150464415550232, 0.02106321044266224, -0.22095784544944763, -1.2814795970916748, -0.46404677629470825, 0.29610976576805115, 1.8641713857650757, -0.787469744682312, 0.8899367451667786, 1.0580331087112427, -0.630664050579071, 0.008220097050070763, 0.31376975774765015, -0.3283466398715973, 0.8455255031585693, -1.0235940217971802, -0.42686209082603455, 1.1643635034561157, -0.2360365390777588, -0.5850216150283813, 1.43466055393219, 0.729498028755188, -0.9947649240493774, -0.23366838693618774, -0.19087204337120056, -0.8125053644180298, 0.006959313526749611, -1.6313053369522095, -0.1792241334915161, 0.3117348849773407, -1.5155526399612427, -0.4234253764152527, -0.24523624777793884, 1.327233910560608, -0.22002923488616943, 1.4705719947814941, -0.39535605907440186, -0.15357139706611633, -0.418264776468277, -0.4080411195755005, 0.19200164079666138, -0.21273785829544067, -0.6045577526092529, 0.26830852031707764, -0.7577781081199646, 0.4016546308994293, 1.3887313604354858, 0.3192023038864136, 0.03452233597636223, 0.36075925827026367, 1.069896936416626, 0.3828563690185547, -0.05467696860432625, -0.8608981966972351, -1.5317294597625732, 1.9938219785690308, -1.4762791395187378, 2.0539345741271973, 0.8715270161628723, 0.06491073966026306, -1.773216724395752, -1.8784853219985962, 1.3296165466308594, 1.1718884706497192, 2.2769887447357178, 0.5702523589134216, 0.37567001581192017, -0.8046045899391174, -0.5388206839561462, 0.3642171323299408, -1.090028166770935, -0.675078809261322, 0.13253170251846313, 2.3459208011627197, 1.7657428979873657, -0.48283353447914124, -0.17002537846565247, -1.0131489038467407, 1.3561385869979858, -0.0857100710272789, 0.21087044477462769, 2.0614829063415527, -0.34313705563545227, -1.161299228668213, 1.2487332820892334, -2.4374611377716064, 0.08459126949310303, 1.916136384010315, 0.26713359355926514, 0.08721742033958435, -1.3388805389404297, -0.5499590039253235, -0.2977616488933563, -0.44978129863739014, -1.140730381011963, 0.5438868999481201, -0.2575717866420746, -0.8166362643241882, -1.5244656801223755, 0.2085910439491272, -1.2081217765808105, -1.5995800495147705, 0.39612501859664917, 1.8925827741622925, 2.0465190410614014, -0.8039379715919495, 1.538975477218628, -0.32075875997543335, 0.13047614693641663, 1.2512016296386719, 1.2273331880569458, 3.1427836418151855, 1.909103512763977, -1.3324507474899292, 0.5100094079971313, -0.1761571764945984, -0.48495909571647644, 1.1083555221557617, -1.0877398252487183, 1.3063217401504517, -0.10138614475727081, -1.1608335971832275, -1.281347393989563, 0.9291494488716125, 0.47452297806739807, 0.10359114408493042, -0.5662217140197754, 1.119162678718567, 0.1453351378440857, 1.3785561323165894, 0.46536824107170105, -0.34294310212135315, 0.5869061350822449, -0.43671876192092896, -0.504599392414093, 1.5765219926834106, 0.1292240023612976, -1.4156848192214966, -2.3284785747528076, -0.23117142915725708, -0.7716096639633179, 0.025907158851623535, -0.6427291035652161, -0.9831727743148804, 1.6167007684707642, 0.3684845268726349, -1.349194884300232, -0.2639116942882538, -0.32993045449256897, -0.5293831825256348, 2.6248819828033447, -1.4419255256652832, -0.2185070514678955, -0.9809141755104065, -0.6301088333129883, 1.6158530712127686, -1.1684629917144775, -0.23015958070755005, -0.9228782653808594, -0.5950027704238892, -1.28371000289917, -0.47765541076660156, 0.008026417344808578, -0.9450176954269409, 0.741484522819519, 0.2684960961341858, -1.1082385778427124, -0.3691036105155945, -0.854134202003479, 0.8770692944526672, -0.13047631084918976, 0.2621052861213684, 1.8689184188842773, 0.4169979393482208, -0.4317120909690857, 0.6756976842880249, 1.1916602849960327, 0.597941517829895, -0.6390281319618225, 0.17265194654464722, -0.7570633888244629, 0.33425185084342957, -1.3573250770568848, 0.30834829807281494, -2.9052670001983643, 0.6351654529571533, -0.0223032608628273, -0.055250879377126694, 0.08899535238742828, -1.3558562994003296, 1.1415596008300781, 2.642094373703003, -1.1184827089309692, 0.4607779085636139, 0.3140714466571808, 1.1710792779922485, -1.559237003326416, 0.365556538105011, -0.3755109906196594, 2.167343854904175, 0.1794629693031311, 1.259130597114563, -0.522212564945221, -2.324749231338501, 0.5720901489257812, -1.232681155204773, -1.1800826787948608, 0.7935709357261658, -0.9071922898292542, 0.004521608352661133, -1.4546327590942383, -0.24901524186134338, -0.8932839632034302, -1.256231427192688, 0.746173083782196, 0.14738154411315918, 0.4825071394443512, -0.6823787093162537, 0.3288431167602539, -2.209155559539795, -1.3171765804290771, -0.22220242023468018, -0.9635224938392639, 0.4294835329055786, -0.3212234377861023, 0.60857754945755, -0.13063398003578186, 0.08613916486501694, 0.2764967978000641, 1.3785912990570068, 3.365870714187622, 0.27961286902427673, 0.4591986835002899, -0.19883015751838684, -0.932474672794342, 1.36013662815094, 0.9095072150230408, -0.10334296524524689, -0.5587723851203918, -1.0286815166473389, 1.2234824895858765, 1.9379948377609253, 0.9675549268722534, 0.08777207136154175, -0.7597602009773254, -0.6866769790649414, -0.024186380207538605, 0.24063536524772644, 0.48819246888160706, 0.9232465028762817, -0.027671240270137787, 0.12619748711585999, 1.3480186462402344, 1.2713429927825928, -0.5428598523139954, 0.3637370765209198, -0.8454163670539856, -0.4403250813484192, 0.37999701499938965, 0.3216361105442047, -0.0000031674280762672424, 0.3997477889060974, -0.9046696424484253, -0.2565139830112457, -0.43057847023010254, -0.9237791895866394, -0.709587574005127, -0.4110388457775116, -0.35394302010536194, 1.638534665107727, 0.14590805768966675, -0.4268544614315033, -0.005522756837308407, -0.7720333337783813, -0.1252068281173706, -1.052884817123413, 0.23763898015022278, -0.027830254286527634, -0.04482870176434517, -0.05293196067214012, 1.8512943983078003, -0.9256107211112976, -2.0220448970794678, 0.2521721422672272, 0.136775404214859, -0.37440842390060425, 0.2036864161491394, 1.7367368936538696, 0.4383947253227234, 1.5165112018585205, 1.260952115058899, 0.9736000299453735, -0.6348767280578613, -1.3197166919708252, 0.7838238477706909, 0.9655052423477173, -1.38790762424469, 0.8625600337982178, 0.088107630610466, -0.5163945555686951, 0.7330646514892578, 1.235774278640747, 0.47420451045036316, -2.0770936012268066, 0.8617751002311707, -0.9956143498420715, 0.795549750328064, 0.7507131695747375, 0.7244305610656738, 0.23436522483825684, 0.8486933708190918, -1.2080061435699463, -1.145745873451233, -0.754688024520874, -0.6558089852333069, 2.0084238052368164, -0.22842690348625183, 0.5807746648788452, -0.11927654594182968, -1.3054465055465698, -0.08099547028541565, 0.738961398601532, 0.36536905169487, -0.4158177971839905, 0.8331127166748047, -0.672430694103241, -1.1202131509780884, -1.4406492710113525, -0.39117181301116943, -0.993058979511261, -0.8720588088035583, 1.0795323848724365, 0.867290735244751, 0.19685551524162292, 1.9273056983947754, 0.6159356236457825, 0.27586138248443604, -2.6814935207366943, 0.997897744178772, 0.30373260378837585, -0.1867140233516693, 0.9236325025558472, 0.3452194929122925, 0.9650681614875793, 0.08722343295812607, 0.45199427008628845, -2.462794542312622, 2.2781200408935547, -0.2638550102710724, 0.7651714086532593, -0.032790739089250565, -0.12872077524662018, 1.1099835634231567, 0.4876357913017273, 0.5400410294532776, -1.1240410804748535, 0.7105661034584045, -0.5500884056091309, 1.1944832801818848, 0.9526700377464294, -0.7787683010101318, -0.0751461610198021, 1.3386250734329224, 0.5006515979766846, -0.5413687229156494, -0.8408381342887878, -0.9749780297279358, 0.8866547346115112, 1.779297113418579, -0.09062880277633667, -0.0179725494235754, 0.7811866402626038, 0.6861274242401123, -1.2902123928070068, 0.08577405661344528, -0.7193676233291626, -0.8471872210502625, 1.562764286994934, 2.041780471801758, -0.10738993436098099, -0.25612932443618774, -0.7352473139762878, -1.2603068351745605, 0.8108558058738708, -0.03755635768175125, 0.23426085710525513, 0.5720215439796448, -0.7103133797645569, 1.1794406175613403, 0.9408103227615356, 0.8995067477226257, 0.21231013536453247, 0.22331565618515015, 0.4499010443687439, -0.34877145290374756, -1.046423316001892, -0.1875365972518921, -1.059893250465393, -2.5177295207977295, 0.4601040780544281, -0.1885070502758026, -1.412994623184204, 0.01131477765738964, -1.0204792022705078, 0.8878257870674133, -0.5342549085617065, -1.061998963356018, -1.6134244203567505, 0.22452011704444885, -0.13532033562660217, 0.9916008710861206, -1.6448712348937988, -0.11817735433578491, 1.2052518129348755, 0.9086081385612488, -0.6179320812225342, 1.0568684339523315, 0.19167903065681458, 1.0223441123962402, 0.9132876396179199, -0.42919641733169556, 0.47499603033065796, 0.06418457627296448, -1.3213202953338623, 0.4041908085346222, 1.128169059753418, 0.15158218145370483, 1.361307978630066, -0.5374658107757568, 0.028968941420316696, 0.3977804183959961, -0.5031855702400208, -0.5042164921760559, -0.46622785925865173, 0.7217023968696594, 0.07812883704900742, -0.8714814782142639, 0.062358222901821136, -0.18847528100013733, -0.270590603351593, 0.1598210632801056, -1.5477323532104492, -0.26875805854797363, -0.3954482972621918, -0.5607945919036865, -1.2679214477539062, -0.03661977872252464, 1.442334771156311, -0.7140231132507324, -0.1585940420627594, 0.5451357960700989, 0.49341484904289246, 0.4923690855503082, 0.6662498116493225, -0.6277313828468323, -0.39660248160362244, -0.22394835948944092, -0.3375140428543091, 0.37279078364372253, 1.3400144577026367, -0.08323104679584503, -0.9032540917396545, 0.6936405897140503, -0.33916157484054565, 0.0750306099653244, 1.9686917066574097, 0.145461767911911, -0.8191981315612793, 0.3206421732902527, -0.7457422018051147, 1.9045928716659546, 1.7578535079956055, 1.354098916053772, -0.097809799015522, -1.0183935165405273, 0.6325287818908691, -0.3048534691333771, -0.30176040530204773, 0.959808349609375, 0.4422130286693573, -0.2054598331451416, -1.420692801475525, 0.4989061653614044, 1.276944875717163, -0.8754379749298096, -0.7005570530891418, 0.0492909774184227, -0.8108086585998535, 1.0653599500656128, 0.6342049837112427, 0.3782469630241394, 0.21625590324401855, 1.498348355293274, 0.7636712789535522, -0.4984694719314575, 0.5414866209030151, 0.47085756063461304, -0.18477576971054077, -2.162818670272827, -1.1181881427764893, 0.2927968502044678, -0.4563204348087311, -1.5350165367126465, 1.441066026687622, -1.1445363759994507, -1.0400484800338745, 0.5197283625602722, 0.008768834173679352, 1.4341801404953003, 0.34009861946105957, 1.5564920902252197, 2.178152322769165, 0.8788682222366333, 0.3325168192386627, 1.3559613227844238, -0.21920353174209595, -0.46941736340522766, 1.829388976097107, -0.45727062225341797, 0.40776267647743225, 1.0880364179611206, -0.33944380283355713, -1.0015897750854492, -0.7880935072898865, -1.1590856313705444, -0.7025119066238403, 1.1839079856872559, 0.09905106574296951, -1.0241243839263916, 0.2709032893180847, 1.6243212223052979, 0.12001199275255203, -0.3857012689113617, 0.5374539494514465, 0.45610278844833374, -0.762969434261322, -0.09019693732261658, -0.9047173857688904, 0.5566406846046448, -0.12086641043424606, -0.31903892755508423, 0.3857606053352356, 0.38976937532424927, 1.2404677867889404, 0.002730781212449074, 0.15407276153564453, 1.1211289167404175, -1.4997955560684204, 1.4997177124023438, -0.60240638256073, 0.26238709688186646, -2.3847079277038574, 1.4578582048416138, -0.6779901385307312, 1.9980183839797974, -2.6472606658935547, 0.38673949241638184, -0.6562116742134094, -0.4678650200366974, 0.33442315459251404, -0.34367698431015015, 0.21750953793525696, -0.17773741483688354, -1.105120062828064, -0.13658905029296875, -0.69097900390625, 0.5430155992507935, 1.0473403930664062, 1.2436898946762085, -1.0958943367004395, -0.32739508152008057, -1.6987143754959106, -0.1911974549293518, -0.7355207204818726, 0.23071536421775818, -2.0450127124786377, -0.21393975615501404, -1.9447122812271118, -2.3838560581207275, -1.399985909461975, -0.813062846660614, 1.0336096286773682, 0.088228739798069, -0.9179922938346863, 1.1622240543365479, -0.4091285169124603, -1.8477383852005005, 1.1311801671981812, -2.0856683254241943 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
@lhoestq this is what I tried: ```py def read_image(path): with open(path, "rb") as f: return f.read() total_images_written = 0 for step in tqdm.tnrange(int(math.ceil(len(image_paths) / batch_size))): batch_image_paths = image_paths[step * batch_size : (step + 1) * batch_size] batch_image_labels = all_integer_labels[step * batch_size : (step + 1) * batch_size] data = [read_image(path) for path in batch_image_paths] table = pa.Table.from_arrays([data, batch_image_labels], ["data", "labels"]) write_feather(table, f"/tmp/flowers_feather_{step}.feather", chunksize=chunk_size) total_images_written += len(batch_image_paths) print(f"Total images written: {total_images_written}.") del data ``` I got the feather files done (no resizing required as you can see): ```sh ls -lh /tmp/*.feather -rw-r--r-- 1 sayakpaul wheel 64M Jun 24 09:28 /tmp/flowers_feather_0.feather -rw-r--r-- 1 sayakpaul wheel 59M Jun 24 09:28 /tmp/flowers_feather_1.feather -rw-r--r-- 1 sayakpaul wheel 51M Jun 24 09:28 /tmp/flowers_feather_2.feather -rw-r--r-- 1 sayakpaul wheel 45M Jun 24 09:28 /tmp/flowers_feather_3.feather ``` Now there seems to be a problem with `tfio.arrow`: ```py import tensorflow_io.arrow as arrow_io dataset = arrow_io.ArrowFeatherDataset( ["/tmp/flowers_feather_0.feather"], columns=(0, 1), output_types=(tf.string, tf.int64), output_shapes=([], []), batch_mode="auto", ) print(dataset.element_spec) ``` Prints: ``` (TensorSpec(shape=(None,), dtype=tf.string, name=None), TensorSpec(shape=(None,), dtype=tf.int64, name=None)) ``` But when I do `sample = next(iter(dataset))` it goes into: ```py InternalError Traceback (most recent call last) Input In [30], in <cell line: 1>() ----> 1 sample = next(iter(dataset)) File ~/.local/bin/.virtualenvs/jax/lib/python3.8/site-packages/tensorflow/python/data/ops/iterator_ops.py:766, in OwnedIterator.__next__(self) 764 def __next__(self): 765 try: --> 766 return self._next_internal() 767 except errors.OutOfRangeError: 768 raise StopIteration File ~/.local/bin/.virtualenvs/jax/lib/python3.8/site-packages/tensorflow/python/data/ops/iterator_ops.py:749, in OwnedIterator._next_internal(self) 746 # TODO(b/77291417): This runs in sync mode as iterators use an error status 747 # to communicate that there is no more data to iterate over. 748 with context.execution_mode(context.SYNC): --> 749 ret = gen_dataset_ops.iterator_get_next( 750 self._iterator_resource, 751 output_types=self._flat_output_types, 752 output_shapes=self._flat_output_shapes) 754 try: 755 # Fast path for the case `self._structure` is not a nested structure. 756 return self._element_spec._from_compatible_tensor_list(ret) # pylint: disable=protected-access File ~/.local/bin/.virtualenvs/jax/lib/python3.8/site-packages/tensorflow/python/ops/gen_dataset_ops.py:3017, in iterator_get_next(iterator, output_types, output_shapes, name) 3015 return _result 3016 except _core._NotOkStatusException as e: -> 3017 _ops.raise_from_not_ok_status(e, name) 3018 except _core._FallbackException: 3019 pass File ~/.local/bin/.virtualenvs/jax/lib/python3.8/site-packages/tensorflow/python/framework/ops.py:7164, in raise_from_not_ok_status(e, name) 7162 def raise_from_not_ok_status(e, name): 7163 e.message += (" name: " + name if name is not None else "") -> 7164 raise core._status_to_exception(e) from None InternalError: Invalid: INVALID_ARGUMENT: arrow data type 0x7ff9899d8038 is not supported: Type error: Arrow data type is not supported [Op:IteratorGetNext] ``` Some additional notes: * I can actually decode an image encoded with `read_image()` (shown earlier): ```py sample_image_path = image_paths[0] encoded_image = read_image(sample_image_path) image = tf.image.decode_png(encoded_image, 3) print(image.shape) ``` * If the above `tf.data.Dataset` object would have succeeded my plan was to just map the decoder like so: ```py autotune = tf.data.AUTOTUNE dataset = dataset.map(lambda x, y: (tf.image.decode_png(x, 3), y), num_parallel_calls=autotune) ```
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
413
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data @lhoestq this is what I tried: ```py def read_image(path): with open(path, "rb") as f: return f.read() total_images_written = 0 for step in tqdm.tnrange(int(math.ceil(len(image_paths) / batch_size))): batch_image_paths = image_paths[step * batch_size : (step + 1) * batch_size] batch_image_labels = all_integer_labels[step * batch_size : (step + 1) * batch_size] data = [read_image(path) for path in batch_image_paths] table = pa.Table.from_arrays([data, batch_image_labels], ["data", "labels"]) write_feather(table, f"/tmp/flowers_feather_{step}.feather", chunksize=chunk_size) total_images_written += len(batch_image_paths) print(f"Total images written: {total_images_written}.") del data ``` I got the feather files done (no resizing required as you can see): ```sh ls -lh /tmp/*.feather -rw-r--r-- 1 sayakpaul wheel 64M Jun 24 09:28 /tmp/flowers_feather_0.feather -rw-r--r-- 1 sayakpaul wheel 59M Jun 24 09:28 /tmp/flowers_feather_1.feather -rw-r--r-- 1 sayakpaul wheel 51M Jun 24 09:28 /tmp/flowers_feather_2.feather -rw-r--r-- 1 sayakpaul wheel 45M Jun 24 09:28 /tmp/flowers_feather_3.feather ``` Now there seems to be a problem with `tfio.arrow`: ```py import tensorflow_io.arrow as arrow_io dataset = arrow_io.ArrowFeatherDataset( ["/tmp/flowers_feather_0.feather"], columns=(0, 1), output_types=(tf.string, tf.int64), output_shapes=([], []), batch_mode="auto", ) print(dataset.element_spec) ``` Prints: ``` (TensorSpec(shape=(None,), dtype=tf.string, name=None), TensorSpec(shape=(None,), dtype=tf.int64, name=None)) ``` But when I do `sample = next(iter(dataset))` it goes into: ```py InternalError Traceback (most recent call last) Input In [30], in <cell line: 1>() ----> 1 sample = next(iter(dataset)) File ~/.local/bin/.virtualenvs/jax/lib/python3.8/site-packages/tensorflow/python/data/ops/iterator_ops.py:766, in OwnedIterator.__next__(self) 764 def __next__(self): 765 try: --> 766 return self._next_internal() 767 except errors.OutOfRangeError: 768 raise StopIteration File ~/.local/bin/.virtualenvs/jax/lib/python3.8/site-packages/tensorflow/python/data/ops/iterator_ops.py:749, in OwnedIterator._next_internal(self) 746 # TODO(b/77291417): This runs in sync mode as iterators use an error status 747 # to communicate that there is no more data to iterate over. 748 with context.execution_mode(context.SYNC): --> 749 ret = gen_dataset_ops.iterator_get_next( 750 self._iterator_resource, 751 output_types=self._flat_output_types, 752 output_shapes=self._flat_output_shapes) 754 try: 755 # Fast path for the case `self._structure` is not a nested structure. 756 return self._element_spec._from_compatible_tensor_list(ret) # pylint: disable=protected-access File ~/.local/bin/.virtualenvs/jax/lib/python3.8/site-packages/tensorflow/python/ops/gen_dataset_ops.py:3017, in iterator_get_next(iterator, output_types, output_shapes, name) 3015 return _result 3016 except _core._NotOkStatusException as e: -> 3017 _ops.raise_from_not_ok_status(e, name) 3018 except _core._FallbackException: 3019 pass File ~/.local/bin/.virtualenvs/jax/lib/python3.8/site-packages/tensorflow/python/framework/ops.py:7164, in raise_from_not_ok_status(e, name) 7162 def raise_from_not_ok_status(e, name): 7163 e.message += (" name: " + name if name is not None else "") -> 7164 raise core._status_to_exception(e) from None InternalError: Invalid: INVALID_ARGUMENT: arrow data type 0x7ff9899d8038 is not supported: Type error: Arrow data type is not supported [Op:IteratorGetNext] ``` Some additional notes: * I can actually decode an image encoded with `read_image()` (shown earlier): ```py sample_image_path = image_paths[0] encoded_image = read_image(sample_image_path) image = tf.image.decode_png(encoded_image, 3) print(image.shape) ``` * If the above `tf.data.Dataset` object would have succeeded my plan was to just map the decoder like so: ```py autotune = tf.data.AUTOTUNE dataset = dataset.map(lambda x, y: (tf.image.decode_png(x, 3), y), num_parallel_calls=autotune) ```
[ -1.3012644052505493, -0.954861044883728, -0.6956222057342529, 1.4538060426712036, -0.15494462847709656, -1.2501450777053833, 0.12270443886518478, -1.1340508460998535, 1.6642374992370605, -0.7863801121711731, 0.32644835114479065, -1.592573881149292, 0.058229848742485046, -0.6252679824829102, -0.7881214618682861, -0.8208779692649841, -0.4219633936882019, -0.840853750705719, 1.1066046953201294, 2.4702227115631104, 1.2557016611099243, -1.448594331741333, 2.7685275077819824, 0.7785782217979431, -0.29169604182243347, -1.0447218418121338, 0.44684022665023804, 0.034827765077352524, -1.2329468727111816, -0.5055900812149048, -0.8608872294425964, -0.06720314174890518, -0.570688784122467, -0.44860580563545227, -0.06257026642560959, 0.37462952733039856, -0.23993512988090515, -0.399187833070755, -0.5990764498710632, -0.739109992980957, 0.4944634437561035, -0.38543686270713806, 0.9657331705093384, -0.26496633887290955, 1.809649109840393, -0.5719462037086487, 0.4473758637905121, 0.7158657908439636, 1.3896970748901367, 0.1668114960193634, -0.010590202175080776, 0.3176208734512329, 0.3812849223613739, -0.10126739740371704, 0.5134352445602417, 1.1800510883331299, 0.756084680557251, 0.48293671011924744, 0.7073062062263489, -2.1905786991119385, 1.324463963508606, -1.0813745260238647, 0.29760661721229553, 1.3329319953918457, -0.9372191429138184, 0.38817697763442993, -1.7257492542266846, -0.12192099541425705, 0.6520724892616272, -2.2255873680114746, 0.3110481798648834, -1.271815299987793, -0.5425340533256531, 0.9575545787811279, 0.3288305103778839, -1.1658796072006226, 0.25151383876800537, -0.47116321325302124, 1.0392911434173584, 0.391830176115036, 1.1176706552505493, -1.6856350898742676, 0.018162963911890984, -0.2917516529560089, 0.08913396298885345, -1.26638925075531, -1.5070695877075195, 0.5694091320037842, 0.613740861415863, 0.5562753081321716, -0.1225426122546196, 1.0444713830947876, -1.0574287176132202, 0.8271060585975647, -1.0595730543136597, -1.6146316528320312, -1.464288592338562, -2.290475368499756, -2.200852632522583, 0.7169772982597351, -0.4621472954750061, -0.6000750660896301, 2.0721068382263184, -1.022761583328247, -1.7183747291564941, 1.2013765573501587, 0.2911882996559143, 0.025248754769563675, 2.373551845550537, 0.15178409218788147, -0.7023130059242249, 0.42802590131759644, -0.7765067219734192, 0.8472130298614502, -0.41067203879356384, 1.3997873067855835, 0.35558226704597473, -1.0106052160263062, 1.5357416868209839, -0.39404046535491943, 0.5756321549415588, -0.6602702736854553, -0.572727620601654, -0.8278899788856506, 0.4271072745323181, 1.8685224056243896, -0.29880863428115845, 1.5085971355438232, -0.4345080256462097, -1.5176342725753784, -1.5702122449874878, 0.8547453880310059, 0.550584077835083, -0.8424080610275269, 0.12141496688127518, -0.49667856097221375, 0.16814255714416504, -0.011195565573871136, 1.1353129148483276, 1.265395164489746, 0.6374809741973877, -0.416593462228775, -0.8856460452079773, 0.19543004035949707, -0.1208440288901329, -0.7331479787826538, -1.8438701629638672, -0.286883145570755, 0.170171320438385, 0.5939252376556396, -1.2337273359298706, 1.7598896026611328, 0.9369316697120667, 1.9708625078201294, 0.9924232959747314, -0.3360876441001892, 1.478432536125183, 0.0029801595956087112, 1.7973432540893555, -0.4914263188838959, 0.7092952132225037, -0.33372819423675537, -1.1384785175323486, 0.8375285267829895, -0.33202406764030457, -2.0916237831115723, -0.7944971323013306, -0.7222986817359924, -0.288381427526474, -0.8039533495903015, 0.9070903658866882, -0.2693246901035309, -1.3698704242706299, 0.2582657039165497, -0.6774260997772217, 0.20325982570648193, -1.1637539863586426, 0.31811580061912537, 0.6939071416854858, -0.6361469626426697, 0.030514072626829147, -0.20323309302330017, -1.2572355270385742, -0.44303545355796814, 0.2634846568107605, 1.8394689559936523, -0.7667863965034485, 0.8891278505325317, 1.0974760055541992, -0.6148664951324463, 0.03961441293358803, 0.27268216013908386, -0.29448896646499634, 0.874838650226593, -1.0476551055908203, -0.457414835691452, 1.1997880935668945, -0.23780250549316406, -0.5853581428527832, 1.5089771747589111, 0.7182275652885437, -0.9918152689933777, -0.2542346715927124, -0.14043894410133362, -0.8906721472740173, 0.049933526664972305, -1.6056114435195923, -0.17243361473083496, 0.423931360244751, -1.532240867614746, -0.4145861864089966, -0.23229804635047913, 1.3381863832473755, -0.1962917447090149, 1.4829312562942505, -0.4027225375175476, -0.11209727078676224, -0.3376674950122833, -0.3581581115722656, 0.1949058175086975, -0.16609951853752136, -0.6160025000572205, 0.20121294260025024, -0.8211519122123718, 0.39828920364379883, 1.436245083808899, 0.34656453132629395, 0.05563338100910187, 0.3719586133956909, 1.0718294382095337, 0.3662954866886139, -0.0681103765964508, -0.8323652148246765, -1.5612270832061768, 2.0155255794525146, -1.465522289276123, 2.0373377799987793, 0.8729246854782104, 0.05076727271080017, -1.7411714792251587, -1.8242508172988892, 1.3158537149429321, 1.1431756019592285, 2.3093578815460205, 0.5329594612121582, 0.3617725670337677, -0.8431164026260376, -0.6134474873542786, 0.3407394587993622, -1.1053913831710815, -0.6386104822158813, 0.12292418628931046, 2.3640596866607666, 1.811933159828186, -0.43054747581481934, -0.15938803553581238, -0.9577846527099609, 1.3988025188446045, -0.15255165100097656, 0.2549290359020233, 2.038506507873535, -0.26463642716407776, -1.0736066102981567, 1.3054105043411255, -2.4472897052764893, 0.14345258474349976, 1.9486843347549438, 0.3237277567386627, 0.12098554521799088, -1.3187435865402222, -0.490838885307312, -0.35366329550743103, -0.4084200859069824, -1.1870877742767334, 0.5464930534362793, -0.22026553750038147, -0.8328661918640137, -1.455777883529663, 0.2159605324268341, -1.1880232095718384, -1.624190092086792, 0.42017874121665955, 1.866775393486023, 2.0706324577331543, -0.8092910051345825, 1.5515648126602173, -0.35503318905830383, 0.1907394826412201, 1.2004499435424805, 1.2325233221054077, 3.075371026992798, 1.885425090789795, -1.3360048532485962, 0.506245493888855, -0.22976070642471313, -0.5180678367614746, 1.0695044994354248, -1.1786621809005737, 1.288328766822815, -0.048073913902044296, -1.1641870737075806, -1.2495646476745605, 1.0006661415100098, 0.5297482013702393, 0.0737195834517479, -0.5544155240058899, 1.1136842966079712, 0.10233346372842789, 1.3541373014450073, 0.4985780119895935, -0.34947651624679565, 0.5849541425704956, -0.40482065081596375, -0.5185354948043823, 1.554384469985962, 0.1297703981399536, -1.4294360876083374, -2.2811732292175293, -0.1950037181377411, -0.8084986805915833, 0.06150319427251816, -0.657770574092865, -0.9717242121696472, 1.6215077638626099, 0.30126237869262695, -1.3332191705703735, -0.2722153961658478, -0.31407687067985535, -0.5067271590232849, 2.6708858013153076, -1.3542338609695435, -0.21388733386993408, -0.9743903279304504, -0.6184307336807251, 1.635650634765625, -1.1618629693984985, -0.28441447019577026, -0.9532675743103027, -0.5851850509643555, -1.2387434244155884, -0.5433250069618225, 0.02723657339811325, -0.9234376549720764, 0.7656201124191284, 0.24963530898094177, -1.149273157119751, -0.382240891456604, -0.8323529362678528, 0.9547520279884338, -0.16679051518440247, 0.22813135385513306, 1.829622507095337, 0.34052857756614685, -0.3871414065361023, 0.7904319167137146, 1.200548768043518, 0.633056640625, -0.5984134078025818, 0.1213066503405571, -0.7300978899002075, 0.3236538767814636, -1.328770399093628, 0.33071595430374146, -2.918938636779785, 0.6797481775283813, 0.003079555928707123, -0.044322993606328964, 0.03592338785529137, -1.3883715867996216, 1.1347572803497314, 2.6731386184692383, -1.145464301109314, 0.4496508240699768, 0.34708109498023987, 1.1340744495391846, -1.5610295534133911, 0.32628676295280457, -0.400747686624527, 2.136922836303711, 0.22879528999328613, 1.3133118152618408, -0.5025311708450317, -2.3384835720062256, 0.6159719824790955, -1.2672613859176636, -1.177475094795227, 0.7441051602363586, -0.950818657875061, 0.08250188082456589, -1.4671568870544434, -0.2898221015930176, -0.958850085735321, -1.2116392850875854, 0.6791237592697144, 0.18028771877288818, 0.40589722990989685, -0.6759188771247864, 0.2580030858516693, -2.2501516342163086, -1.315549612045288, -0.1881704330444336, -0.9449249505996704, 0.4742491841316223, -0.3882027864456177, 0.6045182347297668, -0.08192865550518036, 0.036345794796943665, 0.33812931180000305, 1.438477873802185, 3.394172430038452, 0.2654995620250702, 0.39315131306648254, -0.21562626957893372, -0.8805781006813049, 1.3991988897323608, 0.8809332847595215, -0.10409551858901978, -0.5675201416015625, -1.0527093410491943, 1.2980595827102661, 1.9417308568954468, 0.9207530617713928, 0.02652984857559204, -0.8312852382659912, -0.704670786857605, -0.05958414077758789, 0.1929549276828766, 0.4635911285877228, 0.9088701009750366, 0.012012738734483719, 0.074588842689991, 1.4098241329193115, 1.2073194980621338, -0.5050260424613953, 0.3241858184337616, -0.872808575630188, -0.4180571436882019, 0.41326621174812317, 0.27629324793815613, 0.012268878519535065, 0.38187175989151, -0.9416913390159607, -0.25470855832099915, -0.39993569254875183, -0.8231435418128967, -0.7389605045318604, -0.4264397919178009, -0.37298932671546936, 1.603080153465271, 0.16802597045898438, -0.4771169424057007, -0.02783478982746601, -0.7272554039955139, -0.16436386108398438, -1.0416789054870605, 0.2260134220123291, -0.016584672033786774, -0.09918355941772461, -0.16046419739723206, 1.7949485778808594, -0.8953694701194763, -2.0308568477630615, 0.2520557641983032, 0.15752336382865906, -0.31476202607154846, 0.20166930556297302, 1.7592356204986572, 0.4943416714668274, 1.47544264793396, 1.2667640447616577, 0.9381455779075623, -0.617359459400177, -1.2605836391448975, 0.7844874858856201, 0.9688277244567871, -1.3842607736587524, 0.8288192749023438, 0.02833990380167961, -0.49612775444984436, 0.70689457654953, 1.2552584409713745, 0.47154149413108826, -2.109304666519165, 0.8640586733818054, -1.0664921998977661, 0.8409345149993896, 0.7540796995162964, 0.6532228589057922, 0.23601865768432617, 0.8858919143676758, -1.2099553346633911, -1.1399023532867432, -0.7785327434539795, -0.7118947505950928, 2.049119472503662, -0.32395464181900024, 0.6121833324432373, -0.15846768021583557, -1.3170448541641235, -0.09443940967321396, 0.7053897976875305, 0.31480398774147034, -0.4420202672481537, 0.8223024010658264, -0.7156272530555725, -1.134582757949829, -1.3849468231201172, -0.39444926381111145, -0.9975069761276245, -0.9347726106643677, 1.0619271993637085, 0.7970812320709229, 0.26995792984962463, 1.8772119283676147, 0.6478899121284485, 0.27911484241485596, -2.6378440856933594, 0.9597188234329224, 0.2522246539592743, -0.11515826731920242, 0.9156152009963989, 0.36460334062576294, 0.9532148838043213, 0.11186201870441437, 0.4609520435333252, -2.465426206588745, 2.2803635597229004, -0.2529667317867279, 0.739574670791626, -0.047107964754104614, -0.18686199188232422, 1.1516839265823364, 0.535484790802002, 0.545823335647583, -1.0859135389328003, 0.6757247447967529, -0.5262660384178162, 1.2199945449829102, 0.8924165368080139, -0.7752974033355713, -0.08381715416908264, 1.3496828079223633, 0.4588248133659363, -0.5394443869590759, -0.8882020115852356, -0.9853659272193909, 0.9395571351051331, 1.7461960315704346, -0.07713476568460464, -0.007032432127743959, 0.7560558319091797, 0.6913209557533264, -1.2224819660186768, 0.03529252111911774, -0.7150412201881409, -0.7790786027908325, 1.5869503021240234, 2.0914289951324463, -0.1462198793888092, -0.22189843654632568, -0.6926760673522949, -1.2563166618347168, 0.8209720849990845, -0.13913550972938538, 0.16368049383163452, 0.5757688283920288, -0.6646050214767456, 1.0899556875228882, 0.9071570634841919, 0.8881710767745972, 0.13383245468139648, 0.2095404863357544, 0.4291762709617615, -0.34576380252838135, -1.0706307888031006, -0.2609623670578003, -1.0620778799057007, -2.510186195373535, 0.40948188304901123, -0.17544329166412354, -1.4278885126113892, 0.03488440066576004, -1.0259932279586792, 0.9314424991607666, -0.5223785638809204, -1.044311761856079, -1.5798176527023315, 0.23288309574127197, -0.06695828586816788, 0.9669183492660522, -1.5991346836090088, -0.13490691781044006, 1.1787797212600708, 0.8296259641647339, -0.6008068919181824, 1.0274795293807983, 0.19580048322677612, 1.0083539485931396, 0.8888968825340271, -0.3894486725330353, 0.48199886083602905, 0.05708087235689163, -1.3478426933288574, 0.4560287296772003, 1.1588486433029175, 0.1617334485054016, 1.435434103012085, -0.46196919679641724, 0.039747901260852814, 0.3824647068977356, -0.6400853395462036, -0.4527209997177124, -0.434256374835968, 0.7250387668609619, 0.0547201931476593, -0.8832252025604248, -0.02968442067503929, -0.14860457181930542, -0.3116197884082794, 0.16135329008102417, -1.5459223985671997, -0.2076376974582672, -0.3808235824108124, -0.560154914855957, -1.252397060394287, -0.027689114212989807, 1.4389793872833252, -0.7598128914833069, -0.22305962443351746, 0.5170304179191589, 0.432578980922699, 0.5524899363517761, 0.6925994753837585, -0.6656945943832397, -0.3559463918209076, -0.22237002849578857, -0.2755618393421173, 0.34794601798057556, 1.3270806074142456, -0.005538107827305794, -0.8986597061157227, 0.6985545754432678, -0.3723534345626831, 0.07732739299535751, 1.9178295135498047, 0.14469319581985474, -0.7666690945625305, 0.3642246127128601, -0.7755379676818848, 1.924854040145874, 1.7007378339767456, 1.3030203580856323, -0.11756833642721176, -0.9935333132743835, 0.6312854290008545, -0.3710964024066925, -0.328229695558548, 0.8798825144767761, 0.4126429259777069, -0.2617117464542389, -1.4083601236343384, 0.6122819185256958, 1.2919782400131226, -0.8489071130752563, -0.7709653377532959, 0.10712376236915588, -0.7886919975280762, 1.1303067207336426, 0.5939550399780273, 0.35221555829048157, 0.2336130142211914, 1.5383825302124023, 0.7919476628303528, -0.49175068736076355, 0.5420529842376709, 0.5429099202156067, -0.18097910284996033, -2.193708896636963, -1.1432894468307495, 0.3235991597175598, -0.43467432260513306, -1.5389405488967896, 1.390700101852417, -1.1288952827453613, -1.052221417427063, 0.5312979817390442, 0.04279923811554909, 1.3770604133605957, 0.38761889934539795, 1.5320461988449097, 2.1407861709594727, 0.8536805510520935, 0.37404119968414307, 1.3063184022903442, -0.19041407108306885, -0.5015609264373779, 1.8425023555755615, -0.4339553415775299, 0.44698718190193176, 1.0928553342819214, -0.3461686670780182, -1.0729488134384155, -0.8068575859069824, -1.1792759895324707, -0.7441080808639526, 1.16261625289917, 0.10820002853870392, -1.0311599969863892, 0.24883180856704712, 1.6238034963607788, 0.1487312614917755, -0.35583728551864624, 0.5521205067634583, 0.4082489609718323, -0.7668996453285217, -0.08958566188812256, -0.9041181206703186, 0.5333238840103149, -0.22359544038772583, -0.32093992829322815, 0.36232271790504456, 0.43051496148109436, 1.2593064308166504, -0.055416230112314224, 0.10600212961435318, 1.0469532012939453, -1.4986821413040161, 1.4894031286239624, -0.6016334891319275, 0.2963535785675049, -2.3911759853363037, 1.3938775062561035, -0.6956218481063843, 2.0448412895202637, -2.680804967880249, 0.4116156995296478, -0.6332683563232422, -0.5151750445365906, 0.3023843467235565, -0.29972410202026367, 0.1696350872516632, -0.14193487167358398, -1.124373197555542, -0.057564932852983475, -0.6436731219291687, 0.5900450348854065, 1.0666978359222412, 1.29372239112854, -1.1132550239562988, -0.28302687406539917, -1.6894516944885254, -0.1522459089756012, -0.7772781848907471, 0.2779247462749481, -2.02636456489563, -0.18304535746574402, -1.9399733543395996, -2.3387885093688965, -1.3369768857955933, -0.7817399501800537, 1.0549829006195068, 0.15105286240577698, -0.8887476921081543, 1.205483078956604, -0.4486042559146881, -1.8383055925369263, 1.1113988161087036, -2.1013944149017334 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
@lhoestq I think I was able to make it work in the way you were envisioning. Here's the PoC: https://gist.github.com/sayakpaul/f7d5cc312cd01cb31098fad3fd9c6b59#file-feather-tf-poc-bytes-ipynb Some details: * I am currently serializing the images as strings with `base64`). In comparison to the flattened arrays as before, the size of the individual feather files has reduced (144 MB -> 85 MB, largest). * When decoding, I am first decoding the base64 string and then decoding that string (with `tf.io.decode_base64`) as an image with `tf.image.decode_png()`. * The entire workflow (from generating the Feather files to loading them and preparing the batched `tf.data` pipeline) involves the following libraries: `pyarraow`, `tensorflow-io`, and `tensorflow`. Cc: @Rocketknight1 @gante
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
107
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data @lhoestq I think I was able to make it work in the way you were envisioning. Here's the PoC: https://gist.github.com/sayakpaul/f7d5cc312cd01cb31098fad3fd9c6b59#file-feather-tf-poc-bytes-ipynb Some details: * I am currently serializing the images as strings with `base64`). In comparison to the flattened arrays as before, the size of the individual feather files has reduced (144 MB -> 85 MB, largest). * When decoding, I am first decoding the base64 string and then decoding that string (with `tf.io.decode_base64`) as an image with `tf.image.decode_png()`. * The entire workflow (from generating the Feather files to loading them and preparing the batched `tf.data` pipeline) involves the following libraries: `pyarraow`, `tensorflow-io`, and `tensorflow`. Cc: @Rocketknight1 @gante
[ -1.2177397012710571, -0.917058527469635, -0.7127794027328491, 1.368595004081726, -0.15881338715553284, -1.2307963371276855, 0.07835494726896286, -1.1649278402328491, 1.6720393896102905, -0.7519320845603943, 0.298772931098938, -1.6381115913391113, 0.0464857742190361, -0.5990262627601624, -0.7537241578102112, -0.8299382925033569, -0.4018968641757965, -0.8806896805763245, 1.0732135772705078, 2.512812614440918, 1.2012438774108887, -1.4394861459732056, 2.717573881149292, 0.7056523561477661, -0.28255781531333923, -0.9907267689704895, 0.47131791710853577, 0.07431734353303909, -1.2368568181991577, -0.5124169588088989, -0.9209766983985901, -0.04363711178302765, -0.5860125422477722, -0.4652872383594513, -0.026233911514282227, 0.35394373536109924, -0.1869048923254013, -0.3517266511917114, -0.5553346872329712, -0.720045804977417, 0.4887634813785553, -0.3689894676208496, 0.9892510771751404, -0.29668959975242615, 1.859267234802246, -0.5103099346160889, 0.4272352159023285, 0.6827071309089661, 1.380013346672058, 0.1947467029094696, -0.018448013812303543, 0.2878183424472809, 0.3836930990219116, -0.07695178687572479, 0.4494636058807373, 1.1469837427139282, 0.722362220287323, 0.4488176703453064, 0.7094336152076721, -2.178422451019287, 1.31830894947052, -1.0259535312652588, 0.2985232174396515, 1.3448009490966797, -0.9246011972427368, 0.40784406661987305, -1.8096139430999756, -0.08644559234380722, 0.5662746429443359, -2.2968266010284424, 0.22475971281528473, -1.2892755270004272, -0.559336245059967, 0.9303542971611023, 0.24586088955402374, -1.2354072332382202, 0.31668901443481445, -0.4453098177909851, 1.0423882007598877, 0.4455322325229645, 1.2236590385437012, -1.6904164552688599, 0.020070381462574005, -0.3029637336730957, 0.13548709452152252, -1.2720763683319092, -1.5037665367126465, 0.5339685082435608, 0.6207737922668457, 0.5265694260597229, -0.0979241281747818, 1.0080474615097046, -1.0035399198532104, 0.824803352355957, -0.9633544087409973, -1.6331255435943604, -1.3980087041854858, -2.2178070545196533, -2.272799253463745, 0.8106839060783386, -0.48218002915382385, -0.5583303570747375, 2.1037168502807617, -1.0524064302444458, -1.7351553440093994, 1.2038031816482544, 0.3206811547279358, -0.03163302689790726, 2.3892741203308105, 0.1483955830335617, -0.7174423336982727, 0.4215840697288513, -0.7520864009857178, 0.8585940599441528, -0.4212356209754944, 1.3932369947433472, 0.4174102544784546, -0.9934698939323425, 1.5770468711853027, -0.39943403005599976, 0.5447998046875, -0.6672619581222534, -0.6005008816719055, -0.7819211483001709, 0.40210944414138794, 1.9549839496612549, -0.3105494976043701, 1.591045618057251, -0.4208533763885498, -1.5673551559448242, -1.5416125059127808, 0.8753327131271362, 0.5840850472450256, -0.8795855641365051, 0.08564577251672745, -0.4031302332878113, 0.1266477257013321, 0.03085996024310589, 1.0382627248764038, 1.2726753950119019, 0.6445017457008362, -0.3110051453113556, -0.8733880519866943, 0.21523623168468475, -0.11229689419269562, -0.665166974067688, -1.8665223121643066, -0.2720112204551697, 0.16966573894023895, 0.6265274882316589, -1.3152625560760498, 1.7378727197647095, 0.914259672164917, 2.0033252239227295, 0.9408049583435059, -0.35217878222465515, 1.5100044012069702, 0.012320661917328835, 1.7783704996109009, -0.4455612897872925, 0.7060701847076416, -0.3843723237514496, -1.147249698638916, 0.8311699628829956, -0.355659544467926, -1.9898974895477295, -0.7332762479782104, -0.8200275301933289, -0.24998752772808075, -0.7907447814941406, 0.8723174333572388, -0.23971517384052277, -1.3553593158721924, 0.2963820695877075, -0.5940443873405457, 0.17084959149360657, -1.2358546257019043, 0.35119691491127014, 0.7379894256591797, -0.6646307706832886, 0.033872731029987335, -0.2533351182937622, -1.3144694566726685, -0.4904670715332031, 0.28705739974975586, 1.845574975013733, -0.7732452154159546, 0.9160470366477966, 1.0700541734695435, -0.6629511117935181, 0.013143571093678474, 0.3382734954357147, -0.3279963433742523, 0.8360736966133118, -1.0566788911819458, -0.38990893959999084, 1.1437143087387085, -0.2243884652853012, -0.5288906097412109, 1.3992730379104614, 0.7004714012145996, -1.0275391340255737, -0.2456967979669571, -0.16828352212905884, -0.8411182165145874, 0.015469666570425034, -1.6202337741851807, -0.18762776255607605, 0.2984994351863861, -1.545542597770691, -0.4630586802959442, -0.25376415252685547, 1.3011969327926636, -0.1973075270652771, 1.4766716957092285, -0.3617278039455414, -0.1578550785779953, -0.3895232081413269, -0.425688236951828, 0.1923302859067917, -0.18869082629680634, -0.6446901559829712, 0.2823689877986908, -0.7957133054733276, 0.3735083043575287, 1.4079395532608032, 0.3604942262172699, -0.001294194720685482, 0.4133007228374481, 1.0827661752700806, 0.39159253239631653, -0.07446948438882828, -0.8704721331596375, -1.5486773252487183, 2.010518789291382, -1.5073318481445312, 2.0062718391418457, 0.853317141532898, 0.0646314024925232, -1.7734538316726685, -1.8479307889938354, 1.3666435480117798, 1.202315330505371, 2.3119399547576904, 0.5740243792533875, 0.3839261531829834, -0.7927467823028564, -0.5407023429870605, 0.3652040958404541, -1.0794308185577393, -0.7368190884590149, 0.11226089298725128, 2.370150566101074, 1.7353500127792358, -0.49439558386802673, -0.22067157924175262, -0.9608166217803955, 1.3467892408370972, -0.11763090640306473, 0.21973071992397308, 2.0409417152404785, -0.30214962363243103, -1.1155277490615845, 1.2600023746490479, -2.4170830249786377, 0.12655235826969147, 1.9394985437393188, 0.29472649097442627, 0.12504942715168, -1.360940933227539, -0.5694290995597839, -0.2807598114013672, -0.4632132947444916, -1.1551309823989868, 0.5720236301422119, -0.25126829743385315, -0.8308920860290527, -1.5465954542160034, 0.1977851688861847, -1.2115843296051025, -1.6227558851242065, 0.4042115807533264, 1.9576374292373657, 2.027116298675537, -0.7650278210639954, 1.5071156024932861, -0.3443375825881958, 0.17656777799129486, 1.2290126085281372, 1.2130306959152222, 3.1347851753234863, 1.8983012437820435, -1.281111717224121, 0.5370583534240723, -0.20484602451324463, -0.4946902096271515, 1.072967290878296, -1.0879837274551392, 1.258742332458496, -0.10299720615148544, -1.1378377676010132, -1.2186826467514038, 0.9111882448196411, 0.4689544141292572, 0.06928525120019913, -0.5271203517913818, 1.1189849376678467, 0.08989931643009186, 1.3528238534927368, 0.4826764166355133, -0.36292871832847595, 0.584518551826477, -0.407892644405365, -0.5092360377311707, 1.5920207500457764, 0.1098209097981453, -1.4371289014816284, -2.29931378364563, -0.20767977833747864, -0.7775918841362, 0.05695992708206177, -0.6273714900016785, -0.98265141248703, 1.5820565223693848, 0.374581903219223, -1.2929949760437012, -0.24571967124938965, -0.344190776348114, -0.5342507362365723, 2.581907272338867, -1.4378629922866821, -0.23821844160556793, -0.9383571743965149, -0.6101033091545105, 1.6095938682556152, -1.1557945013046265, -0.2695193290710449, -0.9407821297645569, -0.5625407099723816, -1.2705575227737427, -0.5272052884101868, 0.029881710186600685, -0.9023283123970032, 0.7266238331794739, 0.24724702537059784, -1.120653748512268, -0.3282679319381714, -0.8657041192054749, 0.8972629308700562, -0.09295599907636642, 0.23965004086494446, 1.8846780061721802, 0.39333468675613403, -0.3971255123615265, 0.70323246717453, 1.2064380645751953, 0.5788432359695435, -0.6160353422164917, 0.14616556465625763, -0.7576431632041931, 0.33625492453575134, -1.3759405612945557, 0.31872665882110596, -2.8849899768829346, 0.6707593202590942, -0.01906653493642807, -0.05026751756668091, 0.06888142228126526, -1.380293369293213, 1.1331888437271118, 2.6802902221679688, -1.1497490406036377, 0.4202960729598999, 0.36232390999794006, 1.1942626237869263, -1.5389310121536255, 0.32308247685432434, -0.39142268896102905, 2.1637609004974365, 0.2006019800901413, 1.2683426141738892, -0.5145654678344727, -2.3732473850250244, 0.5634063482284546, -1.2401084899902344, -1.2013566493988037, 0.7621616125106812, -0.9009060859680176, -0.004557663109153509, -1.44966721534729, -0.2360760122537613, -0.9162790775299072, -1.2178993225097656, 0.7399495244026184, 0.14669063687324524, 0.48182615637779236, -0.6934288740158081, 0.30805161595344543, -2.2010605335235596, -1.325364112854004, -0.20783807337284088, -0.9362411499023438, 0.4092082679271698, -0.3258180618286133, 0.5974018573760986, -0.11771940439939499, 0.0623442605137825, 0.28301090002059937, 1.401870608329773, 3.3709888458251953, 0.22078049182891846, 0.422709196805954, -0.22582869231700897, -0.9358404278755188, 1.421389102935791, 0.920406699180603, -0.11157501488924026, -0.5728053450584412, -1.0112645626068115, 1.1843898296356201, 1.971657633781433, 1.0061973333358765, 0.05955956131219864, -0.7827238440513611, -0.6846795678138733, -0.004566275514662266, 0.19205057621002197, 0.5040894150733948, 0.9486486911773682, -0.016993029043078423, 0.08760266751050949, 1.3972423076629639, 1.207486629486084, -0.4950927495956421, 0.39588531851768494, -0.8356981873512268, -0.43155714869499207, 0.4192354381084442, 0.3111485540866852, 0.007545167580246925, 0.40286293625831604, -0.9052038192749023, -0.2473728507757187, -0.40311673283576965, -0.9448509216308594, -0.7339655756950378, -0.39088377356529236, -0.3096330761909485, 1.6627041101455688, 0.14799368381500244, -0.45715901255607605, -0.005727738607674837, -0.7629444003105164, -0.13603216409683228, -1.0486096143722534, 0.25465214252471924, -0.05561743676662445, -0.04868457466363907, -0.06524233520030975, 1.8053678274154663, -0.945974588394165, -2.035003900527954, 0.2521018981933594, 0.1673423796892166, -0.3638305366039276, 0.19291424751281738, 1.7243367433547974, 0.4635874330997467, 1.4972726106643677, 1.2892735004425049, 0.9798594117164612, -0.6233062148094177, -1.28919517993927, 0.7601696252822876, 0.9474549293518066, -1.378671646118164, 0.8081091642379761, 0.06833919882774353, -0.524702250957489, 0.6956360936164856, 1.2636849880218506, 0.45500341057777405, -2.074496269226074, 0.8930989503860474, -0.979236900806427, 0.7662435173988342, 0.7038031220436096, 0.7398411631584167, 0.2515629529953003, 0.8865363001823425, -1.211344838142395, -1.1339519023895264, -0.7765629887580872, -0.6261669993400574, 2.0438833236694336, -0.24077744781970978, 0.5540843605995178, -0.1231822669506073, -1.3124427795410156, -0.08246378600597382, 0.7142914533615112, 0.3429178297519684, -0.41206955909729004, 0.7936968207359314, -0.7106496095657349, -1.1423348188400269, -1.4397732019424438, -0.4134277403354645, -0.9687362313270569, -0.8800994753837585, 1.0748018026351929, 0.8334524035453796, 0.2548636198043823, 1.917238473892212, 0.6304228901863098, 0.2611963152885437, -2.6744306087493896, 0.9749858379364014, 0.342013418674469, -0.1647557020187378, 0.9274531006813049, 0.3283326327800751, 1.0139070749282837, 0.07666925340890884, 0.4896441400051117, -2.417222023010254, 2.2513186931610107, -0.27021461725234985, 0.7779098153114319, 0.022529469802975655, -0.1487199366092682, 1.1169017553329468, 0.5161855220794678, 0.561734139919281, -1.146742820739746, 0.710430920124054, -0.5844693779945374, 1.1688238382339478, 0.9767128825187683, -0.7856613397598267, -0.023391887545585632, 1.3445297479629517, 0.46505117416381836, -0.5493322014808655, -0.881682813167572, -0.9436482191085815, 0.9358267784118652, 1.7979764938354492, -0.12334343791007996, 0.024135040119290352, 0.7531418204307556, 0.7075644135475159, -1.311606764793396, 0.060193903744220734, -0.7543882131576538, -0.848195493221283, 1.596868872642517, 2.0236542224884033, -0.08986193686723709, -0.24356010556221008, -0.7474822998046875, -1.2566235065460205, 0.7960980534553528, -0.03505266457796097, 0.20343515276908875, 0.5890531539916992, -0.7040032148361206, 1.175736904144287, 0.9093202948570251, 0.9200090765953064, 0.1924838423728943, 0.22897553443908691, 0.4336487650871277, -0.3261067271232605, -1.0413967370986938, -0.26538774371147156, -1.0611785650253296, -2.508556604385376, 0.4643324017524719, -0.22762994468212128, -1.3925524950027466, 0.020159827545285225, -1.0019868612289429, 0.8770373463630676, -0.5534911751747131, -1.0778183937072754, -1.5782183408737183, 0.22100846469402313, -0.11821161955595016, 0.9441958665847778, -1.6325793266296387, -0.1580745279788971, 1.2177255153656006, 0.9380890727043152, -0.6201944947242737, 1.0414363145828247, 0.19363199174404144, 1.005172610282898, 0.8970797657966614, -0.4269050657749176, 0.47224095463752747, 0.08397658169269562, -1.3231103420257568, 0.43800556659698486, 1.1285237073898315, 0.16965849697589874, 1.348063588142395, -0.5531437993049622, 0.01923980377614498, 0.40229204297065735, -0.5372121930122375, -0.4988112449645996, -0.5299215912818909, 0.6986861228942871, 0.04730530083179474, -0.9243134260177612, 0.03259831666946411, -0.17641723155975342, -0.2409200370311737, 0.19606034457683563, -1.5692509412765503, -0.254375696182251, -0.38096746802330017, -0.5245702862739563, -1.2769334316253662, -0.037915848195552826, 1.421695590019226, -0.7586071491241455, -0.21324391663074493, 0.5094702839851379, 0.4919198155403137, 0.47888073325157166, 0.6403635740280151, -0.6989217400550842, -0.4043963551521301, -0.23031409084796906, -0.3822108805179596, 0.30182161927223206, 1.3330559730529785, -0.07371805608272552, -0.9545681476593018, 0.6546624302864075, -0.35156968235969543, 0.07357288897037506, 1.9853726625442505, 0.11519093811511993, -0.8037341237068176, 0.33509308099746704, -0.7510711550712585, 1.8715428113937378, 1.7358506917953491, 1.3287123441696167, -0.12687832117080688, -0.9710298776626587, 0.658685028553009, -0.3294132649898529, -0.316219300031662, 0.9583317637443542, 0.44797590374946594, -0.19670380651950836, -1.4366257190704346, 0.5169528126716614, 1.3102248907089233, -0.884130597114563, -0.699073314666748, 0.024097489193081856, -0.8004798889160156, 1.0705846548080444, 0.6226425766944885, 0.3518224060535431, 0.1711443066596985, 1.5458199977874756, 0.7307930588722229, -0.5223038196563721, 0.5274319052696228, 0.478718638420105, -0.17311735451221466, -2.1745736598968506, -1.1194812059402466, 0.3036065399646759, -0.36884742975234985, -1.5449934005737305, 1.4570879936218262, -1.1278871297836304, -1.0028597116470337, 0.5118253827095032, 0.04783874750137329, 1.4028041362762451, 0.3433011770248413, 1.5807758569717407, 2.1822633743286133, 0.8893404603004456, 0.3443179428577423, 1.3151062726974487, -0.18326778709888458, -0.4259088933467865, 1.8140461444854736, -0.4456811547279358, 0.41749560832977295, 1.1200422048568726, -0.3462029993534088, -0.9943430423736572, -0.8232566118240356, -1.1994036436080933, -0.6984865665435791, 1.1430710554122925, 0.10335958749055862, -1.092895746231079, 0.24864648282527924, 1.6358067989349365, 0.14886890351772308, -0.3734428286552429, 0.5447583794593811, 0.47146743535995483, -0.7490902543067932, -0.11589204519987106, -0.9291648864746094, 0.51572185754776, -0.18694651126861572, -0.3661065697669983, 0.37914782762527466, 0.4094102680683136, 1.2539385557174683, 0.013425562530755997, 0.117135189473629, 1.1508749723434448, -1.455338954925537, 1.47196364402771, -0.636684238910675, 0.28289997577667236, -2.363288640975952, 1.4591535329818726, -0.7165245413780212, 1.9909586906433105, -2.626145124435425, 0.39786696434020996, -0.6332681775093079, -0.4364425837993622, 0.32764631509780884, -0.3187130093574524, 0.1939680576324463, -0.1477181762456894, -1.0627925395965576, -0.13352665305137634, -0.6954625248908997, 0.6002547740936279, 1.0526952743530273, 1.2711937427520752, -1.0746532678604126, -0.340273380279541, -1.700255036354065, -0.19938984513282776, -0.6885830760002136, 0.2620275914669037, -2.026646852493286, -0.22664736211299896, -1.9561011791229248, -2.3883907794952393, -1.3713874816894531, -0.8068885803222656, 1.0844882726669312, 0.11300527304410934, -0.9109853506088257, 1.1819705963134766, -0.3978067636489868, -1.8113291263580322, 1.1324588060379028, -2.1005382537841797 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
Cool thanks ! Too bad the Arrow binary type doesn't seem to be supported in `arrow_io.ArrowFeatherDataset` :/ We would also need it to support Arrow struct type. Indeed images in `datasets` are represented using an Arrow type ```python pa.struct({"path": pa.string(), "bytes": pa.binary()}) ``` not sure yet how hard it is to support this though. Changing the typing on our side would create concerning breaking changes, that's why it would be awesome if it could work using these types
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
78
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data Cool thanks ! Too bad the Arrow binary type doesn't seem to be supported in `arrow_io.ArrowFeatherDataset` :/ We would also need it to support Arrow struct type. Indeed images in `datasets` are represented using an Arrow type ```python pa.struct({"path": pa.string(), "bytes": pa.binary()}) ``` not sure yet how hard it is to support this though. Changing the typing on our side would create concerning breaking changes, that's why it would be awesome if it could work using these types
[ -1.1857883930206299, -0.9305421710014343, -0.7441612482070923, 1.4280575513839722, -0.1577533334493637, -1.2047134637832642, 0.06601157784461975, -1.1275954246520996, 1.7148171663284302, -0.7575201392173767, 0.3298802971839905, -1.6388884782791138, 0.06089578941464424, -0.5899994969367981, -0.7968845367431641, -0.8422063589096069, -0.42933782935142517, -0.8411034941673279, 1.033596396446228, 2.5234906673431396, 1.2111437320709229, -1.4757970571517944, 2.642638683319092, 0.7335551977157593, -0.269652396440506, -0.9837113618850708, 0.4988337755203247, 0.04646345600485802, -1.25252103805542, -0.4731335937976837, -0.8751289248466492, -0.07151884585618973, -0.554267942905426, -0.4683171510696411, -0.04409336671233177, 0.3458317220211029, -0.243906632065773, -0.3723718822002411, -0.559000551700592, -0.7320968508720398, 0.4779430031776428, -0.4025595486164093, 1.0248663425445557, -0.26897716522216797, 1.8610739707946777, -0.4838469326496124, 0.4554039239883423, 0.680088222026825, 1.3365674018859863, 0.2236049324274063, 0.019843414425849915, 0.2707938849925995, 0.4305076003074646, -0.0753328874707222, 0.498948872089386, 1.1158902645111084, 0.7242760062217712, 0.4468691349029541, 0.7080193758010864, -2.229325294494629, 1.2915095090866089, -1.0499440431594849, 0.2782285809516907, 1.3275773525238037, -0.8846554756164551, 0.38067570328712463, -1.782822608947754, -0.11249632388353348, 0.6297783255577087, -2.230135202407837, 0.2604726254940033, -1.3093948364257812, -0.5049612522125244, 0.9549441337585449, 0.2853212356567383, -1.2055962085723877, 0.2861630916595459, -0.40808406472206116, 0.9941457509994507, 0.4211120009422302, 1.2142674922943115, -1.6884808540344238, -0.014806168153882027, -0.325227826833725, 0.12521295249462128, -1.2547523975372314, -1.4808213710784912, 0.5455319285392761, 0.6090688109397888, 0.5356362462043762, -0.10629522055387497, 0.9859032034873962, -1.0119719505310059, 0.8272382020950317, -1.0323151350021362, -1.6958975791931152, -1.415818452835083, -2.2076170444488525, -2.2939181327819824, 0.8055850267410278, -0.4567812979221344, -0.5519912242889404, 2.083998918533325, -1.0427119731903076, -1.711920976638794, 1.1742234230041504, 0.338884562253952, -0.04911696910858154, 2.3986330032348633, 0.1040429100394249, -0.6959363222122192, 0.40729400515556335, -0.7447300553321838, 0.79948890209198, -0.4302414059638977, 1.4161791801452637, 0.411408931016922, -1.055700421333313, 1.596295714378357, -0.40435490012168884, 0.532572329044342, -0.6828276515007019, -0.5850287675857544, -0.7419964075088501, 0.3482932150363922, 1.914440393447876, -0.33017200231552124, 1.555162787437439, -0.4390777349472046, -1.5513460636138916, -1.5585683584213257, 0.8892457485198975, 0.544765293598175, -0.8352387547492981, 0.05659221485257149, -0.42465469241142273, 0.13787932693958282, -0.00934212002903223, 1.0802301168441772, 1.2334632873535156, 0.6714968085289001, -0.29546162486076355, -0.8715408444404602, 0.1805315613746643, -0.12477421760559082, -0.7135730385780334, -1.8289276361465454, -0.3136468827724457, 0.1897144317626953, 0.5965918898582458, -1.2642391920089722, 1.7690088748931885, 0.9568045139312744, 2.0116069316864014, 0.9605736136436462, -0.34332504868507385, 1.5176056623458862, 0.008303229697048664, 1.7726129293441772, -0.461293488740921, 0.6936811804771423, -0.3941919505596161, -1.1392369270324707, 0.7929571866989136, -0.30482304096221924, -2.0158591270446777, -0.749456524848938, -0.8346958756446838, -0.25847509503364563, -0.7364245653152466, 0.8444546461105347, -0.23520296812057495, -1.3567821979522705, 0.2456202358007431, -0.6565826535224915, 0.13026514649391174, -1.1770646572113037, 0.39790087938308716, 0.6869029998779297, -0.6536544561386108, 0.06211339309811592, -0.21559160947799683, -1.2772341966629028, -0.4751906991004944, 0.25365251302719116, 1.843398094177246, -0.8227705955505371, 0.8769760727882385, 1.0587384700775146, -0.6439555287361145, 0.02694876864552498, 0.307109534740448, -0.3461868166923523, 0.8432484269142151, -1.058727502822876, -0.4288480877876282, 1.185295581817627, -0.18577328324317932, -0.5783177614212036, 1.4182794094085693, 0.6729865074157715, -0.9808396100997925, -0.2686102092266083, -0.14412030577659607, -0.8272230625152588, 0.07643426209688187, -1.6235615015029907, -0.19549015164375305, 0.32814720273017883, -1.5444703102111816, -0.437265008687973, -0.2613401412963867, 1.296934962272644, -0.1899643838405609, 1.4289414882659912, -0.36212748289108276, -0.12829597294330597, -0.38009464740753174, -0.4108113646507263, 0.17763471603393555, -0.1917543113231659, -0.6267960667610168, 0.27134743332862854, -0.7862821817398071, 0.4169920086860657, 1.4322479963302612, 0.316175252199173, -0.01273047924041748, 0.3964454233646393, 1.07831871509552, 0.43342188000679016, -0.03835265338420868, -0.8658055067062378, -1.5547993183135986, 2.0144460201263428, -1.5057296752929688, 2.0498554706573486, 0.8526853322982788, 0.06822782009840012, -1.7360739707946777, -1.9179257154464722, 1.3536067008972168, 1.1599456071853638, 2.3068110942840576, 0.5852428078651428, 0.36620187759399414, -0.7741134166717529, -0.5169304609298706, 0.3850369453430176, -1.0976245403289795, -0.7179275155067444, 0.13098472356796265, 2.363936185836792, 1.7549145221710205, -0.4956552982330322, -0.2015533298254013, -0.9719606637954712, 1.3938064575195312, -0.09907153993844986, 0.23826701939105988, 2.061802625656128, -0.2476862519979477, -1.1401004791259766, 1.2279975414276123, -2.4005088806152344, 0.12574435770511627, 1.9455007314682007, 0.27321192622184753, 0.1274036169052124, -1.3802978992462158, -0.5599976778030396, -0.2708885371685028, -0.43631577491760254, -1.1645212173461914, 0.5583209991455078, -0.25676414370536804, -0.8175784349441528, -1.5144022703170776, 0.24693144857883453, -1.2278763055801392, -1.6059870719909668, 0.3475273847579956, 1.9122319221496582, 2.034874677658081, -0.7864900827407837, 1.4928306341171265, -0.33561965823173523, 0.1591307669878006, 1.2377549409866333, 1.2137501239776611, 3.1167547702789307, 1.9073209762573242, -1.3222863674163818, 0.5331301689147949, -0.20723362267017365, -0.499754399061203, 1.1208685636520386, -1.1265641450881958, 1.247023344039917, -0.07582996040582657, -1.1271488666534424, -1.237208604812622, 0.9144039750099182, 0.5273574590682983, 0.0790550485253334, -0.5405707955360413, 1.0905855894088745, 0.10889893025159836, 1.3353638648986816, 0.49255865812301636, -0.3561195135116577, 0.5838447213172913, -0.41238170862197876, -0.484012633562088, 1.5466212034225464, 0.16694605350494385, -1.394839882850647, -2.311126947402954, -0.18239745497703552, -0.826715350151062, 0.04483351111412048, -0.6151021718978882, -0.9269599318504333, 1.6534974575042725, 0.3259395658969879, -1.3558701276779175, -0.2066054493188858, -0.29160118103027344, -0.5140920877456665, 2.625335454940796, -1.3731622695922852, -0.22599166631698608, -0.9653863310813904, -0.6312797665596008, 1.6652946472167969, -1.1428440809249878, -0.24389773607254028, -0.9784330725669861, -0.5322562456130981, -1.2714120149612427, -0.5578078627586365, 0.05335329845547676, -0.8711502552032471, 0.7892689108848572, 0.270653635263443, -1.1532658338546753, -0.3833366632461548, -0.8834163546562195, 0.8902817368507385, -0.11114318668842316, 0.2226867824792862, 1.9075685739517212, 0.4286542236804962, -0.38364213705062866, 0.6700804829597473, 1.1797282695770264, 0.6114300489425659, -0.5887565016746521, 0.21199624240398407, -0.7139847874641418, 0.31166860461235046, -1.3761039972305298, 0.3313412368297577, -2.8790154457092285, 0.659059464931488, -0.01081755105406046, -0.06974584609270096, 0.06466510891914368, -1.3613744974136353, 1.1158944368362427, 2.672084331512451, -1.1444088220596313, 0.4540444016456604, 0.3266447186470032, 1.1808927059173584, -1.5945395231246948, 0.32664406299591064, -0.39511677622795105, 2.1848268508911133, 0.21073812246322632, 1.2670072317123413, -0.5095370411872864, -2.344043254852295, 0.5728952884674072, -1.2668471336364746, -1.1867940425872803, 0.7764421701431274, -0.9605866074562073, -0.010806059464812279, -1.4649189710617065, -0.21855969727039337, -0.8871572017669678, -1.2301044464111328, 0.7522910237312317, 0.1700897216796875, 0.4803464710712433, -0.6984052062034607, 0.33331432938575745, -2.203707695007324, -1.3259973526000977, -0.2336951345205307, -0.9501327872276306, 0.4563339650630951, -0.31793731451034546, 0.6256133913993835, -0.12639546394348145, 0.045780248939991, 0.30615514516830444, 1.365752100944519, 3.3765368461608887, 0.2434922605752945, 0.40741363167762756, -0.23194460570812225, -0.936497688293457, 1.3940311670303345, 0.8899778723716736, -0.12799009680747986, -0.5656557679176331, -1.052578091621399, 1.201350212097168, 1.9796910285949707, 0.9992306232452393, 0.01392288412898779, -0.7463289499282837, -0.7106998562812805, -0.011730588972568512, 0.20678843557834625, 0.5037686824798584, 0.9167699813842773, -0.01527342014014721, 0.10797540098428726, 1.363141655921936, 1.2106218338012695, -0.4951881766319275, 0.34329453110694885, -0.8101057410240173, -0.4329306483268738, 0.4018350839614868, 0.2862068712711334, 0.02975049987435341, 0.40524905920028687, -0.9280226826667786, -0.26066088676452637, -0.420494019985199, -0.9347818493843079, -0.7263522148132324, -0.4261026680469513, -0.3583330512046814, 1.6219719648361206, 0.14103050529956818, -0.4564983546733856, -0.005751949269324541, -0.7890242338180542, -0.09780428558588028, -1.0234613418579102, 0.2442198246717453, -0.06656388193368912, -0.09276695549488068, -0.06573129445314407, 1.8455772399902344, -0.975541889667511, -2.0118048191070557, 0.2634443938732147, 0.15674638748168945, -0.3716201186180115, 0.22992520034313202, 1.713448405265808, 0.49269020557403564, 1.46640145778656, 1.29819655418396, 0.968974232673645, -0.6509574055671692, -1.3186203241348267, 0.7513222098350525, 0.9885172247886658, -1.3749315738677979, 0.8105162382125854, 0.0934365764260292, -0.48874524235725403, 0.6885712146759033, 1.2159557342529297, 0.4805372357368469, -2.085336685180664, 0.8686099648475647, -0.9691609144210815, 0.7686715722084045, 0.7399579286575317, 0.7162292003631592, 0.20972363650798798, 0.8281741142272949, -1.1965746879577637, -1.1408131122589111, -0.7230733633041382, -0.6994312405586243, 2.004321575164795, -0.1986275613307953, 0.5576674938201904, -0.08707299828529358, -1.32286536693573, -0.08458174020051956, 0.7083383798599243, 0.3340301513671875, -0.479779452085495, 0.8185870051383972, -0.6800493001937866, -1.117021918296814, -1.4303301572799683, -0.43366411328315735, -1.0080593824386597, -0.9128515124320984, 1.078305721282959, 0.853889524936676, 0.2423088699579239, 1.912070631980896, 0.6418585181236267, 0.28556734323501587, -2.695310592651367, 0.9704529047012329, 0.30965399742126465, -0.17078526318073273, 0.8666138648986816, 0.3393625020980835, 0.954197347164154, 0.05636601522564888, 0.5117790102958679, -2.4306485652923584, 2.290269613265991, -0.2584363520145416, 0.7592232823371887, -0.018862608820199966, -0.18747912347316742, 1.0861843824386597, 0.5259472131729126, 0.565510094165802, -1.1278473138809204, 0.665916919708252, -0.5773620009422302, 1.1586054563522339, 0.9329822063446045, -0.7900047898292542, -0.04618532210588455, 1.3320484161376953, 0.46937796473503113, -0.5439420342445374, -0.8498207330703735, -0.9575918912887573, 0.8978352546691895, 1.7500401735305786, -0.1048664078116417, -0.021029353141784668, 0.8253841400146484, 0.6877994537353516, -1.2836358547210693, 0.02623053640127182, -0.7445247173309326, -0.836777925491333, 1.5739909410476685, 2.054943799972534, -0.10404089838266373, -0.23946580290794373, -0.7558185458183289, -1.2101097106933594, 0.7919833660125732, -0.0466022714972496, 0.18748663365840912, 0.5769684910774231, -0.652891993522644, 1.1834955215454102, 0.9448196291923523, 0.9783667325973511, 0.1709933876991272, 0.2213362157344818, 0.42383384704589844, -0.3559774160385132, -1.0679517984390259, -0.25414010882377625, -1.0569922924041748, -2.543463706970215, 0.4985693097114563, -0.19619029760360718, -1.364567756652832, 0.020015064626932144, -1.0199943780899048, 0.8792036771774292, -0.5497912168502808, -1.0631349086761475, -1.558464527130127, 0.22869764268398285, -0.13829541206359863, 0.9481887221336365, -1.7018343210220337, -0.11521536856889725, 1.1933417320251465, 0.9091229438781738, -0.6455485224723816, 1.02632474899292, 0.21378932893276215, 1.0543999671936035, 0.9502233266830444, -0.40165379643440247, 0.5086291432380676, 0.05888180062174797, -1.3285105228424072, 0.41835278272628784, 1.1221309900283813, 0.17319440841674805, 1.4131933450698853, -0.534315288066864, 0.043934889137744904, 0.37887874245643616, -0.5743918418884277, -0.4692581593990326, -0.5096208453178406, 0.728797435760498, 0.07555829733610153, -0.9025025367736816, 0.031179171055555344, -0.1309228241443634, -0.21417245268821716, 0.11435488611459732, -1.5748063325881958, -0.22843793034553528, -0.3462827503681183, -0.569987952709198, -1.2477113008499146, -0.08495235443115234, 1.433660864830017, -0.7375580668449402, -0.17725810408592224, 0.527570366859436, 0.4607503414154053, 0.4984649419784546, 0.645517110824585, -0.6824008226394653, -0.4212152659893036, -0.17174646258354187, -0.3594856262207031, 0.31760725378990173, 1.4054020643234253, -0.022655803710222244, -0.925603449344635, 0.6915410757064819, -0.31609049439430237, 0.07000500708818436, 1.9395638704299927, 0.10404159128665924, -0.8234463334083557, 0.289041668176651, -0.7433902621269226, 1.877207636833191, 1.7625112533569336, 1.3479530811309814, -0.12724505364894867, -1.0225553512573242, 0.6944871544837952, -0.38466864824295044, -0.3366439640522003, 0.9029768705368042, 0.4281834065914154, -0.20787487924098969, -1.377819299697876, 0.5260229110717773, 1.3228925466537476, -0.888383686542511, -0.7347092628479004, 0.04861030355095863, -0.8048263788223267, 1.0680835247039795, 0.6304399371147156, 0.33767202496528625, 0.20352803170681, 1.5232065916061401, 0.7761585712432861, -0.4743214249610901, 0.5423697829246521, 0.525539219379425, -0.1756563037633896, -2.1699564456939697, -1.127742052078247, 0.33762070536613464, -0.4112584590911865, -1.571498990058899, 1.4412204027175903, -1.1348437070846558, -1.0011950731277466, 0.5149068236351013, 0.03141660615801811, 1.4532774686813354, 0.38952723145484924, 1.5527986288070679, 2.1704304218292236, 0.8537089228630066, 0.35004618763923645, 1.3356128931045532, -0.1992010921239853, -0.4877607226371765, 1.7972114086151123, -0.4441167116165161, 0.4529028534889221, 1.0709445476531982, -0.3026413917541504, -1.0326229333877563, -0.7855302095413208, -1.2157942056655884, -0.7064424157142639, 1.1970632076263428, 0.05943935737013817, -1.072150468826294, 0.2789055407047272, 1.6748135089874268, 0.09359151870012283, -0.4071894586086273, 0.5684125423431396, 0.38395148515701294, -0.7904546856880188, -0.10863392800092697, -0.9210029244422913, 0.5442270636558533, -0.1631426066160202, -0.32609689235687256, 0.40716639161109924, 0.3798584043979645, 1.2664003372192383, 0.012127670459449291, 0.13708822429180145, 1.1271147727966309, -1.4397858381271362, 1.504101276397705, -0.6662216186523438, 0.28111305832862854, -2.4106383323669434, 1.4626212120056152, -0.7111206650733948, 1.9823843240737915, -2.624136447906494, 0.3906259834766388, -0.6038536429405212, -0.4984185993671417, 0.29308417439460754, -0.30072373151779175, 0.19421088695526123, -0.146372452378273, -1.0641741752624512, -0.09189744293689728, -0.6736987829208374, 0.5760427713394165, 1.0538345575332642, 1.2479770183563232, -1.0906902551651, -0.34821417927742004, -1.75650954246521, -0.1892489790916443, -0.7099757194519043, 0.2708725035190582, -2.0497303009033203, -0.20377953350543976, -1.947158932685852, -2.373525381088257, -1.3681704998016357, -0.7939358949661255, 1.0459922552108765, 0.12141397595405579, -0.8684118390083313, 1.161455512046814, -0.37516334652900696, -1.8563389778137207, 1.0862594842910767, -2.100278377532959 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
If the ArrowFeatherDataset doesn't yet support it, I guess our hands are a bit tied at the moment. IIUC, in my [latest PoC notebook](https://gist.github.com/sayakpaul/f7d5cc312cd01cb31098fad3fd9c6b59#file-feather-tf-poc-bytes-ipynb), you wanted to see each entry in the feather file to be represented like so? ``` pa.struct({"path": pa.string(), "bytes": pa.binary()}) ``` In that case, `pa.binary()` isn't yet supported.
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
52
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data If the ArrowFeatherDataset doesn't yet support it, I guess our hands are a bit tied at the moment. IIUC, in my [latest PoC notebook](https://gist.github.com/sayakpaul/f7d5cc312cd01cb31098fad3fd9c6b59#file-feather-tf-poc-bytes-ipynb), you wanted to see each entry in the feather file to be represented like so? ``` pa.struct({"path": pa.string(), "bytes": pa.binary()}) ``` In that case, `pa.binary()` isn't yet supported.
[ -1.1664268970489502, -0.9097668528556824, -0.721762478351593, 1.403332233428955, -0.15911957621574402, -1.2320743799209595, 0.0808596983551979, -1.1261297464370728, 1.683174729347229, -0.7432119250297546, 0.3158072531223297, -1.6359187364578247, 0.07636944949626923, -0.6061539053916931, -0.7756884098052979, -0.8424023985862732, -0.398084431886673, -0.8588269948959351, 1.0615646839141846, 2.500498056411743, 1.196203589439392, -1.4387563467025757, 2.6888930797576904, 0.738277792930603, -0.28919410705566406, -0.9799849390983582, 0.47458040714263916, 0.05669713020324707, -1.2244420051574707, -0.4806680977344513, -0.8922176957130432, -0.06274736672639847, -0.5615774989128113, -0.4986063539981842, -0.029360711574554443, 0.3709263801574707, -0.22403942048549652, -0.3639393448829651, -0.5717849731445312, -0.7216203212738037, 0.4912167191505432, -0.38897234201431274, 1.0025142431259155, -0.27748700976371765, 1.8582816123962402, -0.509322464466095, 0.43606656789779663, 0.6514694094657898, 1.3513926267623901, 0.21649613976478577, 0.0037214895710349083, 0.30276262760162354, 0.39302167296409607, -0.10156409442424774, 0.4666079580783844, 1.1708552837371826, 0.7333351969718933, 0.43819963932037354, 0.7309785485267639, -2.190687894821167, 1.3122045993804932, -1.0210844278335571, 0.27789947390556335, 1.3304369449615479, -0.9208699464797974, 0.43351826071739197, -1.7731599807739258, -0.11107943952083588, 0.5848976969718933, -2.2797183990478516, 0.27580827474594116, -1.3051164150238037, -0.5409548282623291, 0.9534139633178711, 0.27450063824653625, -1.2178930044174194, 0.30521318316459656, -0.4244983196258545, 1.0029515027999878, 0.3987051546573639, 1.2065985202789307, -1.6614749431610107, -0.022917762398719788, -0.3222789764404297, 0.1143631711602211, -1.2678009271621704, -1.4798808097839355, 0.5503076910972595, 0.6351730823516846, 0.5392606854438782, -0.13067933917045593, 0.9961400628089905, -1.0369046926498413, 0.8209952116012573, -0.9802367687225342, -1.6507500410079956, -1.4004982709884644, -2.2103331089019775, -2.2992331981658936, 0.8371291756629944, -0.4678551256656647, -0.5749205350875854, 2.1030490398406982, -1.0666491985321045, -1.7064627408981323, 1.1913849115371704, 0.33101698756217957, -0.056028105318546295, 2.401764154434204, 0.12497182935476303, -0.718855082988739, 0.4092027246952057, -0.7556343078613281, 0.8354572057723999, -0.44412171840667725, 1.4274102449417114, 0.4218602478504181, -1.0283136367797852, 1.5793646574020386, -0.4121202528476715, 0.5422570109367371, -0.669105589389801, -0.5888010263442993, -0.7703896164894104, 0.3988457918167114, 1.9398788213729858, -0.3304278552532196, 1.5736745595932007, -0.3998132646083832, -1.5533726215362549, -1.5352561473846436, 0.8802374601364136, 0.5539985299110413, -0.8821924924850464, 0.11063641309738159, -0.42676016688346863, 0.12388434261083603, 0.006301818415522575, 1.074140191078186, 1.2732394933700562, 0.64827561378479, -0.2869282066822052, -0.8968884944915771, 0.19188886880874634, -0.13630296289920807, -0.6851446628570557, -1.8595476150512695, -0.3099151849746704, 0.2058349847793579, 0.5934062600135803, -1.2959356307983398, 1.7329835891723633, 0.9268224239349365, 2.013664722442627, 0.9563032984733582, -0.33948254585266113, 1.5245182514190674, -0.01066726353019476, 1.7685017585754395, -0.45999574661254883, 0.730499804019928, -0.41062983870506287, -1.1694135665893555, 0.8009229898452759, -0.3380926847457886, -2.0038576126098633, -0.7260646224021912, -0.8091736435890198, -0.21761810779571533, -0.7689467668533325, 0.853527307510376, -0.244928240776062, -1.377098798751831, 0.27729758620262146, -0.6368303298950195, 0.15776383876800537, -1.226754069328308, 0.3636842370033264, 0.7020325064659119, -0.6690541505813599, 0.025328200310468674, -0.2154126614332199, -1.2927216291427612, -0.4708729088306427, 0.26653724908828735, 1.851230502128601, -0.8128730058670044, 0.8990424871444702, 1.095868468284607, -0.6357582807540894, 0.022131338715553284, 0.35340726375579834, -0.3714333474636078, 0.8409712910652161, -1.0748282670974731, -0.4128200113773346, 1.1776341199874878, -0.18885283172130585, -0.5377553105354309, 1.3818035125732422, 0.7226265668869019, -1.0221060514450073, -0.24688515067100525, -0.14061351120471954, -0.8157157897949219, 0.038792841136455536, -1.6244659423828125, -0.17566345632076263, 0.35061532258987427, -1.5180089473724365, -0.44714590907096863, -0.256611168384552, 1.310580849647522, -0.1974208503961563, 1.4493926763534546, -0.36746880412101746, -0.14527329802513123, -0.3932814598083496, -0.4259102940559387, 0.17852342128753662, -0.19147935509681702, -0.6400142908096313, 0.2714673578739166, -0.7552581429481506, 0.4148397743701935, 1.3989760875701904, 0.30170127749443054, 0.014477784745395184, 0.43006107211112976, 1.0898245573043823, 0.41078290343284607, -0.05979470908641815, -0.8530360460281372, -1.5598301887512207, 2.0059690475463867, -1.5182406902313232, 2.03391695022583, 0.8659496307373047, 0.061412908136844635, -1.7295364141464233, -1.9067434072494507, 1.3601828813552856, 1.1961784362792969, 2.3269412517547607, 0.5621761679649353, 0.38567525148391724, -0.7925704717636108, -0.5394357442855835, 0.37944114208221436, -1.1064226627349854, -0.7006453275680542, 0.12097720056772232, 2.364912271499634, 1.7676289081573486, -0.5037793517112732, -0.23941949009895325, -0.9795310497283936, 1.34190833568573, -0.1387491375207901, 0.2035902738571167, 2.0376574993133545, -0.2866321802139282, -1.1251161098480225, 1.262968897819519, -2.416436195373535, 0.10531894862651825, 1.9467544555664062, 0.25490760803222656, 0.10401264578104019, -1.3491032123565674, -0.565836489200592, -0.2600657343864441, -0.4639415740966797, -1.1479488611221313, 0.542326807975769, -0.2549428641796112, -0.8279200792312622, -1.5290251970291138, 0.21134795248508453, -1.2257028818130493, -1.6045238971710205, 0.3916017413139343, 1.902472734451294, 2.0385172367095947, -0.8020576238632202, 1.5021061897277832, -0.3460714519023895, 0.17460116744041443, 1.2377433776855469, 1.2319612503051758, 3.144915819168091, 1.8959192037582397, -1.3039827346801758, 0.5276714563369751, -0.2172744870185852, -0.4980553090572357, 1.1062430143356323, -1.1043708324432373, 1.2558677196502686, -0.09764563292264938, -1.146945834159851, -1.216343641281128, 0.8976802229881287, 0.4959288239479065, 0.08237152546644211, -0.5033949613571167, 1.0920467376708984, 0.11642103642225266, 1.3540772199630737, 0.4917747378349304, -0.3449331521987915, 0.5817604660987854, -0.41305458545684814, -0.4848674237728119, 1.5551413297653198, 0.1458425670862198, -1.3999512195587158, -2.297194719314575, -0.20982547104358673, -0.8045047521591187, 0.03977983817458153, -0.6375714540481567, -0.979430615901947, 1.6068369150161743, 0.32426708936691284, -1.2999684810638428, -0.21886064112186432, -0.3092690110206604, -0.4980686902999878, 2.613308906555176, -1.4312525987625122, -0.23791801929473877, -0.9541071653366089, -0.6053640842437744, 1.6464189291000366, -1.1137709617614746, -0.26782622933387756, -0.954680323600769, -0.5253689289093018, -1.2714635133743286, -0.5604070425033569, 0.028714872896671295, -0.880998432636261, 0.7259715795516968, 0.25029999017715454, -1.1453863382339478, -0.3400326073169708, -0.8856972455978394, 0.8974032402038574, -0.11001108586788177, 0.2155405730009079, 1.8804041147232056, 0.41206029057502747, -0.4124873876571655, 0.7054584622383118, 1.197460651397705, 0.5816561579704285, -0.6067368388175964, 0.16523902118206024, -0.7346959114074707, 0.3014010488986969, -1.3983784914016724, 0.3079358637332916, -2.8688712120056152, 0.6671724319458008, 0.0014319149777293205, -0.03301515802741051, 0.0704624205827713, -1.363944411277771, 1.1071113348007202, 2.6792218685150146, -1.1249868869781494, 0.4474988281726837, 0.3354695439338684, 1.1988955736160278, -1.5800282955169678, 0.306352823972702, -0.39872315526008606, 2.17573881149292, 0.1839158982038498, 1.2877446413040161, -0.5122691988945007, -2.350508689880371, 0.56864333152771, -1.2608941793441772, -1.1640758514404297, 0.7753317356109619, -0.9603577852249146, 0.01069320272654295, -1.4494887590408325, -0.21943849325180054, -0.8762272596359253, -1.216968297958374, 0.734454870223999, 0.1532931625843048, 0.4653684198856354, -0.6643558144569397, 0.33463606238365173, -2.200802803039551, -1.311862826347351, -0.21514281630516052, -0.94194096326828, 0.44307419657707214, -0.31749075651168823, 0.6058996915817261, -0.12874193489551544, 0.05672707408666611, 0.2995119094848633, 1.3957812786102295, 3.3353562355041504, 0.23585714399814606, 0.4088990092277527, -0.23316265642642975, -0.9523873329162598, 1.365807056427002, 0.9016381502151489, -0.13849316537380219, -0.5944800972938538, -1.0134353637695312, 1.2242987155914307, 1.9686423540115356, 1.0291551351547241, 0.03136177361011505, -0.7881346940994263, -0.710698664188385, 0.002756517380475998, 0.20458337664604187, 0.4803846776485443, 0.9404952526092529, -0.020975304767489433, 0.0852469950914383, 1.3813532590866089, 1.1947839260101318, -0.5080385208129883, 0.36917752027511597, -0.8221409320831299, -0.4266345202922821, 0.4008936583995819, 0.2869025468826294, 0.031372781842947006, 0.3924117684364319, -0.936669111251831, -0.271583616733551, -0.4073891341686249, -0.9225507378578186, -0.7440360188484192, -0.41667255759239197, -0.32860666513442993, 1.6671509742736816, 0.1317906677722931, -0.432333379983902, -0.010174639523029327, -0.7681905627250671, -0.11874362081289291, -1.0211330652236938, 0.2321099042892456, -0.04960057884454727, -0.05610046908259392, -0.04719321429729462, 1.8002538681030273, -0.9398725628852844, -2.0251572132110596, 0.24168379604816437, 0.15695343911647797, -0.3568965792655945, 0.1805243343114853, 1.7503671646118164, 0.4877380430698395, 1.4987454414367676, 1.2842752933502197, 0.9939524531364441, -0.657593309879303, -1.3051064014434814, 0.7553993463516235, 0.9718796014785767, -1.383718729019165, 0.82708740234375, 0.058933354914188385, -0.49627235531806946, 0.6519797444343567, 1.2477346658706665, 0.48711511492729187, -2.0853114128112793, 0.873198390007019, -1.0168641805648804, 0.7474579215049744, 0.7099202275276184, 0.7157361507415771, 0.2215796411037445, 0.8476614952087402, -1.2058508396148682, -1.141655445098877, -0.7533705234527588, -0.6524848341941833, 2.0132596492767334, -0.2150406539440155, 0.5364041328430176, -0.11714646220207214, -1.311180591583252, -0.08859231323003769, 0.740961492061615, 0.3313692808151245, -0.452549546957016, 0.8253960609436035, -0.6863709092140198, -1.136164903640747, -1.432835578918457, -0.40493544936180115, -0.9777149558067322, -0.8704809546470642, 1.052397608757019, 0.8173496723175049, 0.25092315673828125, 1.9419336318969727, 0.6672998666763306, 0.2717118561267853, -2.6802914142608643, 0.9854955673217773, 0.34035709500312805, -0.1752508133649826, 0.8840938210487366, 0.3205295503139496, 1.001813530921936, 0.048666492104530334, 0.5090097188949585, -2.4342448711395264, 2.251093864440918, -0.25229501724243164, 0.7598538398742676, 0.013033154420554638, -0.16061832010746002, 1.0770680904388428, 0.4869748651981354, 0.5622734427452087, -1.1295795440673828, 0.6759582161903381, -0.5684409141540527, 1.1570934057235718, 0.9586639404296875, -0.8113585710525513, -0.0029263021424412727, 1.3236799240112305, 0.4507639408111572, -0.5225366950035095, -0.879462718963623, -0.960746705532074, 0.9048952460289001, 1.780849814414978, -0.12837474048137665, 0.03233649581670761, 0.8157190084457397, 0.7146195769309998, -1.301811695098877, 0.0314747579395771, -0.7434592247009277, -0.8200140595436096, 1.6183518171310425, 2.0506393909454346, -0.1239350289106369, -0.2495507299900055, -0.769976794719696, -1.243849515914917, 0.8149641752243042, -0.06234011799097061, 0.20625905692577362, 0.6238725185394287, -0.6826404929161072, 1.1767977476119995, 0.923486590385437, 0.9203341603279114, 0.20110264420509338, 0.20723754167556763, 0.4494975507259369, -0.34938931465148926, -1.0332558155059814, -0.26192599534988403, -1.031126618385315, -2.55195951461792, 0.47784021496772766, -0.18708981573581696, -1.3939906358718872, 0.04246819019317627, -1.0140445232391357, 0.9021338224411011, -0.5427437424659729, -1.045938491821289, -1.5590778589248657, 0.2324797511100769, -0.12899699807167053, 0.9600372910499573, -1.6538264751434326, -0.14931921660900116, 1.196096420288086, 0.9325008988380432, -0.6437068581581116, 1.018947958946228, 0.20743438601493835, 1.0476874113082886, 0.9309171438217163, -0.4081884026527405, 0.49895453453063965, 0.08194331079721451, -1.3248624801635742, 0.43897345662117004, 1.142197608947754, 0.16051949560642242, 1.3801674842834473, -0.5327728986740112, 0.028235681354999542, 0.39848971366882324, -0.558323085308075, -0.49833518266677856, -0.49641838669776917, 0.6983426809310913, 0.07464578747749329, -0.9191741347312927, 0.0038688043132424355, -0.15032771229743958, -0.26294636726379395, 0.16270822286605835, -1.5753915309906006, -0.25979265570640564, -0.3356843590736389, -0.5576466917991638, -1.2477436065673828, -0.05822127312421799, 1.4268841743469238, -0.7424109578132629, -0.20712555944919586, 0.5388006567955017, 0.4456184208393097, 0.4895159900188446, 0.6201463937759399, -0.6906337738037109, -0.3894680142402649, -0.187140092253685, -0.38352933526039124, 0.321927934885025, 1.3707959651947021, -0.02677064761519432, -0.9283367991447449, 0.6839727163314819, -0.32086679339408875, 0.0804067850112915, 1.9430018663406372, 0.10878173261880875, -0.8214606642723083, 0.29865142703056335, -0.7473496794700623, 1.880618929862976, 1.7412936687469482, 1.3128094673156738, -0.12786072492599487, -0.9752519130706787, 0.6810396909713745, -0.3414195477962494, -0.3084985911846161, 0.9078835844993591, 0.4069623053073883, -0.1982632726430893, -1.4350695610046387, 0.5518750548362732, 1.317906141281128, -0.8901374936103821, -0.7309573888778687, 0.03212316706776619, -0.8121475577354431, 1.1022790670394897, 0.6319563388824463, 0.35170990228652954, 0.21249118447303772, 1.5538842678070068, 0.7712895274162292, -0.48764684796333313, 0.5206835865974426, 0.4893896281719208, -0.17115987837314606, -2.168771982192993, -1.1024030447006226, 0.30506432056427, -0.3952040672302246, -1.5418533086776733, 1.4273520708084106, -1.1452032327651978, -1.019944190979004, 0.5033199191093445, 0.03666212037205696, 1.4121016263961792, 0.3614412844181061, 1.5780048370361328, 2.1801295280456543, 0.8679743409156799, 0.3360772430896759, 1.2985706329345703, -0.19893941283226013, -0.44068431854248047, 1.7975950241088867, -0.44533923268318176, 0.46246975660324097, 1.072908639907837, -0.32709014415740967, -1.0216647386550903, -0.8026388883590698, -1.2030482292175293, -0.723783552646637, 1.1543371677398682, 0.09186898171901703, -1.0808613300323486, 0.26977598667144775, 1.6538095474243164, 0.11063375324010849, -0.40600329637527466, 0.5714306831359863, 0.435930997133255, -0.7628699541091919, -0.0899098664522171, -0.8935682773590088, 0.5195798873901367, -0.1582334190607071, -0.3463853597640991, 0.3907342255115509, 0.42596158385276794, 1.2697166204452515, 0.028906866908073425, 0.11831185966730118, 1.1210700273513794, -1.4588232040405273, 1.5042781829833984, -0.6628850102424622, 0.27250269055366516, -2.3945727348327637, 1.4684780836105347, -0.7340553998947144, 1.9890706539154053, -2.619041919708252, 0.41537606716156006, -0.6022164821624756, -0.48264217376708984, 0.29679298400878906, -0.32462790608406067, 0.2093501091003418, -0.1277240812778473, -1.096016526222229, -0.08851828426122665, -0.6873286962509155, 0.5878911018371582, 1.049235463142395, 1.2579419612884521, -1.0864711999893188, -0.3288697302341461, -1.7255715131759644, -0.2009572833776474, -0.6762540340423584, 0.21825602650642395, -2.0153632164001465, -0.22699111700057983, -1.9500226974487305, -2.3793814182281494, -1.3846018314361572, -0.8390758633613586, 1.0767223834991455, 0.1201675608754158, -0.9120196104049683, 1.1629852056503296, -0.41029417514801025, -1.8697925806045532, 1.1399939060211182, -2.114823818206787 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
> IIUC, in my [latest PoC notebook](https://gist.github.com/sayakpaul/f7d5cc312cd01cb31098fad3fd9c6b59#file-feather-tf-poc-bytes-ipynb), you wanted to see each entry in the feather file to be represented like so? > > pa.struct({"path": pa.string(), "bytes": pa.binary()}) Yea because that's the data format we're using. If we were to use base64, then we would have to process the full dataset to convert it, which can take some time. Converting to TFRecords would be simpler than converting to base64 in Feather files. Maybe it would take too much time to be worth exploring, but according to https://github.com/tensorflow/io/issues/1361#issuecomment-819029002 it's possible to add support for binary type in ArrowFeatherDataset. What do you think ? Any other alternative in mind ?
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
108
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data > IIUC, in my [latest PoC notebook](https://gist.github.com/sayakpaul/f7d5cc312cd01cb31098fad3fd9c6b59#file-feather-tf-poc-bytes-ipynb), you wanted to see each entry in the feather file to be represented like so? > > pa.struct({"path": pa.string(), "bytes": pa.binary()}) Yea because that's the data format we're using. If we were to use base64, then we would have to process the full dataset to convert it, which can take some time. Converting to TFRecords would be simpler than converting to base64 in Feather files. Maybe it would take too much time to be worth exploring, but according to https://github.com/tensorflow/io/issues/1361#issuecomment-819029002 it's possible to add support for binary type in ArrowFeatherDataset. What do you think ? Any other alternative in mind ?
[ -1.183366298675537, -0.9138644337654114, -0.7128124833106995, 1.3995648622512817, -0.1452687531709671, -1.2158522605895996, 0.05411754176020622, -1.1344877481460571, 1.6632511615753174, -0.7390046715736389, 0.30266329646110535, -1.6494863033294678, 0.06658869981765747, -0.5985192060470581, -0.7522498965263367, -0.834432065486908, -0.39891913533210754, -0.8467164635658264, 1.0520535707473755, 2.518033027648926, 1.1968188285827637, -1.4384253025054932, 2.698237180709839, 0.7341380715370178, -0.2921020984649658, -0.9828284382820129, 0.49196022748947144, 0.07898145169019699, -1.2293685674667358, -0.4682522416114807, -0.9164792895317078, -0.06758464127779007, -0.579594075679779, -0.46735915541648865, -0.04343473166227341, 0.3505326509475708, -0.21561460196971893, -0.34027013182640076, -0.5901100635528564, -0.7038871049880981, 0.4841262400150299, -0.39304596185684204, 0.9952635765075684, -0.2669697701931, 1.842036247253418, -0.5120643973350525, 0.4537713825702667, 0.6585514545440674, 1.3476861715316772, 0.22902891039848328, 0.0021644867956638336, 0.3095095157623291, 0.38865113258361816, -0.10219890624284744, 0.4581715762615204, 1.1568970680236816, 0.7078511714935303, 0.4458463788032532, 0.7232815623283386, -2.19812273979187, 1.3221766948699951, -1.0276882648468018, 0.26488202810287476, 1.3327378034591675, -0.8980260491371155, 0.44279587268829346, -1.7849791049957275, -0.10920374095439911, 0.5872684717178345, -2.269794464111328, 0.2717362642288208, -1.3151532411575317, -0.562363862991333, 0.9178667664527893, 0.2881007790565491, -1.2150874137878418, 0.3070761561393738, -0.4506610631942749, 1.0041913986206055, 0.41221973299980164, 1.2188448905944824, -1.6900618076324463, -0.011467501521110535, -0.3094339966773987, 0.10651877522468567, -1.2586281299591064, -1.4750834703445435, 0.5688822865486145, 0.6343352794647217, 0.5460503697395325, -0.09790834039449692, 0.9820383191108704, -1.0338666439056396, 0.8343940377235413, -0.9823845624923706, -1.6522729396820068, -1.393700361251831, -2.2264404296875, -2.276967763900757, 0.8090799450874329, -0.488688200712204, -0.5749606490135193, 2.0993614196777344, -1.0662355422973633, -1.729589819908142, 1.201778531074524, 0.34846240282058716, -0.0654110312461853, 2.4350593090057373, 0.12796765565872192, -0.7083491683006287, 0.4305012822151184, -0.7527711987495422, 0.8444510102272034, -0.4096852242946625, 1.4121066331863403, 0.43246614933013916, -1.0264034271240234, 1.5834587812423706, -0.3942537009716034, 0.5476333498954773, -0.6529549956321716, -0.5872980952262878, -0.7559667229652405, 0.38475579023361206, 1.9418771266937256, -0.3335806429386139, 1.571276307106018, -0.40363964438438416, -1.5507372617721558, -1.544884443283081, 0.8847492933273315, 0.5525332093238831, -0.9029061198234558, 0.0987490713596344, -0.4319717288017273, 0.13316114246845245, 0.010060804896056652, 1.0650640726089478, 1.2785100936889648, 0.660410463809967, -0.306270956993103, -0.8867372870445251, 0.1599062830209732, -0.13837279379367828, -0.6800912022590637, -1.8678219318389893, -0.293538898229599, 0.2003936767578125, 0.6063268780708313, -1.2988046407699585, 1.718072533607483, 0.9393871426582336, 2.0091490745544434, 0.9793378114700317, -0.3580731749534607, 1.4954110383987427, 0.010750320740044117, 1.7603588104248047, -0.47011396288871765, 0.7108778953552246, -0.4081728458404541, -1.1626662015914917, 0.8146823644638062, -0.33073604106903076, -2.0067996978759766, -0.7466785311698914, -0.8013359904289246, -0.2595253884792328, -0.7857419848442078, 0.86628258228302, -0.24036690592765808, -1.360851526260376, 0.2933199405670166, -0.6158623695373535, 0.16838063299655914, -1.2232344150543213, 0.3569144904613495, 0.7173396944999695, -0.6601000428199768, 0.01446440163999796, -0.2086048275232315, -1.3253904581069946, -0.47425976395606995, 0.26844170689582825, 1.835020661354065, -0.8033761382102966, 0.9046176671981812, 1.095356822013855, -0.64239501953125, 0.0242205411195755, 0.3363312780857086, -0.32961753010749817, 0.8373450636863708, -1.0604320764541626, -0.4113662838935852, 1.1657955646514893, -0.19019769132137299, -0.5607492327690125, 1.386006474494934, 0.7149671316146851, -1.0193743705749512, -0.2557664215564728, -0.15544316172599792, -0.8218808770179749, 0.026724431663751602, -1.6433429718017578, -0.1881428062915802, 0.31850379705429077, -1.5348180532455444, -0.4506421983242035, -0.2610403597354889, 1.3012001514434814, -0.1893627792596817, 1.4510663747787476, -0.3613327145576477, -0.14304617047309875, -0.39867737889289856, -0.42935293912887573, 0.18036922812461853, -0.19289836287498474, -0.6294072270393372, 0.26712632179260254, -0.7882705926895142, 0.4024330675601959, 1.4226582050323486, 0.34013083577156067, 0.021292690187692642, 0.4169362783432007, 1.0696247816085815, 0.39939990639686584, -0.0708635151386261, -0.8653955459594727, -1.5522232055664062, 2.0261120796203613, -1.5067520141601562, 2.034687042236328, 0.8546807169914246, 0.061756979674100876, -1.7615249156951904, -1.8943864107131958, 1.3468637466430664, 1.1568901538848877, 2.313965320587158, 0.5505942702293396, 0.3862924575805664, -0.7996242642402649, -0.5437748432159424, 0.3714635372161865, -1.0629163980484009, -0.7088861465454102, 0.1172395870089531, 2.358691930770874, 1.7699768543243408, -0.5248891711235046, -0.2086583524942398, -0.9694439172744751, 1.3334617614746094, -0.12549898028373718, 0.20254550874233246, 2.042407989501953, -0.2978205978870392, -1.1311663389205933, 1.2794009447097778, -2.405277967453003, 0.10813165456056595, 1.936367392539978, 0.2725277841091156, 0.09611006826162338, -1.3365085124969482, -0.5794757008552551, -0.27842003107070923, -0.4620189368724823, -1.1512576341629028, 0.5666568875312805, -0.24264000356197357, -0.8519034385681152, -1.5235683917999268, 0.1828121691942215, -1.2374516725540161, -1.6180723905563354, 0.40924525260925293, 1.9098572731018066, 2.047030448913574, -0.7991435527801514, 1.5022664070129395, -0.3550710380077362, 0.15623357892036438, 1.2208082675933838, 1.218842625617981, 3.135251760482788, 1.8993805646896362, -1.311677098274231, 0.5205522179603577, -0.18581503629684448, -0.5045039057731628, 1.1108440160751343, -1.1050201654434204, 1.27411687374115, -0.10593250393867493, -1.1547729969024658, -1.2186273336410522, 0.917007565498352, 0.4624839425086975, 0.08585062623023987, -0.5320641398429871, 1.0930941104888916, 0.08779866248369217, 1.35179603099823, 0.4931495785713196, -0.355035662651062, 0.5626475214958191, -0.4055498242378235, -0.5012263655662537, 1.5737276077270508, 0.12009898573160172, -1.4363282918930054, -2.3095266819000244, -0.21657444536685944, -0.7946189045906067, 0.042264267802238464, -0.6392393112182617, -0.9892540574073792, 1.59389066696167, 0.33742645382881165, -1.3174500465393066, -0.2347569465637207, -0.30421945452690125, -0.49241548776626587, 2.61061429977417, -1.4241487979888916, -0.23112384974956512, -0.9527991414070129, -0.6260560750961304, 1.6321921348571777, -1.1297107934951782, -0.25158458948135376, -0.9548261761665344, -0.546857476234436, -1.2692335844039917, -0.5291736721992493, 0.03080182895064354, -0.9100574254989624, 0.7491900324821472, 0.24038459360599518, -1.133911371231079, -0.3389752507209778, -0.8660283088684082, 0.9094429016113281, -0.11146459728479385, 0.22120462357997894, 1.8883196115493774, 0.411335825920105, -0.40522274374961853, 0.7015831470489502, 1.213403344154358, 0.5874099135398865, -0.6126320958137512, 0.12208206206560135, -0.7333779335021973, 0.3199054002761841, -1.393130898475647, 0.3031802475452423, -2.8760647773742676, 0.6843032836914062, -0.016676729544997215, -0.047308843582868576, 0.08460773527622223, -1.348453402519226, 1.1071686744689941, 2.6757829189300537, -1.13927161693573, 0.4570085406303406, 0.35292384028434753, 1.1798763275146484, -1.5501728057861328, 0.32256537675857544, -0.4095999598503113, 2.1796040534973145, 0.17841598391532898, 1.2432689666748047, -0.5295764207839966, -2.330822706222534, 0.5772191882133484, -1.2562510967254639, -1.1994580030441284, 0.7638233304023743, -0.948616623878479, 0.006657701916992664, -1.461492657661438, -0.21273179352283478, -0.8998952507972717, -1.2213170528411865, 0.7349914908409119, 0.16589044034481049, 0.4502662122249603, -0.6675015687942505, 0.3307025730609894, -2.2084691524505615, -1.3302265405654907, -0.2249521017074585, -0.9383476376533508, 0.4531756341457367, -0.32333675026893616, 0.609029233455658, -0.12166696041822433, 0.05936292186379433, 0.2907284200191498, 1.3854095935821533, 3.3405699729919434, 0.229454904794693, 0.3968625068664551, -0.22836633026599884, -0.957738995552063, 1.3873413801193237, 0.9200159907341003, -0.12050694972276688, -0.5913758873939514, -1.0203752517700195, 1.2195613384246826, 1.9744731187820435, 1.0169870853424072, 0.02107742801308632, -0.7841543555259705, -0.6876941323280334, 0.008426717482507229, 0.221097931265831, 0.4860669672489166, 0.9671425819396973, -0.04446125030517578, 0.08888337761163712, 1.390669345855713, 1.2224769592285156, -0.48872804641723633, 0.34359273314476013, -0.8200015425682068, -0.43941545486450195, 0.41962018609046936, 0.29460421204566956, 0.02061198651790619, 0.4168895483016968, -0.92885422706604, -0.26864057779312134, -0.41495949029922485, -0.924468994140625, -0.7324734926223755, -0.4237976372241974, -0.32804322242736816, 1.6466642618179321, 0.14244218170642853, -0.42962363362312317, 0.012561134062707424, -0.7871246337890625, -0.12091819941997528, -1.0468180179595947, 0.25613856315612793, -0.05229996144771576, -0.059267010539770126, -0.044897403568029404, 1.8042840957641602, -0.9526805877685547, -2.040963649749756, 0.24295315146446228, 0.16677333414554596, -0.36686769127845764, 0.19574126601219177, 1.7437363862991333, 0.4844096004962921, 1.5015288591384888, 1.2780168056488037, 0.9611213207244873, -0.6409368515014648, -1.272225260734558, 0.7360712289810181, 0.9700474143028259, -1.371212363243103, 0.8357124328613281, 0.05007009953260422, -0.5331502556800842, 0.6866092085838318, 1.2308440208435059, 0.48013365268707275, -2.0725669860839844, 0.8797324299812317, -1.0079827308654785, 0.7612357139587402, 0.7019650340080261, 0.7291605472564697, 0.23824553191661835, 0.8549471497535706, -1.20783531665802, -1.124819040298462, -0.774025559425354, -0.6490877270698547, 2.021839141845703, -0.21685606241226196, 0.5319960713386536, -0.1273791491985321, -1.3061668872833252, -0.06485439091920853, 0.7320191860198975, 0.3435365557670593, -0.4350438117980957, 0.8238492608070374, -0.6757872700691223, -1.146774172782898, -1.419382929801941, -0.3878665566444397, -0.9623111486434937, -0.8606981039047241, 1.062319040298462, 0.821940004825592, 0.2634071409702301, 1.928364872932434, 0.6330671310424805, 0.27276962995529175, -2.6923916339874268, 0.9987102746963501, 0.3251999318599701, -0.18923288583755493, 0.9035043120384216, 0.35054609179496765, 1.0063742399215698, 0.04669348523020744, 0.4899413287639618, -2.4162020683288574, 2.2321109771728516, -0.2636207044124603, 0.7633394002914429, -0.008289337158203125, -0.10507547110319138, 1.0823560953140259, 0.49917083978652954, 0.5604204535484314, -1.1344529390335083, 0.6919979453086853, -0.5418774485588074, 1.1550447940826416, 0.9538289308547974, -0.793939471244812, -0.004309877287596464, 1.3401442766189575, 0.47586143016815186, -0.5212842226028442, -0.8715648055076599, -0.9201736450195312, 0.9244480133056641, 1.809990644454956, -0.11999678611755371, 0.03334755823016167, 0.7930186986923218, 0.689936637878418, -1.3192082643508911, 0.043762754648923874, -0.716062605381012, -0.8175733685493469, 1.5959724187850952, 2.0554373264312744, -0.09428814053535461, -0.23119007050991058, -0.749000072479248, -1.2695655822753906, 0.8131189346313477, -0.05970003828406334, 0.2395407259464264, 0.6025654077529907, -0.6871935725212097, 1.1681524515151978, 0.8983811736106873, 0.940741777420044, 0.18002687394618988, 0.22886644303798676, 0.46123427152633667, -0.3348443806171417, -1.0525341033935547, -0.2663927674293518, -1.0378721952438354, -2.5338032245635986, 0.48069295287132263, -0.20143122971057892, -1.387616515159607, 0.027658525854349136, -1.003354787826538, 0.8911115527153015, -0.53708815574646, -1.0368322134017944, -1.573319911956787, 0.2257171869277954, -0.1261247843503952, 0.9791632890701294, -1.648964762687683, -0.17275460064411163, 1.1787476539611816, 0.9302022457122803, -0.6185792088508606, 1.0332571268081665, 0.22381339967250824, 1.0330663919448853, 0.9093336462974548, -0.4365110695362091, 0.5088909268379211, 0.089270681142807, -1.3123358488082886, 0.40808022022247314, 1.158029317855835, 0.1867503523826599, 1.3337699174880981, -0.5297097563743591, 0.004878695122897625, 0.4036710560321808, -0.5464003682136536, -0.4881860911846161, -0.47552117705345154, 0.6942993402481079, 0.08503158390522003, -0.9227538108825684, -0.024102745577692986, -0.16282881796360016, -0.2654392719268799, 0.17042823135852814, -1.5620429515838623, -0.2424352616071701, -0.37882426381111145, -0.5618928670883179, -1.2592558860778809, -0.05545318126678467, 1.4394158124923706, -0.7746964693069458, -0.20412327349185944, 0.5137847661972046, 0.4535905122756958, 0.5059292316436768, 0.6235814690589905, -0.7001017928123474, -0.38244616985321045, -0.20959191024303436, -0.3883601427078247, 0.31924712657928467, 1.3536463975906372, -0.04579022526741028, -0.9369269013404846, 0.6835438013076782, -0.329830139875412, 0.09083191305398941, 1.9588590860366821, 0.10283008962869644, -0.8095008730888367, 0.3021469712257385, -0.7331300973892212, 1.8649426698684692, 1.7183952331542969, 1.3331623077392578, -0.15283186733722687, -0.9624540209770203, 0.6641438603401184, -0.3106423616409302, -0.2936314344406128, 0.9178137183189392, 0.4280757009983063, -0.19903233647346497, -1.437050700187683, 0.5357477068901062, 1.3191522359848022, -0.8971918225288391, -0.7110604643821716, 0.03706691041588783, -0.8163573145866394, 1.0944137573242188, 0.6376505494117737, 0.3441922962665558, 0.21178096532821655, 1.5532903671264648, 0.7665706276893616, -0.5156477689743042, 0.49238014221191406, 0.5067873001098633, -0.17909757792949677, -2.1729886531829834, -1.1002373695373535, 0.29590722918510437, -0.38480690121650696, -1.53457510471344, 1.4173873662948608, -1.1488101482391357, -1.0297563076019287, 0.5104825496673584, 0.04274242743849754, 1.4190057516098022, 0.3543519377708435, 1.573590636253357, 2.1814088821411133, 0.8870885968208313, 0.35866832733154297, 1.3306958675384521, -0.18820036947727203, -0.4372349679470062, 1.8113682270050049, -0.4286009669303894, 0.44909676909446716, 1.0992565155029297, -0.34803324937820435, -1.0020233392715454, -0.8070335388183594, -1.1953476667404175, -0.7248567938804626, 1.1718411445617676, 0.0872267410159111, -1.075683832168579, 0.26019906997680664, 1.6344019174575806, 0.12739910185337067, -0.39434364438056946, 0.5731013417243958, 0.4560621380805969, -0.7373517155647278, -0.09887918084859848, -0.9011266827583313, 0.5348690152168274, -0.17530350387096405, -0.33627644181251526, 0.3809939920902252, 0.3918733596801758, 1.2654051780700684, 0.015111477114260197, 0.11367481201887131, 1.1313070058822632, -1.4497179985046387, 1.4816396236419678, -0.6278185248374939, 0.271332323551178, -2.398031711578369, 1.4615280628204346, -0.7241928577423096, 1.9865946769714355, -2.610938549041748, 0.4266209304332733, -0.621814489364624, -0.4755730926990509, 0.28958985209465027, -0.31448009610176086, 0.18057502806186676, -0.14503155648708344, -1.0820629596710205, -0.10338565707206726, -0.6806744337081909, 0.5964577794075012, 1.0722863674163818, 1.2667170763015747, -1.0878651142120361, -0.3190384805202484, -1.7210599184036255, -0.2180003672838211, -0.698790431022644, 0.2113492339849472, -2.0240817070007324, -0.2080819010734558, -1.9407477378845215, -2.397096633911133, -1.3787107467651367, -0.8260676860809326, 1.0981478691101074, 0.1240130141377449, -0.908150851726532, 1.1697418689727783, -0.41194045543670654, -1.8564070463180542, 1.1473764181137085, -2.1236050128936768 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
> Maybe it would take too much time to be worth exploring, but according to https://github.com/tensorflow/io/issues/1361#issuecomment-819029002 it's possible to add support for binary type in ArrowFeatherDataset. Should be possible as per the comment but there hasn't been any progress and it's been more than a year. > If we were to use base64, then we would have to process the full dataset to convert it, which can take some time. I don't understand this. I would think TFRecords would also need something similar but I need the context you're coming from. > What do you think ? Any other alternative in mind ? TFRecords since the TensorFlow ecosystem has developed good support for it over the years.
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
117
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data > Maybe it would take too much time to be worth exploring, but according to https://github.com/tensorflow/io/issues/1361#issuecomment-819029002 it's possible to add support for binary type in ArrowFeatherDataset. Should be possible as per the comment but there hasn't been any progress and it's been more than a year. > If we were to use base64, then we would have to process the full dataset to convert it, which can take some time. I don't understand this. I would think TFRecords would also need something similar but I need the context you're coming from. > What do you think ? Any other alternative in mind ? TFRecords since the TensorFlow ecosystem has developed good support for it over the years.
[ -1.2155914306640625, -0.9610122442245483, -0.7311946749687195, 1.4002023935317993, -0.16383051872253418, -1.1910275220870972, 0.04045237600803375, -1.1433576345443726, 1.6439828872680664, -0.7360739707946777, 0.3020641803741455, -1.634456753730774, 0.06553438305854797, -0.6020340919494629, -0.760643482208252, -0.8332574963569641, -0.38329899311065674, -0.8409227132797241, 1.0510698556900024, 2.5163443088531494, 1.1834176778793335, -1.4882718324661255, 2.694514751434326, 0.7148152589797974, -0.23250745236873627, -1.0186342000961304, 0.51258385181427, 0.06681853532791138, -1.2328827381134033, -0.47084423899650574, -0.8784818649291992, -0.022274862974882126, -0.5724372863769531, -0.45045581459999084, -0.027891093865036964, 0.3190906047821045, -0.2375958412885666, -0.3509972393512726, -0.5641882419586182, -0.6993818879127502, 0.4596816301345825, -0.3949201703071594, 1.0238831043243408, -0.23271019756793976, 1.821831226348877, -0.4425167441368103, 0.4558282196521759, 0.6850151419639587, 1.336212396621704, 0.22963550686836243, 0.045224592089653015, 0.2533531188964844, 0.41636258363723755, -0.10122402757406235, 0.47279077768325806, 1.1342557668685913, 0.7023492455482483, 0.46274933218955994, 0.7123180031776428, -2.2029263973236084, 1.3048816919326782, -1.0100172758102417, 0.3157593011856079, 1.333268642425537, -0.8634290099143982, 0.4362996220588684, -1.7975740432739258, -0.0813848078250885, 0.6335286498069763, -2.265176296234131, 0.27007511258125305, -1.3004671335220337, -0.5281277894973755, 0.9006713032722473, 0.23636317253112793, -1.2045291662216187, 0.3149903118610382, -0.45073404908180237, 1.0419358015060425, 0.44880303740501404, 1.210540771484375, -1.662785530090332, 0.024438077583909035, -0.2862567901611328, 0.1362849324941635, -1.2606191635131836, -1.4858964681625366, 0.5399594306945801, 0.6632770299911499, 0.5491871237754822, -0.07254142314195633, 0.9883657693862915, -1.0139930248260498, 0.8056325316429138, -0.9852488040924072, -1.6407272815704346, -1.3932758569717407, -2.2386271953582764, -2.2986772060394287, 0.7987629175186157, -0.466449499130249, -0.5837207436561584, 2.0364785194396973, -1.0717015266418457, -1.7527251243591309, 1.2057057619094849, 0.3372490108013153, -0.04222411662340164, 2.4373810291290283, 0.12402413785457611, -0.7134600281715393, 0.460257351398468, -0.7361103296279907, 0.8333015441894531, -0.4346628487110138, 1.4021128416061401, 0.42447614669799805, -0.9880511164665222, 1.6067739725112915, -0.4319663941860199, 0.5443521738052368, -0.6750268936157227, -0.5832211375236511, -0.7876418828964233, 0.3570713996887207, 1.9279779195785522, -0.32014235854148865, 1.5684067010879517, -0.4437654912471771, -1.5541588068008423, -1.5652484893798828, 0.8599672913551331, 0.5232112407684326, -0.8623636364936829, 0.06418698281049728, -0.4160798192024231, 0.16443265974521637, -0.005960832815617323, 1.0272002220153809, 1.2835904359817505, 0.6286250948905945, -0.27737224102020264, -0.8887546062469482, 0.19579657912254333, -0.14803241193294525, -0.6773844957351685, -1.8976682424545288, -0.28958064317703247, 0.18645116686820984, 0.6294985413551331, -1.2775490283966064, 1.7249199151992798, 0.9285458326339722, 2.015894889831543, 0.9590737819671631, -0.365420401096344, 1.5035370588302612, 0.029418187215924263, 1.7837495803833008, -0.4965783655643463, 0.6951762437820435, -0.35291537642478943, -1.0992546081542969, 0.7955358028411865, -0.3213966488838196, -1.96703040599823, -0.7073265910148621, -0.8186376690864563, -0.278425395488739, -0.7242609262466431, 0.8428630232810974, -0.25117257237434387, -1.3481601476669312, 0.3040599226951599, -0.6247871518135071, 0.19568289816379547, -1.1882293224334717, 0.3743266463279724, 0.7231838703155518, -0.6373531818389893, 0.012227186933159828, -0.26078906655311584, -1.2932814359664917, -0.4919169247150421, 0.2875696122646332, 1.830000400543213, -0.7761906981468201, 0.8575217723846436, 1.0613905191421509, -0.6245376467704773, 0.004937935620546341, 0.34942594170570374, -0.2947259545326233, 0.8049134016036987, -1.0519999265670776, -0.44481775164604187, 1.1790252923965454, -0.21282684803009033, -0.5476465225219727, 1.4192218780517578, 0.7680637240409851, -1.0195841789245605, -0.23993895947933197, -0.13671666383743286, -0.809863269329071, 0.03229791671037674, -1.6283022165298462, -0.18485696613788605, 0.309571772813797, -1.5523568391799927, -0.45389410853385925, -0.2722245454788208, 1.2816845178604126, -0.18241944909095764, 1.4823925495147705, -0.3845787048339844, -0.12551672756671906, -0.36625194549560547, -0.44790977239608765, 0.18377076089382172, -0.23176737129688263, -0.6165143251419067, 0.23243339359760284, -0.8006515502929688, 0.4049999415874481, 1.4242409467697144, 0.3382245898246765, 0.011787481606006622, 0.38000011444091797, 1.0812578201293945, 0.4253935217857361, -0.029139503836631775, -0.8659301996231079, -1.5258153676986694, 1.9914050102233887, -1.4942302703857422, 2.0456433296203613, 0.8725243806838989, 0.05482693761587143, -1.7548972368240356, -1.8646552562713623, 1.3523600101470947, 1.1411898136138916, 2.3354599475860596, 0.5764015913009644, 0.36109498143196106, -0.7900888323783875, -0.5582212805747986, 0.36458900570869446, -1.0645852088928223, -0.7391715049743652, 0.09669218957424164, 2.3484315872192383, 1.791136622428894, -0.4942112863063812, -0.2068110555410385, -0.9917963147163391, 1.3712414503097534, -0.1006132960319519, 0.24759319424629211, 2.0672996044158936, -0.28814247250556946, -1.121654987335205, 1.265424370765686, -2.409264087677002, 0.1311662197113037, 1.9550702571868896, 0.266466349363327, 0.12651672959327698, -1.3809142112731934, -0.5682946443557739, -0.2840369641780853, -0.4146033525466919, -1.1622074842453003, 0.5628176331520081, -0.2817772328853607, -0.8373614549636841, -1.5357710123062134, 0.1909901648759842, -1.2169101238250732, -1.5895416736602783, 0.3574240803718567, 1.9367491006851196, 2.057950496673584, -0.7963074445724487, 1.4983547925949097, -0.32573533058166504, 0.1417824625968933, 1.2410286664962769, 1.222038984298706, 3.1605589389801025, 1.9037243127822876, -1.3007357120513916, 0.5435438752174377, -0.23178645968437195, -0.5099717974662781, 1.0939078330993652, -1.1195592880249023, 1.2622888088226318, -0.12477067112922668, -1.165995717048645, -1.2072094678878784, 0.9285419583320618, 0.48538342118263245, 0.10393188148736954, -0.5487709641456604, 1.1197210550308228, 0.09828872233629227, 1.3500330448150635, 0.47474205493927, -0.36941686272621155, 0.5917870998382568, -0.4108274579048157, -0.5345867276191711, 1.5728803873062134, 0.12453925609588623, -1.4591975212097168, -2.3155603408813477, -0.22096525132656097, -0.7810178399085999, 0.0337989404797554, -0.6124760508537292, -0.9943609833717346, 1.615616798400879, 0.32458290457725525, -1.3229942321777344, -0.246659517288208, -0.31871265172958374, -0.5412955284118652, 2.5857465267181396, -1.4373596906661987, -0.27184104919433594, -0.9656879305839539, -0.5974657535552979, 1.6246615648269653, -1.1346031427383423, -0.24274244904518127, -0.9736006855964661, -0.5723267197608948, -1.2856636047363281, -0.500156044960022, 0.03292042016983032, -0.879243016242981, 0.7496533393859863, 0.2456488311290741, -1.1009907722473145, -0.3449523448944092, -0.8934122323989868, 0.8822085857391357, -0.13651563227176666, 0.27503612637519836, 1.894614577293396, 0.41053569316864014, -0.40954411029815674, 0.6882839798927307, 1.20187246799469, 0.588787853717804, -0.666810929775238, 0.12803080677986145, -0.7513461112976074, 0.34452635049819946, -1.3660720586776733, 0.3233707547187805, -2.887648820877075, 0.674190104007721, -0.001922911498695612, -0.049512818455696106, 0.08013241738080978, -1.3488932847976685, 1.1311208009719849, 2.6752822399139404, -1.1342082023620605, 0.4424799382686615, 0.33268335461616516, 1.2047538757324219, -1.5814248323440552, 0.35167065262794495, -0.35773614048957825, 2.170380115509033, 0.18590140342712402, 1.247183084487915, -0.5239158868789673, -2.384246349334717, 0.5602520108222961, -1.2227104902267456, -1.1583341360092163, 0.7865270972251892, -0.9266594648361206, -0.014396805316209793, -1.471384048461914, -0.2099311798810959, -0.9253315329551697, -1.228820562362671, 0.7619640827178955, 0.15114463865756989, 0.4829906225204468, -0.6812511086463928, 0.3430465757846832, -2.207263231277466, -1.362057089805603, -0.23611986637115479, -0.9518177509307861, 0.4663543403148651, -0.3443118631839752, 0.605983316898346, -0.14592349529266357, 0.04208795726299286, 0.2755030393600464, 1.3872798681259155, 3.3660387992858887, 0.2623847723007202, 0.4248517155647278, -0.2004895657300949, -0.9321966171264648, 1.400790810585022, 0.9182557463645935, -0.11513202637434006, -0.5744432210922241, -0.9985015392303467, 1.235317587852478, 1.9623924493789673, 0.9843477010726929, 0.056180693209171295, -0.7854284048080444, -0.6785959005355835, 0.004212996922433376, 0.20633047819137573, 0.4812268018722534, 0.9550603628158569, -0.020463639870285988, 0.11526065319776535, 1.3480852842330933, 1.2855068445205688, -0.5020936727523804, 0.36381569504737854, -0.8389831781387329, -0.4300045967102051, 0.42122235894203186, 0.2902219295501709, 0.019229570403695107, 0.4148045778274536, -0.9390908479690552, -0.20588304102420807, -0.4442850351333618, -0.959133505821228, -0.7153059244155884, -0.419841468334198, -0.3070079982280731, 1.6084480285644531, 0.1696787029504776, -0.47503897547721863, 0.02178921550512314, -0.7939739227294922, -0.1157197430729866, -1.0433142185211182, 0.2144315391778946, -0.07277834415435791, -0.09531290084123611, -0.06750582158565521, 1.8162049055099487, -0.9454599022865295, -2.038572311401367, 0.24803784489631653, 0.18105556070804596, -0.36493510007858276, 0.2372225522994995, 1.7335205078125, 0.4612796902656555, 1.4829504489898682, 1.2942564487457275, 0.9684274196624756, -0.6427707076072693, -1.2684799432754517, 0.7600540518760681, 0.977377712726593, -1.3801885843276978, 0.8477168083190918, 0.04978308081626892, -0.5391703844070435, 0.7299898266792297, 1.253041386604309, 0.4322366714477539, -2.073622941970825, 0.8768883347511292, -0.992918848991394, 0.7754718661308289, 0.7167679667472839, 0.7383279800415039, 0.2507738769054413, 0.8453702330589294, -1.201401710510254, -1.1469453573226929, -0.7775128483772278, -0.6404500007629395, 2.0012731552124023, -0.19867798686027527, 0.558147668838501, -0.09109853953123093, -1.3074796199798584, -0.12010341882705688, 0.7235338687896729, 0.36246457695961, -0.4297892451286316, 0.8089861869812012, -0.7078133225440979, -1.15150785446167, -1.4158860445022583, -0.427002876996994, -0.9865403771400452, -0.8994479179382324, 1.0669103860855103, 0.8279697299003601, 0.2712724506855011, 1.900577425956726, 0.6362752318382263, 0.24210622906684875, -2.7072041034698486, 1.0080604553222656, 0.3018852174282074, -0.18494373559951782, 0.9104586839675903, 0.3127569556236267, 1.0010703802108765, 0.10605809837579727, 0.4761224687099457, -2.4326250553131104, 2.253333568572998, -0.2748202979564667, 0.7619706392288208, -0.023266853764653206, -0.13193728029727936, 1.1039597988128662, 0.5280714631080627, 0.5531184077262878, -1.1176539659500122, 0.7340688705444336, -0.551936149597168, 1.178049921989441, 0.9305699467658997, -0.7808099985122681, -0.03839088976383209, 1.3204412460327148, 0.43815910816192627, -0.549909234046936, -0.8667071461677551, -0.9512326717376709, 0.8849411010742188, 1.7669638395309448, -0.11859928071498871, -0.015247497707605362, 0.7616855502128601, 0.7049621939659119, -1.2982733249664307, 0.04596952348947525, -0.713821291923523, -0.8145849704742432, 1.6014834642410278, 2.005718946456909, -0.08670025318861008, -0.26138848066329956, -0.7502254843711853, -1.234773874282837, 0.7482869029045105, -0.023259669542312622, 0.2513652741909027, 0.6062291860580444, -0.6922040581703186, 1.1680859327316284, 0.859234631061554, 0.9175165891647339, 0.18151617050170898, 0.2247520089149475, 0.44170814752578735, -0.3658588230609894, -1.059554100036621, -0.26460909843444824, -1.1028364896774292, -2.5156171321868896, 0.46325919032096863, -0.21171969175338745, -1.3960328102111816, 0.016154345124959946, -0.9985288381576538, 0.9064095616340637, -0.5572519898414612, -1.0404490232467651, -1.5754002332687378, 0.2228941023349762, -0.15120461583137512, 0.9504022002220154, -1.666160225868225, -0.1363469809293747, 1.1763521432876587, 0.9135147333145142, -0.5980596542358398, 1.0858339071273804, 0.2273845672607422, 1.0366934537887573, 0.9326008558273315, -0.4216955304145813, 0.4745522439479828, 0.06774744391441345, -1.3351820707321167, 0.4057018756866455, 1.1245949268341064, 0.19240568578243256, 1.365296483039856, -0.538433313369751, -0.002300322987139225, 0.3729049563407898, -0.5512677431106567, -0.46909189224243164, -0.49042996764183044, 0.7290222644805908, 0.05820445716381073, -0.8950961232185364, 0.0008114809170365334, -0.17851431667804718, -0.21922336518764496, 0.14050407707691193, -1.5741722583770752, -0.24552027881145477, -0.40183570981025696, -0.5498153567314148, -1.2580695152282715, -0.024630602449178696, 1.448516607284546, -0.7559060454368591, -0.21135759353637695, 0.5158261656761169, 0.4812207818031311, 0.48877426981925964, 0.6341180801391602, -0.6547835469245911, -0.41338133811950684, -0.19764797389507294, -0.35065311193466187, 0.31736478209495544, 1.361198902130127, -0.09558774530887604, -0.9221332669258118, 0.6627821922302246, -0.3753644526004791, 0.07193086296319962, 1.9635144472122192, 0.1089378148317337, -0.8032621145248413, 0.31515586376190186, -0.7387930154800415, 1.8949097394943237, 1.7552697658538818, 1.3638324737548828, -0.14841872453689575, -0.959220290184021, 0.6585150361061096, -0.3439857065677643, -0.30417123436927795, 0.91380774974823, 0.4408743381500244, -0.1901436597108841, -1.3936145305633545, 0.5089982151985168, 1.2860922813415527, -0.879836916923523, -0.6946824193000793, 0.017013896256685257, -0.7978203296661377, 1.0657285451889038, 0.6527199745178223, 0.36562812328338623, 0.1661887913942337, 1.549543023109436, 0.767190158367157, -0.5201268792152405, 0.5409942865371704, 0.4963214695453644, -0.20037956535816193, -2.163968324661255, -1.1366883516311646, 0.26802748441696167, -0.35586246848106384, -1.5591503381729126, 1.4152694940567017, -1.1515024900436401, -0.9975100755691528, 0.4993581473827362, 0.036389753222465515, 1.4044572114944458, 0.3832550346851349, 1.5610936880111694, 2.1780524253845215, 0.8778575658798218, 0.3365526795387268, 1.3268775939941406, -0.2226232886314392, -0.46952739357948303, 1.847832441329956, -0.46908602118492126, 0.4578140079975128, 1.1039090156555176, -0.33861082792282104, -1.0052765607833862, -0.7800335884094238, -1.182896614074707, -0.6778758764266968, 1.2009843587875366, 0.06984318792819977, -1.0812480449676514, 0.2822686731815338, 1.6444594860076904, 0.05922564119100571, -0.3898056447505951, 0.5781039595603943, 0.4625946283340454, -0.7746993899345398, -0.10526463389396667, -0.8996375203132629, 0.5428154468536377, -0.1584487110376358, -0.34922051429748535, 0.3788827657699585, 0.41139328479766846, 1.2445255517959595, 0.006954964250326157, 0.13159625232219696, 1.1351633071899414, -1.4375742673873901, 1.4846316576004028, -0.6304247379302979, 0.2602370083332062, -2.3984358310699463, 1.4494272470474243, -0.7152935266494751, 2.009218692779541, -2.6009514331817627, 0.3933509290218353, -0.6468605995178223, -0.5064173340797424, 0.31711146235466003, -0.333814799785614, 0.18717946112155914, -0.16667404770851135, -1.0456434488296509, -0.09767410159111023, -0.6975464224815369, 0.5680354237556458, 1.057605266571045, 1.2569316625595093, -1.0925379991531372, -0.305521696805954, -1.7487549781799316, -0.20934823155403137, -0.7290706038475037, 0.26173821091651917, -2.0429723262786865, -0.21931909024715424, -1.9642894268035889, -2.3654680252075195, -1.3988151550292969, -0.8250719308853149, 1.0392465591430664, 0.15509022772312164, -0.9182072877883911, 1.189664363861084, -0.3723156154155731, -1.8333851099014282, 1.1154656410217285, -2.0840301513671875 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
> I don't understand this. I would think TFRecords would also need something similar but I need the context you're coming from. Users already have a copy of the dataset in Arrow format (we can change this to Feather). So to load the Arrow/feather files to a TF dataset we need TF IO or something like that. Otherwise the user has to convert all the files from Arrow to TFRecords to use TF data efficiently. But the conversion needs resources: CPU, disk, time. Converting the images to base64 require the same sort of resources. So the issue we're trying to tackle is how to load the Arrow data in TF without having to convert anything ^^
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
116
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data > I don't understand this. I would think TFRecords would also need something similar but I need the context you're coming from. Users already have a copy of the dataset in Arrow format (we can change this to Feather). So to load the Arrow/feather files to a TF dataset we need TF IO or something like that. Otherwise the user has to convert all the files from Arrow to TFRecords to use TF data efficiently. But the conversion needs resources: CPU, disk, time. Converting the images to base64 require the same sort of resources. So the issue we're trying to tackle is how to load the Arrow data in TF without having to convert anything ^^
[ -1.204015851020813, -0.9573182463645935, -0.7449625730514526, 1.3810335397720337, -0.1726725846529007, -1.213314175605774, 0.044237639755010605, -1.1737598180770874, 1.6870938539505005, -0.7739081978797913, 0.2722969055175781, -1.6230605840682983, 0.08631269633769989, -0.5753557085990906, -0.7600029706954956, -0.8668018579483032, -0.39930209517478943, -0.8258116841316223, 1.0266684293746948, 2.5275285243988037, 1.1791437864303589, -1.4452189207077026, 2.706664562225342, 0.7439339756965637, -0.235140860080719, -0.990083634853363, 0.4986652433872223, 0.07434780895709991, -1.2435672283172607, -0.49422308802604675, -0.8893149495124817, -0.024921223521232605, -0.5699735283851624, -0.4687502086162567, -0.050234559923410416, 0.3127470314502716, -0.24586375057697296, -0.34986042976379395, -0.5785562992095947, -0.7019492387771606, 0.4680947959423065, -0.39639922976493835, 1.0155400037765503, -0.2726307511329651, 1.8891316652297974, -0.4760393500328064, 0.4438145160675049, 0.7099335193634033, 1.353577971458435, 0.1902059018611908, -0.0014104819856584072, 0.2741548418998718, 0.42900514602661133, -0.11102849245071411, 0.46532267332077026, 1.110231637954712, 0.6592831015586853, 0.46027976274490356, 0.6952856183052063, -2.205639362335205, 1.3262370824813843, -1.046371579170227, 0.2939288914203644, 1.3427841663360596, -0.8764596581459045, 0.42986416816711426, -1.775478720664978, -0.08492043614387512, 0.6268085241317749, -2.2818422317504883, 0.2520880103111267, -1.310471534729004, -0.5631167888641357, 0.9008459448814392, 0.2470552772283554, -1.2039815187454224, 0.35322895646095276, -0.4590291678905487, 1.0383490324020386, 0.47294849157333374, 1.2209162712097168, -1.6696199178695679, 0.011016509495675564, -0.26404061913490295, 0.10231636464595795, -1.3143515586853027, -1.4816327095031738, 0.5355867147445679, 0.6594998240470886, 0.5160014033317566, -0.06851308047771454, 1.0079021453857422, -0.9952556490898132, 0.8072477579116821, -0.9690738916397095, -1.6240308284759521, -1.4129893779754639, -2.22226619720459, -2.2858283519744873, 0.7916262149810791, -0.48414888978004456, -0.5835496783256531, 2.090221405029297, -1.079541563987732, -1.7421122789382935, 1.233172059059143, 0.3179900646209717, -0.06916625052690506, 2.410945177078247, 0.11977332085371017, -0.6695651412010193, 0.4272366166114807, -0.7539602518081665, 0.8247082829475403, -0.459639310836792, 1.4046646356582642, 0.4147322475910187, -1.0347594022750854, 1.577409029006958, -0.4256112575531006, 0.5537828803062439, -0.6792993545532227, -0.5757884979248047, -0.7970645427703857, 0.4011611342430115, 1.9150477647781372, -0.3315088748931885, 1.5994755029678345, -0.4385876953601837, -1.54076087474823, -1.5584533214569092, 0.8766586184501648, 0.5413979887962341, -0.8736223578453064, 0.04815470427274704, -0.40607380867004395, 0.13322316110134125, -0.00901234894990921, 1.037110686302185, 1.2737733125686646, 0.6255843639373779, -0.2977754771709442, -0.8495995998382568, 0.18968740105628967, -0.1565963476896286, -0.6867837905883789, -1.9119452238082886, -0.2713760435581207, 0.18199501931667328, 0.599612832069397, -1.2741804122924805, 1.7094420194625854, 0.9284324645996094, 1.9631630182266235, 0.9719986915588379, -0.35063809156417847, 1.485670566558838, 0.026012178510427475, 1.786868691444397, -0.4966585040092468, 0.7132568955421448, -0.36318299174308777, -1.1122398376464844, 0.7819822430610657, -0.31553560495376587, -1.9792938232421875, -0.7246094346046448, -0.8006083965301514, -0.27485352754592896, -0.7360837459564209, 0.8463326692581177, -0.21737618744373322, -1.3467317819595337, 0.27410730719566345, -0.5792790055274963, 0.18030945956707, -1.173950433731079, 0.3955098092556, 0.7078698873519897, -0.6422595977783203, 0.03745556250214577, -0.23271885514259338, -1.3071433305740356, -0.462919682264328, 0.26942408084869385, 1.810245156288147, -0.8133261203765869, 0.871084451675415, 1.0683187246322632, -0.6159113049507141, 0.007074696011841297, 0.3713817000389099, -0.314738929271698, 0.8193957805633545, -1.0344936847686768, -0.42759791016578674, 1.1626893281936646, -0.2244042605161667, -0.5429280400276184, 1.4121334552764893, 0.7186172008514404, -1.0125426054000854, -0.21172483265399933, -0.1629471331834793, -0.8388000726699829, 0.028691794723272324, -1.6333335638046265, -0.19684457778930664, 0.2756005525588989, -1.5714064836502075, -0.4739520847797394, -0.2615929841995239, 1.3234645128250122, -0.196639284491539, 1.5057815313339233, -0.4159625172615051, -0.13856790959835052, -0.3921249806880951, -0.41232356429100037, 0.22248417139053345, -0.20877273380756378, -0.6182273030281067, 0.24065351486206055, -0.775719165802002, 0.4042239189147949, 1.4070461988449097, 0.3419432044029236, 0.022216420620679855, 0.4025593101978302, 1.065384864807129, 0.40145614743232727, -0.07905156165361404, -0.8541721701622009, -1.5617187023162842, 1.988484501838684, -1.503785490989685, 2.0479722023010254, 0.8687586188316345, 0.09685350954532623, -1.782564640045166, -1.8719180822372437, 1.3387010097503662, 1.1448729038238525, 2.2880935668945312, 0.5473041534423828, 0.3750109076499939, -0.8102904558181763, -0.521989643573761, 0.37735381722450256, -1.0671602487564087, -0.6673235893249512, 0.09286440908908844, 2.3229422569274902, 1.785017490386963, -0.5337173342704773, -0.19133669137954712, -1.012137532234192, 1.3647513389587402, -0.10958490520715714, 0.24932442605495453, 2.067142963409424, -0.2973679304122925, -1.1113533973693848, 1.2737650871276855, -2.404789924621582, 0.09486138075590134, 1.8927491903305054, 0.22584222257137299, 0.0987861379981041, -1.3711081743240356, -0.5712851285934448, -0.28311437368392944, -0.43002885580062866, -1.174352765083313, 0.5480014681816101, -0.2804899513721466, -0.8228728771209717, -1.5379334688186646, 0.188121035695076, -1.24741792678833, -1.5833361148834229, 0.3737524747848511, 1.944342851638794, 2.014226198196411, -0.7568994760513306, 1.5263105630874634, -0.34799468517303467, 0.13707593083381653, 1.2332391738891602, 1.2059895992279053, 3.170771360397339, 1.9087159633636475, -1.3349031209945679, 0.5001570582389832, -0.19210848212242126, -0.4829185903072357, 1.119274377822876, -1.0832924842834473, 1.3149315118789673, -0.09542733430862427, -1.1724023818969727, -1.224778413772583, 0.9297256469726562, 0.49058082699775696, 0.14480285346508026, -0.5371853113174438, 1.116598129272461, 0.062083322554826736, 1.3456064462661743, 0.47208499908447266, -0.4058960974216461, 0.5961575508117676, -0.42372775077819824, -0.5316699743270874, 1.5712013244628906, 0.12242460995912552, -1.4044469594955444, -2.317655324935913, -0.21717649698257446, -0.7733778357505798, 0.046193093061447144, -0.6231582760810852, -0.9459695816040039, 1.609398603439331, 0.36864009499549866, -1.3305250406265259, -0.2602965533733368, -0.31627848744392395, -0.5214004516601562, 2.5967187881469727, -1.4013928174972534, -0.25710633397102356, -0.9709780812263489, -0.6141550540924072, 1.6027940511703491, -1.1557339429855347, -0.25173088908195496, -0.9626675844192505, -0.5352492332458496, -1.27449369430542, -0.5256892442703247, 0.01949205994606018, -0.9006155729293823, 0.7649778723716736, 0.22682702541351318, -1.1081452369689941, -0.3571586012840271, -0.8501996397972107, 0.904371976852417, -0.09681998193264008, 0.22603873908519745, 1.9004298448562622, 0.4020552337169647, -0.4556743800640106, 0.6865485906600952, 1.2091175317764282, 0.5826992392539978, -0.6439090967178345, 0.1634204089641571, -0.7609981894493103, 0.29066604375839233, -1.3833069801330566, 0.31378746032714844, -2.9146194458007812, 0.6605126261711121, -0.010269898921251297, -0.04268167167901993, 0.0910949558019638, -1.3422616720199585, 1.0750482082366943, 2.6927947998046875, -1.102759838104248, 0.39288437366485596, 0.34707650542259216, 1.2250007390975952, -1.5477372407913208, 0.3839254081249237, -0.38478177785873413, 2.1493468284606934, 0.18453949689865112, 1.24135160446167, -0.4890531003475189, -2.3632407188415527, 0.5747063755989075, -1.2176618576049805, -1.1982072591781616, 0.8171342015266418, -0.9060171842575073, -0.024308715015649796, -1.4734293222427368, -0.221448615193367, -0.9051480889320374, -1.2251003980636597, 0.7427532076835632, 0.1795351356267929, 0.4970097839832306, -0.6864162087440491, 0.3034426271915436, -2.2108733654022217, -1.2882599830627441, -0.2177896648645401, -0.9238449931144714, 0.4321148991584778, -0.3075007498264313, 0.6164097785949707, -0.13995462656021118, 0.07834789901971817, 0.2536122798919678, 1.3979346752166748, 3.3563430309295654, 0.26522213220596313, 0.43230998516082764, -0.22221188247203827, -0.9114316701889038, 1.3859366178512573, 0.908282995223999, -0.11924288421869278, -0.5902829766273499, -1.0245227813720703, 1.1740429401397705, 1.9825888872146606, 0.9788385033607483, 0.0531051941215992, -0.7607924938201904, -0.6598483324050903, -0.03172588348388672, 0.1983848661184311, 0.5103280544281006, 0.9648178219795227, -0.05013424903154373, 0.09131363034248352, 1.3968284130096436, 1.290906310081482, -0.5101174116134644, 0.3571493923664093, -0.8050402402877808, -0.4175880551338196, 0.4287921190261841, 0.34076839685440063, 0.01981665939092636, 0.40446463227272034, -0.9069286584854126, -0.20037934184074402, -0.4564037621021271, -0.946606457233429, -0.6808256506919861, -0.4176894426345825, -0.32562607526779175, 1.6299943923950195, 0.17749132215976715, -0.4313587546348572, -0.029434747993946075, -0.792387068271637, -0.11401408910751343, -1.0569242238998413, 0.2613610029220581, -0.040317557752132416, -0.05069177225232124, -0.05212920159101486, 1.8105099201202393, -0.9423472881317139, -2.0249433517456055, 0.23347090184688568, 0.11299700289964676, -0.34602928161621094, 0.2440311759710312, 1.7321168184280396, 0.4655938744544983, 1.498207449913025, 1.286547064781189, 0.9664972424507141, -0.6211677193641663, -1.2779825925827026, 0.7596483826637268, 0.9271434545516968, -1.3836535215377808, 0.8636788725852966, 0.09779319912195206, -0.5675196647644043, 0.7604561448097229, 1.2527893781661987, 0.43584373593330383, -2.124329090118408, 0.8868432641029358, -0.9605467319488525, 0.7659059166908264, 0.7221903204917908, 0.7060955166816711, 0.23127621412277222, 0.8415108919143677, -1.1667884588241577, -1.166811227798462, -0.7485305070877075, -0.6388752460479736, 2.0236127376556396, -0.21439312398433685, 0.5633679628372192, -0.1295309215784073, -1.3457282781600952, -0.08724913001060486, 0.6928941011428833, 0.3809528350830078, -0.4301702678203583, 0.8171460032463074, -0.6955279111862183, -1.1602821350097656, -1.440029501914978, -0.38365525007247925, -1.0102548599243164, -0.8452329039573669, 1.083546757698059, 0.8441563248634338, 0.21771247684955597, 1.9158732891082764, 0.6287676692008972, 0.24788595736026764, -2.702049970626831, 1.0044732093811035, 0.31313666701316833, -0.1706726849079132, 0.9047790169715881, 0.331817626953125, 0.9773157238960266, 0.08348319679498672, 0.43597346544265747, -2.4327890872955322, 2.2404794692993164, -0.2852443754673004, 0.7579817175865173, -0.024347621947526932, -0.13041208684444427, 1.1040951013565063, 0.5186400413513184, 0.5939412117004395, -1.1161824464797974, 0.7304276823997498, -0.5332213044166565, 1.1573017835617065, 0.9881559610366821, -0.7753678560256958, -0.06353512406349182, 1.3458102941513062, 0.4759330451488495, -0.5561118721961975, -0.8373854160308838, -0.9966342449188232, 0.8925439119338989, 1.800828218460083, -0.10355442017316818, 0.019951388239860535, 0.7645558714866638, 0.7220755219459534, -1.3026196956634521, 0.09081019461154938, -0.7620689868927002, -0.834141194820404, 1.5259953737258911, 2.01991605758667, -0.08755648136138916, -0.22056794166564941, -0.7653220295906067, -1.252786636352539, 0.762670636177063, -0.06698926538228989, 0.2648662030696869, 0.5833039283752441, -0.6896105408668518, 1.15126371383667, 0.9125959277153015, 0.9111863970756531, 0.20492073893547058, 0.25693392753601074, 0.4503147006034851, -0.3540751039981842, -1.0500234365463257, -0.2904110848903656, -1.049379825592041, -2.4864349365234375, 0.4885522127151489, -0.19808892905712128, -1.423363447189331, 0.02438073232769966, -1.0220376253128052, 0.8993902802467346, -0.5477321743965149, -1.0523078441619873, -1.620007038116455, 0.21659664809703827, -0.16038928925991058, 0.94556725025177, -1.6339106559753418, -0.10460148751735687, 1.1804174184799194, 0.9188528656959534, -0.581784725189209, 1.0948352813720703, 0.2232171595096588, 1.0438741445541382, 0.9156808257102966, -0.4396180212497711, 0.44755762815475464, 0.08859588205814362, -1.3228130340576172, 0.4171622693538666, 1.1041951179504395, 0.1870833784341812, 1.3220089673995972, -0.5362572073936462, 0.012297389097511768, 0.38191863894462585, -0.5402905941009521, -0.4990018606185913, -0.47481122612953186, 0.7429003715515137, 0.036781176924705505, -0.8618437051773071, 0.017083030194044113, -0.19405610859394073, -0.26796719431877136, 0.14579468965530396, -1.5509113073349, -0.2662103474140167, -0.37297922372817993, -0.5822963118553162, -1.259711503982544, -0.03763452544808388, 1.4462419748306274, -0.7450703382492065, -0.19288280606269836, 0.5378965139389038, 0.5094014406204224, 0.5004621148109436, 0.6335288882255554, -0.6270636320114136, -0.3721701502799988, -0.21918204426765442, -0.36435016989707947, 0.29812610149383545, 1.3941346406936646, -0.11144676804542542, -0.9031916260719299, 0.6702429056167603, -0.34242376685142517, 0.0698944702744484, 1.9983669519424438, 0.1277289241552353, -0.809762716293335, 0.3359874486923218, -0.734947919845581, 1.8582990169525146, 1.7909163236618042, 1.3585660457611084, -0.12760096788406372, -1.0008442401885986, 0.6221295595169067, -0.34179577231407166, -0.2897642254829407, 0.9592449069023132, 0.4391740560531616, -0.1744532585144043, -1.415218710899353, 0.5185089111328125, 1.2569211721420288, -0.8900591731071472, -0.6740866899490356, 0.018989119678735733, -0.8177917003631592, 1.06110417842865, 0.6628006100654602, 0.37169018387794495, 0.1661081463098526, 1.5238580703735352, 0.7449434995651245, -0.5661901831626892, 0.5183475017547607, 0.48800167441368103, -0.18540771305561066, -2.1894888877868652, -1.1403124332427979, 0.3063492774963379, -0.381468802690506, -1.587390422821045, 1.4308834075927734, -1.1623759269714355, -1.0067542791366577, 0.4764750003814697, 0.04248975217342377, 1.3761224746704102, 0.3263905644416809, 1.5551568269729614, 2.220952272415161, 0.8942907452583313, 0.32484668493270874, 1.3444631099700928, -0.19521048665046692, -0.4537650942802429, 1.8673129081726074, -0.4051378071308136, 0.41434529423713684, 1.1190534830093384, -0.34621086716651917, -0.9895066022872925, -0.7706108689308167, -1.1352189779281616, -0.678142249584198, 1.179526448249817, 0.0757153183221817, -1.0470050573349, 0.23588554561138153, 1.6133736371994019, 0.10498222708702087, -0.3898340165615082, 0.5850901007652283, 0.44713839888572693, -0.7193496823310852, -0.12313684076070786, -0.9004368782043457, 0.5369943976402283, -0.19299599528312683, -0.3452138900756836, 0.4147159457206726, 0.3919709622859955, 1.226257562637329, 0.02299565076828003, 0.12773293256759644, 1.1637508869171143, -1.4442676305770874, 1.4845170974731445, -0.632161021232605, 0.27166450023651123, -2.3803205490112305, 1.4662975072860718, -0.698702871799469, 1.9723784923553467, -2.6111106872558594, 0.40756353735923767, -0.6636106967926025, -0.48676133155822754, 0.32225310802459717, -0.31738466024398804, 0.18440799415111542, -0.1513405293226242, -1.0939555168151855, -0.081209696829319, -0.6886312961578369, 0.5805590152740479, 1.04701566696167, 1.267822027206421, -1.1510157585144043, -0.3115116059780121, -1.7115747928619385, -0.20772866904735565, -0.7590622901916504, 0.2751367688179016, -2.050807237625122, -0.23055289685726166, -1.933766484260559, -2.3876683712005615, -1.4096406698226929, -0.8194975256919861, 1.0647386312484741, 0.1415875405073166, -0.9260417819023132, 1.2023024559020996, -0.4097652733325958, -1.8657608032226562, 1.133707880973816, -2.086796760559082 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
Yeah, it looks like in its current state the tfio support for `Feather` is incomplete, so we'd end up having to write a lot of it, or do a conversion that defeats the whole point (because if we're going to convert the whole dataset we might as well convert to `TFRecord`).
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
51
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data Yeah, it looks like in its current state the tfio support for `Feather` is incomplete, so we'd end up having to write a lot of it, or do a conversion that defeats the whole point (because if we're going to convert the whole dataset we might as well convert to `TFRecord`).
[ -1.1713804006576538, -0.9579452276229858, -0.7237658500671387, 1.412489891052246, -0.16639010608196259, -1.2268497943878174, 0.04461028054356575, -1.1505292654037476, 1.6825547218322754, -0.7716221213340759, 0.3353457748889923, -1.652857780456543, 0.058690812438726425, -0.6205270290374756, -0.7664602994918823, -0.8575984239578247, -0.406486839056015, -0.8459125757217407, 1.02780282497406, 2.5054469108581543, 1.1770368814468384, -1.4365065097808838, 2.680192232131958, 0.7096610069274902, -0.24238285422325134, -0.9895437359809875, 0.4982684552669525, 0.06560662388801575, -1.188936710357666, -0.512022078037262, -0.8832187056541443, -0.07213437557220459, -0.5886558294296265, -0.4547571539878845, -0.10174345225095749, 0.3143536150455475, -0.25993284583091736, -0.33813899755477905, -0.5586274266242981, -0.7426877617835999, 0.4737922251224518, -0.4107903242111206, 0.999544084072113, -0.2719552516937256, 1.874610424041748, -0.49188703298568726, 0.4219729006290436, 0.6799283027648926, 1.3599741458892822, 0.1983046978712082, 0.005767353810369968, 0.2585524320602417, 0.40716123580932617, -0.1405767798423767, 0.4792223870754242, 1.1193374395370483, 0.7369139790534973, 0.4783218801021576, 0.6791940331459045, -2.2077524662017822, 1.3214935064315796, -1.0983843803405762, 0.2832058072090149, 1.3685041666030884, -0.8830903768539429, 0.438769668340683, -1.7417256832122803, -0.12641656398773193, 0.6049171090126038, -2.2963969707489014, 0.25540199875831604, -1.3053975105285645, -0.5450996160507202, 0.9094815254211426, 0.287850022315979, -1.2188246250152588, 0.30993708968162537, -0.3967621326446533, 1.0414637327194214, 0.4521891474723816, 1.2032936811447144, -1.6866763830184937, -0.011399567127227783, -0.31657129526138306, 0.09204842895269394, -1.3039798736572266, -1.4459781646728516, 0.5569854974746704, 0.6446061134338379, 0.5309380292892456, -0.05089296028017998, 1.0220835208892822, -1.028732180595398, 0.8085351586341858, -1.003076434135437, -1.6311771869659424, -1.4005177021026611, -2.220350742340088, -2.3127334117889404, 0.7928784489631653, -0.458956778049469, -0.6148503422737122, 2.0953328609466553, -1.0477681159973145, -1.7377501726150513, 1.251213788986206, 0.35154369473457336, -0.06001391261816025, 2.4474873542785645, 0.12024455517530441, -0.6936111450195312, 0.4184253513813019, -0.7625647187232971, 0.8514022827148438, -0.4542730450630188, 1.4197367429733276, 0.43446293473243713, -1.0562355518341064, 1.5792638063430786, -0.43470439314842224, 0.5150081515312195, -0.6814813613891602, -0.587410569190979, -0.7937657833099365, 0.41189974546432495, 1.8997957706451416, -0.31145036220550537, 1.576035737991333, -0.4423190653324127, -1.4915046691894531, -1.5610785484313965, 0.871161937713623, 0.4947977364063263, -0.9073351621627808, 0.05240453779697418, -0.36718904972076416, 0.14252996444702148, 0.0076185548678040504, 1.0594402551651, 1.2440471649169922, 0.5993062853813171, -0.3248364329338074, -0.8682356476783752, 0.19133436679840088, -0.15921910107135773, -0.7038878798484802, -1.8549305200576782, -0.31347736716270447, 0.17101377248764038, 0.580058217048645, -1.2571762800216675, 1.7472758293151855, 0.9221052527427673, 1.9870686531066895, 0.9734748005867004, -0.35437387228012085, 1.4672642946243286, -0.006307324860244989, 1.779883623123169, -0.4685690999031067, 0.7360174059867859, -0.39536699652671814, -1.1427857875823975, 0.8255484104156494, -0.3325825333595276, -1.9865968227386475, -0.7750855088233948, -0.8158431649208069, -0.26028701663017273, -0.7718048691749573, 0.8574188351631165, -0.2242790311574936, -1.3498926162719727, 0.3065619468688965, -0.6170687079429626, 0.19598384201526642, -1.1898311376571655, 0.40836769342422485, 0.7107604146003723, -0.6160444021224976, 0.017199859023094177, -0.21994797885417938, -1.27970552444458, -0.45835500955581665, 0.2826024293899536, 1.8657499551773071, -0.7902008295059204, 0.872260570526123, 1.0828139781951904, -0.6607229113578796, 0.00121972244232893, 0.33102670311927795, -0.3045409619808197, 0.8400591015815735, -1.0019125938415527, -0.44512510299682617, 1.2095997333526611, -0.2326892614364624, -0.5909155607223511, 1.4617022275924683, 0.7288067936897278, -0.9910885691642761, -0.22911396622657776, -0.1739613115787506, -0.7993081212043762, 0.03477243706583977, -1.631658911705017, -0.17451536655426025, 0.3189776539802551, -1.5153954029083252, -0.43881019949913025, -0.25202080607414246, 1.309412956237793, -0.21865476667881012, 1.472292184829712, -0.410775363445282, -0.13878007233142853, -0.39007073640823364, -0.40474629402160645, 0.18800097703933716, -0.19597384333610535, -0.5987628102302551, 0.27305328845977783, -0.7723957896232605, 0.4302118122577667, 1.3838988542556763, 0.31924542784690857, 0.03852012753486633, 0.3450597822666168, 1.0596576929092407, 0.3927920460700989, -0.050263743847608566, -0.8606894016265869, -1.5070403814315796, 2.0140185356140137, -1.4912842512130737, 2.0341715812683105, 0.8496148586273193, 0.10161222517490387, -1.7503072023391724, -1.8561900854110718, 1.34036123752594, 1.1770778894424438, 2.2643768787384033, 0.5860288143157959, 0.35098451375961304, -0.8184754252433777, -0.539463222026825, 0.37461528182029724, -1.102887749671936, -0.6736337542533875, 0.10221241414546967, 2.353698253631592, 1.764215350151062, -0.47559618949890137, -0.17521877586841583, -1.0124096870422363, 1.3398505449295044, -0.10814326256513596, 0.23166786134243011, 2.053312063217163, -0.323992520570755, -1.147064447402954, 1.273242712020874, -2.4500226974487305, 0.0834587961435318, 1.9229971170425415, 0.2846556603908539, 0.10055824369192123, -1.3611847162246704, -0.5354636311531067, -0.30402734875679016, -0.42210593819618225, -1.1619352102279663, 0.577578604221344, -0.27018555998802185, -0.8284749388694763, -1.5149457454681396, 0.2164277285337448, -1.2231841087341309, -1.5948693752288818, 0.37697964906692505, 1.9070844650268555, 2.013049840927124, -0.7705699801445007, 1.5271546840667725, -0.3255585730075836, 0.13782061636447906, 1.2590049505233765, 1.2252858877182007, 3.163102149963379, 1.9342663288116455, -1.3346689939498901, 0.49383243918418884, -0.2098303735256195, -0.5157685279846191, 1.1453582048416138, -1.1160757541656494, 1.3006882667541504, -0.08180297911167145, -1.1867157220840454, -1.2753993272781372, 0.9295141696929932, 0.4835214912891388, 0.11757675558328629, -0.5789850354194641, 1.1191478967666626, 0.10218023508787155, 1.3289216756820679, 0.451045960187912, -0.3515982925891876, 0.5768305063247681, -0.44426509737968445, -0.49065274000167847, 1.5739790201187134, 0.1319604367017746, -1.4035124778747559, -2.3153653144836426, -0.21795959770679474, -0.7914865612983704, 0.056277696043252945, -0.6468420624732971, -0.9839009642601013, 1.6311920881271362, 0.34659913182258606, -1.3666682243347168, -0.2454531341791153, -0.31141039729118347, -0.5219988822937012, 2.627027988433838, -1.435587763786316, -0.2643463611602783, -0.9897382259368896, -0.6296558380126953, 1.610499382019043, -1.1667007207870483, -0.23822277784347534, -0.9383937120437622, -0.5752511024475098, -1.26285982131958, -0.4968094825744629, 0.00815598014742136, -0.9404144287109375, 0.7508245706558228, 0.270203173160553, -1.116726279258728, -0.3664984703063965, -0.8489269018173218, 0.8751496076583862, -0.11888176947832108, 0.2545894384384155, 1.8859021663665771, 0.39849787950515747, -0.42427802085876465, 0.692629337310791, 1.1771281957626343, 0.6075547337532043, -0.6258768439292908, 0.19515655934810638, -0.7532525062561035, 0.3329890966415405, -1.3523387908935547, 0.3180726170539856, -2.91239595413208, 0.6250361800193787, -0.015932291746139526, -0.047841768711805344, 0.08064771443605423, -1.3326374292373657, 1.1415636539459229, 2.6509599685668945, -1.1244062185287476, 0.4404166042804718, 0.29710274934768677, 1.1916217803955078, -1.56813645362854, 0.35762032866477966, -0.38446107506752014, 2.1753807067871094, 0.184819757938385, 1.2660589218139648, -0.5125132203102112, -2.3533995151519775, 0.5695122480392456, -1.245578408241272, -1.1741461753845215, 0.7883193492889404, -0.9248797297477722, -0.0073829535394907, -1.4395054578781128, -0.2536222040653229, -0.880483090877533, -1.24004065990448, 0.7736585140228271, 0.14338506758213043, 0.4692643880844116, -0.6690478920936584, 0.32788702845573425, -2.2048676013946533, -1.3408000469207764, -0.2265363186597824, -0.939619779586792, 0.4381347596645355, -0.3285680115222931, 0.5704264640808105, -0.13425198197364807, 0.07398276031017303, 0.2948409616947174, 1.426917314529419, 3.3604860305786133, 0.3027052879333496, 0.4832488000392914, -0.19145725667476654, -0.9261972904205322, 1.3744128942489624, 0.8988860845565796, -0.11035548150539398, -0.5518155694007874, -0.9929570555686951, 1.25081205368042, 1.9444453716278076, 0.9615962505340576, 0.053085654973983765, -0.7516739368438721, -0.6862631440162659, -0.032180655747652054, 0.20558352768421173, 0.46601182222366333, 0.9194841384887695, -0.030551396310329437, 0.13331983983516693, 1.3402904272079468, 1.254051923751831, -0.5189340114593506, 0.3345293700695038, -0.8307572603225708, -0.4146772623062134, 0.42755600810050964, 0.30510902404785156, 0.00853359792381525, 0.41328802704811096, -0.8991673588752747, -0.24214184284210205, -0.42408034205436707, -0.899585485458374, -0.7102695107460022, -0.4025534391403198, -0.32312509417533875, 1.633553385734558, 0.13873931765556335, -0.45159822702407837, 0.03192588686943054, -0.7842240333557129, -0.1019023060798645, -1.0542848110198975, 0.20569701492786407, -0.012458228506147861, -0.08275929093360901, -0.05128302052617073, 1.8410245180130005, -0.9414297342300415, -2.0223395824432373, 0.2396603524684906, 0.1446499228477478, -0.3588922619819641, 0.218618243932724, 1.7328423261642456, 0.4376888871192932, 1.5008790493011475, 1.2869619131088257, 0.9822196960449219, -0.6257137656211853, -1.329094409942627, 0.7831199169158936, 0.9472479224205017, -1.3721294403076172, 0.8889347910881042, 0.10415907949209213, -0.5221615433692932, 0.7115052938461304, 1.2378103733062744, 0.46722766757011414, -2.0809412002563477, 0.8392409682273865, -1.0187525749206543, 0.8199688196182251, 0.7318480014801025, 0.7025406956672668, 0.25905659794807434, 0.8392667770385742, -1.1988697052001953, -1.151520013809204, -0.747448205947876, -0.6508950591087341, 2.015775442123413, -0.2310834676027298, 0.5900236368179321, -0.11850592494010925, -1.3243112564086914, -0.09128879010677338, 0.7107699513435364, 0.3847678005695343, -0.4514465034008026, 0.807391881942749, -0.6810733675956726, -1.1273268461227417, -1.443742036819458, -0.41045674681663513, -1.0010191202163696, -0.862042248249054, 1.1030144691467285, 0.8567194938659668, 0.20070913434028625, 1.8880822658538818, 0.6350695490837097, 0.2594146430492401, -2.687213659286499, 1.0194207429885864, 0.3217901289463043, -0.19206511974334717, 0.8875515460968018, 0.35457560420036316, 0.9654589295387268, 0.09301896393299103, 0.4589526653289795, -2.4477288722991943, 2.2773663997650146, -0.26463183760643005, 0.7486575841903687, -0.00755684170871973, -0.12322889268398285, 1.098327875137329, 0.4810218811035156, 0.552177906036377, -1.1223125457763672, 0.7060902118682861, -0.5264981985092163, 1.2010103464126587, 0.9823879599571228, -0.772788405418396, -0.05741075798869133, 1.3573423624038696, 0.47889772057533264, -0.5715707540512085, -0.8452777862548828, -0.9579756259918213, 0.897566556930542, 1.7716552019119263, -0.07957760244607925, -0.04474955424666405, 0.8191416263580322, 0.701188325881958, -1.2645783424377441, 0.09412755817174911, -0.7141569256782532, -0.8356612324714661, 1.5625863075256348, 2.047463893890381, -0.10240412503480911, -0.2438824623823166, -0.7286807894706726, -1.242187738418579, 0.7963221669197083, -0.03985728323459625, 0.19063133001327515, 0.5717589259147644, -0.6826629638671875, 1.1610393524169922, 0.956880509853363, 0.8945626616477966, 0.20608168840408325, 0.2172219604253769, 0.44812989234924316, -0.3691924512386322, -1.0567777156829834, -0.20302002131938934, -1.0519558191299438, -2.550503969192505, 0.48915883898735046, -0.18925315141677856, -1.4081286191940308, 0.012059305794537067, -1.0461913347244263, 0.9132816791534424, -0.5605196356773376, -1.0544384717941284, -1.6032763719558716, 0.22361794114112854, -0.12031908333301544, 0.960025429725647, -1.6749552488327026, -0.11180315166711807, 1.1958460807800293, 0.9010606408119202, -0.6293149590492249, 1.0598278045654297, 0.20176926255226135, 1.036670446395874, 0.9141523241996765, -0.4308513402938843, 0.4997672736644745, 0.06428273022174835, -1.3375029563903809, 0.4025730788707733, 1.1282049417495728, 0.14895106852054596, 1.3419859409332275, -0.5251242518424988, 0.02485838532447815, 0.3847792148590088, -0.5558283925056458, -0.4857688248157501, -0.49400028586387634, 0.7066320180892944, 0.09548953175544739, -0.8779889345169067, 0.03482937440276146, -0.1618226170539856, -0.258411169052124, 0.14150546491146088, -1.5472941398620605, -0.2797101140022278, -0.36375299096107483, -0.5745849013328552, -1.2784618139266968, -0.06342504918575287, 1.466071605682373, -0.7191448211669922, -0.18691688776016235, 0.5376434922218323, 0.4739269018173218, 0.49827441573143005, 0.6391945481300354, -0.6366261839866638, -0.3943798542022705, -0.20386171340942383, -0.35560622811317444, 0.34332215785980225, 1.3624262809753418, -0.07002095133066177, -0.9127311110496521, 0.686074435710907, -0.3428688645362854, 0.08985984325408936, 1.954779863357544, 0.11499793827533722, -0.8335521221160889, 0.33027148246765137, -0.7217946648597717, 1.8774770498275757, 1.7486493587493896, 1.333619236946106, -0.11636736989021301, -1.008753776550293, 0.6689575910568237, -0.3225117623806, -0.30314838886260986, 0.9219751954078674, 0.4096774458885193, -0.19726429879665375, -1.3939316272735596, 0.5117325186729431, 1.288824439048767, -0.8816402554512024, -0.7272974848747253, 0.03659544140100479, -0.804664671421051, 1.062307357788086, 0.6024084687232971, 0.3515375554561615, 0.17882326245307922, 1.502577304840088, 0.7929137349128723, -0.5030893683433533, 0.5469159483909607, 0.4720046818256378, -0.178703173995018, -2.1784145832061768, -1.128794550895691, 0.28219959139823914, -0.41011208295822144, -1.5443006753921509, 1.4240995645523071, -1.144001841545105, -0.9884055256843567, 0.5149271488189697, 0.0402226597070694, 1.4385906457901, 0.3358937203884125, 1.543406367301941, 2.1738479137420654, 0.8768924474716187, 0.34243863821029663, 1.3515077829360962, -0.2181636244058609, -0.4387184977531433, 1.8372238874435425, -0.4425634741783142, 0.4067575931549072, 1.0956645011901855, -0.3317893147468567, -1.0073987245559692, -0.7739624977111816, -1.1720433235168457, -0.7001750469207764, 1.184485912322998, 0.10770561546087265, -1.0322495698928833, 0.2512429356575012, 1.6369739770889282, 0.08940225839614868, -0.38297244906425476, 0.51869136095047, 0.47840386629104614, -0.7534945607185364, -0.10358965396881104, -0.9041745662689209, 0.5482528805732727, -0.13456036150455475, -0.307208776473999, 0.399429053068161, 0.3806147873401642, 1.2369186878204346, 0.042538486421108246, 0.1413673460483551, 1.0937702655792236, -1.4853949546813965, 1.5098321437835693, -0.5962029695510864, 0.24776117503643036, -2.3727757930755615, 1.4342644214630127, -0.6881502866744995, 1.9802371263504028, -2.6202712059020996, 0.38733986020088196, -0.6522674560546875, -0.4916682243347168, 0.34901419281959534, -0.34919556975364685, 0.2049521654844284, -0.1669195592403412, -1.1035763025283813, -0.10192475467920303, -0.6990336775779724, 0.5543568134307861, 1.0416675806045532, 1.239803671836853, -1.1242507696151733, -0.3588423430919647, -1.7179197072982788, -0.1807420551776886, -0.6940111517906189, 0.25381749868392944, -2.057236909866333, -0.20404832065105438, -1.9442381858825684, -2.3690364360809326, -1.381654143333435, -0.8223065137863159, 1.0532926321029663, 0.10573605448007584, -0.9027575254440308, 1.1566171646118164, -0.384314626455307, -1.843711256980896, 1.1162947416305542, -2.0801191329956055 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
@lhoestq Although I think this is a dead-end for now unfortunately, because of the limitations at TF's end, we could still explore automatic conversion to TFRecord, or I could dive into refining `to_tf_dataset()` to yield unbatched samples and/or load samples with multiprocessing to improve throughput. Do you have any preferences there?
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
51
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data @lhoestq Although I think this is a dead-end for now unfortunately, because of the limitations at TF's end, we could still explore automatic conversion to TFRecord, or I could dive into refining `to_tf_dataset()` to yield unbatched samples and/or load samples with multiprocessing to improve throughput. Do you have any preferences there?
[ -1.1793206930160522, -0.9574110507965088, -0.7266685366630554, 1.4125404357910156, -0.16318076848983765, -1.169034719467163, 0.06464090198278427, -1.1828635931015015, 1.6569744348526, -0.7765292525291443, 0.32470032572746277, -1.6472755670547485, 0.03515155613422394, -0.634154736995697, -0.7586880326271057, -0.8748685717582703, -0.4056548476219177, -0.8248181343078613, 1.0469380617141724, 2.508596420288086, 1.205728530883789, -1.435909628868103, 2.685922861099243, 0.7204141616821289, -0.27460384368896484, -1.0101726055145264, 0.46528396010398865, 0.0828145369887352, -1.1778488159179688, -0.5026713609695435, -0.8776552677154541, -0.08158405870199203, -0.5970997214317322, -0.46555468440055847, -0.06949277222156525, 0.30860841274261475, -0.23086854815483093, -0.2983585298061371, -0.5592648386955261, -0.7459540367126465, 0.5089212656021118, -0.3922681212425232, 0.9852935075759888, -0.26518407464027405, 1.8820761442184448, -0.5034459233283997, 0.44944679737091064, 0.6972013115882874, 1.3544342517852783, 0.20132392644882202, -0.0027913604862987995, 0.28265929222106934, 0.39923492074012756, -0.1256057322025299, 0.4779002368450165, 1.1350014209747314, 0.7263244986534119, 0.4711012542247772, 0.6740711331367493, -2.205514669418335, 1.3269274234771729, -1.078879475593567, 0.3026961386203766, 1.3624050617218018, -0.8975117802619934, 0.4226154685020447, -1.7501362562179565, -0.14366185665130615, 0.610481858253479, -2.2821595668792725, 0.23833605647087097, -1.3103731870651245, -0.5538718104362488, 0.9080169200897217, 0.26951825618743896, -1.2181262969970703, 0.32764649391174316, -0.41415271162986755, 1.0460996627807617, 0.4560968279838562, 1.2012778520584106, -1.7003728151321411, 0.00001839175820350647, -0.31206417083740234, 0.09138144552707672, -1.296241044998169, -1.4619733095169067, 0.5366912484169006, 0.610175609588623, 0.5360478758811951, -0.04079706594347954, 0.9933986663818359, -1.0397933721542358, 0.8339285254478455, -1.0289313793182373, -1.5895410776138306, -1.4251484870910645, -2.24075984954834, -2.291865587234497, 0.7735539674758911, -0.4498683214187622, -0.6216803193092346, 2.075770139694214, -1.0485632419586182, -1.7326545715332031, 1.244537115097046, 0.3440161645412445, -0.03741315007209778, 2.446371555328369, 0.12622469663619995, -0.7122827768325806, 0.4263525903224945, -0.7785925269126892, 0.8379572629928589, -0.42864149808883667, 1.44081449508667, 0.43436551094055176, -1.0478614568710327, 1.5882045030593872, -0.41175326704978943, 0.5387842059135437, -0.6832634806632996, -0.6375419497489929, -0.7792556285858154, 0.36669600009918213, 1.9015953540802002, -0.33192116022109985, 1.6099647283554077, -0.43684664368629456, -1.4876466989517212, -1.5553361177444458, 0.8994239568710327, 0.5104935169219971, -0.8922350406646729, 0.05864092707633972, -0.39354798197746277, 0.13503578305244446, -0.00878351554274559, 1.0467783212661743, 1.2682249546051025, 0.575324535369873, -0.302308589220047, -0.8579111099243164, 0.16273531317710876, -0.16753464937210083, -0.6919208765029907, -1.8636894226074219, -0.30212023854255676, 0.14410072565078735, 0.5929269790649414, -1.2553671598434448, 1.7495148181915283, 0.9207956790924072, 1.9703783988952637, 0.9410020709037781, -0.34939292073249817, 1.478628396987915, 0.0030342452228069305, 1.7713327407836914, -0.4743150472640991, 0.7340047359466553, -0.3891865611076355, -1.1294180154800415, 0.8248178362846375, -0.3259691596031189, -2.010239839553833, -0.7495718002319336, -0.8147212266921997, -0.25229737162590027, -0.7698426246643066, 0.8673409819602966, -0.201610267162323, -1.3453823328018188, 0.29017555713653564, -0.6005182862281799, 0.1873544156551361, -1.1777215003967285, 0.4139968752861023, 0.7008209228515625, -0.6169551014900208, 0.03503040224313736, -0.22560876607894897, -1.293153166770935, -0.46283891797065735, 0.266819566488266, 1.8627389669418335, -0.782630980014801, 0.8812599778175354, 1.061129093170166, -0.6455825567245483, 0.005553385242819786, 0.3469512164592743, -0.3123493790626526, 0.8366466760635376, -1.0165079832077026, -0.4252335727214813, 1.1835380792617798, -0.23973175883293152, -0.5852739214897156, 1.450719952583313, 0.7402212023735046, -0.9922486543655396, -0.24661582708358765, -0.1768915057182312, -0.8214792013168335, 0.01663842424750328, -1.6170982122421265, -0.20149186253547668, 0.3076677620410919, -1.534022569656372, -0.4332835078239441, -0.2547914683818817, 1.3316545486450195, -0.19104459881782532, 1.472522497177124, -0.3977261185646057, -0.16183513402938843, -0.3953341841697693, -0.4408887028694153, 0.1883012056350708, -0.19996324181556702, -0.5960808992385864, 0.2644904553890228, -0.7845262289047241, 0.4192524254322052, 1.401806116104126, 0.33189791440963745, 0.03554760292172432, 0.34651535749435425, 1.0558730363845825, 0.3989120423793793, -0.04656847566366196, -0.8578681349754333, -1.5146222114562988, 1.996414303779602, -1.4719820022583008, 2.041032314300537, 0.887086808681488, 0.09598041325807571, -1.7374669313430786, -1.8444904088974, 1.3523873090744019, 1.197245717048645, 2.2657783031463623, 0.5853976607322693, 0.37600764632225037, -0.8347662687301636, -0.526564359664917, 0.37340688705444336, -1.1114355325698853, -0.6743229031562805, 0.09836533665657043, 2.3801188468933105, 1.7584798336029053, -0.491994708776474, -0.1741085946559906, -0.999675989151001, 1.374106764793396, -0.12309181690216064, 0.24040311574935913, 2.087355375289917, -0.352236270904541, -1.1528897285461426, 1.253620982170105, -2.421043634414673, 0.1042059138417244, 1.9242255687713623, 0.29381683468818665, 0.0996892973780632, -1.3698023557662964, -0.5343146920204163, -0.2914697229862213, -0.4454647898674011, -1.1522367000579834, 0.5750965476036072, -0.2542407214641571, -0.8178616166114807, -1.5253970623016357, 0.1817198097705841, -1.23274564743042, -1.6060314178466797, 0.4213566184043884, 1.918886423110962, 2.0233492851257324, -0.7891101837158203, 1.4981930255889893, -0.3230856657028198, 0.16467398405075073, 1.2489266395568848, 1.2526651620864868, 3.1275980472564697, 1.941239595413208, -1.3056670427322388, 0.49533191323280334, -0.19752836227416992, -0.5220276117324829, 1.1099916696548462, -1.1029781103134155, 1.2937822341918945, -0.1126546710729599, -1.1711046695709229, -1.2758525609970093, 0.9452407360076904, 0.45350852608680725, 0.09314454346895218, -0.5582291483879089, 1.134947419166565, 0.11461224406957626, 1.3407762050628662, 0.4708919823169708, -0.34394463896751404, 0.5718552470207214, -0.4499666392803192, -0.5180957913398743, 1.5978034734725952, 0.14736279845237732, -1.4278203248977661, -2.325402021408081, -0.20706960558891296, -0.7711018323898315, 0.02569432556629181, -0.6213613748550415, -0.9853104948997498, 1.6206892728805542, 0.35512876510620117, -1.347172737121582, -0.24074769020080566, -0.3067893087863922, -0.5092167854309082, 2.603379011154175, -1.4230741262435913, -0.24892568588256836, -0.9578557014465332, -0.6342563033103943, 1.6047427654266357, -1.151964545249939, -0.24464499950408936, -0.9020262360572815, -0.5935418009757996, -1.2620577812194824, -0.4920825958251953, 0.006831405684351921, -0.9259302020072937, 0.7167960405349731, 0.24787724018096924, -1.0898135900497437, -0.3646944761276245, -0.8560487627983093, 0.8957712054252625, -0.12419509887695312, 0.26136237382888794, 1.870165467262268, 0.38508662581443787, -0.4114059805870056, 0.6950189471244812, 1.212286114692688, 0.5993407964706421, -0.6276097297668457, 0.13298174738883972, -0.7533290386199951, 0.30781289935112, -1.340552806854248, 0.31927141547203064, -2.9113924503326416, 0.6466122269630432, -0.027845533564686775, -0.0836610347032547, 0.05698210000991821, -1.3678381443023682, 1.14493989944458, 2.6520836353302, -1.1148442029953003, 0.43610119819641113, 0.3297717273235321, 1.1969406604766846, -1.5512784719467163, 0.3522289991378784, -0.39823800325393677, 2.145329713821411, 0.21294155716896057, 1.2683125734329224, -0.5054576396942139, -2.3580939769744873, 0.5682799220085144, -1.2297934293746948, -1.178815484046936, 0.7706853747367859, -0.9418901801109314, 0.017703838646411896, -1.4616477489471436, -0.2149236798286438, -0.9074202179908752, -1.215700626373291, 0.7369991540908813, 0.14745637774467468, 0.47573402523994446, -0.686517059803009, 0.31028109788894653, -2.21191668510437, -1.3385928869247437, -0.2101445496082306, -0.9371872544288635, 0.4530539810657501, -0.3367787301540375, 0.6230018138885498, -0.1321500688791275, 0.09631088376045227, 0.3010871410369873, 1.4196852445602417, 3.376187801361084, 0.28160029649734497, 0.448547899723053, -0.2013036608695984, -0.9252725839614868, 1.3970873355865479, 0.9077741503715515, -0.09186753630638123, -0.5507103204727173, -1.0021939277648926, 1.2215968370437622, 1.9702725410461426, 0.981808602809906, 0.04399124160408974, -0.7833990454673767, -0.6554398536682129, -0.04409479722380638, 0.23208016157150269, 0.4640407860279083, 0.9265053272247314, -0.014751394279301167, 0.13044694066047668, 1.3492701053619385, 1.263555884361267, -0.5372688174247742, 0.3423243463039398, -0.8499348759651184, -0.42612123489379883, 0.3791393041610718, 0.297924280166626, 0.022702842950820923, 0.4032864570617676, -0.8938896656036377, -0.23854172229766846, -0.41442111134529114, -0.8989905714988708, -0.7517974972724915, -0.43458402156829834, -0.3429395854473114, 1.6507207155227661, 0.1476856768131256, -0.4569724202156067, 0.012382566928863525, -0.7547417283058167, -0.12920567393302917, -1.0624111890792847, 0.21487674117088318, -0.007031702436506748, -0.07336718589067459, -0.08629246801137924, 1.8218331336975098, -0.9543034434318542, -2.03317928314209, 0.2502514123916626, 0.166023850440979, -0.36467641592025757, 0.21713370084762573, 1.7339897155761719, 0.43811196088790894, 1.5032113790512085, 1.2830582857131958, 0.985927402973175, -0.6471056938171387, -1.28566312789917, 0.7838411331176758, 0.9523607492446899, -1.3610752820968628, 0.8422262668609619, 0.08813955634832382, -0.5154222249984741, 0.7127552032470703, 1.2109065055847168, 0.47758224606513977, -2.089165687561035, 0.8702397346496582, -0.9929817318916321, 0.8205854892730713, 0.7149614691734314, 0.6933934092521667, 0.266818106174469, 0.8432371616363525, -1.1827784776687622, -1.1325076818466187, -0.7495487332344055, -0.6247808933258057, 2.0283262729644775, -0.24449917674064636, 0.6127227544784546, -0.14669138193130493, -1.3059136867523193, -0.0721312090754509, 0.730340301990509, 0.35862162709236145, -0.45388129353523254, 0.7986294627189636, -0.6379198431968689, -1.1151106357574463, -1.4272732734680176, -0.3833831548690796, -1.0160964727401733, -0.8709304332733154, 1.083465337753296, 0.8309444189071655, 0.2463928461074829, 1.9159561395645142, 0.62913578748703, 0.29577651619911194, -2.6643803119659424, 1.0218050479888916, 0.3168758749961853, -0.22701013088226318, 0.915582537651062, 0.3448111414909363, 0.9512755870819092, 0.08702437579631805, 0.44995152950286865, -2.4366261959075928, 2.2795073986053467, -0.2685851454734802, 0.7349340915679932, 0.005891826003789902, -0.10585854202508926, 1.1288515329360962, 0.5144783854484558, 0.5299128890037537, -1.114263892173767, 0.6961820721626282, -0.521845817565918, 1.1778048276901245, 0.9733224511146545, -0.7637701630592346, -0.04369796812534332, 1.3723026514053345, 0.472689151763916, -0.5580524206161499, -0.839302659034729, -0.9665163159370422, 0.9009134769439697, 1.768344759941101, -0.10826599597930908, -0.01211852952837944, 0.7775101065635681, 0.6965548992156982, -1.2734043598175049, 0.08491679280996323, -0.7146972417831421, -0.8269195556640625, 1.5471092462539673, 2.043421983718872, -0.11663418263196945, -0.2092483639717102, -0.736711323261261, -1.2855464220046997, 0.8094663023948669, -0.056468941271305084, 0.19097822904586792, 0.5671191811561584, -0.7001473903656006, 1.1801172494888306, 0.9424358010292053, 0.9015420079231262, 0.21368807554244995, 0.2191537320613861, 0.42362523078918457, -0.34842485189437866, -1.0370813608169556, -0.23963391780853271, -1.0651742219924927, -2.5139126777648926, 0.4593261182308197, -0.21259987354278564, -1.3747165203094482, 0.0007946174591779709, -1.0385122299194336, 0.9015212655067444, -0.5310108661651611, -1.042901873588562, -1.659375548362732, 0.22652822732925415, -0.13245578110218048, 0.9755929708480835, -1.6684247255325317, -0.11319804936647415, 1.1836501359939575, 0.8777701258659363, -0.6223137378692627, 1.0916576385498047, 0.22977414727210999, 1.0151797533035278, 0.8689199090003967, -0.4335859417915344, 0.5140498876571655, 0.0791315883398056, -1.3362168073654175, 0.41956543922424316, 1.1504952907562256, 0.15872624516487122, 1.36170494556427, -0.5447381138801575, 0.029025211930274963, 0.3823743164539337, -0.5556392073631287, -0.5172123908996582, -0.5029525756835938, 0.714074969291687, 0.07816038280725479, -0.9013210535049438, 0.02137318253517151, -0.16424420475959778, -0.267278790473938, 0.1510179042816162, -1.5586382150650024, -0.2571198344230652, -0.38715627789497375, -0.5627748370170593, -1.2742000818252563, -0.04949915409088135, 1.4617271423339844, -0.7193523645401001, -0.1789340376853943, 0.5520234107971191, 0.49210700392723083, 0.48971647024154663, 0.6621401906013489, -0.6288793087005615, -0.4182458519935608, -0.23146656155586243, -0.3088018298149109, 0.35131990909576416, 1.3340466022491455, -0.08743967115879059, -0.9013655781745911, 0.6848303079605103, -0.34457868337631226, 0.06677914410829544, 1.9448425769805908, 0.11120932549238205, -0.8191219568252563, 0.34972813725471497, -0.7164980173110962, 1.9128451347351074, 1.758616328239441, 1.3339180946350098, -0.11513973772525787, -1.0057282447814941, 0.6385067105293274, -0.31856247782707214, -0.309445858001709, 0.9301230907440186, 0.3969934582710266, -0.2169087827205658, -1.4142471551895142, 0.5276885628700256, 1.3010714054107666, -0.8659644722938538, -0.7309670448303223, 0.04177229478955269, -0.8231498003005981, 1.0788556337356567, 0.5783583521842957, 0.3715337812900543, 0.1858144998550415, 1.5128107070922852, 0.7636041045188904, -0.5429383516311646, 0.531528890132904, 0.4812045991420746, -0.15868636965751648, -2.1603407859802246, -1.1589632034301758, 0.3052099347114563, -0.42671236395835876, -1.5435922145843506, 1.4292726516723633, -1.1462111473083496, -1.0149273872375488, 0.530543327331543, 0.03602440282702446, 1.4157036542892456, 0.3084987998008728, 1.5691680908203125, 2.1782686710357666, 0.8555432558059692, 0.37251153588294983, 1.3420974016189575, -0.22174006700515747, -0.42878344655036926, 1.8398394584655762, -0.4310474097728729, 0.40582481026649475, 1.0987062454223633, -0.32620421051979065, -1.0105998516082764, -0.7955081462860107, -1.170599102973938, -0.6892246007919312, 1.171120524406433, 0.09532143920660019, -1.0640363693237305, 0.24490836262702942, 1.6298713684082031, 0.1095641553401947, -0.3946548402309418, 0.5050582885742188, 0.44658613204956055, -0.7340526580810547, -0.09259938448667526, -0.9251258969306946, 0.5671281218528748, -0.1909821331501007, -0.3282456398010254, 0.397275447845459, 0.3866307735443115, 1.2049916982650757, -0.0032551968470215797, 0.1326935589313507, 1.0964112281799316, -1.4804037809371948, 1.508048176765442, -0.6145883798599243, 0.27077576518058777, -2.362880229949951, 1.437424898147583, -0.6411197185516357, 1.9987012147903442, -2.6457347869873047, 0.377880334854126, -0.647277295589447, -0.4778631031513214, 0.30681219696998596, -0.3064885437488556, 0.19678077101707458, -0.15962296724319458, -1.0882295370101929, -0.09831894189119339, -0.7099906206130981, 0.546225905418396, 1.0485050678253174, 1.2633520364761353, -1.1248223781585693, -0.3386317491531372, -1.6799638271331787, -0.16840523481369019, -0.689081072807312, 0.22974780201911926, -2.054166078567505, -0.2049255073070526, -1.9549697637557983, -2.3860270977020264, -1.4201184511184692, -0.8099476099014282, 1.0528711080551147, 0.09090336412191391, -0.9222601652145386, 1.1913020610809326, -0.40479758381843567, -1.8482608795166016, 1.1277436017990112, -2.0731358528137207 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
> @lhoestq Although I think this is a dead-end for now unfortunately, because of the limitations at TF's end, we could still explore automatic conversion to TFRecord, or I could dive into refining `to_tf_dataset()` to yield unbatched samples and/or load samples with multiprocessing to improve throughput. Do you have any preferences there? Happy to take part there @Rocketknight1.
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
58
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data > @lhoestq Although I think this is a dead-end for now unfortunately, because of the limitations at TF's end, we could still explore automatic conversion to TFRecord, or I could dive into refining `to_tf_dataset()` to yield unbatched samples and/or load samples with multiprocessing to improve throughput. Do you have any preferences there? Happy to take part there @Rocketknight1.
[ -1.1863176822662354, -0.9614859223365784, -0.7202628254890442, 1.4137334823608398, -0.14208857715129852, -1.158764362335205, 0.07197194546461105, -1.1783885955810547, 1.6639337539672852, -0.7791954874992371, 0.3163422644138336, -1.6506937742233276, 0.0285642109811306, -0.6193598508834839, -0.7595921754837036, -0.8850535154342651, -0.4063139259815216, -0.8205881118774414, 1.0473378896713257, 2.5103275775909424, 1.2039003372192383, -1.438522458076477, 2.683135986328125, 0.7191594243049622, -0.2499542534351349, -1.0026698112487793, 0.47610750794410706, 0.08546406030654907, -1.1951682567596436, -0.4860604405403137, -0.8806489109992981, -0.07579543441534042, -0.5975116491317749, -0.45873504877090454, -0.0717255175113678, 0.29224568605422974, -0.2273857593536377, -0.30658215284347534, -0.5676406025886536, -0.7447901964187622, 0.5070839524269104, -0.4004253149032593, 0.9870333075523376, -0.25748422741889954, 1.8764077425003052, -0.5150784254074097, 0.45434513688087463, 0.6969117522239685, 1.3481131792068481, 0.1957627534866333, -0.00028705596923828125, 0.28900307416915894, 0.3971002995967865, -0.13376161456108093, 0.4669209420681, 1.149548053741455, 0.7173288464546204, 0.48209160566329956, 0.6828994154930115, -2.207097291946411, 1.317172646522522, -1.0768085718154907, 0.2958470284938812, 1.3597816228866577, -0.9027824401855469, 0.42318224906921387, -1.755590558052063, -0.1329592615365982, 0.602453887462616, -2.282322406768799, 0.23750025033950806, -1.3194067478179932, -0.5553932189941406, 0.9011889100074768, 0.26982274651527405, -1.2364418506622314, 0.3178360164165497, -0.42280542850494385, 1.0279579162597656, 0.4406234622001648, 1.1967661380767822, -1.7090448141098022, -0.015751516446471214, -0.32586804032325745, 0.10966327786445618, -1.2762107849121094, -1.4750196933746338, 0.535049319267273, 0.608707845211029, 0.5393449068069458, -0.03703871741890907, 1.0023020505905151, -1.0413988828659058, 0.8469155430793762, -1.0270825624465942, -1.6040654182434082, -1.4379551410675049, -2.2392263412475586, -2.281776189804077, 0.7681902050971985, -0.4453323185443878, -0.609248697757721, 2.065203905105591, -1.058205246925354, -1.7437045574188232, 1.2460269927978516, 0.3445359766483307, -0.06027448549866676, 2.4394760131835938, 0.12907123565673828, -0.7200865745544434, 0.43524569272994995, -0.7795966267585754, 0.8344660997390747, -0.405709445476532, 1.4294991493225098, 0.4175395667552948, -1.0436334609985352, 1.5898772478103638, -0.4075756072998047, 0.5399281978607178, -0.6823358535766602, -0.6269533038139343, -0.782619297504425, 0.3533496558666229, 1.8962054252624512, -0.31358203291893005, 1.6204921007156372, -0.4262527525424957, -1.502177357673645, -1.549393653869629, 0.8899001479148865, 0.5132536888122559, -0.8969019651412964, 0.04676138982176781, -0.39691823720932007, 0.1344425529241562, 0.0051628462970256805, 1.0561838150024414, 1.28053879737854, 0.5795534253120422, -0.2962858974933624, -0.854997992515564, 0.13877585530281067, -0.16171258687973022, -0.6923301219940186, -1.8701581954956055, -0.30656442046165466, 0.1428244709968567, 0.5913955569267273, -1.2521852254867554, 1.747619390487671, 0.9305642247200012, 1.9700871706008911, 0.9619582295417786, -0.3475545048713684, 1.4890880584716797, 0.013802492059767246, 1.7646914720535278, -0.4535932242870331, 0.7498607635498047, -0.3752674162387848, -1.124045729637146, 0.8271007537841797, -0.32318663597106934, -2.0065908432006836, -0.7586914300918579, -0.817474901676178, -0.25144967436790466, -0.7709766030311584, 0.8657166361808777, -0.21122676134109497, -1.3528432846069336, 0.284760057926178, -0.5983120799064636, 0.18487168848514557, -1.1707690954208374, 0.39429399371147156, 0.7001113295555115, -0.6249149441719055, 0.04206915944814682, -0.22815769910812378, -1.2956935167312622, -0.44781050086021423, 0.2660050094127655, 1.8451807498931885, -0.7761711478233337, 0.8720518946647644, 1.069419503211975, -0.6352652907371521, 0.014413143508136272, 0.33660274744033813, -0.30733659863471985, 0.8435999155044556, -1.0369739532470703, -0.40414318442344666, 1.1710001230239868, -0.23405487835407257, -0.5774835348129272, 1.4367084503173828, 0.7507051825523376, -1.0020532608032227, -0.2367202192544937, -0.16519823670387268, -0.8218376040458679, 0.016656484454870224, -1.6349471807479858, -0.20986957848072052, 0.313150018453598, -1.5376935005187988, -0.4387650191783905, -0.26291021704673767, 1.3371429443359375, -0.18298524618148804, 1.48298978805542, -0.4097791314125061, -0.16059428453445435, -0.40121859312057495, -0.4342154562473297, 0.19978444278240204, -0.19534046947956085, -0.5941472053527832, 0.25406017899513245, -0.7819162011146545, 0.4032074511051178, 1.4121748208999634, 0.3292425274848938, 0.04342668876051903, 0.3473910689353943, 1.052976131439209, 0.4005658030509949, -0.052667804062366486, -0.8545083999633789, -1.5313351154327393, 2.014251708984375, -1.4592169523239136, 2.046593189239502, 0.8768287301063538, 0.0843457579612732, -1.7470908164978027, -1.8545621633529663, 1.3551913499832153, 1.1787025928497314, 2.279599666595459, 0.5702106356620789, 0.3905757963657379, -0.8293060660362244, -0.5245100259780884, 0.36332815885543823, -1.1135776042938232, -0.675001323223114, 0.11679962277412415, 2.3556482791900635, 1.7544877529144287, -0.4867815375328064, -0.16713902354240417, -0.9910102486610413, 1.358730435371399, -0.13125889003276825, 0.2506137192249298, 2.0681445598602295, -0.33066555857658386, -1.1611443758010864, 1.262881875038147, -2.396143913269043, 0.0980130285024643, 1.9200232028961182, 0.2666110396385193, 0.10967652499675751, -1.3665480613708496, -0.534311830997467, -0.3048718571662903, -0.4394288659095764, -1.1681405305862427, 0.5717070698738098, -0.249659463763237, -0.8174253702163696, -1.5207618474960327, 0.19384078681468964, -1.2268438339233398, -1.609308123588562, 0.40270543098449707, 1.922322154045105, 2.0037178993225098, -0.7924422025680542, 1.5094220638275146, -0.3283771872520447, 0.15156634151935577, 1.2362929582595825, 1.238947868347168, 3.1401851177215576, 1.935068130493164, -1.3028815984725952, 0.5101100206375122, -0.20898129045963287, -0.522264838218689, 1.1007941961288452, -1.1083495616912842, 1.2983752489089966, -0.10656433552503586, -1.1855937242507935, -1.2639622688293457, 0.9498208165168762, 0.4531187415122986, 0.09417464584112167, -0.570495069026947, 1.144765853881836, 0.0986616387963295, 1.3415430784225464, 0.45841705799102783, -0.3430379033088684, 0.5761430859565735, -0.45588478446006775, -0.5385361909866333, 1.5861374139785767, 0.14945755898952484, -1.4279361963272095, -2.328014850616455, -0.21088603138923645, -0.7851629853248596, 0.032047029584646225, -0.6235368251800537, -0.9857617616653442, 1.6394973993301392, 0.3556203842163086, -1.3371779918670654, -0.2573509216308594, -0.29556384682655334, -0.49748745560646057, 2.6199445724487305, -1.4071813821792603, -0.24544328451156616, -0.9477823376655579, -0.6316330432891846, 1.6121727228164673, -1.1434624195098877, -0.2460719794034958, -0.9164867997169495, -0.5755788683891296, -1.2521859407424927, -0.5029520988464355, 0.005873513408005238, -0.9240339994430542, 0.7149292230606079, 0.25411638617515564, -1.0928503274917603, -0.3585798144340515, -0.865045428276062, 0.8968284130096436, -0.1268204003572464, 0.2451457977294922, 1.8808547258377075, 0.3922710120677948, -0.40400323271751404, 0.7024055123329163, 1.215327501296997, 0.603112518787384, -0.6421939134597778, 0.1274227648973465, -0.7553796172142029, 0.3050728440284729, -1.3465620279312134, 0.3233785927295685, -2.9136760234832764, 0.6551749110221863, -0.02535167708992958, -0.09058944880962372, 0.0812096893787384, -1.3577808141708374, 1.146471381187439, 2.652836322784424, -1.1017656326293945, 0.4305263161659241, 0.3287947475910187, 1.1738847494125366, -1.5480260848999023, 0.35468849539756775, -0.38988640904426575, 2.161294937133789, 0.21572403609752655, 1.2576606273651123, -0.500838041305542, -2.369539499282837, 0.56111741065979, -1.2242275476455688, -1.1950814723968506, 0.7687638401985168, -0.9325175285339355, 0.007848464883863926, -1.4647163152694702, -0.2234119027853012, -0.900931179523468, -1.2017815113067627, 0.7250671982765198, 0.13985022902488708, 0.4855445921421051, -0.6801674962043762, 0.3131619095802307, -2.2157156467437744, -1.3483275175094604, -0.2042747139930725, -0.9438325762748718, 0.4572579860687256, -0.3375686705112457, 0.6185262799263, -0.13275770843029022, 0.09263281524181366, 0.2944771647453308, 1.4182100296020508, 3.3775362968444824, 0.2778639495372772, 0.44792604446411133, -0.1986144334077835, -0.9235031008720398, 1.3955543041229248, 0.896332323551178, -0.08835754543542862, -0.566368579864502, -1.0015584230422974, 1.2352949380874634, 1.9711419343948364, 0.9871237277984619, 0.03716164082288742, -0.7860276699066162, -0.6571465134620667, -0.03758367523550987, 0.22765648365020752, 0.47733891010284424, 0.9385480284690857, -0.00795954093337059, 0.11470159888267517, 1.3632450103759766, 1.2534997463226318, -0.5493790507316589, 0.35445868968963623, -0.8555179238319397, -0.4153076112270355, 0.3769547939300537, 0.2945699989795685, 0.03454916924238205, 0.39623019099235535, -0.8978342413902283, -0.22658245265483856, -0.4343092739582062, -0.8959664702415466, -0.7540422677993774, -0.4178851842880249, -0.32960250973701477, 1.6513763666152954, 0.1382213681936264, -0.4359598755836487, 0.015020650811493397, -0.7412651181221008, -0.14184635877609253, -1.0553371906280518, 0.21790435910224915, 0.0019077621400356293, -0.07098842412233353, -0.08202768117189407, 1.818999171257019, -0.9684575796127319, -2.028136968612671, 0.254728227853775, 0.1560259759426117, -0.36938750743865967, 0.22536878287792206, 1.7347265481948853, 0.43108150362968445, 1.5110070705413818, 1.2805484533309937, 0.9778247475624084, -0.6422744393348694, -1.2814404964447021, 0.7728169560432434, 0.9469125270843506, -1.3577970266342163, 0.8443683385848999, 0.07138809561729431, -0.5295001864433289, 0.7154719233512878, 1.2201206684112549, 0.4698082506656647, -2.085545539855957, 0.8913518786430359, -0.9847899675369263, 0.8337180018424988, 0.7257249355316162, 0.6910528540611267, 0.262599915266037, 0.8373846411705017, -1.1724337339401245, -1.1361984014511108, -0.7600175142288208, -0.6157451868057251, 2.0185680389404297, -0.23910297453403473, 0.5926151871681213, -0.15226797759532928, -1.3158221244812012, -0.06281886994838715, 0.7212486267089844, 0.3703465163707733, -0.4446655213832855, 0.8020933866500854, -0.6355001926422119, -1.1145656108856201, -1.4231358766555786, -0.38666868209838867, -1.0308398008346558, -0.8726997375488281, 1.0794520378112793, 0.831407904624939, 0.2471875250339508, 1.9174214601516724, 0.6380519866943359, 0.2930026948451996, -2.6713826656341553, 1.0324268341064453, 0.29952123761177063, -0.21681785583496094, 0.9083224534988403, 0.3621556758880615, 0.948593258857727, 0.08477939665317535, 0.4468870759010315, -2.4431047439575195, 2.2755439281463623, -0.2683224081993103, 0.7399781942367554, -0.010433003306388855, -0.11045176535844803, 1.1132830381393433, 0.5129188299179077, 0.5400373935699463, -1.1189485788345337, 0.7046317458152771, -0.536347508430481, 1.1601405143737793, 0.9651810526847839, -0.7828257083892822, -0.052044712007045746, 1.3534116744995117, 0.4677901566028595, -0.5722507238388062, -0.8404914736747742, -0.9589043259620667, 0.9116333723068237, 1.754612922668457, -0.12115510553121567, -0.016058536246418953, 0.7737552523612976, 0.698643684387207, -1.2832785844802856, 0.09950866550207138, -0.6948195695877075, -0.8250645399093628, 1.540926218032837, 2.0483696460723877, -0.1145210787653923, -0.23312483727931976, -0.7437638640403748, -1.2879583835601807, 0.8163164854049683, -0.058220162987709045, 0.19535036385059357, 0.5543335676193237, -0.6835275888442993, 1.1990076303482056, 0.9197397232055664, 0.9175930619239807, 0.21471770107746124, 0.22606800496578217, 0.4359990358352661, -0.34942758083343506, -1.0353368520736694, -0.2561527490615845, -1.0700281858444214, -2.5201334953308105, 0.4556185007095337, -0.22809143364429474, -1.3726568222045898, -0.011477373540401459, -1.021407961845398, 0.9010605812072754, -0.5343192219734192, -1.0222886800765991, -1.6408385038375854, 0.2300887405872345, -0.13148599863052368, 0.9688846468925476, -1.6563470363616943, -0.1133485659956932, 1.190316081047058, 0.8923161029815674, -0.6187710762023926, 1.081817388534546, 0.21404221653938293, 1.0102845430374146, 0.8911678791046143, -0.45149269700050354, 0.5188263654708862, 0.08689486980438232, -1.327515959739685, 0.4064390957355499, 1.1422010660171509, 0.18067291378974915, 1.3472903966903687, -0.5436409115791321, 0.00607830286026001, 0.3631097972393036, -0.5444275736808777, -0.5086779594421387, -0.5120139122009277, 0.7161234021186829, 0.06582128256559372, -0.9036131501197815, 0.011072305031120777, -0.17884646356105804, -0.25164806842803955, 0.1552819460630417, -1.5557831525802612, -0.24156881868839264, -0.38767993450164795, -0.550682008266449, -1.2733052968978882, -0.047298312187194824, 1.4532390832901, -0.7233960628509521, -0.16978806257247925, 0.5582936406135559, 0.49065762758255005, 0.4859674572944641, 0.6622651815414429, -0.6445896029472351, -0.42105504870414734, -0.24759815633296967, -0.32344672083854675, 0.355081170797348, 1.33072030544281, -0.08907441794872284, -0.8950530290603638, 0.6695277690887451, -0.3408516049385071, 0.06982173025608063, 1.9448972940444946, 0.10851200670003891, -0.8101572394371033, 0.34372666478157043, -0.7175281047821045, 1.916659951210022, 1.763130784034729, 1.333505630493164, -0.11767148226499557, -0.9854360818862915, 0.6599807739257812, -0.3273554742336273, -0.30546706914901733, 0.9407222867012024, 0.41318392753601074, -0.1951545774936676, -1.4168314933776855, 0.5256645083427429, 1.2992984056472778, -0.8670058846473694, -0.7193194627761841, 0.03692664951086044, -0.8153769373893738, 1.0799307823181152, 0.5959196090698242, 0.3636400103569031, 0.18433204293251038, 1.5250685214996338, 0.7621245384216309, -0.5482354164123535, 0.5305402278900146, 0.496139794588089, -0.1660527139902115, -2.159869909286499, -1.1579196453094482, 0.301334023475647, -0.427422434091568, -1.543908715248108, 1.4329242706298828, -1.1376190185546875, -1.0037028789520264, 0.5296860337257385, 0.024296332150697708, 1.4077340364456177, 0.31245124340057373, 1.5717815160751343, 2.199392557144165, 0.8777378797531128, 0.3634115159511566, 1.3356853723526, -0.22164329886436462, -0.43603193759918213, 1.8312411308288574, -0.4252922832965851, 0.4135548174381256, 1.0900990962982178, -0.3295860290527344, -1.0077369213104248, -0.8164259195327759, -1.1820876598358154, -0.6833624839782715, 1.1671528816223145, 0.08886298537254333, -1.0538098812103271, 0.24774932861328125, 1.6283650398254395, 0.10944787412881851, -0.4196786880493164, 0.512611448764801, 0.43402448296546936, -0.7503851652145386, -0.1099352091550827, -0.9322012662887573, 0.5876924395561218, -0.18904760479927063, -0.33119821548461914, 0.3762878477573395, 0.3909214735031128, 1.2165250778198242, 0.007313198409974575, 0.14100080728530884, 1.1103096008300781, -1.474255084991455, 1.5040359497070312, -0.6190239191055298, 0.2744333744049072, -2.3708200454711914, 1.4401657581329346, -0.640848696231842, 2.0075843334198, -2.637362003326416, 0.38280442357063293, -0.6486672759056091, -0.4803219139575958, 0.3203256130218506, -0.3161843717098236, 0.18868213891983032, -0.1629629135131836, -1.0880120992660522, -0.11213812977075577, -0.6934521794319153, 0.5443245768547058, 1.0390634536743164, 1.265138864517212, -1.1196742057800293, -0.32960304617881775, -1.6706663370132446, -0.1649635285139084, -0.6771889328956604, 0.23386242985725403, -2.051093816757202, -0.2000761479139328, -1.956255555152893, -2.39611554145813, -1.4178528785705566, -0.792927086353302, 1.0631245374679565, 0.11429470032453537, -0.9109945893287659, 1.1995476484298706, -0.3862704932689667, -1.8447635173797607, 1.1380083560943604, -2.0672543048858643 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
If `to_tf_dataset` can be unbatched, then it should be fairly easy for users to convert the TF dataset to TFRecords right ?
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
22
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data If `to_tf_dataset` can be unbatched, then it should be fairly easy for users to convert the TF dataset to TFRecords right ?
[ -1.1966722011566162, -0.9374687671661377, -0.7196098566055298, 1.3898199796676636, -0.14949245750904083, -1.1892890930175781, 0.04584282264113426, -1.1593496799468994, 1.6696727275848389, -0.7847439646720886, 0.3132384717464447, -1.6475086212158203, 0.05997816473245621, -0.6186725497245789, -0.7487565875053406, -0.8777709007263184, -0.41549381613731384, -0.833543598651886, 1.0573261976242065, 2.520097017288208, 1.1979674100875854, -1.4501429796218872, 2.683457851409912, 0.7214646935462952, -0.26413893699645996, -0.9958807826042175, 0.47082841396331787, 0.10400871187448502, -1.2030000686645508, -0.47468122839927673, -0.8499498963356018, -0.05420680344104767, -0.574314296245575, -0.43860259652137756, -0.06827541440725327, 0.31170836091041565, -0.2606174647808075, -0.32282349467277527, -0.5689793825149536, -0.7365051507949829, 0.4695606231689453, -0.38231128454208374, 1.0102797746658325, -0.28369396924972534, 1.9182543754577637, -0.4799363315105438, 0.4395770728588104, 0.6696085333824158, 1.3408236503601074, 0.20656010508537292, -0.008424955420196056, 0.28036433458328247, 0.37735623121261597, -0.12873300909996033, 0.46614208817481995, 1.118086338043213, 0.7008568644523621, 0.461566299200058, 0.6567183136940002, -2.1964175701141357, 1.3359748125076294, -1.0743788480758667, 0.2792358994483948, 1.3908778429031372, -0.8870675563812256, 0.4248862862586975, -1.7398478984832764, -0.12827099859714508, 0.6247424483299255, -2.285595417022705, 0.2535128891468048, -1.2917957305908203, -0.573877215385437, 0.9474133849143982, 0.2678575813770294, -1.21030855178833, 0.3365146517753601, -0.415883332490921, 1.0580624341964722, 0.43497157096862793, 1.205173373222351, -1.7058805227279663, 0.02062012255191803, -0.3314499258995056, 0.06938286125659943, -1.3384391069412231, -1.4686752557754517, 0.5380236506462097, 0.6471043825149536, 0.5600128173828125, -0.04390902444720268, 0.9973204731941223, -1.0324939489364624, 0.8224682211875916, -1.0149067640304565, -1.5846097469329834, -1.4037240743637085, -2.249842405319214, -2.31992769241333, 0.8055490851402283, -0.45199739933013916, -0.6287952065467834, 2.0621964931488037, -1.0495407581329346, -1.735482931137085, 1.250908374786377, 0.3617994487285614, -0.06655193865299225, 2.4342281818389893, 0.13562962412834167, -0.7000797986984253, 0.4121246337890625, -0.773798406124115, 0.8577375411987305, -0.4260207712650299, 1.4127297401428223, 0.4515441358089447, -1.0724213123321533, 1.5738288164138794, -0.4575640857219696, 0.535621702671051, -0.6811417937278748, -0.6237550973892212, -0.7957186698913574, 0.38982802629470825, 1.8920685052871704, -0.31566405296325684, 1.5979925394058228, -0.39612773060798645, -1.498905897140503, -1.5350347757339478, 0.8776196241378784, 0.5195784568786621, -0.8832501173019409, 0.06406717002391815, -0.3827327489852905, 0.1368376761674881, -0.010456234216690063, 1.0496530532836914, 1.231812596321106, 0.5690724849700928, -0.29639291763305664, -0.8815844655036926, 0.1960681676864624, -0.18216972053050995, -0.6874672174453735, -1.8745590448379517, -0.2762194573879242, 0.1748879998922348, 0.5613498687744141, -1.2957853078842163, 1.7352352142333984, 0.913017213344574, 2.0001513957977295, 0.9565445780754089, -0.33463606238365173, 1.4643776416778564, -0.0030192332342267036, 1.7657181024551392, -0.46315819025039673, 0.7395970821380615, -0.34311336278915405, -1.1318684816360474, 0.806448757648468, -0.3392288088798523, -1.9969364404678345, -0.7785773277282715, -0.8019470572471619, -0.2538261413574219, -0.7532544136047363, 0.8577307462692261, -0.21514348685741425, -1.3641810417175293, 0.2910538613796234, -0.6092144250869751, 0.19120213389396667, -1.2004770040512085, 0.37957826256752014, 0.7223432660102844, -0.6263000965118408, -0.005761996377259493, -0.21340487897396088, -1.2976490259170532, -0.4474259614944458, 0.2690436840057373, 1.869530200958252, -0.786751925945282, 0.8847289681434631, 1.0706268548965454, -0.6469659209251404, 0.006347981281578541, 0.2986322343349457, -0.3304046392440796, 0.8498263359069824, -1.0336380004882812, -0.442171573638916, 1.184032917022705, -0.22946999967098236, -0.5851729512214661, 1.4620413780212402, 0.7435142397880554, -1.0062261819839478, -0.23393835127353668, -0.19809983670711517, -0.7937915921211243, 0.04043621942400932, -1.644505262374878, -0.19357389211654663, 0.3008803427219391, -1.5077513456344604, -0.44296684861183167, -0.253841757774353, 1.3302682638168335, -0.2622363269329071, 1.4816503524780273, -0.4009675085544586, -0.14482355117797852, -0.40843191742897034, -0.43265247344970703, 0.19053210318088531, -0.16769075393676758, -0.6198839545249939, 0.27099114656448364, -0.7623457908630371, 0.4395018219947815, 1.3619236946105957, 0.3291868269443512, 0.03232007473707199, 0.3564917743206024, 1.063124656677246, 0.3766925632953644, -0.07002165913581848, -0.8649364709854126, -1.5439990758895874, 1.9833382368087769, -1.4773958921432495, 2.0503010749816895, 0.8506461381912231, 0.08863802999258041, -1.7384657859802246, -1.8350681066513062, 1.3454514741897583, 1.1859651803970337, 2.264976978302002, 0.5752964615821838, 0.37395957112312317, -0.8274568915367126, -0.5382215976715088, 0.35438981652259827, -1.0879387855529785, -0.6545524001121521, 0.13833029568195343, 2.3261146545410156, 1.7592757940292358, -0.49509260058403015, -0.17754590511322021, -0.9869574308395386, 1.3505924940109253, -0.13345544040203094, 0.21042345464229584, 2.077282190322876, -0.31843945384025574, -1.1519488096237183, 1.259163737297058, -2.4457364082336426, 0.0977354422211647, 1.9319363832473755, 0.27624645829200745, 0.09939660131931305, -1.348954200744629, -0.552020251750946, -0.3246578276157379, -0.4239500164985657, -1.1655057668685913, 0.5629713535308838, -0.25642967224121094, -0.8215147256851196, -1.520181655883789, 0.22277963161468506, -1.2068567276000977, -1.5740461349487305, 0.41484907269477844, 1.8809844255447388, 2.011700391769409, -0.7725366353988647, 1.5000299215316772, -0.3178699314594269, 0.1542704999446869, 1.2276676893234253, 1.2299087047576904, 3.1263487339019775, 1.928331732749939, -1.3040298223495483, 0.5170404314994812, -0.19816339015960693, -0.5259270668029785, 1.1499409675598145, -1.1001031398773193, 1.2940419912338257, -0.08099418133497238, -1.190696120262146, -1.301757574081421, 0.9324195384979248, 0.5057304501533508, 0.10519517213106155, -0.6028715968132019, 1.1211649179458618, 0.09937406331300735, 1.3707447052001953, 0.447174996137619, -0.3539612293243408, 0.533860981464386, -0.46147480607032776, -0.5281128287315369, 1.591041088104248, 0.11234819889068604, -1.4323023557662964, -2.3225128650665283, -0.23889021575450897, -0.7664051651954651, 0.027416806668043137, -0.6447945833206177, -0.9876948595046997, 1.6305267810821533, 0.35577598214149475, -1.3536795377731323, -0.24201600253582, -0.30578795075416565, -0.526595950126648, 2.6301403045654297, -1.4400973320007324, -0.21908038854599, -0.9731782078742981, -0.6178960800170898, 1.6367570161819458, -1.144989252090454, -0.25144147872924805, -0.9332736730575562, -0.6003560423851013, -1.2745972871780396, -0.5146812200546265, 0.010395270772278309, -0.9282218217849731, 0.7486225962638855, 0.24639421701431274, -1.1059924364089966, -0.3712915778160095, -0.8542687892913818, 0.8850683569908142, -0.1266954392194748, 0.24913740158081055, 1.8540977239608765, 0.4173109829425812, -0.41324958205223083, 0.6727287173271179, 1.2297221422195435, 0.612635612487793, -0.6366624236106873, 0.17012444138526917, -0.763603925704956, 0.3145768642425537, -1.348158836364746, 0.318990558385849, -2.935704469680786, 0.6575459837913513, 0.011041908524930477, -0.03257066756486893, 0.08877687156200409, -1.3254843950271606, 1.1514179706573486, 2.6723759174346924, -1.1393475532531738, 0.42699864506721497, 0.34074166417121887, 1.1596401929855347, -1.5642814636230469, 0.36105868220329285, -0.37914028763771057, 2.1558806896209717, 0.1690807044506073, 1.2661982774734497, -0.5212851166725159, -2.3474841117858887, 0.5711008310317993, -1.2389931678771973, -1.1989885568618774, 0.7981724739074707, -0.9504024982452393, 0.0070564718917012215, -1.4564694166183472, -0.23100706934928894, -0.9003193378448486, -1.2494837045669556, 0.7598757743835449, 0.12979115545749664, 0.5013867616653442, -0.6540080308914185, 0.34400543570518494, -2.234055995941162, -1.3233799934387207, -0.2311573177576065, -0.9693050384521484, 0.4347352981567383, -0.3119228482246399, 0.581892192363739, -0.112894706428051, 0.11257179081439972, 0.2903808355331421, 1.4052762985229492, 3.3681881427764893, 0.2866807281970978, 0.46013519167900085, -0.1625118851661682, -0.9363954067230225, 1.3548221588134766, 0.9045244455337524, -0.08496972173452377, -0.5603363513946533, -0.9847781658172607, 1.2145977020263672, 1.9453424215316772, 1.0132416486740112, 0.05576352775096893, -0.785006582736969, -0.6561443209648132, -0.010539021342992783, 0.23739071190357208, 0.4733890891075134, 0.9291712641716003, -0.016422096639871597, 0.12216394394636154, 1.3520535230636597, 1.255700707435608, -0.5298581719398499, 0.3333904445171356, -0.8412232995033264, -0.42578431963920593, 0.40605461597442627, 0.29327061772346497, 0.02647652104496956, 0.4445717930793762, -0.8773653507232666, -0.24114803969860077, -0.4286893904209137, -0.935481607913971, -0.7007396221160889, -0.438374400138855, -0.3536158502101898, 1.6409001350402832, 0.13212285935878754, -0.4319778084754944, 0.0021717622876167297, -0.7874277830123901, -0.11898557096719742, -1.0684585571289062, 0.2191765010356903, 0.0104743717238307, -0.0689459964632988, -0.06895207613706589, 1.8385310173034668, -0.9466505646705627, -2.029698610305786, 0.22739368677139282, 0.17226001620292664, -0.3638650178909302, 0.20081621408462524, 1.7377580404281616, 0.4176204800605774, 1.4959280490875244, 1.2385585308074951, 0.9851893782615662, -0.62843257188797, -1.330392837524414, 0.7746332883834839, 0.9873427152633667, -1.3758634328842163, 0.8659073710441589, 0.08850947767496109, -0.5104784965515137, 0.7261356115341187, 1.251907229423523, 0.4830451011657715, -2.0440421104431152, 0.8622114062309265, -1.0145491361618042, 0.7940830588340759, 0.7179569005966187, 0.6896335482597351, 0.22449009120464325, 0.8704150915145874, -1.2092292308807373, -1.1225453615188599, -0.7583297491073608, -0.6183054447174072, 2.001646041870117, -0.22781120240688324, 0.5725505948066711, -0.1190563216805458, -1.310362458229065, -0.05583689361810684, 0.740016520023346, 0.3723964989185333, -0.41227054595947266, 0.8477166891098022, -0.6674591302871704, -1.116434931755066, -1.4465664625167847, -0.35265815258026123, -0.9813521504402161, -0.8530441522598267, 1.1048798561096191, 0.841092050075531, 0.20834583044052124, 1.88679039478302, 0.6500528454780579, 0.27262264490127563, -2.68940806388855, 1.0170842409133911, 0.3046899735927582, -0.19060981273651123, 0.8912456035614014, 0.3479790985584259, 0.9934074282646179, 0.08135589212179184, 0.45055532455444336, -2.42989182472229, 2.261383533477783, -0.2779705822467804, 0.7281853556632996, 0.006923350505530834, -0.11168111860752106, 1.0931940078735352, 0.5024875402450562, 0.5440868735313416, -1.135851502418518, 0.7093910574913025, -0.5274245142936707, 1.1807277202606201, 0.9942752718925476, -0.7779796719551086, -0.08170558512210846, 1.3536478281021118, 0.4763256013393402, -0.5292481184005737, -0.8295688629150391, -0.9647296071052551, 0.9012893438339233, 1.7286068201065063, -0.11115431040525436, -0.03318098932504654, 0.8008880615234375, 0.7176785469055176, -1.2805343866348267, 0.08814596384763718, -0.7401198744773865, -0.8565283417701721, 1.5671665668487549, 2.0511176586151123, -0.08221035450696945, -0.24791856110095978, -0.7604365944862366, -1.2335025072097778, 0.7970274686813354, -0.057826776057481766, 0.22374045848846436, 0.5680376887321472, -0.6839796900749207, 1.1655343770980835, 0.9312991499900818, 0.8963363766670227, 0.19757896661758423, 0.21899278461933136, 0.4468262493610382, -0.3381187915802002, -1.0667905807495117, -0.22636869549751282, -1.0456697940826416, -2.5377769470214844, 0.44981566071510315, -0.22797439992427826, -1.38406503200531, -0.008127409033477306, -1.04295814037323, 0.912224292755127, -0.535615861415863, -1.0348275899887085, -1.6249339580535889, 0.23030422627925873, -0.12460407614707947, 0.9683972597122192, -1.657230019569397, -0.15263445675373077, 1.2068551778793335, 0.8749785423278809, -0.6180645823478699, 1.0704870223999023, 0.20070576667785645, 1.0103659629821777, 0.9059402942657471, -0.444671630859375, 0.516347348690033, 0.07926470786333084, -1.3531098365783691, 0.44316381216049194, 1.1025538444519043, 0.16362935304641724, 1.336509108543396, -0.5121331214904785, 0.028781190514564514, 0.3652413785457611, -0.558722198009491, -0.497691810131073, -0.49711889028549194, 0.7293128371238708, 0.08833440393209457, -0.8964186310768127, 0.03756921365857124, -0.1858876347541809, -0.25560829043388367, 0.1429150402545929, -1.5697206258773804, -0.276242733001709, -0.37617361545562744, -0.5568633675575256, -1.2808997631072998, -0.060132283717393875, 1.454743504524231, -0.7525973320007324, -0.16758987307548523, 0.5298658013343811, 0.5103662014007568, 0.5276157855987549, 0.6549617052078247, -0.6406835913658142, -0.38230642676353455, -0.24627594649791718, -0.31851837038993835, 0.3320557475090027, 1.3496239185333252, -0.06087853014469147, -0.9004107117652893, 0.684796154499054, -0.33379891514778137, 0.08071548491716385, 1.980950951576233, 0.15226422250270844, -0.8393548727035522, 0.35178878903388977, -0.7177072167396545, 1.8754037618637085, 1.7502607107162476, 1.338541030883789, -0.12301847338676453, -0.9898262619972229, 0.637502908706665, -0.33176422119140625, -0.3226209282875061, 0.9411921501159668, 0.4520314633846283, -0.2079254388809204, -1.3746445178985596, 0.5280942916870117, 1.3026039600372314, -0.8534390330314636, -0.729193389415741, 0.04671502485871315, -0.8281161189079285, 1.0387295484542847, 0.5953864455223083, 0.3574906289577484, 0.19822396337985992, 1.5036556720733643, 0.7453828454017639, -0.5256869792938232, 0.5141057372093201, 0.4957045614719391, -0.1836824119091034, -2.162363290786743, -1.1222155094146729, 0.3122158348560333, -0.4268084466457367, -1.5409259796142578, 1.4378087520599365, -1.1371562480926514, -0.9998080134391785, 0.5222080945968628, 0.02360333874821663, 1.4227617979049683, 0.33559295535087585, 1.568484902381897, 2.189621925354004, 0.8694913387298584, 0.3348192572593689, 1.3575934171676636, -0.20714114606380463, -0.45128971338272095, 1.8395874500274658, -0.4369485676288605, 0.4170054793357849, 1.1124297380447388, -0.3279392421245575, -0.9938363432884216, -0.7953113317489624, -1.1753069162368774, -0.6848868131637573, 1.1829482316970825, 0.1066959798336029, -1.0530471801757812, 0.23553726077079773, 1.6336565017700195, 0.11791577190160751, -0.39021337032318115, 0.542721152305603, 0.4458354115486145, -0.7758598923683167, -0.10541687905788422, -0.9356013536453247, 0.5545394420623779, -0.1447480171918869, -0.2840782701969147, 0.3753281533718109, 0.39076951146125793, 1.2326092720031738, 0.013775977306067944, 0.15118201076984406, 1.1071891784667969, -1.454094409942627, 1.475274682044983, -0.5808870792388916, 0.2706298232078552, -2.391857385635376, 1.4314308166503906, -0.6561993956565857, 1.9824295043945312, -2.6259706020355225, 0.3811139464378357, -0.6601659059524536, -0.47872239351272583, 0.3289535641670227, -0.358629047870636, 0.22780849039554596, -0.15967966616153717, -1.0961008071899414, -0.11096049845218658, -0.6895363330841064, 0.5534486770629883, 1.0403461456298828, 1.2511364221572876, -1.1050732135772705, -0.3597503900527954, -1.7004668712615967, -0.1954997032880783, -0.722091794013977, 0.2608361840248108, -2.033965826034546, -0.22169822454452515, -1.9458812475204468, -2.4078590869903564, -1.4023996591567993, -0.8014189600944519, 1.053715705871582, 0.1075032651424408, -0.9201986789703369, 1.1738799810409546, -0.40371769666671753, -1.8437113761901855, 1.145764708518982, -2.0613350868225098 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
> If to_tf_dataset can be unbatched, then it should be fairly easy for users to convert the TF dataset to TFRecords right ? Sort of! A `tf.data.Dataset` is more like an iterator, and does not support sample indexing. `to_tf_dataset()` creates an iterator, but to convert that to `TFRecord`, the user would have to iterate over the whole thing and manually save the stream of samples to files.
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
67
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data > If to_tf_dataset can be unbatched, then it should be fairly easy for users to convert the TF dataset to TFRecords right ? Sort of! A `tf.data.Dataset` is more like an iterator, and does not support sample indexing. `to_tf_dataset()` creates an iterator, but to convert that to `TFRecord`, the user would have to iterate over the whole thing and manually save the stream of samples to files.
[ -1.1841517686843872, -0.946740448474884, -0.7185553312301636, 1.3837403059005737, -0.16683761775493622, -1.212331771850586, 0.08084597438573837, -1.151807188987732, 1.711561679840088, -0.7949066162109375, 0.291653037071228, -1.6431305408477783, 0.07132776081562042, -0.6019613742828369, -0.7506521344184875, -0.8672120571136475, -0.4457553029060364, -0.8469491004943848, 1.042027473449707, 2.523017168045044, 1.1963037252426147, -1.4350463151931763, 2.6626977920532227, 0.7114726901054382, -0.23541173338890076, -0.9881359934806824, 0.46795058250427246, 0.08056827634572983, -1.2286624908447266, -0.48053017258644104, -0.8488680124282837, -0.0543069951236248, -0.5988223552703857, -0.4741126298904419, -0.05417458340525627, 0.3359243869781494, -0.2621769607067108, -0.364594042301178, -0.5724728107452393, -0.7260209321975708, 0.47505658864974976, -0.3876568078994751, 1.0167888402938843, -0.29456526041030884, 1.88623046875, -0.461056649684906, 0.459078311920166, 0.6808233261108398, 1.3562527894973755, 0.23301197588443756, 0.006282965652644634, 0.2417738288640976, 0.3921951949596405, -0.1186080276966095, 0.47539177536964417, 1.1365642547607422, 0.7249109745025635, 0.5058636665344238, 0.6859936714172363, -2.195204973220825, 1.3368282318115234, -1.058350920677185, 0.3038754165172577, 1.351844072341919, -0.8513336777687073, 0.4003732204437256, -1.775302529335022, -0.1262756735086441, 0.6135643720626831, -2.2802648544311523, 0.23553262650966644, -1.2918893098831177, -0.5441187024116516, 0.95306795835495, 0.2779160141944885, -1.191033959388733, 0.3340624272823334, -0.4241272509098053, 1.0174903869628906, 0.42620036005973816, 1.1995422840118408, -1.7193019390106201, 0.00006403867155313492, -0.3232501149177551, 0.09662482142448425, -1.3136626482009888, -1.4755409955978394, 0.5468759536743164, 0.6575916409492493, 0.5428464412689209, -0.05768526345491409, 1.0108951330184937, -1.0289595127105713, 0.8042279481887817, -1.0070931911468506, -1.6117382049560547, -1.3986104726791382, -2.2037689685821533, -2.3409814834594727, 0.7731813192367554, -0.45406320691108704, -0.6072367429733276, 2.0798890590667725, -1.043579339981079, -1.712530255317688, 1.2287544012069702, 0.3326733708381653, -0.06597176939249039, 2.414898633956909, 0.10352315753698349, -0.6845157742500305, 0.4323805272579193, -0.7380714416503906, 0.8567004799842834, -0.4377521574497223, 1.4098645448684692, 0.4104638695716858, -1.069969892501831, 1.5857279300689697, -0.41393840312957764, 0.5577442049980164, -0.690097987651825, -0.6124366521835327, -0.7988462448120117, 0.38102400302886963, 1.8985759019851685, -0.3205175995826721, 1.5925991535186768, -0.407853364944458, -1.5323480367660522, -1.562827229499817, 0.8939805030822754, 0.5023709535598755, -0.8640667200088501, 0.025916580110788345, -0.38545483350753784, 0.14423583447933197, -0.03193439915776253, 1.0435458421707153, 1.2510136365890503, 0.6078979969024658, -0.3105321526527405, -0.8639907836914062, 0.16910220682621002, -0.174393892288208, -0.7145832180976868, -1.843210220336914, -0.2887374460697174, 0.15985877811908722, 0.5575880408287048, -1.2697935104370117, 1.754995346069336, 0.9062772393226624, 1.995396375656128, 0.9673966765403748, -0.3549728989601135, 1.47361159324646, 0.03229054808616638, 1.764736533164978, -0.49576419591903687, 0.7238065004348755, -0.3600354492664337, -1.127285361289978, 0.8165503740310669, -0.32610172033309937, -2.0124776363372803, -0.7567669153213501, -0.7667956948280334, -0.2483104169368744, -0.730565071105957, 0.8309851884841919, -0.20457042753696442, -1.376064658164978, 0.2631547749042511, -0.5931590795516968, 0.1663190722465515, -1.1896729469299316, 0.38818079233169556, 0.7276166081428528, -0.6608753800392151, 0.0491754524409771, -0.2039175033569336, -1.2844209671020508, -0.4581202268600464, 0.2516719400882721, 1.8606027364730835, -0.7853665351867676, 0.877028226852417, 1.0816013813018799, -0.6644201874732971, 0.00861379038542509, 0.31647589802742004, -0.3242330253124237, 0.8421233892440796, -1.0422608852386475, -0.42981430888175964, 1.191992163658142, -0.23885172605514526, -0.5664243102073669, 1.4469447135925293, 0.7154259085655212, -1.0253721475601196, -0.21413588523864746, -0.14702074229717255, -0.8264666795730591, 0.05713529512286186, -1.647146224975586, -0.1814105063676834, 0.31241875886917114, -1.5160586833953857, -0.453708291053772, -0.2687745988368988, 1.2888444662094116, -0.21378397941589355, 1.4635095596313477, -0.3797467052936554, -0.1472269743680954, -0.39670228958129883, -0.426984578371048, 0.1663655936717987, -0.17864684760570526, -0.5842251777648926, 0.2620908319950104, -0.78177809715271, 0.4315263032913208, 1.405964732170105, 0.31499674916267395, 0.0032462971284985542, 0.3640580475330353, 1.0631130933761597, 0.4149356186389923, -0.06722971051931381, -0.8532714247703552, -1.5163828134536743, 1.9817301034927368, -1.4494750499725342, 2.045098066329956, 0.8604863286018372, 0.06955254822969437, -1.7426289319992065, -1.8553205728530884, 1.3419362306594849, 1.1577879190444946, 2.3069515228271484, 0.5704340934753418, 0.38023459911346436, -0.8291676640510559, -0.5305166840553284, 0.3888821601867676, -1.067962408065796, -0.6675304174423218, 0.13281728327274323, 2.330693483352661, 1.757280945777893, -0.5050258636474609, -0.17922143638134003, -0.9986681938171387, 1.3599590063095093, -0.1366317868232727, 0.26170435547828674, 2.0609147548675537, -0.3225730359554291, -1.14786958694458, 1.3062061071395874, -2.410834312438965, 0.11094936728477478, 1.9172133207321167, 0.2584282159805298, 0.09168180078268051, -1.3713998794555664, -0.5580495595932007, -0.2960691750049591, -0.43380680680274963, -1.1845893859863281, 0.5461835265159607, -0.26838046312332153, -0.817272424697876, -1.524229884147644, 0.20620794594287872, -1.21914803981781, -1.5651153326034546, 0.4025026857852936, 1.920911431312561, 1.9815278053283691, -0.7625393867492676, 1.4970136880874634, -0.33009591698646545, 0.13470697402954102, 1.2167099714279175, 1.2193663120269775, 3.141101598739624, 1.9340837001800537, -1.3207299709320068, 0.5212249159812927, -0.20345215499401093, -0.5081948637962341, 1.1192249059677124, -1.106642723083496, 1.2941036224365234, -0.12002579122781754, -1.1822402477264404, -1.2702162265777588, 0.9292451739311218, 0.48603859543800354, 0.12112808972597122, -0.5612579584121704, 1.1138924360275269, 0.09427617490291595, 1.347129225730896, 0.4622584283351898, -0.3985358774662018, 0.5711561441421509, -0.46057966351509094, -0.5232419967651367, 1.5953938961029053, 0.14448031783103943, -1.4131556749343872, -2.322265386581421, -0.22770939767360687, -0.7843282222747803, 0.07497336715459824, -0.631453275680542, -0.9702749848365784, 1.6467368602752686, 0.34674152731895447, -1.357845425605774, -0.24980193376541138, -0.2863837480545044, -0.5100300312042236, 2.620136260986328, -1.4179595708847046, -0.224481999874115, -0.9588102698326111, -0.638936460018158, 1.6135119199752808, -1.1528573036193848, -0.282058447599411, -0.9178133606910706, -0.5637536644935608, -1.252876877784729, -0.4972456693649292, 0.026918325573205948, -0.9105557799339294, 0.786649763584137, 0.29165220260620117, -1.1186306476593018, -0.35003313422203064, -0.8766607642173767, 0.8915199637413025, -0.12344571202993393, 0.22474294900894165, 1.865540623664856, 0.4310479164123535, -0.41242823004722595, 0.6735257506370544, 1.213564157485962, 0.6226410269737244, -0.6407994031906128, 0.1690002828836441, -0.7598799467086792, 0.2973702549934387, -1.3472375869750977, 0.31263700127601624, -2.9114017486572266, 0.6375167965888977, -0.01041433960199356, -0.04973364993929863, 0.09238918870687485, -1.3281229734420776, 1.1020653247833252, 2.6506340503692627, -1.1155283451080322, 0.4148043096065521, 0.34011033177375793, 1.1705976724624634, -1.5603864192962646, 0.36025112867355347, -0.3819119334220886, 2.1377742290496826, 0.19328130781650543, 1.251296877861023, -0.520750105381012, -2.349248170852661, 0.5667136907577515, -1.247495174407959, -1.2123610973358154, 0.7943487763404846, -0.9498423933982849, -0.02001580037176609, -1.4631128311157227, -0.24599520862102509, -0.8920231461524963, -1.2431316375732422, 0.739556074142456, 0.15148597955703735, 0.47913438081741333, -0.6606894731521606, 0.3273664712905884, -2.2012736797332764, -1.3048222064971924, -0.23557962477207184, -0.9754971265792847, 0.44522011280059814, -0.3314723074436188, 0.6026419997215271, -0.14302201569080353, 0.08472266793251038, 0.2921826243400574, 1.3949954509735107, 3.3643269538879395, 0.271109938621521, 0.412505567073822, -0.21948130428791046, -0.929262101650238, 1.3781136274337769, 0.9226285219192505, -0.07440773397684097, -0.5857471227645874, -1.0179346799850464, 1.2044154405593872, 1.9852927923202515, 1.0053719282150269, 0.04517446085810661, -0.76022869348526, -0.6730281114578247, -0.042105309665203094, 0.21417675912380219, 0.4601878225803375, 0.9439767003059387, 0.008707244880497456, 0.10383741557598114, 1.361457347869873, 1.2653157711029053, -0.5115656852722168, 0.32633793354034424, -0.8004403114318848, -0.43522539734840393, 0.4385172426700592, 0.2982170283794403, 0.014765351079404354, 0.40658697485923767, -0.9239881634712219, -0.2369900494813919, -0.4637141227722168, -0.9524980783462524, -0.6970202326774597, -0.4435338079929352, -0.32084885239601135, 1.638401985168457, 0.13092972338199615, -0.46103253960609436, -0.016828712075948715, -0.7560587525367737, -0.1280553638935089, -1.059848666191101, 0.25109532475471497, -0.025637120008468628, -0.07527481019496918, -0.06608394533395767, 1.8365693092346191, -0.9254270792007446, -2.016021251678467, 0.22079937160015106, 0.13621018826961517, -0.35503411293029785, 0.2357582002878189, 1.7139674425125122, 0.4244334399700165, 1.499424934387207, 1.3023196458816528, 0.9844607710838318, -0.636673092842102, -1.3156964778900146, 0.7651870250701904, 0.9659875631332397, -1.3916572332382202, 0.846309244632721, 0.08833899348974228, -0.5493772029876709, 0.7558183670043945, 1.2370049953460693, 0.47707128524780273, -2.0744876861572266, 0.8596049547195435, -1.0089986324310303, 0.774684727191925, 0.7114490270614624, 0.6856994032859802, 0.23575761914253235, 0.8422797918319702, -1.2006337642669678, -1.1500601768493652, -0.7246530055999756, -0.6261376738548279, 1.9996347427368164, -0.227481871843338, 0.5989347696304321, -0.12993456423282623, -1.3201125860214233, -0.08275669813156128, 0.7468711137771606, 0.3982093930244446, -0.4538399279117584, 0.8185175061225891, -0.6570255160331726, -1.1032971143722534, -1.4304090738296509, -0.3834438621997833, -1.0462160110473633, -0.8483317494392395, 1.115626335144043, 0.8255202770233154, 0.2299964427947998, 1.8761705160140991, 0.6533600687980652, 0.28416094183921814, -2.693690061569214, 0.986810564994812, 0.3191203773021698, -0.19052787125110626, 0.9037936925888062, 0.36801162362098694, 0.9727741479873657, 0.07858631014823914, 0.45858457684516907, -2.4211323261260986, 2.2875006198883057, -0.2770622670650482, 0.7307107448577881, -0.014540152624249458, -0.1112443208694458, 1.1063765287399292, 0.5090266466140747, 0.5468668341636658, -1.1223323345184326, 0.7055220007896423, -0.530018150806427, 1.162734031677246, 0.9559407234191895, -0.7836881875991821, -0.06887868791818619, 1.334421157836914, 0.4857576787471771, -0.5401303172111511, -0.8458744287490845, -0.9824285507202148, 0.8954199552536011, 1.777737021446228, -0.12493038922548294, -0.029084283858537674, 0.8297836184501648, 0.709632396697998, -1.2971762418746948, 0.07782401144504547, -0.7244698405265808, -0.8442391753196716, 1.5552316904067993, 2.0350759029388428, -0.07913883775472641, -0.22649332880973816, -0.7432780265808105, -1.2293816804885864, 0.795935332775116, -0.034360382705926895, 0.19188867509365082, 0.5606216788291931, -0.6741850972175598, 1.1759662628173828, 0.93562251329422, 0.9089462757110596, 0.21329614520072937, 0.2393483966588974, 0.48053666949272156, -0.36759740114212036, -1.0707803964614868, -0.22572270035743713, -1.046168327331543, -2.531663179397583, 0.4744555652141571, -0.1996433138847351, -1.403287649154663, -0.010919833555817604, -1.0411046743392944, 0.9006108641624451, -0.5224468111991882, -1.0453473329544067, -1.6271387338638306, 0.2425358146429062, -0.10987382382154465, 0.9731382727622986, -1.6534650325775146, -0.13923968374729156, 1.1698462963104248, 0.8889397978782654, -0.6201379299163818, 1.0545541048049927, 0.21884259581565857, 0.9977902173995972, 0.9043225646018982, -0.4421105980873108, 0.4796508848667145, 0.09207572042942047, -1.3301012516021729, 0.4040105640888214, 1.114612102508545, 0.16452465951442719, 1.3404746055603027, -0.5491704940795898, 0.025322631001472473, 0.35344198346138, -0.54822838306427, -0.46272629499435425, -0.5263583660125732, 0.7143307328224182, 0.037992533296346664, -0.872222900390625, 0.009004711173474789, -0.18195345997810364, -0.2593200206756592, 0.1473022848367691, -1.550999402999878, -0.24464640021324158, -0.38689905405044556, -0.5626136064529419, -1.2539783716201782, -0.04876914247870445, 1.4636969566345215, -0.7332574129104614, -0.19925284385681152, 0.5617191791534424, 0.49738678336143494, 0.5307899713516235, 0.63680499792099, -0.6413615942001343, -0.3893619775772095, -0.22819817066192627, -0.3668868839740753, 0.33678364753723145, 1.4023773670196533, -0.07232948392629623, -0.9292693734169006, 0.717461109161377, -0.33972129225730896, 0.06920891255140305, 1.9826396703720093, 0.1411784291267395, -0.8161097764968872, 0.3288407623767853, -0.725480318069458, 1.8799206018447876, 1.7828152179718018, 1.361554741859436, -0.1121838167309761, -0.9881105422973633, 0.6254358291625977, -0.35250383615493774, -0.33996498584747314, 0.9417446255683899, 0.43484118580818176, -0.20127210021018982, -1.414048671722412, 0.545871913433075, 1.2926523685455322, -0.863733172416687, -0.7067729234695435, 0.04785126447677612, -0.8061156272888184, 1.0881820917129517, 0.6081546545028687, 0.37668830156326294, 0.1840098798274994, 1.5140069723129272, 0.7572841048240662, -0.4997444152832031, 0.5456680655479431, 0.5079138875007629, -0.1763731688261032, -2.1708626747131348, -1.1624847650527954, 0.30335643887519836, -0.4352095425128937, -1.5587764978408813, 1.4459460973739624, -1.1449898481369019, -1.0110398530960083, 0.5017942190170288, 0.0149202486500144, 1.4261971712112427, 0.3648906350135803, 1.5685175657272339, 2.2186665534973145, 0.8780462145805359, 0.3497813940048218, 1.3626083135604858, -0.2045617252588272, -0.44924241304397583, 1.8544955253601074, -0.433742880821228, 0.4243740737438202, 1.1180179119110107, -0.2999662160873413, -0.9858995079994202, -0.7696056365966797, -1.1845715045928955, -0.6821370124816895, 1.1632091999053955, 0.059180665761232376, -1.064598560333252, 0.26274582743644714, 1.6271668672561646, 0.09209742397069931, -0.39689624309539795, 0.5542783737182617, 0.4306941032409668, -0.7621564269065857, -0.10702047497034073, -0.9163301587104797, 0.5498737096786499, -0.20813779532909393, -0.32065674662590027, 0.37935295701026917, 0.3953077495098114, 1.2578781843185425, -0.005932999309152365, 0.1321074664592743, 1.1309797763824463, -1.4554808139801025, 1.4530266523361206, -0.6167991161346436, 0.2589583694934845, -2.4033584594726562, 1.43971586227417, -0.6401757001876831, 1.9855496883392334, -2.6221108436584473, 0.400616317987442, -0.6359907984733582, -0.4855768084526062, 0.32966887950897217, -0.31947579979896545, 0.2120124250650406, -0.16718429327011108, -1.1033124923706055, -0.10167964547872543, -0.672844648361206, 0.5785666704177856, 1.030737042427063, 1.2529206275939941, -1.1189584732055664, -0.3492238521575928, -1.7054694890975952, -0.17860691249370575, -0.6878814101219177, 0.25219905376434326, -2.030184030532837, -0.22160033881664276, -1.9390952587127686, -2.4068832397460938, -1.4175653457641602, -0.7981027960777283, 1.0485919713974, 0.12555626034736633, -0.910957396030426, 1.2148962020874023, -0.39750242233276367, -1.8751821517944336, 1.1252480745315552, -2.087620735168457 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
Someone would like to try to dive into tfio to fix this ? Sounds like a good opportunity to learn what are the best ways to load a dataset for TF, and also the connections between Arrow and TF. If we can at least have the Arrow `binary` type working for TF that would be awesome already (issue https://github.com/tensorflow/io/issues/1361) also cc @nateraw in case you'd be interested ;)
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
68
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data Someone would like to try to dive into tfio to fix this ? Sounds like a good opportunity to learn what are the best ways to load a dataset for TF, and also the connections between Arrow and TF. If we can at least have the Arrow `binary` type working for TF that would be awesome already (issue https://github.com/tensorflow/io/issues/1361) also cc @nateraw in case you'd be interested ;)
[ -1.195833683013916, -0.9493011832237244, -0.7456247806549072, 1.4213876724243164, -0.13900268077850342, -1.186187505722046, 0.040112193673849106, -1.1621968746185303, 1.6716281175613403, -0.7714917063713074, 0.29138484597206116, -1.618191123008728, 0.060690201818943024, -0.6097526550292969, -0.7747423648834229, -0.8480083346366882, -0.41268056631088257, -0.8178616166114807, 1.0189902782440186, 2.5167980194091797, 1.2292561531066895, -1.4459465742111206, 2.6927449703216553, 0.7600500583648682, -0.2579980492591858, -0.9964775443077087, 0.4777899980545044, 0.07260739803314209, -1.2110518217086792, -0.48802679777145386, -0.8676856160163879, -0.044417306780815125, -0.5751840472221375, -0.46949782967567444, -0.08014035224914551, 0.327394962310791, -0.2576436996459961, -0.3234952390193939, -0.5979393720626831, -0.7045587301254272, 0.48683416843414307, -0.365081250667572, 1.0000492334365845, -0.2622685730457306, 1.8630646467208862, -0.48577165603637695, 0.41969504952430725, 0.6723273992538452, 1.3395065069198608, 0.20350225269794464, 0.011867360211908817, 0.2664368450641632, 0.4088436961174011, -0.10608017444610596, 0.4815831780433655, 1.1682391166687012, 0.7431501150131226, 0.47331783175468445, 0.6903746128082275, -2.177006721496582, 1.3410274982452393, -1.0575659275054932, 0.29847294092178345, 1.3273367881774902, -0.8815926909446716, 0.4000629186630249, -1.7572262287139893, -0.1367390900850296, 0.5926045179367065, -2.272550344467163, 0.243765190243721, -1.3054488897323608, -0.5891937017440796, 0.9092578291893005, 0.25598132610321045, -1.2068078517913818, 0.32606470584869385, -0.45231103897094727, 1.0306824445724487, 0.458080530166626, 1.2101242542266846, -1.6942827701568604, -0.004383177030831575, -0.307573527097702, 0.08581904321908951, -1.285519003868103, -1.4835325479507446, 0.5366476774215698, 0.6481503844261169, 0.5373330116271973, -0.07060568034648895, 1.0000419616699219, -1.0348190069198608, 0.8321086168289185, -1.0012191534042358, -1.6280467510223389, -1.4037636518478394, -2.2346644401550293, -2.28476881980896, 0.7891864776611328, -0.45440685749053955, -0.611304759979248, 2.085541009902954, -1.0616176128387451, -1.7593913078308105, 1.1996601819992065, 0.3437824845314026, -0.06308292597532272, 2.4444117546081543, 0.12808053195476532, -0.6842596530914307, 0.42368873953819275, -0.7367265820503235, 0.8579460978507996, -0.4530019164085388, 1.4316084384918213, 0.43024295568466187, -1.0428694486618042, 1.593841314315796, -0.4305562376976013, 0.535535454750061, -0.6751536726951599, -0.6127442121505737, -0.7730878591537476, 0.3715299069881439, 1.9146894216537476, -0.35814714431762695, 1.5864547491073608, -0.4022584557533264, -1.521576166152954, -1.546538233757019, 0.8691777586936951, 0.5251442193984985, -0.8786064982414246, 0.06529026478528976, -0.3983227610588074, 0.11350579559803009, 0.027740921825170517, 1.0675653219223022, 1.2560523748397827, 0.6250000596046448, -0.31082749366760254, -0.859724223613739, 0.16739755868911743, -0.16983415186405182, -0.6941134333610535, -1.8647346496582031, -0.2875468134880066, 0.17367464303970337, 0.5694172382354736, -1.2940672636032104, 1.7303463220596313, 0.9295024871826172, 1.9850008487701416, 0.9717232584953308, -0.3393781781196594, 1.454418659210205, -0.015566946938633919, 1.7613812685012817, -0.47796714305877686, 0.7312014698982239, -0.3825588822364807, -1.1174612045288086, 0.8068738579750061, -0.3485622704029083, -2.0045833587646484, -0.7567798495292664, -0.8192632794380188, -0.2320016473531723, -0.7782448530197144, 0.848939061164856, -0.2187787890434265, -1.3400620222091675, 0.2924942374229431, -0.6152889728546143, 0.1656516194343567, -1.186057209968567, 0.37609726190567017, 0.7019478678703308, -0.6342589855194092, 0.0038765333592891693, -0.21454940736293793, -1.2787202596664429, -0.46190282702445984, 0.2810656726360321, 1.851630687713623, -0.7968629002571106, 0.8424107432365417, 1.0715714693069458, -0.6435437202453613, 0.03232915326952934, 0.3399887979030609, -0.3176214098930359, 0.8500754833221436, -1.0393439531326294, -0.42108726501464844, 1.1585721969604492, -0.19413982331752777, -0.5785850286483765, 1.4534116983413696, 0.7295703291893005, -0.9888967275619507, -0.24296452105045319, -0.16873742640018463, -0.8352112174034119, 0.03776564821600914, -1.621260166168213, -0.18817318975925446, 0.2903962731361389, -1.5394901037216187, -0.43395864963531494, -0.2790818512439728, 1.3157976865768433, -0.21545813977718353, 1.4849380254745483, -0.385370135307312, -0.14915797114372253, -0.39698129892349243, -0.43559500575065613, 0.17205651104450226, -0.16083869338035583, -0.5817644596099854, 0.25081366300582886, -0.7863478660583496, 0.4126221537590027, 1.4298869371414185, 0.33137938380241394, 0.03689480572938919, 0.3769340217113495, 1.065073847770691, 0.3912855386734009, -0.09247835725545883, -0.8476386666297913, -1.5239081382751465, 2.0015547275543213, -1.4804036617279053, 2.0423381328582764, 0.8575422763824463, 0.09042473882436752, -1.7771697044372559, -1.8751765489578247, 1.3486883640289307, 1.1805164813995361, 2.306344985961914, 0.5830799341201782, 0.3590083122253418, -0.8299470543861389, -0.5411480665206909, 0.3930542469024658, -1.091500997543335, -0.6829919219017029, 0.10686986893415451, 2.3346965312957764, 1.8032139539718628, -0.5042728185653687, -0.20205436646938324, -1.0148133039474487, 1.3683313131332397, -0.11560820788145065, 0.19272419810295105, 2.0546369552612305, -0.2977384924888611, -1.1292312145233154, 1.267441987991333, -2.428480625152588, 0.08417277038097382, 1.9340846538543701, 0.28263628482818604, 0.10145382583141327, -1.3805298805236816, -0.5457556843757629, -0.29738062620162964, -0.4427465498447418, -1.1649527549743652, 0.5648131370544434, -0.24693536758422852, -0.8433423638343811, -1.5386722087860107, 0.19921983778476715, -1.2422651052474976, -1.5988317728042603, 0.39015209674835205, 1.900808572769165, 2.0182511806488037, -0.8010011911392212, 1.5164210796356201, -0.31027984619140625, 0.15065883100032806, 1.2470430135726929, 1.2315555810928345, 3.1577765941619873, 1.9137136936187744, -1.3418281078338623, 0.5304484367370605, -0.21937935054302216, -0.5046467185020447, 1.112733006477356, -1.1382185220718384, 1.2835402488708496, -0.12779180705547333, -1.1574022769927979, -1.2649047374725342, 0.9675131440162659, 0.48701056838035583, 0.10530510544776917, -0.5708169937133789, 1.1037001609802246, 0.08827580511569977, 1.338918685913086, 0.46455416083335876, -0.3669864237308502, 0.5581083297729492, -0.44333887100219727, -0.5044419765472412, 1.5680586099624634, 0.15130165219306946, -1.4140596389770508, -2.3104166984558105, -0.189618319272995, -0.78432297706604, 0.018043145537376404, -0.6122789978981018, -0.9677512049674988, 1.624726414680481, 0.34919092059135437, -1.3565137386322021, -0.25380659103393555, -0.30282095074653625, -0.5261121392250061, 2.6155569553375244, -1.4523720741271973, -0.24700205028057098, -0.9787020683288574, -0.6233300566673279, 1.634710669517517, -1.1221054792404175, -0.24665972590446472, -0.9198926091194153, -0.5733537673950195, -1.2934774160385132, -0.509026050567627, 0.01059469860047102, -0.8872174024581909, 0.7312625646591187, 0.2686040699481964, -1.0913445949554443, -0.35199129581451416, -0.8380409479141235, 0.8891740441322327, -0.13130679726600647, 0.2301388680934906, 1.8774241209030151, 0.40991055965423584, -0.3984101414680481, 0.6966750621795654, 1.2055861949920654, 0.5915796756744385, -0.633561909198761, 0.17095856368541718, -0.7595071792602539, 0.31609630584716797, -1.37249755859375, 0.3231547772884369, -2.9137392044067383, 0.6462691426277161, -0.019824232906103134, -0.06969041377305984, 0.08220946043729782, -1.3515305519104004, 1.1063556671142578, 2.661641836166382, -1.1187429428100586, 0.4397468566894531, 0.310018926858902, 1.1694259643554688, -1.56862211227417, 0.34013015031814575, -0.39380404353141785, 2.1419947147369385, 0.20182918012142181, 1.2800761461257935, -0.5369690656661987, -2.3244824409484863, 0.5552026033401489, -1.2378522157669067, -1.167419195175171, 0.7795603275299072, -0.903001606464386, 0.02008065953850746, -1.463471531867981, -0.2257014811038971, -0.9185539484024048, -1.2317582368850708, 0.759955644607544, 0.16537968814373016, 0.4777473509311676, -0.673742413520813, 0.34226229786872864, -2.189988136291504, -1.3086258172988892, -0.1966729462146759, -0.9493423104286194, 0.44481000304222107, -0.332794189453125, 0.5701585412025452, -0.12465773522853851, 0.06964151561260223, 0.28495097160339355, 1.3589905500411987, 3.390187978744507, 0.2580239176750183, 0.45165178179740906, -0.19592063128948212, -0.9291822910308838, 1.3909741640090942, 0.9130465984344482, -0.120990090072155, -0.5668848156929016, -1.016161322593689, 1.2337243556976318, 1.941262125968933, 0.9830501079559326, 0.04256385192275047, -0.7531229853630066, -0.6711918115615845, -0.027437537908554077, 0.226488396525383, 0.4492403566837311, 0.9516866207122803, -0.02255014330148697, 0.11652912944555283, 1.3554781675338745, 1.27118980884552, -0.5200858116149902, 0.36103907227516174, -0.8361369371414185, -0.4103330969810486, 0.37809616327285767, 0.33657434582710266, 0.025070078670978546, 0.40544018149375916, -0.937272846698761, -0.27141839265823364, -0.44189825654029846, -0.9392098784446716, -0.7231138944625854, -0.4141841232776642, -0.33559080958366394, 1.6068568229675293, 0.14679060876369476, -0.45603182911872864, -0.013318371027708054, -0.7846624255180359, -0.14012762904167175, -1.039575457572937, 0.260367751121521, -0.02694210410118103, -0.06760583817958832, -0.07703014463186264, 1.8490499258041382, -0.9486405849456787, -2.0355265140533447, 0.28391504287719727, 0.1535494178533554, -0.3854566514492035, 0.23267211019992828, 1.703647494316101, 0.45036986470222473, 1.4876165390014648, 1.2916351556777954, 0.9674618244171143, -0.6116316318511963, -1.2924238443374634, 0.7704273462295532, 0.9736323356628418, -1.3978663682937622, 0.8184232115745544, 0.08604416251182556, -0.5344159603118896, 0.7271784543991089, 1.2217795848846436, 0.45023098587989807, -2.07186222076416, 0.8399471640586853, -0.9652636051177979, 0.7536410093307495, 0.7136048674583435, 0.7001938819885254, 0.27268853783607483, 0.8369315266609192, -1.2302181720733643, -1.1364727020263672, -0.7625378370285034, -0.6428528428077698, 2.022036075592041, -0.2004968523979187, 0.5881968140602112, -0.10305670648813248, -1.319260597229004, -0.08755698800086975, 0.7324543595314026, 0.3661514222621918, -0.46221399307250977, 0.8217258453369141, -0.6456975340843201, -1.1113749742507935, -1.4252797365188599, -0.36974620819091797, -0.9884564280509949, -0.8699999451637268, 1.0520730018615723, 0.8658121824264526, 0.23052126169204712, 1.91166353225708, 0.6251106858253479, 0.2886948883533478, -2.682950019836426, 0.9986554980278015, 0.30834677815437317, -0.17463432252407074, 0.8945282697677612, 0.354932963848114, 0.9511802196502686, 0.09990064054727554, 0.47722142934799194, -2.4177401065826416, 2.2670013904571533, -0.2677106559276581, 0.7468832731246948, -0.020817775279283524, -0.1493140012025833, 1.1337370872497559, 0.5189273357391357, 0.5707349181175232, -1.121457815170288, 0.7108138799667358, -0.548856794834137, 1.179317831993103, 0.960310161113739, -0.7750036120414734, -0.06394315510988235, 1.3522640466690063, 0.48202672600746155, -0.521760106086731, -0.8328746557235718, -0.9383998513221741, 0.9130720496177673, 1.7570371627807617, -0.08805230259895325, -0.007345414720475674, 0.7984540462493896, 0.6957248449325562, -1.3055517673492432, 0.08540777117013931, -0.7355579137802124, -0.8190079927444458, 1.56804621219635, 2.0256450176239014, -0.11375875025987625, -0.21590574085712433, -0.7490300536155701, -1.2656958103179932, 0.81041020154953, -0.035558875650167465, 0.22091467678546906, 0.599651575088501, -0.7062593698501587, 1.163750171661377, 0.9282048344612122, 0.9299833178520203, 0.17224666476249695, 0.24761135876178741, 0.46041905879974365, -0.3594406843185425, -1.0799988508224487, -0.25492313504219055, -1.0783480405807495, -2.499880313873291, 0.4898689091205597, -0.21325546503067017, -1.3875916004180908, 0.019780803471803665, -1.0064551830291748, 0.9043224453926086, -0.5539354085922241, -1.0409982204437256, -1.604600429534912, 0.25348344445228577, -0.13889136910438538, 0.9716838598251343, -1.664523720741272, -0.10584057867527008, 1.1845769882202148, 0.9191157817840576, -0.5898458957672119, 1.0601894855499268, 0.21391916275024414, 1.0127122402191162, 0.91879802942276, -0.41861042380332947, 0.485013872385025, 0.07467014342546463, -1.3283114433288574, 0.4057282507419586, 1.131020426750183, 0.1831190586090088, 1.3540613651275635, -0.5553185939788818, 0.020428642630577087, 0.39812329411506653, -0.5630902051925659, -0.4504094123840332, -0.4897223711013794, 0.719718873500824, 0.09561605006456375, -0.8921841979026794, 0.015550139360129833, -0.17185917496681213, -0.24793097376823425, 0.16246762871742249, -1.560433030128479, -0.23527401685714722, -0.3826586604118347, -0.5314475297927856, -1.2700940370559692, -0.015241880901157856, 1.4401719570159912, -0.7485066652297974, -0.19072313606739044, 0.5437672138214111, 0.4798322319984436, 0.5201373100280762, 0.6300023198127747, -0.6641601324081421, -0.3758816719055176, -0.24036774039268494, -0.337346613407135, 0.3382206857204437, 1.3561962842941284, -0.061156339943408966, -0.9073187708854675, 0.696199893951416, -0.36302003264427185, 0.0756598562002182, 1.9655741453170776, 0.12430184334516525, -0.7999995946884155, 0.3507497310638428, -0.722606360912323, 1.8857946395874023, 1.7653148174285889, 1.346549391746521, -0.1001754030585289, -0.9614425301551819, 0.6363442540168762, -0.33317577838897705, -0.29250118136405945, 0.9433490037918091, 0.45214858651161194, -0.1927972137928009, -1.406477451324463, 0.5012931823730469, 1.2981716394424438, -0.8935865163803101, -0.6827400922775269, 0.00473963376134634, -0.8043514490127563, 1.0608408451080322, 0.6283506751060486, 0.37686288356781006, 0.18683849275112152, 1.5189296007156372, 0.735306441783905, -0.5094679594039917, 0.5136374831199646, 0.49946314096450806, -0.18646535277366638, -2.1851725578308105, -1.1233489513397217, 0.28961873054504395, -0.4229806661605835, -1.5617449283599854, 1.3902162313461304, -1.1420542001724243, -0.9873422384262085, 0.4779902696609497, 0.019169550389051437, 1.4144394397735596, 0.3279734253883362, 1.5432721376419067, 2.196169137954712, 0.846275806427002, 0.3367563784122467, 1.3562732934951782, -0.20862886309623718, -0.4537234306335449, 1.84468674659729, -0.4602605104446411, 0.44928985834121704, 1.09355890750885, -0.3274182677268982, -1.0165226459503174, -0.7890182733535767, -1.183079719543457, -0.6933515667915344, 1.1970797777175903, 0.07010506093502045, -1.0560201406478882, 0.24296368658542633, 1.6387076377868652, 0.10532853752374649, -0.40340790152549744, 0.5360619425773621, 0.44287368655204773, -0.7402094602584839, -0.0995919480919838, -0.9102393984794617, 0.5776757001876831, -0.1567050814628601, -0.3300522267818451, 0.3785172998905182, 0.37514230608940125, 1.220813274383545, 0.018068406730890274, 0.12133532017469406, 1.1297792196273804, -1.4677232503890991, 1.5204918384552002, -0.617081880569458, 0.25269344449043274, -2.403181314468384, 1.4618654251098633, -0.6625000834465027, 1.9891892671585083, -2.6345996856689453, 0.39992350339889526, -0.6494141221046448, -0.49870067834854126, 0.34591856598854065, -0.31263014674186707, 0.19745194911956787, -0.17472395300865173, -1.0565615892410278, -0.10830478370189667, -0.67620450258255, 0.5446438789367676, 1.0529335737228394, 1.2694785594940186, -1.1256312131881714, -0.33090129494667053, -1.736065149307251, -0.1881435662508011, -0.7112007141113281, 0.26394781470298767, -2.074897289276123, -0.18587297201156616, -1.9255543947219849, -2.3886704444885254, -1.4305837154388428, -0.8241063356399536, 1.0419889688491821, 0.10826504975557327, -0.9241212606430054, 1.1837104558944702, -0.4223319888114929, -1.8449915647506714, 1.1217734813690186, -2.1040754318237305 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
> Sounds like a good opportunity to learn what are the best ways to load a dataset for TF The recommended way would likely be a combination of TFRecords and `tf.data`. Exploring the connection between Arrow and TensorFlow is definitely worth pursuing though. But I am not sure about the implications of storing images in a format supported by Arrow. I guess we'll know more once we have at least figured out the support for `binary` type for TFIO. I will spend some time on it and keep this thread updated.
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
91
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data > Sounds like a good opportunity to learn what are the best ways to load a dataset for TF The recommended way would likely be a combination of TFRecords and `tf.data`. Exploring the connection between Arrow and TensorFlow is definitely worth pursuing though. But I am not sure about the implications of storing images in a format supported by Arrow. I guess we'll know more once we have at least figured out the support for `binary` type for TFIO. I will spend some time on it and keep this thread updated.
[ -1.2005469799041748, -0.9705348014831543, -0.7318200469017029, 1.3801801204681396, -0.15742948651313782, -1.2365739345550537, 0.06974848359823227, -1.1571650505065918, 1.7157151699066162, -0.8069224953651428, 0.2978628873825073, -1.6210367679595947, 0.08234178274869919, -0.5916076898574829, -0.772425651550293, -0.875079870223999, -0.4027365446090698, -0.8576956987380981, 1.0477862358093262, 2.5131983757019043, 1.2079027891159058, -1.4578313827514648, 2.675116539001465, 0.7645483016967773, -0.25590747594833374, -1.0051040649414062, 0.49066662788391113, 0.07063271850347519, -1.259893774986267, -0.46775516867637634, -0.8789135813713074, -0.04836886003613472, -0.5824577212333679, -0.4827476441860199, -0.07272683084011078, 0.31590980291366577, -0.2681801915168762, -0.3724888265132904, -0.5669037103652954, -0.7438924908638, 0.46801888942718506, -0.37926894426345825, 1.0279556512832642, -0.27267223596572876, 1.8698163032531738, -0.47008365392684937, 0.44382041692733765, 0.684175968170166, 1.346349835395813, 0.209281325340271, -0.006880147848278284, 0.24189679324626923, 0.4161548912525177, -0.11480545252561569, 0.47197142243385315, 1.1505907773971558, 0.7269454598426819, 0.4447137713432312, 0.6858335733413696, -2.1880557537078857, 1.3421351909637451, -1.0420548915863037, 0.30438047647476196, 1.3258944749832153, -0.8676783442497253, 0.3939463794231415, -1.7494772672653198, -0.13537977635860443, 0.5889668464660645, -2.267733335494995, 0.2179223597049713, -1.3164348602294922, -0.5595595240592957, 0.9431481957435608, 0.2596701383590698, -1.2092578411102295, 0.31657683849334717, -0.42416736483573914, 1.03549325466156, 0.4528367519378662, 1.2163141965866089, -1.7208800315856934, -0.02160084992647171, -0.34050536155700684, 0.13296905159950256, -1.2794666290283203, -1.4669995307922363, 0.5367458462715149, 0.6499318480491638, 0.5391663908958435, -0.06917382776737213, 1.0050115585327148, -1.0163506269454956, 0.8245521783828735, -1.0202540159225464, -1.6168994903564453, -1.3918951749801636, -2.2085752487182617, -2.302011251449585, 0.8057286739349365, -0.46347519755363464, -0.5692819356918335, 2.0902040004730225, -1.0606950521469116, -1.7397972345352173, 1.2222445011138916, 0.2998585104942322, -0.0367160402238369, 2.402855157852173, 0.11851353198289871, -0.7040780186653137, 0.4324106276035309, -0.7498499155044556, 0.8267383575439453, -0.4471440017223358, 1.4190618991851807, 0.40267881751060486, -1.0462297201156616, 1.5704421997070312, -0.4140262007713318, 0.5356998443603516, -0.6971617937088013, -0.5987654328346252, -0.775475025177002, 0.3982539772987366, 1.889369010925293, -0.32617735862731934, 1.5862135887145996, -0.40701431035995483, -1.5196213722229004, -1.569620132446289, 0.8778188824653625, 0.542212188243866, -0.8682668209075928, 0.028760436922311783, -0.3663066029548645, 0.12422450631856918, 0.01177393738180399, 1.0344529151916504, 1.2377723455429077, 0.6577248573303223, -0.30566564202308655, -0.8764117360115051, 0.1824265867471695, -0.16480718553066254, -0.6990396976470947, -1.8505862951278687, -0.2881385087966919, 0.1715518683195114, 0.5765480995178223, -1.278223991394043, 1.7252038717269897, 0.9296054840087891, 2.007986068725586, 0.9697845578193665, -0.34450826048851013, 1.4819916486740112, 0.03606646507978439, 1.786595106124878, -0.4622286856174469, 0.7340654134750366, -0.37222006916999817, -1.1212331056594849, 0.816092312335968, -0.32997018098831177, -2.0032567977905273, -0.7237584590911865, -0.8047733902931213, -0.23798182606697083, -0.7552041411399841, 0.8635852932929993, -0.22888065874576569, -1.3682564496994019, 0.3128677308559418, -0.6200743317604065, 0.1499585062265396, -1.1671297550201416, 0.37490391731262207, 0.725709855556488, -0.6392118334770203, 0.06341992318630219, -0.2294718474149704, -1.2842479944229126, -0.4837856590747833, 0.26896798610687256, 1.836346983909607, -0.7984190583229065, 0.8506239652633667, 1.0836354494094849, -0.634392261505127, 0.00906748604029417, 0.3411663770675659, -0.30844250321388245, 0.8463985323905945, -1.0474203824996948, -0.3853873312473297, 1.163253903388977, -0.2163621485233307, -0.5433225631713867, 1.4280378818511963, 0.692981481552124, -0.9916616082191467, -0.20657284557819366, -0.14438588917255402, -0.8366379141807556, 0.02776847779750824, -1.6305906772613525, -0.16172663867473602, 0.30021238327026367, -1.565469741821289, -0.43410012125968933, -0.27802371978759766, 1.306814193725586, -0.1844056099653244, 1.4574642181396484, -0.3849417269229889, -0.1317109912633896, -0.4018290936946869, -0.4016048312187195, 0.18595828115940094, -0.2124597728252411, -0.5973035097122192, 0.2533176839351654, -0.781069815158844, 0.39923515915870667, 1.4283303022384644, 0.3365178406238556, -0.011642263270914555, 0.3496961295604706, 1.0392874479293823, 0.39400357007980347, -0.07982000708580017, -0.8368614912033081, -1.5148217678070068, 2.011864423751831, -1.4887781143188477, 2.0260372161865234, 0.8615967035293579, 0.09492664039134979, -1.7563520669937134, -1.8844540119171143, 1.3275585174560547, 1.1269937753677368, 2.298774480819702, 0.5608197450637817, 0.3456052243709564, -0.8065645694732666, -0.5177134275436401, 0.39096328616142273, -1.0628207921981812, -0.6986702084541321, 0.09159291535615921, 2.3231112957000732, 1.7649712562561035, -0.47928738594055176, -0.19961416721343994, -0.9878175258636475, 1.407098650932312, -0.10926056653261185, 0.20672115683555603, 2.033862590789795, -0.3186681270599365, -1.12659752368927, 1.2872639894485474, -2.397005319595337, 0.07046728581190109, 1.9154894351959229, 0.2575671374797821, 0.12214966863393784, -1.388853669166565, -0.5823403000831604, -0.29215359687805176, -0.46616238355636597, -1.174476146697998, 0.5285771489143372, -0.28702080249786377, -0.8242589235305786, -1.5484082698822021, 0.2156425565481186, -1.211512804031372, -1.6095103025436401, 0.36158880591392517, 1.9255520105361938, 2.0081980228424072, -0.7933948040008545, 1.543308138847351, -0.3177412450313568, 0.1610923707485199, 1.2404972314834595, 1.1952000856399536, 3.161552906036377, 1.9137481451034546, -1.3260751962661743, 0.5180895924568176, -0.20669856667518616, -0.4811631441116333, 1.0982800722122192, -1.125927448272705, 1.2840334177017212, -0.10084634274244308, -1.1502889394760132, -1.2357277870178223, 0.9464237689971924, 0.504640519618988, 0.1285768449306488, -0.5532013177871704, 1.1090329885482788, 0.08383341133594513, 1.343455195426941, 0.4395250082015991, -0.37052178382873535, 0.587813138961792, -0.43575888872146606, -0.5261357426643372, 1.5527703762054443, 0.15505056083202362, -1.374181866645813, -2.3176872730255127, -0.20741716027259827, -0.7769787311553955, 0.03462328761816025, -0.6145286560058594, -0.9512056112289429, 1.6334125995635986, 0.3695583641529083, -1.3570985794067383, -0.2530598044395447, -0.31731340289115906, -0.5200874209403992, 2.6216461658477783, -1.4203535318374634, -0.24599167704582214, -0.9640529751777649, -0.6101444959640503, 1.6188271045684814, -1.1676214933395386, -0.25358736515045166, -0.9360795617103577, -0.5612669587135315, -1.2792590856552124, -0.534835159778595, 0.008556260727345943, -0.9013577699661255, 0.7444865703582764, 0.29581671953201294, -1.1135388612747192, -0.35286372900009155, -0.8713520169258118, 0.8777990341186523, -0.08558063954114914, 0.2555931806564331, 1.9062633514404297, 0.3913567066192627, -0.4129524827003479, 0.6807064414024353, 1.1838688850402832, 0.589647114276886, -0.6213552355766296, 0.1668306589126587, -0.7644112706184387, 0.2968849241733551, -1.3413690328598022, 0.3355330228805542, -2.9097769260406494, 0.649629533290863, -0.012473112903535366, -0.06194251403212547, 0.08212164044380188, -1.3397047519683838, 1.1500588655471802, 2.6913559436798096, -1.0986714363098145, 0.4343828558921814, 0.3314470648765564, 1.197069764137268, -1.557413101196289, 0.36382749676704407, -0.3765694499015808, 2.1355268955230713, 0.21083511412143707, 1.2748112678527832, -0.4941804111003876, -2.37477970123291, 0.5703059434890747, -1.2417711019515991, -1.2049373388290405, 0.7950926423072815, -0.9235396385192871, -0.020225636661052704, -1.4631403684616089, -0.2397688627243042, -0.8939420580863953, -1.2195454835891724, 0.742443859577179, 0.1714826226234436, 0.4891803562641144, -0.7167264819145203, 0.3316420018672943, -2.175769567489624, -1.322684407234192, -0.199715718626976, -0.9433917999267578, 0.40702301263809204, -0.32306042313575745, 0.5940408110618591, -0.1280355602502823, 0.06794733554124832, 0.2824745774269104, 1.373733639717102, 3.3877902030944824, 0.2617110311985016, 0.45740970969200134, -0.19880253076553345, -0.9237166047096252, 1.392451286315918, 0.9006361961364746, -0.11452510207891464, -0.5674265027046204, -1.0371299982070923, 1.2161505222320557, 1.9599095582962036, 0.9780780076980591, 0.06041359901428223, -0.748272716999054, -0.6930596828460693, -0.011740252375602722, 0.22978226840496063, 0.47690385580062866, 0.9425057172775269, 0.022718094289302826, 0.09474306553602219, 1.393831491470337, 1.251914143562317, -0.5238990783691406, 0.3742241859436035, -0.8323655724525452, -0.4545501172542572, 0.39315956830978394, 0.3192860186100006, 0.017989426851272583, 0.39608532190322876, -0.9334793090820312, -0.24184781312942505, -0.4525616765022278, -0.9301232695579529, -0.6815902590751648, -0.41986802220344543, -0.3222779333591461, 1.6472519636154175, 0.13839946687221527, -0.4558279812335968, -0.029825512319803238, -0.7563450932502747, -0.11983636766672134, -1.0500744581222534, 0.26392316818237305, -0.030991636216640472, -0.06700284779071808, -0.03468804806470871, 1.8333961963653564, -0.9167002439498901, -2.009911060333252, 0.24275149405002594, 0.14129775762557983, -0.36493536829948425, 0.2314271479845047, 1.7040613889694214, 0.4557702839374542, 1.497612714767456, 1.3065048456192017, 0.9765738844871521, -0.6215798854827881, -1.3266775608062744, 0.7665780782699585, 0.9459587931632996, -1.3969205617904663, 0.8346571326255798, 0.10171129554510117, -0.5444225668907166, 0.7284076809883118, 1.2137988805770874, 0.4653124511241913, -2.0930018424987793, 0.8522536158561707, -0.9737799763679504, 0.7844061255455017, 0.7135945558547974, 0.702739417552948, 0.25275716185569763, 0.8384019136428833, -1.2260011434555054, -1.1505036354064941, -0.7551429867744446, -0.6514018177986145, 2.005953550338745, -0.2373921126127243, 0.5945766568183899, -0.10271439701318741, -1.3075147867202759, -0.08905820548534393, 0.7173759937286377, 0.371701180934906, -0.4522395133972168, 0.8168970942497253, -0.6961489915847778, -1.1386991739273071, -1.4351471662521362, -0.369005411863327, -1.0124173164367676, -0.8768262267112732, 1.0812839269638062, 0.8521470427513123, 0.22087164223194122, 1.9062097072601318, 0.6498181223869324, 0.28248167037963867, -2.6830015182495117, 0.9760240316390991, 0.3200056850910187, -0.16078585386276245, 0.9069681167602539, 0.32623258233070374, 0.9383174777030945, 0.09698067605495453, 0.4586472511291504, -2.41308331489563, 2.284895181655884, -0.2896685004234314, 0.7622173428535461, -0.02209578827023506, -0.15076757967472076, 1.1168073415756226, 0.5134493112564087, 0.5733075141906738, -1.1330227851867676, 0.7123042345046997, -0.54500812292099, 1.1641314029693604, 0.9365229606628418, -0.7829376459121704, -0.07641644775867462, 1.3144093751907349, 0.5050011277198792, -0.563033401966095, -0.8299166560173035, -1.0057733058929443, 0.8611226081848145, 1.7714885473251343, -0.10289192199707031, -0.02489263191819191, 0.798065185546875, 0.7054635286331177, -1.305978775024414, 0.06980743259191513, -0.7331721186637878, -0.8350013494491577, 1.5859014987945557, 2.035956859588623, -0.07593759894371033, -0.2267051637172699, -0.741441011428833, -1.2504942417144775, 0.8054336309432983, -0.04851784557104111, 0.1972315013408661, 0.560696542263031, -0.7027797698974609, 1.1760903596878052, 0.9547609686851501, 0.918647825717926, 0.21945372223854065, 0.2334921956062317, 0.44051066040992737, -0.36413633823394775, -1.0670887231826782, -0.22741317749023438, -1.078627109527588, -2.501147747039795, 0.5113228559494019, -0.16817641258239746, -1.4028942584991455, 0.024675674736499786, -1.0114628076553345, 0.9053938984870911, -0.5237239003181458, -1.045637845993042, -1.5763113498687744, 0.2134769856929779, -0.1188259869813919, 0.9507729411125183, -1.6424205303192139, -0.10087680071592331, 1.2079607248306274, 0.9163941144943237, -0.6215603947639465, 1.0562357902526855, 0.19641201198101044, 1.0126529932022095, 0.9428383111953735, -0.44050270318984985, 0.4641367793083191, 0.09700674563646317, -1.3369178771972656, 0.41226664185523987, 1.1163101196289062, 0.16910958290100098, 1.3660261631011963, -0.5686483979225159, 0.0363808199763298, 0.37576666474342346, -0.5393129587173462, -0.437795490026474, -0.5314157009124756, 0.7183877229690552, 0.0628226101398468, -0.8779170513153076, 0.02044980600476265, -0.16552190482616425, -0.2604290246963501, 0.16092894971370697, -1.5640356540679932, -0.24653658270835876, -0.3679126799106598, -0.5474622249603271, -1.2560032606124878, -0.030894357711076736, 1.4737598896026611, -0.7373244762420654, -0.1655537188053131, 0.5543862581253052, 0.4844571650028229, 0.4994531273841858, 0.639488697052002, -0.6495594382286072, -0.4042259156703949, -0.23465731739997864, -0.3643023371696472, 0.32660508155822754, 1.3698878288269043, -0.0778571367263794, -0.9205146431922913, 0.6997189521789551, -0.33711639046669006, 0.054421789944171906, 1.9779471158981323, 0.11232984066009521, -0.7923855781555176, 0.32459259033203125, -0.739488959312439, 1.894107699394226, 1.7835267782211304, 1.369271159172058, -0.12722395360469818, -0.9910835027694702, 0.6600531339645386, -0.35519835352897644, -0.3055345118045807, 0.9690815210342407, 0.45166775584220886, -0.19691744446754456, -1.367442011833191, 0.4962606430053711, 1.2642658948898315, -0.8961942791938782, -0.7079635858535767, 0.030122987926006317, -0.7817327380180359, 1.069838523864746, 0.6391245722770691, 0.38981571793556213, 0.17399589717388153, 1.5352963209152222, 0.7724257707595825, -0.48308995366096497, 0.5266131162643433, 0.5030356049537659, -0.16865916550159454, -2.1645963191986084, -1.1319704055786133, 0.29875248670578003, -0.41860446333885193, -1.558384895324707, 1.4304317235946655, -1.1445754766464233, -1.0175684690475464, 0.48996636271476746, 0.00523850042372942, 1.4245579242706299, 0.3468886613845825, 1.5411275625228882, 2.207761287689209, 0.8688259124755859, 0.32626378536224365, 1.3519998788833618, -0.21988514065742493, -0.46868419647216797, 1.8414673805236816, -0.44060200452804565, 0.4398966133594513, 1.0890297889709473, -0.3117237687110901, -1.0022070407867432, -0.7803311347961426, -1.1750743389129639, -0.6852703094482422, 1.1722840070724487, 0.08039488643407822, -1.05633544921875, 0.28062477707862854, 1.6316298246383667, 0.09039656072854996, -0.3969651460647583, 0.5199272632598877, 0.45971736311912537, -0.7496996521949768, -0.12193268537521362, -0.9374071359634399, 0.5630205869674683, -0.1841004639863968, -0.3649677634239197, 0.38932278752326965, 0.3607505261898041, 1.2395447492599487, 0.017168834805488586, 0.14801573753356934, 1.1566401720046997, -1.4678601026535034, 1.4948904514312744, -0.6390945315361023, 0.26320332288742065, -2.4087891578674316, 1.4446723461151123, -0.7005180716514587, 1.997420072555542, -2.647599220275879, 0.41314297914505005, -0.6478670239448547, -0.4918311536312103, 0.3467218577861786, -0.34141796827316284, 0.19460532069206238, -0.17163003981113434, -1.06912362575531, -0.12787288427352905, -0.6779540181159973, 0.5472362041473389, 1.0081309080123901, 1.2478724718093872, -1.1066259145736694, -0.3351593315601349, -1.6990554332733154, -0.19480785727500916, -0.7016525864601135, 0.27535557746887207, -2.036804437637329, -0.19663771986961365, -1.9397921562194824, -2.4087975025177, -1.4027178287506104, -0.7997493743896484, 1.0325469970703125, 0.10743614286184311, -0.9146048426628113, 1.1841440200805664, -0.4054114818572998, -1.8486213684082031, 1.1227604150772095, -2.1030807495117188 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
I am currently working on a fine-tuning notebook for the TFSegFormer model (Semantic Segmentation). The resolution is high for both the input images and the labels - (512, 512, 3). Here's the [Colab Notebook](https://colab.research.google.com/drive/1jAtR7Z0lYX6m6JsDI5VByh5vFaNhHIbP?usp=sharing) (it's a WIP so please bear that in mind). I think the current implementation of `to_tf_dataset()` does create a bottleneck here since the GPU utilization is quite low.
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
62
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data I am currently working on a fine-tuning notebook for the TFSegFormer model (Semantic Segmentation). The resolution is high for both the input images and the labels - (512, 512, 3). Here's the [Colab Notebook](https://colab.research.google.com/drive/1jAtR7Z0lYX6m6JsDI5VByh5vFaNhHIbP?usp=sharing) (it's a WIP so please bear that in mind). I think the current implementation of `to_tf_dataset()` does create a bottleneck here since the GPU utilization is quite low.
[ -1.2337191104888916, -0.9561799764633179, -0.7174006104469299, 1.3720452785491943, -0.15760262310504913, -1.2467466592788696, 0.07334627956151962, -1.1506224870681763, 1.6947280168533325, -0.7856593132019043, 0.3021049201488495, -1.6348865032196045, 0.05698317661881447, -0.609388530254364, -0.7643539905548096, -0.8596544861793518, -0.4006594717502594, -0.8627495169639587, 1.0565418004989624, 2.497135877609253, 1.2005159854888916, -1.4180887937545776, 2.7103989124298096, 0.7479866147041321, -0.2797621190547943, -1.0022598505020142, 0.4918135404586792, 0.054612915962934494, -1.2695833444595337, -0.4783826172351837, -0.9249770641326904, -0.04851168394088745, -0.5693872570991516, -0.4705274701118469, -0.02579931542277336, 0.2921257019042969, -0.22078770399093628, -0.3429551422595978, -0.5673508644104004, -0.7126322984695435, 0.4787442982196808, -0.4110589325428009, 1.005502700805664, -0.2676161229610443, 1.8649591207504272, -0.4998387396335602, 0.4154925048351288, 0.6970989108085632, 1.383817195892334, 0.19687828421592712, -0.00490579241886735, 0.26139432191848755, 0.4006441533565521, -0.07581713795661926, 0.44710874557495117, 1.1609281301498413, 0.7140709161758423, 0.4713445007801056, 0.687831461429596, -2.2230677604675293, 1.3052184581756592, -1.00691819190979, 0.3081544041633606, 1.3437573909759521, -0.9226568937301636, 0.4007140100002289, -1.7457802295684814, -0.11102999746799469, 0.6170898675918579, -2.284342050552368, 0.2292666733264923, -1.3021601438522339, -0.5538012385368347, 0.9056383967399597, 0.27323028445243835, -1.2079781293869019, 0.30687394738197327, -0.4566515386104584, 1.0418214797973633, 0.4380853772163391, 1.2073854207992554, -1.6977993249893188, -0.042438529431819916, -0.30710381269454956, 0.11749262362718582, -1.2662012577056885, -1.5228897333145142, 0.5478549599647522, 0.674914538860321, 0.5223307609558105, -0.10809864848852158, 1.0305219888687134, -1.015411615371704, 0.8552829623222351, -0.9829870462417603, -1.635697364807129, -1.4197888374328613, -2.2232143878936768, -2.2511067390441895, 0.7801862359046936, -0.4738920032978058, -0.5641805529594421, 2.0889265537261963, -1.0707776546478271, -1.7496122121810913, 1.1959218978881836, 0.29170891642570496, -0.06039278581738472, 2.3916077613830566, 0.12346207350492477, -0.7130539417266846, 0.4127369523048401, -0.7411319017410278, 0.8111416697502136, -0.4431758224964142, 1.3970022201538086, 0.4319310784339905, -1.018149971961975, 1.5484637022018433, -0.4294127821922302, 0.514565110206604, -0.6947815418243408, -0.5731796026229858, -0.7974309325218201, 0.3616337478160858, 1.9095419645309448, -0.35528889298439026, 1.6117641925811768, -0.419341117143631, -1.526738166809082, -1.5550084114074707, 0.8636837005615234, 0.5199002027511597, -0.8753640055656433, 0.056117672473192215, -0.3983202278614044, 0.13597913086414337, 0.014608996920287609, 1.071668028831482, 1.263044834136963, 0.6386874914169312, -0.32452744245529175, -0.8655139207839966, 0.19776512682437897, -0.13066935539245605, -0.6955684423446655, -1.84092378616333, -0.3048255145549774, 0.19081850349903107, 0.597263753414154, -1.2563053369522095, 1.746169924736023, 0.9198972582817078, 1.984785556793213, 0.9611150622367859, -0.36274442076683044, 1.4995019435882568, 0.01801794022321701, 1.771479845046997, -0.4590478539466858, 0.7055421471595764, -0.370886892080307, -1.1602896451950073, 0.8226792216300964, -0.3320975601673126, -1.986375331878662, -0.7158185839653015, -0.8105064034461975, -0.23698604106903076, -0.7729000449180603, 0.8608163595199585, -0.2547003924846649, -1.3667551279067993, 0.26187020540237427, -0.633961021900177, 0.15487714111804962, -1.1597172021865845, 0.37537476420402527, 0.7103192806243896, -0.6354761123657227, 0.013929500244557858, -0.22067980468273163, -1.2792876958847046, -0.447639137506485, 0.257526159286499, 1.8523415327072144, -0.7796633243560791, 0.8746666312217712, 1.0756160020828247, -0.6079427599906921, 0.03425982967019081, 0.32273730635643005, -0.3160865604877472, 0.8461220860481262, -1.07719886302948, -0.3948771357536316, 1.1755238771438599, -0.1803981065750122, -0.5661413669586182, 1.4245041608810425, 0.7495585680007935, -0.9750716686248779, -0.2228875756263733, -0.12654435634613037, -0.8361038565635681, 0.025039128959178925, -1.6288477182388306, -0.1846114993095398, 0.3001328408718109, -1.5378342866897583, -0.45054811239242554, -0.3044131100177765, 1.3087451457977295, -0.16083453595638275, 1.4679203033447266, -0.37670594453811646, -0.16989699006080627, -0.40270739793777466, -0.3983455002307892, 0.2181030511856079, -0.19918093085289001, -0.6139543652534485, 0.2461709976196289, -0.7885603308677673, 0.3520284593105316, 1.4449787139892578, 0.3194207549095154, 0.06009287014603615, 0.39975085854530334, 1.0661711692810059, 0.3708384037017822, -0.08253408968448639, -0.8557013273239136, -1.5467045307159424, 2.016249418258667, -1.4978970289230347, 2.032938241958618, 0.8793686628341675, 0.05384164676070213, -1.772009015083313, -1.854840874671936, 1.3037223815917969, 1.1602675914764404, 2.301893472671509, 0.5579519271850586, 0.3869258463382721, -0.812087893486023, -0.5629598498344421, 0.37310606241226196, -1.0889108180999756, -0.7044304013252258, 0.08848711848258972, 2.336838483810425, 1.7801718711853027, -0.48035937547683716, -0.18366937339305878, -0.9953413605690002, 1.3548945188522339, -0.12782929837703705, 0.1955290138721466, 2.039881467819214, -0.29676294326782227, -1.1402194499969482, 1.2701257467269897, -2.409954309463501, 0.11081717908382416, 1.9492329359054565, 0.2633437514305115, 0.08311976492404938, -1.360873818397522, -0.5577017068862915, -0.2777559459209442, -0.44984322786331177, -1.1924618482589722, 0.530320405960083, -0.2831936180591583, -0.8358932137489319, -1.5254323482513428, 0.18001854419708252, -1.1990554332733154, -1.6165475845336914, 0.35773974657058716, 1.89519202709198, 2.027820110321045, -0.7763609290122986, 1.5021253824234009, -0.3429953157901764, 0.16097070276737213, 1.2183794975280762, 1.2207552194595337, 3.128952741622925, 1.9406870603561401, -1.2951372861862183, 0.5328924059867859, -0.2303619533777237, -0.46797263622283936, 1.0831804275512695, -1.122761607170105, 1.2770426273345947, -0.10844103991985321, -1.1708062887191772, -1.2300424575805664, 0.9852644205093384, 0.5014461278915405, 0.06797389686107635, -0.5439176559448242, 1.1385878324508667, 0.1018187552690506, 1.351717472076416, 0.4831550717353821, -0.36833909153938293, 0.5963751673698425, -0.3926151990890503, -0.5362891554832458, 1.5915123224258423, 0.14826875925064087, -1.3810678720474243, -2.3474690914154053, -0.21569471061229706, -0.8028337955474854, 0.0631738230586052, -0.6420851945877075, -0.9630373120307922, 1.6211645603179932, 0.35560861229896545, -1.3256138563156128, -0.2562381625175476, -0.3081970512866974, -0.5128569006919861, 2.602341413497925, -1.4289512634277344, -0.2501920759677887, -0.9708144664764404, -0.5866857767105103, 1.6189690828323364, -1.1849372386932373, -0.24964037537574768, -0.9325088262557983, -0.568885087966919, -1.251869559288025, -0.5114075541496277, -0.0016095233149826527, -0.8918583989143372, 0.7662529349327087, 0.2585245668888092, -1.1138451099395752, -0.3444070816040039, -0.8289043307304382, 0.8966150879859924, -0.1034056767821312, 0.21397241950035095, 1.913866639137268, 0.38256970047950745, -0.41471990942955017, 0.688546359539032, 1.1669564247131348, 0.6111183166503906, -0.6323494911193848, 0.1539076864719391, -0.7406185269355774, 0.3174954652786255, -1.3565428256988525, 0.31904131174087524, -2.898820638656616, 0.6771149039268494, -0.020423348993062973, -0.038830894976854324, 0.06945215165615082, -1.3649556636810303, 1.0962421894073486, 2.6577506065368652, -1.1293692588806152, 0.43748393654823303, 0.33011603355407715, 1.2098398208618164, -1.5756512880325317, 0.35307368636131287, -0.41052767634391785, 2.14597749710083, 0.21377773582935333, 1.2620885372161865, -0.48169851303100586, -2.361086845397949, 0.5758107304573059, -1.2397822141647339, -1.1561181545257568, 0.776449978351593, -0.9135212302207947, 0.0035594915971159935, -1.455293893814087, -0.2487710416316986, -0.8950290679931641, -1.213276743888855, 0.7282326817512512, 0.15667836368083954, 0.513897180557251, -0.7097981572151184, 0.30540141463279724, -2.1646478176116943, -1.325962781906128, -0.1797230988740921, -0.9444223046302795, 0.45243939757347107, -0.3329010009765625, 0.5986537337303162, -0.10892946273088455, 0.09443587809801102, 0.272591769695282, 1.3947293758392334, 3.38913631439209, 0.2614677846431732, 0.40312638878822327, -0.21144981682300568, -0.9316207766532898, 1.3556469678878784, 0.8899409770965576, -0.12470748275518417, -0.5965158343315125, -1.0274159908294678, 1.2407500743865967, 1.9523096084594727, 0.9687898755073547, 0.07095807790756226, -0.7646187543869019, -0.6755512952804565, -0.004567286930978298, 0.24313268065452576, 0.5044549107551575, 0.9497156143188477, -0.011262921616435051, 0.12489379197359085, 1.4001190662384033, 1.234696865081787, -0.5133327841758728, 0.3673871159553528, -0.8700933456420898, -0.45493391156196594, 0.40914785861968994, 0.29312261939048767, -0.0019574915058910847, 0.4105766713619232, -0.9414699077606201, -0.23785358667373657, -0.4176153838634491, -0.9073691964149475, -0.7194973826408386, -0.40294137597084045, -0.3159829378128052, 1.636382818222046, 0.13552068173885345, -0.46384039521217346, -0.019435163587331772, -0.734674334526062, -0.11824622005224228, -1.0422184467315674, 0.22705206274986267, -0.03216984495520592, -0.06776124984025955, -0.03264027088880539, 1.7905151844024658, -0.9015092253684998, -2.0241804122924805, 0.25922054052352905, 0.1388522833585739, -0.33487221598625183, 0.19626368582248688, 1.7417749166488647, 0.4710228741168976, 1.4785635471343994, 1.287431001663208, 0.9761477708816528, -0.6176000833511353, -1.3271114826202393, 0.7627615332603455, 0.9439117908477783, -1.3738195896148682, 0.8445711731910706, 0.0450388565659523, -0.5491455793380737, 0.7271044254302979, 1.2467960119247437, 0.453288733959198, -2.1163570880889893, 0.8779720664024353, -1.0138823986053467, 0.8152525424957275, 0.716086745262146, 0.7239688038825989, 0.22722278535366058, 0.8596084117889404, -1.2092214822769165, -1.1647467613220215, -0.7468336224555969, -0.6652793288230896, 2.0081369876861572, -0.22083894908428192, 0.5718485713005066, -0.14665865898132324, -1.3062419891357422, -0.09907545894384384, 0.6998259425163269, 0.35606029629707336, -0.4077368676662445, 0.8168467879295349, -0.7241060137748718, -1.1582975387573242, -1.4363617897033691, -0.40439295768737793, -0.9975631833076477, -0.8969311118125916, 1.093835711479187, 0.8621946573257446, 0.2502957284450531, 1.9326542615890503, 0.6195778250694275, 0.2603597342967987, -2.6851158142089844, 0.9750195741653442, 0.3097597062587738, -0.15913641452789307, 0.9256855845451355, 0.30924201011657715, 0.9881448149681091, 0.0969097763299942, 0.45065224170684814, -2.421971321105957, 2.2776029109954834, -0.25818461179733276, 0.7681151628494263, -0.009547053836286068, -0.12159043550491333, 1.088430404663086, 0.5138642191886902, 0.5839702486991882, -1.10833740234375, 0.6887011528015137, -0.5487210154533386, 1.1712875366210938, 0.9885388612747192, -0.8010268807411194, -0.0469195581972599, 1.3429182767868042, 0.4760529100894928, -0.57597815990448, -0.8387063145637512, -1.0065784454345703, 0.8841635584831238, 1.8004170656204224, -0.05278070643544197, 0.016254965215921402, 0.7861992716789246, 0.7022985219955444, -1.2900147438049316, 0.09065640717744827, -0.741437554359436, -0.8219120502471924, 1.5663360357284546, 2.046880006790161, -0.12415602058172226, -0.2200610339641571, -0.7251061201095581, -1.2620270252227783, 0.7892036437988281, -0.0564090833067894, 0.20494632422924042, 0.604651927947998, -0.6923677325248718, 1.1661678552627563, 0.9147171974182129, 0.9397600293159485, 0.21283669769763947, 0.24110230803489685, 0.43074527382850647, -0.32398876547813416, -1.055277705192566, -0.24100865423679352, -1.045810341835022, -2.5280654430389404, 0.457694411277771, -0.17919385433197021, -1.412591576576233, 0.031783852726221085, -1.0009366273880005, 0.8803641200065613, -0.5524161458015442, -1.0418721437454224, -1.5687212944030762, 0.21577726304531097, -0.12245127558708191, 0.9305856227874756, -1.6514149904251099, -0.10383544117212296, 1.196112036705017, 0.9372957944869995, -0.5691612362861633, 1.036985158920288, 0.23130205273628235, 1.0040953159332275, 0.896144688129425, -0.42447736859321594, 0.4772137701511383, 0.09754610806703568, -1.3391246795654297, 0.461955726146698, 1.155957579612732, 0.18087689578533173, 1.3755418062210083, -0.535659670829773, -0.0044354950077831745, 0.4179104268550873, -0.5492197871208191, -0.49272558093070984, -0.48279038071632385, 0.699738085269928, 0.07897420972585678, -0.8899397253990173, 0.014329890720546246, -0.18168872594833374, -0.26756027340888977, 0.17088721692562103, -1.5595096349716187, -0.2605760097503662, -0.39811569452285767, -0.5342371463775635, -1.2736412286758423, -0.03796612471342087, 1.4528721570968628, -0.7322472929954529, -0.19992396235466003, 0.5122298002243042, 0.4932379722595215, 0.5102491974830627, 0.6398663520812988, -0.652924656867981, -0.3967062830924988, -0.2036154866218567, -0.37560945749282837, 0.32081344723701477, 1.3435125350952148, -0.1381843090057373, -0.9180433750152588, 0.6811502575874329, -0.36685696244239807, 0.06515945494174957, 1.9331934452056885, 0.13082589209079742, -0.8060062527656555, 0.2987135648727417, -0.7479105591773987, 1.890340805053711, 1.7347267866134644, 1.3356192111968994, -0.12473635375499725, -0.9430708289146423, 0.6438036561012268, -0.31830480694770813, -0.31870236992836, 0.9406437873840332, 0.45186734199523926, -0.17994223535060883, -1.39092218875885, 0.5148382782936096, 1.282123327255249, -0.8886472582817078, -0.6834989786148071, -0.00459538958966732, -0.800054669380188, 1.0757006406784058, 0.616637647151947, 0.36680707335472107, 0.20342698693275452, 1.5530201196670532, 0.7669277191162109, -0.5194765329360962, 0.5168185830116272, 0.4834786355495453, -0.141198068857193, -2.190685510635376, -1.0807183980941772, 0.30322593450546265, -0.38491129875183105, -1.5654419660568237, 1.4308183193206787, -1.1533515453338623, -0.9964188933372498, 0.4944911599159241, 0.04901530593633652, 1.4143548011779785, 0.3369995653629303, 1.560788869857788, 2.201573371887207, 0.883105456829071, 0.3493606448173523, 1.341386079788208, -0.17303964495658875, -0.42292526364326477, 1.8646507263183594, -0.4282141923904419, 0.43399789929389954, 1.0720415115356445, -0.35867011547088623, -1.004103660583496, -0.7609421610832214, -1.1961314678192139, -0.6723501086235046, 1.1653244495391846, 0.07552638649940491, -1.0650877952575684, 0.2655373513698578, 1.611209750175476, 0.11554202437400818, -0.34944838285446167, 0.5642313361167908, 0.4564960300922394, -0.7184567451477051, -0.09592676907777786, -0.8981335163116455, 0.5328102707862854, -0.1766705960035324, -0.33526650071144104, 0.3929227888584137, 0.3926607370376587, 1.242705225944519, 0.01635943353176117, 0.07747289538383484, 1.1794005632400513, -1.487225890159607, 1.4960240125656128, -0.620360255241394, 0.2590547502040863, -2.4296727180480957, 1.4481121301651, -0.7093826532363892, 1.9944298267364502, -2.643932819366455, 0.40709388256073, -0.6266042590141296, -0.4701921045780182, 0.3550605773925781, -0.3285723626613617, 0.164301335811615, -0.17124800384044647, -1.0903115272521973, -0.08565284311771393, -0.7006016969680786, 0.5487225651741028, 1.0655544996261597, 1.2460740804672241, -1.1133770942687988, -0.3130624294281006, -1.7156100273132324, -0.20009438693523407, -0.7015413045883179, 0.2463463544845581, -2.0706028938293457, -0.2003229558467865, -1.9657461643218994, -2.3922011852264404, -1.370254635810852, -0.8044745326042175, 1.0642305612564087, 0.1346549689769745, -0.9241660833358765, 1.17979896068573, -0.40059342980384827, -1.8320872783660889, 1.1157857179641724, -2.0973076820373535 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
Here's a notebook showing the performance difference: https://colab.research.google.com/gist/sayakpaul/d7ca67c90beb47e354942c9d8c0bd8ef/scratchpad.ipynb. Note that I acknowledge that it's not an apples-to-apples comparison in many aspects (the dataset isn't the same, data serialization format isn't the same, etc.) but this is the best I could do.
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
41
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data Here's a notebook showing the performance difference: https://colab.research.google.com/gist/sayakpaul/d7ca67c90beb47e354942c9d8c0bd8ef/scratchpad.ipynb. Note that I acknowledge that it's not an apples-to-apples comparison in many aspects (the dataset isn't the same, data serialization format isn't the same, etc.) but this is the best I could do.
[ -1.225481390953064, -0.9202879667282104, -0.7397515177726746, 1.4009968042373657, -0.15365605056285858, -1.1699556112289429, 0.04541262984275818, -1.132207989692688, 1.6691762208938599, -0.7669476270675659, 0.29284584522247314, -1.636305809020996, 0.039120569825172424, -0.6035993695259094, -0.7260070443153381, -0.8273324370384216, -0.3807452321052551, -0.8677116632461548, 1.0413705110549927, 2.530630350112915, 1.1777106523513794, -1.457671046257019, 2.7100789546966553, 0.7314072251319885, -0.2722609043121338, -1.037400484085083, 0.48647764325141907, 0.07109661400318146, -1.245854139328003, -0.4755413234233856, -0.9019153118133545, -0.03158775717020035, -0.5953389406204224, -0.4468858242034912, -0.03994293138384819, 0.32059502601623535, -0.24127377569675446, -0.33631035685539246, -0.564083993434906, -0.7362842559814453, 0.45888447761535645, -0.3932936489582062, 0.9739207625389099, -0.26223790645599365, 1.8583388328552246, -0.4883710443973541, 0.4140779972076416, 0.6788769960403442, 1.3562489748001099, 0.21399852633476257, -0.027721069753170013, 0.2659458816051483, 0.4000447392463684, -0.08666263520717621, 0.477287232875824, 1.1486433744430542, 0.7264237999916077, 0.43866467475891113, 0.6509158611297607, -2.2172698974609375, 1.3397713899612427, -1.0208104848861694, 0.2686920166015625, 1.3730591535568237, -0.9175414443016052, 0.4339686334133148, -1.7816139459609985, -0.11787253618240356, 0.6027674674987793, -2.2861838340759277, 0.2448389232158661, -1.3314695358276367, -0.5656611323356628, 0.9426323771476746, 0.2631431221961975, -1.232112169265747, 0.3251423239707947, -0.42553451657295227, 1.0361443758010864, 0.4306710958480835, 1.2213144302368164, -1.7037822008132935, -0.024679671972990036, -0.30289220809936523, 0.11800189316272736, -1.2876580953598022, -1.4829354286193848, 0.5558929443359375, 0.649363100528717, 0.5594797730445862, -0.0849696695804596, 0.9986255764961243, -1.0576249361038208, 0.8434126973152161, -0.9869880080223083, -1.6531686782836914, -1.3936814069747925, -2.236011028289795, -2.305645227432251, 0.8142769932746887, -0.4433506727218628, -0.5411290526390076, 2.0866189002990723, -1.0522558689117432, -1.7462334632873535, 1.176016092300415, 0.34243661165237427, -0.03634875640273094, 2.4332852363586426, 0.13330215215682983, -0.7358539700508118, 0.3918375074863434, -0.7422655820846558, 0.8436477184295654, -0.40540820360183716, 1.4311394691467285, 0.4589175283908844, -0.9823201894760132, 1.5729894638061523, -0.4202214479446411, 0.5172256827354431, -0.688126802444458, -0.5946893095970154, -0.7962450385093689, 0.36848556995391846, 1.9053863286972046, -0.34456896781921387, 1.6100006103515625, -0.39471983909606934, -1.5351054668426514, -1.5347415208816528, 0.8509092926979065, 0.5477016568183899, -0.8988913893699646, 0.05390515550971031, -0.4021914601325989, 0.16717302799224854, 0.005091439932584763, 1.0830585956573486, 1.2548091411590576, 0.6280573606491089, -0.31462398171424866, -0.9133479595184326, 0.17946012318134308, -0.16990366578102112, -0.6762118339538574, -1.8813035488128662, -0.28351786732673645, 0.1800057291984558, 0.6201865673065186, -1.3166165351867676, 1.7263330221176147, 0.9226072430610657, 1.990641713142395, 0.9845044612884521, -0.3462563753128052, 1.5114161968231201, 0.015261096879839897, 1.8038326501846313, -0.46866506338119507, 0.7329679727554321, -0.40068745613098145, -1.1581709384918213, 0.8166049718856812, -0.3083500266075134, -1.9743680953979492, -0.7651951909065247, -0.8302542567253113, -0.2675965428352356, -0.7417740225791931, 0.8444848656654358, -0.2384171485900879, -1.3621662855148315, 0.28953397274017334, -0.5908468961715698, 0.18977461755275726, -1.182129979133606, 0.35233721137046814, 0.708996057510376, -0.606812596321106, 0.029793396592140198, -0.2347596138715744, -1.319901704788208, -0.4578365087509155, 0.25980374217033386, 1.8455151319503784, -0.7521414160728455, 0.9014054536819458, 1.0572136640548706, -0.6503164768218994, 0.020808814093470573, 0.29413220286369324, -0.30608227849006653, 0.8406280875205994, -1.0737560987472534, -0.39853301644325256, 1.1444242000579834, -0.20530274510383606, -0.5650498270988464, 1.4106690883636475, 0.7243903279304504, -1.0006141662597656, -0.255190372467041, -0.14681324362754822, -0.822348415851593, 0.020402364432811737, -1.661391258239746, -0.21356937289237976, 0.32386985421180725, -1.525591492652893, -0.4305247366428375, -0.24537299573421478, 1.3037073612213135, -0.18621988594532013, 1.4734452962875366, -0.3909609019756317, -0.17433348298072815, -0.3845042288303375, -0.42137596011161804, 0.18412484228610992, -0.18356077373027802, -0.6291569471359253, 0.28039243817329407, -0.8150478005409241, 0.3898939788341522, 1.4204832315444946, 0.35687699913978577, -0.0021655294112861156, 0.3960714042186737, 1.0555673837661743, 0.4189017415046692, -0.04750920087099075, -0.8715772032737732, -1.5524622201919556, 2.0208847522735596, -1.4707988500595093, 2.0069098472595215, 0.8562818169593811, 0.07087992131710052, -1.7562146186828613, -1.869547963142395, 1.3296936750411987, 1.1415917873382568, 2.3173446655273438, 0.56174635887146, 0.3888464570045471, -0.7925651669502258, -0.5605675578117371, 0.3703293800354004, -1.062750220298767, -0.7077395915985107, 0.12846744060516357, 2.3645644187927246, 1.7838042974472046, -0.5052762031555176, -0.21152982115745544, -0.9628680348396301, 1.313775658607483, -0.1231650710105896, 0.2405577152967453, 2.085247278213501, -0.3009200394153595, -1.1595954895019531, 1.250416874885559, -2.439462184906006, 0.13847486674785614, 1.966977834701538, 0.3036765158176422, 0.10357490181922913, -1.3836026191711426, -0.569115161895752, -0.2542458772659302, -0.4723268747329712, -1.1705799102783203, 0.5729207992553711, -0.26824554800987244, -0.8487480282783508, -1.5617228746414185, 0.17969268560409546, -1.2307602167129517, -1.6204239130020142, 0.4015081822872162, 1.9202967882156372, 2.029818296432495, -0.7933429479598999, 1.4899704456329346, -0.30933257937431335, 0.1374666392803192, 1.218285083770752, 1.1961536407470703, 3.109978675842285, 1.9087843894958496, -1.3141804933547974, 0.5738345384597778, -0.19503511488437653, -0.45201343297958374, 1.0821256637573242, -1.0968706607818604, 1.242126226425171, -0.11726795136928558, -1.1718204021453857, -1.230179786682129, 0.9366554617881775, 0.4767240881919861, 0.07700085639953613, -0.554764986038208, 1.1342780590057373, 0.10070380568504333, 1.3453903198242188, 0.46937295794487, -0.35517874360084534, 0.5724710822105408, -0.4268806278705597, -0.5107511281967163, 1.5739573240280151, 0.10320572555065155, -1.4110099077224731, -2.3210017681121826, -0.231279194355011, -0.7649173140525818, 0.019506333395838737, -0.636562705039978, -0.9460732340812683, 1.61982262134552, 0.35460272431373596, -1.3218488693237305, -0.2511501610279083, -0.3459322452545166, -0.5165737867355347, 2.582797050476074, -1.4180947542190552, -0.2341209352016449, -0.9679160118103027, -0.5981014370918274, 1.6027729511260986, -1.1310713291168213, -0.24339379370212555, -0.9334906339645386, -0.558832585811615, -1.2826449871063232, -0.500275731086731, 0.011670796200633049, -0.890516459941864, 0.7192627787590027, 0.25918930768966675, -1.0722013711929321, -0.3393971621990204, -0.8491544723510742, 0.8996492028236389, -0.08622138202190399, 0.1842690408229828, 1.8993133306503296, 0.3891054391860962, -0.43009862303733826, 0.7097035646438599, 1.1915472745895386, 0.6113933324813843, -0.6286628842353821, 0.1467834711074829, -0.7421872019767761, 0.3216867446899414, -1.3596735000610352, 0.2958696484565735, -2.901305675506592, 0.660245418548584, -0.007652370259165764, -0.04971897974610329, 0.08618584275245667, -1.3467069864273071, 1.1299461126327515, 2.6395866870880127, -1.1085689067840576, 0.47711947560310364, 0.33057475090026855, 1.1942249536514282, -1.568811297416687, 0.3502770960330963, -0.4219053387641907, 2.1577627658843994, 0.21945394575595856, 1.248583436012268, -0.5115605592727661, -2.347003221511841, 0.5644851922988892, -1.2360237836837769, -1.190343976020813, 0.7806615233421326, -0.950282096862793, 0.03574463352560997, -1.4681527614593506, -0.23782017827033997, -0.9073348045349121, -1.2274364233016968, 0.7423235177993774, 0.15651759505271912, 0.4795214533805847, -0.6838262677192688, 0.32631149888038635, -2.196629047393799, -1.3141981363296509, -0.18630950152873993, -0.9708616137504578, 0.4275180995464325, -0.350752592086792, 0.6037501692771912, -0.10174301266670227, 0.08713996410369873, 0.2544781267642975, 1.392116665840149, 3.3485374450683594, 0.24932962656021118, 0.4331981837749481, -0.19853512942790985, -0.9569984674453735, 1.3822760581970215, 0.9308131337165833, -0.0965421199798584, -0.5815684199333191, -1.0457509756088257, 1.2161844968795776, 1.9866234064102173, 0.9849085807800293, 0.0649423599243164, -0.7744269967079163, -0.6935428977012634, -0.000999406911432743, 0.21790269017219543, 0.5114971399307251, 0.9436535239219666, -0.02523116208612919, 0.11382456123828888, 1.38865327835083, 1.2436424493789673, -0.49543848633766174, 0.3488062918186188, -0.8654195070266724, -0.44533228874206543, 0.3775119483470917, 0.31400758028030396, 0.014394963160157204, 0.42026156187057495, -0.9408188462257385, -0.21763770282268524, -0.4158398509025574, -0.9420721530914307, -0.7302911877632141, -0.4210924804210663, -0.31680023670196533, 1.6463284492492676, 0.15436802804470062, -0.43705010414123535, -0.022197630256414413, -0.7699952721595764, -0.1307891458272934, -1.0596296787261963, 0.24698257446289062, -0.04628759250044823, -0.045255355536937714, -0.05494096875190735, 1.8192909955978394, -0.9327539801597595, -2.0204925537109375, 0.21910661458969116, 0.14685791730880737, -0.3414623737335205, 0.1750662922859192, 1.7561070919036865, 0.4805798828601837, 1.4942492246627808, 1.2988345623016357, 0.9770333170890808, -0.6192370653152466, -1.3209543228149414, 0.7377063035964966, 0.9386058449745178, -1.3716459274291992, 0.8379669785499573, 0.037321802228689194, -0.5309682488441467, 0.7023130655288696, 1.2623012065887451, 0.45663902163505554, -2.087653875350952, 0.87309330701828, -0.9738690853118896, 0.7488781213760376, 0.7064318060874939, 0.7281874418258667, 0.21648238599300385, 0.8433072566986084, -1.2111746072769165, -1.1522005796432495, -0.7525250911712646, -0.6349753141403198, 2.0203473567962646, -0.23149025440216064, 0.586168646812439, -0.11767937242984772, -1.3029791116714478, -0.08928117156028748, 0.7383542656898499, 0.32011136412620544, -0.40485724806785583, 0.8342324495315552, -0.6755374073982239, -1.1456018686294556, -1.4354194402694702, -0.42213675379753113, -0.9791188836097717, -0.876041054725647, 1.075615406036377, 0.8374598622322083, 0.25494757294654846, 1.9291832447052002, 0.6243453621864319, 0.2799482047557831, -2.682178497314453, 0.9649613499641418, 0.3347688317298889, -0.1636597216129303, 0.9217665791511536, 0.3205810487270355, 0.9879984259605408, 0.0793161392211914, 0.47774603962898254, -2.3938894271850586, 2.2601664066314697, -0.27711617946624756, 0.7868738770484924, -0.0054455967620015144, -0.12169335782527924, 1.1066420078277588, 0.5052903294563293, 0.5998331308364868, -1.1397879123687744, 0.7150373458862305, -0.5601468086242676, 1.1373859643936157, 0.9808946251869202, -0.7708116769790649, -0.048442501574754715, 1.3327604532241821, 0.46751827001571655, -0.5407664775848389, -0.8517286777496338, -0.9506257772445679, 0.9104102849960327, 1.8232766389846802, -0.12012621760368347, 0.013517625629901886, 0.7965021133422852, 0.6875690221786499, -1.3136111497879028, 0.058856237679719925, -0.7317253351211548, -0.8014435172080994, 1.5946494340896606, 2.0396525859832764, -0.08509087562561035, -0.24019373953342438, -0.7073690891265869, -1.2702175378799438, 0.7583115100860596, -0.03523469343781471, 0.18788795173168182, 0.6222941875457764, -0.6983659863471985, 1.174521803855896, 0.8706796765327454, 0.9486260414123535, 0.1548045575618744, 0.24864134192466736, 0.42821988463401794, -0.34497079253196716, -1.0754579305648804, -0.2527562975883484, -1.0444961786270142, -2.5256640911102295, 0.48582738637924194, -0.19206860661506653, -1.4221845865249634, 0.0020317984744906425, -1.0129491090774536, 0.8968384265899658, -0.5455284714698792, -1.06202232837677, -1.5651142597198486, 0.25546571612358093, -0.1512468308210373, 0.9550227522850037, -1.669528603553772, -0.14146776497364044, 1.2118736505508423, 0.9291967153549194, -0.6077534556388855, 1.070671558380127, 0.22534431517124176, 1.0135387182235718, 0.8749544024467468, -0.41946449875831604, 0.4681204855442047, 0.09590333700180054, -1.3213084936141968, 0.4382006824016571, 1.1234217882156372, 0.19583041965961456, 1.3759562969207764, -0.5264390707015991, 0.04684395715594292, 0.4123213589191437, -0.5585475564002991, -0.4633861184120178, -0.48116010427474976, 0.7511553168296814, 0.08217406272888184, -0.9032596945762634, -0.005123209673911333, -0.16661891341209412, -0.24129441380500793, 0.1661950796842575, -1.5058646202087402, -0.2639961242675781, -0.3790053129196167, -0.5319883823394775, -1.2794867753982544, -0.008008771575987339, 1.4211113452911377, -0.7516308426856995, -0.20307722687721252, 0.5569899678230286, 0.4695495069026947, 0.5027064681053162, 0.639890730381012, -0.6698172688484192, -0.41442403197288513, -0.22086280584335327, -0.3422810435295105, 0.344462513923645, 1.3307899236679077, -0.08242374658584595, -0.9459645748138428, 0.6847432851791382, -0.3299473226070404, 0.09366384148597717, 1.9495667219161987, 0.06924083828926086, -0.7947584390640259, 0.3048555850982666, -0.7207645773887634, 1.8646764755249023, 1.7275029420852661, 1.3449697494506836, -0.12443116307258606, -0.9766803979873657, 0.6464475393295288, -0.34609270095825195, -0.31182900071144104, 0.9484212398529053, 0.46276766061782837, -0.187893807888031, -1.4277273416519165, 0.4996228814125061, 1.2780392169952393, -0.8939578533172607, -0.6734399199485779, 0.024250708520412445, -0.789509117603302, 1.0885227918624878, 0.5996171832084656, 0.34545427560806274, 0.19879791140556335, 1.5439001321792603, 0.7440109848976135, -0.5092859864234924, 0.53568434715271, 0.46770501136779785, -0.1638806164264679, -2.1731464862823486, -1.1236331462860107, 0.2999698221683502, -0.3902004659175873, -1.5665338039398193, 1.4394028186798096, -1.1419960260391235, -0.9955927133560181, 0.47989267110824585, 0.0446397140622139, 1.3953074216842651, 0.32581228017807007, 1.5714561939239502, 2.18921160697937, 0.8957569599151611, 0.3472225069999695, 1.3607783317565918, -0.19110770523548126, -0.45861488580703735, 1.836047649383545, -0.42675521969795227, 0.43587926030158997, 1.0643324851989746, -0.35034504532814026, -0.995972216129303, -0.7956047058105469, -1.1614906787872314, -0.6709765791893005, 1.1479125022888184, 0.09784848988056183, -1.087303638458252, 0.2662108838558197, 1.6065962314605713, 0.1059316098690033, -0.3613104224205017, 0.557324230670929, 0.4697020649909973, -0.7295257449150085, -0.09433303773403168, -0.8996372818946838, 0.5361417531967163, -0.16421915590763092, -0.3230333626270294, 0.3661273419857025, 0.39857617020606995, 1.2506606578826904, 0.02695794403553009, 0.12210379540920258, 1.1661561727523804, -1.4461134672164917, 1.524442195892334, -0.6033181548118591, 0.29843878746032715, -2.3867759704589844, 1.4285320043563843, -0.7410004138946533, 1.987720251083374, -2.6149096488952637, 0.38901785016059875, -0.6344340443611145, -0.46104344725608826, 0.3106316328048706, -0.3310978412628174, 0.1968187540769577, -0.14901909232139587, -1.074389934539795, -0.10267066955566406, -0.7287331223487854, 0.5609269142150879, 1.047943115234375, 1.2490979433059692, -1.108927845954895, -0.328072190284729, -1.722757339477539, -0.22199149429798126, -0.6952478885650635, 0.23872630298137665, -2.030787467956543, -0.19691137969493866, -1.9733651876449585, -2.404930591583252, -1.4067453145980835, -0.828029215335846, 1.0342098474502563, 0.08828935027122498, -0.9252192974090576, 1.1608343124389648, -0.35489535331726074, -1.8261088132858276, 1.1322462558746338, -2.086270332336426 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
Thanks ! I think the speed difference can be partly explained: you use ds.shuffle in your dataset, which is an exact shuffling (compared to TFDS which does buffer shuffling): it slows down query time by 2x to 10x since it has to play with data that are not contiguous. The rest of the speed difference seems to be caused by image decoding (from 330µs/image to 30ms/image)
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
66
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data Thanks ! I think the speed difference can be partly explained: you use ds.shuffle in your dataset, which is an exact shuffling (compared to TFDS which does buffer shuffling): it slows down query time by 2x to 10x since it has to play with data that are not contiguous. The rest of the speed difference seems to be caused by image decoding (from 330µs/image to 30ms/image)
[ -1.1987193822860718, -0.960554838180542, -0.7342575192451477, 1.4030026197433472, -0.1689555048942566, -1.1838375329971313, 0.03341952711343765, -1.1665546894073486, 1.6520382165908813, -0.7645781636238098, 0.3219526708126068, -1.646088719367981, 0.061838749796152115, -0.5875443816184998, -0.765076220035553, -0.8641282320022583, -0.39724838733673096, -0.8413122892379761, 1.0562325716018677, 2.5238800048828125, 1.2202059030532837, -1.4601593017578125, 2.6738810539245605, 0.7142356038093567, -0.26516851782798767, -0.9962571263313293, 0.5203350186347961, 0.08629485964775085, -1.254289984703064, -0.49482262134552, -0.8895723819732666, -0.07818636298179626, -0.5758185982704163, -0.4513971507549286, -0.042093366384506226, 0.3159204423427582, -0.2099130004644394, -0.3233557641506195, -0.58375483751297, -0.7337003946304321, 0.4938431680202484, -0.39421847462654114, 1.0186612606048584, -0.2698288559913635, 1.857509732246399, -0.4895443618297577, 0.4242181181907654, 0.6853283047676086, 1.3472039699554443, 0.2046724408864975, -0.014743556268513203, 0.28834304213523865, 0.39056867361068726, -0.09754589200019836, 0.45622536540031433, 1.1193925142288208, 0.7297371625900269, 0.4520769417285919, 0.6690179705619812, -2.2266345024108887, 1.3334039449691772, -1.041666030883789, 0.281770259141922, 1.368887186050415, -0.8847174644470215, 0.42978236079216003, -1.7684667110443115, -0.14596296846866608, 0.6277816295623779, -2.251455783843994, 0.23071514070034027, -1.286756992340088, -0.5625019073486328, 0.9533422589302063, 0.22728437185287476, -1.2243517637252808, 0.2968309223651886, -0.46410560607910156, 1.0153319835662842, 0.45368272066116333, 1.224260926246643, -1.6854424476623535, -0.001421638298779726, -0.3389633297920227, 0.0915326178073883, -1.3121957778930664, -1.4570565223693848, 0.5512149930000305, 0.6267961263656616, 0.5076296925544739, -0.06354629248380661, 0.9915645718574524, -1.034416675567627, 0.8441406488418579, -0.9997622966766357, -1.6227177381515503, -1.429573893547058, -2.2385473251342773, -2.2855398654937744, 0.7594863772392273, -0.4666787087917328, -0.5807598829269409, 2.079315423965454, -1.063657522201538, -1.7286186218261719, 1.1699213981628418, 0.3145836889743805, -0.03983120992779732, 2.42771053314209, 0.12122989445924759, -0.6916617155075073, 0.38429948687553406, -0.7375916242599487, 0.8102830052375793, -0.4120148718357086, 1.4291239976882935, 0.3819498121738434, -1.044535756111145, 1.5991698503494263, -0.4593479037284851, 0.520690381526947, -0.6800040602684021, -0.6259241104125977, -0.7749640941619873, 0.36490297317504883, 1.8932247161865234, -0.3532255291938782, 1.604154348373413, -0.4503823518753052, -1.52397882938385, -1.5547512769699097, 0.8645835518836975, 0.5360851883888245, -0.8744550943374634, 0.03705751895904541, -0.3963741958141327, 0.11250558495521545, 0.013269423507153988, 1.0605127811431885, 1.2307969331741333, 0.6013805270195007, -0.3165360987186432, -0.8745851516723633, 0.1783142387866974, -0.16889594495296478, -0.68988436460495, -1.8906456232070923, -0.2752721607685089, 0.1488899290561676, 0.6418167948722839, -1.2833986282348633, 1.7727739810943604, 0.9418590068817139, 2.0082807540893555, 0.9576662182807922, -0.3591621220111847, 1.4536303281784058, 0.015571442432701588, 1.7713209390640259, -0.45918554067611694, 0.7246171832084656, -0.4068858325481415, -1.1443145275115967, 0.8088335394859314, -0.30068036913871765, -1.9931048154830933, -0.7415736317634583, -0.8359320759773254, -0.26948001980781555, -0.7667190432548523, 0.8726440072059631, -0.2051137536764145, -1.3003334999084473, 0.30137142539024353, -0.6338602900505066, 0.17820540070533752, -1.1978766918182373, 0.3719024658203125, 0.717692494392395, -0.6285930871963501, 0.039856839925050735, -0.21770577132701874, -1.2950754165649414, -0.4645911455154419, 0.2720054090023041, 1.8286001682281494, -0.8008095622062683, 0.8888802528381348, 1.0720648765563965, -0.60367351770401, 0.028140578418970108, 0.3040889799594879, -0.33896297216415405, 0.847307562828064, -1.0292052030563354, -0.4102400243282318, 1.1621085405349731, -0.22242437303066254, -0.5949421525001526, 1.469549536705017, 0.7086533904075623, -1.0186944007873535, -0.25042885541915894, -0.16139036417007446, -0.8087894916534424, 0.03474799171090126, -1.6639530658721924, -0.1591641753911972, 0.3258019983768463, -1.5552598237991333, -0.43864667415618896, -0.23802682757377625, 1.3348050117492676, -0.18748609721660614, 1.5054978132247925, -0.3835063874721527, -0.1802949756383896, -0.3947537839412689, -0.40979334712028503, 0.17856109142303467, -0.17672517895698547, -0.6318756341934204, 0.2907148003578186, -0.8116967082023621, 0.3999558985233307, 1.422925353050232, 0.34408068656921387, 0.00439046137034893, 0.3765612840652466, 1.054479718208313, 0.37680912017822266, -0.07741200923919678, -0.8754611611366272, -1.5714601278305054, 2.018153429031372, -1.4894607067108154, 2.054563522338867, 0.8742947578430176, 0.08111325651407242, -1.7900530099868774, -1.8572161197662354, 1.351668119430542, 1.1569643020629883, 2.2698793411254883, 0.6061343550682068, 0.39230698347091675, -0.8228567242622375, -0.5201249122619629, 0.40939846634864807, -1.061272382736206, -0.7042255401611328, 0.11124575883150101, 2.368246078491211, 1.7584736347198486, -0.48633873462677, -0.16406022012233734, -0.9755645394325256, 1.3671650886535645, -0.10818839073181152, 0.23551231622695923, 2.068108320236206, -0.3141937255859375, -1.1391417980194092, 1.2564796209335327, -2.409510612487793, 0.12345381826162338, 1.928802251815796, 0.30100709199905396, 0.11323997378349304, -1.3528748750686646, -0.5158807635307312, -0.313262015581131, -0.42681729793548584, -1.156251311302185, 0.5428145527839661, -0.24798882007598877, -0.8329259157180786, -1.530518889427185, 0.19127579033374786, -1.246079921722412, -1.5980801582336426, 0.42199450731277466, 1.8680405616760254, 2.051990032196045, -0.7933088541030884, 1.4887771606445312, -0.3184123635292053, 0.15043409168720245, 1.2262723445892334, 1.191450834274292, 3.1313276290893555, 1.9355870485305786, -1.3276305198669434, 0.522209107875824, -0.1735759973526001, -0.4996641278266907, 1.1061840057373047, -1.1141141653060913, 1.287794589996338, -0.12797442078590393, -1.1959311962127686, -1.2430976629257202, 0.9519157409667969, 0.4985907971858978, 0.09913203120231628, -0.5770848989486694, 1.1282789707183838, 0.11699720472097397, 1.3518801927566528, 0.46795976161956787, -0.36792129278182983, 0.5805785655975342, -0.4325593411922455, -0.5224224328994751, 1.578418493270874, 0.1412208378314972, -1.4312150478363037, -2.3238577842712402, -0.2333322912454605, -0.79372239112854, 0.043533410876989365, -0.638175368309021, -0.9723705649375916, 1.6278780698776245, 0.37019050121307373, -1.3242111206054688, -0.26445600390434265, -0.337240606546402, -0.5387903451919556, 2.6255369186401367, -1.4545118808746338, -0.23219753801822662, -0.9844668507575989, -0.6251823902130127, 1.6172102689743042, -1.1465896368026733, -0.2475038766860962, -0.9451571106910706, -0.5991225242614746, -1.274526596069336, -0.524033784866333, 0.027799393981695175, -0.8910439610481262, 0.7625676393508911, 0.26205727458000183, -1.0719568729400635, -0.3418077528476715, -0.854424238204956, 0.8853752017021179, -0.1286868304014206, 0.22305244207382202, 1.8703876733779907, 0.41670161485671997, -0.4284147024154663, 0.6811872124671936, 1.2004481554031372, 0.6225717663764954, -0.6552514433860779, 0.14836300909519196, -0.7604684829711914, 0.32407018542289734, -1.3426430225372314, 0.29231134057044983, -2.876213550567627, 0.6400905847549438, 0.000581507571041584, -0.04898760840296745, 0.09812197834253311, -1.3421822786331177, 1.1132508516311646, 2.6391992568969727, -1.1367886066436768, 0.4520494043827057, 0.3292774558067322, 1.1421903371810913, -1.5788238048553467, 0.35843586921691895, -0.38932836055755615, 2.1472651958465576, 0.19644701480865479, 1.2662547826766968, -0.5170173048973083, -2.3306593894958496, 0.5666335225105286, -1.2342195510864258, -1.159469723701477, 0.7657817006111145, -0.924007773399353, 0.0042289551347494125, -1.4802709817886353, -0.21043482422828674, -0.9295362234115601, -1.253878116607666, 0.7259663343429565, 0.1604684442281723, 0.47510623931884766, -0.6573883891105652, 0.3050270974636078, -2.203090190887451, -1.3250583410263062, -0.21998868882656097, -0.9535146355628967, 0.45246681571006775, -0.31436872482299805, 0.6337436437606812, -0.11556300520896912, 0.09826480597257614, 0.3054267466068268, 1.35982346534729, 3.394960403442383, 0.2732231914997101, 0.4393874406814575, -0.2358594834804535, -0.9365628361701965, 1.3896831274032593, 0.9331024885177612, -0.10082421451807022, -0.5556342005729675, -1.0146427154541016, 1.1961092948913574, 1.9652174711227417, 0.9930294156074524, 0.061753060668706894, -0.7914437055587769, -0.6729718446731567, -0.04758823662996292, 0.24982202053070068, 0.49619433283805847, 0.9328044652938843, -0.02223142609000206, 0.1402697116136551, 1.3567657470703125, 1.2526627779006958, -0.5144565105438232, 0.32641154527664185, -0.8317303657531738, -0.4094751179218292, 0.4070693552494049, 0.3191501498222351, 0.02159222587943077, 0.42411771416664124, -0.9044022560119629, -0.24789215624332428, -0.4241490662097931, -0.9487600922584534, -0.7040828466415405, -0.42133182287216187, -0.32565852999687195, 1.6313660144805908, 0.12627746164798737, -0.44312918186187744, 0.0014121197164058685, -0.7627339959144592, -0.11179173737764359, -1.0596065521240234, 0.25681281089782715, -0.01016896590590477, -0.0537266843020916, -0.06813300400972366, 1.8333861827850342, -0.9415721297264099, -2.0429210662841797, 0.28767991065979004, 0.1597050130367279, -0.36904963850975037, 0.21987572312355042, 1.712986707687378, 0.4544003903865814, 1.4709486961364746, 1.2840921878814697, 0.9727447628974915, -0.6400232911109924, -1.300909399986267, 0.7467886209487915, 0.9856718182563782, -1.4025992155075073, 0.8316730856895447, 0.07266106456518173, -0.5250235199928284, 0.7126156687736511, 1.2234598398208618, 0.47306469082832336, -2.0884833335876465, 0.8765163421630859, -0.9563146829605103, 0.8038831353187561, 0.7144713401794434, 0.7093114852905273, 0.23784273862838745, 0.8251662254333496, -1.2041963338851929, -1.103643536567688, -0.7381362318992615, -0.6336054801940918, 2.003967046737671, -0.24110640585422516, 0.5824592709541321, -0.13783159852027893, -1.3097326755523682, -0.0777246505022049, 0.72540682554245, 0.3469848930835724, -0.42502570152282715, 0.8336089253425598, -0.6340392827987671, -1.131162405014038, -1.422033429145813, -0.3883598744869232, -0.9860242605209351, -0.8787732720375061, 1.104399561882019, 0.8219555020332336, 0.22591471672058105, 1.935193419456482, 0.6100518107414246, 0.25688502192497253, -2.6756608486175537, 0.9952530264854431, 0.30249229073524475, -0.17780214548110962, 0.9359179735183716, 0.3304515480995178, 0.9689568281173706, 0.0653156116604805, 0.4885670840740204, -2.417426824569702, 2.3016061782836914, -0.25599560141563416, 0.773952305316925, -0.002941753715276718, -0.14461606740951538, 1.109007477760315, 0.5491472482681274, 0.532853364944458, -1.125855803489685, 0.7239937782287598, -0.5630210638046265, 1.15566885471344, 0.9418593049049377, -0.7908642292022705, -0.06038866192102432, 1.3169617652893066, 0.47553426027297974, -0.5380640029907227, -0.8692792057991028, -0.9381614923477173, 0.9073403477668762, 1.767034649848938, -0.09803052991628647, -0.008216076530516148, 0.7965028882026672, 0.696561872959137, -1.2913529872894287, 0.11187949776649475, -0.7203084826469421, -0.81639564037323, 1.5435938835144043, 2.022484540939331, -0.07444117218255997, -0.21216028928756714, -0.7432168126106262, -1.2588919401168823, 0.7963816523551941, -0.06529541313648224, 0.23635393381118774, 0.5667280554771423, -0.6928346753120422, 1.1966972351074219, 0.9227757453918457, 0.9040700197219849, 0.17514045536518097, 0.2291935235261917, 0.3999760150909424, -0.33025065064430237, -1.045607566833496, -0.23556414246559143, -1.0518392324447632, -2.5098044872283936, 0.4804910719394684, -0.20456039905548096, -1.382344126701355, -0.009394599124789238, -1.0108466148376465, 0.9162972569465637, -0.5366742014884949, -1.0602799654006958, -1.6096845865249634, 0.21121801435947418, -0.14579933881759644, 0.983221709728241, -1.6526013612747192, -0.12657511234283447, 1.19196617603302, 0.9052943587303162, -0.6091511249542236, 1.08087158203125, 0.20875799655914307, 1.0104460716247559, 0.8865938782691956, -0.3891238272190094, 0.4908943474292755, 0.09862437844276428, -1.3431638479232788, 0.3972170650959015, 1.1161679029464722, 0.1830197125673294, 1.3504666090011597, -0.5292942523956299, 0.05185773968696594, 0.38705843687057495, -0.5169203877449036, -0.4724423587322235, -0.5016262531280518, 0.7331019043922424, 0.07004988193511963, -0.8728182911872864, 0.04181220754981041, -0.1799532175064087, -0.24774742126464844, 0.12767134606838226, -1.5405622720718384, -0.2508106529712677, -0.38051390647888184, -0.5469706654548645, -1.2594832181930542, -0.04752560332417488, 1.4527392387390137, -0.7424595952033997, -0.1746290773153305, 0.5268039703369141, 0.48915204405784607, 0.5152427554130554, 0.6711361408233643, -0.6358036994934082, -0.4116734266281128, -0.202001690864563, -0.2981421649456024, 0.34806495904922485, 1.3515958786010742, -0.07729749381542206, -0.9200432896614075, 0.6893743276596069, -0.3439895808696747, 0.082051582634449, 1.9794886112213135, 0.12861675024032593, -0.8102079033851624, 0.3384970724582672, -0.7282819747924805, 1.8741519451141357, 1.734347939491272, 1.3294185400009155, -0.13044293224811554, -0.9916034936904907, 0.6581571698188782, -0.3236916661262512, -0.2924024164676666, 0.9366863965988159, 0.43643927574157715, -0.22455361485481262, -1.4151899814605713, 0.5007506012916565, 1.3013944625854492, -0.8792129158973694, -0.6880621314048767, 0.05590512230992317, -0.8143957257270813, 1.046934723854065, 0.6169435977935791, 0.37227511405944824, 0.2192595899105072, 1.4872888326644897, 0.7395486831665039, -0.5209930539131165, 0.5277621150016785, 0.48187869787216187, -0.1921793669462204, -2.156312942504883, -1.1328343152999878, 0.33907705545425415, -0.4362025856971741, -1.539388656616211, 1.423564076423645, -1.1773312091827393, -0.9992683529853821, 0.5092576146125793, 0.0384204238653183, 1.3999862670898438, 0.3353230953216553, 1.5799822807312012, 2.190973997116089, 0.8874770402908325, 0.3487808108329773, 1.3537824153900146, -0.14754903316497803, -0.42491835355758667, 1.849076747894287, -0.4510723352432251, 0.43819180130958557, 1.1188726425170898, -0.33082374930381775, -1.0193581581115723, -0.7836850881576538, -1.1756389141082764, -0.7078826427459717, 1.1878180503845215, 0.08432512730360031, -1.0589168071746826, 0.24978357553482056, 1.6350035667419434, 0.10625093430280685, -0.3807227909564972, 0.5073512196540833, 0.42739227414131165, -0.7791343331336975, -0.10007350891828537, -0.9180485010147095, 0.5468445420265198, -0.18585258722305298, -0.3092784285545349, 0.3905485272407532, 0.4209598898887634, 1.2576892375946045, 0.011175950057804585, 0.12139035016298294, 1.1612330675125122, -1.4442437887191772, 1.5225367546081543, -0.6006715297698975, 0.24460318684577942, -2.3789267539978027, 1.4530344009399414, -0.6509891748428345, 1.989050269126892, -2.6420440673828125, 0.3850400149822235, -0.6702308058738708, -0.47349032759666443, 0.3280033767223358, -0.2796485722064972, 0.20580483973026276, -0.18499749898910522, -1.0780072212219238, -0.13103534281253815, -0.6998888254165649, 0.5541949272155762, 1.0575308799743652, 1.2331658601760864, -1.1156712770462036, -0.36547771096229553, -1.7314988374710083, -0.21451278030872345, -0.7219831347465515, 0.27111995220184326, -2.0494933128356934, -0.22621235251426697, -1.9326276779174805, -2.4139328002929688, -1.430300235748291, -0.7989570498466492, 1.0731676816940308, 0.0941094160079956, -0.9134173393249512, 1.1637835502624512, -0.41460785269737244, -1.839392066001892, 1.0719585418701172, -2.1134941577911377 ]
https://github.com/huggingface/datasets/issues/4542
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ?
Fair enough. Can do one without shuffling too. But it's an important one to consider I guess.
To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data
694
17
[to_tf_dataset] Use Feather for better compatibility with TensorFlow ? To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory. It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library. Here are a few points to explore - [ ] check the performance of ArrowFeatherDataset in tf.data - [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc. We would also need to implement sharding when loading a dataset (this will be done anyway for #546) cc @Rocketknight1 @gante feel free to comment in case I missed anything ! I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.data Fair enough. Can do one without shuffling too. But it's an important one to consider I guess.
[ -1.205572247505188, -0.9368472099304199, -0.7303879261016846, 1.4200966358184814, -0.14440101385116577, -1.185052752494812, 0.054472021758556366, -1.1502330303192139, 1.6670747995376587, -0.7672839164733887, 0.3200955390930176, -1.6494250297546387, 0.0436592660844326, -0.6144129633903503, -0.7481405735015869, -0.909410834312439, -0.3975435793399811, -0.825855016708374, 1.0439250469207764, 2.5345401763916016, 1.176912784576416, -1.445064902305603, 2.6606132984161377, 0.7257475852966309, -0.2782001793384552, -1.0249617099761963, 0.4996946454048157, 0.11427294462919235, -1.213074803352356, -0.4718768000602722, -0.8553283214569092, -0.08280925452709198, -0.5807411670684814, -0.45172643661499023, -0.05180557072162628, 0.3096143305301666, -0.2222675234079361, -0.32954561710357666, -0.5533719062805176, -0.7445061802864075, 0.4777440130710602, -0.4180602431297302, 0.9941021800041199, -0.27272891998291016, 1.8660759925842285, -0.48945724964141846, 0.4586518704891205, 0.6934093236923218, 1.3578696250915527, 0.21978949010372162, 0.003170267678797245, 0.2760973572731018, 0.3997185230255127, -0.12124159187078476, 0.4440995156764984, 1.0936353206634521, 0.7014012932777405, 0.43518251180648804, 0.6607499718666077, -2.2024245262145996, 1.3209260702133179, -1.064163088798523, 0.27829182147979736, 1.3653219938278198, -0.9000982046127319, 0.41924363374710083, -1.7527198791503906, -0.13721910119056702, 0.6479305028915405, -2.2729241847991943, 0.23049910366535187, -1.2993054389953613, -0.5644782781600952, 0.9155436158180237, 0.2777462899684906, -1.2331054210662842, 0.2988717555999756, -0.4297459125518799, 1.0246623754501343, 0.4689156413078308, 1.2166928052902222, -1.7088686227798462, 0.013647994957864285, -0.3176262080669403, 0.09005239605903625, -1.3152573108673096, -1.4285441637039185, 0.5348833203315735, 0.6518478393554688, 0.529477059841156, -0.05604701116681099, 0.9689825177192688, -1.0256057977676392, 0.8439178466796875, -1.0101203918457031, -1.6182591915130615, -1.4183992147445679, -2.275686264038086, -2.3192672729492188, 0.8066147565841675, -0.44546958804130554, -0.6075676083564758, 2.0722923278808594, -1.0451710224151611, -1.7232520580291748, 1.239394187927246, 0.33559420704841614, -0.0508895181119442, 2.4443342685699463, 0.11779985576868057, -0.711805522441864, 0.38927778601646423, -0.7762464284896851, 0.8183267712593079, -0.4499396085739136, 1.4405429363250732, 0.4407375752925873, -1.0436917543411255, 1.5715628862380981, -0.4305897057056427, 0.5178972482681274, -0.6821300387382507, -0.6041164398193359, -0.7983107566833496, 0.39846271276474, 1.901137351989746, -0.32914936542510986, 1.6160622835159302, -0.4072694778442383, -1.490544319152832, -1.5462201833724976, 0.8540967702865601, 0.5226444602012634, -0.8844113945960999, 0.06652454286813736, -0.3815307319164276, 0.15166401863098145, 0.014457023702561855, 1.0403934717178345, 1.23287832736969, 0.5984651446342468, -0.31825196743011475, -0.9021304845809937, 0.20337679982185364, -0.17312298715114594, -0.7046859264373779, -1.8861210346221924, -0.2944573163986206, 0.17491468787193298, 0.5858107209205627, -1.3155007362365723, 1.718397855758667, 0.9214386343955994, 2.014004945755005, 0.9394386410713196, -0.34868356585502625, 1.4949467182159424, -0.028423309326171875, 1.784062147140503, -0.46140164136886597, 0.7561877369880676, -0.38942259550094604, -1.119286060333252, 0.795143723487854, -0.31753596663475037, -1.9899753332138062, -0.791083574295044, -0.8427855372428894, -0.248600572347641, -0.7620389461517334, 0.8559683561325073, -0.22495770454406738, -1.3525536060333252, 0.3023436367511749, -0.6268771886825562, 0.17861665785312653, -1.2051783800125122, 0.38784950971603394, 0.7098246216773987, -0.6073858141899109, 0.009996951557695866, -0.22744812071323395, -1.304527997970581, -0.4661926329135895, 0.2558785378932953, 1.852847695350647, -0.7823137044906616, 0.8884642720222473, 1.0567538738250732, -0.6349015831947327, 0.02298363670706749, 0.3052723705768585, -0.3020806908607483, 0.8380477428436279, -1.0298683643341064, -0.42003628611564636, 1.1958048343658447, -0.2371676117181778, -0.5933547616004944, 1.4518954753875732, 0.7513132095336914, -0.9845138192176819, -0.23682332038879395, -0.19115516543388367, -0.7775768637657166, 0.04030406475067139, -1.6569854021072388, -0.17225980758666992, 0.3062871992588043, -1.5118672847747803, -0.4259888231754303, -0.24012599885463715, 1.3302879333496094, -0.21374136209487915, 1.487866759300232, -0.4144217371940613, -0.13509298861026764, -0.42121344804763794, -0.41798272728919983, 0.20079034566879272, -0.2021864950656891, -0.6279605627059937, 0.28791680932044983, -0.7698900103569031, 0.42502880096435547, 1.3803449869155884, 0.33518150448799133, 0.042333751916885376, 0.3654670715332031, 1.0571173429489136, 0.364765465259552, -0.05557595193386078, -0.8632034063339233, -1.545190453529358, 2.020871639251709, -1.477838158607483, 2.049105644226074, 0.8832430839538574, 0.06925996392965317, -1.7246659994125366, -1.8516079187393188, 1.3329885005950928, 1.1755911111831665, 2.2660694122314453, 0.5726568102836609, 0.3679256737232208, -0.822008490562439, -0.5369919538497925, 0.34154748916625977, -1.1107476949691772, -0.672956109046936, 0.1179514154791832, 2.3507440090179443, 1.7364771366119385, -0.47976380586624146, -0.1627357453107834, -1.001318335533142, 1.361485242843628, -0.10323533415794373, 0.21965304017066956, 2.0929558277130127, -0.3019106388092041, -1.161325216293335, 1.2359603643417358, -2.4345285892486572, 0.08866900950670242, 1.9342771768569946, 0.30553701519966125, 0.1014026403427124, -1.3698893785476685, -0.5462119579315186, -0.3247475028038025, -0.43248704075813293, -1.143318772315979, 0.55002760887146, -0.2515225410461426, -0.8405045866966248, -1.52387535572052, 0.20316924154758453, -1.2110099792480469, -1.5955767631530762, 0.3911789655685425, 1.8768576383590698, 2.0130038261413574, -0.7839315533638, 1.5080327987670898, -0.29072606563568115, 0.15043343603610992, 1.2239289283752441, 1.2223269939422607, 3.1076929569244385, 1.928985834121704, -1.3007007837295532, 0.5100677609443665, -0.19800244271755219, -0.4898616671562195, 1.106222152709961, -1.1126025915145874, 1.281021237373352, -0.07185986638069153, -1.1719716787338257, -1.2714275121688843, 0.9395368695259094, 0.4899354577064514, 0.0695759579539299, -0.5959283113479614, 1.107558012008667, 0.10071855038404465, 1.3655200004577637, 0.44605064392089844, -0.3295637369155884, 0.561847448348999, -0.4546763598918915, -0.5234146118164062, 1.5991648435592651, 0.139070063829422, -1.4405139684677124, -2.335196018218994, -0.23827585577964783, -0.7671929597854614, 0.0033049536868929863, -0.6422132849693298, -0.9789910912513733, 1.63669753074646, 0.3618358075618744, -1.3497591018676758, -0.24438518285751343, -0.3176797330379486, -0.5488789081573486, 2.6419479846954346, -1.4201991558074951, -0.22697344422340393, -0.9538959860801697, -0.6210708022117615, 1.6461105346679688, -1.153367519378662, -0.21753981709480286, -0.9465276598930359, -0.5826148986816406, -1.267141342163086, -0.5156245827674866, -0.002281222492456436, -0.9239044189453125, 0.707943320274353, 0.27708718180656433, -1.107067584991455, -0.37740764021873474, -0.8389856219291687, 0.8988643288612366, -0.08681808412075043, 0.25114041566848755, 1.8594058752059937, 0.4214687943458557, -0.3970624506473541, 0.6619234085083008, 1.204507827758789, 0.6157814264297485, -0.6447152495384216, 0.15511885285377502, -0.7456784844398499, 0.3083731532096863, -1.3319218158721924, 0.32863399386405945, -2.9032516479492188, 0.6400354504585266, -0.006135526113212109, -0.07432542741298676, 0.08264945447444916, -1.3307710886001587, 1.1711431741714478, 2.676518678665161, -1.1113454103469849, 0.4522208571434021, 0.31716838479042053, 1.1701408624649048, -1.5747071504592896, 0.37564611434936523, -0.3944965600967407, 2.1969010829925537, 0.21462976932525635, 1.264280080795288, -0.5203074216842651, -2.3572769165039062, 0.5774028301239014, -1.2385634183883667, -1.1833422183990479, 0.7659729719161987, -0.9680113792419434, 0.011448717676103115, -1.452494502067566, -0.21800322830677032, -0.891613781452179, -1.2309162616729736, 0.7674469351768494, 0.15755337476730347, 0.5006158351898193, -0.6608713269233704, 0.32300251722335815, -2.245695114135742, -1.338700294494629, -0.23361338675022125, -0.9612112641334534, 0.4391149580478668, -0.31089088320732117, 0.6040834188461304, -0.10665922611951828, 0.0805940106511116, 0.29021820425987244, 1.3896887302398682, 3.3491976261138916, 0.28837087750434875, 0.4715365767478943, -0.17652548849582672, -0.9473304152488708, 1.374006748199463, 0.8935921788215637, -0.11434004455804825, -0.5613195896148682, -1.0134892463684082, 1.225480079650879, 1.9746835231781006, 1.0070710182189941, 0.06798332929611206, -0.7627859711647034, -0.6598069667816162, -0.018546372652053833, 0.2414831668138504, 0.4888530373573303, 0.9138134121894836, -0.05321751907467842, 0.12643419206142426, 1.3824119567871094, 1.268746256828308, -0.5479146242141724, 0.3433825969696045, -0.848152756690979, -0.4184386432170868, 0.4004562199115753, 0.2948281466960907, 0.01637175679206848, 0.43400004506111145, -0.8890601396560669, -0.2301570177078247, -0.4063560366630554, -0.9128832221031189, -0.6988721489906311, -0.45632609724998474, -0.3493630290031433, 1.6773269176483154, 0.1343008577823639, -0.4349190294742584, -0.0017995159141719341, -0.7749845385551453, -0.11035072058439255, -1.0816495418548584, 0.21673975884914398, -0.008713455870747566, -0.04815097525715828, -0.049026209861040115, 1.8540838956832886, -0.9533039331436157, -2.0464468002319336, 0.24884001910686493, 0.15595832467079163, -0.38678526878356934, 0.20079365372657776, 1.7375013828277588, 0.44999682903289795, 1.4999607801437378, 1.2698159217834473, 0.9864547848701477, -0.6544917821884155, -1.3315742015838623, 0.7475729584693909, 0.979120135307312, -1.3586137294769287, 0.8730229139328003, 0.09031061083078384, -0.5137130618095398, 0.6903665661811829, 1.2356243133544922, 0.46141481399536133, -2.0742290019989014, 0.8912485837936401, -0.9970032572746277, 0.8058825731277466, 0.717532753944397, 0.7113671898841858, 0.226859912276268, 0.8560698628425598, -1.2031567096710205, -1.1272085905075073, -0.7943965792655945, -0.6354572176933289, 2.014429807662964, -0.22232602536678314, 0.5803574919700623, -0.12344291806221008, -1.2960139513015747, -0.05639003589749336, 0.7196324467658997, 0.3602985739707947, -0.40138667821884155, 0.8473644852638245, -0.6745679378509521, -1.1685495376586914, -1.463210940361023, -0.3780601918697357, -0.9692240953445435, -0.885512113571167, 1.1050342321395874, 0.8203085064888, 0.21228626370429993, 1.9068717956542969, 0.6345710754394531, 0.28120070695877075, -2.706456184387207, 0.9968400597572327, 0.2868787944316864, -0.1699696034193039, 0.8719931840896606, 0.3403470814228058, 0.9899167418479919, 0.07696013152599335, 0.45105162262916565, -2.4324939250946045, 2.2599427700042725, -0.2844659388065338, 0.7480465769767761, 0.02123534306883812, -0.10049998760223389, 1.078037142753601, 0.5046259760856628, 0.567655622959137, -1.1271461248397827, 0.7020738124847412, -0.5494651198387146, 1.179134726524353, 0.9790642857551575, -0.7699956297874451, -0.054761022329330444, 1.3195440769195557, 0.48914599418640137, -0.5288897752761841, -0.8658260107040405, -0.9382206797599792, 0.8961383104324341, 1.7366024255752563, -0.12126829475164413, -0.02556603029370308, 0.7909484505653381, 0.6998966932296753, -1.2889864444732666, 0.07429375499486923, -0.7532972097396851, -0.8391725420951843, 1.5567563772201538, 2.053401470184326, -0.09744159132242203, -0.24646393954753876, -0.744748055934906, -1.2349138259887695, 0.7778323292732239, -0.08269862830638885, 0.22183866798877716, 0.5860478281974792, -0.664867639541626, 1.1607775688171387, 0.9312288761138916, 0.8959102034568787, 0.23452748358249664, 0.20646291971206665, 0.4204009473323822, -0.3290960490703583, -1.0316075086593628, -0.2180221527814865, -1.058823585510254, -2.5436017513275146, 0.4687144160270691, -0.2140882909297943, -1.3734546899795532, 0.013267976231873035, -1.0155996084213257, 0.9066905975341797, -0.5353425741195679, -1.0161205530166626, -1.5866707563400269, 0.2044452577829361, -0.1502111405134201, 0.9617710709571838, -1.6637098789215088, -0.12876728177070618, 1.2174352407455444, 0.8801215887069702, -0.6036326885223389, 1.0782219171524048, 0.19160141050815582, 1.0220097303390503, 0.9159422516822815, -0.4212132394313812, 0.507756233215332, 0.08366649597883224, -1.3272446393966675, 0.4431828558444977, 1.1010929346084595, 0.17764335870742798, 1.3568189144134521, -0.5352291464805603, 0.022376839071512222, 0.36799779534339905, -0.5495090484619141, -0.47300300002098083, -0.5057038068771362, 0.7491279244422913, 0.08944330364465714, -0.901294469833374, 0.04583897441625595, -0.19283707439899445, -0.2329760491847992, 0.15507695078849792, -1.5597106218338013, -0.2634953558444977, -0.3640029728412628, -0.5221107602119446, -1.2693476676940918, -0.04302969574928284, 1.4395647048950195, -0.7685160040855408, -0.1487978845834732, 0.5115156173706055, 0.5051366090774536, 0.5390731692314148, 0.6705791354179382, -0.6374302506446838, -0.4067637324333191, -0.22334112226963043, -0.3152298033237457, 0.3322327733039856, 1.3213921785354614, -0.08773469924926758, -0.9018831253051758, 0.691307544708252, -0.3238787055015564, 0.09842824935913086, 1.9893630743026733, 0.13773085176944733, -0.8351126909255981, 0.3160679340362549, -0.7416922450065613, 1.9008409976959229, 1.7291288375854492, 1.3483561277389526, -0.13398852944374084, -1.004538893699646, 0.658374547958374, -0.33501046895980835, -0.30891093611717224, 0.9053112864494324, 0.46527746319770813, -0.21046200394630432, -1.3808157444000244, 0.5030838847160339, 1.3062164783477783, -0.855876088142395, -0.7296583652496338, 0.05001939833164215, -0.8018822073936462, 1.0392972230911255, 0.6140784025192261, 0.36135125160217285, 0.19985193014144897, 1.5230257511138916, 0.7607142925262451, -0.5346051454544067, 0.5263695120811462, 0.4784189760684967, -0.18201157450675964, -2.1472373008728027, -1.1166892051696777, 0.3094036281108856, -0.4114712178707123, -1.5242938995361328, 1.4329568147659302, -1.1384201049804688, -0.9897791743278503, 0.5177996158599854, 0.037767454981803894, 1.4356580972671509, 0.3464027941226959, 1.5652474164962769, 2.1686136722564697, 0.8712248206138611, 0.3416329324245453, 1.3515657186508179, -0.19436368346214294, -0.4661116898059845, 1.828628659248352, -0.43394941091537476, 0.4019838571548462, 1.0966323614120483, -0.31909576058387756, -1.0130621194839478, -0.7979637980461121, -1.1667503118515015, -0.679541826248169, 1.1794508695602417, 0.1209552064538002, -1.0729097127914429, 0.24060526490211487, 1.6423062086105347, 0.09832917898893356, -0.3899405598640442, 0.5249108672142029, 0.44431060552597046, -0.7537825107574463, -0.0900219976902008, -0.9510127902030945, 0.5312957763671875, -0.13130740821361542, -0.2983214259147644, 0.37447139620780945, 0.3872971534729004, 1.231741189956665, 0.027768999338150024, 0.16049103438854218, 1.1294113397598267, -1.4475984573364258, 1.4937529563903809, -0.6066201329231262, 0.2676217257976532, -2.3733420372009277, 1.4491231441497803, -0.6863755583763123, 1.9739810228347778, -2.6382126808166504, 0.3934365510940552, -0.6540066599845886, -0.47671929001808167, 0.31131625175476074, -0.3530346155166626, 0.21349981427192688, -0.17060892283916473, -1.1052780151367188, -0.10867717117071152, -0.7009006142616272, 0.5363987684249878, 1.0146214962005615, 1.2096165418624878, -1.088210940361023, -0.3529791235923767, -1.7155145406723022, -0.19812224805355072, -0.7243736386299133, 0.2703486382961273, -2.03481125831604, -0.2102542519569397, -1.9493393898010254, -2.3805229663848877, -1.4122205972671509, -0.7967209815979004, 1.047909140586853, 0.10350719839334488, -0.9239200353622437, 1.1608707904815674, -0.37794747948646545, -1.8271504640579224, 1.1288927793502808, -2.077732801437378 ]
https://github.com/huggingface/datasets/issues/4540
Avoid splitting by` .py` for the file.
Hi @espoirMur, thanks for reporting. You are right: that code line could be improved and made more generically valid. On the other hand, I would suggest using `os.path.splitext` instead. Are you willing to open a PR? :)
https://github.com/huggingface/datasets/blob/90b3a98065556fc66380cafd780af9b1814b9426/src/datasets/load.py#L272 Hello, Thanks you for this library . I was using it and I had one edge case. my home folder name ends with `.py` it is `/home/espoir.py` so anytime I am running the code to load a local module this code here it is failing because after splitting it is trying to save the code to my home directory. Step to reproduce. - If you have a home folder which ends with `.py` - load a module with a local folder `qa_dataset = load_dataset("src/data/build_qa_dataset.py")` it is failed A possible workaround would be to use pathlib at the mentioned line ` meta_path = Path(importable_local_file).parent.joinpath("metadata.json")` this can alivate the issue . Let me what are your thought on this and I can try to fix it by A PR.
695
37
Avoid splitting by` .py` for the file. https://github.com/huggingface/datasets/blob/90b3a98065556fc66380cafd780af9b1814b9426/src/datasets/load.py#L272 Hello, Thanks you for this library . I was using it and I had one edge case. my home folder name ends with `.py` it is `/home/espoir.py` so anytime I am running the code to load a local module this code here it is failing because after splitting it is trying to save the code to my home directory. Step to reproduce. - If you have a home folder which ends with `.py` - load a module with a local folder `qa_dataset = load_dataset("src/data/build_qa_dataset.py")` it is failed A possible workaround would be to use pathlib at the mentioned line ` meta_path = Path(importable_local_file).parent.joinpath("metadata.json")` this can alivate the issue . Let me what are your thought on this and I can try to fix it by A PR. Hi @espoirMur, thanks for reporting. You are right: that code line could be improved and made more generically valid. On the other hand, I would suggest using `os.path.splitext` instead. Are you willing to open a PR? :)
[ -1.2125587463378906, -0.908697247505188, -0.7623558640480042, 1.4711788892745972, -0.16779422760009766, -1.203208088874817, 0.08557603508234024, -1.1137821674346924, 1.702378511428833, -0.8071476817131042, 0.33521413803100586, -1.6179670095443726, 0.05056169256567955, -0.4779232144355774, -0.7958933115005493, -0.9826563000679016, -0.4233669638633728, -0.8413617014884949, 1.006189227104187, 2.514808416366577, 1.207273244857788, -1.3722368478775024, 2.6745898723602295, 0.6664057970046997, -0.1556265652179718, -1.1023722887039185, 0.5694737434387207, 0.02692277729511261, -1.199048638343811, -0.471015989780426, -0.8940368890762329, -0.11842519044876099, -0.500648021697998, -0.6040505766868591, 0.0963166132569313, 0.34514889121055603, -0.21895988285541534, -0.2930120527744293, -0.5339236259460449, -0.7977299690246582, 0.48231375217437744, -0.40042898058891296, 0.967215895652771, -0.36540982127189636, 1.8781116008758545, -0.5748783349990845, 0.4733584225177765, 0.7595688104629517, 1.3932366371154785, 0.2365712672472, -0.01972103863954544, 0.23893806338310242, 0.38693562150001526, 0.025055967271327972, 0.452239453792572, 1.1493617296218872, 0.6493143439292908, 0.54460209608078, 0.6283937096595764, -2.25014591217041, 1.319495439529419, -1.0369306802749634, 0.27078327536582947, 1.3144370317459106, -0.904164731502533, 0.34251368045806885, -1.8656727075576782, -0.06061987951397896, 0.5943267941474915, -2.274770498275757, 0.19673016667366028, -1.2706700563430786, -0.5470086336135864, 1.102674126625061, 0.2368580847978592, -1.2698591947555542, 0.12271565943956375, -0.38007667660713196, 1.0520082712173462, 0.548218309879303, 1.1085313558578491, -1.7196768522262573, -0.018296215683221817, -0.31197190284729004, 0.17872369289398193, -1.3355653285980225, -1.507309913635254, 0.6137048006057739, 0.6039570569992065, 0.5907663106918335, -0.06551343202590942, 0.9317505359649658, -0.9824737906455994, 0.8529927134513855, -0.9974521398544312, -1.5697060823440552, -1.4068958759307861, -2.2528531551361084, -2.417334794998169, 0.7501270174980164, -0.5105941295623779, -0.4715658128261566, 1.9964090585708618, -1.0800601243972778, -1.7334543466567993, 1.1404471397399902, 0.1790095716714859, 0.08412783592939377, 2.4102678298950195, 0.16103795170783997, -0.7253607511520386, 0.40752333402633667, -0.7385907769203186, 0.7696390151977539, -0.41212278604507446, 1.3793649673461914, 0.5638386607170105, -0.9909811615943909, 1.619347333908081, -0.4632711112499237, 0.5395084023475647, -0.7101964354515076, -0.5250876545906067, -0.8160580396652222, 0.3580545485019684, 1.898972511291504, -0.3865639269351959, 1.5983045101165771, -0.37542086839675903, -1.538602590560913, -1.5727092027664185, 0.923035740852356, 0.5455114841461182, -0.7713953852653503, 0.10830989480018616, -0.3988412916660309, 0.08616384863853455, -0.03608035668730736, 1.0417155027389526, 1.226397156715393, 0.7622445225715637, -0.3954555094242096, -0.9176841378211975, 0.30514147877693176, -0.11700986325740814, -0.7363393902778625, -1.7806086540222168, -0.43756362795829773, 0.10030028969049454, 0.6532952189445496, -1.2307462692260742, 1.8248019218444824, 0.8799859881401062, 1.9774479866027832, 0.9743771553039551, -0.3082808256149292, 1.5582231283187866, 0.05151822790503502, 1.9227882623672485, -0.43315744400024414, 0.7143333554267883, -0.315447598695755, -1.0990246534347534, 0.8010393381118774, -0.31832340359687805, -2.028076410293579, -0.8632078766822815, -0.7950863838195801, -0.16399750113487244, -0.7446998953819275, 0.9078401327133179, -0.2690347731113434, -1.4504904747009277, 0.2463994175195694, -0.6766339540481567, 0.05061688646674156, -1.2877578735351562, 0.37357085943222046, 0.7212573289871216, -0.7062454223632812, 0.08502242714166641, -0.30224454402923584, -1.2693507671356201, -0.5352938771247864, 0.19823966920375824, 1.991590142250061, -0.7059861421585083, 0.8852457404136658, 1.0639050006866455, -0.7084236145019531, -0.031193140894174576, 0.3921932876110077, -0.303169846534729, 0.7505233287811279, -1.0899893045425415, -0.34873056411743164, 1.2263332605361938, -0.1447271704673767, -0.6994311213493347, 1.4819551706314087, 0.8085288405418396, -0.9730785489082336, -0.15922518074512482, -0.2687170207500458, -0.73787522315979, -0.005782905500382185, -1.576126217842102, -0.07653257250785828, 0.33718034625053406, -1.443297028541565, -0.43741661310195923, -0.21940940618515015, 1.2779977321624756, -0.23581691086292267, 1.4766719341278076, -0.379029244184494, -0.2763684093952179, -0.3060353696346283, -0.3506558835506439, 0.15144380927085876, -0.23147563636302948, -0.6450936198234558, 0.2249487191438675, -0.8157342076301575, 0.3911741077899933, 1.4969984292984009, 0.4284510314464569, 0.048152025789022446, 0.4592645764350891, 1.1567142009735107, 0.3417334258556366, -0.06126847490668297, -0.8926732540130615, -1.5123307704925537, 2.044351100921631, -1.4594556093215942, 2.0157618522644043, 0.7586254477500916, -0.11629052460193634, -1.7308696508407593, -1.792027235031128, 1.2614105939865112, 1.2011057138442993, 2.3900606632232666, 0.6118194460868835, 0.3985362648963928, -0.814063310623169, -0.6390640735626221, 0.429007887840271, -1.0199908018112183, -0.7366365194320679, 0.10281039774417877, 2.340364694595337, 1.6915382146835327, -0.4979124665260315, -0.1757693588733673, -1.0088599920272827, 1.3594881296157837, -0.20295551419258118, 0.27650314569473267, 2.058511257171631, -0.24997210502624512, -1.1593509912490845, 1.2603381872177124, -2.320650339126587, 0.16254213452339172, 2.041363477706909, 0.34468114376068115, 0.012923837639391422, -1.497263789176941, -0.5683009624481201, -0.2822907269001007, -0.45356735587120056, -1.2384023666381836, 0.5090209245681763, -0.34235283732414246, -0.8754638433456421, -1.4253946542739868, 0.1349208801984787, -1.1443054676055908, -1.7211090326309204, 0.278241902589798, 1.8536078929901123, 1.9664437770843506, -0.7923019528388977, 1.428376317024231, -0.2138865888118744, 0.12600481510162354, 1.2846029996871948, 1.1462445259094238, 3.041137456893921, 1.888317346572876, -1.25723397731781, 0.7121078968048096, -0.23404516279697418, -0.5446838140487671, 1.1282674074172974, -1.1248027086257935, 1.199905514717102, -0.19775228202342987, -1.1618443727493286, -1.2422302961349487, 1.0105253458023071, 0.5002680420875549, 0.055284805595874786, -0.4581197500228882, 1.2403051853179932, 0.1574568748474121, 1.277369737625122, 0.5477668642997742, -0.3905312716960907, 0.6575424671173096, -0.4288901090621948, -0.5466693043708801, 1.5811223983764648, 0.2442806512117386, -1.4316743612289429, -2.2922465801239014, -0.280944287776947, -0.8962361216545105, -0.10081454366445541, -0.518916666507721, -0.9942071437835693, 1.6507418155670166, 0.4779704213142395, -1.3173372745513916, -0.2435843050479889, -0.36368486285209656, -0.6322808861732483, 2.7123396396636963, -1.373982548713684, -0.15009696781635284, -1.0006656646728516, -0.578069806098938, 1.6910673379898071, -1.1800955533981323, -0.19278694689273834, -0.9961200952529907, -0.5680774450302124, -1.330471396446228, -0.5643484592437744, -0.05373596027493477, -0.8808861970901489, 0.7121168375015259, 0.29657983779907227, -1.0907878875732422, -0.3749786913394928, -0.7547065019607544, 0.7821769118309021, -0.015306439250707626, 0.3272382616996765, 1.8668017387390137, 0.47382208704948425, -0.34430548548698425, 0.74095219373703, 1.1027393341064453, 0.53861004114151, -0.6125010848045349, 0.22977368533611298, -0.7477839589118958, 0.26825952529907227, -1.2932296991348267, 0.27056923508644104, -2.8371846675872803, 0.6622666120529175, -0.0805116817355156, -0.14487405121326447, -0.054273571819067, -1.2827858924865723, 1.1441192626953125, 2.7221426963806152, -1.1355564594268799, 0.532785177230835, 0.3054453730583191, 1.167386770248413, -1.6246143579483032, 0.36608970165252686, -0.3365292251110077, 2.115649700164795, 0.22297334671020508, 1.3062001466751099, -0.5304633975028992, -2.3171184062957764, 0.6319553256034851, -1.1825721263885498, -1.2341797351837158, 0.7751816511154175, -0.8882328867912292, 0.04636530205607414, -1.4266005754470825, -0.22107166051864624, -0.8444058299064636, -1.2949001789093018, 0.7665758728981018, 0.09714125841856003, 0.5217380523681641, -0.5968673825263977, 0.41779765486717224, -2.2021312713623047, -1.3658629655838013, -0.21995730698108673, -0.9422444105148315, 0.49659523367881775, -0.2939126193523407, 0.6903114318847656, -0.11491004377603531, 0.042917050421237946, 0.44251564145088196, 1.4624143838882446, 3.377582311630249, 0.3284768760204315, 0.39889150857925415, -0.0818927064538002, -0.9533352851867676, 1.3774607181549072, 0.8626187443733215, -0.1501436084508896, -0.5430632829666138, -0.9836757779121399, 1.2174326181411743, 1.9756718873977661, 1.0052242279052734, 0.08590097725391388, -0.7789689898490906, -0.7245712280273438, -0.04173825681209564, 0.17118895053863525, 0.4448094666004181, 0.9794020056724548, 0.038854699581861496, 0.12346386164426804, 1.3911991119384766, 1.288001537322998, -0.44914963841438293, 0.4209079444408417, -0.8805575370788574, -0.43695583939552307, 0.47382989525794983, 0.23047533631324768, -0.01475063432008028, 0.3916919529438019, -1.0216106176376343, -0.2445284128189087, -0.3756087124347687, -0.9508805871009827, -0.7503060102462769, -0.48744186758995056, -0.32173433899879456, 1.6409610509872437, 0.0512172169983387, -0.47615185379981995, 0.024023324251174927, -0.8011422753334045, -0.10291989147663116, -1.0484099388122559, 0.18789039552211761, -0.09156286716461182, -0.1697499006986618, -0.04371783882379532, 1.8515615463256836, -0.9324750304222107, -2.02681827545166, 0.2895934581756592, 0.2619284987449646, -0.3608740270137787, 0.2895999550819397, 1.6211055517196655, 0.5116730332374573, 1.3859388828277588, 1.2968827486038208, 0.9586711525917053, -0.669805645942688, -1.34010910987854, 0.6714701056480408, 0.9197394251823425, -1.3546907901763916, 0.8350386619567871, -0.004130540881305933, -0.4240157902240753, 0.6066406965255737, 1.2663215398788452, 0.425259530544281, -1.9642959833145142, 0.7945154309272766, -0.8692767024040222, 0.6603708863258362, 0.6149901747703552, 0.7286619544029236, 0.19283349812030792, 0.8538186550140381, -1.188941478729248, -1.1497161388397217, -0.7397180199623108, -0.688351035118103, 1.8214712142944336, -0.19951128959655762, 0.6214659810066223, -0.14311900734901428, -1.3438119888305664, -0.11758696287870407, 0.678744912147522, 0.3821607828140259, -0.44125133752822876, 0.8896331787109375, -0.6558516621589661, -1.1425083875656128, -1.4304006099700928, -0.4661421477794647, -1.05656898021698, -0.9085593819618225, 1.001900315284729, 0.8210455775260925, 0.20885613560676575, 1.8638420104980469, 0.6443400979042053, 0.24788005650043488, -2.746985673904419, 0.9174754023551941, 0.26578986644744873, -0.02539467066526413, 0.9395039081573486, 0.30215105414390564, 0.9378449320793152, -0.02378261461853981, 0.5244842171669006, -2.388051748275757, 2.3643226623535156, -0.27526572346687317, 0.7079170346260071, 0.09262164682149887, -0.29602521657943726, 1.097965955734253, 0.6279986500740051, 0.5897517800331116, -1.155592918395996, 0.6414562463760376, -0.6064700484275818, 1.1761853694915771, 0.8614486455917358, -0.8395101428031921, -0.02681976929306984, 1.2707196474075317, 0.445679634809494, -0.4320497214794159, -0.912696361541748, -0.9737793803215027, 0.9198092818260193, 1.7561801671981812, -0.06714450567960739, -0.04124554619193077, 0.8228797912597656, 0.6166738867759705, -1.2265137434005737, 0.04782656952738762, -0.8445910215377808, -0.8272427916526794, 1.6116737127304077, 2.111790895462036, -0.10928315669298172, -0.2895919978618622, -0.6897582411766052, -1.1672989130020142, 0.8079028129577637, -0.006349250208586454, 0.13316595554351807, 0.6089029908180237, -0.6629822254180908, 1.1930373907089233, 0.9179405570030212, 1.0477815866470337, 0.14126791059970856, 0.34993094205856323, 0.2959687113761902, -0.3719843626022339, -1.1084811687469482, -0.19495388865470886, -1.1709725856781006, -2.629884958267212, 0.46058958768844604, -0.2725055515766144, -1.4908326864242554, 0.04036545008420944, -0.9844357967376709, 0.8562660217285156, -0.5550466775894165, -1.0819910764694214, -1.4714758396148682, 0.1967606395483017, -0.22600813210010529, 0.9495216012001038, -1.701127290725708, -0.08016602694988251, 1.2709908485412598, 0.9916423559188843, -0.5892500877380371, 0.9985206127166748, 0.20322658121585846, 1.0829147100448608, 0.8258150219917297, -0.4235694408416748, 0.5299363732337952, 0.12357249110937119, -1.3575040102005005, 0.4393478333950043, 1.1558789014816284, 0.1792604774236679, 1.4705851078033447, -0.5416287183761597, 0.13676849007606506, 0.4104806184768677, -0.611558198928833, -0.46468499302864075, -0.5715674757957458, 0.8267613649368286, -0.006685902364552021, -0.9662336707115173, 0.08416147530078888, -0.10967260599136353, -0.1729573756456375, 0.14057984948158264, -1.4795278310775757, -0.2783331274986267, -0.3253113925457001, -0.49674561619758606, -1.1932650804519653, -0.03783690556883812, 1.3280988931655884, -0.8468396663665771, -0.19858023524284363, 0.4198063611984253, 0.42915645241737366, 0.5762157440185547, 0.5280453562736511, -0.6986910700798035, -0.43362438678741455, -0.23808564245700836, -0.3111690878868103, 0.2957015931606293, 1.2577141523361206, -0.1449550837278366, -0.9448605179786682, 0.8030619621276855, -0.34595420956611633, 0.0591641440987587, 1.8799031972885132, 0.1344311386346817, -0.7375358939170837, 0.28823190927505493, -0.6814664602279663, 1.8558629751205444, 1.70344877243042, 1.299820065498352, -0.13207383453845978, -0.9197535514831543, 0.5692376494407654, -0.3683968782424927, -0.2981884181499481, 0.8792199492454529, 0.4543296694755554, -0.1422300785779953, -1.3011045455932617, 0.5797666311264038, 1.2576422691345215, -0.8349788188934326, -0.7838388085365295, -0.016042057424783707, -0.7885705232620239, 1.1119219064712524, 0.6532994508743286, 0.40256816148757935, 0.235947847366333, 1.6346317529678345, 0.7417476773262024, -0.4777888059616089, 0.5874698162078857, 0.48090410232543945, -0.1910627782344818, -2.1316943168640137, -1.082643747329712, 0.29325568675994873, -0.4420829117298126, -1.5129265785217285, 1.3437241315841675, -1.1688194274902344, -0.9005482196807861, 0.537440836429596, 0.15405668318271637, 1.4825735092163086, 0.3482886254787445, 1.5854960680007935, 2.118319511413574, 0.9115028381347656, 0.2846790850162506, 1.3082151412963867, -0.04861347749829292, -0.47996386885643005, 1.916208267211914, -0.5026882886886597, 0.47063353657722473, 1.0343044996261597, -0.37175193428993225, -0.9957286715507507, -0.8509917855262756, -1.165082573890686, -0.6843822002410889, 1.1358944177627563, 0.08092398941516876, -1.075406789779663, 0.23245316743850708, 1.670530080795288, 0.09527680277824402, -0.2925824820995331, 0.5643672347068787, 0.39394304156303406, -0.7057128548622131, -0.0605330616235733, -0.881769061088562, 0.4610159993171692, -0.19400183856487274, -0.34404456615448, 0.2735128402709961, 0.45972102880477905, 1.2366572618484497, -0.08125364780426025, 0.03147122263908386, 1.225797414779663, -1.3821314573287964, 1.557347297668457, -0.5953055024147034, 0.2843814790248871, -2.3459393978118896, 1.3312519788742065, -0.7700703144073486, 1.9011714458465576, -2.6088414192199707, 0.37565675377845764, -0.5542148351669312, -0.48981255292892456, 0.2119148075580597, -0.4455201029777527, 0.13053078949451447, -0.17332281172275543, -1.033691167831421, -0.1234969049692154, -0.7339834570884705, 0.5445390343666077, 1.0286908149719238, 1.3980287313461304, -1.1081293821334839, -0.24787427484989166, -1.7838356494903564, -0.11735465377569199, -0.6621858477592468, 0.3769005537033081, -2.0029070377349854, -0.14316770434379578, -2.0668141841888428, -2.2633047103881836, -1.3686943054199219, -0.7944692969322205, 0.9982771873474121, 0.09849885106086731, -0.7871933579444885, 1.0547460317611694, -0.3334835469722748, -1.8538199663162231, 1.0348107814788818, -2.1339261531829834 ]
https://github.com/huggingface/datasets/issues/4538
Dataset Viewer issue for Pile of Law
Thanks so much for adding the docs. I was able to successfully hide the viewer using the ``` viewer: false ``` flag in the README.md of the dataset. I'm closing the issue because this is resolved. Thanks again!
### Link https://huggingface.co/datasets/pile-of-law/pile-of-law ### Description Hi, I would like to turn off the dataset viewer for our dataset without enabling access requests. To comply with upstream dataset creator requests/licenses, we would like to make sure that the data is not indexed by search engines and so would like to turn off dataset previews. But we do not want to collect user emails because it would violate single blind review, allowing us to deduce potential reviewers' identities. Is there a way that we can turn off the dataset viewer without collecting identity information? Thanks so much! ### Owner Yes
696
38
Dataset Viewer issue for Pile of Law ### Link https://huggingface.co/datasets/pile-of-law/pile-of-law ### Description Hi, I would like to turn off the dataset viewer for our dataset without enabling access requests. To comply with upstream dataset creator requests/licenses, we would like to make sure that the data is not indexed by search engines and so would like to turn off dataset previews. But we do not want to collect user emails because it would violate single blind review, allowing us to deduce potential reviewers' identities. Is there a way that we can turn off the dataset viewer without collecting identity information? Thanks so much! ### Owner Yes Thanks so much for adding the docs. I was able to successfully hide the viewer using the ``` viewer: false ``` flag in the README.md of the dataset. I'm closing the issue because this is resolved. Thanks again!
[ -1.154013752937317, -0.9351688027381897, -0.9351160526275635, 1.3971213102340698, -0.18613667786121368, -1.3481826782226562, 0.08636876940727234, -1.0598872900009155, 1.6384289264678955, -0.8138267397880554, 0.3277691602706909, -1.7221087217330933, 0.007117351517081261, -0.5481647253036499, -0.7477694153785706, -0.907042384147644, -0.40577244758605957, -0.7636175155639648, 0.9546696543693542, 2.6166152954101562, 1.1338531970977783, -1.340345025062561, 2.6340644359588623, 0.6146911382675171, -0.11081591248512268, -0.9477230310440063, 0.594382107257843, 0.043424949049949646, -1.2793422937393188, -0.46325263381004333, -0.9430443644523621, -0.09033708274364471, -0.5113510489463806, -0.5068442821502686, -0.013313574716448784, 0.4548637866973877, -0.1538563370704651, -0.3892767131328583, -0.44827839732170105, -0.7891464233398438, 0.432500422000885, -0.4282481074333191, 0.9111275672912598, -0.45706722140312195, 1.9363313913345337, -0.6307929754257202, 0.24471735954284668, 0.7406443357467651, 1.3178648948669434, 0.10846931487321854, -0.07462508231401443, 0.1836996078491211, 0.37860557436943054, -0.061096832156181335, 0.39219701290130615, 0.9872243404388428, 0.5191355347633362, 0.5813643336296082, 0.6032147407531738, -2.183990001678467, 1.33897066116333, -1.068143367767334, 0.2581911087036133, 1.4342637062072754, -0.9953754544258118, 0.43664228916168213, -1.7873424291610718, -0.057786256074905396, 0.49953773617744446, -2.2769100666046143, 0.21287980675697327, -1.2065892219543457, -0.5428352952003479, 0.9773173928260803, 0.33120280504226685, -1.3044178485870361, 0.05363122373819351, -0.4280316233634949, 1.0401909351348877, 0.5237953066825867, 1.1810035705566406, -1.701948881149292, -0.0017733201384544373, -0.3627317547798157, 0.0028253132477402687, -1.4587953090667725, -1.498669981956482, 0.5561131834983826, 0.6823552250862122, 0.6699010729789734, -0.0721176415681839, 0.845466673374176, -0.9281518459320068, 0.8662416338920593, -0.8652148842811584, -1.7667728662490845, -1.44599187374115, -2.301867961883545, -2.2993621826171875, 0.7789538502693176, -0.4475334882736206, -0.4846024215221405, 2.0087788105010986, -1.1191644668579102, -1.8533326387405396, 1.291455864906311, 0.19019420444965363, -0.14078593254089355, 2.397400379180908, 0.2586498260498047, -0.581298828125, 0.3749764859676361, -0.6828533411026001, 0.8256544470787048, -0.5019131898880005, 1.3317285776138306, 0.4803013801574707, -1.0685737133026123, 1.6052272319793701, -0.46173617243766785, 0.5497812628746033, -0.7412703633308411, -0.436861127614975, -0.9496684670448303, 0.32793569564819336, 1.822932481765747, -0.32535219192504883, 1.6049549579620361, -0.41463926434516907, -1.4757158756256104, -1.5065301656723022, 0.8720051646232605, 0.5196443796157837, -0.8422459959983826, 0.10637976229190826, -0.33948755264282227, 0.11118415743112564, -0.0558074414730072, 1.131880521774292, 1.1348432302474976, 0.6550929546356201, -0.227591410279274, -0.8400468230247498, 0.3119453489780426, 0.04760050028562546, -0.6784172058105469, -1.806709885597229, -0.3944550156593323, 0.1483467072248459, 0.60965496301651, -1.186509132385254, 1.6278587579727173, 0.8660855889320374, 1.8713538646697998, 1.051466941833496, -0.304835706949234, 1.4133042097091675, 0.09698910266160965, 1.839706301689148, -0.5512458086013794, 0.71049964427948, -0.3543989062309265, -1.2239066362380981, 0.8199397325515747, -0.2900286912918091, -1.9683825969696045, -0.8911334872245789, -0.9236430525779724, -0.1638776957988739, -0.736560046672821, 0.9301745891571045, -0.3271612823009491, -1.324360966682434, 0.15315748751163483, -0.6253862380981445, 0.07310828566551208, -1.278787612915039, 0.38047584891319275, 0.7556955218315125, -0.6101166605949402, 0.04579608142375946, -0.2913186848163605, -1.3017373085021973, -0.4365517795085907, 0.2753046751022339, 1.8828059434890747, -0.7640718221664429, 0.9555183053016663, 0.9703480005264282, -0.7667310833930969, -0.036218952387571335, 0.402304083108902, -0.29260462522506714, 0.9028180241584778, -1.1370433568954468, -0.422329843044281, 1.1312191486358643, -0.2613500654697418, -0.7230989336967468, 1.4656800031661987, 0.7393518090248108, -0.9731226563453674, -0.1766444444656372, -0.27184969186782837, -0.7706983089447021, -0.009734339080750942, -1.6588324308395386, -0.18568269908428192, 0.22129225730895996, -1.4975141286849976, -0.5921045541763306, -0.20140564441680908, 1.2735074758529663, -0.17109031975269318, 1.3463373184204102, -0.3355462849140167, -0.26031577587127686, -0.4914852976799011, -0.41270774602890015, 0.1942307949066162, -0.11307794600725174, -0.6382271647453308, 0.3385851979255676, -0.7631427049636841, 0.2860201895236969, 1.454749345779419, 0.3895091116428375, 0.1477845460176468, 0.6526402235031128, 1.0197408199310303, 0.3096091151237488, -0.09935740381479263, -0.9137054085731506, -1.6377607583999634, 2.0510025024414062, -1.451637864112854, 1.942726969718933, 0.7006019353866577, -0.01596619375050068, -1.8544727563858032, -1.9404946565628052, 1.4003639221191406, 1.2241618633270264, 2.2181906700134277, 0.5653737187385559, 0.4609985053539276, -0.7535005211830139, -0.6976789832115173, 0.28498733043670654, -1.1380823850631714, -0.805069625377655, 0.1333390176296234, 2.2747690677642822, 1.7293415069580078, -0.5631752014160156, -0.21634185314178467, -1.1044751405715942, 1.201888918876648, -0.09946466237306595, 0.15898363292217255, 1.9887168407440186, -0.34852975606918335, -1.0711807012557983, 1.1452581882476807, -2.2713654041290283, 0.10377608239650726, 1.9805209636688232, 0.19678515195846558, 0.05352722108364105, -1.457722544670105, -0.6446942090988159, -0.12484551221132278, -0.30167287588119507, -1.2336585521697998, 0.6563704013824463, -0.317022442817688, -0.8422244191169739, -1.4838367700576782, 0.13065552711486816, -1.134074091911316, -1.574404239654541, 0.36887088418006897, 1.8284122943878174, 2.0008206367492676, -0.7410322427749634, 1.540600061416626, -0.19347329437732697, 0.18050287663936615, 1.2961182594299316, 1.1292567253112793, 3.232865333557129, 1.9448637962341309, -1.2876313924789429, 0.6668164134025574, -0.04649505764245987, -0.43248075246810913, 1.300473690032959, -1.0016615390777588, 1.2782751321792603, -0.24996565282344818, -1.2694543600082397, -1.3110896348953247, 0.8799761533737183, 0.4283472001552582, 0.10938674956560135, -0.5177489519119263, 1.3222367763519287, 0.014585684984922409, 1.2545245885849, 0.5042321085929871, -0.39745110273361206, 0.6292382478713989, -0.5814023613929749, -0.4006115794181824, 1.5708608627319336, 0.21825751662254333, -1.4544121026992798, -2.334428310394287, -0.2007492631673813, -0.746161937713623, 0.02049405500292778, -0.5912825465202332, -0.9813343286514282, 1.644384741783142, 0.4377213716506958, -1.2693960666656494, -0.31718653440475464, -0.37895986437797546, -0.7281362414360046, 2.650627613067627, -1.4373340606689453, -0.3054393231868744, -0.9961293935775757, -0.44025254249572754, 1.679078459739685, -1.2574989795684814, -0.1284930408000946, -1.0218086242675781, -0.5781719088554382, -1.3211981058120728, -0.5507174730300903, 0.03908894211053848, -0.9355922937393188, 0.9366809129714966, 0.10088999569416046, -1.085314154624939, -0.23283886909484863, -0.8654018044471741, 0.7427986860275269, -0.08848332613706589, 0.33508968353271484, 1.875610589981079, 0.5536766648292542, -0.3969234824180603, 0.6773817539215088, 1.125905156135559, 0.635414719581604, -0.6503118276596069, 0.3022209405899048, -0.6360289454460144, 0.19544170796871185, -1.2920854091644287, 0.3568512201309204, -2.8457562923431396, 0.562255859375, -0.10946867614984512, -0.04003562405705452, 0.02155385911464691, -1.3007491827011108, 0.9920991063117981, 2.5319385528564453, -1.2378084659576416, 0.46959373354911804, 0.25730976462364197, 1.241889476776123, -1.562077283859253, 0.39384010434150696, -0.4909765124320984, 2.0794014930725098, 0.1947152316570282, 1.131761908531189, -0.48510903120040894, -2.111769199371338, 0.6284140944480896, -1.2867822647094727, -1.1684281826019287, 0.8311058282852173, -0.8206562995910645, -0.04003823548555374, -1.37478506565094, -0.15844234824180603, -0.8254207372665405, -1.3190829753875732, 0.9071406126022339, 0.06898391991853714, 0.5349745154380798, -0.5394107699394226, 0.34338998794555664, -2.0828771591186523, -1.3453376293182373, -0.2464897185564041, -0.8912220597267151, 0.23562218248844147, -0.24716614186763763, 0.8210633397102356, -0.23788747191429138, 0.1493253856897354, 0.3216240406036377, 1.3656108379364014, 3.4103896617889404, 0.1872771680355072, 0.42390018701553345, -0.1423373520374298, -0.898542046546936, 1.4892853498458862, 1.0307766199111938, -0.025424214079976082, -0.5502225756645203, -0.9952689409255981, 1.2938750982284546, 1.9191296100616455, 1.0167973041534424, 0.07116342335939407, -0.7796302437782288, -0.6151588559150696, -0.06800126284360886, 0.2027559131383896, 0.5020188689231873, 0.8727721571922302, -0.029199017211794853, 0.15856386721134186, 1.5008890628814697, 1.3081893920898438, -0.4964524805545807, 0.38585519790649414, -0.8216968178749084, -0.44785359501838684, 0.5644263029098511, 0.45317742228507996, 0.003645659424364567, 0.3326767086982727, -0.9826411008834839, -0.2991059422492981, -0.3555513620376587, -1.0452429056167603, -0.6732974648475647, -0.46074792742729187, -0.3294547498226166, 1.5909243822097778, 0.10146529972553253, -0.47457411885261536, -0.04652564227581024, -0.8883497714996338, -0.1247149407863617, -1.1495879888534546, 0.22462163865566254, -0.2563977837562561, -0.10005061328411102, -0.0018364181742072105, 1.9441781044006348, -1.1003352403640747, -2.1611740589141846, 0.315420925617218, 0.19425110518932343, -0.41802313923835754, 0.16754378378391266, 1.608217716217041, 0.47106078267097473, 1.3886327743530273, 1.3541423082351685, 0.9618698358535767, -0.6883701086044312, -1.2813547849655151, 0.6126275062561035, 1.0000762939453125, -1.4972622394561768, 0.8407179713249207, 0.021192137151956558, -0.5352213382720947, 0.7782108187675476, 1.2335768938064575, 0.477313369512558, -1.8466720581054688, 0.7528681755065918, -0.8622806668281555, 0.8377805948257446, 0.7686992287635803, 0.8810163736343384, 0.32271891832351685, 0.853050708770752, -1.2993327379226685, -1.1232973337173462, -0.7270283699035645, -0.541592538356781, 1.892741322517395, -0.12563766539096832, 0.567654550075531, -0.10628431290388107, -1.317535161972046, -0.07395970076322556, 0.6585517525672913, 0.2654738426208496, -0.3529142439365387, 0.7827432751655579, -0.6177803874015808, -1.0768295526504517, -1.483322024345398, -0.4357900023460388, -0.9828802347183228, -0.8849471807479858, 1.0944559574127197, 0.8500421047210693, 0.2187453657388687, 1.8370293378829956, 0.618828535079956, 0.2495582401752472, -2.6215286254882812, 0.882185697555542, 0.2708660066127777, 0.026592450216412544, 0.8465906381607056, 0.31549641489982605, 1.0509974956512451, 0.010540906339883804, 0.4838482737541199, -2.3119442462921143, 2.2754623889923096, -0.27959325909614563, 0.612452507019043, -0.031040320172905922, -0.20425564050674438, 1.1034122705459595, 0.6434686779975891, 0.6412055492401123, -1.098265528678894, 0.744185209274292, -0.5972627401351929, 1.216445803642273, 1.0838185548782349, -0.8547847867012024, -0.06445439159870148, 1.3331226110458374, 0.5270116925239563, -0.4684700071811676, -0.814563512802124, -0.8929433226585388, 0.9697079658508301, 1.7906224727630615, -0.010212976485490799, -0.012682920321822166, 0.9881916046142578, 0.6021163463592529, -1.2224966287612915, 0.07989214360713959, -0.783399224281311, -0.6648015379905701, 1.6576249599456787, 1.9856466054916382, -0.028579959645867348, -0.14173807203769684, -0.7646141052246094, -1.1194219589233398, 0.789857804775238, -0.035064712166786194, 0.06884803622961044, 0.6732359528541565, -0.6189896464347839, 1.107974886894226, 0.9074038863182068, 0.957857608795166, 0.14574012160301208, 0.34786948561668396, 0.3922331929206848, -0.27480363845825195, -1.1902782917022705, -0.25970596075057983, -1.1040117740631104, -2.562455892562866, 0.5461946725845337, -0.38091111183166504, -1.4142515659332275, 0.04023391753435135, -1.0408966541290283, 0.9240052700042725, -0.564687967300415, -1.114384412765503, -1.4958351850509644, 0.18191181123256683, -0.16779473423957825, 0.9215089678764343, -1.6117818355560303, -0.005825021769851446, 1.2136582136154175, 0.8969478011131287, -0.6653381586074829, 1.0140823125839233, 0.28509798645973206, 1.1081682443618774, 0.7690667510032654, -0.453018456697464, 0.3819558620452881, 0.09756924957036972, -1.3955161571502686, 0.38598892092704773, 1.0934120416641235, 0.1543109267950058, 1.388748288154602, -0.5091106295585632, 0.06225603073835373, 0.4775788486003876, -0.38346949219703674, -0.47934141755104065, -0.5735009908676147, 0.7779271602630615, 0.19528670608997345, -0.7429553270339966, 0.07127067446708679, -0.027885064482688904, -0.2133065164089203, 0.2047412097454071, -1.6018084287643433, -0.2749103903770447, -0.35336756706237793, -0.664730966091156, -1.32285475730896, -0.012808075174689293, 1.3971033096313477, -0.7680155634880066, -0.1669212132692337, 0.5857794880867004, 0.4046216309070587, 0.47293803095817566, 0.5943575501441956, -0.617249608039856, -0.3353882133960724, -0.32996049523353577, -0.3076544404029846, 0.25377708673477173, 1.323410987854004, -0.2653779089450836, -1.0747435092926025, 0.7748991250991821, -0.27850911021232605, 0.034232065081596375, 1.9060851335525513, 0.17077535390853882, -0.9815912842750549, 0.2652181386947632, -0.5987576842308044, 1.980027198791504, 1.58991277217865, 1.4169634580612183, -0.1059594377875328, -0.9033966660499573, 0.6364206671714783, -0.1922614872455597, -0.3435167670249939, 0.9287393093109131, 0.49974098801612854, -0.07492244988679886, -1.4242994785308838, 0.683936595916748, 1.3421860933303833, -0.967212438583374, -0.8758618235588074, 0.057731837034225464, -0.8607956171035767, 1.0122270584106445, 0.8177655935287476, 0.5066619515419006, 0.30192264914512634, 1.5675182342529297, 0.6952606439590454, -0.5528112053871155, 0.45684221386909485, 0.49603763222694397, -0.06546057760715485, -2.124556303024292, -1.047559380531311, 0.30307653546333313, -0.43148237466812134, -1.5849113464355469, 1.395582675933838, -1.2057216167449951, -0.8874354362487793, 0.5318375825881958, 0.14383456110954285, 1.492161512374878, 0.21920950710773468, 1.5934611558914185, 2.0166115760803223, 0.855771541595459, 0.28655701875686646, 1.4918376207351685, -0.14736667275428772, -0.3877216577529907, 1.8056230545043945, -0.42983001470565796, 0.49800601601600647, 1.1242649555206299, -0.37177157402038574, -1.0129469633102417, -0.6427127718925476, -1.082610011100769, -0.61388099193573, 1.1683224439620972, 0.14804252982139587, -1.1574280261993408, 0.13947628438472748, 1.525650143623352, 0.10774749517440796, -0.3058108985424042, 0.6103148460388184, 0.47370755672454834, -0.7068704962730408, -0.07577753812074661, -0.9360710382461548, 0.6132248640060425, -0.1328427940607071, -0.35902586579322815, 0.4246961772441864, 0.4227655827999115, 1.2057318687438965, -0.038028910756111145, 0.12205275148153305, 1.25856351852417, -1.3763927221298218, 1.4308429956436157, -0.5360429883003235, 0.18225526809692383, -2.5340662002563477, 1.4722108840942383, -0.819446325302124, 1.8330445289611816, -2.5784194469451904, 0.38560351729393005, -0.6492857336997986, -0.42826229333877563, 0.3368856906890869, -0.3267579674720764, 0.03372270613908768, -0.17542168498039246, -1.0409135818481445, -0.05211472511291504, -0.7778887748718262, 0.5464200973510742, 1.2922227382659912, 1.3001011610031128, -1.0528360605239868, -0.1951679140329361, -1.7484477758407593, -0.12287899106740952, -0.6865639686584473, 0.36028873920440674, -2.0838165283203125, -0.16440683603286743, -1.931448221206665, -2.4049313068389893, -1.4580310583114624, -0.8615726828575134, 1.1579686403274536, 0.24876773357391357, -0.9113718867301941, 1.0858023166656494, -0.3421013355255127, -1.834925889968872, 1.0889842510223389, -2.1374614238739014 ]
https://github.com/huggingface/datasets/issues/4538
Dataset Viewer issue for Pile of Law
Just for the record: - the doc <img width="1430" alt="Capture d’écran 2022-06-27 à 09 29 27" src="https://user-images.githubusercontent.com/1676121/175884089-bca6c0d5-6387-473e-98ca-86a910ede4bd.png"> - the dataset main page <img width="1134" alt="Capture d’écran 2022-06-27 à 09 29 05" src="https://user-images.githubusercontent.com/1676121/175884152-5f285bf0-3471-45de-927a-e141b00ebb33.png"> - the dataset viewer page <img width="567" alt="Capture d’écran 2022-06-27 à 09 29 16" src="https://user-images.githubusercontent.com/1676121/175884191-ab6a297b-1c11-417e-bbde-0b7623278a79.png">
### Link https://huggingface.co/datasets/pile-of-law/pile-of-law ### Description Hi, I would like to turn off the dataset viewer for our dataset without enabling access requests. To comply with upstream dataset creator requests/licenses, we would like to make sure that the data is not indexed by search engines and so would like to turn off dataset previews. But we do not want to collect user emails because it would violate single blind review, allowing us to deduce potential reviewers' identities. Is there a way that we can turn off the dataset viewer without collecting identity information? Thanks so much! ### Owner Yes
696
47
Dataset Viewer issue for Pile of Law ### Link https://huggingface.co/datasets/pile-of-law/pile-of-law ### Description Hi, I would like to turn off the dataset viewer for our dataset without enabling access requests. To comply with upstream dataset creator requests/licenses, we would like to make sure that the data is not indexed by search engines and so would like to turn off dataset previews. But we do not want to collect user emails because it would violate single blind review, allowing us to deduce potential reviewers' identities. Is there a way that we can turn off the dataset viewer without collecting identity information? Thanks so much! ### Owner Yes Just for the record: - the doc <img width="1430" alt="Capture d’écran 2022-06-27 à 09 29 27" src="https://user-images.githubusercontent.com/1676121/175884089-bca6c0d5-6387-473e-98ca-86a910ede4bd.png"> - the dataset main page <img width="1134" alt="Capture d’écran 2022-06-27 à 09 29 05" src="https://user-images.githubusercontent.com/1676121/175884152-5f285bf0-3471-45de-927a-e141b00ebb33.png"> - the dataset viewer page <img width="567" alt="Capture d’écran 2022-06-27 à 09 29 16" src="https://user-images.githubusercontent.com/1676121/175884191-ab6a297b-1c11-417e-bbde-0b7623278a79.png">
[ -1.192861557006836, -0.8667543530464172, -0.738944411277771, 1.3598594665527344, -0.09615787863731384, -1.2207790613174438, 0.06131163612008095, -0.987159252166748, 1.5777229070663452, -0.6951020956039429, 0.3252190351486206, -1.6225615739822388, -0.02793635055422783, -0.515330970287323, -0.677236795425415, -0.8464376926422119, -0.37158745527267456, -0.7614259719848633, 1.0614032745361328, 2.57420015335083, 1.2215149402618408, -1.4153023958206177, 2.725822925567627, 0.6611230969429016, -0.23244591057300568, -0.8818629384040833, 0.5081660747528076, 0.08594236522912979, -1.3164153099060059, -0.39673107862472534, -0.9077845215797424, -0.03744294494390488, -0.5630092024803162, -0.4934154152870178, 0.004821120761334896, 0.4568018913269043, -0.1968684196472168, -0.4507427215576172, -0.5091908574104309, -0.7533066868782043, 0.4575219452381134, -0.3893010914325714, 0.8463174700737, -0.3398856818675995, 1.8447809219360352, -0.651415228843689, 0.3623293936252594, 0.6798536777496338, 1.2180602550506592, 0.22735588252544403, 0.0014421697705984116, 0.26090776920318604, 0.3648222088813782, -0.14341503381729126, 0.49133333563804626, 1.2424135208129883, 0.6728986501693726, 0.5289772152900696, 0.6828001141548157, -2.1640827655792236, 1.3598768711090088, -0.9226541519165039, 0.2061554342508316, 1.4540926218032837, -0.9996775984764099, 0.4983360469341278, -1.9401566982269287, -0.0575057677924633, 0.40907299518585205, -2.307138204574585, 0.2672581374645233, -1.2922552824020386, -0.6069133281707764, 0.9715429544448853, 0.22110092639923096, -1.2373437881469727, 0.10215555876493454, -0.44153550267219543, 0.9885449409484863, 0.45514991879463196, 1.2171976566314697, -1.701810359954834, -0.13678652048110962, -0.24601595103740692, 0.17213140428066254, -1.367247223854065, -1.604191541671753, 0.505273163318634, 0.6178292632102966, 0.5846808552742004, -0.07047254592180252, 0.9357486963272095, -1.0585269927978516, 0.8297262787818909, -0.955180823802948, -1.700585961341858, -1.375587821006775, -2.3038573265075684, -2.324648857116699, 0.8031790852546692, -0.37120237946510315, -0.47811251878738403, 2.0258588790893555, -1.088016152381897, -1.7360635995864868, 1.1408201456069946, 0.3046437203884125, -0.09220898896455765, 2.515742540359497, 0.27348268032073975, -0.8232964277267456, 0.5299593806266785, -0.8037452697753906, 0.769147515296936, -0.43044716119766235, 1.3659859895706177, 0.47285160422325134, -0.9655182361602783, 1.5931063890457153, -0.43762168288230896, 0.5570881962776184, -0.7412576079368591, -0.4831043481826782, -0.7782049775123596, 0.2538396418094635, 1.9377319812774658, -0.29106444120407104, 1.5885446071624756, -0.3284693956375122, -1.5841320753097534, -1.4753342866897583, 0.8625274300575256, 0.5385394096374512, -0.8763161301612854, 0.09737454354763031, -0.3814951777458191, 0.15760938823223114, 0.024066884070634842, 1.0498141050338745, 1.2406501770019531, 0.7649644017219543, -0.2841203212738037, -0.8738998770713806, 0.1132010817527771, -0.05822383612394333, -0.6465634107589722, -1.7443572282791138, -0.3165069818496704, 0.19347503781318665, 0.5673001408576965, -1.3507888317108154, 1.733475685119629, 0.9300269484519958, 1.9336931705474854, 0.9866024851799011, -0.40308651328086853, 1.5157114267349243, 0.13906335830688477, 1.8449057340621948, -0.4606427848339081, 0.6707876324653625, -0.3767477869987488, -1.1993283033370972, 0.7348148226737976, -0.288148432970047, -1.9975849390029907, -0.7364346981048584, -0.7990010380744934, -0.1647820621728897, -0.8086080551147461, 0.8798785209655762, -0.24908626079559326, -1.3805408477783203, 0.20877346396446228, -0.654952883720398, 0.1013573631644249, -1.333059549331665, 0.34344562888145447, 0.737867534160614, -0.6518381237983704, 0.08862562477588654, -0.2422512173652649, -1.262130618095398, -0.5066279768943787, 0.27915331721305847, 1.8892731666564941, -0.6692256927490234, 0.9266685247421265, 1.0395067930221558, -0.6556744575500488, 0.029223941266536713, 0.4321216940879822, -0.32707732915878296, 0.8860409259796143, -1.1426811218261719, -0.34223833680152893, 1.069331407546997, -0.19063764810562134, -0.5772106051445007, 1.3520944118499756, 0.7850874662399292, -0.931506335735321, -0.31450971961021423, -0.1203666552901268, -0.7757096886634827, -0.028372731059789658, -1.6147302389144897, -0.11482832580804825, 0.2780223786830902, -1.4794306755065918, -0.5268884301185608, -0.26593413949012756, 1.2197407484054565, -0.1992374062538147, 1.3588038682937622, -0.32777318358421326, -0.15377454459667206, -0.491017609834671, -0.39950886368751526, 0.0950581505894661, -0.17334213852882385, -0.6147602796554565, 0.2890067398548126, -0.8266304135322571, 0.19706782698631287, 1.5260599851608276, 0.4313695728778839, 0.042692385613918304, 0.4736544191837311, 1.1552850008010864, 0.331840455532074, -0.11047277599573135, -0.8437864780426025, -1.580496072769165, 1.9924110174179077, -1.5608112812042236, 1.9974921941757202, 0.8607839345932007, -0.03150709345936775, -1.774646282196045, -1.9473694562911987, 1.3803154230117798, 1.1578378677368164, 2.484987735748291, 0.5561202168464661, 0.4621514678001404, -0.7554989457130432, -0.7621929049491882, 0.3204854428768158, -1.046301007270813, -0.8108447790145874, 0.20114612579345703, 2.3245558738708496, 1.6334346532821655, -0.5025860071182251, -0.23675918579101562, -0.9692322015762329, 1.3284227848052979, -0.11218751221895218, 0.1801314800977707, 1.9452227354049683, -0.24507589638233185, -1.0810140371322632, 1.2278708219528198, -2.2942020893096924, 0.15173086524009705, 1.9856034517288208, 0.3212669789791107, 0.07433287054300308, -1.3211599588394165, -0.6627941727638245, -0.21379610896110535, -0.4247724413871765, -1.177856683731079, 0.49615946412086487, -0.25523003935813904, -0.8720343112945557, -1.5093764066696167, 0.029203906655311584, -1.215196967124939, -1.6253620386123657, 0.33822229504585266, 1.8495930433273315, 2.040435314178467, -0.8636721968650818, 1.3923308849334717, -0.22075724601745605, 0.09721815586090088, 1.2009012699127197, 1.2199475765228271, 3.2477095127105713, 1.8261092901229858, -1.2951751947402954, 0.6473614573478699, -0.13950732350349426, -0.4252324104309082, 1.180509328842163, -1.1338894367218018, 1.2299318313598633, -0.19837482273578644, -1.2680270671844482, -1.2123675346374512, 0.8756044507026672, 0.4844227433204651, 0.05630980059504509, -0.45044445991516113, 1.1317613124847412, 0.14560507237911224, 1.383618950843811, 0.5310537815093994, -0.25848209857940674, 0.6197585463523865, -0.43659043312072754, -0.49809548258781433, 1.5982226133346558, 0.07920219004154205, -1.4929832220077515, -2.318283796310425, -0.21113482117652893, -0.879472017288208, 0.035027336329221725, -0.7148646712303162, -1.0784865617752075, 1.6171367168426514, 0.4430173337459564, -1.1577017307281494, -0.24692116677761078, -0.38339653611183167, -0.6324486136436462, 2.609079599380493, -1.3993370532989502, -0.1900702863931656, -0.9400612115859985, -0.5730818510055542, 1.5718787908554077, -1.1117569208145142, -0.19301924109458923, -0.9885181188583374, -0.49273157119750977, -1.3227880001068115, -0.5126567482948303, 0.014528396539390087, -0.8242366313934326, 0.7913309335708618, 0.1877189576625824, -1.0952509641647339, -0.2887362539768219, -1.0015532970428467, 0.7769981026649475, -0.09882346540689468, 0.21339717507362366, 1.8141264915466309, 0.447646826505661, -0.3728625178337097, 0.7349107265472412, 1.1508901119232178, 0.567971408367157, -0.627966582775116, 0.18192358314990997, -0.6600170135498047, 0.2796948552131653, -1.2949681282043457, 0.29617127776145935, -2.8101541996002197, 0.6117989420890808, -0.03877105191349983, -0.04780781641602516, 0.029858872294425964, -1.3273138999938965, 1.1129732131958008, 2.5070130825042725, -1.0687118768692017, 0.5746173858642578, 0.31846746802330017, 1.163576602935791, -1.6807013750076294, 0.2566183805465698, -0.5050009489059448, 2.0713284015655518, 0.18740953505039215, 1.1643187999725342, -0.5511319041252136, -2.312910556793213, 0.5236741304397583, -1.2245631217956543, -1.1257911920547485, 0.7943205237388611, -0.9126538038253784, 0.07875650376081467, -1.3533488512039185, -0.2779870927333832, -0.9123368263244629, -1.1901555061340332, 0.7126491665840149, 0.055332791060209274, 0.5566534996032715, -0.5671341419219971, 0.36601608991622925, -2.2688779830932617, -1.3362321853637695, -0.21520207822322845, -0.9051030874252319, 0.4633648991584778, -0.32849428057670593, 0.7816137075424194, -0.1394353210926056, 0.05116114020347595, 0.2984708547592163, 1.4428346157073975, 3.2676568031311035, 0.23635601997375488, 0.3492147922515869, -0.1852835714817047, -1.0145460367202759, 1.5219058990478516, 0.9125982522964478, -0.06016054376959801, -0.6476147770881653, -1.0546939373016357, 1.2791595458984375, 1.9001401662826538, 1.081516981124878, -0.03246523067355156, -0.7820459604263306, -0.7032313346862793, -0.0009691230952739716, 0.1981443613767624, 0.43764394521713257, 1.0325013399124146, 0.015515872277319431, 0.14066986739635468, 1.4101859331130981, 1.2619141340255737, -0.4735115170478821, 0.3792421519756317, -0.8687518835067749, -0.43042269349098206, 0.5181401968002319, 0.28530994057655334, 0.012419125996530056, 0.3396706283092499, -1.0527578592300415, -0.22130759060382843, -0.33577707409858704, -0.9936003684997559, -0.7008693218231201, -0.406007319688797, -0.25867974758148193, 1.6612694263458252, 0.06333592534065247, -0.4367789626121521, 0.03153179958462715, -0.8195490837097168, -0.1311195343732834, -1.148956298828125, 0.2681417167186737, -0.18111445009708405, -0.03371362015604973, -0.09859959781169891, 1.8638951778411865, -0.9626680016517639, -2.153085947036743, 0.22048068046569824, 0.23385019600391388, -0.4244346618652344, 0.10218240320682526, 1.7853224277496338, 0.44723543524742126, 1.3977116346359253, 1.388783574104309, 0.9871166348457336, -0.7082541584968567, -1.276868224143982, 0.6481199860572815, 0.9824979901313782, -1.3447743654251099, 0.8345986008644104, -0.0942896157503128, -0.5121689438819885, 0.6242652535438538, 1.2594178915023804, 0.463507741689682, -1.8903419971466064, 0.8328839540481567, -0.9271172881126404, 0.8118877410888672, 0.677222728729248, 0.8042107224464417, 0.18040280044078827, 0.8959288001060486, -1.2642735242843628, -1.0411545038223267, -0.6890231370925903, -0.5311453938484192, 1.8748878240585327, -0.1587383896112442, 0.4606887996196747, -0.17778776586055756, -1.223993182182312, 0.013257318176329136, 0.697761595249176, 0.3337002694606781, -0.3351096212863922, 0.734169065952301, -0.6280415654182434, -1.1379731893539429, -1.4111238718032837, -0.44049718976020813, -0.9940353631973267, -0.8515989780426025, 1.006270408630371, 0.7398189902305603, 0.2902168333530426, 1.9415823221206665, 0.7008846402168274, 0.26836299896240234, -2.6908276081085205, 0.8530591726303101, 0.3737272620201111, 0.010689866729080677, 0.9693607687950134, 0.31391069293022156, 1.0942785739898682, 0.0042223138734698296, 0.5000618100166321, -2.4086577892303467, 2.3127851486206055, -0.2521604597568512, 0.8060682415962219, -0.03044118732213974, -0.16373717784881592, 1.063015103340149, 0.6546406149864197, 0.5349573493003845, -1.1484566926956177, 0.7314199209213257, -0.5497358441352844, 1.0889836549758911, 0.8985078930854797, -0.859380304813385, 0.10891592502593994, 1.2320321798324585, 0.4048771262168884, -0.4543570578098297, -0.9097204804420471, -0.80241858959198, 0.9057576656341553, 1.8147120475769043, 0.007512318901717663, 0.08628042042255402, 0.9036511182785034, 0.616696834564209, -1.3265451192855835, 0.017912760376930237, -0.6953346133232117, -0.7284114360809326, 1.794925570487976, 2.0207104682922363, 0.015527877025306225, -0.23973402380943298, -0.6539930701255798, -1.3182626962661743, 0.8666672110557556, 0.029751475900411606, 0.17333833873271942, 0.6898185610771179, -0.6944478750228882, 1.1820825338363647, 0.8180223107337952, 0.9450975060462952, 0.18751183152198792, 0.20785893499851227, 0.4397631585597992, -0.3230038583278656, -1.1519440412521362, -0.2231784164905548, -1.114693522453308, -2.617300033569336, 0.5125640630722046, -0.2548694312572479, -1.4978748559951782, 0.03964107483625412, -0.966137707233429, 0.8843721747398376, -0.5334873199462891, -1.132099986076355, -1.468736171722412, 0.21344493329524994, -0.19272801280021667, 0.9138703942298889, -1.639107584953308, -0.21151261031627655, 1.1392282247543335, 0.9815449118614197, -0.5937706232070923, 0.932691752910614, 0.26453059911727905, 1.0023137331008911, 0.8794211149215698, -0.4261710047721863, 0.39199450612068176, 0.13166911900043488, -1.4081335067749023, 0.3302348256111145, 1.2956347465515137, 0.15646201372146606, 1.415509819984436, -0.5050992369651794, 0.023111749440431595, 0.4388180077075958, -0.34870418906211853, -0.4897792935371399, -0.5614352822303772, 0.7025542259216309, 0.009686131961643696, -0.9897981882095337, -0.015751104801893234, -0.08224378526210785, -0.1431313455104828, 0.2596728503704071, -1.4804672002792358, -0.2726270258426666, -0.42643794417381287, -0.6307423710823059, -1.3313710689544678, -0.05599251389503479, 1.3139019012451172, -0.8983089923858643, -0.16978347301483154, 0.5370279550552368, 0.31609922647476196, 0.5280102491378784, 0.5671291351318359, -0.7135884761810303, -0.34694555401802063, -0.21517527103424072, -0.40437912940979004, 0.27374133467674255, 1.2665798664093018, -0.1401902586221695, -1.0479048490524292, 0.5935937166213989, -0.23973695933818817, 0.10885500907897949, 1.9524996280670166, 0.06256663799285889, -0.8248384594917297, 0.31317755579948425, -0.6708195805549622, 1.9213038682937622, 1.6094740629196167, 1.4524805545806885, -0.16468699276447296, -0.870620608329773, 0.6659443378448486, -0.32732895016670227, -0.38113754987716675, 0.9392278790473938, 0.44534623622894287, -0.17659781873226166, -1.4604541063308716, 0.6157494187355042, 1.3054450750350952, -0.9158646464347839, -0.7565175294876099, 0.06457474082708359, -0.842796802520752, 1.154728889465332, 0.6905073523521423, 0.36405691504478455, 0.3015708029270172, 1.6623106002807617, 0.7262780666351318, -0.5369868874549866, 0.5460498929023743, 0.4654548168182373, -0.10975094884634018, -2.1684319972991943, -1.0536412000656128, 0.2599466145038605, -0.36319634318351746, -1.4210284948349, 1.4783613681793213, -1.149793028831482, -1.010640263557434, 0.5935547947883606, 0.11096490174531937, 1.3545136451721191, 0.2663441002368927, 1.7011768817901611, 2.1255719661712646, 0.8838943243026733, 0.2934027314186096, 1.25777006149292, -0.14953936636447906, -0.4044788181781769, 1.8139116764068604, -0.46481698751449585, 0.5328108668327332, 1.024336338043213, -0.36457759141921997, -1.1277339458465576, -0.7520573735237122, -1.2325029373168945, -0.7915825247764587, 1.1621360778808594, 0.06693272292613983, -1.067042350769043, 0.21644830703735352, 1.6936851739883423, 0.020670194178819656, -0.30289074778556824, 0.6256073117256165, 0.5048840045928955, -0.7202364802360535, -0.1227375715970993, -0.9906550645828247, 0.581177830696106, -0.11820121854543686, -0.35996633768081665, 0.2318354845046997, 0.5197113752365112, 1.2362414598464966, 0.07733750343322754, 0.0857602059841156, 1.327437162399292, -1.3554013967514038, 1.4553871154785156, -0.766079306602478, 0.24418841302394867, -2.373051404953003, 1.501829981803894, -0.842585027217865, 1.9115827083587646, -2.5699222087860107, 0.5186344385147095, -0.606725811958313, -0.47856613993644714, 0.2284258008003235, -0.3675496578216553, 0.11804985255002975, -0.15323065221309662, -0.9958199262619019, -0.16854973137378693, -0.7711173295974731, 0.5927581191062927, 1.244856595993042, 1.3041448593139648, -1.037539005279541, -0.23708364367485046, -1.6881722211837769, -0.14991286396980286, -0.5974040627479553, 0.19704771041870117, -1.9180361032485962, -0.18245723843574524, -2.013620376586914, -2.3511829376220703, -1.4248366355895996, -0.9034087657928467, 1.196441888809204, 0.23107708990573883, -0.9742947220802307, 1.1121480464935303, -0.3910759687423706, -1.782463788986206, 1.2457338571548462, -2.1464908123016357 ]
https://github.com/huggingface/datasets/issues/4531
Dataset Viewer issue for CSV datasets
Confirmed, it's fixed now. Thanks for reporting, and thanks @coyotte508 for fixing it <img width="1123" alt="Capture d’écran 2022-06-21 à 10 28 05" src="https://user-images.githubusercontent.com/1676121/174753833-1b453a5a-6a90-4717-bca1-1b5fc6b75e4a.png">
### Link https://huggingface.co/datasets/scikit-learn/breast-cancer-wisconsin ### Description I'm populating CSV datasets [here](https://huggingface.co/scikit-learn) but the viewer is not enabled and it looks for a dataset loading script, the datasets aren't on queue as well. You can replicate the problem by simply uploading any CSV dataset. ### Owner Yes
697
23
Dataset Viewer issue for CSV datasets ### Link https://huggingface.co/datasets/scikit-learn/breast-cancer-wisconsin ### Description I'm populating CSV datasets [here](https://huggingface.co/scikit-learn) but the viewer is not enabled and it looks for a dataset loading script, the datasets aren't on queue as well. You can replicate the problem by simply uploading any CSV dataset. ### Owner Yes Confirmed, it's fixed now. Thanks for reporting, and thanks @coyotte508 for fixing it <img width="1123" alt="Capture d’écran 2022-06-21 à 10 28 05" src="https://user-images.githubusercontent.com/1676121/174753833-1b453a5a-6a90-4717-bca1-1b5fc6b75e4a.png">
[ -1.180240511894226, -0.9110344648361206, -0.8387181162834167, 1.3628268241882324, -0.12923073768615723, -1.3139389753341675, 0.03488675132393837, -1.0129739046096802, 1.6557873487472534, -0.8012757897377014, 0.2935906648635864, -1.6730328798294067, -0.04311605915427208, -0.5112897753715515, -0.6645792126655579, -0.8861671090126038, -0.353009432554245, -0.8278599977493286, 1.097418189048767, 2.6108036041259766, 1.1372284889221191, -1.338643193244934, 2.758375644683838, 0.6650765538215637, -0.27760955691337585, -0.9159810543060303, 0.6461285948753357, 0.07590974867343903, -1.2785297632217407, -0.3904529809951782, -1.0230231285095215, 0.0557098314166069, -0.4546135365962982, -0.46837934851646423, 0.09585471451282501, 0.40769925713539124, -0.14681436121463776, -0.2988358438014984, -0.5493021607398987, -0.7689026594161987, 0.3563936948776245, -0.3919982314109802, 0.9468539953231812, -0.398354709148407, 1.7940921783447266, -0.5913307666778564, 0.35291171073913574, 0.5777630805969238, 1.266627550125122, 0.1586378663778305, -0.06578868627548218, 0.1625872403383255, 0.3629681468009949, -0.08445099741220474, 0.45879390835762024, 1.17660391330719, 0.5628361701965332, 0.5207329988479614, 0.698345959186554, -2.186110734939575, 1.2902010679244995, -0.9162614941596985, 0.24249787628650665, 1.4587150812149048, -1.0485178232192993, 0.5014683604240417, -1.8126496076583862, -0.06389234215021133, 0.48698416352272034, -2.2842013835906982, 0.1900538206100464, -1.2469464540481567, -0.5380455255508423, 0.9237834215164185, 0.2731168270111084, -1.296919822692871, 0.14213092625141144, -0.4888722598552704, 1.0450769662857056, 0.4999966025352478, 1.179968237876892, -1.7581230401992798, 0.0017455965280532837, -0.2656122148036957, 0.0540720671415329, -1.4361180067062378, -1.5716708898544312, 0.5260966420173645, 0.6924772262573242, 0.7526118755340576, -0.022158943116664886, 0.8472245931625366, -1.1299006938934326, 0.7936087250709534, -0.9008328318595886, -1.6983329057693481, -1.3601372241973877, -2.3497064113616943, -2.2949047088623047, 0.7824111580848694, -0.4319949448108673, -0.4789285361766815, 1.9337371587753296, -1.0451189279556274, -1.755781888961792, 1.2342652082443237, 0.2269703596830368, -0.044030457735061646, 2.441610336303711, 0.3154503107070923, -0.7718639969825745, 0.47208043932914734, -0.7426283359527588, 0.7760844826698303, -0.47448280453681946, 1.379401683807373, 0.5627603530883789, -0.9679919481277466, 1.6500591039657593, -0.490389347076416, 0.5413290858268738, -0.639634370803833, -0.4902842342853546, -0.86715167760849, 0.340547114610672, 1.923997402191162, -0.29534628987312317, 1.620605230331421, -0.29083627462387085, -1.6320348978042603, -1.520622730255127, 0.8135923743247986, 0.5418484807014465, -0.8147822618484497, 0.1677991896867752, -0.34022045135498047, 0.03558530658483505, -0.01813824102282524, 1.0327008962631226, 1.2610231637954712, 0.6745324730873108, -0.2109285593032837, -0.8915039300918579, 0.288605272769928, 0.005556710995733738, -0.6148284673690796, -1.7359546422958374, -0.3872509002685547, 0.14789927005767822, 0.6461327075958252, -1.2607849836349487, 1.717686414718628, 0.8582921624183655, 2.018099069595337, 1.0226709842681885, -0.33697709441185, 1.4917042255401611, 0.04188947007060051, 1.890095591545105, -0.5182144641876221, 0.7665090560913086, -0.27975133061408997, -1.2019591331481934, 0.7993356585502625, -0.4377861022949219, -1.9480037689208984, -0.7223469018936157, -0.861276388168335, -0.18085381388664246, -0.7941880822181702, 0.9525033235549927, -0.3170630633831024, -1.431192398071289, 0.26825231313705444, -0.6756576299667358, 0.1331886500120163, -1.3496854305267334, 0.2841240465641022, 0.7617196440696716, -0.6196971535682678, -0.010807810351252556, -0.2522852122783661, -1.345989465713501, -0.4616381824016571, 0.30248236656188965, 1.9305124282836914, -0.7241806387901306, 0.8808209896087646, 0.9888770580291748, -0.7086360454559326, -0.015011942014098167, 0.3855784833431244, -0.3271593749523163, 0.8378514647483826, -1.099697232246399, -0.3804090619087219, 1.1562608480453491, -0.17671994864940643, -0.5492737889289856, 1.406852126121521, 0.7632485628128052, -1.0256580114364624, -0.2586444616317749, -0.2148808091878891, -0.7850056886672974, -0.03125646710395813, -1.6438120603561401, -0.14804460108280182, 0.20492397248744965, -1.3837146759033203, -0.5170789957046509, -0.21147604286670685, 1.2595075368881226, -0.16330426931381226, 1.3375886678695679, -0.35246190428733826, -0.1765718162059784, -0.4600624144077301, -0.5789401531219482, 0.25057876110076904, -0.31007301807403564, -0.640072762966156, 0.310869038105011, -0.8458328247070312, 0.27126848697662354, 1.4923992156982422, 0.41401103138923645, 0.12180917710065842, 0.5595197677612305, 1.0812404155731201, 0.35546210408210754, -0.15386687219142914, -0.8907199501991272, -1.6201447248458862, 2.060385227203369, -1.5069475173950195, 1.963564395904541, 0.7644370794296265, -0.1204303726553917, -1.810503602027893, -1.9153716564178467, 1.3446654081344604, 1.2478549480438232, 2.3726184368133545, 0.6081820130348206, 0.3797933757305145, -0.715178906917572, -0.7796497344970703, 0.31848353147506714, -1.060908317565918, -0.8324552178382874, 0.12209934741258621, 2.2557995319366455, 1.7156213521957397, -0.5348124504089355, -0.19968287646770477, -0.9846673607826233, 1.212416648864746, -0.1111559271812439, 0.23450800776481628, 2.0491783618927, -0.321959525346756, -1.017069935798645, 1.266528844833374, -2.305093765258789, 0.2135745882987976, 1.9484095573425293, 0.3301834464073181, 0.13430899381637573, -1.3977380990982056, -0.7483938336372375, -0.2922936975955963, -0.39016544818878174, -1.244254469871521, 0.575981616973877, -0.31987953186035156, -0.8817570209503174, -1.4840080738067627, 0.08905284851789474, -1.154529094696045, -1.6773107051849365, 0.318795770406723, 1.8360764980316162, 2.082674026489258, -0.941095769405365, 1.352461576461792, -0.13707630336284637, 0.16290955245494843, 1.2273036241531372, 1.1683177947998047, 3.15867018699646, 1.9123363494873047, -1.2304248809814453, 0.7866753935813904, -0.13193657994270325, -0.44124412536621094, 1.205230712890625, -1.0333571434020996, 1.2334332466125488, -0.20220305025577545, -1.2698363065719604, -1.207086205482483, 0.9368453025817871, 0.4696236550807953, -0.043933432549238205, -0.46791568398475647, 1.2576874494552612, -0.010095826350152493, 1.347489833831787, 0.5858049988746643, -0.37351736426353455, 0.5537533164024353, -0.41949528455734253, -0.4630409777164459, 1.588526725769043, 0.15775690972805023, -1.5280354022979736, -2.350738763809204, -0.20865662395954132, -0.8699443936347961, -0.11409006267786026, -0.7255346179008484, -1.0474556684494019, 1.6346768140792847, 0.4874771237373352, -1.1639059782028198, -0.2696136236190796, -0.33114296197891235, -0.6132850646972656, 2.681384325027466, -1.4720126390457153, -0.1395406424999237, -1.0041961669921875, -0.5471348166465759, 1.5637496709823608, -1.2550173997879028, -0.154689759016037, -0.9941527843475342, -0.6029613018035889, -1.3189128637313843, -0.5088785290718079, -0.04264739155769348, -0.8884429931640625, 0.7194889187812805, 0.11341698467731476, -1.0626862049102783, -0.24289317429065704, -0.9647390842437744, 0.8642297387123108, -0.10848987847566605, 0.31539225578308105, 1.9568527936935425, 0.4033204913139343, -0.3356955647468567, 0.7055663466453552, 1.199446201324463, 0.5921835899353027, -0.7432010769844055, 0.16142168641090393, -0.7087085843086243, 0.322605162858963, -1.3422143459320068, 0.2743065357208252, -2.892775535583496, 0.6883294582366943, -0.05517742037773132, -0.12940536439418793, 0.050139036029577255, -1.2885737419128418, 1.0777292251586914, 2.505103826522827, -1.132049322128296, 0.5555053949356079, 0.30357569456100464, 1.2268731594085693, -1.6022237539291382, 0.25700685381889343, -0.44908320903778076, 2.1027469635009766, 0.18566647171974182, 1.163051962852478, -0.45675957202911377, -2.1914749145507812, 0.6986649632453918, -1.2575533390045166, -1.0161248445510864, 0.7071900367736816, -0.9414022564888, 0.13598144054412842, -1.422663927078247, -0.16113582253456116, -0.8880511522293091, -1.1877416372299194, 0.7139556407928467, 0.05840882658958435, 0.4455314874649048, -0.5043477416038513, 0.3896825313568115, -2.146580696105957, -1.3423454761505127, -0.16180047392845154, -0.9410319328308105, 0.5106169581413269, -0.253191202878952, 0.6700873970985413, -0.09705061465501785, 0.08591122180223465, 0.2612597346305847, 1.4150446653366089, 3.4103517532348633, 0.12691380083560944, 0.40323325991630554, -0.06186581403017044, -1.0504608154296875, 1.465173602104187, 0.9919072389602661, -0.027997251600027084, -0.6216877698898315, -1.025288462638855, 1.3425850868225098, 1.85975980758667, 1.0763205289840698, 0.10783102363348007, -0.8187689781188965, -0.7477021217346191, 0.036375951021909714, 0.187786266207695, 0.5104471445083618, 0.9616532325744629, -0.013202410191297531, 0.13163676857948303, 1.5106340646743774, 1.1869240999221802, -0.4296911954879761, 0.3660144805908203, -0.9135047197341919, -0.4472111761569977, 0.49427586793899536, 0.2803628742694855, 0.08615507930517197, 0.365082710981369, -1.0314234495162964, -0.24681322276592255, -0.18781819939613342, -0.9729069471359253, -0.7321166396141052, -0.40559279918670654, -0.32416489720344543, 1.6887667179107666, 0.0499461404979229, -0.4792957901954651, -0.015436572954058647, -0.8282174468040466, -0.10371974110603333, -1.0574694871902466, 0.255513459444046, -0.11852571368217468, -0.07161156833171844, -0.09534202516078949, 1.7981102466583252, -1.0123294591903687, -2.180145740509033, 0.21995766460895538, 0.284587025642395, -0.4322347640991211, 0.08669125288724899, 1.6425461769104004, 0.4722028076648712, 1.3941856622695923, 1.315101981163025, 1.0150740146636963, -0.7220457792282104, -1.3650157451629639, 0.6201103925704956, 0.9350517988204956, -1.3727128505706787, 0.9256584048271179, -0.15602286159992218, -0.5395675897598267, 0.6347395777702332, 1.3713886737823486, 0.47931426763534546, -1.7922091484069824, 0.8861023187637329, -0.9234080910682678, 0.8340394496917725, 0.745347261428833, 0.9025067687034607, 0.21099691092967987, 0.7976112365722656, -1.3574315309524536, -1.0948156118392944, -0.7659587264060974, -0.5478338003158569, 1.8575854301452637, -0.12456578016281128, 0.4577034115791321, -0.21445611119270325, -1.2033556699752808, -0.004095184616744518, 0.6683027744293213, 0.3278513550758362, -0.25852569937705994, 0.8448601961135864, -0.687197744846344, -1.0882627964019775, -1.4423772096633911, -0.45295557379722595, -0.9086557626724243, -0.897583544254303, 1.0956944227218628, 0.7799336910247803, 0.4087105393409729, 1.927630066871643, 0.6063295006752014, 0.28590813279151917, -2.6406610012054443, 0.8969546556472778, 0.20155151188373566, 0.07568702101707458, 0.9513086676597595, 0.24290092289447784, 1.1728134155273438, -0.13049696385860443, 0.41232022643089294, -2.340211868286133, 2.233441114425659, -0.31152766942977905, 0.6841814517974854, -0.0011522890999913216, -0.06968726217746735, 1.100413203239441, 0.5765687227249146, 0.5708073973655701, -1.1363487243652344, 0.7843765020370483, -0.5831001400947571, 1.117072343826294, 0.9745770692825317, -0.8608788847923279, 0.11017250269651413, 1.2571696043014526, 0.4402235746383667, -0.5366142392158508, -0.9352471232414246, -0.8274816870689392, 0.9516004920005798, 1.724176049232483, 0.00010167062282562256, -0.01459633931517601, 0.8493653535842896, 0.5878562927246094, -1.3492217063903809, -0.002648497000336647, -0.649204432964325, -0.5685561895370483, 1.723019003868103, 1.9753855466842651, 0.008403577841818333, -0.21528524160385132, -0.6401934027671814, -1.2358160018920898, 0.7314313650131226, 0.056791067123413086, 0.15523594617843628, 0.7403703331947327, -0.717669665813446, 1.10236394405365, 0.7905075550079346, 0.9407283067703247, 0.12157265096902847, 0.30037420988082886, 0.4166516065597534, -0.27821993827819824, -1.1650487184524536, -0.2621822655200958, -1.139367938041687, -2.6031768321990967, 0.4172677993774414, -0.33818942308425903, -1.4751086235046387, 0.028008893132209778, -0.9848067164421082, 0.9350963234901428, -0.5739787817001343, -1.0566112995147705, -1.5095535516738892, 0.24013426899909973, -0.2514951825141907, 0.8370835185050964, -1.6668661832809448, -0.20498675107955933, 1.2559700012207031, 0.9987605810165405, -0.5811557769775391, 1.0271016359329224, 0.23938541114330292, 1.0627063512802124, 0.8062117695808411, -0.38057008385658264, 0.40595611929893494, 0.13897255063056946, -1.4074347019195557, 0.44163116812705994, 1.243925929069519, 0.17699609696865082, 1.3923406600952148, -0.5359681844711304, 0.06374777853488922, 0.43167102336883545, -0.3895086646080017, -0.5147337317466736, -0.5673859715461731, 0.7596690654754639, 0.08252695947885513, -0.9791121482849121, -0.09643131494522095, -0.14713340997695923, -0.19499121606349945, 0.3064296543598175, -1.515570044517517, -0.20777733623981476, -0.43053001165390015, -0.5322980284690857, -1.2950255870819092, -0.016158631071448326, 1.3702868223190308, -0.8555684685707092, -0.18249283730983734, 0.4795059263706207, 0.3564276397228241, 0.5233450531959534, 0.6193640828132629, -0.7274157404899597, -0.301797091960907, -0.29917776584625244, -0.35211730003356934, 0.25770971179008484, 1.233291745185852, -0.24560147523880005, -1.077723503112793, 0.6396000385284424, -0.30045801401138306, 0.11904603987932205, 1.9567718505859375, 0.08551427721977234, -0.8394840359687805, 0.2407837063074112, -0.6761932969093323, 1.9408328533172607, 1.5633093118667603, 1.3945814371109009, -0.10080438107252121, -0.8351702094078064, 0.6676197648048401, -0.15824516117572784, -0.3162006735801697, 0.8602637052536011, 0.5010440349578857, -0.1929999440908432, -1.4670473337173462, 0.5911936163902283, 1.271458625793457, -0.9414294362068176, -0.6793829202651978, 0.0730697438120842, -0.8425183296203613, 1.1485849618911743, 0.6901822686195374, 0.4171079099178314, 0.3180653154850006, 1.6505783796310425, 0.7345238327980042, -0.5298111438751221, 0.4651205539703369, 0.5065012574195862, -0.15056374669075012, -2.0038082599639893, -0.9429017305374146, 0.33148810267448425, -0.36422422528266907, -1.5039780139923096, 1.4509097337722778, -1.1962528228759766, -0.8420966863632202, 0.5549689531326294, 0.18181748688220978, 1.3972055912017822, 0.2956790030002594, 1.703133225440979, 2.039886236190796, 0.8855230808258057, 0.2491484135389328, 1.267198920249939, -0.1425192505121231, -0.3566456437110901, 1.737411379814148, -0.4345299303531647, 0.4982002377510071, 0.9582797884941101, -0.40740254521369934, -1.113060712814331, -0.7458183169364929, -1.1383616924285889, -0.6127218008041382, 1.1204527616500854, 0.16704685986042023, -1.12590491771698, 0.107871875166893, 1.5687295198440552, 0.05197351053357124, -0.28505387902259827, 0.6019114255905151, 0.4944969415664673, -0.7223880290985107, -0.11605983972549438, -0.9504500031471252, 0.5069316625595093, -0.07916431874036789, -0.31019318103790283, 0.19880200922489166, 0.5042566061019897, 1.2144372463226318, 0.025893479585647583, 0.17625415325164795, 1.342413306236267, -1.306251049041748, 1.406136155128479, -0.7531259059906006, 0.20141275227069855, -2.429940700531006, 1.447615385055542, -0.8483293652534485, 1.9292556047439575, -2.5994479656219482, 0.4343675673007965, -0.5502035021781921, -0.42266470193862915, 0.21333004534244537, -0.3423231542110443, 0.1263500154018402, -0.12488774955272675, -0.9785693883895874, -0.1033206582069397, -0.7844857573509216, 0.5322378277778625, 1.2419061660766602, 1.2815133333206177, -1.0594053268432617, -0.291716068983078, -1.7346839904785156, -0.10893711447715759, -0.6716192364692688, 0.23761872947216034, -1.9628809690475464, -0.16382429003715515, -1.897576093673706, -2.4469528198242188, -1.4653093814849854, -0.8283714056015015, 1.181965708732605, 0.16288818418979645, -0.9671222567558289, 1.1479640007019043, -0.35391005873680115, -1.741237998008728, 1.094080924987793, -2.217357635498047 ]
https://github.com/huggingface/datasets/issues/4529
Ecoset
Hi! Very cool dataset! I answered your questions on the forum. Also, feel free to comment `#self-assign` on this issue to self-assign it.
## Adding a Dataset - **Name:** *Ecoset* - **Description:** *https://www.kietzmannlab.org/ecoset/* - **Paper:** *https://doi.org/10.1073/pnas.2011417118* - **Data:** *https://codeocean.com/capsule/9570390/tree/v1* - **Motivation:** **Ecoset** was created as a clean and ecologically valid alternative to **Imagenet**. It is a large image recognition dataset, similar to Imagenet in size and structure. However, the authors of ecoset claim several improvements over Imagenet, like: - more ecologically valid classes (e.g. not over-focussed on distinguishing different dog breeds) - less NSFW content - 'pre-packed image recognition models' that come with the dataset and can be used for validation of other models. I am working for one of the authors of the paper with the aim of bringing Ecoset to huggingface datasets. Therefore I can work on this issue personally, but could use some help from devs and experienced users if the dataset is of interest to them. I phrased some of my questions on [discuss.huggingface](https://discuss.huggingface.co/t/handling-large-image-datasets/19373).
698
23
Ecoset ## Adding a Dataset - **Name:** *Ecoset* - **Description:** *https://www.kietzmannlab.org/ecoset/* - **Paper:** *https://doi.org/10.1073/pnas.2011417118* - **Data:** *https://codeocean.com/capsule/9570390/tree/v1* - **Motivation:** **Ecoset** was created as a clean and ecologically valid alternative to **Imagenet**. It is a large image recognition dataset, similar to Imagenet in size and structure. However, the authors of ecoset claim several improvements over Imagenet, like: - more ecologically valid classes (e.g. not over-focussed on distinguishing different dog breeds) - less NSFW content - 'pre-packed image recognition models' that come with the dataset and can be used for validation of other models. I am working for one of the authors of the paper with the aim of bringing Ecoset to huggingface datasets. Therefore I can work on this issue personally, but could use some help from devs and experienced users if the dataset is of interest to them. I phrased some of my questions on [discuss.huggingface](https://discuss.huggingface.co/t/handling-large-image-datasets/19373). Hi! Very cool dataset! I answered your questions on the forum. Also, feel free to comment `#self-assign` on this issue to self-assign it.
[ -1.2174543142318726, -1.0407342910766602, -0.6575803756713867, 1.2419192790985107, -0.2975495755672455, -1.3528529405593872, 0.20827656984329224, -0.9349479675292969, 1.6959820985794067, -0.6731266975402832, 0.2594689130783081, -1.732545018196106, -0.009302342310547829, -0.5526650547981262, -0.7992266416549683, -0.7569847702980042, -0.5450466871261597, -0.7962372899055481, 0.907318115234375, 2.5680365562438965, 1.1757181882858276, -1.4731037616729736, 2.7008352279663086, 0.5779069066047668, -0.1388421356678009, -1.003969430923462, 0.4370759427547455, 0.19309234619140625, -1.343353033065796, -0.45805424451828003, -0.7991951704025269, -0.0956786572933197, -0.5177807211875916, -0.4849608242511749, 0.18292585015296936, 0.38489532470703125, -0.025480274111032486, -0.3844960331916809, -0.5625779032707214, -0.6633657217025757, 0.47083696722984314, -0.39735132455825806, 0.9148482084274292, -0.4901244044303894, 1.7843341827392578, -0.7049700617790222, 0.39328253269195557, 0.7273072004318237, 1.3917917013168335, 0.23193734884262085, -0.009009727276861668, 0.29092732071876526, 0.4921674132347107, 0.020577391609549522, 0.39214059710502625, 1.137528896331787, 0.7002180218696594, 0.4883711040019989, 0.6455638408660889, -2.1429543495178223, 1.3660424947738647, -0.970669150352478, 0.417981892824173, 1.5425958633422852, -1.0213102102279663, 0.40622299909591675, -1.8879165649414062, -0.09346175938844681, 0.5314441919326782, -2.3347384929656982, 0.13118603825569153, -1.2149676084518433, -0.6599253416061401, 0.9146397113800049, 0.2490408718585968, -1.2798720598220825, 0.23320960998535156, -0.5628054141998291, 0.9054713249206543, 0.4089091420173645, 1.1738985776901245, -1.7337253093719482, -0.15358811616897583, -0.12644252181053162, 0.13800153136253357, -1.3126568794250488, -1.5701712369918823, 0.6866729259490967, 0.5324957966804504, 0.6380366683006287, -0.16261327266693115, 0.726472795009613, -0.9480172395706177, 0.9748145937919617, -1.0355874300003052, -1.6494121551513672, -1.486506700515747, -2.255028009414673, -2.2723546028137207, 0.9874116778373718, -0.31731116771698, -0.46816688776016235, 1.9143025875091553, -0.9363985657691956, -1.7198964357376099, 1.0975373983383179, 0.21811017394065857, 0.022362221032381058, 2.3576300144195557, 0.10246506333351135, -0.6951944231987, 0.32385095953941345, -0.7793517112731934, 0.9056432247161865, -0.42017456889152527, 1.4295092821121216, 0.42282095551490784, -0.9960620403289795, 1.5287535190582275, -0.4786972105503082, 0.4982560873031616, -0.6639429330825806, -0.5323013067245483, -0.764563262462616, 0.42436468601226807, 1.9274346828460693, -0.22487115859985352, 1.5714918375015259, -0.37172430753707886, -1.6556675434112549, -1.392821192741394, 0.8087671399116516, 0.597877025604248, -0.8171103000640869, -0.036552995443344116, -0.40764567255973816, 0.1366139054298401, -0.05363696813583374, 0.9768171310424805, 1.1478996276855469, 0.7809880375862122, -0.32011929154396057, -0.8860701322555542, 0.24731767177581787, -0.14769235253334045, -0.790647566318512, -1.8556749820709229, -0.3581835925579071, 0.22413158416748047, 0.5993647575378418, -1.3348675966262817, 1.642007827758789, 0.8698723316192627, 2.0290675163269043, 0.9244009256362915, -0.3464377522468567, 1.4478920698165894, 0.11465384811162949, 1.871899962425232, -0.6269582509994507, 0.7751160264015198, -0.2737794518470764, -1.0011367797851562, 0.7587441802024841, -0.4437248408794403, -2.1500244140625, -0.6650997996330261, -0.907586932182312, -0.17859989404678345, -0.7745264768600464, 0.9825706481933594, -0.22634461522102356, -1.3848395347595215, 0.15183082222938538, -0.6285626888275146, 0.1742689609527588, -1.309807538986206, 0.2581423223018646, 0.8732479810714722, -0.577738344669342, -0.07235395163297653, -0.2190217673778534, -1.3677470684051514, -0.6215933561325073, 0.20638909935951233, 1.888930320739746, -0.7085585594177246, 1.0533407926559448, 0.8485832214355469, -0.6657320857048035, 0.058110468089580536, 0.4423508644104004, -0.31998831033706665, 0.8959813117980957, -1.0894908905029297, -0.39422696828842163, 0.9815955758094788, -0.1822209656238556, -0.3924410045146942, 1.5320581197738647, 0.8083709478378296, -0.9459900259971619, -0.27329733967781067, -0.24508953094482422, -0.8330218195915222, 0.006083907559514046, -1.6079875230789185, -0.13260258734226227, 0.130918949842453, -1.4405239820480347, -0.5705692172050476, -0.2330063283443451, 1.3050388097763062, -0.14083507657051086, 1.2888585329055786, -0.33336466550827026, -0.3640857934951782, -0.4711127281188965, -0.3128646910190582, 0.20346751809120178, -0.3056182563304901, -0.6879732012748718, 0.30268555879592896, -0.8582855463027954, 0.30933940410614014, 1.5242758989334106, 0.47241899371147156, -0.0747717022895813, 0.6177688241004944, 0.9838253259658813, 0.2390442192554474, -0.05908624455332756, -0.8757731318473816, -1.4728718996047974, 1.9954510927200317, -1.5226948261260986, 1.8426803350448608, 0.8499397039413452, -0.07715653628110886, -1.672623634338379, -1.8818862438201904, 1.2783743143081665, 1.229966640472412, 2.4054007530212402, 0.5787897706031799, 0.38645678758621216, -0.8210845589637756, -0.63729327917099, 0.16611149907112122, -0.9997206926345825, -0.7854149341583252, 0.12967529892921448, 2.3305604457855225, 1.837509274482727, -0.6956276297569275, -0.1306086778640747, -1.1211813688278198, 1.4306995868682861, -0.16662421822547913, 0.16903194785118103, 2.0447702407836914, -0.3119899332523346, -1.108939290046692, 1.2902512550354004, -2.2299139499664307, 0.22286543250083923, 1.9335635900497437, 0.37580835819244385, 0.02542923390865326, -1.4047625064849854, -0.6247743368148804, -0.33881181478500366, -0.34122028946876526, -1.2629432678222656, 0.49845457077026367, -0.2202254831790924, -0.9207621216773987, -1.4723141193389893, 0.05074499920010567, -1.1446096897125244, -1.6393319368362427, 0.5084440112113953, 1.763529658317566, 1.9381743669509888, -0.6647339463233948, 1.328725814819336, -0.329903781414032, 0.051784664392471313, 1.2181679010391235, 1.241217851638794, 3.1221132278442383, 2.021959066390991, -1.193839430809021, 0.6711095571517944, -0.22696393728256226, -0.4193514287471771, 1.0194849967956543, -1.050437331199646, 1.1738355159759521, -0.11510077118873596, -1.144651174545288, -1.1612391471862793, 1.0544764995574951, 0.5771303176879883, 0.0814589112997055, -0.5090185403823853, 1.1197713613510132, 0.05285666137933731, 1.415517807006836, 0.5580294728279114, -0.35579580068588257, 0.5960070490837097, -0.4896880090236664, -0.5112955570220947, 1.6873430013656616, 0.20474213361740112, -1.5816477537155151, -2.3787636756896973, -0.23237565159797668, -0.9412986040115356, -0.015694510191679, -0.6239635944366455, -1.0728977918624878, 1.6904447078704834, 0.5272182822227478, -1.2214895486831665, -0.30240553617477417, -0.33201658725738525, -0.7521276473999023, 2.6333653926849365, -1.4127373695373535, -0.18824490904808044, -0.8634384870529175, -0.5048589706420898, 1.6613385677337646, -1.215085744857788, -0.14790129661560059, -1.0793462991714478, -0.673671543598175, -1.1846611499786377, -0.48293349146842957, -0.11866171658039093, -0.925076425075531, 0.9085661172866821, 0.004295600578188896, -1.0763463973999023, -0.3425547778606415, -0.9400176405906677, 0.7322206497192383, -0.04495509713888168, 0.18067240715026855, 1.8563019037246704, 0.43093636631965637, -0.359116792678833, 0.6164506673812866, 1.2464216947555542, 0.644049346446991, -0.7018707394599915, 0.12223904579877853, -0.6125081181526184, 0.25672033429145813, -1.285849928855896, 0.27950319647789, -2.895076036453247, 0.7718502879142761, -0.11138607561588287, -0.06969912350177765, -0.10257605463266373, -1.28398859500885, 1.238868236541748, 2.556894540786743, -1.1765098571777344, 0.4615192413330078, 0.40106192231178284, 1.1335786581039429, -1.5792216062545776, 0.34780949354171753, -0.45802608132362366, 2.0981833934783936, 0.15416797995567322, 1.134626030921936, -0.6608335375785828, -2.1158559322357178, 0.6147506833076477, -1.1783185005187988, -1.0917211771011353, 0.5168337821960449, -0.8531482815742493, 0.13241562247276306, -1.5077232122421265, -0.18917888402938843, -0.8316600918769836, -1.3014131784439087, 0.7308704257011414, 0.10063183307647705, 0.44230201840400696, -0.6518715023994446, 0.33179184794425964, -2.2393860816955566, -1.4102979898452759, -0.36720967292785645, -0.8721309304237366, 0.5559086799621582, -0.33184191584587097, 0.7281280755996704, -0.03748650103807449, 0.10280140489339828, 0.23009419441223145, 1.4228079319000244, 3.3338654041290283, 0.09520916640758514, 0.34420400857925415, -0.07125875353813171, -0.94305819272995, 1.4040964841842651, 1.0255640745162964, 0.0938887670636177, -0.5576009154319763, -1.0755610466003418, 1.4137734174728394, 1.9824012517929077, 1.1016430854797363, 0.10666622221469879, -0.7681131362915039, -0.6068552732467651, 0.03784588724374771, 0.2657839357852936, 0.4805765450000763, 0.9915602207183838, 0.021678607910871506, 0.19074347615242004, 1.4582927227020264, 1.3042476177215576, -0.37291276454925537, 0.47446224093437195, -0.8692046999931335, -0.5008400082588196, 0.4358590841293335, 0.40173178911209106, 0.017155688256025314, 0.39603009819984436, -1.138144612312317, -0.27656489610671997, -0.17144697904586792, -1.015428066253662, -0.6534025073051453, -0.47275084257125854, -0.5097784399986267, 1.7099835872650146, 0.08676104247570038, -0.39478787779808044, -0.09759551286697388, -0.7136018872261047, -0.045657455921173096, -1.1053935289382935, 0.3542996346950531, -0.07424324005842209, 0.04252665489912033, -0.24323901534080505, 1.8246716260910034, -0.8147901892662048, -2.1727938652038574, 0.2364884912967682, 0.3710705041885376, -0.6112133264541626, 0.052783191204071045, 1.5675939321517944, 0.5849909782409668, 1.4826191663742065, 1.3925654888153076, 1.0306826829910278, -0.47818583250045776, -1.3163213729858398, 0.6202847957611084, 0.9468631744384766, -1.3550299406051636, 0.7630665302276611, 0.06596721708774567, -0.515896737575531, 0.8101563453674316, 1.3848875761032104, 0.30989864468574524, -2.016378879547119, 0.8758880496025085, -0.8578372597694397, 0.8624504208564758, 0.6916916370391846, 0.8365938663482666, 0.23492851853370667, 0.9012049436569214, -1.4587193727493286, -1.0714284181594849, -0.8459838032722473, -0.5438426733016968, 2.04543399810791, -0.18294933438301086, 0.4151279330253601, -0.30914634466171265, -1.1376898288726807, -0.06608675420284271, 0.7173837423324585, 0.49406230449676514, -0.29525333642959595, 0.80282062292099, -0.5809177756309509, -1.1155376434326172, -1.323958396911621, -0.37508514523506165, -0.8281888961791992, -0.868603527545929, 0.9864161014556885, 0.9599442481994629, 0.5197641849517822, 1.9259004592895508, 0.6425554156303406, 0.16429880261421204, -2.670555591583252, 0.7707530856132507, 0.31521305441856384, -0.026000095531344414, 0.9820672869682312, 0.24590587615966797, 1.1681602001190186, 0.010800691321492195, 0.48553335666656494, -2.400980234146118, 2.1964826583862305, -0.19910475611686707, 0.8204121589660645, 0.07046543806791306, -0.0538465641438961, 1.2174053192138672, 0.6596705913543701, 0.44493353366851807, -1.0530076026916504, 0.7152741551399231, -0.6105124950408936, 1.2265510559082031, 0.8296992778778076, -0.6495658755302429, -0.04266646131873131, 1.2648042440414429, 0.5379931330680847, -0.3216088116168976, -1.0315121412277222, -0.8878831267356873, 0.9536957740783691, 1.8085453510284424, -0.10347079485654831, 0.016274726018309593, 0.8245724439620972, 0.7391893267631531, -1.205398440361023, -0.012635339982807636, -0.871407151222229, -0.6675798892974854, 1.6465768814086914, 2.1219797134399414, 0.08923137933015823, -0.18163436651229858, -0.6630855798721313, -1.2765891551971436, 0.7215149998664856, 0.02126004546880722, 0.20953446626663208, 0.7793523669242859, -0.5981738567352295, 1.1637729406356812, 0.8623524904251099, 0.9261627793312073, 0.09958072751760483, 0.409986287355423, 0.25196608901023865, -0.2904282808303833, -1.2019208669662476, -0.3528877794742584, -1.2430299520492554, -2.4996023178100586, 0.49203628301620483, -0.33913496136665344, -1.5285470485687256, 0.053458645939826965, -1.0801112651824951, 0.8667651414871216, -0.6534599661827087, -1.1573281288146973, -1.5830235481262207, 0.2004399299621582, -0.08884519338607788, 0.9409058094024658, -1.5998245477676392, -0.16264498233795166, 1.1787904500961304, 0.7294293642044067, -0.46332138776779175, 0.8956839442253113, 0.25673410296440125, 0.9936344623565674, 0.8110338449478149, -0.3798588812351227, 0.3541003465652466, 0.14860263466835022, -1.359792947769165, 0.4906332492828369, 1.1689486503601074, 0.26207712292671204, 1.3565194606781006, -0.5586327910423279, 0.15704479813575745, 0.4975021481513977, -0.39486929774284363, -0.5033512711524963, -0.4893035888671875, 0.7063028216362, 0.008095312863588333, -1.0350451469421387, 0.025614038109779358, -0.11217394471168518, -0.16922417283058167, 0.30872368812561035, -1.4310178756713867, -0.271348774433136, -0.44147107005119324, -0.5322644114494324, -1.2787249088287354, -0.06622776389122009, 1.3580378293991089, -0.8123560547828674, -0.2039821445941925, 0.6675320863723755, 0.4428528845310211, 0.6557126045227051, 0.6766420602798462, -0.5952446460723877, -0.4263003468513489, -0.2795148491859436, -0.2927387058734894, 0.14970451593399048, 1.2653223276138306, -0.17893797159194946, -1.0160393714904785, 0.7031038403511047, -0.3927595913410187, 0.1326272189617157, 2.013561725616455, 0.021988660097122192, -0.7699245810508728, 0.45987316966056824, -0.7582595348358154, 1.8133844137191772, 1.5993503332138062, 1.2872141599655151, -0.013108445331454277, -0.9948926568031311, 0.3749604821205139, -0.10588870197534561, -0.43758150935173035, 0.787317156791687, 0.5491072535514832, -0.14450475573539734, -1.395930290222168, 0.519163191318512, 1.355194330215454, -0.9033694863319397, -0.9115390777587891, 0.20731255412101746, -0.9107076525688171, 1.1262859106063843, 0.5935268402099609, 0.5000830888748169, 0.2168973684310913, 1.6298935413360596, 0.649978756904602, -0.41783732175827026, 0.3593566417694092, 0.5683166980743408, -0.25340765714645386, -2.0644278526306152, -1.2204502820968628, 0.20811083912849426, -0.5037326216697693, -1.5072364807128906, 1.248652696609497, -1.1092236042022705, -0.8942285180091858, 0.5289686322212219, 0.22390422224998474, 1.4256418943405151, 0.37815409898757935, 1.6923835277557373, 2.046156406402588, 0.9583530426025391, 0.27753299474716187, 1.3391954898834229, 0.052227042615413666, -0.5149393677711487, 1.8655201196670532, -0.35264191031455994, 0.5851942896842957, 1.102906584739685, -0.3949581980705261, -1.1425457000732422, -0.7630252242088318, -1.1298290491104126, -0.6867210268974304, 1.1509575843811035, 0.12778878211975098, -1.200494408607483, 0.07874791324138641, 1.5326048135757446, 0.15365514159202576, -0.2586001455783844, 0.4729037284851074, 0.3463723659515381, -0.7450087666511536, -0.03416852653026581, -1.0695074796676636, 0.3895427882671356, -0.16858553886413574, -0.4049012362957001, 0.19594120979309082, 0.6719312071800232, 1.1957076787948608, -0.13998839259147644, 0.11367595195770264, 1.207263708114624, -1.4285454750061035, 1.4039548635482788, -0.6535049676895142, 0.2405329942703247, -2.3922009468078613, 1.424445390701294, -0.7249056696891785, 1.8609654903411865, -2.703327178955078, 0.36410221457481384, -0.5799151659011841, -0.33639299869537354, 0.2882063686847687, -0.36641907691955566, 0.21782582998275757, 0.003084360621869564, -1.1747441291809082, -0.030874580144882202, -0.8112123012542725, 0.5195492506027222, 1.262374997138977, 1.4007983207702637, -1.1479145288467407, -0.28733158111572266, -1.7276679277420044, -0.1297743022441864, -0.7334296703338623, 0.37626972794532776, -1.9152380228042603, -0.0021915691904723644, -1.821315050125122, -2.1556124687194824, -1.5173513889312744, -1.0007529258728027, 1.0091484785079956, 0.14181643724441528, -0.8862100839614868, 0.9483007788658142, -0.3997957110404968, -1.696069598197937, 1.0877882242202759, -2.3222856521606445 ]
https://github.com/huggingface/datasets/issues/4528
Memory leak when iterating a Dataset
Here is a modified repro example that makes it easier to see the leak: ``` $ cat ds2.py import gc, sys import time from datasets import load_dataset import os, psutil process = psutil.Process(os.getpid()) print(process.memory_info().rss/2**20) corpus = load_dataset("BeIR/msmarco", 'corpus', keep_in_memory=False, streaming=False)['corpus'] corpus = corpus.select(range(200000)) print(process.memory_info().rss/2**20) batch = None mem_before_start = psutil.Process(os.getpid()).memory_info().rss / 2**20 step = 20000 for i in range(0, 10*step, step): mem_before = psutil.Process(os.getpid()).memory_info().rss / 2**20 batch = corpus[i:i+step] import objgraph #objgraph.show_refs([batch]) #objgraph.show_refs([corpus]) #sys.exit() gc.collect() mem_after = psutil.Process(os.getpid()).memory_info().rss / 2**20 print(f"{i:6d} {mem_after - mem_before:12.4f} {mem_after - mem_before_start:12.4f}") ``` Let's run: ``` $ python ds2.py 0 36.5391 36.5391 20000 10.4609 47.0000 40000 5.9766 52.9766 60000 7.8906 60.8672 80000 6.0586 66.9258 100000 8.4453 75.3711 120000 6.7422 82.1133 140000 8.5664 90.6797 160000 5.7344 96.4141 180000 8.3398 104.7539 ``` You can see the last column of total RSS memory keeps on growing in MBs. The mid column is by how much it was grown during a single iteration of the repro script (20000 items)
e## Describe the bug It seems that memory never gets freed after iterating a `Dataset` (using `.map()` or a simple `for` loop) ## Steps to reproduce the bug ```python import gc import logging import time import pyarrow from datasets import load_dataset from tqdm import trange import os, psutil logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) process = psutil.Process(os.getpid()) print(process.memory_info().rss) # output: 633507840 bytes corpus = load_dataset("BeIR/msmarco", 'corpus', keep_in_memory=False, streaming=False)['corpus'] # or "BeIR/trec-covid" for a smaller dataset print(process.memory_info().rss) # output: 698601472 bytes logger.info("Applying method to all examples in all splits") for i in trange(0, len(corpus), 1000): batch = corpus[i:i+1000] data = pyarrow.total_allocated_bytes() if data > 0: logger.info(f"{i}/{len(corpus)}: {data}") print(process.memory_info().rss) # output: 3788247040 bytes del batch gc.collect() print(process.memory_info().rss) # output: 3788247040 bytes logger.info("Done...") time.sleep(100) ``` ## Expected results Limited memory usage, and memory to be freed after processing ## Actual results Memory leak ![test](https://user-images.githubusercontent.com/29777165/174578276-f2c37e6c-b5d8-4985-b4d8-8413eb2b3241.png) You can see how the memory allocation keeps increasing until it reaches a steady state when we hit the `time.sleep(100)`, which showcases that even the garbage collector couldn't free the allocated memory ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-5.4.0-90-generic-x86_64-with-glibc2.31 - Python version: 3.9.7 - PyArrow version: 8.0.0 - Pandas version: 1.4.2
699
160
Memory leak when iterating a Dataset e## Describe the bug It seems that memory never gets freed after iterating a `Dataset` (using `.map()` or a simple `for` loop) ## Steps to reproduce the bug ```python import gc import logging import time import pyarrow from datasets import load_dataset from tqdm import trange import os, psutil logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) process = psutil.Process(os.getpid()) print(process.memory_info().rss) # output: 633507840 bytes corpus = load_dataset("BeIR/msmarco", 'corpus', keep_in_memory=False, streaming=False)['corpus'] # or "BeIR/trec-covid" for a smaller dataset print(process.memory_info().rss) # output: 698601472 bytes logger.info("Applying method to all examples in all splits") for i in trange(0, len(corpus), 1000): batch = corpus[i:i+1000] data = pyarrow.total_allocated_bytes() if data > 0: logger.info(f"{i}/{len(corpus)}: {data}") print(process.memory_info().rss) # output: 3788247040 bytes del batch gc.collect() print(process.memory_info().rss) # output: 3788247040 bytes logger.info("Done...") time.sleep(100) ``` ## Expected results Limited memory usage, and memory to be freed after processing ## Actual results Memory leak ![test](https://user-images.githubusercontent.com/29777165/174578276-f2c37e6c-b5d8-4985-b4d8-8413eb2b3241.png) You can see how the memory allocation keeps increasing until it reaches a steady state when we hit the `time.sleep(100)`, which showcases that even the garbage collector couldn't free the allocated memory ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-5.4.0-90-generic-x86_64-with-glibc2.31 - Python version: 3.9.7 - PyArrow version: 8.0.0 - Pandas version: 1.4.2 Here is a modified repro example that makes it easier to see the leak: ``` $ cat ds2.py import gc, sys import time from datasets import load_dataset import os, psutil process = psutil.Process(os.getpid()) print(process.memory_info().rss/2**20) corpus = load_dataset("BeIR/msmarco", 'corpus', keep_in_memory=False, streaming=False)['corpus'] corpus = corpus.select(range(200000)) print(process.memory_info().rss/2**20) batch = None mem_before_start = psutil.Process(os.getpid()).memory_info().rss / 2**20 step = 20000 for i in range(0, 10*step, step): mem_before = psutil.Process(os.getpid()).memory_info().rss / 2**20 batch = corpus[i:i+step] import objgraph #objgraph.show_refs([batch]) #objgraph.show_refs([corpus]) #sys.exit() gc.collect() mem_after = psutil.Process(os.getpid()).memory_info().rss / 2**20 print(f"{i:6d} {mem_after - mem_before:12.4f} {mem_after - mem_before_start:12.4f}") ``` Let's run: ``` $ python ds2.py 0 36.5391 36.5391 20000 10.4609 47.0000 40000 5.9766 52.9766 60000 7.8906 60.8672 80000 6.0586 66.9258 100000 8.4453 75.3711 120000 6.7422 82.1133 140000 8.5664 90.6797 160000 5.7344 96.4141 180000 8.3398 104.7539 ``` You can see the last column of total RSS memory keeps on growing in MBs. The mid column is by how much it was grown during a single iteration of the repro script (20000 items)
[ -1.3384850025177002, -0.9145268201828003, -0.6335321664810181, 1.5369683504104614, -0.08457894623279572, -1.1772884130477905, 0.11131684482097626, -0.9808344841003418, 1.7018029689788818, -0.7248932123184204, 0.4140302240848541, -1.662846565246582, 0.11094708740711212, -0.5293395519256592, -0.7848016023635864, -0.8183043599128723, -0.4107159674167633, -0.7637895345687866, 1.0875799655914307, 2.5541112422943115, 1.2444592714309692, -1.4268178939819336, 2.7559614181518555, 0.6777305006980896, -0.23346662521362305, -1.043217420578003, 0.48983651399612427, -0.09239082038402557, -1.3901931047439575, -0.4493486285209656, -0.9860816597938538, -0.04441603273153305, -0.4745830297470093, -0.5796821117401123, 0.03970181941986084, 0.41661450266838074, -0.2579886317253113, -0.5864574909210205, -0.5893715620040894, -0.7365508079528809, 0.4716739356517792, -0.3981398642063141, 0.8633008003234863, -0.25493326783180237, 1.7691632509231567, -0.5998832583427429, 0.5833763480186462, 0.6438826322555542, 1.4070565700531006, 0.2004614621400833, -0.06846173107624054, 0.5459187030792236, 0.3673214018344879, 0.003368295729160309, 0.5516700744628906, 1.1907336711883545, 0.7330886721611023, 0.4132133424282074, 0.7556057572364807, -2.198892593383789, 1.2756075859069824, -1.0531309843063354, 0.29278382658958435, 1.2885627746582031, -1.0358487367630005, 0.3058997392654419, -1.8029882907867432, -0.044428955763578415, 0.57003253698349, -2.225886106491089, 0.24889510869979858, -1.2830530405044556, -0.4417780637741089, 1.0594784021377563, 0.4350367784500122, -1.250866413116455, 0.135572612285614, -0.49661198258399963, 0.9868200421333313, 0.39125847816467285, 1.193152904510498, -1.6502808332443237, -0.10889400541782379, -0.34804219007492065, 0.13670024275779724, -1.2191296815872192, -1.582030177116394, 0.6131916046142578, 0.6219406723976135, 0.5509868860244751, -0.12141022086143494, 1.0872689485549927, -1.0087343454360962, 0.7954327464103699, -1.0067334175109863, -1.7446651458740234, -1.4767425060272217, -2.247995138168335, -2.285161018371582, 0.7447989583015442, -0.4049115777015686, -0.49769681692123413, 2.182659149169922, -1.045341968536377, -1.7859208583831787, 1.0809468030929565, 0.20316359400749207, -0.07631789147853851, 2.3504185676574707, 0.17832797765731812, -0.783183753490448, 0.5251326560974121, -0.6620255708694458, 0.7505071759223938, -0.36197757720947266, 1.380924940109253, 0.4230940639972687, -0.9889947175979614, 1.5414931774139404, -0.27733033895492554, 0.5754455327987671, -0.5558353066444397, -0.4610019624233246, -0.7397232055664062, 0.29944881796836853, 2.0238475799560547, -0.31486743688583374, 1.4603501558303833, -0.378370076417923, -1.5893911123275757, -1.5986549854278564, 0.8546454310417175, 0.5119732022285461, -0.7482088208198547, 0.23190966248512268, -0.5148354172706604, 0.0560479573905468, 0.020060935989022255, 1.1634001731872559, 1.313699722290039, 0.6905098557472229, -0.3184709846973419, -0.8866791725158691, 0.14472970366477966, -0.04381284862756729, -0.7052406072616577, -1.6360282897949219, -0.4174506664276123, 0.11665818095207214, 0.677351176738739, -1.1369541883468628, 1.7790015935897827, 0.9390631318092346, 1.909914493560791, 1.0566563606262207, -0.26289743185043335, 1.4864282608032227, 0.06577928364276886, 1.7982897758483887, -0.5010568499565125, 0.6251207590103149, -0.43014779686927795, -1.232253909111023, 0.8015046119689941, -0.3770257830619812, -2.098956346511841, -0.7383888363838196, -0.72151780128479, -0.15745899081230164, -0.8002839684486389, 0.93073970079422, -0.27629563212394714, -1.3723554611206055, 0.26112058758735657, -0.8554211258888245, 0.1692247986793518, -1.236707091331482, 0.25919386744499207, 0.6825858950614929, -0.6098272204399109, 0.1457175761461258, -0.24708998203277588, -1.2438766956329346, -0.4287305772304535, 0.22563447058200836, 1.8541367053985596, -0.7903463840484619, 0.9880530834197998, 1.0684854984283447, -0.6642816066741943, 0.019734418019652367, 0.3214814364910126, -0.27003422379493713, 0.9740352630615234, -1.0698604583740234, -0.36039435863494873, 1.2819621562957764, -0.17724904417991638, -0.5403770208358765, 1.3982690572738647, 0.7075003981590271, -0.968191385269165, -0.2036365419626236, -0.07921521365642548, -0.9306802153587341, 0.04200204089283943, -1.5771393775939941, -0.04800517484545708, 0.538080632686615, -1.5446182489395142, -0.48561719059944153, -0.17182548344135284, 1.2201660871505737, -0.07815834879875183, 1.4630895853042603, -0.3728535771369934, -0.04106726497411728, -0.2642860412597656, -0.2847224771976471, 0.13399292528629303, -0.2818067669868469, -0.6454787850379944, 0.21672266721725464, -0.7657760977745056, 0.35086295008659363, 1.4193291664123535, 0.3794279396533966, 0.03959037736058235, 0.4989489018917084, 1.1155017614364624, 0.33102086186408997, -0.1517399400472641, -0.8009468913078308, -1.6446683406829834, 2.0614891052246094, -1.390977382659912, 1.9467440843582153, 0.7803720235824585, -0.040241215378046036, -1.7777423858642578, -1.8963210582733154, 1.3201706409454346, 1.1531057357788086, 2.3732175827026367, 0.5186188220977783, 0.4492744207382202, -0.8171608448028564, -0.6813181638717651, 0.33431705832481384, -1.0097107887268066, -0.798440158367157, 0.13741636276245117, 2.390550374984741, 1.836472511291504, -0.4063081443309784, -0.18017593026161194, -1.0272440910339355, 1.3774240016937256, -0.19105327129364014, 0.18423010408878326, 1.910849928855896, -0.16088488698005676, -1.040307641029358, 1.328582525253296, -2.2918426990509033, 0.1844860315322876, 2.0802040100097656, 0.25092124938964844, 0.04756017029285431, -1.3855290412902832, -0.6223284602165222, -0.31993111968040466, -0.346021831035614, -1.237081527709961, 0.5429279804229736, -0.26860761642456055, -0.8776731491088867, -1.3398741483688354, 0.09200610220432281, -1.1891655921936035, -1.668881893157959, 0.18417127430438995, 1.8071852922439575, 2.034899950027466, -0.7247388958930969, 1.5568794012069702, -0.34064340591430664, 0.18075482547283173, 1.218347191810608, 1.2528575658798218, 3.1453495025634766, 1.8656994104385376, -1.3313689231872559, 0.6566839218139648, -0.1865302473306656, -0.47069528698921204, 1.1878095865249634, -1.3035882711410522, 1.2494972944259644, -0.07078304886817932, -1.1812113523483276, -1.0765063762664795, 0.9615911245346069, 0.46677878499031067, -0.0015569031238555908, -0.46280279755592346, 1.1478163003921509, 0.05601797625422478, 1.2730565071105957, 0.5269185900688171, -0.2545194625854492, 0.6226682662963867, -0.3388828635215759, -0.5215110778808594, 1.4800817966461182, 0.20289741456508636, -1.4053521156311035, -2.1760096549987793, -0.1818048506975174, -0.8417953848838806, 0.09873875975608826, -0.6934803128242493, -0.964791476726532, 1.609287142753601, 0.29208970069885254, -1.2506611347198486, -0.2547835111618042, -0.3285486698150635, -0.5263469219207764, 2.738520383834839, -1.3322199583053589, -0.21339206397533417, -1.099355697631836, -0.6377125382423401, 1.6297227144241333, -1.1856235265731812, -0.29126080870628357, -0.9948955178260803, -0.4902268350124359, -1.2204046249389648, -0.6131055951118469, 0.0012137079611420631, -0.9814831614494324, 0.784942626953125, 0.16651035845279694, -1.2101819515228271, -0.2953174114227295, -0.7475414872169495, 0.9251830577850342, -0.23205548524856567, 0.11144022643566132, 1.8444832563400269, 0.41079291701316833, -0.3911452889442444, 0.8048933148384094, 1.195030927658081, 0.5704736709594727, -0.5322514176368713, 0.15046590566635132, -0.6866086721420288, 0.34028762578964233, -1.3177490234375, 0.2712463438510895, -2.787916660308838, 0.6413355469703674, -0.05259646847844124, -0.0010134954936802387, -0.05803969129920006, -1.3329994678497314, 1.032197117805481, 2.6100971698760986, -1.1953957080841064, 0.5413855910301208, 0.29521700739860535, 1.0890485048294067, -1.585744023323059, 0.24033905565738678, -0.47328537702560425, 2.1418023109436035, 0.2598620653152466, 1.2137597799301147, -0.5163244605064392, -2.211954355239868, 0.6398868560791016, -1.2750297784805298, -1.078134536743164, 0.7314335703849792, -0.9235405325889587, 0.1275423765182495, -1.33966863155365, -0.2713388204574585, -0.8147551417350769, -1.0268739461898804, 0.6474725604057312, 0.060378577560186386, 0.37190666794776917, -0.5647369623184204, 0.3549894094467163, -2.167710781097412, -1.3491731882095337, -0.2177918553352356, -0.9747577905654907, 0.4969468414783478, -0.34890007972717285, 0.6256730556488037, -0.15657509863376617, -0.013332538306713104, 0.3763866722583771, 1.4709935188293457, 3.3474762439727783, 0.16960591077804565, 0.2850726246833801, -0.18767599761486053, -0.9632188081741333, 1.4289683103561401, 0.9281050562858582, -0.2886578440666199, -0.6708694100379944, -1.0562368631362915, 1.307366132736206, 1.9038302898406982, 0.9157474637031555, 0.024887293577194214, -0.8248221278190613, -0.8492593765258789, -0.011427443474531174, 0.06751704216003418, 0.43883493542671204, 0.9251143336296082, 0.08574062585830688, 0.10416129231452942, 1.482383370399475, 1.1395270824432373, -0.43369725346565247, 0.37036392092704773, -0.8284739851951599, -0.48546791076660156, 0.4651343524456024, 0.260829359292984, -0.020511675626039505, 0.3540109395980835, -0.9972814321517944, -0.27121439576148987, -0.3500790297985077, -0.9222460985183716, -0.7873998880386353, -0.4006352722644806, -0.2929019629955292, 1.6765313148498535, 0.15878885984420776, -0.5236846804618835, -0.009972965344786644, -0.7559257745742798, -0.11611758172512054, -1.0031172037124634, 0.2998655438423157, -0.11807239055633545, -0.07812118530273438, -0.06264480948448181, 1.6414092779159546, -0.8751213550567627, -2.1437971591949463, 0.27695247530937195, 0.2309536635875702, -0.30139800906181335, 0.1533959060907364, 1.6796671152114868, 0.5931340456008911, 1.4585314989089966, 1.3515251874923706, 0.8912855982780457, -0.6114252209663391, -1.3274673223495483, 0.7051919102668762, 0.9270065426826477, -1.4197158813476562, 0.8322098255157471, -0.062317222356796265, -0.45067015290260315, 0.581731379032135, 1.32280695438385, 0.5624212026596069, -2.025648832321167, 0.9099156856536865, -0.971139132976532, 0.7687530517578125, 0.6755737662315369, 0.7052918672561646, 0.22417664527893066, 0.8255143761634827, -1.252257227897644, -1.1569440364837646, -0.7643611431121826, -0.787177324295044, 1.9932990074157715, -0.3074588477611542, 0.49177420139312744, -0.19777676463127136, -1.3295223712921143, -0.23529008030891418, 0.6679306626319885, 0.22846123576164246, -0.5460725426673889, 0.8098971247673035, -0.67107093334198, -1.151606798171997, -1.3884825706481934, -0.5447949171066284, -1.0043599605560303, -0.9476097226142883, 1.0031943321228027, 0.7157698273658752, 0.2911321818828583, 1.9145196676254272, 0.6729229092597961, 0.18276913464069366, -2.623737096786499, 0.8684680461883545, 0.23310235142707825, 0.0069708917289972305, 0.8922028541564941, 0.3029443323612213, 0.9657825827598572, -0.0549330860376358, 0.570200502872467, -2.3855016231536865, 2.2863388061523438, -0.2124508172273636, 0.7326598763465881, -0.015694813802838326, -0.15686987340450287, 1.0805485248565674, 0.5150247812271118, 0.5610941648483276, -1.1332924365997314, 0.6311315298080444, -0.5583606958389282, 1.2684706449508667, 0.7156271934509277, -0.9139600396156311, 0.027206797152757645, 1.3427256345748901, 0.3291120231151581, -0.49985063076019287, -1.0355212688446045, -0.9386095404624939, 1.029534935951233, 1.774867296218872, -0.046145420521497726, 0.058828238397836685, 0.829871416091919, 0.7076501846313477, -1.3025223016738892, 0.004029370844364166, -0.7474145293235779, -0.7390101552009583, 1.6582167148590088, 2.185993194580078, -0.18882425129413605, -0.23109257221221924, -0.6936927437782288, -1.301915168762207, 0.7827252149581909, -0.05287344381213188, 0.08520059287548065, 0.662516176700592, -0.6194643974304199, 1.0802251100540161, 0.8977918028831482, 0.9498695135116577, 0.18859389424324036, 0.17548057436943054, 0.367913156747818, -0.23092949390411377, -1.1483997106552124, -0.28055426478385925, -1.0527536869049072, -2.625805139541626, 0.44702428579330444, -0.1629984974861145, -1.4637361764907837, 0.12556782364845276, -0.9836306571960449, 0.8812896013259888, -0.572729229927063, -1.1300687789916992, -1.5000877380371094, 0.18866628408432007, -0.05930615961551666, 0.9456791281700134, -1.617162823677063, -0.17613185942173004, 1.1510124206542969, 0.9661099910736084, -0.6330968141555786, 0.9260131120681763, 0.23910942673683167, 0.9648703336715698, 0.9662212133407593, -0.3662777841091156, 0.6150810718536377, 0.04384070262312889, -1.300704002380371, 0.5089969635009766, 1.266975998878479, 0.23214545845985413, 1.510209560394287, -0.4664781987667084, -0.019208673387765884, 0.4072408676147461, -0.6331440806388855, -0.39851680397987366, -0.506109893321991, 0.635337769985199, 0.07425723969936371, -1.0637575387954712, -0.052349455654621124, -0.06381109356880188, -0.289190411567688, 0.1829669028520584, -1.5039331912994385, -0.0912076085805893, -0.31566908955574036, -0.6845471858978271, -1.1703206300735474, -0.12229180335998535, 1.4424934387207031, -0.9167815446853638, -0.23241610825061798, 0.4794727861881256, 0.3141816556453705, 0.5444867610931396, 0.6681566834449768, -0.7777053117752075, -0.33305785059928894, -0.13644208014011383, -0.43175065517425537, 0.33805081248283386, 1.361586570739746, 0.010128529742360115, -0.9480806589126587, 0.6745554804801941, -0.3224374055862427, 0.10094541311264038, 1.8168251514434814, 0.06504467129707336, -0.7626427412033081, 0.21513037383556366, -0.7211582064628601, 1.9583829641342163, 1.701045036315918, 1.301458716392517, -0.16962367296218872, -1.0282549858093262, 0.6380096673965454, -0.3281313478946686, -0.3069809377193451, 0.8282854557037354, 0.3960787057876587, -0.2750907242298126, -1.3938661813735962, 0.7731022238731384, 1.232783555984497, -0.9080336689949036, -0.7978048920631409, 0.08006739616394043, -0.8366879820823669, 1.145310878753662, 0.7264685034751892, 0.2793166935443878, 0.21635867655277252, 1.715800404548645, 0.7929825186729431, -0.38826116919517517, 0.5467826724052429, 0.5381513237953186, -0.15457040071487427, -2.224123239517212, -1.0493422746658325, 0.3517155349254608, -0.4988813102245331, -1.5215860605239868, 1.2583765983581543, -1.0777897834777832, -0.9289003610610962, 0.5137719511985779, 0.02817029505968094, 1.524834156036377, 0.3765231668949127, 1.570311427116394, 2.042499303817749, 0.9262290596961975, 0.3143332302570343, 1.2307121753692627, -0.07400685548782349, -0.3808481991291046, 1.8166184425354004, -0.35431113839149475, 0.45248305797576904, 1.0812464952468872, -0.353370726108551, -1.1081596612930298, -0.7673397660255432, -1.3039451837539673, -0.8168124556541443, 1.1407181024551392, 0.05436451733112335, -1.0893936157226562, 0.28307172656059265, 1.57583487033844, 0.18731731176376343, -0.296901136636734, 0.621277391910553, 0.4409649968147278, -0.8066783547401428, -0.08249658346176147, -0.8803600668907166, 0.4612860381603241, -0.1625208705663681, -0.44505786895751953, 0.2861472964286804, 0.4468940198421478, 1.3215962648391724, 0.03443707525730133, -0.019783932715654373, 1.117178201675415, -1.4970366954803467, 1.4800703525543213, -0.722058117389679, 0.30193978548049927, -2.3265161514282227, 1.4384902715682983, -0.8268371820449829, 1.9566737413406372, -2.7120144367218018, 0.5396048426628113, -0.6034388542175293, -0.497915655374527, 0.293205589056015, -0.3711714446544647, 0.11469566822052002, -0.09569203853607178, -1.180405855178833, -0.1605474054813385, -0.6894059777259827, 0.6486825346946716, 1.125998854637146, 1.3281073570251465, -1.1031700372695923, -0.17046023905277252, -1.7155089378356934, -0.09031336009502411, -0.7241201996803284, 0.26578280329704285, -1.880241870880127, -0.12035523355007172, -1.980781078338623, -2.356173515319824, -1.2442219257354736, -0.7107882499694824, 1.132794737815857, 0.21268031001091003, -0.8421138525009155, 1.1476179361343384, -0.3837628662586212, -1.787214756011963, 1.0917617082595825, -2.247196912765503 ]
https://github.com/huggingface/datasets/issues/4528
Memory leak when iterating a Dataset
@NouamaneTazi, please check my analysis here https://github.com/huggingface/datasets/issues/4883#issuecomment-1242599722 so if you agree with my research this Issue can be closed as well. I also made a suggestion at how to proceed to hunt for a real leak here https://github.com/huggingface/datasets/issues/4883#issuecomment-1242600626 you may find this one to be useful as well https://github.com/huggingface/datasets/issues/4883#issuecomment-1242597966
e## Describe the bug It seems that memory never gets freed after iterating a `Dataset` (using `.map()` or a simple `for` loop) ## Steps to reproduce the bug ```python import gc import logging import time import pyarrow from datasets import load_dataset from tqdm import trange import os, psutil logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) process = psutil.Process(os.getpid()) print(process.memory_info().rss) # output: 633507840 bytes corpus = load_dataset("BeIR/msmarco", 'corpus', keep_in_memory=False, streaming=False)['corpus'] # or "BeIR/trec-covid" for a smaller dataset print(process.memory_info().rss) # output: 698601472 bytes logger.info("Applying method to all examples in all splits") for i in trange(0, len(corpus), 1000): batch = corpus[i:i+1000] data = pyarrow.total_allocated_bytes() if data > 0: logger.info(f"{i}/{len(corpus)}: {data}") print(process.memory_info().rss) # output: 3788247040 bytes del batch gc.collect() print(process.memory_info().rss) # output: 3788247040 bytes logger.info("Done...") time.sleep(100) ``` ## Expected results Limited memory usage, and memory to be freed after processing ## Actual results Memory leak ![test](https://user-images.githubusercontent.com/29777165/174578276-f2c37e6c-b5d8-4985-b4d8-8413eb2b3241.png) You can see how the memory allocation keeps increasing until it reaches a steady state when we hit the `time.sleep(100)`, which showcases that even the garbage collector couldn't free the allocated memory ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-5.4.0-90-generic-x86_64-with-glibc2.31 - Python version: 3.9.7 - PyArrow version: 8.0.0 - Pandas version: 1.4.2
699
49
Memory leak when iterating a Dataset e## Describe the bug It seems that memory never gets freed after iterating a `Dataset` (using `.map()` or a simple `for` loop) ## Steps to reproduce the bug ```python import gc import logging import time import pyarrow from datasets import load_dataset from tqdm import trange import os, psutil logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) process = psutil.Process(os.getpid()) print(process.memory_info().rss) # output: 633507840 bytes corpus = load_dataset("BeIR/msmarco", 'corpus', keep_in_memory=False, streaming=False)['corpus'] # or "BeIR/trec-covid" for a smaller dataset print(process.memory_info().rss) # output: 698601472 bytes logger.info("Applying method to all examples in all splits") for i in trange(0, len(corpus), 1000): batch = corpus[i:i+1000] data = pyarrow.total_allocated_bytes() if data > 0: logger.info(f"{i}/{len(corpus)}: {data}") print(process.memory_info().rss) # output: 3788247040 bytes del batch gc.collect() print(process.memory_info().rss) # output: 3788247040 bytes logger.info("Done...") time.sleep(100) ``` ## Expected results Limited memory usage, and memory to be freed after processing ## Actual results Memory leak ![test](https://user-images.githubusercontent.com/29777165/174578276-f2c37e6c-b5d8-4985-b4d8-8413eb2b3241.png) You can see how the memory allocation keeps increasing until it reaches a steady state when we hit the `time.sleep(100)`, which showcases that even the garbage collector couldn't free the allocated memory ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-5.4.0-90-generic-x86_64-with-glibc2.31 - Python version: 3.9.7 - PyArrow version: 8.0.0 - Pandas version: 1.4.2 @NouamaneTazi, please check my analysis here https://github.com/huggingface/datasets/issues/4883#issuecomment-1242599722 so if you agree with my research this Issue can be closed as well. I also made a suggestion at how to proceed to hunt for a real leak here https://github.com/huggingface/datasets/issues/4883#issuecomment-1242600626 you may find this one to be useful as well https://github.com/huggingface/datasets/issues/4883#issuecomment-1242597966
[ -1.3384850025177002, -0.9145268201828003, -0.6335321664810181, 1.5369683504104614, -0.08457894623279572, -1.1772884130477905, 0.11131684482097626, -0.9808344841003418, 1.7018029689788818, -0.7248932123184204, 0.4140302240848541, -1.662846565246582, 0.11094708740711212, -0.5293395519256592, -0.7848016023635864, -0.8183043599128723, -0.4107159674167633, -0.7637895345687866, 1.0875799655914307, 2.5541112422943115, 1.2444592714309692, -1.4268178939819336, 2.7559614181518555, 0.6777305006980896, -0.23346662521362305, -1.043217420578003, 0.48983651399612427, -0.09239082038402557, -1.3901931047439575, -0.4493486285209656, -0.9860816597938538, -0.04441603273153305, -0.4745830297470093, -0.5796821117401123, 0.03970181941986084, 0.41661450266838074, -0.2579886317253113, -0.5864574909210205, -0.5893715620040894, -0.7365508079528809, 0.4716739356517792, -0.3981398642063141, 0.8633008003234863, -0.25493326783180237, 1.7691632509231567, -0.5998832583427429, 0.5833763480186462, 0.6438826322555542, 1.4070565700531006, 0.2004614621400833, -0.06846173107624054, 0.5459187030792236, 0.3673214018344879, 0.003368295729160309, 0.5516700744628906, 1.1907336711883545, 0.7330886721611023, 0.4132133424282074, 0.7556057572364807, -2.198892593383789, 1.2756075859069824, -1.0531309843063354, 0.29278382658958435, 1.2885627746582031, -1.0358487367630005, 0.3058997392654419, -1.8029882907867432, -0.044428955763578415, 0.57003253698349, -2.225886106491089, 0.24889510869979858, -1.2830530405044556, -0.4417780637741089, 1.0594784021377563, 0.4350367784500122, -1.250866413116455, 0.135572612285614, -0.49661198258399963, 0.9868200421333313, 0.39125847816467285, 1.193152904510498, -1.6502808332443237, -0.10889400541782379, -0.34804219007492065, 0.13670024275779724, -1.2191296815872192, -1.582030177116394, 0.6131916046142578, 0.6219406723976135, 0.5509868860244751, -0.12141022086143494, 1.0872689485549927, -1.0087343454360962, 0.7954327464103699, -1.0067334175109863, -1.7446651458740234, -1.4767425060272217, -2.247995138168335, -2.285161018371582, 0.7447989583015442, -0.4049115777015686, -0.49769681692123413, 2.182659149169922, -1.045341968536377, -1.7859208583831787, 1.0809468030929565, 0.20316359400749207, -0.07631789147853851, 2.3504185676574707, 0.17832797765731812, -0.783183753490448, 0.5251326560974121, -0.6620255708694458, 0.7505071759223938, -0.36197757720947266, 1.380924940109253, 0.4230940639972687, -0.9889947175979614, 1.5414931774139404, -0.27733033895492554, 0.5754455327987671, -0.5558353066444397, -0.4610019624233246, -0.7397232055664062, 0.29944881796836853, 2.0238475799560547, -0.31486743688583374, 1.4603501558303833, -0.378370076417923, -1.5893911123275757, -1.5986549854278564, 0.8546454310417175, 0.5119732022285461, -0.7482088208198547, 0.23190966248512268, -0.5148354172706604, 0.0560479573905468, 0.020060935989022255, 1.1634001731872559, 1.313699722290039, 0.6905098557472229, -0.3184709846973419, -0.8866791725158691, 0.14472970366477966, -0.04381284862756729, -0.7052406072616577, -1.6360282897949219, -0.4174506664276123, 0.11665818095207214, 0.677351176738739, -1.1369541883468628, 1.7790015935897827, 0.9390631318092346, 1.909914493560791, 1.0566563606262207, -0.26289743185043335, 1.4864282608032227, 0.06577928364276886, 1.7982897758483887, -0.5010568499565125, 0.6251207590103149, -0.43014779686927795, -1.232253909111023, 0.8015046119689941, -0.3770257830619812, -2.098956346511841, -0.7383888363838196, -0.72151780128479, -0.15745899081230164, -0.8002839684486389, 0.93073970079422, -0.27629563212394714, -1.3723554611206055, 0.26112058758735657, -0.8554211258888245, 0.1692247986793518, -1.236707091331482, 0.25919386744499207, 0.6825858950614929, -0.6098272204399109, 0.1457175761461258, -0.24708998203277588, -1.2438766956329346, -0.4287305772304535, 0.22563447058200836, 1.8541367053985596, -0.7903463840484619, 0.9880530834197998, 1.0684854984283447, -0.6642816066741943, 0.019734418019652367, 0.3214814364910126, -0.27003422379493713, 0.9740352630615234, -1.0698604583740234, -0.36039435863494873, 1.2819621562957764, -0.17724904417991638, -0.5403770208358765, 1.3982690572738647, 0.7075003981590271, -0.968191385269165, -0.2036365419626236, -0.07921521365642548, -0.9306802153587341, 0.04200204089283943, -1.5771393775939941, -0.04800517484545708, 0.538080632686615, -1.5446182489395142, -0.48561719059944153, -0.17182548344135284, 1.2201660871505737, -0.07815834879875183, 1.4630895853042603, -0.3728535771369934, -0.04106726497411728, -0.2642860412597656, -0.2847224771976471, 0.13399292528629303, -0.2818067669868469, -0.6454787850379944, 0.21672266721725464, -0.7657760977745056, 0.35086295008659363, 1.4193291664123535, 0.3794279396533966, 0.03959037736058235, 0.4989489018917084, 1.1155017614364624, 0.33102086186408997, -0.1517399400472641, -0.8009468913078308, -1.6446683406829834, 2.0614891052246094, -1.390977382659912, 1.9467440843582153, 0.7803720235824585, -0.040241215378046036, -1.7777423858642578, -1.8963210582733154, 1.3201706409454346, 1.1531057357788086, 2.3732175827026367, 0.5186188220977783, 0.4492744207382202, -0.8171608448028564, -0.6813181638717651, 0.33431705832481384, -1.0097107887268066, -0.798440158367157, 0.13741636276245117, 2.390550374984741, 1.836472511291504, -0.4063081443309784, -0.18017593026161194, -1.0272440910339355, 1.3774240016937256, -0.19105327129364014, 0.18423010408878326, 1.910849928855896, -0.16088488698005676, -1.040307641029358, 1.328582525253296, -2.2918426990509033, 0.1844860315322876, 2.0802040100097656, 0.25092124938964844, 0.04756017029285431, -1.3855290412902832, -0.6223284602165222, -0.31993111968040466, -0.346021831035614, -1.237081527709961, 0.5429279804229736, -0.26860761642456055, -0.8776731491088867, -1.3398741483688354, 0.09200610220432281, -1.1891655921936035, -1.668881893157959, 0.18417127430438995, 1.8071852922439575, 2.034899950027466, -0.7247388958930969, 1.5568794012069702, -0.34064340591430664, 0.18075482547283173, 1.218347191810608, 1.2528575658798218, 3.1453495025634766, 1.8656994104385376, -1.3313689231872559, 0.6566839218139648, -0.1865302473306656, -0.47069528698921204, 1.1878095865249634, -1.3035882711410522, 1.2494972944259644, -0.07078304886817932, -1.1812113523483276, -1.0765063762664795, 0.9615911245346069, 0.46677878499031067, -0.0015569031238555908, -0.46280279755592346, 1.1478163003921509, 0.05601797625422478, 1.2730565071105957, 0.5269185900688171, -0.2545194625854492, 0.6226682662963867, -0.3388828635215759, -0.5215110778808594, 1.4800817966461182, 0.20289741456508636, -1.4053521156311035, -2.1760096549987793, -0.1818048506975174, -0.8417953848838806, 0.09873875975608826, -0.6934803128242493, -0.964791476726532, 1.609287142753601, 0.29208970069885254, -1.2506611347198486, -0.2547835111618042, -0.3285486698150635, -0.5263469219207764, 2.738520383834839, -1.3322199583053589, -0.21339206397533417, -1.099355697631836, -0.6377125382423401, 1.6297227144241333, -1.1856235265731812, -0.29126080870628357, -0.9948955178260803, -0.4902268350124359, -1.2204046249389648, -0.6131055951118469, 0.0012137079611420631, -0.9814831614494324, 0.784942626953125, 0.16651035845279694, -1.2101819515228271, -0.2953174114227295, -0.7475414872169495, 0.9251830577850342, -0.23205548524856567, 0.11144022643566132, 1.8444832563400269, 0.41079291701316833, -0.3911452889442444, 0.8048933148384094, 1.195030927658081, 0.5704736709594727, -0.5322514176368713, 0.15046590566635132, -0.6866086721420288, 0.34028762578964233, -1.3177490234375, 0.2712463438510895, -2.787916660308838, 0.6413355469703674, -0.05259646847844124, -0.0010134954936802387, -0.05803969129920006, -1.3329994678497314, 1.032197117805481, 2.6100971698760986, -1.1953957080841064, 0.5413855910301208, 0.29521700739860535, 1.0890485048294067, -1.585744023323059, 0.24033905565738678, -0.47328537702560425, 2.1418023109436035, 0.2598620653152466, 1.2137597799301147, -0.5163244605064392, -2.211954355239868, 0.6398868560791016, -1.2750297784805298, -1.078134536743164, 0.7314335703849792, -0.9235405325889587, 0.1275423765182495, -1.33966863155365, -0.2713388204574585, -0.8147551417350769, -1.0268739461898804, 0.6474725604057312, 0.060378577560186386, 0.37190666794776917, -0.5647369623184204, 0.3549894094467163, -2.167710781097412, -1.3491731882095337, -0.2177918553352356, -0.9747577905654907, 0.4969468414783478, -0.34890007972717285, 0.6256730556488037, -0.15657509863376617, -0.013332538306713104, 0.3763866722583771, 1.4709935188293457, 3.3474762439727783, 0.16960591077804565, 0.2850726246833801, -0.18767599761486053, -0.9632188081741333, 1.4289683103561401, 0.9281050562858582, -0.2886578440666199, -0.6708694100379944, -1.0562368631362915, 1.307366132736206, 1.9038302898406982, 0.9157474637031555, 0.024887293577194214, -0.8248221278190613, -0.8492593765258789, -0.011427443474531174, 0.06751704216003418, 0.43883493542671204, 0.9251143336296082, 0.08574062585830688, 0.10416129231452942, 1.482383370399475, 1.1395270824432373, -0.43369725346565247, 0.37036392092704773, -0.8284739851951599, -0.48546791076660156, 0.4651343524456024, 0.260829359292984, -0.020511675626039505, 0.3540109395980835, -0.9972814321517944, -0.27121439576148987, -0.3500790297985077, -0.9222460985183716, -0.7873998880386353, -0.4006352722644806, -0.2929019629955292, 1.6765313148498535, 0.15878885984420776, -0.5236846804618835, -0.009972965344786644, -0.7559257745742798, -0.11611758172512054, -1.0031172037124634, 0.2998655438423157, -0.11807239055633545, -0.07812118530273438, -0.06264480948448181, 1.6414092779159546, -0.8751213550567627, -2.1437971591949463, 0.27695247530937195, 0.2309536635875702, -0.30139800906181335, 0.1533959060907364, 1.6796671152114868, 0.5931340456008911, 1.4585314989089966, 1.3515251874923706, 0.8912855982780457, -0.6114252209663391, -1.3274673223495483, 0.7051919102668762, 0.9270065426826477, -1.4197158813476562, 0.8322098255157471, -0.062317222356796265, -0.45067015290260315, 0.581731379032135, 1.32280695438385, 0.5624212026596069, -2.025648832321167, 0.9099156856536865, -0.971139132976532, 0.7687530517578125, 0.6755737662315369, 0.7052918672561646, 0.22417664527893066, 0.8255143761634827, -1.252257227897644, -1.1569440364837646, -0.7643611431121826, -0.787177324295044, 1.9932990074157715, -0.3074588477611542, 0.49177420139312744, -0.19777676463127136, -1.3295223712921143, -0.23529008030891418, 0.6679306626319885, 0.22846123576164246, -0.5460725426673889, 0.8098971247673035, -0.67107093334198, -1.151606798171997, -1.3884825706481934, -0.5447949171066284, -1.0043599605560303, -0.9476097226142883, 1.0031943321228027, 0.7157698273658752, 0.2911321818828583, 1.9145196676254272, 0.6729229092597961, 0.18276913464069366, -2.623737096786499, 0.8684680461883545, 0.23310235142707825, 0.0069708917289972305, 0.8922028541564941, 0.3029443323612213, 0.9657825827598572, -0.0549330860376358, 0.570200502872467, -2.3855016231536865, 2.2863388061523438, -0.2124508172273636, 0.7326598763465881, -0.015694813802838326, -0.15686987340450287, 1.0805485248565674, 0.5150247812271118, 0.5610941648483276, -1.1332924365997314, 0.6311315298080444, -0.5583606958389282, 1.2684706449508667, 0.7156271934509277, -0.9139600396156311, 0.027206797152757645, 1.3427256345748901, 0.3291120231151581, -0.49985063076019287, -1.0355212688446045, -0.9386095404624939, 1.029534935951233, 1.774867296218872, -0.046145420521497726, 0.058828238397836685, 0.829871416091919, 0.7076501846313477, -1.3025223016738892, 0.004029370844364166, -0.7474145293235779, -0.7390101552009583, 1.6582167148590088, 2.185993194580078, -0.18882425129413605, -0.23109257221221924, -0.6936927437782288, -1.301915168762207, 0.7827252149581909, -0.05287344381213188, 0.08520059287548065, 0.662516176700592, -0.6194643974304199, 1.0802251100540161, 0.8977918028831482, 0.9498695135116577, 0.18859389424324036, 0.17548057436943054, 0.367913156747818, -0.23092949390411377, -1.1483997106552124, -0.28055426478385925, -1.0527536869049072, -2.625805139541626, 0.44702428579330444, -0.1629984974861145, -1.4637361764907837, 0.12556782364845276, -0.9836306571960449, 0.8812896013259888, -0.572729229927063, -1.1300687789916992, -1.5000877380371094, 0.18866628408432007, -0.05930615961551666, 0.9456791281700134, -1.617162823677063, -0.17613185942173004, 1.1510124206542969, 0.9661099910736084, -0.6330968141555786, 0.9260131120681763, 0.23910942673683167, 0.9648703336715698, 0.9662212133407593, -0.3662777841091156, 0.6150810718536377, 0.04384070262312889, -1.300704002380371, 0.5089969635009766, 1.266975998878479, 0.23214545845985413, 1.510209560394287, -0.4664781987667084, -0.019208673387765884, 0.4072408676147461, -0.6331440806388855, -0.39851680397987366, -0.506109893321991, 0.635337769985199, 0.07425723969936371, -1.0637575387954712, -0.052349455654621124, -0.06381109356880188, -0.289190411567688, 0.1829669028520584, -1.5039331912994385, -0.0912076085805893, -0.31566908955574036, -0.6845471858978271, -1.1703206300735474, -0.12229180335998535, 1.4424934387207031, -0.9167815446853638, -0.23241610825061798, 0.4794727861881256, 0.3141816556453705, 0.5444867610931396, 0.6681566834449768, -0.7777053117752075, -0.33305785059928894, -0.13644208014011383, -0.43175065517425537, 0.33805081248283386, 1.361586570739746, 0.010128529742360115, -0.9480806589126587, 0.6745554804801941, -0.3224374055862427, 0.10094541311264038, 1.8168251514434814, 0.06504467129707336, -0.7626427412033081, 0.21513037383556366, -0.7211582064628601, 1.9583829641342163, 1.701045036315918, 1.301458716392517, -0.16962367296218872, -1.0282549858093262, 0.6380096673965454, -0.3281313478946686, -0.3069809377193451, 0.8282854557037354, 0.3960787057876587, -0.2750907242298126, -1.3938661813735962, 0.7731022238731384, 1.232783555984497, -0.9080336689949036, -0.7978048920631409, 0.08006739616394043, -0.8366879820823669, 1.145310878753662, 0.7264685034751892, 0.2793166935443878, 0.21635867655277252, 1.715800404548645, 0.7929825186729431, -0.38826116919517517, 0.5467826724052429, 0.5381513237953186, -0.15457040071487427, -2.224123239517212, -1.0493422746658325, 0.3517155349254608, -0.4988813102245331, -1.5215860605239868, 1.2583765983581543, -1.0777897834777832, -0.9289003610610962, 0.5137719511985779, 0.02817029505968094, 1.524834156036377, 0.3765231668949127, 1.570311427116394, 2.042499303817749, 0.9262290596961975, 0.3143332302570343, 1.2307121753692627, -0.07400685548782349, -0.3808481991291046, 1.8166184425354004, -0.35431113839149475, 0.45248305797576904, 1.0812464952468872, -0.353370726108551, -1.1081596612930298, -0.7673397660255432, -1.3039451837539673, -0.8168124556541443, 1.1407181024551392, 0.05436451733112335, -1.0893936157226562, 0.28307172656059265, 1.57583487033844, 0.18731731176376343, -0.296901136636734, 0.621277391910553, 0.4409649968147278, -0.8066783547401428, -0.08249658346176147, -0.8803600668907166, 0.4612860381603241, -0.1625208705663681, -0.44505786895751953, 0.2861472964286804, 0.4468940198421478, 1.3215962648391724, 0.03443707525730133, -0.019783932715654373, 1.117178201675415, -1.4970366954803467, 1.4800703525543213, -0.722058117389679, 0.30193978548049927, -2.3265161514282227, 1.4384902715682983, -0.8268371820449829, 1.9566737413406372, -2.7120144367218018, 0.5396048426628113, -0.6034388542175293, -0.497915655374527, 0.293205589056015, -0.3711714446544647, 0.11469566822052002, -0.09569203853607178, -1.180405855178833, -0.1605474054813385, -0.6894059777259827, 0.6486825346946716, 1.125998854637146, 1.3281073570251465, -1.1031700372695923, -0.17046023905277252, -1.7155089378356934, -0.09031336009502411, -0.7241201996803284, 0.26578280329704285, -1.880241870880127, -0.12035523355007172, -1.980781078338623, -2.356173515319824, -1.2442219257354736, -0.7107882499694824, 1.132794737815857, 0.21268031001091003, -0.8421138525009155, 1.1476179361343384, -0.3837628662586212, -1.787214756011963, 1.0917617082595825, -2.247196912765503 ]
https://github.com/huggingface/datasets/issues/4528
Memory leak when iterating a Dataset
Amazing job! Thanks for taking time to debug this 🤗 For my side, I tried to do some more research as well, but to no avail. https://github.com/huggingface/datasets/issues/4883#issuecomment-1243415957
e## Describe the bug It seems that memory never gets freed after iterating a `Dataset` (using `.map()` or a simple `for` loop) ## Steps to reproduce the bug ```python import gc import logging import time import pyarrow from datasets import load_dataset from tqdm import trange import os, psutil logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) process = psutil.Process(os.getpid()) print(process.memory_info().rss) # output: 633507840 bytes corpus = load_dataset("BeIR/msmarco", 'corpus', keep_in_memory=False, streaming=False)['corpus'] # or "BeIR/trec-covid" for a smaller dataset print(process.memory_info().rss) # output: 698601472 bytes logger.info("Applying method to all examples in all splits") for i in trange(0, len(corpus), 1000): batch = corpus[i:i+1000] data = pyarrow.total_allocated_bytes() if data > 0: logger.info(f"{i}/{len(corpus)}: {data}") print(process.memory_info().rss) # output: 3788247040 bytes del batch gc.collect() print(process.memory_info().rss) # output: 3788247040 bytes logger.info("Done...") time.sleep(100) ``` ## Expected results Limited memory usage, and memory to be freed after processing ## Actual results Memory leak ![test](https://user-images.githubusercontent.com/29777165/174578276-f2c37e6c-b5d8-4985-b4d8-8413eb2b3241.png) You can see how the memory allocation keeps increasing until it reaches a steady state when we hit the `time.sleep(100)`, which showcases that even the garbage collector couldn't free the allocated memory ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-5.4.0-90-generic-x86_64-with-glibc2.31 - Python version: 3.9.7 - PyArrow version: 8.0.0 - Pandas version: 1.4.2
699
27
Memory leak when iterating a Dataset e## Describe the bug It seems that memory never gets freed after iterating a `Dataset` (using `.map()` or a simple `for` loop) ## Steps to reproduce the bug ```python import gc import logging import time import pyarrow from datasets import load_dataset from tqdm import trange import os, psutil logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) process = psutil.Process(os.getpid()) print(process.memory_info().rss) # output: 633507840 bytes corpus = load_dataset("BeIR/msmarco", 'corpus', keep_in_memory=False, streaming=False)['corpus'] # or "BeIR/trec-covid" for a smaller dataset print(process.memory_info().rss) # output: 698601472 bytes logger.info("Applying method to all examples in all splits") for i in trange(0, len(corpus), 1000): batch = corpus[i:i+1000] data = pyarrow.total_allocated_bytes() if data > 0: logger.info(f"{i}/{len(corpus)}: {data}") print(process.memory_info().rss) # output: 3788247040 bytes del batch gc.collect() print(process.memory_info().rss) # output: 3788247040 bytes logger.info("Done...") time.sleep(100) ``` ## Expected results Limited memory usage, and memory to be freed after processing ## Actual results Memory leak ![test](https://user-images.githubusercontent.com/29777165/174578276-f2c37e6c-b5d8-4985-b4d8-8413eb2b3241.png) You can see how the memory allocation keeps increasing until it reaches a steady state when we hit the `time.sleep(100)`, which showcases that even the garbage collector couldn't free the allocated memory ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-5.4.0-90-generic-x86_64-with-glibc2.31 - Python version: 3.9.7 - PyArrow version: 8.0.0 - Pandas version: 1.4.2 Amazing job! Thanks for taking time to debug this 🤗 For my side, I tried to do some more research as well, but to no avail. https://github.com/huggingface/datasets/issues/4883#issuecomment-1243415957
[ -1.3384850025177002, -0.9145268201828003, -0.6335321664810181, 1.5369683504104614, -0.08457894623279572, -1.1772884130477905, 0.11131684482097626, -0.9808344841003418, 1.7018029689788818, -0.7248932123184204, 0.4140302240848541, -1.662846565246582, 0.11094708740711212, -0.5293395519256592, -0.7848016023635864, -0.8183043599128723, -0.4107159674167633, -0.7637895345687866, 1.0875799655914307, 2.5541112422943115, 1.2444592714309692, -1.4268178939819336, 2.7559614181518555, 0.6777305006980896, -0.23346662521362305, -1.043217420578003, 0.48983651399612427, -0.09239082038402557, -1.3901931047439575, -0.4493486285209656, -0.9860816597938538, -0.04441603273153305, -0.4745830297470093, -0.5796821117401123, 0.03970181941986084, 0.41661450266838074, -0.2579886317253113, -0.5864574909210205, -0.5893715620040894, -0.7365508079528809, 0.4716739356517792, -0.3981398642063141, 0.8633008003234863, -0.25493326783180237, 1.7691632509231567, -0.5998832583427429, 0.5833763480186462, 0.6438826322555542, 1.4070565700531006, 0.2004614621400833, -0.06846173107624054, 0.5459187030792236, 0.3673214018344879, 0.003368295729160309, 0.5516700744628906, 1.1907336711883545, 0.7330886721611023, 0.4132133424282074, 0.7556057572364807, -2.198892593383789, 1.2756075859069824, -1.0531309843063354, 0.29278382658958435, 1.2885627746582031, -1.0358487367630005, 0.3058997392654419, -1.8029882907867432, -0.044428955763578415, 0.57003253698349, -2.225886106491089, 0.24889510869979858, -1.2830530405044556, -0.4417780637741089, 1.0594784021377563, 0.4350367784500122, -1.250866413116455, 0.135572612285614, -0.49661198258399963, 0.9868200421333313, 0.39125847816467285, 1.193152904510498, -1.6502808332443237, -0.10889400541782379, -0.34804219007492065, 0.13670024275779724, -1.2191296815872192, -1.582030177116394, 0.6131916046142578, 0.6219406723976135, 0.5509868860244751, -0.12141022086143494, 1.0872689485549927, -1.0087343454360962, 0.7954327464103699, -1.0067334175109863, -1.7446651458740234, -1.4767425060272217, -2.247995138168335, -2.285161018371582, 0.7447989583015442, -0.4049115777015686, -0.49769681692123413, 2.182659149169922, -1.045341968536377, -1.7859208583831787, 1.0809468030929565, 0.20316359400749207, -0.07631789147853851, 2.3504185676574707, 0.17832797765731812, -0.783183753490448, 0.5251326560974121, -0.6620255708694458, 0.7505071759223938, -0.36197757720947266, 1.380924940109253, 0.4230940639972687, -0.9889947175979614, 1.5414931774139404, -0.27733033895492554, 0.5754455327987671, -0.5558353066444397, -0.4610019624233246, -0.7397232055664062, 0.29944881796836853, 2.0238475799560547, -0.31486743688583374, 1.4603501558303833, -0.378370076417923, -1.5893911123275757, -1.5986549854278564, 0.8546454310417175, 0.5119732022285461, -0.7482088208198547, 0.23190966248512268, -0.5148354172706604, 0.0560479573905468, 0.020060935989022255, 1.1634001731872559, 1.313699722290039, 0.6905098557472229, -0.3184709846973419, -0.8866791725158691, 0.14472970366477966, -0.04381284862756729, -0.7052406072616577, -1.6360282897949219, -0.4174506664276123, 0.11665818095207214, 0.677351176738739, -1.1369541883468628, 1.7790015935897827, 0.9390631318092346, 1.909914493560791, 1.0566563606262207, -0.26289743185043335, 1.4864282608032227, 0.06577928364276886, 1.7982897758483887, -0.5010568499565125, 0.6251207590103149, -0.43014779686927795, -1.232253909111023, 0.8015046119689941, -0.3770257830619812, -2.098956346511841, -0.7383888363838196, -0.72151780128479, -0.15745899081230164, -0.8002839684486389, 0.93073970079422, -0.27629563212394714, -1.3723554611206055, 0.26112058758735657, -0.8554211258888245, 0.1692247986793518, -1.236707091331482, 0.25919386744499207, 0.6825858950614929, -0.6098272204399109, 0.1457175761461258, -0.24708998203277588, -1.2438766956329346, -0.4287305772304535, 0.22563447058200836, 1.8541367053985596, -0.7903463840484619, 0.9880530834197998, 1.0684854984283447, -0.6642816066741943, 0.019734418019652367, 0.3214814364910126, -0.27003422379493713, 0.9740352630615234, -1.0698604583740234, -0.36039435863494873, 1.2819621562957764, -0.17724904417991638, -0.5403770208358765, 1.3982690572738647, 0.7075003981590271, -0.968191385269165, -0.2036365419626236, -0.07921521365642548, -0.9306802153587341, 0.04200204089283943, -1.5771393775939941, -0.04800517484545708, 0.538080632686615, -1.5446182489395142, -0.48561719059944153, -0.17182548344135284, 1.2201660871505737, -0.07815834879875183, 1.4630895853042603, -0.3728535771369934, -0.04106726497411728, -0.2642860412597656, -0.2847224771976471, 0.13399292528629303, -0.2818067669868469, -0.6454787850379944, 0.21672266721725464, -0.7657760977745056, 0.35086295008659363, 1.4193291664123535, 0.3794279396533966, 0.03959037736058235, 0.4989489018917084, 1.1155017614364624, 0.33102086186408997, -0.1517399400472641, -0.8009468913078308, -1.6446683406829834, 2.0614891052246094, -1.390977382659912, 1.9467440843582153, 0.7803720235824585, -0.040241215378046036, -1.7777423858642578, -1.8963210582733154, 1.3201706409454346, 1.1531057357788086, 2.3732175827026367, 0.5186188220977783, 0.4492744207382202, -0.8171608448028564, -0.6813181638717651, 0.33431705832481384, -1.0097107887268066, -0.798440158367157, 0.13741636276245117, 2.390550374984741, 1.836472511291504, -0.4063081443309784, -0.18017593026161194, -1.0272440910339355, 1.3774240016937256, -0.19105327129364014, 0.18423010408878326, 1.910849928855896, -0.16088488698005676, -1.040307641029358, 1.328582525253296, -2.2918426990509033, 0.1844860315322876, 2.0802040100097656, 0.25092124938964844, 0.04756017029285431, -1.3855290412902832, -0.6223284602165222, -0.31993111968040466, -0.346021831035614, -1.237081527709961, 0.5429279804229736, -0.26860761642456055, -0.8776731491088867, -1.3398741483688354, 0.09200610220432281, -1.1891655921936035, -1.668881893157959, 0.18417127430438995, 1.8071852922439575, 2.034899950027466, -0.7247388958930969, 1.5568794012069702, -0.34064340591430664, 0.18075482547283173, 1.218347191810608, 1.2528575658798218, 3.1453495025634766, 1.8656994104385376, -1.3313689231872559, 0.6566839218139648, -0.1865302473306656, -0.47069528698921204, 1.1878095865249634, -1.3035882711410522, 1.2494972944259644, -0.07078304886817932, -1.1812113523483276, -1.0765063762664795, 0.9615911245346069, 0.46677878499031067, -0.0015569031238555908, -0.46280279755592346, 1.1478163003921509, 0.05601797625422478, 1.2730565071105957, 0.5269185900688171, -0.2545194625854492, 0.6226682662963867, -0.3388828635215759, -0.5215110778808594, 1.4800817966461182, 0.20289741456508636, -1.4053521156311035, -2.1760096549987793, -0.1818048506975174, -0.8417953848838806, 0.09873875975608826, -0.6934803128242493, -0.964791476726532, 1.609287142753601, 0.29208970069885254, -1.2506611347198486, -0.2547835111618042, -0.3285486698150635, -0.5263469219207764, 2.738520383834839, -1.3322199583053589, -0.21339206397533417, -1.099355697631836, -0.6377125382423401, 1.6297227144241333, -1.1856235265731812, -0.29126080870628357, -0.9948955178260803, -0.4902268350124359, -1.2204046249389648, -0.6131055951118469, 0.0012137079611420631, -0.9814831614494324, 0.784942626953125, 0.16651035845279694, -1.2101819515228271, -0.2953174114227295, -0.7475414872169495, 0.9251830577850342, -0.23205548524856567, 0.11144022643566132, 1.8444832563400269, 0.41079291701316833, -0.3911452889442444, 0.8048933148384094, 1.195030927658081, 0.5704736709594727, -0.5322514176368713, 0.15046590566635132, -0.6866086721420288, 0.34028762578964233, -1.3177490234375, 0.2712463438510895, -2.787916660308838, 0.6413355469703674, -0.05259646847844124, -0.0010134954936802387, -0.05803969129920006, -1.3329994678497314, 1.032197117805481, 2.6100971698760986, -1.1953957080841064, 0.5413855910301208, 0.29521700739860535, 1.0890485048294067, -1.585744023323059, 0.24033905565738678, -0.47328537702560425, 2.1418023109436035, 0.2598620653152466, 1.2137597799301147, -0.5163244605064392, -2.211954355239868, 0.6398868560791016, -1.2750297784805298, -1.078134536743164, 0.7314335703849792, -0.9235405325889587, 0.1275423765182495, -1.33966863155365, -0.2713388204574585, -0.8147551417350769, -1.0268739461898804, 0.6474725604057312, 0.060378577560186386, 0.37190666794776917, -0.5647369623184204, 0.3549894094467163, -2.167710781097412, -1.3491731882095337, -0.2177918553352356, -0.9747577905654907, 0.4969468414783478, -0.34890007972717285, 0.6256730556488037, -0.15657509863376617, -0.013332538306713104, 0.3763866722583771, 1.4709935188293457, 3.3474762439727783, 0.16960591077804565, 0.2850726246833801, -0.18767599761486053, -0.9632188081741333, 1.4289683103561401, 0.9281050562858582, -0.2886578440666199, -0.6708694100379944, -1.0562368631362915, 1.307366132736206, 1.9038302898406982, 0.9157474637031555, 0.024887293577194214, -0.8248221278190613, -0.8492593765258789, -0.011427443474531174, 0.06751704216003418, 0.43883493542671204, 0.9251143336296082, 0.08574062585830688, 0.10416129231452942, 1.482383370399475, 1.1395270824432373, -0.43369725346565247, 0.37036392092704773, -0.8284739851951599, -0.48546791076660156, 0.4651343524456024, 0.260829359292984, -0.020511675626039505, 0.3540109395980835, -0.9972814321517944, -0.27121439576148987, -0.3500790297985077, -0.9222460985183716, -0.7873998880386353, -0.4006352722644806, -0.2929019629955292, 1.6765313148498535, 0.15878885984420776, -0.5236846804618835, -0.009972965344786644, -0.7559257745742798, -0.11611758172512054, -1.0031172037124634, 0.2998655438423157, -0.11807239055633545, -0.07812118530273438, -0.06264480948448181, 1.6414092779159546, -0.8751213550567627, -2.1437971591949463, 0.27695247530937195, 0.2309536635875702, -0.30139800906181335, 0.1533959060907364, 1.6796671152114868, 0.5931340456008911, 1.4585314989089966, 1.3515251874923706, 0.8912855982780457, -0.6114252209663391, -1.3274673223495483, 0.7051919102668762, 0.9270065426826477, -1.4197158813476562, 0.8322098255157471, -0.062317222356796265, -0.45067015290260315, 0.581731379032135, 1.32280695438385, 0.5624212026596069, -2.025648832321167, 0.9099156856536865, -0.971139132976532, 0.7687530517578125, 0.6755737662315369, 0.7052918672561646, 0.22417664527893066, 0.8255143761634827, -1.252257227897644, -1.1569440364837646, -0.7643611431121826, -0.787177324295044, 1.9932990074157715, -0.3074588477611542, 0.49177420139312744, -0.19777676463127136, -1.3295223712921143, -0.23529008030891418, 0.6679306626319885, 0.22846123576164246, -0.5460725426673889, 0.8098971247673035, -0.67107093334198, -1.151606798171997, -1.3884825706481934, -0.5447949171066284, -1.0043599605560303, -0.9476097226142883, 1.0031943321228027, 0.7157698273658752, 0.2911321818828583, 1.9145196676254272, 0.6729229092597961, 0.18276913464069366, -2.623737096786499, 0.8684680461883545, 0.23310235142707825, 0.0069708917289972305, 0.8922028541564941, 0.3029443323612213, 0.9657825827598572, -0.0549330860376358, 0.570200502872467, -2.3855016231536865, 2.2863388061523438, -0.2124508172273636, 0.7326598763465881, -0.015694813802838326, -0.15686987340450287, 1.0805485248565674, 0.5150247812271118, 0.5610941648483276, -1.1332924365997314, 0.6311315298080444, -0.5583606958389282, 1.2684706449508667, 0.7156271934509277, -0.9139600396156311, 0.027206797152757645, 1.3427256345748901, 0.3291120231151581, -0.49985063076019287, -1.0355212688446045, -0.9386095404624939, 1.029534935951233, 1.774867296218872, -0.046145420521497726, 0.058828238397836685, 0.829871416091919, 0.7076501846313477, -1.3025223016738892, 0.004029370844364166, -0.7474145293235779, -0.7390101552009583, 1.6582167148590088, 2.185993194580078, -0.18882425129413605, -0.23109257221221924, -0.6936927437782288, -1.301915168762207, 0.7827252149581909, -0.05287344381213188, 0.08520059287548065, 0.662516176700592, -0.6194643974304199, 1.0802251100540161, 0.8977918028831482, 0.9498695135116577, 0.18859389424324036, 0.17548057436943054, 0.367913156747818, -0.23092949390411377, -1.1483997106552124, -0.28055426478385925, -1.0527536869049072, -2.625805139541626, 0.44702428579330444, -0.1629984974861145, -1.4637361764907837, 0.12556782364845276, -0.9836306571960449, 0.8812896013259888, -0.572729229927063, -1.1300687789916992, -1.5000877380371094, 0.18866628408432007, -0.05930615961551666, 0.9456791281700134, -1.617162823677063, -0.17613185942173004, 1.1510124206542969, 0.9661099910736084, -0.6330968141555786, 0.9260131120681763, 0.23910942673683167, 0.9648703336715698, 0.9662212133407593, -0.3662777841091156, 0.6150810718536377, 0.04384070262312889, -1.300704002380371, 0.5089969635009766, 1.266975998878479, 0.23214545845985413, 1.510209560394287, -0.4664781987667084, -0.019208673387765884, 0.4072408676147461, -0.6331440806388855, -0.39851680397987366, -0.506109893321991, 0.635337769985199, 0.07425723969936371, -1.0637575387954712, -0.052349455654621124, -0.06381109356880188, -0.289190411567688, 0.1829669028520584, -1.5039331912994385, -0.0912076085805893, -0.31566908955574036, -0.6845471858978271, -1.1703206300735474, -0.12229180335998535, 1.4424934387207031, -0.9167815446853638, -0.23241610825061798, 0.4794727861881256, 0.3141816556453705, 0.5444867610931396, 0.6681566834449768, -0.7777053117752075, -0.33305785059928894, -0.13644208014011383, -0.43175065517425537, 0.33805081248283386, 1.361586570739746, 0.010128529742360115, -0.9480806589126587, 0.6745554804801941, -0.3224374055862427, 0.10094541311264038, 1.8168251514434814, 0.06504467129707336, -0.7626427412033081, 0.21513037383556366, -0.7211582064628601, 1.9583829641342163, 1.701045036315918, 1.301458716392517, -0.16962367296218872, -1.0282549858093262, 0.6380096673965454, -0.3281313478946686, -0.3069809377193451, 0.8282854557037354, 0.3960787057876587, -0.2750907242298126, -1.3938661813735962, 0.7731022238731384, 1.232783555984497, -0.9080336689949036, -0.7978048920631409, 0.08006739616394043, -0.8366879820823669, 1.145310878753662, 0.7264685034751892, 0.2793166935443878, 0.21635867655277252, 1.715800404548645, 0.7929825186729431, -0.38826116919517517, 0.5467826724052429, 0.5381513237953186, -0.15457040071487427, -2.224123239517212, -1.0493422746658325, 0.3517155349254608, -0.4988813102245331, -1.5215860605239868, 1.2583765983581543, -1.0777897834777832, -0.9289003610610962, 0.5137719511985779, 0.02817029505968094, 1.524834156036377, 0.3765231668949127, 1.570311427116394, 2.042499303817749, 0.9262290596961975, 0.3143332302570343, 1.2307121753692627, -0.07400685548782349, -0.3808481991291046, 1.8166184425354004, -0.35431113839149475, 0.45248305797576904, 1.0812464952468872, -0.353370726108551, -1.1081596612930298, -0.7673397660255432, -1.3039451837539673, -0.8168124556541443, 1.1407181024551392, 0.05436451733112335, -1.0893936157226562, 0.28307172656059265, 1.57583487033844, 0.18731731176376343, -0.296901136636734, 0.621277391910553, 0.4409649968147278, -0.8066783547401428, -0.08249658346176147, -0.8803600668907166, 0.4612860381603241, -0.1625208705663681, -0.44505786895751953, 0.2861472964286804, 0.4468940198421478, 1.3215962648391724, 0.03443707525730133, -0.019783932715654373, 1.117178201675415, -1.4970366954803467, 1.4800703525543213, -0.722058117389679, 0.30193978548049927, -2.3265161514282227, 1.4384902715682983, -0.8268371820449829, 1.9566737413406372, -2.7120144367218018, 0.5396048426628113, -0.6034388542175293, -0.497915655374527, 0.293205589056015, -0.3711714446544647, 0.11469566822052002, -0.09569203853607178, -1.180405855178833, -0.1605474054813385, -0.6894059777259827, 0.6486825346946716, 1.125998854637146, 1.3281073570251465, -1.1031700372695923, -0.17046023905277252, -1.7155089378356934, -0.09031336009502411, -0.7241201996803284, 0.26578280329704285, -1.880241870880127, -0.12035523355007172, -1.980781078338623, -2.356173515319824, -1.2442219257354736, -0.7107882499694824, 1.132794737815857, 0.21268031001091003, -0.8421138525009155, 1.1476179361343384, -0.3837628662586212, -1.787214756011963, 1.0917617082595825, -2.247196912765503 ]
https://github.com/huggingface/datasets/issues/4526
split cache used when processing different split
I was not able to reproduce this behavior (I tried without using pytorch lightning though, since I don't know what code you ran in pytorch lightning to get this). If you can provide a MWE that would be perfect ! :)
## Describe the bug` ``` ds1 = load_dataset('squad', split='validation') ds2 = load_dataset('squad', split='train') ds1 = ds1.map(some_function) ds2 = ds2.map(some_function) assert ds1 == ds2 ``` This happens when ds1 and ds2 are created in `pytorch_lightning.DataModule` through ``` class myDataModule: def train_dataloader(self): ds = load_dataset('squad', split='train') ds = ds.map(some_function) return [ds] def val_dataloader(self): ds = load_dataset('squad', split="validation") ds = ds.map(some_function) return [ds] ``` I don't know if it depends on `pytorch_lightning` or `datasets` but setting `ds.map(some_function, load_from_cache_file=False)` fixes the issue. If this is not enough to replicate I will try and provide and MWE, I don't have time now so I thought I wuld open the issue first!
701
41
split cache used when processing different split ## Describe the bug` ``` ds1 = load_dataset('squad', split='validation') ds2 = load_dataset('squad', split='train') ds1 = ds1.map(some_function) ds2 = ds2.map(some_function) assert ds1 == ds2 ``` This happens when ds1 and ds2 are created in `pytorch_lightning.DataModule` through ``` class myDataModule: def train_dataloader(self): ds = load_dataset('squad', split='train') ds = ds.map(some_function) return [ds] def val_dataloader(self): ds = load_dataset('squad', split="validation") ds = ds.map(some_function) return [ds] ``` I don't know if it depends on `pytorch_lightning` or `datasets` but setting `ds.map(some_function, load_from_cache_file=False)` fixes the issue. If this is not enough to replicate I will try and provide and MWE, I don't have time now so I thought I wuld open the issue first! I was not able to reproduce this behavior (I tried without using pytorch lightning though, since I don't know what code you ran in pytorch lightning to get this). If you can provide a MWE that would be perfect ! :)
[ -1.3057883977890015, -1.049061894416809, -0.6980693340301514, 1.5101791620254517, -0.24276332557201385, -1.1783276796340942, 0.15346108376979828, -1.015757441520691, 1.7247247695922852, -0.8180724382400513, 0.44012451171875, -1.6017664670944214, -0.025199618190526962, -0.6050629615783691, -0.7429209351539612, -0.8598729372024536, -0.39326396584510803, -0.7411354184150696, 1.189051866531372, 2.437242031097412, 1.2153749465942383, -1.403235912322998, 2.694974660873413, 0.7071581482887268, -0.12128029018640518, -1.1466634273529053, 0.5070406198501587, -0.014693965204060078, -1.1709567308425903, -0.4515761733055115, -0.9412121772766113, -0.06656433641910553, -0.5851094126701355, -0.5015251040458679, -0.11140550673007965, 0.46134114265441895, -0.3067042827606201, -0.5649682283401489, -0.3788760304450989, -0.7627367377281189, 0.5686191916465759, -0.4463706314563751, 0.8091038465499878, -0.24872909486293793, 1.8915212154388428, -0.5447694659233093, 0.49688461422920227, 0.6718168258666992, 1.3214150667190552, 0.1997794806957245, -0.15011993050575256, 0.44705522060394287, 0.31149017810821533, -0.0069517334923148155, 0.6000956892967224, 1.1835521459579468, 0.6981398463249207, 0.42209309339523315, 0.8175352811813354, -2.2722184658050537, 1.236078143119812, -1.2408158779144287, 0.32434746623039246, 1.279275894165039, -0.9200878143310547, 0.280778169631958, -1.6789720058441162, -0.04355110973119736, 0.6648625731468201, -2.1834723949432373, 0.37658724188804626, -1.2964973449707031, -0.45369479060173035, 1.1000645160675049, 0.42798927426338196, -1.3766181468963623, 0.027320433408021927, -0.33562713861465454, 1.023841142654419, 0.33638620376586914, 1.037039041519165, -1.703122615814209, 0.04737697169184685, -0.38703322410583496, 0.08029524981975555, -1.3022449016571045, -1.4219130277633667, 0.502806544303894, 0.5046416521072388, 0.6728026270866394, -0.10256382822990417, 1.086127758026123, -0.9940108060836792, 0.7691064476966858, -1.0217456817626953, -1.541525959968567, -1.426302194595337, -2.247706413269043, -2.1826539039611816, 0.7991697192192078, -0.34894001483917236, -0.58648681640625, 1.9944994449615479, -1.082053542137146, -1.768120527267456, 1.202523112297058, 0.2815558612346649, -0.04461127519607544, 2.3822720050811768, 0.27624115347862244, -0.8417235612869263, 0.5398206114768982, -0.845008909702301, 0.8273540735244751, -0.36355966329574585, 1.4583215713500977, 0.5080893039703369, -1.0173531770706177, 1.6902847290039062, -0.32581332325935364, 0.5646065473556519, -0.6806172728538513, -0.5575823187828064, -0.8199544548988342, 0.34346261620521545, 2.0018579959869385, -0.23353809118270874, 1.5831999778747559, -0.5588789582252502, -1.5162550210952759, -1.5212663412094116, 0.9911253452301025, 0.3850557804107666, -0.7664660811424255, 0.18109145760536194, -0.42755281925201416, 0.20855270326137543, -0.12280818074941635, 1.1533395051956177, 1.273522973060608, 0.6415711045265198, -0.35442930459976196, -0.8669973015785217, 0.11153531819581985, -0.07041922956705093, -0.7141832113265991, -1.812697172164917, -0.38123953342437744, 0.007317221723496914, 0.6530531644821167, -1.2280524969100952, 1.7789254188537598, 0.8958145380020142, 1.8698453903198242, 1.0631269216537476, -0.28538814187049866, 1.4625505208969116, 0.0789388045668602, 1.9063441753387451, -0.5157208442687988, 0.6865069270133972, -0.31883111596107483, -1.106709599494934, 0.7505144476890564, -0.27586227655410767, -2.065073013305664, -0.8162044286727905, -0.786981463432312, -0.09887208044528961, -0.800567090511322, 0.9497406482696533, -0.47913140058517456, -1.5540320873260498, 0.30915606021881104, -0.7396935224533081, 0.15968729555606842, -1.1825793981552124, 0.27571389079093933, 0.6592967510223389, -0.5407711863517761, 0.0821092277765274, -0.25741666555404663, -1.1905317306518555, -0.33636274933815, 0.31824561953544617, 1.8894879817962646, -0.7942748069763184, 0.9020569920539856, 1.0844489336013794, -0.664945125579834, -0.063460573554039, 0.3207470774650574, -0.25665685534477234, 0.8369921445846558, -0.8930957913398743, -0.5313356518745422, 1.247144341468811, -0.1916213035583496, -0.6556760668754578, 1.5184310674667358, 0.7629491686820984, -1.0058377981185913, -0.08690465241670609, -0.15734758973121643, -0.8573355078697205, 0.0832425057888031, -1.6187407970428467, -0.10571228712797165, 0.4572160840034485, -1.5566896200180054, -0.5246024131774902, -0.1652606576681137, 1.2566319704055786, -0.23634468019008636, 1.4361063241958618, -0.5043526291847229, -0.0274248905479908, -0.1696620136499405, -0.38830214738845825, 0.18184590339660645, -0.034070130437612534, -0.681310772895813, 0.10233565419912338, -0.729570209980011, 0.33728325366973877, 1.4474841356277466, 0.29646894335746765, 0.041702914983034134, 0.5569164156913757, 1.117553949356079, 0.391864538192749, 0.03005743771791458, -0.7773891091346741, -1.6660659313201904, 1.9647026062011719, -1.5369548797607422, 2.0432114601135254, 0.7622026205062866, -0.14813388884067535, -1.6956366300582886, -1.7271195650100708, 1.4070056676864624, 1.2080559730529785, 2.2423057556152344, 0.6139145493507385, 0.3785591721534729, -0.8986722826957703, -0.7517850399017334, 0.2505706250667572, -1.0335001945495605, -0.7202887535095215, 0.07064823806285858, 2.3866989612579346, 1.8267216682434082, -0.3467582166194916, -0.21820701658725739, -1.033698320388794, 1.452675700187683, -0.2750086486339569, 0.2840600311756134, 1.873399019241333, -0.19826467335224152, -1.0904815196990967, 1.3318798542022705, -2.3112454414367676, 0.1255619078874588, 1.9677095413208008, 0.2729046940803528, 0.13204194605350494, -1.3562039136886597, -0.5791175961494446, -0.24795062839984894, -0.42828303575515747, -1.2280229330062866, 0.44895145297050476, -0.3450241982936859, -0.8317302465438843, -1.2685374021530151, 0.2569160759449005, -1.0590225458145142, -1.581167459487915, 0.3154551684856415, 1.8301663398742676, 2.025818347930908, -0.7578085660934448, 1.634152889251709, -0.3644707500934601, 0.3025037944316864, 1.215701699256897, 1.2177278995513916, 3.076946496963501, 1.8361471891403198, -1.3220628499984741, 0.5935257077217102, -0.13224579393863678, -0.6019863486289978, 1.185213565826416, -1.206189513206482, 1.295193076133728, -0.12073525786399841, -1.1125773191452026, -1.229509711265564, 0.9067720174789429, 0.5020697116851807, 0.11717233806848526, -0.4969327747821808, 1.219502568244934, 0.013980557210743427, 1.2783582210540771, 0.4858305752277374, -0.29275867342948914, 0.5898928046226501, -0.42490968108177185, -0.6095303297042847, 1.4927572011947632, 0.19032664597034454, -1.378661870956421, -2.149959087371826, -0.10279863327741623, -0.8086977601051331, 0.06043063849210739, -0.6382918953895569, -0.9388826489448547, 1.6101182699203491, 0.35450661182403564, -1.2682207822799683, -0.22181415557861328, -0.29434630274772644, -0.5754384398460388, 2.726041793823242, -1.2431319952011108, -0.3748745620250702, -1.1032061576843262, -0.6733977198600769, 1.6819065809249878, -1.1094999313354492, -0.19142858684062958, -1.0505539178848267, -0.5812633633613586, -1.3080397844314575, -0.5578466057777405, -0.01720486208796501, -0.9958223700523376, 0.8719659447669983, 0.14335231482982635, -1.1271382570266724, -0.39265409111976624, -0.8303436040878296, 0.9648575782775879, -0.1457086205482483, 0.2403443604707718, 1.7548428773880005, 0.26101166009902954, -0.4190666377544403, 0.7551047205924988, 1.220333218574524, 0.5551140308380127, -0.5587961077690125, 0.27790889143943787, -0.581557035446167, 0.32825106382369995, -1.2928674221038818, 0.2603333294391632, -2.8621559143066406, 0.7117401361465454, 0.07644082605838776, -0.03573518246412277, -0.1380864679813385, -1.4135725498199463, 1.116145133972168, 2.5816903114318848, -1.1179769039154053, 0.5473321080207825, 0.3461899161338806, 1.1956603527069092, -1.7215673923492432, 0.27349552512168884, -0.4347955286502838, 2.141223192214966, 0.26908376812934875, 1.2632839679718018, -0.5092589259147644, -2.378796100616455, 0.6548052430152893, -1.2157098054885864, -1.259783148765564, 0.754960298538208, -0.927817702293396, 0.14046743512153625, -1.406166911125183, -0.2983611822128296, -0.9123145937919617, -1.0875645875930786, 0.7384525537490845, 0.2548598349094391, 0.3867039978504181, -0.6203082799911499, 0.36572712659835815, -2.291947364807129, -1.451018214225769, -0.07586856186389923, -0.930880069732666, 0.5292640924453735, -0.3852965235710144, 0.5985245704650879, -0.12717103958129883, -0.03359914571046829, 0.34032535552978516, 1.5078740119934082, 3.390875816345215, 0.24752222001552582, 0.32735246419906616, -0.16671445965766907, -0.8816903829574585, 1.5376274585723877, 0.8439248204231262, -0.22760207951068878, -0.5452767014503479, -1.0531349182128906, 1.3154864311218262, 1.899553656578064, 0.9698153734207153, 0.023709837347269058, -0.6909514665603638, -0.6917879581451416, -0.10668502748012543, 0.10656431317329407, 0.4370514452457428, 0.830387532711029, 0.1366318315267563, 0.15703941881656647, 1.3047324419021606, 1.178895354270935, -0.5829288959503174, 0.41631510853767395, -0.8170520067214966, -0.36430397629737854, 0.5852840542793274, 0.2429560273885727, -0.09814822673797607, 0.35988155007362366, -0.9158350825309753, -0.20086422562599182, -0.363092839717865, -0.8565936088562012, -0.7522908449172974, -0.3441524803638458, -0.3547459542751312, 1.5012271404266357, 0.06857930123806, -0.5277043581008911, -0.0595584362745285, -0.8647400736808777, -0.1906306892633438, -1.0450831651687622, 0.1834862232208252, -0.11556532233953476, -0.2434006631374359, -0.20841757953166962, 1.7145168781280518, -0.882982075214386, -2.087730884552002, 0.1928197741508484, 0.3626534640789032, -0.21837098896503448, 0.262416273355484, 1.6644033193588257, 0.5120593905448914, 1.3175510168075562, 1.3375110626220703, 0.9869145154953003, -0.6034950017929077, -1.1501353979110718, 0.7038658857345581, 0.9224799275398254, -1.3187605142593384, 0.7507274150848389, 0.02754809707403183, -0.48240384459495544, 0.6550309658050537, 1.237979531288147, 0.6102539896965027, -2.002537250518799, 0.7849176526069641, -0.9513866305351257, 0.8339977264404297, 0.6663880944252014, 0.6147429347038269, 0.29707032442092896, 0.9014683365821838, -1.1537725925445557, -1.1898876428604126, -0.839401364326477, -0.7885664105415344, 1.9662518501281738, -0.21739470958709717, 0.591992199420929, -0.07824385911226273, -1.3186784982681274, -0.056724198162555695, 0.6379531025886536, 0.3645259439945221, -0.47922635078430176, 0.8107356429100037, -0.687548041343689, -1.1276003122329712, -1.4414901733398438, -0.3799949586391449, -1.002506136894226, -0.8765516877174377, 1.0015232563018799, 0.8049696683883667, 0.16059553623199463, 1.8983752727508545, 0.6778907179832458, 0.21429315209388733, -2.485417127609253, 1.0076346397399902, 0.23023802042007446, -0.059179600328207016, 0.7986981868743896, 0.35340577363967896, 0.9822260737419128, 0.055961973965168, 0.46967703104019165, -2.416670083999634, 2.1991512775421143, -0.2254982739686966, 0.6350637674331665, -0.09419989585876465, -0.21449381113052368, 1.1315160989761353, 0.6676059365272522, 0.6190363764762878, -1.1005274057388306, 0.6790851950645447, -0.5634739398956299, 1.3588588237762451, 1.0333460569381714, -0.9085176587104797, -0.09054750949144363, 1.4478883743286133, 0.280458003282547, -0.6769997477531433, -1.0079220533370972, -1.0036934614181519, 0.8339970707893372, 1.6706230640411377, -0.09528336673974991, -0.12108846753835678, 0.7275972962379456, 0.748878002166748, -1.2282912731170654, 0.058389440178871155, -0.691443681716919, -0.8517394065856934, 1.8521860837936401, 2.137915849685669, -0.2662549912929535, -0.2580404281616211, -0.6719222068786621, -1.1877708435058594, 0.8353520035743713, -0.11370109766721725, 0.13290052115917206, 0.6722923517227173, -0.644350528717041, 1.057030200958252, 0.980610191822052, 0.7765399813652039, 0.10600780695676804, 0.18507884442806244, 0.39579644799232483, -0.2656565308570862, -1.2902384996414185, -0.3641706705093384, -1.17631995677948, -2.6213386058807373, 0.40686070919036865, -0.21311858296394348, -1.2780036926269531, 0.11741138249635696, -1.1004908084869385, 1.0000524520874023, -0.5986558794975281, -1.0784783363342285, -1.3646645545959473, 0.19111499190330505, 0.06965934485197067, 0.8503186106681824, -1.6491150856018066, -0.012733282521367073, 1.2576173543930054, 0.8603643178939819, -0.6217842698097229, 1.121632695198059, 0.2948905825614929, 1.044628381729126, 0.836622953414917, -0.46427640318870544, 0.6934657096862793, -0.08360622078180313, -1.4103341102600098, 0.5776429772377014, 1.1567648649215698, 0.15965873003005981, 1.5141364336013794, -0.475050687789917, -0.033308155834674835, 0.3779385983943939, -0.7449749112129211, -0.4896574020385742, -0.6226254105567932, 0.684567391872406, 0.04179999232292175, -0.8739199638366699, -0.021865811198949814, -0.001810071524232626, -0.29069700837135315, 0.1348496675491333, -1.609510064125061, -0.12625013291835785, -0.3216884136199951, -0.6445711255073547, -1.2916685342788696, -0.17692063748836517, 1.452812671661377, -0.8964691162109375, -0.12121805548667908, 0.4832743704319, 0.35672569274902344, 0.5388034582138062, 0.715054988861084, -0.6432174444198608, -0.4001805782318115, -0.20101642608642578, -0.3700826168060303, 0.3988354802131653, 1.410239815711975, -0.06369300931692123, -0.9651252627372742, 0.6441614031791687, -0.3289066255092621, 0.08802904933691025, 1.7581993341445923, 0.07025887817144394, -0.7283886075019836, 0.30340465903282166, -0.8003162741661072, 1.919662594795227, 1.7056256532669067, 1.3486638069152832, -0.20947463810443878, -0.8856080174446106, 0.6139281988143921, -0.43736568093299866, -0.40058544278144836, 0.8443000316619873, 0.3326466679573059, -0.17896094918251038, -1.2896790504455566, 0.8283471465110779, 1.2156212329864502, -0.8368838429450989, -0.8056475520133972, 0.019841335713863373, -0.7650787234306335, 1.1101888418197632, 0.6289486289024353, 0.3796510100364685, 0.3008645176887512, 1.675563097000122, 0.7159761786460876, -0.48878705501556396, 0.5111566185951233, 0.56061190366745, -0.17609913647174835, -2.209263563156128, -1.0677666664123535, 0.3198833763599396, -0.5562066435813904, -1.7097406387329102, 1.3879892826080322, -1.0721981525421143, -0.9010595679283142, 0.5700435042381287, 0.004015781916677952, 1.4568990468978882, 0.32850226759910583, 1.5128002166748047, 2.0835771560668945, 0.798267126083374, 0.36803555488586426, 1.3044993877410889, -0.2878968119621277, -0.4591602087020874, 1.683870553970337, -0.4361535310745239, 0.5412464737892151, 1.1575919389724731, -0.2706913650035858, -1.1048895120620728, -0.777426540851593, -1.327416181564331, -0.7657949328422546, 1.1857447624206543, 0.104482501745224, -1.1540601253509521, 0.20807546377182007, 1.6517313718795776, 0.06699784100055695, -0.31920912861824036, 0.6305845975875854, 0.41705751419067383, -0.8895144462585449, -0.027809269726276398, -0.9965981245040894, 0.4875745177268982, -0.16970591247081757, -0.3366941511631012, 0.21744592487812042, 0.43420812487602234, 1.3052717447280884, -0.09817402809858322, 0.09637599438428879, 1.1313735246658325, -1.4109140634536743, 1.4435864686965942, -0.7895854711532593, 0.4016449451446533, -2.2864789962768555, 1.2881053686141968, -0.7708313465118408, 1.9436955451965332, -2.675093173980713, 0.5046497583389282, -0.6519163250923157, -0.5138518810272217, 0.2827657163143158, -0.43998241424560547, -0.028707683086395264, -0.06941253691911697, -1.1217494010925293, 0.022998347878456116, -0.6387745141983032, 0.5609994530677795, 1.1616624593734741, 1.4034287929534912, -1.1735055446624756, -0.2094876915216446, -1.7096940279006958, -0.07690050452947617, -0.7139119505882263, 0.31947991251945496, -2.184936285018921, -0.1689402461051941, -2.0232841968536377, -2.2382986545562744, -1.161116361618042, -0.7475430369377136, 1.1177194118499756, 0.10725457966327667, -0.8207784295082092, 1.1879000663757324, -0.31825971603393555, -1.7572263479232788, 1.059271216392517, -2.0387845039367676 ]
https://github.com/huggingface/datasets/issues/4526
split cache used when processing different split
Hi, I think the issue happened because I was loading datasets under an `if` ... `else` statement and the condition would change the dataset I would need to load but instead the cached one was always returned. However, I believe that is expected behaviour, if so I'll close the issue. Otherwise I will try to provide a MWE
## Describe the bug` ``` ds1 = load_dataset('squad', split='validation') ds2 = load_dataset('squad', split='train') ds1 = ds1.map(some_function) ds2 = ds2.map(some_function) assert ds1 == ds2 ``` This happens when ds1 and ds2 are created in `pytorch_lightning.DataModule` through ``` class myDataModule: def train_dataloader(self): ds = load_dataset('squad', split='train') ds = ds.map(some_function) return [ds] def val_dataloader(self): ds = load_dataset('squad', split="validation") ds = ds.map(some_function) return [ds] ``` I don't know if it depends on `pytorch_lightning` or `datasets` but setting `ds.map(some_function, load_from_cache_file=False)` fixes the issue. If this is not enough to replicate I will try and provide and MWE, I don't have time now so I thought I wuld open the issue first!
701
58
split cache used when processing different split ## Describe the bug` ``` ds1 = load_dataset('squad', split='validation') ds2 = load_dataset('squad', split='train') ds1 = ds1.map(some_function) ds2 = ds2.map(some_function) assert ds1 == ds2 ``` This happens when ds1 and ds2 are created in `pytorch_lightning.DataModule` through ``` class myDataModule: def train_dataloader(self): ds = load_dataset('squad', split='train') ds = ds.map(some_function) return [ds] def val_dataloader(self): ds = load_dataset('squad', split="validation") ds = ds.map(some_function) return [ds] ``` I don't know if it depends on `pytorch_lightning` or `datasets` but setting `ds.map(some_function, load_from_cache_file=False)` fixes the issue. If this is not enough to replicate I will try and provide and MWE, I don't have time now so I thought I wuld open the issue first! Hi, I think the issue happened because I was loading datasets under an `if` ... `else` statement and the condition would change the dataset I would need to load but instead the cached one was always returned. However, I believe that is expected behaviour, if so I'll close the issue. Otherwise I will try to provide a MWE
[ -1.2766914367675781, -1.002177119255066, -0.7406906485557556, 1.4788144826889038, -0.2591697573661804, -1.174378752708435, 0.17659629881381989, -1.0377475023269653, 1.709842562675476, -0.8197089433670044, 0.40778985619544983, -1.632195234298706, -0.026029478758573532, -0.604771077632904, -0.7275797724723816, -0.9002097249031067, -0.387378990650177, -0.7589573860168457, 1.1802324056625366, 2.440136194229126, 1.1848468780517578, -1.3764842748641968, 2.655369758605957, 0.6581212282180786, -0.09710261970758438, -1.165466547012329, 0.5319426655769348, -0.03111322782933712, -1.1500309705734253, -0.4472353458404541, -0.9180523157119751, -0.06869032979011536, -0.6247819662094116, -0.5107221603393555, -0.05385418236255646, 0.44884029030799866, -0.3347146213054657, -0.5594227313995361, -0.39910194277763367, -0.7507175803184509, 0.5547849535942078, -0.42987316846847534, 0.8423444032669067, -0.2687951624393463, 1.874647855758667, -0.5456671714782715, 0.4894108772277832, 0.6771540641784668, 1.3498519659042358, 0.2253190279006958, -0.12173634022474289, 0.42959296703338623, 0.32076752185821533, 0.009811075404286385, 0.5383576154708862, 1.158799171447754, 0.6320928335189819, 0.4783562421798706, 0.8159118890762329, -2.291840076446533, 1.259400725364685, -1.2266294956207275, 0.34779438376426697, 1.2789604663848877, -0.9018261432647705, 0.29990652203559875, -1.7161749601364136, -0.012428193353116512, 0.6258867979049683, -2.212817907333374, 0.3500424921512604, -1.3178426027297974, -0.43342745304107666, 1.1001121997833252, 0.4518333077430725, -1.3613852262496948, 0.08507008105516434, -0.3275883197784424, 1.0235052108764648, 0.3442731201648712, 1.0419255495071411, -1.7278223037719727, 0.016443129628896713, -0.3999255299568176, 0.12315984815359116, -1.2972809076309204, -1.4153375625610352, 0.4762667417526245, 0.5586578845977783, 0.6409355998039246, -0.14364475011825562, 1.096877098083496, -0.9431289434432983, 0.7200139760971069, -1.0067282915115356, -1.6057382822036743, -1.4303961992263794, -2.2009871006011963, -2.247044563293457, 0.787955105304718, -0.36637839674949646, -0.6034795045852661, 2.0107295513153076, -1.043717622756958, -1.7769062519073486, 1.1563488245010376, 0.2671877145767212, -0.05450960248708725, 2.408233165740967, 0.2702392041683197, -0.8141003251075745, 0.5007112622261047, -0.854997992515564, 0.8453059196472168, -0.3453711271286011, 1.4500166177749634, 0.5362487435340881, -1.0372636318206787, 1.6950303316116333, -0.2854282557964325, 0.560716986656189, -0.671253502368927, -0.5401794910430908, -0.8601067066192627, 0.31792858242988586, 1.9882512092590332, -0.2387886792421341, 1.5981042385101318, -0.5208348631858826, -1.5583083629608154, -1.5539302825927734, 1.0234053134918213, 0.34463828802108765, -0.7464660406112671, 0.1687486171722412, -0.3745546042919159, 0.22946050763130188, -0.09634674340486526, 1.1761736869812012, 1.270711064338684, 0.6802113056182861, -0.34741464257240295, -0.8647069334983826, 0.15701062977313995, -0.04148414731025696, -0.7283453345298767, -1.8251765966415405, -0.3767423927783966, 0.01285797543823719, 0.6541550159454346, -1.2110663652420044, 1.7580960988998413, 0.8618543148040771, 1.845644235610962, 1.0503746271133423, -0.31718555092811584, 1.4743502140045166, 0.06095988303422928, 1.8763654232025146, -0.527430534362793, 0.6693621873855591, -0.3101378381252289, -1.0862215757369995, 0.7844370007514954, -0.27317655086517334, -2.020812511444092, -0.8404132723808289, -0.793390154838562, -0.08683814108371735, -0.7734721899032593, 0.9136870503425598, -0.47536736726760864, -1.5536586046218872, 0.2833278179168701, -0.6829059720039368, 0.13341598212718964, -1.2176785469055176, 0.2780114710330963, 0.6598747372627258, -0.5165630578994751, 0.08766533434391022, -0.29095447063446045, -1.173936128616333, -0.39386269450187683, 0.29390060901641846, 1.8857474327087402, -0.7486507892608643, 0.906370222568512, 1.0736404657363892, -0.7178343534469604, -0.114102803170681, 0.29965099692344666, -0.2252310961484909, 0.8301281929016113, -0.9090291261672974, -0.5281739830970764, 1.2036559581756592, -0.18502755463123322, -0.6558474898338318, 1.508501648902893, 0.7892767190933228, -1.0053991079330444, -0.045391522347927094, -0.16796180605888367, -0.8738489151000977, 0.11026866734027863, -1.620934247970581, -0.10104020684957504, 0.42504939436912537, -1.6248961687088013, -0.5078043341636658, -0.15152575075626373, 1.2530794143676758, -0.21289688348770142, 1.398310661315918, -0.4799521267414093, -0.0695362538099289, -0.20421719551086426, -0.37871429324150085, 0.1633266657590866, -0.02370264381170273, -0.6978180408477783, 0.13425502181053162, -0.7572991251945496, 0.3595210015773773, 1.418269157409668, 0.28405696153640747, 0.026144417002797127, 0.5279756784439087, 1.1313145160675049, 0.4132564663887024, 0.036002546548843384, -0.8249431252479553, -1.5992976427078247, 1.9994384050369263, -1.5003780126571655, 2.0061886310577393, 0.7337241768836975, -0.14107286930084229, -1.6934658288955688, -1.7229738235473633, 1.4201123714447021, 1.2366048097610474, 2.2528557777404785, 0.631544291973114, 0.3956272304058075, -0.87850022315979, -0.7386434674263, 0.24021263420581818, -1.0373681783676147, -0.6983479261398315, 0.09697634726762772, 2.3844799995422363, 1.8431391716003418, -0.4092366695404053, -0.2607310712337494, -1.045031189918518, 1.4219334125518799, -0.2600266933441162, 0.27488476037979126, 1.9024658203125, -0.19944961369037628, -1.101366639137268, 1.316892385482788, -2.286546468734741, 0.07901011407375336, 1.9899803400039673, 0.26245781779289246, 0.11017405986785889, -1.353790044784546, -0.6319553852081299, -0.23446249961853027, -0.446140319108963, -1.2502871751785278, 0.44505131244659424, -0.335130512714386, -0.785506010055542, -1.3061150312423706, 0.2515982687473297, -1.0904557704925537, -1.6021409034729004, 0.26490193605422974, 1.8637117147445679, 1.9695255756378174, -0.7347919940948486, 1.6199620962142944, -0.36906254291534424, 0.30178460478782654, 1.2464659214019775, 1.1905992031097412, 3.0669453144073486, 1.8317201137542725, -1.2852154970169067, 0.6259428262710571, -0.13175839185714722, -0.5826072692871094, 1.1700053215026855, -1.1976003646850586, 1.2729402780532837, -0.14566119015216827, -1.130507230758667, -1.2094600200653076, 0.8815619945526123, 0.4645448923110962, 0.08782581239938736, -0.481868714094162, 1.2152724266052246, 0.013227878138422966, 1.2588149309158325, 0.45226845145225525, -0.33591228723526, 0.636577308177948, -0.41890934109687805, -0.6003137826919556, 1.5500339269638062, 0.2019992470741272, -1.3451151847839355, -2.2096798419952393, -0.1774657815694809, -0.804631769657135, 0.1087774857878685, -0.5791376233100891, -0.9303706884384155, 1.6039546728134155, 0.3621600270271301, -1.2366573810577393, -0.23469939827919006, -0.3435817062854767, -0.6079115271568298, 2.7470812797546387, -1.2574290037155151, -0.3394273519515991, -1.043773889541626, -0.6834682822227478, 1.6841678619384766, -1.115057110786438, -0.17013952136039734, -1.0514580011367798, -0.5357608795166016, -1.3152521848678589, -0.5318443179130554, -0.012453258037567139, -0.9995075464248657, 0.8356038928031921, 0.10084541887044907, -1.1066380739212036, -0.3692740797996521, -0.8228384852409363, 0.9449754357337952, -0.1213882714509964, 0.21205852925777435, 1.766110897064209, 0.318379282951355, -0.403343141078949, 0.7360033392906189, 1.166788101196289, 0.5471870303153992, -0.586460530757904, 0.2801234722137451, -0.5880250930786133, 0.24376791715621948, -1.3027886152267456, 0.27769580483436584, -2.859750747680664, 0.6913058161735535, 0.03762862831354141, -0.004366287495940924, -0.11670795828104019, -1.3905448913574219, 1.118263840675354, 2.596095323562622, -1.1648682355880737, 0.5032130479812622, 0.3534812033176422, 1.2189940214157104, -1.7087160348892212, 0.31247055530548096, -0.4141707718372345, 2.160639524459839, 0.27352598309516907, 1.2297301292419434, -0.4862038195133209, -2.4050512313842773, 0.5967409014701843, -1.2177051305770874, -1.2737970352172852, 0.7767258286476135, -0.9344437122344971, 0.1440185159444809, -1.3999052047729492, -0.30436068773269653, -0.8809869289398193, -1.0768423080444336, 0.7941886782646179, 0.23968295753002167, 0.39489054679870605, -0.6542519330978394, 0.37427064776420593, -2.2585885524749756, -1.4532396793365479, -0.11765167117118835, -0.9204353094100952, 0.48444780707359314, -0.36519989371299744, 0.6068443655967712, -0.16535939276218414, 0.0040623899549245834, 0.3385535180568695, 1.4961153268814087, 3.4000000953674316, 0.23849432170391083, 0.29005342721939087, -0.14736491441726685, -0.8915037512779236, 1.524355173110962, 0.8632115125656128, -0.20575787127017975, -0.5455214977264404, -1.0483342409133911, 1.3077281713485718, 1.93559730052948, 0.9786837697029114, 0.04625937342643738, -0.667248010635376, -0.6443292498588562, -0.11976423859596252, 0.131460502743721, 0.45802760124206543, 0.8311427235603333, 0.15621733665466309, 0.14057683944702148, 1.2730005979537964, 1.1637036800384521, -0.5477708578109741, 0.4320544898509979, -0.8368260860443115, -0.4179317355155945, 0.5735551714897156, 0.26008355617523193, -0.114833302795887, 0.37545400857925415, -0.9480727314949036, -0.1952182799577713, -0.3669717311859131, -0.9207178950309753, -0.7650938630104065, -0.3833473026752472, -0.3620445132255554, 1.5173490047454834, 0.0891178622841835, -0.5324913859367371, -0.053670912981033325, -0.8401263952255249, -0.16003179550170898, -1.0546436309814453, 0.1667383760213852, -0.1475481539964676, -0.23233407735824585, -0.20605817437171936, 1.7267682552337646, -0.8771307468414307, -2.066801071166992, 0.1983710527420044, 0.3616217076778412, -0.2189030647277832, 0.27914735674858093, 1.6791414022445679, 0.49347758293151855, 1.3487173318862915, 1.3692089319229126, 1.0193926095962524, -0.6187426447868347, -1.174805760383606, 0.6769229173660278, 0.9229860901832581, -1.2845382690429688, 0.7617058157920837, 0.08068478107452393, -0.4822368025779724, 0.6394864916801453, 1.222791075706482, 0.5785800814628601, -2.0311782360076904, 0.7825644016265869, -0.9335561990737915, 0.7887768149375916, 0.6768670678138733, 0.6348188519477844, 0.28162816166877747, 0.8872367143630981, -1.1139225959777832, -1.2261104583740234, -0.8062935471534729, -0.7632297873497009, 1.964621663093567, -0.21191075444221497, 0.6581600308418274, -0.09871337562799454, -1.280115008354187, -0.061023443937301636, 0.6445935368537903, 0.3858201503753662, -0.520185112953186, 0.8367868065834045, -0.654878556728363, -1.1518785953521729, -1.4670578241348267, -0.4101272523403168, -1.0590146780014038, -0.895867645740509, 0.9943253397941589, 0.7947553992271423, 0.13902631402015686, 1.8860572576522827, 0.6536901593208313, 0.1904142051935196, -2.5227205753326416, 0.957614541053772, 0.2430591881275177, -0.0386514887213707, 0.7953234314918518, 0.3572450578212738, 0.9898102283477783, 0.05393720418214798, 0.5054734945297241, -2.3645427227020264, 2.1935017108917236, -0.22750729322433472, 0.6197896003723145, -0.07218416035175323, -0.23885950446128845, 1.1417937278747559, 0.6836645603179932, 0.639721691608429, -1.0808956623077393, 0.6466001272201538, -0.6023923754692078, 1.3596819639205933, 1.0584239959716797, -0.8629462718963623, -0.0929672047495842, 1.456479787826538, 0.33051982522010803, -0.6422066688537598, -1.0044456720352173, -0.999643087387085, 0.8337351679801941, 1.6790344715118408, -0.12277716398239136, -0.14683052897453308, 0.7107506990432739, 0.7616258263587952, -1.269530177116394, 0.08334346860647202, -0.6732144355773926, -0.8624613285064697, 1.8292752504348755, 2.1105475425720215, -0.26580727100372314, -0.2844223082065582, -0.7030575275421143, -1.173061728477478, 0.84611976146698, -0.08589952439069748, 0.10878929495811462, 0.7025341987609863, -0.6108835935592651, 1.059796690940857, 0.9468300938606262, 0.8003957867622375, 0.1571640521287918, 0.22521458566188812, 0.3986912965774536, -0.26287513971328735, -1.2817180156707764, -0.3166390657424927, -1.1452116966247559, -2.6003952026367188, 0.44306156039237976, -0.25340619683265686, -1.3131872415542603, 0.09362909942865372, -1.082823634147644, 0.9923135638237, -0.5988035798072815, -1.071020483970642, -1.3895474672317505, 0.18510185182094574, 0.038340404629707336, 0.8494064807891846, -1.640031337738037, 0.018782271072268486, 1.272815227508545, 0.8562720417976379, -0.6545534133911133, 1.1085525751113892, 0.29268017411231995, 1.0715124607086182, 0.8473503589630127, -0.4768868684768677, 0.6535050272941589, -0.0952470675110817, -1.3896384239196777, 0.5661433339118958, 1.111114263534546, 0.17120498418807983, 1.527160882949829, -0.5043526887893677, -0.024811681360006332, 0.37706419825553894, -0.717225968837738, -0.4864175617694855, -0.6923965811729431, 0.6813210248947144, 0.046171680092811584, -0.8628042936325073, 0.031519144773483276, 0.04028027504682541, -0.24287861585617065, 0.18187163770198822, -1.5969889163970947, -0.1340356171131134, -0.3447628915309906, -0.6070291996002197, -1.2761507034301758, -0.17117489874362946, 1.442301630973816, -0.8290074467658997, -0.14373362064361572, 0.5044235587120056, 0.38188979029655457, 0.510494589805603, 0.6867652535438538, -0.6428138613700867, -0.3916386663913727, -0.22151030600070953, -0.3942473232746124, 0.3852303624153137, 1.403205394744873, -0.1130722388625145, -0.9853715896606445, 0.6897933483123779, -0.2719687819480896, 0.06605362892150879, 1.7889783382415771, 0.09526771306991577, -0.7043060064315796, 0.2608691155910492, -0.7880250215530396, 1.9006911516189575, 1.744154691696167, 1.3502601385116577, -0.2164139300584793, -0.8949025273323059, 0.6053076982498169, -0.40654048323631287, -0.4234238266944885, 0.8559433817863464, 0.3495141565799713, -0.1463896781206131, -1.3111861944198608, 0.7932904362678528, 1.2700181007385254, -0.823898196220398, -0.8648666143417358, -0.014814954251050949, -0.789985716342926, 1.1210333108901978, 0.6095821261405945, 0.36493954062461853, 0.2532896399497986, 1.657467246055603, 0.7107558250427246, -0.47438105940818787, 0.5112926959991455, 0.5421074032783508, -0.17603586614131927, -2.17297625541687, -1.125529408454895, 0.314253568649292, -0.5699084997177124, -1.7640581130981445, 1.417129397392273, -1.059321403503418, -0.9217105507850647, 0.5808452367782593, 0.00473494827747345, 1.4732270240783691, 0.3383382558822632, 1.5420399904251099, 2.090747594833374, 0.7939972877502441, 0.3819386959075928, 1.31125807762146, -0.2504998743534088, -0.4753665030002594, 1.7002516984939575, -0.428141325712204, 0.5226176381111145, 1.1654112339019775, -0.24126766622066498, -1.0692700147628784, -0.7986053228378296, -1.2842274904251099, -0.7732571959495544, 1.1887494325637817, 0.13193507492542267, -1.1734102964401245, 0.2445405125617981, 1.6329526901245117, 0.0717286691069603, -0.3126908838748932, 0.664768636226654, 0.41629454493522644, -0.8691571950912476, 0.003754056990146637, -1.003482460975647, 0.4936627149581909, -0.180910125374794, -0.36108410358428955, 0.23333695530891418, 0.4284636676311493, 1.338921070098877, -0.10125067085027695, 0.14639638364315033, 1.1700078248977661, -1.354861855506897, 1.449470043182373, -0.7322035431861877, 0.38965561985969543, -2.315746307373047, 1.3037916421890259, -0.7839269042015076, 1.9528422355651855, -2.644881010055542, 0.4700780212879181, -0.6335394382476807, -0.4723822772502899, 0.3153577148914337, -0.4892204701900482, 0.0014928514137864113, -0.050126492977142334, -1.1442105770111084, 0.024998100474476814, -0.6677006483078003, 0.5780177712440491, 1.148111343383789, 1.4329687356948853, -1.1355839967727661, -0.2290395051240921, -1.7425819635391235, -0.12049932777881622, -0.6341437101364136, 0.3485431969165802, -2.179675340652466, -0.18201369047164917, -2.021223306655884, -2.2811436653137207, -1.1652432680130005, -0.7866405844688416, 1.091111660003662, 0.11871632188558578, -0.780855119228363, 1.1856721639633179, -0.31278619170188904, -1.8034402132034302, 1.055821418762207, -2.044677734375 ]
https://github.com/huggingface/datasets/issues/4525
Out of memory error on workers while running Beam+Dataflow
Some naive ideas to cope with this: - enable more RAM on each worker - force the spanning of more workers - others?
## Describe the bug While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files). Previously we ran the preprocessing for the "dev" config (only dev files) with success. Train data files are larger than dev ones and apparently workers run out of memory while processing them. Any help/hint is welcome! Error message: ``` Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` Info from the Diagnostics tab: ``` Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900 The worker VM had to shut down one or more processes due to lack of memory. ``` ## Additional information ### Stack trace ``` Traceback (most recent call last): File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module> sys.exit(main()) File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main service.run() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run builder.download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare self._download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare pipeline_results.wait_until_finish() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish raise DataflowRuntimeException( apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` ### Logs ``` Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0 Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service. ```
702
23
Out of memory error on workers while running Beam+Dataflow ## Describe the bug While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files). Previously we ran the preprocessing for the "dev" config (only dev files) with success. Train data files are larger than dev ones and apparently workers run out of memory while processing them. Any help/hint is welcome! Error message: ``` Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` Info from the Diagnostics tab: ``` Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900 The worker VM had to shut down one or more processes due to lack of memory. ``` ## Additional information ### Stack trace ``` Traceback (most recent call last): File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module> sys.exit(main()) File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main service.run() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run builder.download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare self._download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare pipeline_results.wait_until_finish() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish raise DataflowRuntimeException( apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` ### Logs ``` Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0 Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service. ``` Some naive ideas to cope with this: - enable more RAM on each worker - force the spanning of more workers - others?
[ -1.167747139930725, -0.9081085920333862, -0.6810803413391113, 1.495227336883545, -0.07052646577358246, -1.2898154258728027, 0.12022533267736435, -1.040149450302124, 1.505122423171997, -0.6887544989585876, 0.29703494906425476, -1.6630910634994507, -0.06212452054023743, -0.5730867385864258, -0.6957724690437317, -0.8337664604187012, -0.38206109404563904, -0.8570446968078613, 1.0062670707702637, 2.487558603286743, 1.3525497913360596, -1.3619784116744995, 2.7081074714660645, 0.6964371800422668, -0.32117313146591187, -0.9837691783905029, 0.5574024319648743, -0.0140798669308424, -1.3013544082641602, -0.47992655634880066, -0.9272590279579163, -0.017946450039744377, -0.6133636236190796, -0.38785025477409363, 0.0332610160112381, 0.42217034101486206, -0.23202966153621674, -0.29176661372184753, -0.6550682783126831, -0.7969309687614441, 0.522904634475708, -0.3505897521972656, 0.9616113305091858, -0.3162369132041931, 1.8150520324707031, -0.6479218006134033, 0.4017249643802643, 0.7542010545730591, 1.3154494762420654, 0.17482195794582367, -0.035889752209186554, 0.3308582007884979, 0.3500933349132538, -0.023595787584781647, 0.511845052242279, 1.255204200744629, 0.5603359341621399, 0.5064517259597778, 0.6673795580863953, -2.1668684482574463, 1.3391919136047363, -0.9007066488265991, 0.2305610626935959, 1.355873703956604, -0.9412118196487427, 0.3829191327095032, -1.7881221771240234, -0.09502428770065308, 0.6046106219291687, -2.217587947845459, 0.2836362421512604, -1.254388451576233, -0.523456335067749, 0.9361034035682678, 0.3263225853443146, -1.2136763334274292, 0.15803444385528564, -0.46290022134780884, 0.9841050505638123, 0.4013884663581848, 1.1012928485870361, -1.712233543395996, -0.05266832932829857, -0.29910269379615784, 0.09299805015325546, -1.2860612869262695, -1.6582489013671875, 0.555488646030426, 0.592936635017395, 0.5715922117233276, -0.1542646437883377, 1.0892468690872192, -1.0547739267349243, 0.8211280703544617, -0.9477689266204834, -1.6386371850967407, -1.45287024974823, -2.353949785232544, -2.246382474899292, 0.7677990198135376, -0.5574741363525391, -0.5091798305511475, 1.9890964031219482, -1.0262583494186401, -1.7707573175430298, 1.034909963607788, 0.326990008354187, 0.027504365891218185, 2.366971254348755, 0.20875053107738495, -0.7648671865463257, 0.42993414402008057, -0.7113832235336304, 0.7583556771278381, -0.33425018191337585, 1.3272569179534912, 0.497506707906723, -1.0997692346572876, 1.5845392942428589, -0.4461473524570465, 0.5275309681892395, -0.6245843172073364, -0.4765464961528778, -0.7875643968582153, 0.30519574880599976, 1.8639689683914185, -0.37660592794418335, 1.5454179048538208, -0.20644758641719818, -1.5562549829483032, -1.5818990468978882, 0.8448175191879272, 0.4604882299900055, -0.8871714472770691, 0.10469307750463486, -0.46059563755989075, 0.13330326974391937, -0.07036755979061127, 1.1158275604248047, 1.1853010654449463, 0.6499924659729004, -0.34627482295036316, -0.7897534370422363, 0.19053922593593597, -0.17640061676502228, -0.6672656536102295, -1.8475518226623535, -0.3269137740135193, 0.23050108551979065, 0.6502492427825928, -1.2434054613113403, 1.8727538585662842, 0.936091423034668, 1.9685883522033691, 0.9739022254943848, -0.3640747368335724, 1.4869446754455566, -0.032535672187805176, 1.8701131343841553, -0.48480838537216187, 0.6553521156311035, -0.4417518079280853, -1.2525527477264404, 0.9689347743988037, -0.33418983221054077, -1.9978687763214111, -0.8162897825241089, -0.7980762720108032, -0.20011460781097412, -0.7185720205307007, 0.9537826776504517, -0.2976924777030945, -1.4205987453460693, 0.13007564842700958, -0.6565256118774414, 0.1600048840045929, -1.2753715515136719, 0.22308053076267242, 0.6611273288726807, -0.701200008392334, -0.013131196610629559, -0.23339714109897614, -1.2479239702224731, -0.5131011009216309, 0.3061446249485016, 1.9186055660247803, -0.6375823020935059, 1.0166096687316895, 0.9990744590759277, -0.6828206181526184, 0.13825105130672455, 0.30453577637672424, -0.328828901052475, 0.8450989127159119, -1.116175889968872, -0.44466936588287354, 1.2722036838531494, -0.25492775440216064, -0.7351576685905457, 1.411509394645691, 0.8119500279426575, -1.1205393075942993, -0.26560652256011963, -0.20066778361797333, -0.874090850353241, 0.07222512364387512, -1.5145176649093628, -0.05276808887720108, 0.39511096477508545, -1.519985318183899, -0.3478204607963562, -0.16641037166118622, 1.3260327577590942, -0.138196662068367, 1.410787582397461, -0.36635422706604004, -0.1669679880142212, -0.28549325466156006, -0.4258630573749542, 0.14370639622211456, -0.169145867228508, -0.589881956577301, 0.2669302523136139, -0.8882887363433838, 0.29439905285835266, 1.4457391500473022, 0.3306660056114197, 0.06512290984392166, 0.5131847262382507, 1.0930020809173584, 0.33540403842926025, -0.04787251353263855, -0.9537578821182251, -1.5649904012680054, 2.0355160236358643, -1.4341237545013428, 1.8953666687011719, 0.8527833223342896, -0.04960868880152702, -1.7862956523895264, -1.8308517932891846, 1.2887829542160034, 1.1187952756881714, 2.3930020332336426, 0.5081571936607361, 0.37896934151649475, -0.7652207612991333, -0.7058573365211487, 0.404326468706131, -1.047053337097168, -0.6916713714599609, 0.20672020316123962, 2.3967602252960205, 1.8566828966140747, -0.47060978412628174, -0.2966027855873108, -0.9384845495223999, 1.2903610467910767, -0.2372637391090393, 0.2014797031879425, 2.0397369861602783, -0.29313385486602783, -0.9654138684272766, 1.3529775142669678, -2.3480100631713867, 0.27026423811912537, 2.0472168922424316, 0.26662755012512207, 0.13133969902992249, -1.3742396831512451, -0.6492131948471069, -0.233134925365448, -0.4636176824569702, -1.205694556236267, 0.5244424939155579, -0.2883610129356384, -0.8198261260986328, -1.427946925163269, 0.11114451289176941, -1.2197721004486084, -1.7867579460144043, 0.3645038902759552, 1.868938684463501, 2.101832389831543, -0.7597046494483948, 1.4894658327102661, -0.28360018134117126, 0.06359308958053589, 1.2436221837997437, 1.3234025239944458, 3.126072645187378, 1.8347582817077637, -1.3104753494262695, 0.668588399887085, -0.18811394274234772, -0.5055830478668213, 1.1298600435256958, -1.148753046989441, 1.134999394416809, -0.24561366438865662, -1.245051383972168, -1.1815334558486938, 1.084162712097168, 0.4160711169242859, 0.06463830918073654, -0.5107442140579224, 1.17487370967865, 0.14624227583408356, 1.2525125741958618, 0.6090380549430847, -0.41219562292099, 0.5123512148857117, -0.35947385430336, -0.5383492112159729, 1.5819700956344604, 0.23059333860874176, -1.444074034690857, -2.3406670093536377, -0.2702785134315491, -0.9774542450904846, -0.0691131055355072, -0.6724916100502014, -1.0127146244049072, 1.5446696281433105, 0.4032822847366333, -1.247618317604065, -0.2553451955318451, -0.3077389597892761, -0.5381221771240234, 2.6420605182647705, -1.3492203950881958, -0.12155945599079132, -0.9432495832443237, -0.5782790780067444, 1.616778016090393, -1.1498606204986572, -0.2658018469810486, -1.0575510263442993, -0.5829907059669495, -1.2604414224624634, -0.5053005218505859, 0.05665222555398941, -0.9864253401756287, 0.7643287181854248, 0.14237403869628906, -1.0842353105545044, -0.30643966794013977, -0.8747756481170654, 1.018897294998169, -0.11253564059734344, 0.20306947827339172, 1.7927168607711792, 0.3534736633300781, -0.42546460032463074, 0.7833393812179565, 1.1632709503173828, 0.6871854066848755, -0.6261670589447021, 0.06633931398391724, -0.6471678614616394, 0.25271719694137573, -1.3292959928512573, 0.2736646234989166, -2.879326820373535, 0.7092621922492981, -0.1419302374124527, -0.0951683297753334, -0.01384151540696621, -1.3326689004898071, 1.0764923095703125, 2.5679261684417725, -1.1184049844741821, 0.5268094539642334, 0.37656834721565247, 1.0605568885803223, -1.6364012956619263, 0.302687406539917, -0.5031272172927856, 2.1053006649017334, 0.08534754812717438, 1.2236632108688354, -0.44941994547843933, -2.2016520500183105, 0.6636963486671448, -1.2574456930160522, -1.053810477256775, 0.8622851967811584, -0.922485888004303, 0.1943369209766388, -1.5243024826049805, -0.19215548038482666, -0.8918091058731079, -1.2296314239501953, 0.7032374739646912, 0.001962551847100258, 0.418296217918396, -0.5353490114212036, 0.30148276686668396, -2.1429784297943115, -1.4099847078323364, -0.1795847862958908, -1.0207170248031616, 0.4899168908596039, -0.405717670917511, 0.6712584495544434, -0.12919683754444122, 0.0347956158220768, 0.3015495836734772, 1.4458074569702148, 3.405562400817871, 0.1697971075773239, 0.20288600027561188, -0.07582592219114304, -0.9528859257698059, 1.3909573554992676, 0.9226603507995605, -0.12576736509799957, -0.6170929670333862, -0.996905505657196, 1.2937769889831543, 2.0327951908111572, 1.0835514068603516, 0.09785874933004379, -0.8486785292625427, -0.7526372671127319, -0.014965282753109932, 0.11283502727746964, 0.5284773707389832, 0.8540798425674438, -0.03418531268835068, 0.0621708407998085, 1.3790440559387207, 1.194907546043396, -0.336579293012619, 0.4188495874404907, -0.8586564064025879, -0.38610655069351196, 0.4282650351524353, 0.2252831608057022, 0.058457598090171814, 0.43836236000061035, -1.0417282581329346, -0.3625503480434418, -0.3726640045642853, -0.9239937663078308, -0.753389835357666, -0.4709860384464264, -0.46504953503608704, 1.6551581621170044, 0.038449399173259735, -0.5057148933410645, -0.010502378456294537, -0.6857675909996033, -0.16725915670394897, -1.071566104888916, 0.16792234778404236, -0.11900481581687927, 0.009645366109907627, -0.1968955248594284, 1.6552807092666626, -0.9420904517173767, -2.154618978500366, 0.19112324714660645, 0.30645543336868286, -0.33273807168006897, 0.15331237018108368, 1.8099339008331299, 0.5257626175880432, 1.382735252380371, 1.2999671697616577, 0.9967676401138306, -0.6329928040504456, -1.2055569887161255, 0.7082068920135498, 0.9786188006401062, -1.4098525047302246, 0.9704183340072632, -0.1505812406539917, -0.47650864720344543, 0.6748145222663879, 1.2685965299606323, 0.45454278588294983, -2.00728178024292, 0.9372283816337585, -0.9463179707527161, 0.8013675808906555, 0.7012624740600586, 0.7374290227890015, 0.23076049983501434, 0.8225100040435791, -1.2495722770690918, -1.1180729866027832, -0.7191218137741089, -0.6333242654800415, 1.9135686159133911, -0.22640621662139893, 0.5845875144004822, -0.10762651264667511, -1.1972521543502808, -0.16036905348300934, 0.8617849349975586, 0.3184104859828949, -0.42917850613594055, 0.8620024919509888, -0.6055912971496582, -0.9900406002998352, -1.3000940084457397, -0.42029109597206116, -1.047550916671753, -0.8247358202934265, 1.0358669757843018, 0.6941180229187012, 0.4591766595840454, 2.008512496948242, 0.6856313347816467, 0.2745894193649292, -2.622067451477051, 0.9351630806922913, 0.24096471071243286, -0.02795102447271347, 0.9256349205970764, 0.2257327139377594, 1.086195707321167, -0.04834939166903496, 0.5479761958122253, -2.339092969894409, 2.234473705291748, -0.17562927305698395, 0.630689263343811, 0.015812654048204422, -0.23682208359241486, 1.1784641742706299, 0.5351911187171936, 0.5824214816093445, -1.1666040420532227, 0.6502164602279663, -0.5828353762626648, 1.1012531518936157, 0.8485900163650513, -1.0325201749801636, 0.048783835023641586, 1.3479341268539429, 0.46573036909103394, -0.4385830760002136, -0.9948357939720154, -0.8417344093322754, 0.9763474464416504, 1.6536574363708496, -0.04856167361140251, 0.03722640872001648, 0.9056390523910522, 0.639607310295105, -1.236367106437683, 0.13938595354557037, -0.6620202660560608, -0.675269365310669, 1.71132230758667, 2.0297162532806396, -0.1641356199979782, -0.1354001760482788, -0.802182674407959, -1.2638039588928223, 0.8210617303848267, -0.13218088448047638, 0.07695315778255463, 0.6260913014411926, -0.6611349582672119, 1.1281623840332031, 0.7099025845527649, 1.0362991094589233, 0.09676722437143326, 0.2504989504814148, 0.4368325471878052, -0.3622915744781494, -1.179662823677063, -0.28344908356666565, -1.109061360359192, -2.5931215286254883, 0.44675254821777344, -0.21485865116119385, -1.4839457273483276, 0.0339457243680954, -1.0018219947814941, 0.9216444492340088, -0.5538318753242493, -1.056221604347229, -1.4768624305725098, 0.3479066491127014, -0.16682106256484985, 0.981510579586029, -1.6316406726837158, -0.14935508370399475, 1.234882116317749, 0.7927021384239197, -0.6539110541343689, 0.9318616986274719, 0.22539423406124115, 0.9775547385215759, 0.8415790796279907, -0.37712472677230835, 0.612548828125, 0.0899684727191925, -1.3040012121200562, 0.48956042528152466, 1.195454478263855, 0.15648342669010162, 1.3795616626739502, -0.4564966857433319, 0.08198380470275879, 0.4284279942512512, -0.6200796961784363, -0.5171589255332947, -0.44524917006492615, 0.6808425784111023, -0.01199520193040371, -0.9841840267181396, -0.10266400873661041, -0.10955950617790222, -0.2510559856891632, 0.16423921287059784, -1.4657344818115234, -0.2315133959054947, -0.3046662509441376, -0.4358348548412323, -1.3369922637939453, -0.05317075923085213, 1.290614128112793, -0.665827214717865, -0.2582989037036896, 0.5340444445610046, 0.29477471113204956, 0.5524770617485046, 0.6179774403572083, -0.7117618918418884, -0.2577199637889862, -0.32406142354011536, -0.330523282289505, 0.35141846537590027, 1.303191065788269, -0.04640631750226021, -0.8803525567054749, 0.7063815593719482, -0.30131426453590393, 0.13909770548343658, 2.02036190032959, 0.09416399151086807, -0.7281070947647095, 0.36283260583877563, -0.6797582507133484, 1.7700042724609375, 1.7852320671081543, 1.1787346601486206, -0.13151206076145172, -0.9268597960472107, 0.6005533933639526, -0.279816210269928, -0.32721439003944397, 0.9528229236602783, 0.3219650685787201, -0.21593077480793, -1.429276466369629, 0.6652834415435791, 1.364363431930542, -0.8222671151161194, -0.7627568244934082, 0.12563902139663696, -0.927889883518219, 1.1964361667633057, 0.6034316420555115, 0.35901835560798645, 0.2785901427268982, 1.6083984375, 0.7234494686126709, -0.38576972484588623, 0.5142140984535217, 0.4683459997177124, -0.13981780409812927, -2.093266725540161, -1.081687092781067, 0.38187021017074585, -0.4754125773906708, -1.5090306997299194, 1.2971360683441162, -1.0894328355789185, -0.9955140948295593, 0.6062091588973999, 0.06011237949132919, 1.385765790939331, 0.4338339865207672, 1.6533832550048828, 2.181698799133301, 0.9014542102813721, 0.3391667902469635, 1.2463635206222534, -0.07501794397830963, -0.4135079085826874, 1.865286946296692, -0.45594140887260437, 0.46772822737693787, 1.097680687904358, -0.3471249043941498, -1.1171644926071167, -0.84577476978302, -1.1973611116409302, -0.6636627912521362, 1.220258116722107, 0.055026911199092865, -1.0703874826431274, 0.24480727314949036, 1.6066726446151733, 0.15287286043167114, -0.2042415887117386, 0.6504238247871399, 0.4202580153942108, -0.798992931842804, -0.10410724580287933, -0.8536184430122375, 0.5267447829246521, -0.12364353239536285, -0.3217950463294983, 0.32166367769241333, 0.5273076295852661, 1.282390832901001, -0.11538074910640717, 0.12285519391298294, 1.09727144241333, -1.4795984029769897, 1.5665452480316162, -0.7018610835075378, 0.26454511284828186, -2.429673194885254, 1.406009554862976, -0.8212742209434509, 1.9709917306900024, -2.598905563354492, 0.4001913070678711, -0.5293368101119995, -0.5242493152618408, 0.2528361976146698, -0.41426944732666016, 0.09667319059371948, -0.1800098568201065, -1.025019884109497, -0.012114761397242546, -0.6305838227272034, 0.5774763226509094, 1.175236701965332, 1.4311459064483643, -1.1075918674468994, -0.2906535267829895, -1.8079650402069092, -0.16971586644649506, -0.7381198406219482, 0.35623982548713684, -1.8801627159118652, -0.11117181926965714, -1.9442031383514404, -2.360278844833374, -1.433009147644043, -0.8506304621696472, 1.0830824375152588, 0.213068425655365, -0.9755762815475464, 1.152095079421997, -0.37558111548423767, -1.8428326845169067, 1.1761736869812012, -2.2514772415161133 ]
https://github.com/huggingface/datasets/issues/4525
Out of memory error on workers while running Beam+Dataflow
@albertvillanova We were finally able to process the full NQ dataset on our machines using 600 gb with 5 workers. Maybe these numbers will work for you as well.
## Describe the bug While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files). Previously we ran the preprocessing for the "dev" config (only dev files) with success. Train data files are larger than dev ones and apparently workers run out of memory while processing them. Any help/hint is welcome! Error message: ``` Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` Info from the Diagnostics tab: ``` Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900 The worker VM had to shut down one or more processes due to lack of memory. ``` ## Additional information ### Stack trace ``` Traceback (most recent call last): File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module> sys.exit(main()) File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main service.run() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run builder.download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare self._download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare pipeline_results.wait_until_finish() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish raise DataflowRuntimeException( apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` ### Logs ``` Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0 Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service. ```
702
29
Out of memory error on workers while running Beam+Dataflow ## Describe the bug While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files). Previously we ran the preprocessing for the "dev" config (only dev files) with success. Train data files are larger than dev ones and apparently workers run out of memory while processing them. Any help/hint is welcome! Error message: ``` Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` Info from the Diagnostics tab: ``` Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900 The worker VM had to shut down one or more processes due to lack of memory. ``` ## Additional information ### Stack trace ``` Traceback (most recent call last): File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module> sys.exit(main()) File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main service.run() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run builder.download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare self._download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare pipeline_results.wait_until_finish() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish raise DataflowRuntimeException( apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` ### Logs ``` Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0 Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service. ``` @albertvillanova We were finally able to process the full NQ dataset on our machines using 600 gb with 5 workers. Maybe these numbers will work for you as well.
[ -1.167747139930725, -0.9081085920333862, -0.6810803413391113, 1.495227336883545, -0.07052646577358246, -1.2898154258728027, 0.12022533267736435, -1.040149450302124, 1.505122423171997, -0.6887544989585876, 0.29703494906425476, -1.6630910634994507, -0.06212452054023743, -0.5730867385864258, -0.6957724690437317, -0.8337664604187012, -0.38206109404563904, -0.8570446968078613, 1.0062670707702637, 2.487558603286743, 1.3525497913360596, -1.3619784116744995, 2.7081074714660645, 0.6964371800422668, -0.32117313146591187, -0.9837691783905029, 0.5574024319648743, -0.0140798669308424, -1.3013544082641602, -0.47992655634880066, -0.9272590279579163, -0.017946450039744377, -0.6133636236190796, -0.38785025477409363, 0.0332610160112381, 0.42217034101486206, -0.23202966153621674, -0.29176661372184753, -0.6550682783126831, -0.7969309687614441, 0.522904634475708, -0.3505897521972656, 0.9616113305091858, -0.3162369132041931, 1.8150520324707031, -0.6479218006134033, 0.4017249643802643, 0.7542010545730591, 1.3154494762420654, 0.17482195794582367, -0.035889752209186554, 0.3308582007884979, 0.3500933349132538, -0.023595787584781647, 0.511845052242279, 1.255204200744629, 0.5603359341621399, 0.5064517259597778, 0.6673795580863953, -2.1668684482574463, 1.3391919136047363, -0.9007066488265991, 0.2305610626935959, 1.355873703956604, -0.9412118196487427, 0.3829191327095032, -1.7881221771240234, -0.09502428770065308, 0.6046106219291687, -2.217587947845459, 0.2836362421512604, -1.254388451576233, -0.523456335067749, 0.9361034035682678, 0.3263225853443146, -1.2136763334274292, 0.15803444385528564, -0.46290022134780884, 0.9841050505638123, 0.4013884663581848, 1.1012928485870361, -1.712233543395996, -0.05266832932829857, -0.29910269379615784, 0.09299805015325546, -1.2860612869262695, -1.6582489013671875, 0.555488646030426, 0.592936635017395, 0.5715922117233276, -0.1542646437883377, 1.0892468690872192, -1.0547739267349243, 0.8211280703544617, -0.9477689266204834, -1.6386371850967407, -1.45287024974823, -2.353949785232544, -2.246382474899292, 0.7677990198135376, -0.5574741363525391, -0.5091798305511475, 1.9890964031219482, -1.0262583494186401, -1.7707573175430298, 1.034909963607788, 0.326990008354187, 0.027504365891218185, 2.366971254348755, 0.20875053107738495, -0.7648671865463257, 0.42993414402008057, -0.7113832235336304, 0.7583556771278381, -0.33425018191337585, 1.3272569179534912, 0.497506707906723, -1.0997692346572876, 1.5845392942428589, -0.4461473524570465, 0.5275309681892395, -0.6245843172073364, -0.4765464961528778, -0.7875643968582153, 0.30519574880599976, 1.8639689683914185, -0.37660592794418335, 1.5454179048538208, -0.20644758641719818, -1.5562549829483032, -1.5818990468978882, 0.8448175191879272, 0.4604882299900055, -0.8871714472770691, 0.10469307750463486, -0.46059563755989075, 0.13330326974391937, -0.07036755979061127, 1.1158275604248047, 1.1853010654449463, 0.6499924659729004, -0.34627482295036316, -0.7897534370422363, 0.19053922593593597, -0.17640061676502228, -0.6672656536102295, -1.8475518226623535, -0.3269137740135193, 0.23050108551979065, 0.6502492427825928, -1.2434054613113403, 1.8727538585662842, 0.936091423034668, 1.9685883522033691, 0.9739022254943848, -0.3640747368335724, 1.4869446754455566, -0.032535672187805176, 1.8701131343841553, -0.48480838537216187, 0.6553521156311035, -0.4417518079280853, -1.2525527477264404, 0.9689347743988037, -0.33418983221054077, -1.9978687763214111, -0.8162897825241089, -0.7980762720108032, -0.20011460781097412, -0.7185720205307007, 0.9537826776504517, -0.2976924777030945, -1.4205987453460693, 0.13007564842700958, -0.6565256118774414, 0.1600048840045929, -1.2753715515136719, 0.22308053076267242, 0.6611273288726807, -0.701200008392334, -0.013131196610629559, -0.23339714109897614, -1.2479239702224731, -0.5131011009216309, 0.3061446249485016, 1.9186055660247803, -0.6375823020935059, 1.0166096687316895, 0.9990744590759277, -0.6828206181526184, 0.13825105130672455, 0.30453577637672424, -0.328828901052475, 0.8450989127159119, -1.116175889968872, -0.44466936588287354, 1.2722036838531494, -0.25492775440216064, -0.7351576685905457, 1.411509394645691, 0.8119500279426575, -1.1205393075942993, -0.26560652256011963, -0.20066778361797333, -0.874090850353241, 0.07222512364387512, -1.5145176649093628, -0.05276808887720108, 0.39511096477508545, -1.519985318183899, -0.3478204607963562, -0.16641037166118622, 1.3260327577590942, -0.138196662068367, 1.410787582397461, -0.36635422706604004, -0.1669679880142212, -0.28549325466156006, -0.4258630573749542, 0.14370639622211456, -0.169145867228508, -0.589881956577301, 0.2669302523136139, -0.8882887363433838, 0.29439905285835266, 1.4457391500473022, 0.3306660056114197, 0.06512290984392166, 0.5131847262382507, 1.0930020809173584, 0.33540403842926025, -0.04787251353263855, -0.9537578821182251, -1.5649904012680054, 2.0355160236358643, -1.4341237545013428, 1.8953666687011719, 0.8527833223342896, -0.04960868880152702, -1.7862956523895264, -1.8308517932891846, 1.2887829542160034, 1.1187952756881714, 2.3930020332336426, 0.5081571936607361, 0.37896934151649475, -0.7652207612991333, -0.7058573365211487, 0.404326468706131, -1.047053337097168, -0.6916713714599609, 0.20672020316123962, 2.3967602252960205, 1.8566828966140747, -0.47060978412628174, -0.2966027855873108, -0.9384845495223999, 1.2903610467910767, -0.2372637391090393, 0.2014797031879425, 2.0397369861602783, -0.29313385486602783, -0.9654138684272766, 1.3529775142669678, -2.3480100631713867, 0.27026423811912537, 2.0472168922424316, 0.26662755012512207, 0.13133969902992249, -1.3742396831512451, -0.6492131948471069, -0.233134925365448, -0.4636176824569702, -1.205694556236267, 0.5244424939155579, -0.2883610129356384, -0.8198261260986328, -1.427946925163269, 0.11114451289176941, -1.2197721004486084, -1.7867579460144043, 0.3645038902759552, 1.868938684463501, 2.101832389831543, -0.7597046494483948, 1.4894658327102661, -0.28360018134117126, 0.06359308958053589, 1.2436221837997437, 1.3234025239944458, 3.126072645187378, 1.8347582817077637, -1.3104753494262695, 0.668588399887085, -0.18811394274234772, -0.5055830478668213, 1.1298600435256958, -1.148753046989441, 1.134999394416809, -0.24561366438865662, -1.245051383972168, -1.1815334558486938, 1.084162712097168, 0.4160711169242859, 0.06463830918073654, -0.5107442140579224, 1.17487370967865, 0.14624227583408356, 1.2525125741958618, 0.6090380549430847, -0.41219562292099, 0.5123512148857117, -0.35947385430336, -0.5383492112159729, 1.5819700956344604, 0.23059333860874176, -1.444074034690857, -2.3406670093536377, -0.2702785134315491, -0.9774542450904846, -0.0691131055355072, -0.6724916100502014, -1.0127146244049072, 1.5446696281433105, 0.4032822847366333, -1.247618317604065, -0.2553451955318451, -0.3077389597892761, -0.5381221771240234, 2.6420605182647705, -1.3492203950881958, -0.12155945599079132, -0.9432495832443237, -0.5782790780067444, 1.616778016090393, -1.1498606204986572, -0.2658018469810486, -1.0575510263442993, -0.5829907059669495, -1.2604414224624634, -0.5053005218505859, 0.05665222555398941, -0.9864253401756287, 0.7643287181854248, 0.14237403869628906, -1.0842353105545044, -0.30643966794013977, -0.8747756481170654, 1.018897294998169, -0.11253564059734344, 0.20306947827339172, 1.7927168607711792, 0.3534736633300781, -0.42546460032463074, 0.7833393812179565, 1.1632709503173828, 0.6871854066848755, -0.6261670589447021, 0.06633931398391724, -0.6471678614616394, 0.25271719694137573, -1.3292959928512573, 0.2736646234989166, -2.879326820373535, 0.7092621922492981, -0.1419302374124527, -0.0951683297753334, -0.01384151540696621, -1.3326689004898071, 1.0764923095703125, 2.5679261684417725, -1.1184049844741821, 0.5268094539642334, 0.37656834721565247, 1.0605568885803223, -1.6364012956619263, 0.302687406539917, -0.5031272172927856, 2.1053006649017334, 0.08534754812717438, 1.2236632108688354, -0.44941994547843933, -2.2016520500183105, 0.6636963486671448, -1.2574456930160522, -1.053810477256775, 0.8622851967811584, -0.922485888004303, 0.1943369209766388, -1.5243024826049805, -0.19215548038482666, -0.8918091058731079, -1.2296314239501953, 0.7032374739646912, 0.001962551847100258, 0.418296217918396, -0.5353490114212036, 0.30148276686668396, -2.1429784297943115, -1.4099847078323364, -0.1795847862958908, -1.0207170248031616, 0.4899168908596039, -0.405717670917511, 0.6712584495544434, -0.12919683754444122, 0.0347956158220768, 0.3015495836734772, 1.4458074569702148, 3.405562400817871, 0.1697971075773239, 0.20288600027561188, -0.07582592219114304, -0.9528859257698059, 1.3909573554992676, 0.9226603507995605, -0.12576736509799957, -0.6170929670333862, -0.996905505657196, 1.2937769889831543, 2.0327951908111572, 1.0835514068603516, 0.09785874933004379, -0.8486785292625427, -0.7526372671127319, -0.014965282753109932, 0.11283502727746964, 0.5284773707389832, 0.8540798425674438, -0.03418531268835068, 0.0621708407998085, 1.3790440559387207, 1.194907546043396, -0.336579293012619, 0.4188495874404907, -0.8586564064025879, -0.38610655069351196, 0.4282650351524353, 0.2252831608057022, 0.058457598090171814, 0.43836236000061035, -1.0417282581329346, -0.3625503480434418, -0.3726640045642853, -0.9239937663078308, -0.753389835357666, -0.4709860384464264, -0.46504953503608704, 1.6551581621170044, 0.038449399173259735, -0.5057148933410645, -0.010502378456294537, -0.6857675909996033, -0.16725915670394897, -1.071566104888916, 0.16792234778404236, -0.11900481581687927, 0.009645366109907627, -0.1968955248594284, 1.6552807092666626, -0.9420904517173767, -2.154618978500366, 0.19112324714660645, 0.30645543336868286, -0.33273807168006897, 0.15331237018108368, 1.8099339008331299, 0.5257626175880432, 1.382735252380371, 1.2999671697616577, 0.9967676401138306, -0.6329928040504456, -1.2055569887161255, 0.7082068920135498, 0.9786188006401062, -1.4098525047302246, 0.9704183340072632, -0.1505812406539917, -0.47650864720344543, 0.6748145222663879, 1.2685965299606323, 0.45454278588294983, -2.00728178024292, 0.9372283816337585, -0.9463179707527161, 0.8013675808906555, 0.7012624740600586, 0.7374290227890015, 0.23076049983501434, 0.8225100040435791, -1.2495722770690918, -1.1180729866027832, -0.7191218137741089, -0.6333242654800415, 1.9135686159133911, -0.22640621662139893, 0.5845875144004822, -0.10762651264667511, -1.1972521543502808, -0.16036905348300934, 0.8617849349975586, 0.3184104859828949, -0.42917850613594055, 0.8620024919509888, -0.6055912971496582, -0.9900406002998352, -1.3000940084457397, -0.42029109597206116, -1.047550916671753, -0.8247358202934265, 1.0358669757843018, 0.6941180229187012, 0.4591766595840454, 2.008512496948242, 0.6856313347816467, 0.2745894193649292, -2.622067451477051, 0.9351630806922913, 0.24096471071243286, -0.02795102447271347, 0.9256349205970764, 0.2257327139377594, 1.086195707321167, -0.04834939166903496, 0.5479761958122253, -2.339092969894409, 2.234473705291748, -0.17562927305698395, 0.630689263343811, 0.015812654048204422, -0.23682208359241486, 1.1784641742706299, 0.5351911187171936, 0.5824214816093445, -1.1666040420532227, 0.6502164602279663, -0.5828353762626648, 1.1012531518936157, 0.8485900163650513, -1.0325201749801636, 0.048783835023641586, 1.3479341268539429, 0.46573036909103394, -0.4385830760002136, -0.9948357939720154, -0.8417344093322754, 0.9763474464416504, 1.6536574363708496, -0.04856167361140251, 0.03722640872001648, 0.9056390523910522, 0.639607310295105, -1.236367106437683, 0.13938595354557037, -0.6620202660560608, -0.675269365310669, 1.71132230758667, 2.0297162532806396, -0.1641356199979782, -0.1354001760482788, -0.802182674407959, -1.2638039588928223, 0.8210617303848267, -0.13218088448047638, 0.07695315778255463, 0.6260913014411926, -0.6611349582672119, 1.1281623840332031, 0.7099025845527649, 1.0362991094589233, 0.09676722437143326, 0.2504989504814148, 0.4368325471878052, -0.3622915744781494, -1.179662823677063, -0.28344908356666565, -1.109061360359192, -2.5931215286254883, 0.44675254821777344, -0.21485865116119385, -1.4839457273483276, 0.0339457243680954, -1.0018219947814941, 0.9216444492340088, -0.5538318753242493, -1.056221604347229, -1.4768624305725098, 0.3479066491127014, -0.16682106256484985, 0.981510579586029, -1.6316406726837158, -0.14935508370399475, 1.234882116317749, 0.7927021384239197, -0.6539110541343689, 0.9318616986274719, 0.22539423406124115, 0.9775547385215759, 0.8415790796279907, -0.37712472677230835, 0.612548828125, 0.0899684727191925, -1.3040012121200562, 0.48956042528152466, 1.195454478263855, 0.15648342669010162, 1.3795616626739502, -0.4564966857433319, 0.08198380470275879, 0.4284279942512512, -0.6200796961784363, -0.5171589255332947, -0.44524917006492615, 0.6808425784111023, -0.01199520193040371, -0.9841840267181396, -0.10266400873661041, -0.10955950617790222, -0.2510559856891632, 0.16423921287059784, -1.4657344818115234, -0.2315133959054947, -0.3046662509441376, -0.4358348548412323, -1.3369922637939453, -0.05317075923085213, 1.290614128112793, -0.665827214717865, -0.2582989037036896, 0.5340444445610046, 0.29477471113204956, 0.5524770617485046, 0.6179774403572083, -0.7117618918418884, -0.2577199637889862, -0.32406142354011536, -0.330523282289505, 0.35141846537590027, 1.303191065788269, -0.04640631750226021, -0.8803525567054749, 0.7063815593719482, -0.30131426453590393, 0.13909770548343658, 2.02036190032959, 0.09416399151086807, -0.7281070947647095, 0.36283260583877563, -0.6797582507133484, 1.7700042724609375, 1.7852320671081543, 1.1787346601486206, -0.13151206076145172, -0.9268597960472107, 0.6005533933639526, -0.279816210269928, -0.32721439003944397, 0.9528229236602783, 0.3219650685787201, -0.21593077480793, -1.429276466369629, 0.6652834415435791, 1.364363431930542, -0.8222671151161194, -0.7627568244934082, 0.12563902139663696, -0.927889883518219, 1.1964361667633057, 0.6034316420555115, 0.35901835560798645, 0.2785901427268982, 1.6083984375, 0.7234494686126709, -0.38576972484588623, 0.5142140984535217, 0.4683459997177124, -0.13981780409812927, -2.093266725540161, -1.081687092781067, 0.38187021017074585, -0.4754125773906708, -1.5090306997299194, 1.2971360683441162, -1.0894328355789185, -0.9955140948295593, 0.6062091588973999, 0.06011237949132919, 1.385765790939331, 0.4338339865207672, 1.6533832550048828, 2.181698799133301, 0.9014542102813721, 0.3391667902469635, 1.2463635206222534, -0.07501794397830963, -0.4135079085826874, 1.865286946296692, -0.45594140887260437, 0.46772822737693787, 1.097680687904358, -0.3471249043941498, -1.1171644926071167, -0.84577476978302, -1.1973611116409302, -0.6636627912521362, 1.220258116722107, 0.055026911199092865, -1.0703874826431274, 0.24480727314949036, 1.6066726446151733, 0.15287286043167114, -0.2042415887117386, 0.6504238247871399, 0.4202580153942108, -0.798992931842804, -0.10410724580287933, -0.8536184430122375, 0.5267447829246521, -0.12364353239536285, -0.3217950463294983, 0.32166367769241333, 0.5273076295852661, 1.282390832901001, -0.11538074910640717, 0.12285519391298294, 1.09727144241333, -1.4795984029769897, 1.5665452480316162, -0.7018610835075378, 0.26454511284828186, -2.429673194885254, 1.406009554862976, -0.8212742209434509, 1.9709917306900024, -2.598905563354492, 0.4001913070678711, -0.5293368101119995, -0.5242493152618408, 0.2528361976146698, -0.41426944732666016, 0.09667319059371948, -0.1800098568201065, -1.025019884109497, -0.012114761397242546, -0.6305838227272034, 0.5774763226509094, 1.175236701965332, 1.4311459064483643, -1.1075918674468994, -0.2906535267829895, -1.8079650402069092, -0.16971586644649506, -0.7381198406219482, 0.35623982548713684, -1.8801627159118652, -0.11117181926965714, -1.9442031383514404, -2.360278844833374, -1.433009147644043, -0.8506304621696472, 1.0830824375152588, 0.213068425655365, -0.9755762815475464, 1.152095079421997, -0.37558111548423767, -1.8428326845169067, 1.1761736869812012, -2.2514772415161133 ]
https://github.com/huggingface/datasets/issues/4525
Out of memory error on workers while running Beam+Dataflow
Thanks a lot for the hint, @seirasto. I have one question: what runner did you use? Direct, Apache Flink/Nemo/Samza/Spark, Google Dataflow...? Thank you.
## Describe the bug While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files). Previously we ran the preprocessing for the "dev" config (only dev files) with success. Train data files are larger than dev ones and apparently workers run out of memory while processing them. Any help/hint is welcome! Error message: ``` Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` Info from the Diagnostics tab: ``` Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900 The worker VM had to shut down one or more processes due to lack of memory. ``` ## Additional information ### Stack trace ``` Traceback (most recent call last): File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module> sys.exit(main()) File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main service.run() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run builder.download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare self._download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare pipeline_results.wait_until_finish() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish raise DataflowRuntimeException( apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` ### Logs ``` Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0 Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service. ```
702
23
Out of memory error on workers while running Beam+Dataflow ## Describe the bug While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files). Previously we ran the preprocessing for the "dev" config (only dev files) with success. Train data files are larger than dev ones and apparently workers run out of memory while processing them. Any help/hint is welcome! Error message: ``` Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` Info from the Diagnostics tab: ``` Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900 The worker VM had to shut down one or more processes due to lack of memory. ``` ## Additional information ### Stack trace ``` Traceback (most recent call last): File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module> sys.exit(main()) File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main service.run() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run builder.download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare self._download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare pipeline_results.wait_until_finish() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish raise DataflowRuntimeException( apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` ### Logs ``` Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0 Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service. ``` Thanks a lot for the hint, @seirasto. I have one question: what runner did you use? Direct, Apache Flink/Nemo/Samza/Spark, Google Dataflow...? Thank you.
[ -1.167747139930725, -0.9081085920333862, -0.6810803413391113, 1.495227336883545, -0.07052646577358246, -1.2898154258728027, 0.12022533267736435, -1.040149450302124, 1.505122423171997, -0.6887544989585876, 0.29703494906425476, -1.6630910634994507, -0.06212452054023743, -0.5730867385864258, -0.6957724690437317, -0.8337664604187012, -0.38206109404563904, -0.8570446968078613, 1.0062670707702637, 2.487558603286743, 1.3525497913360596, -1.3619784116744995, 2.7081074714660645, 0.6964371800422668, -0.32117313146591187, -0.9837691783905029, 0.5574024319648743, -0.0140798669308424, -1.3013544082641602, -0.47992655634880066, -0.9272590279579163, -0.017946450039744377, -0.6133636236190796, -0.38785025477409363, 0.0332610160112381, 0.42217034101486206, -0.23202966153621674, -0.29176661372184753, -0.6550682783126831, -0.7969309687614441, 0.522904634475708, -0.3505897521972656, 0.9616113305091858, -0.3162369132041931, 1.8150520324707031, -0.6479218006134033, 0.4017249643802643, 0.7542010545730591, 1.3154494762420654, 0.17482195794582367, -0.035889752209186554, 0.3308582007884979, 0.3500933349132538, -0.023595787584781647, 0.511845052242279, 1.255204200744629, 0.5603359341621399, 0.5064517259597778, 0.6673795580863953, -2.1668684482574463, 1.3391919136047363, -0.9007066488265991, 0.2305610626935959, 1.355873703956604, -0.9412118196487427, 0.3829191327095032, -1.7881221771240234, -0.09502428770065308, 0.6046106219291687, -2.217587947845459, 0.2836362421512604, -1.254388451576233, -0.523456335067749, 0.9361034035682678, 0.3263225853443146, -1.2136763334274292, 0.15803444385528564, -0.46290022134780884, 0.9841050505638123, 0.4013884663581848, 1.1012928485870361, -1.712233543395996, -0.05266832932829857, -0.29910269379615784, 0.09299805015325546, -1.2860612869262695, -1.6582489013671875, 0.555488646030426, 0.592936635017395, 0.5715922117233276, -0.1542646437883377, 1.0892468690872192, -1.0547739267349243, 0.8211280703544617, -0.9477689266204834, -1.6386371850967407, -1.45287024974823, -2.353949785232544, -2.246382474899292, 0.7677990198135376, -0.5574741363525391, -0.5091798305511475, 1.9890964031219482, -1.0262583494186401, -1.7707573175430298, 1.034909963607788, 0.326990008354187, 0.027504365891218185, 2.366971254348755, 0.20875053107738495, -0.7648671865463257, 0.42993414402008057, -0.7113832235336304, 0.7583556771278381, -0.33425018191337585, 1.3272569179534912, 0.497506707906723, -1.0997692346572876, 1.5845392942428589, -0.4461473524570465, 0.5275309681892395, -0.6245843172073364, -0.4765464961528778, -0.7875643968582153, 0.30519574880599976, 1.8639689683914185, -0.37660592794418335, 1.5454179048538208, -0.20644758641719818, -1.5562549829483032, -1.5818990468978882, 0.8448175191879272, 0.4604882299900055, -0.8871714472770691, 0.10469307750463486, -0.46059563755989075, 0.13330326974391937, -0.07036755979061127, 1.1158275604248047, 1.1853010654449463, 0.6499924659729004, -0.34627482295036316, -0.7897534370422363, 0.19053922593593597, -0.17640061676502228, -0.6672656536102295, -1.8475518226623535, -0.3269137740135193, 0.23050108551979065, 0.6502492427825928, -1.2434054613113403, 1.8727538585662842, 0.936091423034668, 1.9685883522033691, 0.9739022254943848, -0.3640747368335724, 1.4869446754455566, -0.032535672187805176, 1.8701131343841553, -0.48480838537216187, 0.6553521156311035, -0.4417518079280853, -1.2525527477264404, 0.9689347743988037, -0.33418983221054077, -1.9978687763214111, -0.8162897825241089, -0.7980762720108032, -0.20011460781097412, -0.7185720205307007, 0.9537826776504517, -0.2976924777030945, -1.4205987453460693, 0.13007564842700958, -0.6565256118774414, 0.1600048840045929, -1.2753715515136719, 0.22308053076267242, 0.6611273288726807, -0.701200008392334, -0.013131196610629559, -0.23339714109897614, -1.2479239702224731, -0.5131011009216309, 0.3061446249485016, 1.9186055660247803, -0.6375823020935059, 1.0166096687316895, 0.9990744590759277, -0.6828206181526184, 0.13825105130672455, 0.30453577637672424, -0.328828901052475, 0.8450989127159119, -1.116175889968872, -0.44466936588287354, 1.2722036838531494, -0.25492775440216064, -0.7351576685905457, 1.411509394645691, 0.8119500279426575, -1.1205393075942993, -0.26560652256011963, -0.20066778361797333, -0.874090850353241, 0.07222512364387512, -1.5145176649093628, -0.05276808887720108, 0.39511096477508545, -1.519985318183899, -0.3478204607963562, -0.16641037166118622, 1.3260327577590942, -0.138196662068367, 1.410787582397461, -0.36635422706604004, -0.1669679880142212, -0.28549325466156006, -0.4258630573749542, 0.14370639622211456, -0.169145867228508, -0.589881956577301, 0.2669302523136139, -0.8882887363433838, 0.29439905285835266, 1.4457391500473022, 0.3306660056114197, 0.06512290984392166, 0.5131847262382507, 1.0930020809173584, 0.33540403842926025, -0.04787251353263855, -0.9537578821182251, -1.5649904012680054, 2.0355160236358643, -1.4341237545013428, 1.8953666687011719, 0.8527833223342896, -0.04960868880152702, -1.7862956523895264, -1.8308517932891846, 1.2887829542160034, 1.1187952756881714, 2.3930020332336426, 0.5081571936607361, 0.37896934151649475, -0.7652207612991333, -0.7058573365211487, 0.404326468706131, -1.047053337097168, -0.6916713714599609, 0.20672020316123962, 2.3967602252960205, 1.8566828966140747, -0.47060978412628174, -0.2966027855873108, -0.9384845495223999, 1.2903610467910767, -0.2372637391090393, 0.2014797031879425, 2.0397369861602783, -0.29313385486602783, -0.9654138684272766, 1.3529775142669678, -2.3480100631713867, 0.27026423811912537, 2.0472168922424316, 0.26662755012512207, 0.13133969902992249, -1.3742396831512451, -0.6492131948471069, -0.233134925365448, -0.4636176824569702, -1.205694556236267, 0.5244424939155579, -0.2883610129356384, -0.8198261260986328, -1.427946925163269, 0.11114451289176941, -1.2197721004486084, -1.7867579460144043, 0.3645038902759552, 1.868938684463501, 2.101832389831543, -0.7597046494483948, 1.4894658327102661, -0.28360018134117126, 0.06359308958053589, 1.2436221837997437, 1.3234025239944458, 3.126072645187378, 1.8347582817077637, -1.3104753494262695, 0.668588399887085, -0.18811394274234772, -0.5055830478668213, 1.1298600435256958, -1.148753046989441, 1.134999394416809, -0.24561366438865662, -1.245051383972168, -1.1815334558486938, 1.084162712097168, 0.4160711169242859, 0.06463830918073654, -0.5107442140579224, 1.17487370967865, 0.14624227583408356, 1.2525125741958618, 0.6090380549430847, -0.41219562292099, 0.5123512148857117, -0.35947385430336, -0.5383492112159729, 1.5819700956344604, 0.23059333860874176, -1.444074034690857, -2.3406670093536377, -0.2702785134315491, -0.9774542450904846, -0.0691131055355072, -0.6724916100502014, -1.0127146244049072, 1.5446696281433105, 0.4032822847366333, -1.247618317604065, -0.2553451955318451, -0.3077389597892761, -0.5381221771240234, 2.6420605182647705, -1.3492203950881958, -0.12155945599079132, -0.9432495832443237, -0.5782790780067444, 1.616778016090393, -1.1498606204986572, -0.2658018469810486, -1.0575510263442993, -0.5829907059669495, -1.2604414224624634, -0.5053005218505859, 0.05665222555398941, -0.9864253401756287, 0.7643287181854248, 0.14237403869628906, -1.0842353105545044, -0.30643966794013977, -0.8747756481170654, 1.018897294998169, -0.11253564059734344, 0.20306947827339172, 1.7927168607711792, 0.3534736633300781, -0.42546460032463074, 0.7833393812179565, 1.1632709503173828, 0.6871854066848755, -0.6261670589447021, 0.06633931398391724, -0.6471678614616394, 0.25271719694137573, -1.3292959928512573, 0.2736646234989166, -2.879326820373535, 0.7092621922492981, -0.1419302374124527, -0.0951683297753334, -0.01384151540696621, -1.3326689004898071, 1.0764923095703125, 2.5679261684417725, -1.1184049844741821, 0.5268094539642334, 0.37656834721565247, 1.0605568885803223, -1.6364012956619263, 0.302687406539917, -0.5031272172927856, 2.1053006649017334, 0.08534754812717438, 1.2236632108688354, -0.44941994547843933, -2.2016520500183105, 0.6636963486671448, -1.2574456930160522, -1.053810477256775, 0.8622851967811584, -0.922485888004303, 0.1943369209766388, -1.5243024826049805, -0.19215548038482666, -0.8918091058731079, -1.2296314239501953, 0.7032374739646912, 0.001962551847100258, 0.418296217918396, -0.5353490114212036, 0.30148276686668396, -2.1429784297943115, -1.4099847078323364, -0.1795847862958908, -1.0207170248031616, 0.4899168908596039, -0.405717670917511, 0.6712584495544434, -0.12919683754444122, 0.0347956158220768, 0.3015495836734772, 1.4458074569702148, 3.405562400817871, 0.1697971075773239, 0.20288600027561188, -0.07582592219114304, -0.9528859257698059, 1.3909573554992676, 0.9226603507995605, -0.12576736509799957, -0.6170929670333862, -0.996905505657196, 1.2937769889831543, 2.0327951908111572, 1.0835514068603516, 0.09785874933004379, -0.8486785292625427, -0.7526372671127319, -0.014965282753109932, 0.11283502727746964, 0.5284773707389832, 0.8540798425674438, -0.03418531268835068, 0.0621708407998085, 1.3790440559387207, 1.194907546043396, -0.336579293012619, 0.4188495874404907, -0.8586564064025879, -0.38610655069351196, 0.4282650351524353, 0.2252831608057022, 0.058457598090171814, 0.43836236000061035, -1.0417282581329346, -0.3625503480434418, -0.3726640045642853, -0.9239937663078308, -0.753389835357666, -0.4709860384464264, -0.46504953503608704, 1.6551581621170044, 0.038449399173259735, -0.5057148933410645, -0.010502378456294537, -0.6857675909996033, -0.16725915670394897, -1.071566104888916, 0.16792234778404236, -0.11900481581687927, 0.009645366109907627, -0.1968955248594284, 1.6552807092666626, -0.9420904517173767, -2.154618978500366, 0.19112324714660645, 0.30645543336868286, -0.33273807168006897, 0.15331237018108368, 1.8099339008331299, 0.5257626175880432, 1.382735252380371, 1.2999671697616577, 0.9967676401138306, -0.6329928040504456, -1.2055569887161255, 0.7082068920135498, 0.9786188006401062, -1.4098525047302246, 0.9704183340072632, -0.1505812406539917, -0.47650864720344543, 0.6748145222663879, 1.2685965299606323, 0.45454278588294983, -2.00728178024292, 0.9372283816337585, -0.9463179707527161, 0.8013675808906555, 0.7012624740600586, 0.7374290227890015, 0.23076049983501434, 0.8225100040435791, -1.2495722770690918, -1.1180729866027832, -0.7191218137741089, -0.6333242654800415, 1.9135686159133911, -0.22640621662139893, 0.5845875144004822, -0.10762651264667511, -1.1972521543502808, -0.16036905348300934, 0.8617849349975586, 0.3184104859828949, -0.42917850613594055, 0.8620024919509888, -0.6055912971496582, -0.9900406002998352, -1.3000940084457397, -0.42029109597206116, -1.047550916671753, -0.8247358202934265, 1.0358669757843018, 0.6941180229187012, 0.4591766595840454, 2.008512496948242, 0.6856313347816467, 0.2745894193649292, -2.622067451477051, 0.9351630806922913, 0.24096471071243286, -0.02795102447271347, 0.9256349205970764, 0.2257327139377594, 1.086195707321167, -0.04834939166903496, 0.5479761958122253, -2.339092969894409, 2.234473705291748, -0.17562927305698395, 0.630689263343811, 0.015812654048204422, -0.23682208359241486, 1.1784641742706299, 0.5351911187171936, 0.5824214816093445, -1.1666040420532227, 0.6502164602279663, -0.5828353762626648, 1.1012531518936157, 0.8485900163650513, -1.0325201749801636, 0.048783835023641586, 1.3479341268539429, 0.46573036909103394, -0.4385830760002136, -0.9948357939720154, -0.8417344093322754, 0.9763474464416504, 1.6536574363708496, -0.04856167361140251, 0.03722640872001648, 0.9056390523910522, 0.639607310295105, -1.236367106437683, 0.13938595354557037, -0.6620202660560608, -0.675269365310669, 1.71132230758667, 2.0297162532806396, -0.1641356199979782, -0.1354001760482788, -0.802182674407959, -1.2638039588928223, 0.8210617303848267, -0.13218088448047638, 0.07695315778255463, 0.6260913014411926, -0.6611349582672119, 1.1281623840332031, 0.7099025845527649, 1.0362991094589233, 0.09676722437143326, 0.2504989504814148, 0.4368325471878052, -0.3622915744781494, -1.179662823677063, -0.28344908356666565, -1.109061360359192, -2.5931215286254883, 0.44675254821777344, -0.21485865116119385, -1.4839457273483276, 0.0339457243680954, -1.0018219947814941, 0.9216444492340088, -0.5538318753242493, -1.056221604347229, -1.4768624305725098, 0.3479066491127014, -0.16682106256484985, 0.981510579586029, -1.6316406726837158, -0.14935508370399475, 1.234882116317749, 0.7927021384239197, -0.6539110541343689, 0.9318616986274719, 0.22539423406124115, 0.9775547385215759, 0.8415790796279907, -0.37712472677230835, 0.612548828125, 0.0899684727191925, -1.3040012121200562, 0.48956042528152466, 1.195454478263855, 0.15648342669010162, 1.3795616626739502, -0.4564966857433319, 0.08198380470275879, 0.4284279942512512, -0.6200796961784363, -0.5171589255332947, -0.44524917006492615, 0.6808425784111023, -0.01199520193040371, -0.9841840267181396, -0.10266400873661041, -0.10955950617790222, -0.2510559856891632, 0.16423921287059784, -1.4657344818115234, -0.2315133959054947, -0.3046662509441376, -0.4358348548412323, -1.3369922637939453, -0.05317075923085213, 1.290614128112793, -0.665827214717865, -0.2582989037036896, 0.5340444445610046, 0.29477471113204956, 0.5524770617485046, 0.6179774403572083, -0.7117618918418884, -0.2577199637889862, -0.32406142354011536, -0.330523282289505, 0.35141846537590027, 1.303191065788269, -0.04640631750226021, -0.8803525567054749, 0.7063815593719482, -0.30131426453590393, 0.13909770548343658, 2.02036190032959, 0.09416399151086807, -0.7281070947647095, 0.36283260583877563, -0.6797582507133484, 1.7700042724609375, 1.7852320671081543, 1.1787346601486206, -0.13151206076145172, -0.9268597960472107, 0.6005533933639526, -0.279816210269928, -0.32721439003944397, 0.9528229236602783, 0.3219650685787201, -0.21593077480793, -1.429276466369629, 0.6652834415435791, 1.364363431930542, -0.8222671151161194, -0.7627568244934082, 0.12563902139663696, -0.927889883518219, 1.1964361667633057, 0.6034316420555115, 0.35901835560798645, 0.2785901427268982, 1.6083984375, 0.7234494686126709, -0.38576972484588623, 0.5142140984535217, 0.4683459997177124, -0.13981780409812927, -2.093266725540161, -1.081687092781067, 0.38187021017074585, -0.4754125773906708, -1.5090306997299194, 1.2971360683441162, -1.0894328355789185, -0.9955140948295593, 0.6062091588973999, 0.06011237949132919, 1.385765790939331, 0.4338339865207672, 1.6533832550048828, 2.181698799133301, 0.9014542102813721, 0.3391667902469635, 1.2463635206222534, -0.07501794397830963, -0.4135079085826874, 1.865286946296692, -0.45594140887260437, 0.46772822737693787, 1.097680687904358, -0.3471249043941498, -1.1171644926071167, -0.84577476978302, -1.1973611116409302, -0.6636627912521362, 1.220258116722107, 0.055026911199092865, -1.0703874826431274, 0.24480727314949036, 1.6066726446151733, 0.15287286043167114, -0.2042415887117386, 0.6504238247871399, 0.4202580153942108, -0.798992931842804, -0.10410724580287933, -0.8536184430122375, 0.5267447829246521, -0.12364353239536285, -0.3217950463294983, 0.32166367769241333, 0.5273076295852661, 1.282390832901001, -0.11538074910640717, 0.12285519391298294, 1.09727144241333, -1.4795984029769897, 1.5665452480316162, -0.7018610835075378, 0.26454511284828186, -2.429673194885254, 1.406009554862976, -0.8212742209434509, 1.9709917306900024, -2.598905563354492, 0.4001913070678711, -0.5293368101119995, -0.5242493152618408, 0.2528361976146698, -0.41426944732666016, 0.09667319059371948, -0.1800098568201065, -1.025019884109497, -0.012114761397242546, -0.6305838227272034, 0.5774763226509094, 1.175236701965332, 1.4311459064483643, -1.1075918674468994, -0.2906535267829895, -1.8079650402069092, -0.16971586644649506, -0.7381198406219482, 0.35623982548713684, -1.8801627159118652, -0.11117181926965714, -1.9442031383514404, -2.360278844833374, -1.433009147644043, -0.8506304621696472, 1.0830824375152588, 0.213068425655365, -0.9755762815475464, 1.152095079421997, -0.37558111548423767, -1.8428326845169067, 1.1761736869812012, -2.2514772415161133 ]
https://github.com/huggingface/datasets/issues/4525
Out of memory error on workers while running Beam+Dataflow
@albertvillanova Since we have already processed the NQ dataset on our machines can we upload it to datasets so the NQ PR can be merged?
## Describe the bug While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files). Previously we ran the preprocessing for the "dev" config (only dev files) with success. Train data files are larger than dev ones and apparently workers run out of memory while processing them. Any help/hint is welcome! Error message: ``` Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` Info from the Diagnostics tab: ``` Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900 The worker VM had to shut down one or more processes due to lack of memory. ``` ## Additional information ### Stack trace ``` Traceback (most recent call last): File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module> sys.exit(main()) File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main service.run() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run builder.download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare self._download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare pipeline_results.wait_until_finish() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish raise DataflowRuntimeException( apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` ### Logs ``` Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0 Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service. ```
702
25
Out of memory error on workers while running Beam+Dataflow ## Describe the bug While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files). Previously we ran the preprocessing for the "dev" config (only dev files) with success. Train data files are larger than dev ones and apparently workers run out of memory while processing them. Any help/hint is welcome! Error message: ``` Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` Info from the Diagnostics tab: ``` Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900 The worker VM had to shut down one or more processes due to lack of memory. ``` ## Additional information ### Stack trace ``` Traceback (most recent call last): File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module> sys.exit(main()) File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main service.run() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run builder.download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare self._download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare pipeline_results.wait_until_finish() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish raise DataflowRuntimeException( apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` ### Logs ``` Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0 Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service. ``` @albertvillanova Since we have already processed the NQ dataset on our machines can we upload it to datasets so the NQ PR can be merged?
[ -1.167747139930725, -0.9081085920333862, -0.6810803413391113, 1.495227336883545, -0.07052646577358246, -1.2898154258728027, 0.12022533267736435, -1.040149450302124, 1.505122423171997, -0.6887544989585876, 0.29703494906425476, -1.6630910634994507, -0.06212452054023743, -0.5730867385864258, -0.6957724690437317, -0.8337664604187012, -0.38206109404563904, -0.8570446968078613, 1.0062670707702637, 2.487558603286743, 1.3525497913360596, -1.3619784116744995, 2.7081074714660645, 0.6964371800422668, -0.32117313146591187, -0.9837691783905029, 0.5574024319648743, -0.0140798669308424, -1.3013544082641602, -0.47992655634880066, -0.9272590279579163, -0.017946450039744377, -0.6133636236190796, -0.38785025477409363, 0.0332610160112381, 0.42217034101486206, -0.23202966153621674, -0.29176661372184753, -0.6550682783126831, -0.7969309687614441, 0.522904634475708, -0.3505897521972656, 0.9616113305091858, -0.3162369132041931, 1.8150520324707031, -0.6479218006134033, 0.4017249643802643, 0.7542010545730591, 1.3154494762420654, 0.17482195794582367, -0.035889752209186554, 0.3308582007884979, 0.3500933349132538, -0.023595787584781647, 0.511845052242279, 1.255204200744629, 0.5603359341621399, 0.5064517259597778, 0.6673795580863953, -2.1668684482574463, 1.3391919136047363, -0.9007066488265991, 0.2305610626935959, 1.355873703956604, -0.9412118196487427, 0.3829191327095032, -1.7881221771240234, -0.09502428770065308, 0.6046106219291687, -2.217587947845459, 0.2836362421512604, -1.254388451576233, -0.523456335067749, 0.9361034035682678, 0.3263225853443146, -1.2136763334274292, 0.15803444385528564, -0.46290022134780884, 0.9841050505638123, 0.4013884663581848, 1.1012928485870361, -1.712233543395996, -0.05266832932829857, -0.29910269379615784, 0.09299805015325546, -1.2860612869262695, -1.6582489013671875, 0.555488646030426, 0.592936635017395, 0.5715922117233276, -0.1542646437883377, 1.0892468690872192, -1.0547739267349243, 0.8211280703544617, -0.9477689266204834, -1.6386371850967407, -1.45287024974823, -2.353949785232544, -2.246382474899292, 0.7677990198135376, -0.5574741363525391, -0.5091798305511475, 1.9890964031219482, -1.0262583494186401, -1.7707573175430298, 1.034909963607788, 0.326990008354187, 0.027504365891218185, 2.366971254348755, 0.20875053107738495, -0.7648671865463257, 0.42993414402008057, -0.7113832235336304, 0.7583556771278381, -0.33425018191337585, 1.3272569179534912, 0.497506707906723, -1.0997692346572876, 1.5845392942428589, -0.4461473524570465, 0.5275309681892395, -0.6245843172073364, -0.4765464961528778, -0.7875643968582153, 0.30519574880599976, 1.8639689683914185, -0.37660592794418335, 1.5454179048538208, -0.20644758641719818, -1.5562549829483032, -1.5818990468978882, 0.8448175191879272, 0.4604882299900055, -0.8871714472770691, 0.10469307750463486, -0.46059563755989075, 0.13330326974391937, -0.07036755979061127, 1.1158275604248047, 1.1853010654449463, 0.6499924659729004, -0.34627482295036316, -0.7897534370422363, 0.19053922593593597, -0.17640061676502228, -0.6672656536102295, -1.8475518226623535, -0.3269137740135193, 0.23050108551979065, 0.6502492427825928, -1.2434054613113403, 1.8727538585662842, 0.936091423034668, 1.9685883522033691, 0.9739022254943848, -0.3640747368335724, 1.4869446754455566, -0.032535672187805176, 1.8701131343841553, -0.48480838537216187, 0.6553521156311035, -0.4417518079280853, -1.2525527477264404, 0.9689347743988037, -0.33418983221054077, -1.9978687763214111, -0.8162897825241089, -0.7980762720108032, -0.20011460781097412, -0.7185720205307007, 0.9537826776504517, -0.2976924777030945, -1.4205987453460693, 0.13007564842700958, -0.6565256118774414, 0.1600048840045929, -1.2753715515136719, 0.22308053076267242, 0.6611273288726807, -0.701200008392334, -0.013131196610629559, -0.23339714109897614, -1.2479239702224731, -0.5131011009216309, 0.3061446249485016, 1.9186055660247803, -0.6375823020935059, 1.0166096687316895, 0.9990744590759277, -0.6828206181526184, 0.13825105130672455, 0.30453577637672424, -0.328828901052475, 0.8450989127159119, -1.116175889968872, -0.44466936588287354, 1.2722036838531494, -0.25492775440216064, -0.7351576685905457, 1.411509394645691, 0.8119500279426575, -1.1205393075942993, -0.26560652256011963, -0.20066778361797333, -0.874090850353241, 0.07222512364387512, -1.5145176649093628, -0.05276808887720108, 0.39511096477508545, -1.519985318183899, -0.3478204607963562, -0.16641037166118622, 1.3260327577590942, -0.138196662068367, 1.410787582397461, -0.36635422706604004, -0.1669679880142212, -0.28549325466156006, -0.4258630573749542, 0.14370639622211456, -0.169145867228508, -0.589881956577301, 0.2669302523136139, -0.8882887363433838, 0.29439905285835266, 1.4457391500473022, 0.3306660056114197, 0.06512290984392166, 0.5131847262382507, 1.0930020809173584, 0.33540403842926025, -0.04787251353263855, -0.9537578821182251, -1.5649904012680054, 2.0355160236358643, -1.4341237545013428, 1.8953666687011719, 0.8527833223342896, -0.04960868880152702, -1.7862956523895264, -1.8308517932891846, 1.2887829542160034, 1.1187952756881714, 2.3930020332336426, 0.5081571936607361, 0.37896934151649475, -0.7652207612991333, -0.7058573365211487, 0.404326468706131, -1.047053337097168, -0.6916713714599609, 0.20672020316123962, 2.3967602252960205, 1.8566828966140747, -0.47060978412628174, -0.2966027855873108, -0.9384845495223999, 1.2903610467910767, -0.2372637391090393, 0.2014797031879425, 2.0397369861602783, -0.29313385486602783, -0.9654138684272766, 1.3529775142669678, -2.3480100631713867, 0.27026423811912537, 2.0472168922424316, 0.26662755012512207, 0.13133969902992249, -1.3742396831512451, -0.6492131948471069, -0.233134925365448, -0.4636176824569702, -1.205694556236267, 0.5244424939155579, -0.2883610129356384, -0.8198261260986328, -1.427946925163269, 0.11114451289176941, -1.2197721004486084, -1.7867579460144043, 0.3645038902759552, 1.868938684463501, 2.101832389831543, -0.7597046494483948, 1.4894658327102661, -0.28360018134117126, 0.06359308958053589, 1.2436221837997437, 1.3234025239944458, 3.126072645187378, 1.8347582817077637, -1.3104753494262695, 0.668588399887085, -0.18811394274234772, -0.5055830478668213, 1.1298600435256958, -1.148753046989441, 1.134999394416809, -0.24561366438865662, -1.245051383972168, -1.1815334558486938, 1.084162712097168, 0.4160711169242859, 0.06463830918073654, -0.5107442140579224, 1.17487370967865, 0.14624227583408356, 1.2525125741958618, 0.6090380549430847, -0.41219562292099, 0.5123512148857117, -0.35947385430336, -0.5383492112159729, 1.5819700956344604, 0.23059333860874176, -1.444074034690857, -2.3406670093536377, -0.2702785134315491, -0.9774542450904846, -0.0691131055355072, -0.6724916100502014, -1.0127146244049072, 1.5446696281433105, 0.4032822847366333, -1.247618317604065, -0.2553451955318451, -0.3077389597892761, -0.5381221771240234, 2.6420605182647705, -1.3492203950881958, -0.12155945599079132, -0.9432495832443237, -0.5782790780067444, 1.616778016090393, -1.1498606204986572, -0.2658018469810486, -1.0575510263442993, -0.5829907059669495, -1.2604414224624634, -0.5053005218505859, 0.05665222555398941, -0.9864253401756287, 0.7643287181854248, 0.14237403869628906, -1.0842353105545044, -0.30643966794013977, -0.8747756481170654, 1.018897294998169, -0.11253564059734344, 0.20306947827339172, 1.7927168607711792, 0.3534736633300781, -0.42546460032463074, 0.7833393812179565, 1.1632709503173828, 0.6871854066848755, -0.6261670589447021, 0.06633931398391724, -0.6471678614616394, 0.25271719694137573, -1.3292959928512573, 0.2736646234989166, -2.879326820373535, 0.7092621922492981, -0.1419302374124527, -0.0951683297753334, -0.01384151540696621, -1.3326689004898071, 1.0764923095703125, 2.5679261684417725, -1.1184049844741821, 0.5268094539642334, 0.37656834721565247, 1.0605568885803223, -1.6364012956619263, 0.302687406539917, -0.5031272172927856, 2.1053006649017334, 0.08534754812717438, 1.2236632108688354, -0.44941994547843933, -2.2016520500183105, 0.6636963486671448, -1.2574456930160522, -1.053810477256775, 0.8622851967811584, -0.922485888004303, 0.1943369209766388, -1.5243024826049805, -0.19215548038482666, -0.8918091058731079, -1.2296314239501953, 0.7032374739646912, 0.001962551847100258, 0.418296217918396, -0.5353490114212036, 0.30148276686668396, -2.1429784297943115, -1.4099847078323364, -0.1795847862958908, -1.0207170248031616, 0.4899168908596039, -0.405717670917511, 0.6712584495544434, -0.12919683754444122, 0.0347956158220768, 0.3015495836734772, 1.4458074569702148, 3.405562400817871, 0.1697971075773239, 0.20288600027561188, -0.07582592219114304, -0.9528859257698059, 1.3909573554992676, 0.9226603507995605, -0.12576736509799957, -0.6170929670333862, -0.996905505657196, 1.2937769889831543, 2.0327951908111572, 1.0835514068603516, 0.09785874933004379, -0.8486785292625427, -0.7526372671127319, -0.014965282753109932, 0.11283502727746964, 0.5284773707389832, 0.8540798425674438, -0.03418531268835068, 0.0621708407998085, 1.3790440559387207, 1.194907546043396, -0.336579293012619, 0.4188495874404907, -0.8586564064025879, -0.38610655069351196, 0.4282650351524353, 0.2252831608057022, 0.058457598090171814, 0.43836236000061035, -1.0417282581329346, -0.3625503480434418, -0.3726640045642853, -0.9239937663078308, -0.753389835357666, -0.4709860384464264, -0.46504953503608704, 1.6551581621170044, 0.038449399173259735, -0.5057148933410645, -0.010502378456294537, -0.6857675909996033, -0.16725915670394897, -1.071566104888916, 0.16792234778404236, -0.11900481581687927, 0.009645366109907627, -0.1968955248594284, 1.6552807092666626, -0.9420904517173767, -2.154618978500366, 0.19112324714660645, 0.30645543336868286, -0.33273807168006897, 0.15331237018108368, 1.8099339008331299, 0.5257626175880432, 1.382735252380371, 1.2999671697616577, 0.9967676401138306, -0.6329928040504456, -1.2055569887161255, 0.7082068920135498, 0.9786188006401062, -1.4098525047302246, 0.9704183340072632, -0.1505812406539917, -0.47650864720344543, 0.6748145222663879, 1.2685965299606323, 0.45454278588294983, -2.00728178024292, 0.9372283816337585, -0.9463179707527161, 0.8013675808906555, 0.7012624740600586, 0.7374290227890015, 0.23076049983501434, 0.8225100040435791, -1.2495722770690918, -1.1180729866027832, -0.7191218137741089, -0.6333242654800415, 1.9135686159133911, -0.22640621662139893, 0.5845875144004822, -0.10762651264667511, -1.1972521543502808, -0.16036905348300934, 0.8617849349975586, 0.3184104859828949, -0.42917850613594055, 0.8620024919509888, -0.6055912971496582, -0.9900406002998352, -1.3000940084457397, -0.42029109597206116, -1.047550916671753, -0.8247358202934265, 1.0358669757843018, 0.6941180229187012, 0.4591766595840454, 2.008512496948242, 0.6856313347816467, 0.2745894193649292, -2.622067451477051, 0.9351630806922913, 0.24096471071243286, -0.02795102447271347, 0.9256349205970764, 0.2257327139377594, 1.086195707321167, -0.04834939166903496, 0.5479761958122253, -2.339092969894409, 2.234473705291748, -0.17562927305698395, 0.630689263343811, 0.015812654048204422, -0.23682208359241486, 1.1784641742706299, 0.5351911187171936, 0.5824214816093445, -1.1666040420532227, 0.6502164602279663, -0.5828353762626648, 1.1012531518936157, 0.8485900163650513, -1.0325201749801636, 0.048783835023641586, 1.3479341268539429, 0.46573036909103394, -0.4385830760002136, -0.9948357939720154, -0.8417344093322754, 0.9763474464416504, 1.6536574363708496, -0.04856167361140251, 0.03722640872001648, 0.9056390523910522, 0.639607310295105, -1.236367106437683, 0.13938595354557037, -0.6620202660560608, -0.675269365310669, 1.71132230758667, 2.0297162532806396, -0.1641356199979782, -0.1354001760482788, -0.802182674407959, -1.2638039588928223, 0.8210617303848267, -0.13218088448047638, 0.07695315778255463, 0.6260913014411926, -0.6611349582672119, 1.1281623840332031, 0.7099025845527649, 1.0362991094589233, 0.09676722437143326, 0.2504989504814148, 0.4368325471878052, -0.3622915744781494, -1.179662823677063, -0.28344908356666565, -1.109061360359192, -2.5931215286254883, 0.44675254821777344, -0.21485865116119385, -1.4839457273483276, 0.0339457243680954, -1.0018219947814941, 0.9216444492340088, -0.5538318753242493, -1.056221604347229, -1.4768624305725098, 0.3479066491127014, -0.16682106256484985, 0.981510579586029, -1.6316406726837158, -0.14935508370399475, 1.234882116317749, 0.7927021384239197, -0.6539110541343689, 0.9318616986274719, 0.22539423406124115, 0.9775547385215759, 0.8415790796279907, -0.37712472677230835, 0.612548828125, 0.0899684727191925, -1.3040012121200562, 0.48956042528152466, 1.195454478263855, 0.15648342669010162, 1.3795616626739502, -0.4564966857433319, 0.08198380470275879, 0.4284279942512512, -0.6200796961784363, -0.5171589255332947, -0.44524917006492615, 0.6808425784111023, -0.01199520193040371, -0.9841840267181396, -0.10266400873661041, -0.10955950617790222, -0.2510559856891632, 0.16423921287059784, -1.4657344818115234, -0.2315133959054947, -0.3046662509441376, -0.4358348548412323, -1.3369922637939453, -0.05317075923085213, 1.290614128112793, -0.665827214717865, -0.2582989037036896, 0.5340444445610046, 0.29477471113204956, 0.5524770617485046, 0.6179774403572083, -0.7117618918418884, -0.2577199637889862, -0.32406142354011536, -0.330523282289505, 0.35141846537590027, 1.303191065788269, -0.04640631750226021, -0.8803525567054749, 0.7063815593719482, -0.30131426453590393, 0.13909770548343658, 2.02036190032959, 0.09416399151086807, -0.7281070947647095, 0.36283260583877563, -0.6797582507133484, 1.7700042724609375, 1.7852320671081543, 1.1787346601486206, -0.13151206076145172, -0.9268597960472107, 0.6005533933639526, -0.279816210269928, -0.32721439003944397, 0.9528229236602783, 0.3219650685787201, -0.21593077480793, -1.429276466369629, 0.6652834415435791, 1.364363431930542, -0.8222671151161194, -0.7627568244934082, 0.12563902139663696, -0.927889883518219, 1.1964361667633057, 0.6034316420555115, 0.35901835560798645, 0.2785901427268982, 1.6083984375, 0.7234494686126709, -0.38576972484588623, 0.5142140984535217, 0.4683459997177124, -0.13981780409812927, -2.093266725540161, -1.081687092781067, 0.38187021017074585, -0.4754125773906708, -1.5090306997299194, 1.2971360683441162, -1.0894328355789185, -0.9955140948295593, 0.6062091588973999, 0.06011237949132919, 1.385765790939331, 0.4338339865207672, 1.6533832550048828, 2.181698799133301, 0.9014542102813721, 0.3391667902469635, 1.2463635206222534, -0.07501794397830963, -0.4135079085826874, 1.865286946296692, -0.45594140887260437, 0.46772822737693787, 1.097680687904358, -0.3471249043941498, -1.1171644926071167, -0.84577476978302, -1.1973611116409302, -0.6636627912521362, 1.220258116722107, 0.055026911199092865, -1.0703874826431274, 0.24480727314949036, 1.6066726446151733, 0.15287286043167114, -0.2042415887117386, 0.6504238247871399, 0.4202580153942108, -0.798992931842804, -0.10410724580287933, -0.8536184430122375, 0.5267447829246521, -0.12364353239536285, -0.3217950463294983, 0.32166367769241333, 0.5273076295852661, 1.282390832901001, -0.11538074910640717, 0.12285519391298294, 1.09727144241333, -1.4795984029769897, 1.5665452480316162, -0.7018610835075378, 0.26454511284828186, -2.429673194885254, 1.406009554862976, -0.8212742209434509, 1.9709917306900024, -2.598905563354492, 0.4001913070678711, -0.5293368101119995, -0.5242493152618408, 0.2528361976146698, -0.41426944732666016, 0.09667319059371948, -0.1800098568201065, -1.025019884109497, -0.012114761397242546, -0.6305838227272034, 0.5774763226509094, 1.175236701965332, 1.4311459064483643, -1.1075918674468994, -0.2906535267829895, -1.8079650402069092, -0.16971586644649506, -0.7381198406219482, 0.35623982548713684, -1.8801627159118652, -0.11117181926965714, -1.9442031383514404, -2.360278844833374, -1.433009147644043, -0.8506304621696472, 1.0830824375152588, 0.213068425655365, -0.9755762815475464, 1.152095079421997, -0.37558111548423767, -1.8428326845169067, 1.1761736869812012, -2.2514772415161133 ]
https://github.com/huggingface/datasets/issues/4525
Out of memory error on workers while running Beam+Dataflow
Maybe @lhoestq can give a more accurate answer as I am not sure about the authentication requirements to upload those files to our cloud bucket. Anyway I propose to continue this discussion on the dedicated PR for Natural questions dataset: - #4368
## Describe the bug While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files). Previously we ran the preprocessing for the "dev" config (only dev files) with success. Train data files are larger than dev ones and apparently workers run out of memory while processing them. Any help/hint is welcome! Error message: ``` Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` Info from the Diagnostics tab: ``` Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900 The worker VM had to shut down one or more processes due to lack of memory. ``` ## Additional information ### Stack trace ``` Traceback (most recent call last): File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module> sys.exit(main()) File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main service.run() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run builder.download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare self._download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare pipeline_results.wait_until_finish() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish raise DataflowRuntimeException( apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` ### Logs ``` Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0 Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service. ```
702
42
Out of memory error on workers while running Beam+Dataflow ## Describe the bug While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files). Previously we ran the preprocessing for the "dev" config (only dev files) with success. Train data files are larger than dev ones and apparently workers run out of memory while processing them. Any help/hint is welcome! Error message: ``` Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` Info from the Diagnostics tab: ``` Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900 The worker VM had to shut down one or more processes due to lack of memory. ``` ## Additional information ### Stack trace ``` Traceback (most recent call last): File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module> sys.exit(main()) File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main service.run() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run builder.download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare self._download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare pipeline_results.wait_until_finish() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish raise DataflowRuntimeException( apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` ### Logs ``` Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0 Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service. ``` Maybe @lhoestq can give a more accurate answer as I am not sure about the authentication requirements to upload those files to our cloud bucket. Anyway I propose to continue this discussion on the dedicated PR for Natural questions dataset: - #4368
[ -1.167747139930725, -0.9081085920333862, -0.6810803413391113, 1.495227336883545, -0.07052646577358246, -1.2898154258728027, 0.12022533267736435, -1.040149450302124, 1.505122423171997, -0.6887544989585876, 0.29703494906425476, -1.6630910634994507, -0.06212452054023743, -0.5730867385864258, -0.6957724690437317, -0.8337664604187012, -0.38206109404563904, -0.8570446968078613, 1.0062670707702637, 2.487558603286743, 1.3525497913360596, -1.3619784116744995, 2.7081074714660645, 0.6964371800422668, -0.32117313146591187, -0.9837691783905029, 0.5574024319648743, -0.0140798669308424, -1.3013544082641602, -0.47992655634880066, -0.9272590279579163, -0.017946450039744377, -0.6133636236190796, -0.38785025477409363, 0.0332610160112381, 0.42217034101486206, -0.23202966153621674, -0.29176661372184753, -0.6550682783126831, -0.7969309687614441, 0.522904634475708, -0.3505897521972656, 0.9616113305091858, -0.3162369132041931, 1.8150520324707031, -0.6479218006134033, 0.4017249643802643, 0.7542010545730591, 1.3154494762420654, 0.17482195794582367, -0.035889752209186554, 0.3308582007884979, 0.3500933349132538, -0.023595787584781647, 0.511845052242279, 1.255204200744629, 0.5603359341621399, 0.5064517259597778, 0.6673795580863953, -2.1668684482574463, 1.3391919136047363, -0.9007066488265991, 0.2305610626935959, 1.355873703956604, -0.9412118196487427, 0.3829191327095032, -1.7881221771240234, -0.09502428770065308, 0.6046106219291687, -2.217587947845459, 0.2836362421512604, -1.254388451576233, -0.523456335067749, 0.9361034035682678, 0.3263225853443146, -1.2136763334274292, 0.15803444385528564, -0.46290022134780884, 0.9841050505638123, 0.4013884663581848, 1.1012928485870361, -1.712233543395996, -0.05266832932829857, -0.29910269379615784, 0.09299805015325546, -1.2860612869262695, -1.6582489013671875, 0.555488646030426, 0.592936635017395, 0.5715922117233276, -0.1542646437883377, 1.0892468690872192, -1.0547739267349243, 0.8211280703544617, -0.9477689266204834, -1.6386371850967407, -1.45287024974823, -2.353949785232544, -2.246382474899292, 0.7677990198135376, -0.5574741363525391, -0.5091798305511475, 1.9890964031219482, -1.0262583494186401, -1.7707573175430298, 1.034909963607788, 0.326990008354187, 0.027504365891218185, 2.366971254348755, 0.20875053107738495, -0.7648671865463257, 0.42993414402008057, -0.7113832235336304, 0.7583556771278381, -0.33425018191337585, 1.3272569179534912, 0.497506707906723, -1.0997692346572876, 1.5845392942428589, -0.4461473524570465, 0.5275309681892395, -0.6245843172073364, -0.4765464961528778, -0.7875643968582153, 0.30519574880599976, 1.8639689683914185, -0.37660592794418335, 1.5454179048538208, -0.20644758641719818, -1.5562549829483032, -1.5818990468978882, 0.8448175191879272, 0.4604882299900055, -0.8871714472770691, 0.10469307750463486, -0.46059563755989075, 0.13330326974391937, -0.07036755979061127, 1.1158275604248047, 1.1853010654449463, 0.6499924659729004, -0.34627482295036316, -0.7897534370422363, 0.19053922593593597, -0.17640061676502228, -0.6672656536102295, -1.8475518226623535, -0.3269137740135193, 0.23050108551979065, 0.6502492427825928, -1.2434054613113403, 1.8727538585662842, 0.936091423034668, 1.9685883522033691, 0.9739022254943848, -0.3640747368335724, 1.4869446754455566, -0.032535672187805176, 1.8701131343841553, -0.48480838537216187, 0.6553521156311035, -0.4417518079280853, -1.2525527477264404, 0.9689347743988037, -0.33418983221054077, -1.9978687763214111, -0.8162897825241089, -0.7980762720108032, -0.20011460781097412, -0.7185720205307007, 0.9537826776504517, -0.2976924777030945, -1.4205987453460693, 0.13007564842700958, -0.6565256118774414, 0.1600048840045929, -1.2753715515136719, 0.22308053076267242, 0.6611273288726807, -0.701200008392334, -0.013131196610629559, -0.23339714109897614, -1.2479239702224731, -0.5131011009216309, 0.3061446249485016, 1.9186055660247803, -0.6375823020935059, 1.0166096687316895, 0.9990744590759277, -0.6828206181526184, 0.13825105130672455, 0.30453577637672424, -0.328828901052475, 0.8450989127159119, -1.116175889968872, -0.44466936588287354, 1.2722036838531494, -0.25492775440216064, -0.7351576685905457, 1.411509394645691, 0.8119500279426575, -1.1205393075942993, -0.26560652256011963, -0.20066778361797333, -0.874090850353241, 0.07222512364387512, -1.5145176649093628, -0.05276808887720108, 0.39511096477508545, -1.519985318183899, -0.3478204607963562, -0.16641037166118622, 1.3260327577590942, -0.138196662068367, 1.410787582397461, -0.36635422706604004, -0.1669679880142212, -0.28549325466156006, -0.4258630573749542, 0.14370639622211456, -0.169145867228508, -0.589881956577301, 0.2669302523136139, -0.8882887363433838, 0.29439905285835266, 1.4457391500473022, 0.3306660056114197, 0.06512290984392166, 0.5131847262382507, 1.0930020809173584, 0.33540403842926025, -0.04787251353263855, -0.9537578821182251, -1.5649904012680054, 2.0355160236358643, -1.4341237545013428, 1.8953666687011719, 0.8527833223342896, -0.04960868880152702, -1.7862956523895264, -1.8308517932891846, 1.2887829542160034, 1.1187952756881714, 2.3930020332336426, 0.5081571936607361, 0.37896934151649475, -0.7652207612991333, -0.7058573365211487, 0.404326468706131, -1.047053337097168, -0.6916713714599609, 0.20672020316123962, 2.3967602252960205, 1.8566828966140747, -0.47060978412628174, -0.2966027855873108, -0.9384845495223999, 1.2903610467910767, -0.2372637391090393, 0.2014797031879425, 2.0397369861602783, -0.29313385486602783, -0.9654138684272766, 1.3529775142669678, -2.3480100631713867, 0.27026423811912537, 2.0472168922424316, 0.26662755012512207, 0.13133969902992249, -1.3742396831512451, -0.6492131948471069, -0.233134925365448, -0.4636176824569702, -1.205694556236267, 0.5244424939155579, -0.2883610129356384, -0.8198261260986328, -1.427946925163269, 0.11114451289176941, -1.2197721004486084, -1.7867579460144043, 0.3645038902759552, 1.868938684463501, 2.101832389831543, -0.7597046494483948, 1.4894658327102661, -0.28360018134117126, 0.06359308958053589, 1.2436221837997437, 1.3234025239944458, 3.126072645187378, 1.8347582817077637, -1.3104753494262695, 0.668588399887085, -0.18811394274234772, -0.5055830478668213, 1.1298600435256958, -1.148753046989441, 1.134999394416809, -0.24561366438865662, -1.245051383972168, -1.1815334558486938, 1.084162712097168, 0.4160711169242859, 0.06463830918073654, -0.5107442140579224, 1.17487370967865, 0.14624227583408356, 1.2525125741958618, 0.6090380549430847, -0.41219562292099, 0.5123512148857117, -0.35947385430336, -0.5383492112159729, 1.5819700956344604, 0.23059333860874176, -1.444074034690857, -2.3406670093536377, -0.2702785134315491, -0.9774542450904846, -0.0691131055355072, -0.6724916100502014, -1.0127146244049072, 1.5446696281433105, 0.4032822847366333, -1.247618317604065, -0.2553451955318451, -0.3077389597892761, -0.5381221771240234, 2.6420605182647705, -1.3492203950881958, -0.12155945599079132, -0.9432495832443237, -0.5782790780067444, 1.616778016090393, -1.1498606204986572, -0.2658018469810486, -1.0575510263442993, -0.5829907059669495, -1.2604414224624634, -0.5053005218505859, 0.05665222555398941, -0.9864253401756287, 0.7643287181854248, 0.14237403869628906, -1.0842353105545044, -0.30643966794013977, -0.8747756481170654, 1.018897294998169, -0.11253564059734344, 0.20306947827339172, 1.7927168607711792, 0.3534736633300781, -0.42546460032463074, 0.7833393812179565, 1.1632709503173828, 0.6871854066848755, -0.6261670589447021, 0.06633931398391724, -0.6471678614616394, 0.25271719694137573, -1.3292959928512573, 0.2736646234989166, -2.879326820373535, 0.7092621922492981, -0.1419302374124527, -0.0951683297753334, -0.01384151540696621, -1.3326689004898071, 1.0764923095703125, 2.5679261684417725, -1.1184049844741821, 0.5268094539642334, 0.37656834721565247, 1.0605568885803223, -1.6364012956619263, 0.302687406539917, -0.5031272172927856, 2.1053006649017334, 0.08534754812717438, 1.2236632108688354, -0.44941994547843933, -2.2016520500183105, 0.6636963486671448, -1.2574456930160522, -1.053810477256775, 0.8622851967811584, -0.922485888004303, 0.1943369209766388, -1.5243024826049805, -0.19215548038482666, -0.8918091058731079, -1.2296314239501953, 0.7032374739646912, 0.001962551847100258, 0.418296217918396, -0.5353490114212036, 0.30148276686668396, -2.1429784297943115, -1.4099847078323364, -0.1795847862958908, -1.0207170248031616, 0.4899168908596039, -0.405717670917511, 0.6712584495544434, -0.12919683754444122, 0.0347956158220768, 0.3015495836734772, 1.4458074569702148, 3.405562400817871, 0.1697971075773239, 0.20288600027561188, -0.07582592219114304, -0.9528859257698059, 1.3909573554992676, 0.9226603507995605, -0.12576736509799957, -0.6170929670333862, -0.996905505657196, 1.2937769889831543, 2.0327951908111572, 1.0835514068603516, 0.09785874933004379, -0.8486785292625427, -0.7526372671127319, -0.014965282753109932, 0.11283502727746964, 0.5284773707389832, 0.8540798425674438, -0.03418531268835068, 0.0621708407998085, 1.3790440559387207, 1.194907546043396, -0.336579293012619, 0.4188495874404907, -0.8586564064025879, -0.38610655069351196, 0.4282650351524353, 0.2252831608057022, 0.058457598090171814, 0.43836236000061035, -1.0417282581329346, -0.3625503480434418, -0.3726640045642853, -0.9239937663078308, -0.753389835357666, -0.4709860384464264, -0.46504953503608704, 1.6551581621170044, 0.038449399173259735, -0.5057148933410645, -0.010502378456294537, -0.6857675909996033, -0.16725915670394897, -1.071566104888916, 0.16792234778404236, -0.11900481581687927, 0.009645366109907627, -0.1968955248594284, 1.6552807092666626, -0.9420904517173767, -2.154618978500366, 0.19112324714660645, 0.30645543336868286, -0.33273807168006897, 0.15331237018108368, 1.8099339008331299, 0.5257626175880432, 1.382735252380371, 1.2999671697616577, 0.9967676401138306, -0.6329928040504456, -1.2055569887161255, 0.7082068920135498, 0.9786188006401062, -1.4098525047302246, 0.9704183340072632, -0.1505812406539917, -0.47650864720344543, 0.6748145222663879, 1.2685965299606323, 0.45454278588294983, -2.00728178024292, 0.9372283816337585, -0.9463179707527161, 0.8013675808906555, 0.7012624740600586, 0.7374290227890015, 0.23076049983501434, 0.8225100040435791, -1.2495722770690918, -1.1180729866027832, -0.7191218137741089, -0.6333242654800415, 1.9135686159133911, -0.22640621662139893, 0.5845875144004822, -0.10762651264667511, -1.1972521543502808, -0.16036905348300934, 0.8617849349975586, 0.3184104859828949, -0.42917850613594055, 0.8620024919509888, -0.6055912971496582, -0.9900406002998352, -1.3000940084457397, -0.42029109597206116, -1.047550916671753, -0.8247358202934265, 1.0358669757843018, 0.6941180229187012, 0.4591766595840454, 2.008512496948242, 0.6856313347816467, 0.2745894193649292, -2.622067451477051, 0.9351630806922913, 0.24096471071243286, -0.02795102447271347, 0.9256349205970764, 0.2257327139377594, 1.086195707321167, -0.04834939166903496, 0.5479761958122253, -2.339092969894409, 2.234473705291748, -0.17562927305698395, 0.630689263343811, 0.015812654048204422, -0.23682208359241486, 1.1784641742706299, 0.5351911187171936, 0.5824214816093445, -1.1666040420532227, 0.6502164602279663, -0.5828353762626648, 1.1012531518936157, 0.8485900163650513, -1.0325201749801636, 0.048783835023641586, 1.3479341268539429, 0.46573036909103394, -0.4385830760002136, -0.9948357939720154, -0.8417344093322754, 0.9763474464416504, 1.6536574363708496, -0.04856167361140251, 0.03722640872001648, 0.9056390523910522, 0.639607310295105, -1.236367106437683, 0.13938595354557037, -0.6620202660560608, -0.675269365310669, 1.71132230758667, 2.0297162532806396, -0.1641356199979782, -0.1354001760482788, -0.802182674407959, -1.2638039588928223, 0.8210617303848267, -0.13218088448047638, 0.07695315778255463, 0.6260913014411926, -0.6611349582672119, 1.1281623840332031, 0.7099025845527649, 1.0362991094589233, 0.09676722437143326, 0.2504989504814148, 0.4368325471878052, -0.3622915744781494, -1.179662823677063, -0.28344908356666565, -1.109061360359192, -2.5931215286254883, 0.44675254821777344, -0.21485865116119385, -1.4839457273483276, 0.0339457243680954, -1.0018219947814941, 0.9216444492340088, -0.5538318753242493, -1.056221604347229, -1.4768624305725098, 0.3479066491127014, -0.16682106256484985, 0.981510579586029, -1.6316406726837158, -0.14935508370399475, 1.234882116317749, 0.7927021384239197, -0.6539110541343689, 0.9318616986274719, 0.22539423406124115, 0.9775547385215759, 0.8415790796279907, -0.37712472677230835, 0.612548828125, 0.0899684727191925, -1.3040012121200562, 0.48956042528152466, 1.195454478263855, 0.15648342669010162, 1.3795616626739502, -0.4564966857433319, 0.08198380470275879, 0.4284279942512512, -0.6200796961784363, -0.5171589255332947, -0.44524917006492615, 0.6808425784111023, -0.01199520193040371, -0.9841840267181396, -0.10266400873661041, -0.10955950617790222, -0.2510559856891632, 0.16423921287059784, -1.4657344818115234, -0.2315133959054947, -0.3046662509441376, -0.4358348548412323, -1.3369922637939453, -0.05317075923085213, 1.290614128112793, -0.665827214717865, -0.2582989037036896, 0.5340444445610046, 0.29477471113204956, 0.5524770617485046, 0.6179774403572083, -0.7117618918418884, -0.2577199637889862, -0.32406142354011536, -0.330523282289505, 0.35141846537590027, 1.303191065788269, -0.04640631750226021, -0.8803525567054749, 0.7063815593719482, -0.30131426453590393, 0.13909770548343658, 2.02036190032959, 0.09416399151086807, -0.7281070947647095, 0.36283260583877563, -0.6797582507133484, 1.7700042724609375, 1.7852320671081543, 1.1787346601486206, -0.13151206076145172, -0.9268597960472107, 0.6005533933639526, -0.279816210269928, -0.32721439003944397, 0.9528229236602783, 0.3219650685787201, -0.21593077480793, -1.429276466369629, 0.6652834415435791, 1.364363431930542, -0.8222671151161194, -0.7627568244934082, 0.12563902139663696, -0.927889883518219, 1.1964361667633057, 0.6034316420555115, 0.35901835560798645, 0.2785901427268982, 1.6083984375, 0.7234494686126709, -0.38576972484588623, 0.5142140984535217, 0.4683459997177124, -0.13981780409812927, -2.093266725540161, -1.081687092781067, 0.38187021017074585, -0.4754125773906708, -1.5090306997299194, 1.2971360683441162, -1.0894328355789185, -0.9955140948295593, 0.6062091588973999, 0.06011237949132919, 1.385765790939331, 0.4338339865207672, 1.6533832550048828, 2.181698799133301, 0.9014542102813721, 0.3391667902469635, 1.2463635206222534, -0.07501794397830963, -0.4135079085826874, 1.865286946296692, -0.45594140887260437, 0.46772822737693787, 1.097680687904358, -0.3471249043941498, -1.1171644926071167, -0.84577476978302, -1.1973611116409302, -0.6636627912521362, 1.220258116722107, 0.055026911199092865, -1.0703874826431274, 0.24480727314949036, 1.6066726446151733, 0.15287286043167114, -0.2042415887117386, 0.6504238247871399, 0.4202580153942108, -0.798992931842804, -0.10410724580287933, -0.8536184430122375, 0.5267447829246521, -0.12364353239536285, -0.3217950463294983, 0.32166367769241333, 0.5273076295852661, 1.282390832901001, -0.11538074910640717, 0.12285519391298294, 1.09727144241333, -1.4795984029769897, 1.5665452480316162, -0.7018610835075378, 0.26454511284828186, -2.429673194885254, 1.406009554862976, -0.8212742209434509, 1.9709917306900024, -2.598905563354492, 0.4001913070678711, -0.5293368101119995, -0.5242493152618408, 0.2528361976146698, -0.41426944732666016, 0.09667319059371948, -0.1800098568201065, -1.025019884109497, -0.012114761397242546, -0.6305838227272034, 0.5774763226509094, 1.175236701965332, 1.4311459064483643, -1.1075918674468994, -0.2906535267829895, -1.8079650402069092, -0.16971586644649506, -0.7381198406219482, 0.35623982548713684, -1.8801627159118652, -0.11117181926965714, -1.9442031383514404, -2.360278844833374, -1.433009147644043, -0.8506304621696472, 1.0830824375152588, 0.213068425655365, -0.9755762815475464, 1.152095079421997, -0.37558111548423767, -1.8428326845169067, 1.1761736869812012, -2.2514772415161133 ]
https://github.com/huggingface/datasets/issues/4525
Out of memory error on workers while running Beam+Dataflow
> I asked my colleague who ran the code and he said apache beam. He looked into it further and he just used DirectRunner. @albertvillanova
## Describe the bug While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files). Previously we ran the preprocessing for the "dev" config (only dev files) with success. Train data files are larger than dev ones and apparently workers run out of memory while processing them. Any help/hint is welcome! Error message: ``` Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` Info from the Diagnostics tab: ``` Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900 The worker VM had to shut down one or more processes due to lack of memory. ``` ## Additional information ### Stack trace ``` Traceback (most recent call last): File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module> sys.exit(main()) File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main service.run() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run builder.download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare self._download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare pipeline_results.wait_until_finish() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish raise DataflowRuntimeException( apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` ### Logs ``` Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0 Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service. ```
702
25
Out of memory error on workers while running Beam+Dataflow ## Describe the bug While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files). Previously we ran the preprocessing for the "dev" config (only dev files) with success. Train data files are larger than dev ones and apparently workers run out of memory while processing them. Any help/hint is welcome! Error message: ``` Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` Info from the Diagnostics tab: ``` Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900 The worker VM had to shut down one or more processes due to lack of memory. ``` ## Additional information ### Stack trace ``` Traceback (most recent call last): File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module> sys.exit(main()) File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main service.run() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run builder.download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare self._download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare pipeline_results.wait_until_finish() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish raise DataflowRuntimeException( apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` ### Logs ``` Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0 Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service. ``` > I asked my colleague who ran the code and he said apache beam. He looked into it further and he just used DirectRunner. @albertvillanova
[ -1.167747139930725, -0.9081085920333862, -0.6810803413391113, 1.495227336883545, -0.07052646577358246, -1.2898154258728027, 0.12022533267736435, -1.040149450302124, 1.505122423171997, -0.6887544989585876, 0.29703494906425476, -1.6630910634994507, -0.06212452054023743, -0.5730867385864258, -0.6957724690437317, -0.8337664604187012, -0.38206109404563904, -0.8570446968078613, 1.0062670707702637, 2.487558603286743, 1.3525497913360596, -1.3619784116744995, 2.7081074714660645, 0.6964371800422668, -0.32117313146591187, -0.9837691783905029, 0.5574024319648743, -0.0140798669308424, -1.3013544082641602, -0.47992655634880066, -0.9272590279579163, -0.017946450039744377, -0.6133636236190796, -0.38785025477409363, 0.0332610160112381, 0.42217034101486206, -0.23202966153621674, -0.29176661372184753, -0.6550682783126831, -0.7969309687614441, 0.522904634475708, -0.3505897521972656, 0.9616113305091858, -0.3162369132041931, 1.8150520324707031, -0.6479218006134033, 0.4017249643802643, 0.7542010545730591, 1.3154494762420654, 0.17482195794582367, -0.035889752209186554, 0.3308582007884979, 0.3500933349132538, -0.023595787584781647, 0.511845052242279, 1.255204200744629, 0.5603359341621399, 0.5064517259597778, 0.6673795580863953, -2.1668684482574463, 1.3391919136047363, -0.9007066488265991, 0.2305610626935959, 1.355873703956604, -0.9412118196487427, 0.3829191327095032, -1.7881221771240234, -0.09502428770065308, 0.6046106219291687, -2.217587947845459, 0.2836362421512604, -1.254388451576233, -0.523456335067749, 0.9361034035682678, 0.3263225853443146, -1.2136763334274292, 0.15803444385528564, -0.46290022134780884, 0.9841050505638123, 0.4013884663581848, 1.1012928485870361, -1.712233543395996, -0.05266832932829857, -0.29910269379615784, 0.09299805015325546, -1.2860612869262695, -1.6582489013671875, 0.555488646030426, 0.592936635017395, 0.5715922117233276, -0.1542646437883377, 1.0892468690872192, -1.0547739267349243, 0.8211280703544617, -0.9477689266204834, -1.6386371850967407, -1.45287024974823, -2.353949785232544, -2.246382474899292, 0.7677990198135376, -0.5574741363525391, -0.5091798305511475, 1.9890964031219482, -1.0262583494186401, -1.7707573175430298, 1.034909963607788, 0.326990008354187, 0.027504365891218185, 2.366971254348755, 0.20875053107738495, -0.7648671865463257, 0.42993414402008057, -0.7113832235336304, 0.7583556771278381, -0.33425018191337585, 1.3272569179534912, 0.497506707906723, -1.0997692346572876, 1.5845392942428589, -0.4461473524570465, 0.5275309681892395, -0.6245843172073364, -0.4765464961528778, -0.7875643968582153, 0.30519574880599976, 1.8639689683914185, -0.37660592794418335, 1.5454179048538208, -0.20644758641719818, -1.5562549829483032, -1.5818990468978882, 0.8448175191879272, 0.4604882299900055, -0.8871714472770691, 0.10469307750463486, -0.46059563755989075, 0.13330326974391937, -0.07036755979061127, 1.1158275604248047, 1.1853010654449463, 0.6499924659729004, -0.34627482295036316, -0.7897534370422363, 0.19053922593593597, -0.17640061676502228, -0.6672656536102295, -1.8475518226623535, -0.3269137740135193, 0.23050108551979065, 0.6502492427825928, -1.2434054613113403, 1.8727538585662842, 0.936091423034668, 1.9685883522033691, 0.9739022254943848, -0.3640747368335724, 1.4869446754455566, -0.032535672187805176, 1.8701131343841553, -0.48480838537216187, 0.6553521156311035, -0.4417518079280853, -1.2525527477264404, 0.9689347743988037, -0.33418983221054077, -1.9978687763214111, -0.8162897825241089, -0.7980762720108032, -0.20011460781097412, -0.7185720205307007, 0.9537826776504517, -0.2976924777030945, -1.4205987453460693, 0.13007564842700958, -0.6565256118774414, 0.1600048840045929, -1.2753715515136719, 0.22308053076267242, 0.6611273288726807, -0.701200008392334, -0.013131196610629559, -0.23339714109897614, -1.2479239702224731, -0.5131011009216309, 0.3061446249485016, 1.9186055660247803, -0.6375823020935059, 1.0166096687316895, 0.9990744590759277, -0.6828206181526184, 0.13825105130672455, 0.30453577637672424, -0.328828901052475, 0.8450989127159119, -1.116175889968872, -0.44466936588287354, 1.2722036838531494, -0.25492775440216064, -0.7351576685905457, 1.411509394645691, 0.8119500279426575, -1.1205393075942993, -0.26560652256011963, -0.20066778361797333, -0.874090850353241, 0.07222512364387512, -1.5145176649093628, -0.05276808887720108, 0.39511096477508545, -1.519985318183899, -0.3478204607963562, -0.16641037166118622, 1.3260327577590942, -0.138196662068367, 1.410787582397461, -0.36635422706604004, -0.1669679880142212, -0.28549325466156006, -0.4258630573749542, 0.14370639622211456, -0.169145867228508, -0.589881956577301, 0.2669302523136139, -0.8882887363433838, 0.29439905285835266, 1.4457391500473022, 0.3306660056114197, 0.06512290984392166, 0.5131847262382507, 1.0930020809173584, 0.33540403842926025, -0.04787251353263855, -0.9537578821182251, -1.5649904012680054, 2.0355160236358643, -1.4341237545013428, 1.8953666687011719, 0.8527833223342896, -0.04960868880152702, -1.7862956523895264, -1.8308517932891846, 1.2887829542160034, 1.1187952756881714, 2.3930020332336426, 0.5081571936607361, 0.37896934151649475, -0.7652207612991333, -0.7058573365211487, 0.404326468706131, -1.047053337097168, -0.6916713714599609, 0.20672020316123962, 2.3967602252960205, 1.8566828966140747, -0.47060978412628174, -0.2966027855873108, -0.9384845495223999, 1.2903610467910767, -0.2372637391090393, 0.2014797031879425, 2.0397369861602783, -0.29313385486602783, -0.9654138684272766, 1.3529775142669678, -2.3480100631713867, 0.27026423811912537, 2.0472168922424316, 0.26662755012512207, 0.13133969902992249, -1.3742396831512451, -0.6492131948471069, -0.233134925365448, -0.4636176824569702, -1.205694556236267, 0.5244424939155579, -0.2883610129356384, -0.8198261260986328, -1.427946925163269, 0.11114451289176941, -1.2197721004486084, -1.7867579460144043, 0.3645038902759552, 1.868938684463501, 2.101832389831543, -0.7597046494483948, 1.4894658327102661, -0.28360018134117126, 0.06359308958053589, 1.2436221837997437, 1.3234025239944458, 3.126072645187378, 1.8347582817077637, -1.3104753494262695, 0.668588399887085, -0.18811394274234772, -0.5055830478668213, 1.1298600435256958, -1.148753046989441, 1.134999394416809, -0.24561366438865662, -1.245051383972168, -1.1815334558486938, 1.084162712097168, 0.4160711169242859, 0.06463830918073654, -0.5107442140579224, 1.17487370967865, 0.14624227583408356, 1.2525125741958618, 0.6090380549430847, -0.41219562292099, 0.5123512148857117, -0.35947385430336, -0.5383492112159729, 1.5819700956344604, 0.23059333860874176, -1.444074034690857, -2.3406670093536377, -0.2702785134315491, -0.9774542450904846, -0.0691131055355072, -0.6724916100502014, -1.0127146244049072, 1.5446696281433105, 0.4032822847366333, -1.247618317604065, -0.2553451955318451, -0.3077389597892761, -0.5381221771240234, 2.6420605182647705, -1.3492203950881958, -0.12155945599079132, -0.9432495832443237, -0.5782790780067444, 1.616778016090393, -1.1498606204986572, -0.2658018469810486, -1.0575510263442993, -0.5829907059669495, -1.2604414224624634, -0.5053005218505859, 0.05665222555398941, -0.9864253401756287, 0.7643287181854248, 0.14237403869628906, -1.0842353105545044, -0.30643966794013977, -0.8747756481170654, 1.018897294998169, -0.11253564059734344, 0.20306947827339172, 1.7927168607711792, 0.3534736633300781, -0.42546460032463074, 0.7833393812179565, 1.1632709503173828, 0.6871854066848755, -0.6261670589447021, 0.06633931398391724, -0.6471678614616394, 0.25271719694137573, -1.3292959928512573, 0.2736646234989166, -2.879326820373535, 0.7092621922492981, -0.1419302374124527, -0.0951683297753334, -0.01384151540696621, -1.3326689004898071, 1.0764923095703125, 2.5679261684417725, -1.1184049844741821, 0.5268094539642334, 0.37656834721565247, 1.0605568885803223, -1.6364012956619263, 0.302687406539917, -0.5031272172927856, 2.1053006649017334, 0.08534754812717438, 1.2236632108688354, -0.44941994547843933, -2.2016520500183105, 0.6636963486671448, -1.2574456930160522, -1.053810477256775, 0.8622851967811584, -0.922485888004303, 0.1943369209766388, -1.5243024826049805, -0.19215548038482666, -0.8918091058731079, -1.2296314239501953, 0.7032374739646912, 0.001962551847100258, 0.418296217918396, -0.5353490114212036, 0.30148276686668396, -2.1429784297943115, -1.4099847078323364, -0.1795847862958908, -1.0207170248031616, 0.4899168908596039, -0.405717670917511, 0.6712584495544434, -0.12919683754444122, 0.0347956158220768, 0.3015495836734772, 1.4458074569702148, 3.405562400817871, 0.1697971075773239, 0.20288600027561188, -0.07582592219114304, -0.9528859257698059, 1.3909573554992676, 0.9226603507995605, -0.12576736509799957, -0.6170929670333862, -0.996905505657196, 1.2937769889831543, 2.0327951908111572, 1.0835514068603516, 0.09785874933004379, -0.8486785292625427, -0.7526372671127319, -0.014965282753109932, 0.11283502727746964, 0.5284773707389832, 0.8540798425674438, -0.03418531268835068, 0.0621708407998085, 1.3790440559387207, 1.194907546043396, -0.336579293012619, 0.4188495874404907, -0.8586564064025879, -0.38610655069351196, 0.4282650351524353, 0.2252831608057022, 0.058457598090171814, 0.43836236000061035, -1.0417282581329346, -0.3625503480434418, -0.3726640045642853, -0.9239937663078308, -0.753389835357666, -0.4709860384464264, -0.46504953503608704, 1.6551581621170044, 0.038449399173259735, -0.5057148933410645, -0.010502378456294537, -0.6857675909996033, -0.16725915670394897, -1.071566104888916, 0.16792234778404236, -0.11900481581687927, 0.009645366109907627, -0.1968955248594284, 1.6552807092666626, -0.9420904517173767, -2.154618978500366, 0.19112324714660645, 0.30645543336868286, -0.33273807168006897, 0.15331237018108368, 1.8099339008331299, 0.5257626175880432, 1.382735252380371, 1.2999671697616577, 0.9967676401138306, -0.6329928040504456, -1.2055569887161255, 0.7082068920135498, 0.9786188006401062, -1.4098525047302246, 0.9704183340072632, -0.1505812406539917, -0.47650864720344543, 0.6748145222663879, 1.2685965299606323, 0.45454278588294983, -2.00728178024292, 0.9372283816337585, -0.9463179707527161, 0.8013675808906555, 0.7012624740600586, 0.7374290227890015, 0.23076049983501434, 0.8225100040435791, -1.2495722770690918, -1.1180729866027832, -0.7191218137741089, -0.6333242654800415, 1.9135686159133911, -0.22640621662139893, 0.5845875144004822, -0.10762651264667511, -1.1972521543502808, -0.16036905348300934, 0.8617849349975586, 0.3184104859828949, -0.42917850613594055, 0.8620024919509888, -0.6055912971496582, -0.9900406002998352, -1.3000940084457397, -0.42029109597206116, -1.047550916671753, -0.8247358202934265, 1.0358669757843018, 0.6941180229187012, 0.4591766595840454, 2.008512496948242, 0.6856313347816467, 0.2745894193649292, -2.622067451477051, 0.9351630806922913, 0.24096471071243286, -0.02795102447271347, 0.9256349205970764, 0.2257327139377594, 1.086195707321167, -0.04834939166903496, 0.5479761958122253, -2.339092969894409, 2.234473705291748, -0.17562927305698395, 0.630689263343811, 0.015812654048204422, -0.23682208359241486, 1.1784641742706299, 0.5351911187171936, 0.5824214816093445, -1.1666040420532227, 0.6502164602279663, -0.5828353762626648, 1.1012531518936157, 0.8485900163650513, -1.0325201749801636, 0.048783835023641586, 1.3479341268539429, 0.46573036909103394, -0.4385830760002136, -0.9948357939720154, -0.8417344093322754, 0.9763474464416504, 1.6536574363708496, -0.04856167361140251, 0.03722640872001648, 0.9056390523910522, 0.639607310295105, -1.236367106437683, 0.13938595354557037, -0.6620202660560608, -0.675269365310669, 1.71132230758667, 2.0297162532806396, -0.1641356199979782, -0.1354001760482788, -0.802182674407959, -1.2638039588928223, 0.8210617303848267, -0.13218088448047638, 0.07695315778255463, 0.6260913014411926, -0.6611349582672119, 1.1281623840332031, 0.7099025845527649, 1.0362991094589233, 0.09676722437143326, 0.2504989504814148, 0.4368325471878052, -0.3622915744781494, -1.179662823677063, -0.28344908356666565, -1.109061360359192, -2.5931215286254883, 0.44675254821777344, -0.21485865116119385, -1.4839457273483276, 0.0339457243680954, -1.0018219947814941, 0.9216444492340088, -0.5538318753242493, -1.056221604347229, -1.4768624305725098, 0.3479066491127014, -0.16682106256484985, 0.981510579586029, -1.6316406726837158, -0.14935508370399475, 1.234882116317749, 0.7927021384239197, -0.6539110541343689, 0.9318616986274719, 0.22539423406124115, 0.9775547385215759, 0.8415790796279907, -0.37712472677230835, 0.612548828125, 0.0899684727191925, -1.3040012121200562, 0.48956042528152466, 1.195454478263855, 0.15648342669010162, 1.3795616626739502, -0.4564966857433319, 0.08198380470275879, 0.4284279942512512, -0.6200796961784363, -0.5171589255332947, -0.44524917006492615, 0.6808425784111023, -0.01199520193040371, -0.9841840267181396, -0.10266400873661041, -0.10955950617790222, -0.2510559856891632, 0.16423921287059784, -1.4657344818115234, -0.2315133959054947, -0.3046662509441376, -0.4358348548412323, -1.3369922637939453, -0.05317075923085213, 1.290614128112793, -0.665827214717865, -0.2582989037036896, 0.5340444445610046, 0.29477471113204956, 0.5524770617485046, 0.6179774403572083, -0.7117618918418884, -0.2577199637889862, -0.32406142354011536, -0.330523282289505, 0.35141846537590027, 1.303191065788269, -0.04640631750226021, -0.8803525567054749, 0.7063815593719482, -0.30131426453590393, 0.13909770548343658, 2.02036190032959, 0.09416399151086807, -0.7281070947647095, 0.36283260583877563, -0.6797582507133484, 1.7700042724609375, 1.7852320671081543, 1.1787346601486206, -0.13151206076145172, -0.9268597960472107, 0.6005533933639526, -0.279816210269928, -0.32721439003944397, 0.9528229236602783, 0.3219650685787201, -0.21593077480793, -1.429276466369629, 0.6652834415435791, 1.364363431930542, -0.8222671151161194, -0.7627568244934082, 0.12563902139663696, -0.927889883518219, 1.1964361667633057, 0.6034316420555115, 0.35901835560798645, 0.2785901427268982, 1.6083984375, 0.7234494686126709, -0.38576972484588623, 0.5142140984535217, 0.4683459997177124, -0.13981780409812927, -2.093266725540161, -1.081687092781067, 0.38187021017074585, -0.4754125773906708, -1.5090306997299194, 1.2971360683441162, -1.0894328355789185, -0.9955140948295593, 0.6062091588973999, 0.06011237949132919, 1.385765790939331, 0.4338339865207672, 1.6533832550048828, 2.181698799133301, 0.9014542102813721, 0.3391667902469635, 1.2463635206222534, -0.07501794397830963, -0.4135079085826874, 1.865286946296692, -0.45594140887260437, 0.46772822737693787, 1.097680687904358, -0.3471249043941498, -1.1171644926071167, -0.84577476978302, -1.1973611116409302, -0.6636627912521362, 1.220258116722107, 0.055026911199092865, -1.0703874826431274, 0.24480727314949036, 1.6066726446151733, 0.15287286043167114, -0.2042415887117386, 0.6504238247871399, 0.4202580153942108, -0.798992931842804, -0.10410724580287933, -0.8536184430122375, 0.5267447829246521, -0.12364353239536285, -0.3217950463294983, 0.32166367769241333, 0.5273076295852661, 1.282390832901001, -0.11538074910640717, 0.12285519391298294, 1.09727144241333, -1.4795984029769897, 1.5665452480316162, -0.7018610835075378, 0.26454511284828186, -2.429673194885254, 1.406009554862976, -0.8212742209434509, 1.9709917306900024, -2.598905563354492, 0.4001913070678711, -0.5293368101119995, -0.5242493152618408, 0.2528361976146698, -0.41426944732666016, 0.09667319059371948, -0.1800098568201065, -1.025019884109497, -0.012114761397242546, -0.6305838227272034, 0.5774763226509094, 1.175236701965332, 1.4311459064483643, -1.1075918674468994, -0.2906535267829895, -1.8079650402069092, -0.16971586644649506, -0.7381198406219482, 0.35623982548713684, -1.8801627159118652, -0.11117181926965714, -1.9442031383514404, -2.360278844833374, -1.433009147644043, -0.8506304621696472, 1.0830824375152588, 0.213068425655365, -0.9755762815475464, 1.152095079421997, -0.37558111548423767, -1.8428326845169067, 1.1761736869812012, -2.2514772415161133 ]
https://github.com/huggingface/datasets/issues/4525
Out of memory error on workers while running Beam+Dataflow
OK, thank you @seirasto for your hint. That explains why you did not encounter the out of memory error: this only appears when the processing is distributed (on workers memory) and DirectRunner does not distribute the processing (all is done in a single machine).
## Describe the bug While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files). Previously we ran the preprocessing for the "dev" config (only dev files) with success. Train data files are larger than dev ones and apparently workers run out of memory while processing them. Any help/hint is welcome! Error message: ``` Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` Info from the Diagnostics tab: ``` Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900 The worker VM had to shut down one or more processes due to lack of memory. ``` ## Additional information ### Stack trace ``` Traceback (most recent call last): File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module> sys.exit(main()) File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main service.run() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run builder.download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare self._download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare pipeline_results.wait_until_finish() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish raise DataflowRuntimeException( apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` ### Logs ``` Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0 Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service. ```
702
44
Out of memory error on workers while running Beam+Dataflow ## Describe the bug While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files). Previously we ran the preprocessing for the "dev" config (only dev files) with success. Train data files are larger than dev ones and apparently workers run out of memory while processing them. Any help/hint is welcome! Error message: ``` Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` Info from the Diagnostics tab: ``` Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900 The worker VM had to shut down one or more processes due to lack of memory. ``` ## Additional information ### Stack trace ``` Traceback (most recent call last): File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module> sys.exit(main()) File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main service.run() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run builder.download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare self._download_and_prepare( File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare pipeline_results.wait_until_finish() File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish raise DataflowRuntimeException( apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: Data channel closed, unable to receive additional data from SDK sdk-0-0 ``` ### Logs ``` Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0 Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service. ``` OK, thank you @seirasto for your hint. That explains why you did not encounter the out of memory error: this only appears when the processing is distributed (on workers memory) and DirectRunner does not distribute the processing (all is done in a single machine).
[ -1.167747139930725, -0.9081085920333862, -0.6810803413391113, 1.495227336883545, -0.07052646577358246, -1.2898154258728027, 0.12022533267736435, -1.040149450302124, 1.505122423171997, -0.6887544989585876, 0.29703494906425476, -1.6630910634994507, -0.06212452054023743, -0.5730867385864258, -0.6957724690437317, -0.8337664604187012, -0.38206109404563904, -0.8570446968078613, 1.0062670707702637, 2.487558603286743, 1.3525497913360596, -1.3619784116744995, 2.7081074714660645, 0.6964371800422668, -0.32117313146591187, -0.9837691783905029, 0.5574024319648743, -0.0140798669308424, -1.3013544082641602, -0.47992655634880066, -0.9272590279579163, -0.017946450039744377, -0.6133636236190796, -0.38785025477409363, 0.0332610160112381, 0.42217034101486206, -0.23202966153621674, -0.29176661372184753, -0.6550682783126831, -0.7969309687614441, 0.522904634475708, -0.3505897521972656, 0.9616113305091858, -0.3162369132041931, 1.8150520324707031, -0.6479218006134033, 0.4017249643802643, 0.7542010545730591, 1.3154494762420654, 0.17482195794582367, -0.035889752209186554, 0.3308582007884979, 0.3500933349132538, -0.023595787584781647, 0.511845052242279, 1.255204200744629, 0.5603359341621399, 0.5064517259597778, 0.6673795580863953, -2.1668684482574463, 1.3391919136047363, -0.9007066488265991, 0.2305610626935959, 1.355873703956604, -0.9412118196487427, 0.3829191327095032, -1.7881221771240234, -0.09502428770065308, 0.6046106219291687, -2.217587947845459, 0.2836362421512604, -1.254388451576233, -0.523456335067749, 0.9361034035682678, 0.3263225853443146, -1.2136763334274292, 0.15803444385528564, -0.46290022134780884, 0.9841050505638123, 0.4013884663581848, 1.1012928485870361, -1.712233543395996, -0.05266832932829857, -0.29910269379615784, 0.09299805015325546, -1.2860612869262695, -1.6582489013671875, 0.555488646030426, 0.592936635017395, 0.5715922117233276, -0.1542646437883377, 1.0892468690872192, -1.0547739267349243, 0.8211280703544617, -0.9477689266204834, -1.6386371850967407, -1.45287024974823, -2.353949785232544, -2.246382474899292, 0.7677990198135376, -0.5574741363525391, -0.5091798305511475, 1.9890964031219482, -1.0262583494186401, -1.7707573175430298, 1.034909963607788, 0.326990008354187, 0.027504365891218185, 2.366971254348755, 0.20875053107738495, -0.7648671865463257, 0.42993414402008057, -0.7113832235336304, 0.7583556771278381, -0.33425018191337585, 1.3272569179534912, 0.497506707906723, -1.0997692346572876, 1.5845392942428589, -0.4461473524570465, 0.5275309681892395, -0.6245843172073364, -0.4765464961528778, -0.7875643968582153, 0.30519574880599976, 1.8639689683914185, -0.37660592794418335, 1.5454179048538208, -0.20644758641719818, -1.5562549829483032, -1.5818990468978882, 0.8448175191879272, 0.4604882299900055, -0.8871714472770691, 0.10469307750463486, -0.46059563755989075, 0.13330326974391937, -0.07036755979061127, 1.1158275604248047, 1.1853010654449463, 0.6499924659729004, -0.34627482295036316, -0.7897534370422363, 0.19053922593593597, -0.17640061676502228, -0.6672656536102295, -1.8475518226623535, -0.3269137740135193, 0.23050108551979065, 0.6502492427825928, -1.2434054613113403, 1.8727538585662842, 0.936091423034668, 1.9685883522033691, 0.9739022254943848, -0.3640747368335724, 1.4869446754455566, -0.032535672187805176, 1.8701131343841553, -0.48480838537216187, 0.6553521156311035, -0.4417518079280853, -1.2525527477264404, 0.9689347743988037, -0.33418983221054077, -1.9978687763214111, -0.8162897825241089, -0.7980762720108032, -0.20011460781097412, -0.7185720205307007, 0.9537826776504517, -0.2976924777030945, -1.4205987453460693, 0.13007564842700958, -0.6565256118774414, 0.1600048840045929, -1.2753715515136719, 0.22308053076267242, 0.6611273288726807, -0.701200008392334, -0.013131196610629559, -0.23339714109897614, -1.2479239702224731, -0.5131011009216309, 0.3061446249485016, 1.9186055660247803, -0.6375823020935059, 1.0166096687316895, 0.9990744590759277, -0.6828206181526184, 0.13825105130672455, 0.30453577637672424, -0.328828901052475, 0.8450989127159119, -1.116175889968872, -0.44466936588287354, 1.2722036838531494, -0.25492775440216064, -0.7351576685905457, 1.411509394645691, 0.8119500279426575, -1.1205393075942993, -0.26560652256011963, -0.20066778361797333, -0.874090850353241, 0.07222512364387512, -1.5145176649093628, -0.05276808887720108, 0.39511096477508545, -1.519985318183899, -0.3478204607963562, -0.16641037166118622, 1.3260327577590942, -0.138196662068367, 1.410787582397461, -0.36635422706604004, -0.1669679880142212, -0.28549325466156006, -0.4258630573749542, 0.14370639622211456, -0.169145867228508, -0.589881956577301, 0.2669302523136139, -0.8882887363433838, 0.29439905285835266, 1.4457391500473022, 0.3306660056114197, 0.06512290984392166, 0.5131847262382507, 1.0930020809173584, 0.33540403842926025, -0.04787251353263855, -0.9537578821182251, -1.5649904012680054, 2.0355160236358643, -1.4341237545013428, 1.8953666687011719, 0.8527833223342896, -0.04960868880152702, -1.7862956523895264, -1.8308517932891846, 1.2887829542160034, 1.1187952756881714, 2.3930020332336426, 0.5081571936607361, 0.37896934151649475, -0.7652207612991333, -0.7058573365211487, 0.404326468706131, -1.047053337097168, -0.6916713714599609, 0.20672020316123962, 2.3967602252960205, 1.8566828966140747, -0.47060978412628174, -0.2966027855873108, -0.9384845495223999, 1.2903610467910767, -0.2372637391090393, 0.2014797031879425, 2.0397369861602783, -0.29313385486602783, -0.9654138684272766, 1.3529775142669678, -2.3480100631713867, 0.27026423811912537, 2.0472168922424316, 0.26662755012512207, 0.13133969902992249, -1.3742396831512451, -0.6492131948471069, -0.233134925365448, -0.4636176824569702, -1.205694556236267, 0.5244424939155579, -0.2883610129356384, -0.8198261260986328, -1.427946925163269, 0.11114451289176941, -1.2197721004486084, -1.7867579460144043, 0.3645038902759552, 1.868938684463501, 2.101832389831543, -0.7597046494483948, 1.4894658327102661, -0.28360018134117126, 0.06359308958053589, 1.2436221837997437, 1.3234025239944458, 3.126072645187378, 1.8347582817077637, -1.3104753494262695, 0.668588399887085, -0.18811394274234772, -0.5055830478668213, 1.1298600435256958, -1.148753046989441, 1.134999394416809, -0.24561366438865662, -1.245051383972168, -1.1815334558486938, 1.084162712097168, 0.4160711169242859, 0.06463830918073654, -0.5107442140579224, 1.17487370967865, 0.14624227583408356, 1.2525125741958618, 0.6090380549430847, -0.41219562292099, 0.5123512148857117, -0.35947385430336, -0.5383492112159729, 1.5819700956344604, 0.23059333860874176, -1.444074034690857, -2.3406670093536377, -0.2702785134315491, -0.9774542450904846, -0.0691131055355072, -0.6724916100502014, -1.0127146244049072, 1.5446696281433105, 0.4032822847366333, -1.247618317604065, -0.2553451955318451, -0.3077389597892761, -0.5381221771240234, 2.6420605182647705, -1.3492203950881958, -0.12155945599079132, -0.9432495832443237, -0.5782790780067444, 1.616778016090393, -1.1498606204986572, -0.2658018469810486, -1.0575510263442993, -0.5829907059669495, -1.2604414224624634, -0.5053005218505859, 0.05665222555398941, -0.9864253401756287, 0.7643287181854248, 0.14237403869628906, -1.0842353105545044, -0.30643966794013977, -0.8747756481170654, 1.018897294998169, -0.11253564059734344, 0.20306947827339172, 1.7927168607711792, 0.3534736633300781, -0.42546460032463074, 0.7833393812179565, 1.1632709503173828, 0.6871854066848755, -0.6261670589447021, 0.06633931398391724, -0.6471678614616394, 0.25271719694137573, -1.3292959928512573, 0.2736646234989166, -2.879326820373535, 0.7092621922492981, -0.1419302374124527, -0.0951683297753334, -0.01384151540696621, -1.3326689004898071, 1.0764923095703125, 2.5679261684417725, -1.1184049844741821, 0.5268094539642334, 0.37656834721565247, 1.0605568885803223, -1.6364012956619263, 0.302687406539917, -0.5031272172927856, 2.1053006649017334, 0.08534754812717438, 1.2236632108688354, -0.44941994547843933, -2.2016520500183105, 0.6636963486671448, -1.2574456930160522, -1.053810477256775, 0.8622851967811584, -0.922485888004303, 0.1943369209766388, -1.5243024826049805, -0.19215548038482666, -0.8918091058731079, -1.2296314239501953, 0.7032374739646912, 0.001962551847100258, 0.418296217918396, -0.5353490114212036, 0.30148276686668396, -2.1429784297943115, -1.4099847078323364, -0.1795847862958908, -1.0207170248031616, 0.4899168908596039, -0.405717670917511, 0.6712584495544434, -0.12919683754444122, 0.0347956158220768, 0.3015495836734772, 1.4458074569702148, 3.405562400817871, 0.1697971075773239, 0.20288600027561188, -0.07582592219114304, -0.9528859257698059, 1.3909573554992676, 0.9226603507995605, -0.12576736509799957, -0.6170929670333862, -0.996905505657196, 1.2937769889831543, 2.0327951908111572, 1.0835514068603516, 0.09785874933004379, -0.8486785292625427, -0.7526372671127319, -0.014965282753109932, 0.11283502727746964, 0.5284773707389832, 0.8540798425674438, -0.03418531268835068, 0.0621708407998085, 1.3790440559387207, 1.194907546043396, -0.336579293012619, 0.4188495874404907, -0.8586564064025879, -0.38610655069351196, 0.4282650351524353, 0.2252831608057022, 0.058457598090171814, 0.43836236000061035, -1.0417282581329346, -0.3625503480434418, -0.3726640045642853, -0.9239937663078308, -0.753389835357666, -0.4709860384464264, -0.46504953503608704, 1.6551581621170044, 0.038449399173259735, -0.5057148933410645, -0.010502378456294537, -0.6857675909996033, -0.16725915670394897, -1.071566104888916, 0.16792234778404236, -0.11900481581687927, 0.009645366109907627, -0.1968955248594284, 1.6552807092666626, -0.9420904517173767, -2.154618978500366, 0.19112324714660645, 0.30645543336868286, -0.33273807168006897, 0.15331237018108368, 1.8099339008331299, 0.5257626175880432, 1.382735252380371, 1.2999671697616577, 0.9967676401138306, -0.6329928040504456, -1.2055569887161255, 0.7082068920135498, 0.9786188006401062, -1.4098525047302246, 0.9704183340072632, -0.1505812406539917, -0.47650864720344543, 0.6748145222663879, 1.2685965299606323, 0.45454278588294983, -2.00728178024292, 0.9372283816337585, -0.9463179707527161, 0.8013675808906555, 0.7012624740600586, 0.7374290227890015, 0.23076049983501434, 0.8225100040435791, -1.2495722770690918, -1.1180729866027832, -0.7191218137741089, -0.6333242654800415, 1.9135686159133911, -0.22640621662139893, 0.5845875144004822, -0.10762651264667511, -1.1972521543502808, -0.16036905348300934, 0.8617849349975586, 0.3184104859828949, -0.42917850613594055, 0.8620024919509888, -0.6055912971496582, -0.9900406002998352, -1.3000940084457397, -0.42029109597206116, -1.047550916671753, -0.8247358202934265, 1.0358669757843018, 0.6941180229187012, 0.4591766595840454, 2.008512496948242, 0.6856313347816467, 0.2745894193649292, -2.622067451477051, 0.9351630806922913, 0.24096471071243286, -0.02795102447271347, 0.9256349205970764, 0.2257327139377594, 1.086195707321167, -0.04834939166903496, 0.5479761958122253, -2.339092969894409, 2.234473705291748, -0.17562927305698395, 0.630689263343811, 0.015812654048204422, -0.23682208359241486, 1.1784641742706299, 0.5351911187171936, 0.5824214816093445, -1.1666040420532227, 0.6502164602279663, -0.5828353762626648, 1.1012531518936157, 0.8485900163650513, -1.0325201749801636, 0.048783835023641586, 1.3479341268539429, 0.46573036909103394, -0.4385830760002136, -0.9948357939720154, -0.8417344093322754, 0.9763474464416504, 1.6536574363708496, -0.04856167361140251, 0.03722640872001648, 0.9056390523910522, 0.639607310295105, -1.236367106437683, 0.13938595354557037, -0.6620202660560608, -0.675269365310669, 1.71132230758667, 2.0297162532806396, -0.1641356199979782, -0.1354001760482788, -0.802182674407959, -1.2638039588928223, 0.8210617303848267, -0.13218088448047638, 0.07695315778255463, 0.6260913014411926, -0.6611349582672119, 1.1281623840332031, 0.7099025845527649, 1.0362991094589233, 0.09676722437143326, 0.2504989504814148, 0.4368325471878052, -0.3622915744781494, -1.179662823677063, -0.28344908356666565, -1.109061360359192, -2.5931215286254883, 0.44675254821777344, -0.21485865116119385, -1.4839457273483276, 0.0339457243680954, -1.0018219947814941, 0.9216444492340088, -0.5538318753242493, -1.056221604347229, -1.4768624305725098, 0.3479066491127014, -0.16682106256484985, 0.981510579586029, -1.6316406726837158, -0.14935508370399475, 1.234882116317749, 0.7927021384239197, -0.6539110541343689, 0.9318616986274719, 0.22539423406124115, 0.9775547385215759, 0.8415790796279907, -0.37712472677230835, 0.612548828125, 0.0899684727191925, -1.3040012121200562, 0.48956042528152466, 1.195454478263855, 0.15648342669010162, 1.3795616626739502, -0.4564966857433319, 0.08198380470275879, 0.4284279942512512, -0.6200796961784363, -0.5171589255332947, -0.44524917006492615, 0.6808425784111023, -0.01199520193040371, -0.9841840267181396, -0.10266400873661041, -0.10955950617790222, -0.2510559856891632, 0.16423921287059784, -1.4657344818115234, -0.2315133959054947, -0.3046662509441376, -0.4358348548412323, -1.3369922637939453, -0.05317075923085213, 1.290614128112793, -0.665827214717865, -0.2582989037036896, 0.5340444445610046, 0.29477471113204956, 0.5524770617485046, 0.6179774403572083, -0.7117618918418884, -0.2577199637889862, -0.32406142354011536, -0.330523282289505, 0.35141846537590027, 1.303191065788269, -0.04640631750226021, -0.8803525567054749, 0.7063815593719482, -0.30131426453590393, 0.13909770548343658, 2.02036190032959, 0.09416399151086807, -0.7281070947647095, 0.36283260583877563, -0.6797582507133484, 1.7700042724609375, 1.7852320671081543, 1.1787346601486206, -0.13151206076145172, -0.9268597960472107, 0.6005533933639526, -0.279816210269928, -0.32721439003944397, 0.9528229236602783, 0.3219650685787201, -0.21593077480793, -1.429276466369629, 0.6652834415435791, 1.364363431930542, -0.8222671151161194, -0.7627568244934082, 0.12563902139663696, -0.927889883518219, 1.1964361667633057, 0.6034316420555115, 0.35901835560798645, 0.2785901427268982, 1.6083984375, 0.7234494686126709, -0.38576972484588623, 0.5142140984535217, 0.4683459997177124, -0.13981780409812927, -2.093266725540161, -1.081687092781067, 0.38187021017074585, -0.4754125773906708, -1.5090306997299194, 1.2971360683441162, -1.0894328355789185, -0.9955140948295593, 0.6062091588973999, 0.06011237949132919, 1.385765790939331, 0.4338339865207672, 1.6533832550048828, 2.181698799133301, 0.9014542102813721, 0.3391667902469635, 1.2463635206222534, -0.07501794397830963, -0.4135079085826874, 1.865286946296692, -0.45594140887260437, 0.46772822737693787, 1.097680687904358, -0.3471249043941498, -1.1171644926071167, -0.84577476978302, -1.1973611116409302, -0.6636627912521362, 1.220258116722107, 0.055026911199092865, -1.0703874826431274, 0.24480727314949036, 1.6066726446151733, 0.15287286043167114, -0.2042415887117386, 0.6504238247871399, 0.4202580153942108, -0.798992931842804, -0.10410724580287933, -0.8536184430122375, 0.5267447829246521, -0.12364353239536285, -0.3217950463294983, 0.32166367769241333, 0.5273076295852661, 1.282390832901001, -0.11538074910640717, 0.12285519391298294, 1.09727144241333, -1.4795984029769897, 1.5665452480316162, -0.7018610835075378, 0.26454511284828186, -2.429673194885254, 1.406009554862976, -0.8212742209434509, 1.9709917306900024, -2.598905563354492, 0.4001913070678711, -0.5293368101119995, -0.5242493152618408, 0.2528361976146698, -0.41426944732666016, 0.09667319059371948, -0.1800098568201065, -1.025019884109497, -0.012114761397242546, -0.6305838227272034, 0.5774763226509094, 1.175236701965332, 1.4311459064483643, -1.1075918674468994, -0.2906535267829895, -1.8079650402069092, -0.16971586644649506, -0.7381198406219482, 0.35623982548713684, -1.8801627159118652, -0.11117181926965714, -1.9442031383514404, -2.360278844833374, -1.433009147644043, -0.8506304621696472, 1.0830824375152588, 0.213068425655365, -0.9755762815475464, 1.152095079421997, -0.37558111548423767, -1.8428326845169067, 1.1761736869812012, -2.2514772415161133 ]
https://github.com/huggingface/datasets/issues/4524
Downloading via Apache Pipeline, client cancelled (org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException)
Hi @dan-the-meme-man, thanks for reporting. We are investigating a similar issue but with Beam+Dataflow (instead of Beam+Flink): - #4525 In order to go deeper into the root cause, we need as much information as possible: logs from the main process + logs from the workers are very informative. In the case of the issue with Beam+Dataflow, the logs from the workers report an out of memory issue.
## Describe the bug When downloading some `wikipedia` languages (in particular, I'm having a hard time with Spanish, Cebuano, and Russian) via FlinkRunner, I encounter the exception in the title. I have been playing with package versions a lot, because unfortunately, the different dependencies required by these packages seem to be incompatible in terms of versions (dill and requests, for instance). It should be noted that the following code runs for several hours without issue, executing the `load_dataset()` function, before the exception occurs. ## Steps to reproduce the bug ```python # bash commands !pip install datasets !pip install apache-beam[interactive] !pip install mwparserfromhell !pip install dill==0.3.5.1 !pip install requests==2.23.0 # imports import os from datasets import load_dataset import apache_beam as beam import mwparserfromhell from google.colab import drive import dill import requests # mount drive drive_dir = os.path.join(os.getcwd(), 'drive') drive.mount(drive_dir) # confirming the versions of these two packages are the ones that are suggested by the outputs from the bash commands print(dill.__version__) print(requests.__version__) lang = 'es' # or 'ru' or 'ceb' - these are the ones causing the issue lang_dir = os.path.join(drive_dir, 'path/to/my/folder', lang) if not os.path.exists(lang_dir): x = None x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink', split='train') x.save_to_disk(lang_dir) ``` ## Expected results Although some warnings are generally produced by this code (run in Colab Notebook), most languages I've tried have been successfully downloaded. It should simply go through without issue, but for these languages, I am continually encountering this error. ## Actual results Traceback below: ``` Exception in thread run_worker_3-1: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 234, in run for work_request in self._control_stub.Control(get_responses()): File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__ return self._next() File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "Socket closed" debug_error_string = "{"created":"@1655593643.871830638","description":"Error received from peer ipv4:127.0.0.1:44441","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Socket closed","grpc_status":14}" > Traceback (most recent call last): File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute response = task() File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda> lambda: self.create_worker().do_instruction(request), request) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction getattr(request, request_type), request.instruction_id) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle bundle_processor.process_bundle(instruction_id)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle element.data) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded self.output(decoded_value) File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles'] ERROR:apache_beam.runners.worker.sdk_worker:Error processing instruction 26. Original traceback is Traceback (most recent call last): File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute response = task() File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda> lambda: self.create_worker().do_instruction(request), request) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction getattr(request, request_type), request.instruction_id) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle bundle_processor.process_bundle(instruction_id)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle element.data) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded self.output(decoded_value) File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles'] ERROR:root:org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled ERROR:apache_beam.runners.worker.data_plane:Failed to read inputs in the data plane. Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs for elements in elements_iterator: File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__ return self._next() File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.CANCELLED details = "Multiplexer hanging up" debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}" > Exception in thread read_grpc_client_inputs: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 651, in <lambda> target=lambda: self._read_inputs(elements_iterator), File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs for elements in elements_iterator: File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__ return self._next() File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.CANCELLED details = "Multiplexer hanging up" debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}" > --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) [/tmp/ipykernel_219/3869142325.py](https://localhost:8080/#) in <module> 18 x = None 19 x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink', ---> 20 split='train') 21 x.save_to_disk(lang_dir) 3 frames [/usr/local/lib/python3.7/dist-packages/apache_beam/runners/portability/portable_runner.py](https://localhost:8080/#) in wait_until_finish(self, duration) 604 605 if self._runtime_exception: --> 606 raise self._runtime_exception 607 608 return self._state RuntimeError: Pipeline BeamApp-root-0618220708-b3b59a0e_d8efcf67-9119-4f76-b013-70de7b29b54d failed in state FAILED: org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.13 - PyArrow version: 6.0.1 - Pandas version: 1.3.5
703
67
Downloading via Apache Pipeline, client cancelled (org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException) ## Describe the bug When downloading some `wikipedia` languages (in particular, I'm having a hard time with Spanish, Cebuano, and Russian) via FlinkRunner, I encounter the exception in the title. I have been playing with package versions a lot, because unfortunately, the different dependencies required by these packages seem to be incompatible in terms of versions (dill and requests, for instance). It should be noted that the following code runs for several hours without issue, executing the `load_dataset()` function, before the exception occurs. ## Steps to reproduce the bug ```python # bash commands !pip install datasets !pip install apache-beam[interactive] !pip install mwparserfromhell !pip install dill==0.3.5.1 !pip install requests==2.23.0 # imports import os from datasets import load_dataset import apache_beam as beam import mwparserfromhell from google.colab import drive import dill import requests # mount drive drive_dir = os.path.join(os.getcwd(), 'drive') drive.mount(drive_dir) # confirming the versions of these two packages are the ones that are suggested by the outputs from the bash commands print(dill.__version__) print(requests.__version__) lang = 'es' # or 'ru' or 'ceb' - these are the ones causing the issue lang_dir = os.path.join(drive_dir, 'path/to/my/folder', lang) if not os.path.exists(lang_dir): x = None x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink', split='train') x.save_to_disk(lang_dir) ``` ## Expected results Although some warnings are generally produced by this code (run in Colab Notebook), most languages I've tried have been successfully downloaded. It should simply go through without issue, but for these languages, I am continually encountering this error. ## Actual results Traceback below: ``` Exception in thread run_worker_3-1: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 234, in run for work_request in self._control_stub.Control(get_responses()): File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__ return self._next() File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "Socket closed" debug_error_string = "{"created":"@1655593643.871830638","description":"Error received from peer ipv4:127.0.0.1:44441","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Socket closed","grpc_status":14}" > Traceback (most recent call last): File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute response = task() File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda> lambda: self.create_worker().do_instruction(request), request) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction getattr(request, request_type), request.instruction_id) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle bundle_processor.process_bundle(instruction_id)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle element.data) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded self.output(decoded_value) File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles'] ERROR:apache_beam.runners.worker.sdk_worker:Error processing instruction 26. Original traceback is Traceback (most recent call last): File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute response = task() File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda> lambda: self.create_worker().do_instruction(request), request) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction getattr(request, request_type), request.instruction_id) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle bundle_processor.process_bundle(instruction_id)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle element.data) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded self.output(decoded_value) File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles'] ERROR:root:org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled ERROR:apache_beam.runners.worker.data_plane:Failed to read inputs in the data plane. Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs for elements in elements_iterator: File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__ return self._next() File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.CANCELLED details = "Multiplexer hanging up" debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}" > Exception in thread read_grpc_client_inputs: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 651, in <lambda> target=lambda: self._read_inputs(elements_iterator), File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs for elements in elements_iterator: File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__ return self._next() File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.CANCELLED details = "Multiplexer hanging up" debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}" > --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) [/tmp/ipykernel_219/3869142325.py](https://localhost:8080/#) in <module> 18 x = None 19 x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink', ---> 20 split='train') 21 x.save_to_disk(lang_dir) 3 frames [/usr/local/lib/python3.7/dist-packages/apache_beam/runners/portability/portable_runner.py](https://localhost:8080/#) in wait_until_finish(self, duration) 604 605 if self._runtime_exception: --> 606 raise self._runtime_exception 607 608 return self._state RuntimeError: Pipeline BeamApp-root-0618220708-b3b59a0e_d8efcf67-9119-4f76-b013-70de7b29b54d failed in state FAILED: org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.13 - PyArrow version: 6.0.1 - Pandas version: 1.3.5 Hi @dan-the-meme-man, thanks for reporting. We are investigating a similar issue but with Beam+Dataflow (instead of Beam+Flink): - #4525 In order to go deeper into the root cause, we need as much information as possible: logs from the main process + logs from the workers are very informative. In the case of the issue with Beam+Dataflow, the logs from the workers report an out of memory issue.
[ -1.3111462593078613, -0.9715050458908081, -0.6723297834396362, 1.4952151775360107, -0.188728928565979, -1.2303990125656128, 0.1241818368434906, -1.010756492614746, 1.7049919366836548, -0.8022157549858093, 0.19693568348884583, -1.6019678115844727, 0.030752290040254593, -0.5857256650924683, -0.7311709523200989, -0.8177226185798645, -0.38423019647598267, -0.7766048312187195, 1.1580631732940674, 2.514240026473999, 1.2057708501815796, -1.448661208152771, 2.7670798301696777, 0.6811466217041016, -0.20159636437892914, -1.031810998916626, 0.5317480564117432, -0.09722252190113068, -1.326642632484436, -0.531007707118988, -1.020526647567749, -0.0559176541864872, -0.5788958072662354, -0.4978845417499542, -0.0082023236900568, 0.3715490698814392, -0.2648073732852936, -0.4977814555168152, -0.5137263536453247, -0.7081730961799622, 0.46467047929763794, -0.38170158863067627, 0.949474573135376, -0.19842945039272308, 1.8265091180801392, -0.5413764715194702, 0.4846717119216919, 0.7732115983963013, 1.3530385494232178, 0.21863703429698944, -0.08039337396621704, 0.46740099787712097, 0.4399310052394867, 0.05241001397371292, 0.5342231392860413, 1.139371633529663, 0.6734352111816406, 0.4026249945163727, 0.7710500359535217, -2.2942404747009277, 1.3403650522232056, -1.127203106880188, 0.3199090361595154, 1.3064675331115723, -0.9575193524360657, 0.36706873774528503, -1.7712247371673584, -0.026133673265576363, 0.5792056322097778, -2.2438886165618896, 0.309339314699173, -1.3510431051254272, -0.5105197429656982, 1.0165177583694458, 0.42854660749435425, -1.304561734199524, 0.023845933377742767, -0.48825228214263916, 1.0287176370620728, 0.46674540638923645, 0.989392101764679, -1.713754415512085, -0.0788162350654602, -0.2910026013851166, 0.16575108468532562, -1.2008240222930908, -1.535804033279419, 0.5897773504257202, 0.6854262351989746, 0.5833138823509216, -0.1460198611021042, 1.071526288986206, -1.0849162340164185, 0.78758305311203, -0.9607886075973511, -1.680980920791626, -1.45771062374115, -2.3952887058258057, -2.2448983192443848, 0.6802207231521606, -0.4468282163143158, -0.5222321152687073, 2.109097480773926, -1.0517442226409912, -1.7769337892532349, 1.194137454032898, 0.1853760927915573, -0.043704062700271606, 2.3548951148986816, 0.19880682229995728, -0.7970876693725586, 0.4603397846221924, -0.8391069173812866, 0.7875349521636963, -0.4685559868812561, 1.4153884649276733, 0.45248255133628845, -0.9599024653434753, 1.5804098844528198, -0.35449665784835815, 0.5236984491348267, -0.6506320834159851, -0.4764344394207001, -0.775529682636261, 0.32693731784820557, 1.9636993408203125, -0.2849966585636139, 1.5022903680801392, -0.41775399446487427, -1.601401686668396, -1.596688151359558, 0.9591423273086548, 0.4687941372394562, -0.7991949319839478, 0.12318617105484009, -0.4021911025047302, 0.11052951216697693, -0.06830771267414093, 1.1552449464797974, 1.3825465440750122, 0.7369819283485413, -0.36145153641700745, -0.8611209392547607, 0.1253441870212555, -0.17817777395248413, -0.6824649572372437, -1.766396164894104, -0.4022884964942932, 0.059456076472997665, 0.6532362103462219, -1.1702566146850586, 1.7575558423995972, 0.9313517212867737, 1.891666293144226, 0.9946410655975342, -0.383770614862442, 1.4841645956039429, 0.19016852974891663, 1.8807554244995117, -0.5720927119255066, 0.6124374270439148, -0.41553738713264465, -1.2016503810882568, 0.8335369825363159, -0.2642992436885834, -1.9869556427001953, -0.7728635668754578, -0.8084880113601685, -0.2695656716823578, -0.7789908051490784, 0.833534300327301, -0.36583587527275085, -1.4503105878829956, 0.2709772288799286, -0.8092979192733765, 0.20416444540023804, -1.1840842962265015, 0.3247717618942261, 0.7428624033927917, -0.5984400510787964, 0.1924862116575241, -0.2568725347518921, -1.3069173097610474, -0.5163992047309875, 0.40204280614852905, 1.8501460552215576, -0.7196800708770752, 0.9337645173072815, 0.9908636808395386, -0.6986063122749329, -0.02982846274971962, 0.37278395891189575, -0.248541459441185, 0.8303635120391846, -1.0400093793869019, -0.43092110753059387, 1.2114977836608887, -0.24369733035564423, -0.5243038535118103, 1.4711592197418213, 0.6868265271186829, -0.9483686089515686, -0.20632819831371307, -0.11675670742988586, -0.893250584602356, 0.08794088661670685, -1.596133828163147, -0.1764039546251297, 0.5231822729110718, -1.558030128479004, -0.5081838369369507, -0.2338474541902542, 1.3370704650878906, -0.03728136420249939, 1.442603588104248, -0.3785560727119446, -0.15932224690914154, -0.27952802181243896, -0.3400190472602844, 0.26078280806541443, -0.2725966274738312, -0.5155047178268433, 0.10431107878684998, -0.7832006812095642, 0.3322348892688751, 1.4981153011322021, 0.25307464599609375, -0.002559391316026449, 0.5000506639480591, 1.0914539098739624, 0.36882302165031433, -0.0825253278017044, -0.8665141463279724, -1.5818796157836914, 1.983373761177063, -1.5082762241363525, 1.9814884662628174, 0.7200983762741089, -0.013950953260064125, -1.8570786714553833, -1.851407766342163, 1.2583317756652832, 1.1399598121643066, 2.2942163944244385, 0.564799964427948, 0.4342791736125946, -0.852569043636322, -0.6837133169174194, 0.28417399525642395, -0.9718779921531677, -0.7549050450325012, 0.12904736399650574, 2.4020636081695557, 1.7760521173477173, -0.39858224987983704, -0.21826931834220886, -0.9976818561553955, 1.4910695552825928, -0.24196995794773102, 0.31993475556373596, 1.915457010269165, -0.22593936324119568, -1.0489250421524048, 1.2676057815551758, -2.3631162643432617, 0.24187621474266052, 2.0255608558654785, 0.2976178526878357, 0.10068657994270325, -1.4146769046783447, -0.5922358632087708, -0.27633073925971985, -0.3869917094707489, -1.2003923654556274, 0.5514421463012695, -0.336702823638916, -0.8350821137428284, -1.400743007659912, 0.18879035115242004, -1.1132328510284424, -1.6818495988845825, 0.17758597433567047, 1.8956842422485352, 2.0274698734283447, -0.7065562605857849, 1.6105010509490967, -0.28852930665016174, 0.2649616003036499, 1.1919922828674316, 1.1771740913391113, 3.069265127182007, 1.988686442375183, -1.2274068593978882, 0.621383011341095, -0.13259322941303253, -0.44027867913246155, 1.1388558149337769, -1.1903282403945923, 1.2788739204406738, -0.08744262158870697, -1.1865090131759644, -1.1480189561843872, 0.9908366203308105, 0.4955695867538452, -0.0029590073972940445, -0.4373367130756378, 1.2287929058074951, 0.02107849344611168, 1.2660558223724365, 0.5861716866493225, -0.3645115792751312, 0.5938385725021362, -0.4114343822002411, -0.5761575698852539, 1.470229983329773, 0.2545870244503021, -1.4247560501098633, -2.1605587005615234, -0.2468440681695938, -0.8817008137702942, 0.0839543342590332, -0.5721278190612793, -0.9793567061424255, 1.5588979721069336, 0.36697593331336975, -1.1784108877182007, -0.25647780299186707, -0.30394047498703003, -0.5106739401817322, 2.7025790214538574, -1.2036311626434326, -0.25171083211898804, -0.9414800405502319, -0.6065406203269958, 1.604270339012146, -1.3083091974258423, -0.2563416659832001, -1.0658462047576904, -0.5198482871055603, -1.2264554500579834, -0.5809295177459717, -0.06876498460769653, -0.8396609425544739, 0.8253927826881409, 0.25117796659469604, -1.1466444730758667, -0.38687920570373535, -0.8106299638748169, 0.9419884085655212, -0.08192212879657745, 0.19282186031341553, 1.8459038734436035, 0.384073406457901, -0.36026379466056824, 0.8215520977973938, 1.1322165727615356, 0.6123505234718323, -0.5227710008621216, 0.2268875241279602, -0.5870748162269592, 0.3239503800868988, -1.2659294605255127, 0.3212512135505676, -2.8858444690704346, 0.6030374765396118, -0.030529966577887535, -0.08314329385757446, -0.11145395040512085, -1.3640987873077393, 1.055734634399414, 2.4982564449310303, -1.1903505325317383, 0.49988406896591187, 0.34925591945648193, 1.2524782419204712, -1.599234938621521, 0.3239075541496277, -0.44309118390083313, 2.1528356075286865, 0.2816488444805145, 1.2035715579986572, -0.45413777232170105, -2.368299722671509, 0.547878623008728, -1.2421066761016846, -1.1280269622802734, 0.6581701636314392, -0.8119297623634338, 0.03205673396587372, -1.4126664400100708, -0.24991941452026367, -0.812295138835907, -1.2180894613265991, 0.6824502348899841, 0.14012518525123596, 0.41339436173439026, -0.5819683074951172, 0.3564838469028473, -2.0973634719848633, -1.328543782234192, -0.18670853972434998, -0.9082835912704468, 0.5327592492103577, -0.32559478282928467, 0.6713597178459167, -0.19212837517261505, 0.050835542380809784, 0.34313637018203735, 1.5631061792373657, 3.43308424949646, 0.14589935541152954, 0.3428013324737549, -0.1541229784488678, -0.9437013864517212, 1.3746646642684937, 0.9723871946334839, -0.2542688548564911, -0.6269598603248596, -1.1012482643127441, 1.26025390625, 1.9853297472000122, 0.9376292824745178, 0.02209729701280594, -0.7501692771911621, -0.8018221259117126, 0.008672639727592468, 0.12538284063339233, 0.49236011505126953, 0.8644745349884033, 0.15221603214740753, 0.06084728613495827, 1.4530302286148071, 1.187058925628662, -0.40844807028770447, 0.360928475856781, -0.8587701320648193, -0.4780772924423218, 0.4650202691555023, 0.27321842312812805, -0.11105650663375854, 0.30508628487586975, -1.0271245241165161, -0.22378508746623993, -0.3847489356994629, -0.8734243512153625, -0.6818682551383972, -0.3482300937175751, -0.29920724034309387, 1.5872973203659058, 0.22880853712558746, -0.5457236170768738, 0.001880589872598648, -0.6775481700897217, -0.16161812841892242, -1.040701985359192, 0.22428055107593536, -0.16400165855884552, -0.12514135241508484, -0.12441566586494446, 1.772131085395813, -0.92169588804245, -2.061347246170044, 0.17316578328609467, 0.20770643651485443, -0.2036764919757843, 0.24812659621238708, 1.6373381614685059, 0.5368049144744873, 1.4112541675567627, 1.3794993162155151, 0.90071040391922, -0.6098087430000305, -1.2644935846328735, 0.7411364912986755, 0.9765142798423767, -1.4155327081680298, 0.7315335869789124, -0.05020949989557266, -0.5452111959457397, 0.7142404317855835, 1.284801959991455, 0.40418681502342224, -2.0624747276306152, 0.8687853813171387, -1.0213911533355713, 0.8086612820625305, 0.6977351307868958, 0.714510977268219, 0.2208239883184433, 0.8201236724853516, -1.2353242635726929, -1.1653963327407837, -0.6918247938156128, -0.7850156426429749, 2.0252459049224854, -0.3406261205673218, 0.5225886106491089, -0.17522229254245758, -1.3365834951400757, -0.12232045829296112, 0.6267898678779602, 0.3352254331111908, -0.5033428072929382, 0.779306948184967, -0.751213550567627, -1.1771421432495117, -1.3903647661209106, -0.555362343788147, -1.0635169744491577, -0.9873036742210388, 0.9942066669464111, 0.7768588662147522, 0.30766668915748596, 1.8811410665512085, 0.6317092776298523, 0.21801890432834625, -2.5673577785491943, 0.884617030620575, 0.2954787313938141, -0.07129077613353729, 0.8322507739067078, 0.36058029532432556, 1.0354821681976318, 0.010732665657997131, 0.5466867685317993, -2.4096689224243164, 2.2813820838928223, -0.23845988512039185, 0.745573103427887, -0.08771158754825592, -0.1112932413816452, 1.0791535377502441, 0.5828525424003601, 0.5997952222824097, -1.1348849534988403, 0.6227703094482422, -0.5780794620513916, 1.238594651222229, 0.8531501889228821, -0.8392003178596497, -0.04596676304936409, 1.3995420932769775, 0.3689991533756256, -0.6182231307029724, -0.9468783736228943, -1.0541226863861084, 0.9122024774551392, 1.7468430995941162, -0.09109993278980255, -0.019195180386304855, 0.758823573589325, 0.6414182186126709, -1.2870564460754395, 0.06104259565472603, -0.7040776610374451, -0.7497524619102478, 1.6339430809020996, 2.0746939182281494, -0.18300291895866394, -0.1423417031764984, -0.7103031873703003, -1.2993358373641968, 0.726283609867096, -0.1101260632276535, 0.05416031554341316, 0.6104804873466492, -0.6278242468833923, 1.0153714418411255, 0.8365892767906189, 0.9729175567626953, 0.21952596306800842, 0.2637719511985779, 0.36184853315353394, -0.3296223282814026, -1.197702407836914, -0.31080690026283264, -1.1062507629394531, -2.6090965270996094, 0.4017474055290222, -0.1767895221710205, -1.4771429300308228, 0.15055491030216217, -0.9855976700782776, 0.9191091656684875, -0.5632474422454834, -1.1532586812973022, -1.4189363718032837, 0.1623644232749939, -0.07333238422870636, 0.876694917678833, -1.646492838859558, -0.10225263237953186, 1.2520445585250854, 0.9078654050827026, -0.5728081464767456, 1.0919201374053955, 0.33187177777290344, 1.0687156915664673, 0.8287206888198853, -0.41750335693359375, 0.5726368427276611, 0.029922738671302795, -1.3639949560165405, 0.5088332295417786, 1.2026340961456299, 0.2015291154384613, 1.4495749473571777, -0.544867217540741, -0.061102643609046936, 0.45548921823501587, -0.6228665113449097, -0.41397109627723694, -0.4696904420852661, 0.6322119235992432, -0.013123588636517525, -0.8694587349891663, -0.023631975054740906, -0.04379187151789665, -0.3398779332637787, 0.14625123143196106, -1.5301584005355835, -0.16242823004722595, -0.4122748374938965, -0.5811123251914978, -1.3120143413543701, -0.10124920308589935, 1.3992758989334106, -0.811444103717804, -0.26820865273475647, 0.5488628149032593, 0.4236585199832916, 0.5802956223487854, 0.7474255561828613, -0.6052544116973877, -0.3112473785877228, -0.23175789415836334, -0.4372684955596924, 0.3308086693286896, 1.4056614637374878, -0.1220913827419281, -0.9571337103843689, 0.6800980567932129, -0.31962254643440247, 0.07933004200458527, 1.8323317766189575, 0.07240347564220428, -0.8017436265945435, 0.30959439277648926, -0.7101278901100159, 1.990307092666626, 1.670774221420288, 1.2489320039749146, -0.19633282721042633, -0.9574615955352783, 0.6610198020935059, -0.3155902922153473, -0.35126423835754395, 0.8399079442024231, 0.438681960105896, -0.17948122322559357, -1.3336175680160522, 0.7759494185447693, 1.2026395797729492, -0.8920823335647583, -0.8255559206008911, 0.10346768796443939, -0.7221859097480774, 1.1320677995681763, 0.7182367444038391, 0.4027324914932251, 0.18541975319385529, 1.742261528968811, 0.8499862551689148, -0.5544842481613159, 0.6431093215942383, 0.5574017763137817, -0.1284846067428589, -2.152329683303833, -1.0947082042694092, 0.3158997595310211, -0.5128151178359985, -1.634077548980713, 1.3261122703552246, -1.0269960165023804, -0.9279152154922485, 0.5712563991546631, 0.12072081863880157, 1.3820728063583374, 0.3750576972961426, 1.5178008079528809, 2.101508378982544, 0.7702234983444214, 0.43637800216674805, 1.2396703958511353, -0.11745388805866241, -0.43321168422698975, 1.8406364917755127, -0.42155545949935913, 0.5523504018783569, 1.1731374263763428, -0.36987435817718506, -1.0755975246429443, -0.7161263823509216, -1.2680007219314575, -0.6286503672599792, 1.1222853660583496, 0.02132922224700451, -1.066666603088379, 0.2620407044887543, 1.5263855457305908, 0.10145142674446106, -0.3524695932865143, 0.6185577511787415, 0.38323739171028137, -0.6963571906089783, -0.13013526797294617, -0.9569458961486816, 0.4874010980129242, -0.24266384541988373, -0.3971090316772461, 0.37165647745132446, 0.3516327440738678, 1.3093452453613281, -0.09449152648448944, 0.11736682057380676, 1.1774288415908813, -1.437031865119934, 1.4381550550460815, -0.7528260350227356, 0.2724565267562866, -2.292606830596924, 1.3405765295028687, -0.7597149014472961, 1.9436150789260864, -2.7141616344451904, 0.43781301379203796, -0.5798227190971375, -0.5097418427467346, 0.33882781863212585, -0.23122479021549225, 0.05411968007683754, -0.1490841954946518, -1.123158574104309, -0.058636851608753204, -0.5888396501541138, 0.581461489200592, 1.1226816177368164, 1.358524203300476, -1.0599689483642578, -0.13653503358364105, -1.687670350074768, -0.07089422643184662, -0.8102888464927673, 0.37158188223838806, -1.9912865161895752, -0.13888703286647797, -1.9341846704483032, -2.3253064155578613, -1.257840871810913, -0.7820661067962646, 1.1416913270950317, 0.17076580226421356, -0.827367901802063, 1.2925769090652466, -0.271110862493515, -1.7994071245193481, 0.9994632005691528, -2.184622287750244 ]
https://github.com/huggingface/datasets/issues/4524
Downloading via Apache Pipeline, client cancelled (org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException)
As I continued working on this today, I came to suspect that it is in fact an out of memory issue - I have a few more notebooks that I've left running, and if they produce the same error, I will try to get the logs. In the meantime, if there's any chance that there is a repo out there with those three languages already as .arrow files, or if you know about how much memory would be needed to actually download those sets, please let me know!
## Describe the bug When downloading some `wikipedia` languages (in particular, I'm having a hard time with Spanish, Cebuano, and Russian) via FlinkRunner, I encounter the exception in the title. I have been playing with package versions a lot, because unfortunately, the different dependencies required by these packages seem to be incompatible in terms of versions (dill and requests, for instance). It should be noted that the following code runs for several hours without issue, executing the `load_dataset()` function, before the exception occurs. ## Steps to reproduce the bug ```python # bash commands !pip install datasets !pip install apache-beam[interactive] !pip install mwparserfromhell !pip install dill==0.3.5.1 !pip install requests==2.23.0 # imports import os from datasets import load_dataset import apache_beam as beam import mwparserfromhell from google.colab import drive import dill import requests # mount drive drive_dir = os.path.join(os.getcwd(), 'drive') drive.mount(drive_dir) # confirming the versions of these two packages are the ones that are suggested by the outputs from the bash commands print(dill.__version__) print(requests.__version__) lang = 'es' # or 'ru' or 'ceb' - these are the ones causing the issue lang_dir = os.path.join(drive_dir, 'path/to/my/folder', lang) if not os.path.exists(lang_dir): x = None x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink', split='train') x.save_to_disk(lang_dir) ``` ## Expected results Although some warnings are generally produced by this code (run in Colab Notebook), most languages I've tried have been successfully downloaded. It should simply go through without issue, but for these languages, I am continually encountering this error. ## Actual results Traceback below: ``` Exception in thread run_worker_3-1: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 234, in run for work_request in self._control_stub.Control(get_responses()): File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__ return self._next() File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "Socket closed" debug_error_string = "{"created":"@1655593643.871830638","description":"Error received from peer ipv4:127.0.0.1:44441","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Socket closed","grpc_status":14}" > Traceback (most recent call last): File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute response = task() File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda> lambda: self.create_worker().do_instruction(request), request) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction getattr(request, request_type), request.instruction_id) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle bundle_processor.process_bundle(instruction_id)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle element.data) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded self.output(decoded_value) File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles'] ERROR:apache_beam.runners.worker.sdk_worker:Error processing instruction 26. Original traceback is Traceback (most recent call last): File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute response = task() File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda> lambda: self.create_worker().do_instruction(request), request) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction getattr(request, request_type), request.instruction_id) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle bundle_processor.process_bundle(instruction_id)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle element.data) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded self.output(decoded_value) File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles'] ERROR:root:org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled ERROR:apache_beam.runners.worker.data_plane:Failed to read inputs in the data plane. Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs for elements in elements_iterator: File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__ return self._next() File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.CANCELLED details = "Multiplexer hanging up" debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}" > Exception in thread read_grpc_client_inputs: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 651, in <lambda> target=lambda: self._read_inputs(elements_iterator), File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs for elements in elements_iterator: File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__ return self._next() File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.CANCELLED details = "Multiplexer hanging up" debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}" > --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) [/tmp/ipykernel_219/3869142325.py](https://localhost:8080/#) in <module> 18 x = None 19 x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink', ---> 20 split='train') 21 x.save_to_disk(lang_dir) 3 frames [/usr/local/lib/python3.7/dist-packages/apache_beam/runners/portability/portable_runner.py](https://localhost:8080/#) in wait_until_finish(self, duration) 604 605 if self._runtime_exception: --> 606 raise self._runtime_exception 607 608 return self._state RuntimeError: Pipeline BeamApp-root-0618220708-b3b59a0e_d8efcf67-9119-4f76-b013-70de7b29b54d failed in state FAILED: org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.13 - PyArrow version: 6.0.1 - Pandas version: 1.3.5
703
88
Downloading via Apache Pipeline, client cancelled (org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException) ## Describe the bug When downloading some `wikipedia` languages (in particular, I'm having a hard time with Spanish, Cebuano, and Russian) via FlinkRunner, I encounter the exception in the title. I have been playing with package versions a lot, because unfortunately, the different dependencies required by these packages seem to be incompatible in terms of versions (dill and requests, for instance). It should be noted that the following code runs for several hours without issue, executing the `load_dataset()` function, before the exception occurs. ## Steps to reproduce the bug ```python # bash commands !pip install datasets !pip install apache-beam[interactive] !pip install mwparserfromhell !pip install dill==0.3.5.1 !pip install requests==2.23.0 # imports import os from datasets import load_dataset import apache_beam as beam import mwparserfromhell from google.colab import drive import dill import requests # mount drive drive_dir = os.path.join(os.getcwd(), 'drive') drive.mount(drive_dir) # confirming the versions of these two packages are the ones that are suggested by the outputs from the bash commands print(dill.__version__) print(requests.__version__) lang = 'es' # or 'ru' or 'ceb' - these are the ones causing the issue lang_dir = os.path.join(drive_dir, 'path/to/my/folder', lang) if not os.path.exists(lang_dir): x = None x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink', split='train') x.save_to_disk(lang_dir) ``` ## Expected results Although some warnings are generally produced by this code (run in Colab Notebook), most languages I've tried have been successfully downloaded. It should simply go through without issue, but for these languages, I am continually encountering this error. ## Actual results Traceback below: ``` Exception in thread run_worker_3-1: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 234, in run for work_request in self._control_stub.Control(get_responses()): File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__ return self._next() File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "Socket closed" debug_error_string = "{"created":"@1655593643.871830638","description":"Error received from peer ipv4:127.0.0.1:44441","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Socket closed","grpc_status":14}" > Traceback (most recent call last): File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute response = task() File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda> lambda: self.create_worker().do_instruction(request), request) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction getattr(request, request_type), request.instruction_id) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle bundle_processor.process_bundle(instruction_id)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle element.data) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded self.output(decoded_value) File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles'] ERROR:apache_beam.runners.worker.sdk_worker:Error processing instruction 26. Original traceback is Traceback (most recent call last): File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute response = task() File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda> lambda: self.create_worker().do_instruction(request), request) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction getattr(request, request_type), request.instruction_id) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle bundle_processor.process_bundle(instruction_id)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle element.data) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded self.output(decoded_value) File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__ self._cache[target_window] = self._side_input_data.view_fn(raw_view) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda> lambda iterable: from_runtime_iterable(iterable, view_options)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable head = list(itertools.islice(it, 2)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator self._underlying.get_raw(state_key, continuation_token)) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw continuation_token=continuation_token))) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request raise RuntimeError(response.error) RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles'] ERROR:root:org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled ERROR:apache_beam.runners.worker.data_plane:Failed to read inputs in the data plane. Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs for elements in elements_iterator: File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__ return self._next() File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.CANCELLED details = "Multiplexer hanging up" debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}" > Exception in thread read_grpc_client_inputs: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 651, in <lambda> target=lambda: self._read_inputs(elements_iterator), File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs for elements in elements_iterator: File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__ return self._next() File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.CANCELLED details = "Multiplexer hanging up" debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}" > --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) [/tmp/ipykernel_219/3869142325.py](https://localhost:8080/#) in <module> 18 x = None 19 x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink', ---> 20 split='train') 21 x.save_to_disk(lang_dir) 3 frames [/usr/local/lib/python3.7/dist-packages/apache_beam/runners/portability/portable_runner.py](https://localhost:8080/#) in wait_until_finish(self, duration) 604 605 if self._runtime_exception: --> 606 raise self._runtime_exception 607 608 return self._state RuntimeError: Pipeline BeamApp-root-0618220708-b3b59a0e_d8efcf67-9119-4f76-b013-70de7b29b54d failed in state FAILED: org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.2 - Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.13 - PyArrow version: 6.0.1 - Pandas version: 1.3.5 As I continued working on this today, I came to suspect that it is in fact an out of memory issue - I have a few more notebooks that I've left running, and if they produce the same error, I will try to get the logs. In the meantime, if there's any chance that there is a repo out there with those three languages already as .arrow files, or if you know about how much memory would be needed to actually download those sets, please let me know!
[ -1.3111462593078613, -0.9715050458908081, -0.6723297834396362, 1.4952151775360107, -0.188728928565979, -1.2303990125656128, 0.1241818368434906, -1.010756492614746, 1.7049919366836548, -0.8022157549858093, 0.19693568348884583, -1.6019678115844727, 0.030752290040254593, -0.5857256650924683, -0.7311709523200989, -0.8177226185798645, -0.38423019647598267, -0.7766048312187195, 1.1580631732940674, 2.514240026473999, 1.2057708501815796, -1.448661208152771, 2.7670798301696777, 0.6811466217041016, -0.20159636437892914, -1.031810998916626, 0.5317480564117432, -0.09722252190113068, -1.326642632484436, -0.531007707118988, -1.020526647567749, -0.0559176541864872, -0.5788958072662354, -0.4978845417499542, -0.0082023236900568, 0.3715490698814392, -0.2648073732852936, -0.4977814555168152, -0.5137263536453247, -0.7081730961799622, 0.46467047929763794, -0.38170158863067627, 0.949474573135376, -0.19842945039272308, 1.8265091180801392, -0.5413764715194702, 0.4846717119216919, 0.7732115983963013, 1.3530385494232178, 0.21863703429698944, -0.08039337396621704, 0.46740099787712097, 0.4399310052394867, 0.05241001397371292, 0.5342231392860413, 1.139371633529663, 0.6734352111816406, 0.4026249945163727, 0.7710500359535217, -2.2942404747009277, 1.3403650522232056, -1.127203106880188, 0.3199090361595154, 1.3064675331115723, -0.9575193524360657, 0.36706873774528503, -1.7712247371673584, -0.026133673265576363, 0.5792056322097778, -2.2438886165618896, 0.309339314699173, -1.3510431051254272, -0.5105197429656982, 1.0165177583694458, 0.42854660749435425, -1.304561734199524, 0.023845933377742767, -0.48825228214263916, 1.0287176370620728, 0.46674540638923645, 0.989392101764679, -1.713754415512085, -0.0788162350654602, -0.2910026013851166, 0.16575108468532562, -1.2008240222930908, -1.535804033279419, 0.5897773504257202, 0.6854262351989746, 0.5833138823509216, -0.1460198611021042, 1.071526288986206, -1.0849162340164185, 0.78758305311203, -0.9607886075973511, -1.680980920791626, -1.45771062374115, -2.3952887058258057, -2.2448983192443848, 0.6802207231521606, -0.4468282163143158, -0.5222321152687073, 2.109097480773926, -1.0517442226409912, -1.7769337892532349, 1.194137454032898, 0.1853760927915573, -0.043704062700271606, 2.3548951148986816, 0.19880682229995728, -0.7970876693725586, 0.4603397846221924, -0.8391069173812866, 0.7875349521636963, -0.4685559868812561, 1.4153884649276733, 0.45248255133628845, -0.9599024653434753, 1.5804098844528198, -0.35449665784835815, 0.5236984491348267, -0.6506320834159851, -0.4764344394207001, -0.775529682636261, 0.32693731784820557, 1.9636993408203125, -0.2849966585636139, 1.5022903680801392, -0.41775399446487427, -1.601401686668396, -1.596688151359558, 0.9591423273086548, 0.4687941372394562, -0.7991949319839478, 0.12318617105484009, -0.4021911025047302, 0.11052951216697693, -0.06830771267414093, 1.1552449464797974, 1.3825465440750122, 0.7369819283485413, -0.36145153641700745, -0.8611209392547607, 0.1253441870212555, -0.17817777395248413, -0.6824649572372437, -1.766396164894104, -0.4022884964942932, 0.059456076472997665, 0.6532362103462219, -1.1702566146850586, 1.7575558423995972, 0.9313517212867737, 1.891666293144226, 0.9946410655975342, -0.383770614862442, 1.4841645956039429, 0.19016852974891663, 1.8807554244995117, -0.5720927119255066, 0.6124374270439148, -0.41553738713264465, -1.2016503810882568, 0.8335369825363159, -0.2642992436885834, -1.9869556427001953, -0.7728635668754578, -0.8084880113601685, -0.2695656716823578, -0.7789908051490784, 0.833534300327301, -0.36583587527275085, -1.4503105878829956, 0.2709772288799286, -0.8092979192733765, 0.20416444540023804, -1.1840842962265015, 0.3247717618942261, 0.7428624033927917, -0.5984400510787964, 0.1924862116575241, -0.2568725347518921, -1.3069173097610474, -0.5163992047309875, 0.40204280614852905, 1.8501460552215576, -0.7196800708770752, 0.9337645173072815, 0.9908636808395386, -0.6986063122749329, -0.02982846274971962, 0.37278395891189575, -0.248541459441185, 0.8303635120391846, -1.0400093793869019, -0.43092110753059387, 1.2114977836608887, -0.24369733035564423, -0.5243038535118103, 1.4711592197418213, 0.6868265271186829, -0.9483686089515686, -0.20632819831371307, -0.11675670742988586, -0.893250584602356, 0.08794088661670685, -1.596133828163147, -0.1764039546251297, 0.5231822729110718, -1.558030128479004, -0.5081838369369507, -0.2338474541902542, 1.3370704650878906, -0.03728136420249939, 1.442603588104248, -0.3785560727119446, -0.15932224690914154, -0.27952802181243896, -0.3400190472602844, 0.26078280806541443, -0.2725966274738312, -0.5155047178268433, 0.10431107878684998, -0.7832006812095642, 0.3322348892688751, 1.4981153011322021, 0.25307464599609375, -0.002559391316026449, 0.5000506639480591, 1.0914539098739624, 0.36882302165031433, -0.0825253278017044, -0.8665141463279724, -1.5818796157836914, 1.983373761177063, -1.5082762241363525, 1.9814884662628174, 0.7200983762741089, -0.013950953260064125, -1.8570786714553833, -1.851407766342163, 1.2583317756652832, 1.1399598121643066, 2.2942163944244385, 0.564799964427948, 0.4342791736125946, -0.852569043636322, -0.6837133169174194, 0.28417399525642395, -0.9718779921531677, -0.7549050450325012, 0.12904736399650574, 2.4020636081695557, 1.7760521173477173, -0.39858224987983704, -0.21826931834220886, -0.9976818561553955, 1.4910695552825928, -0.24196995794773102, 0.31993475556373596, 1.915457010269165, -0.22593936324119568, -1.0489250421524048, 1.2676057815551758, -2.3631162643432617, 0.24187621474266052, 2.0255608558654785, 0.2976178526878357, 0.10068657994270325, -1.4146769046783447, -0.5922358632087708, -0.27633073925971985, -0.3869917094707489, -1.2003923654556274, 0.5514421463012695, -0.336702823638916, -0.8350821137428284, -1.400743007659912, 0.18879035115242004, -1.1132328510284424, -1.6818495988845825, 0.17758597433567047, 1.8956842422485352, 2.0274698734283447, -0.7065562605857849, 1.6105010509490967, -0.28852930665016174, 0.2649616003036499, 1.1919922828674316, 1.1771740913391113, 3.069265127182007, 1.988686442375183, -1.2274068593978882, 0.621383011341095, -0.13259322941303253, -0.44027867913246155, 1.1388558149337769, -1.1903282403945923, 1.2788739204406738, -0.08744262158870697, -1.1865090131759644, -1.1480189561843872, 0.9908366203308105, 0.4955695867538452, -0.0029590073972940445, -0.4373367130756378, 1.2287929058074951, 0.02107849344611168, 1.2660558223724365, 0.5861716866493225, -0.3645115792751312, 0.5938385725021362, -0.4114343822002411, -0.5761575698852539, 1.470229983329773, 0.2545870244503021, -1.4247560501098633, -2.1605587005615234, -0.2468440681695938, -0.8817008137702942, 0.0839543342590332, -0.5721278190612793, -0.9793567061424255, 1.5588979721069336, 0.36697593331336975, -1.1784108877182007, -0.25647780299186707, -0.30394047498703003, -0.5106739401817322, 2.7025790214538574, -1.2036311626434326, -0.25171083211898804, -0.9414800405502319, -0.6065406203269958, 1.604270339012146, -1.3083091974258423, -0.2563416659832001, -1.0658462047576904, -0.5198482871055603, -1.2264554500579834, -0.5809295177459717, -0.06876498460769653, -0.8396609425544739, 0.8253927826881409, 0.25117796659469604, -1.1466444730758667, -0.38687920570373535, -0.8106299638748169, 0.9419884085655212, -0.08192212879657745, 0.19282186031341553, 1.8459038734436035, 0.384073406457901, -0.36026379466056824, 0.8215520977973938, 1.1322165727615356, 0.6123505234718323, -0.5227710008621216, 0.2268875241279602, -0.5870748162269592, 0.3239503800868988, -1.2659294605255127, 0.3212512135505676, -2.8858444690704346, 0.6030374765396118, -0.030529966577887535, -0.08314329385757446, -0.11145395040512085, -1.3640987873077393, 1.055734634399414, 2.4982564449310303, -1.1903505325317383, 0.49988406896591187, 0.34925591945648193, 1.2524782419204712, -1.599234938621521, 0.3239075541496277, -0.44309118390083313, 2.1528356075286865, 0.2816488444805145, 1.2035715579986572, -0.45413777232170105, -2.368299722671509, 0.547878623008728, -1.2421066761016846, -1.1280269622802734, 0.6581701636314392, -0.8119297623634338, 0.03205673396587372, -1.4126664400100708, -0.24991941452026367, -0.812295138835907, -1.2180894613265991, 0.6824502348899841, 0.14012518525123596, 0.41339436173439026, -0.5819683074951172, 0.3564838469028473, -2.0973634719848633, -1.328543782234192, -0.18670853972434998, -0.9082835912704468, 0.5327592492103577, -0.32559478282928467, 0.6713597178459167, -0.19212837517261505, 0.050835542380809784, 0.34313637018203735, 1.5631061792373657, 3.43308424949646, 0.14589935541152954, 0.3428013324737549, -0.1541229784488678, -0.9437013864517212, 1.3746646642684937, 0.9723871946334839, -0.2542688548564911, -0.6269598603248596, -1.1012482643127441, 1.26025390625, 1.9853297472000122, 0.9376292824745178, 0.02209729701280594, -0.7501692771911621, -0.8018221259117126, 0.008672639727592468, 0.12538284063339233, 0.49236011505126953, 0.8644745349884033, 0.15221603214740753, 0.06084728613495827, 1.4530302286148071, 1.187058925628662, -0.40844807028770447, 0.360928475856781, -0.8587701320648193, -0.4780772924423218, 0.4650202691555023, 0.27321842312812805, -0.11105650663375854, 0.30508628487586975, -1.0271245241165161, -0.22378508746623993, -0.3847489356994629, -0.8734243512153625, -0.6818682551383972, -0.3482300937175751, -0.29920724034309387, 1.5872973203659058, 0.22880853712558746, -0.5457236170768738, 0.001880589872598648, -0.6775481700897217, -0.16161812841892242, -1.040701985359192, 0.22428055107593536, -0.16400165855884552, -0.12514135241508484, -0.12441566586494446, 1.772131085395813, -0.92169588804245, -2.061347246170044, 0.17316578328609467, 0.20770643651485443, -0.2036764919757843, 0.24812659621238708, 1.6373381614685059, 0.5368049144744873, 1.4112541675567627, 1.3794993162155151, 0.90071040391922, -0.6098087430000305, -1.2644935846328735, 0.7411364912986755, 0.9765142798423767, -1.4155327081680298, 0.7315335869789124, -0.05020949989557266, -0.5452111959457397, 0.7142404317855835, 1.284801959991455, 0.40418681502342224, -2.0624747276306152, 0.8687853813171387, -1.0213911533355713, 0.8086612820625305, 0.6977351307868958, 0.714510977268219, 0.2208239883184433, 0.8201236724853516, -1.2353242635726929, -1.1653963327407837, -0.6918247938156128, -0.7850156426429749, 2.0252459049224854, -0.3406261205673218, 0.5225886106491089, -0.17522229254245758, -1.3365834951400757, -0.12232045829296112, 0.6267898678779602, 0.3352254331111908, -0.5033428072929382, 0.779306948184967, -0.751213550567627, -1.1771421432495117, -1.3903647661209106, -0.555362343788147, -1.0635169744491577, -0.9873036742210388, 0.9942066669464111, 0.7768588662147522, 0.30766668915748596, 1.8811410665512085, 0.6317092776298523, 0.21801890432834625, -2.5673577785491943, 0.884617030620575, 0.2954787313938141, -0.07129077613353729, 0.8322507739067078, 0.36058029532432556, 1.0354821681976318, 0.010732665657997131, 0.5466867685317993, -2.4096689224243164, 2.2813820838928223, -0.23845988512039185, 0.745573103427887, -0.08771158754825592, -0.1112932413816452, 1.0791535377502441, 0.5828525424003601, 0.5997952222824097, -1.1348849534988403, 0.6227703094482422, -0.5780794620513916, 1.238594651222229, 0.8531501889228821, -0.8392003178596497, -0.04596676304936409, 1.3995420932769775, 0.3689991533756256, -0.6182231307029724, -0.9468783736228943, -1.0541226863861084, 0.9122024774551392, 1.7468430995941162, -0.09109993278980255, -0.019195180386304855, 0.758823573589325, 0.6414182186126709, -1.2870564460754395, 0.06104259565472603, -0.7040776610374451, -0.7497524619102478, 1.6339430809020996, 2.0746939182281494, -0.18300291895866394, -0.1423417031764984, -0.7103031873703003, -1.2993358373641968, 0.726283609867096, -0.1101260632276535, 0.05416031554341316, 0.6104804873466492, -0.6278242468833923, 1.0153714418411255, 0.8365892767906189, 0.9729175567626953, 0.21952596306800842, 0.2637719511985779, 0.36184853315353394, -0.3296223282814026, -1.197702407836914, -0.31080690026283264, -1.1062507629394531, -2.6090965270996094, 0.4017474055290222, -0.1767895221710205, -1.4771429300308228, 0.15055491030216217, -0.9855976700782776, 0.9191091656684875, -0.5632474422454834, -1.1532586812973022, -1.4189363718032837, 0.1623644232749939, -0.07333238422870636, 0.876694917678833, -1.646492838859558, -0.10225263237953186, 1.2520445585250854, 0.9078654050827026, -0.5728081464767456, 1.0919201374053955, 0.33187177777290344, 1.0687156915664673, 0.8287206888198853, -0.41750335693359375, 0.5726368427276611, 0.029922738671302795, -1.3639949560165405, 0.5088332295417786, 1.2026340961456299, 0.2015291154384613, 1.4495749473571777, -0.544867217540741, -0.061102643609046936, 0.45548921823501587, -0.6228665113449097, -0.41397109627723694, -0.4696904420852661, 0.6322119235992432, -0.013123588636517525, -0.8694587349891663, -0.023631975054740906, -0.04379187151789665, -0.3398779332637787, 0.14625123143196106, -1.5301584005355835, -0.16242823004722595, -0.4122748374938965, -0.5811123251914978, -1.3120143413543701, -0.10124920308589935, 1.3992758989334106, -0.811444103717804, -0.26820865273475647, 0.5488628149032593, 0.4236585199832916, 0.5802956223487854, 0.7474255561828613, -0.6052544116973877, -0.3112473785877228, -0.23175789415836334, -0.4372684955596924, 0.3308086693286896, 1.4056614637374878, -0.1220913827419281, -0.9571337103843689, 0.6800980567932129, -0.31962254643440247, 0.07933004200458527, 1.8323317766189575, 0.07240347564220428, -0.8017436265945435, 0.30959439277648926, -0.7101278901100159, 1.990307092666626, 1.670774221420288, 1.2489320039749146, -0.19633282721042633, -0.9574615955352783, 0.6610198020935059, -0.3155902922153473, -0.35126423835754395, 0.8399079442024231, 0.438681960105896, -0.17948122322559357, -1.3336175680160522, 0.7759494185447693, 1.2026395797729492, -0.8920823335647583, -0.8255559206008911, 0.10346768796443939, -0.7221859097480774, 1.1320677995681763, 0.7182367444038391, 0.4027324914932251, 0.18541975319385529, 1.742261528968811, 0.8499862551689148, -0.5544842481613159, 0.6431093215942383, 0.5574017763137817, -0.1284846067428589, -2.152329683303833, -1.0947082042694092, 0.3158997595310211, -0.5128151178359985, -1.634077548980713, 1.3261122703552246, -1.0269960165023804, -0.9279152154922485, 0.5712563991546631, 0.12072081863880157, 1.3820728063583374, 0.3750576972961426, 1.5178008079528809, 2.101508378982544, 0.7702234983444214, 0.43637800216674805, 1.2396703958511353, -0.11745388805866241, -0.43321168422698975, 1.8406364917755127, -0.42155545949935913, 0.5523504018783569, 1.1731374263763428, -0.36987435817718506, -1.0755975246429443, -0.7161263823509216, -1.2680007219314575, -0.6286503672599792, 1.1222853660583496, 0.02132922224700451, -1.066666603088379, 0.2620407044887543, 1.5263855457305908, 0.10145142674446106, -0.3524695932865143, 0.6185577511787415, 0.38323739171028137, -0.6963571906089783, -0.13013526797294617, -0.9569458961486816, 0.4874010980129242, -0.24266384541988373, -0.3971090316772461, 0.37165647745132446, 0.3516327440738678, 1.3093452453613281, -0.09449152648448944, 0.11736682057380676, 1.1774288415908813, -1.437031865119934, 1.4381550550460815, -0.7528260350227356, 0.2724565267562866, -2.292606830596924, 1.3405765295028687, -0.7597149014472961, 1.9436150789260864, -2.7141616344451904, 0.43781301379203796, -0.5798227190971375, -0.5097418427467346, 0.33882781863212585, -0.23122479021549225, 0.05411968007683754, -0.1490841954946518, -1.123158574104309, -0.058636851608753204, -0.5888396501541138, 0.581461489200592, 1.1226816177368164, 1.358524203300476, -1.0599689483642578, -0.13653503358364105, -1.687670350074768, -0.07089422643184662, -0.8102888464927673, 0.37158188223838806, -1.9912865161895752, -0.13888703286647797, -1.9341846704483032, -2.3253064155578613, -1.257840871810913, -0.7820661067962646, 1.1416913270950317, 0.17076580226421356, -0.827367901802063, 1.2925769090652466, -0.271110862493515, -1.7994071245193481, 0.9994632005691528, -2.184622287750244 ]
https://github.com/huggingface/datasets/issues/4521
Datasets method `.map` not hashing
Didn't realize it's a bug when I asked the question yesterday! Free free to post an answer if you are sure the cause has been addressed. https://stackoverflow.com/questions/72664827/can-pickle-dill-foo-but-not-lambda-x-foox
## Describe the bug Datasets method `.map` not hashing, even with an empty no-op function ## Steps to reproduce the bug ```python from datasets import load_dataset # download 9MB dummy dataset ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean") def prepare_dataset(batch): return(batch) ds = ds.map( prepare_dataset, num_proc=1, desc="preprocess train dataset", ) ``` ## Expected results Hashed and cached dataset preprocessing ## Actual results Does not hash properly: ``` Parameter 'function'=<function prepare_dataset at 0x7fccb68e9280> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed. ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.3.dev0 - Platform: Linux-5.11.0-1028-gcp-x86_64-with-glibc2.31 - Python version: 3.9.12 - PyArrow version: 8.0.0 - Pandas version: 1.4.2 cc @lhoestq
704
27
Datasets method `.map` not hashing ## Describe the bug Datasets method `.map` not hashing, even with an empty no-op function ## Steps to reproduce the bug ```python from datasets import load_dataset # download 9MB dummy dataset ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean") def prepare_dataset(batch): return(batch) ds = ds.map( prepare_dataset, num_proc=1, desc="preprocess train dataset", ) ``` ## Expected results Hashed and cached dataset preprocessing ## Actual results Does not hash properly: ``` Parameter 'function'=<function prepare_dataset at 0x7fccb68e9280> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed. ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.3.dev0 - Platform: Linux-5.11.0-1028-gcp-x86_64-with-glibc2.31 - Python version: 3.9.12 - PyArrow version: 8.0.0 - Pandas version: 1.4.2 cc @lhoestq Didn't realize it's a bug when I asked the question yesterday! Free free to post an answer if you are sure the cause has been addressed. https://stackoverflow.com/questions/72664827/can-pickle-dill-foo-but-not-lambda-x-foox
[ -1.190222978591919, -0.9170105457305908, -0.648162305355072, 1.3918263912200928, -0.15394257009029388, -1.1945016384124756, 0.09265869855880737, -1.011254072189331, 1.6929264068603516, -0.8352518081665039, 0.2345816045999527, -1.6664340496063232, 0.04891478642821312, -0.5356560349464417, -0.7190489768981934, -0.8082379698753357, -0.3830057680606842, -0.7491008043289185, 1.0904364585876465, 2.448204517364502, 1.135967493057251, -1.3887817859649658, 2.6771576404571533, 0.651664674282074, -0.23642997443675995, -0.930276095867157, 0.5050733685493469, 0.0049749501049518585, -1.3979144096374512, -0.3478957712650299, -0.9188831448554993, -0.035119108855724335, -0.6030541062355042, -0.547579824924469, 0.0031097987666726112, 0.39442846179008484, -0.2869853675365448, -0.46281957626342773, -0.4640522301197052, -0.7903569340705872, 0.47792622447013855, -0.32438015937805176, 0.870317816734314, -0.3494420647621155, 1.789365530014038, -0.5433793663978577, 0.501136839389801, 0.7013382911682129, 1.2276687622070312, 0.24140873551368713, 0.013551728799939156, 0.3437880873680115, 0.3488531708717346, 0.019014034420251846, 0.49309974908828735, 1.1926977634429932, 0.6350737810134888, 0.4463263154029846, 0.7280629277229309, -2.234781503677368, 1.3499372005462646, -0.897782564163208, 0.29773443937301636, 1.3026518821716309, -1.018395185470581, 0.3461383581161499, -1.7710049152374268, -0.09483897686004639, 0.5113768577575684, -2.224083185195923, 0.24423828721046448, -1.3151075839996338, -0.4930316209793091, 1.0878028869628906, 0.37516167759895325, -1.193716049194336, 0.07229255884885788, -0.3843648135662079, 1.0224533081054688, 0.4366316795349121, 1.1662559509277344, -1.6620323657989502, -0.033241525292396545, -0.2766461670398712, 0.14847169816493988, -1.2937018871307373, -1.5306882858276367, 0.49681246280670166, 0.6909271478652954, 0.587112545967102, -0.1457853466272354, 1.004807710647583, -1.0187747478485107, 0.7259880304336548, -1.0017273426055908, -1.7839665412902832, -1.3426756858825684, -2.3571743965148926, -2.343592405319214, 0.7805492877960205, -0.38775140047073364, -0.49967288970947266, 2.083441734313965, -1.0712385177612305, -1.7905144691467285, 1.1091535091400146, 0.27093377709388733, -0.036848343908786774, 2.3020379543304443, 0.2682507336139679, -0.8046363592147827, 0.5566748380661011, -0.7890774011611938, 0.7375873327255249, -0.3344188332557678, 1.3210368156433105, 0.40774866938591003, -1.0590877532958984, 1.5471956729888916, -0.3844684958457947, 0.5590103268623352, -0.6759418845176697, -0.485467791557312, -0.6779733300209045, 0.25922614336013794, 1.9033737182617188, -0.28425076603889465, 1.5589654445648193, -0.29659557342529297, -1.5844299793243408, -1.5377798080444336, 0.7875332236289978, 0.5191380977630615, -0.6931974291801453, 0.10519599169492722, -0.3945583999156952, 0.08481281995773315, -0.011738345958292484, 1.1260039806365967, 1.2940471172332764, 0.7801313996315002, -0.33969542384147644, -0.939759373664856, 0.19249020516872406, -0.0646880567073822, -0.6574276089668274, -1.7904229164123535, -0.27563849091529846, 0.12133105099201202, 0.6352975368499756, -1.2568178176879883, 1.7286477088928223, 0.9209545850753784, 1.9405484199523926, 1.0106267929077148, -0.34903934597969055, 1.4969656467437744, 0.15209130942821503, 1.8819189071655273, -0.37229859828948975, 0.6633776426315308, -0.3112640082836151, -1.1141045093536377, 0.7756925225257874, -0.3241150677204132, -2.0108022689819336, -0.6109570860862732, -0.8809004426002502, -0.16107362508773804, -0.8492836952209473, 0.9586419463157654, -0.2158133089542389, -1.4748282432556152, 0.2558157444000244, -0.7513456344604492, 0.16588684916496277, -1.2197551727294922, 0.2991844117641449, 0.7803739309310913, -0.6619563102722168, 0.06226244568824768, -0.3185425400733948, -1.319108009338379, -0.47505712509155273, 0.3694170415401459, 1.7705419063568115, -0.7687537670135498, 0.9931953549385071, 1.0792169570922852, -0.6588303446769714, 0.0013063754886388779, 0.37750616669654846, -0.30521783232688904, 0.8686689734458923, -1.0596568584442139, -0.35122978687286377, 1.148911714553833, -0.2363070845603943, -0.5709750056266785, 1.4251651763916016, 0.6969286203384399, -1.0325896739959717, -0.17344292998313904, -0.11831771582365036, -0.8055893778800964, -0.045249663293361664, -1.6691884994506836, -0.14748619496822357, 0.3277553915977478, -1.5911626815795898, -0.5131170749664307, -0.16692839562892914, 1.3008105754852295, -0.10883880406618118, 1.3645198345184326, -0.3092258870601654, -0.1260266751050949, -0.4782024919986725, -0.4065195918083191, 0.14308668673038483, -0.13654597103595734, -0.6194012761116028, 0.30129531025886536, -0.8580000400543213, 0.27217820286750793, 1.4530742168426514, 0.33689913153648376, -0.007281292229890823, 0.599596381187439, 1.0755867958068848, 0.37799566984176636, -0.12217360734939575, -0.790733814239502, -1.6461586952209473, 2.0450315475463867, -1.4938721656799316, 1.9711217880249023, 0.7515407800674438, -0.08169391751289368, -1.8395960330963135, -1.9481620788574219, 1.4145832061767578, 1.0833232402801514, 2.422389507293701, 0.5365747809410095, 0.4637095630168915, -0.7896757125854492, -0.6740566492080688, 0.442777156829834, -0.9389826655387878, -0.7890104651451111, 0.14437328279018402, 2.3660778999328613, 1.69838285446167, -0.354809045791626, -0.1470632553100586, -1.0099689960479736, 1.3528459072113037, -0.12215463072061539, 0.2596089839935303, 1.9367461204528809, -0.2611449956893921, -1.0737698078155518, 1.3440189361572266, -2.35554575920105, 0.23643021285533905, 2.0032427310943604, 0.23105862736701965, 0.0649312362074852, -1.3226354122161865, -0.657157301902771, -0.24387390911579132, -0.40653589367866516, -1.2384755611419678, 0.4926844835281372, -0.22702264785766602, -0.7974836230278015, -1.446721076965332, 0.14471542835235596, -1.11265230178833, -1.6957592964172363, 0.3290257751941681, 1.8839125633239746, 2.059891939163208, -0.7498588562011719, 1.5127756595611572, -0.2807832360267639, 0.19546152651309967, 1.1776432991027832, 1.1616077423095703, 3.1922922134399414, 1.878262996673584, -1.3575129508972168, 0.6808311343193054, -0.06456998735666275, -0.4515402913093567, 1.163722276687622, -1.1805684566497803, 1.2682204246520996, -0.22484780848026276, -1.2106029987335205, -1.2617332935333252, 0.937882661819458, 0.4798431396484375, 0.05385619401931763, -0.4714694619178772, 1.2097067832946777, 0.06628639996051788, 1.357020378112793, 0.5576777458190918, -0.32375913858413696, 0.6191039681434631, -0.3846744894981384, -0.516348123550415, 1.5550658702850342, 0.16942816972732544, -1.4396066665649414, -2.2252984046936035, -0.24584001302719116, -0.909385621547699, 0.002272374927997589, -0.6325624585151672, -0.9552786350250244, 1.5548324584960938, 0.4524746537208557, -1.164806604385376, -0.29693350195884705, -0.34896302223205566, -0.605934739112854, 2.666189193725586, -1.4314944744110107, -0.18986977636814117, -0.987228274345398, -0.5987569689750671, 1.5676641464233398, -1.2256019115447998, -0.26970022916793823, -1.0578486919403076, -0.5854998230934143, -1.2562909126281738, -0.5192935466766357, -0.01026128325611353, -0.9518421292304993, 0.837652325630188, 0.1315445601940155, -1.2024223804473877, -0.2656073570251465, -0.956454336643219, 0.9132952690124512, -0.14922764897346497, 0.11054625362157822, 1.7594096660614014, 0.38217002153396606, -0.39097926020622253, 0.7400040030479431, 1.178163766860962, 0.6570120453834534, -0.6579307317733765, 0.24502232670783997, -0.6978797912597656, 0.3600633144378662, -1.300347089767456, 0.27615466713905334, -2.9135525226593018, 0.6398006677627563, -0.05633049085736275, -0.0018764594569802284, -0.08326569199562073, -1.3393912315368652, 1.0784213542938232, 2.5274600982666016, -1.1915969848632812, 0.5706286430358887, 0.3323695659637451, 1.151655912399292, -1.56254243850708, 0.24983325600624084, -0.5270029306411743, 2.1297507286071777, 0.18642844259738922, 1.2050986289978027, -0.4799564480781555, -2.314535617828369, 0.6586754322052002, -1.2540411949157715, -1.0946733951568604, 0.7826735377311707, -0.839233934879303, 0.10945949703454971, -1.3097350597381592, -0.2004988193511963, -0.8041218519210815, -1.2267816066741943, 0.5980061888694763, 0.13417059183120728, 0.504755973815918, -0.5973508954048157, 0.3493483364582062, -2.259767770767212, -1.3343846797943115, -0.24380522966384888, -0.9763794541358948, 0.4230204224586487, -0.39087170362472534, 0.7317150235176086, -0.2403218299150467, -0.013173077255487442, 0.3257237374782562, 1.329395055770874, 3.334240198135376, 0.18265341222286224, 0.33123689889907837, -0.18318182229995728, -1.004364013671875, 1.4658584594726562, 0.9291751980781555, -0.16834914684295654, -0.5765246748924255, -1.0751245021820068, 1.2073402404785156, 1.9648215770721436, 1.056335687637329, 0.0024017710238695145, -0.8191483020782471, -0.7712042927742004, 0.0975349098443985, 0.1564425230026245, 0.48621368408203125, 0.9214627146720886, 0.09985467791557312, 0.15537407994270325, 1.4885737895965576, 1.1236369609832764, -0.304665207862854, 0.3669879734516144, -0.8005974888801575, -0.4697152376174927, 0.5496850609779358, 0.3944111466407776, 0.022095192223787308, 0.2692522406578064, -1.0686218738555908, -0.2026509791612625, -0.32138219475746155, -0.9382842183113098, -0.7063062787055969, -0.3867434859275818, -0.3402983546257019, 1.680006742477417, 0.03782359138131142, -0.49743443727493286, -0.10884809494018555, -0.7820374965667725, -0.055650290101766586, -1.0390536785125732, 0.3733973801136017, -0.11695227771997452, -0.04328704997897148, -0.11828514188528061, 1.697056531906128, -0.9402977824211121, -2.093735456466675, 0.24015137553215027, 0.217051699757576, -0.3978390097618103, 0.08484967797994614, 1.738929271697998, 0.6020574569702148, 1.4079976081848145, 1.4192004203796387, 0.9913404583930969, -0.646930456161499, -1.2884631156921387, 0.6654431819915771, 0.96366286277771, -1.3666048049926758, 0.7254891395568848, -0.007793940603733063, -0.6102795600891113, 0.6343013048171997, 1.336177110671997, 0.4995158910751343, -1.9811220169067383, 0.8047078251838684, -0.9937741756439209, 0.7656906247138977, 0.7621362209320068, 0.8180962204933167, 0.11285579204559326, 0.8436650037765503, -1.2940187454223633, -1.0570862293243408, -0.6365158557891846, -0.6400478482246399, 1.9364497661590576, -0.24120038747787476, 0.4621129631996155, -0.22047626972198486, -1.3427128791809082, -0.03435228765010834, 0.6746242642402649, 0.28311192989349365, -0.4863601624965668, 0.7132696509361267, -0.664540708065033, -1.0582764148712158, -1.3847379684448242, -0.4410598874092102, -1.0078109502792358, -0.8792943358421326, 1.0159907341003418, 0.7623352408409119, 0.3679180443286896, 1.8845717906951904, 0.6605551838874817, 0.2735319435596466, -2.656327486038208, 0.884149432182312, 0.3340897858142853, -0.0887012854218483, 0.8539797067642212, 0.2959938943386078, 1.072723150253296, -0.08187662810087204, 0.5985711216926575, -2.4002609252929688, 2.2624897956848145, -0.28964656591415405, 0.7440236210823059, 0.012939438223838806, -0.05788579210639, 1.1254005432128906, 0.6320290565490723, 0.5909306406974792, -1.1255271434783936, 0.8334150910377502, -0.6513779759407043, 1.2073805332183838, 0.8697268962860107, -0.8465310335159302, -0.011183220893144608, 1.2949810028076172, 0.3831002712249756, -0.5453887581825256, -0.9044650197029114, -1.0236737728118896, 0.9357355833053589, 1.7800614833831787, -0.077728271484375, 0.05172717571258545, 0.8695113658905029, 0.6987524032592773, -1.351132869720459, 0.020602727308869362, -0.7127476334571838, -0.7006626129150391, 1.7116718292236328, 2.016733407974243, -0.05747472494840622, -0.15050506591796875, -0.7317081689834595, -1.2570905685424805, 0.8330076932907104, 0.026047270745038986, 0.08207382261753082, 0.7141368389129639, -0.603112518787384, 1.1397178173065186, 0.882046639919281, 0.8957985639572144, 0.18417981266975403, 0.18073174357414246, 0.3172217607498169, -0.24379636347293854, -1.168858289718628, -0.23555783927440643, -1.0158801078796387, -2.538405179977417, 0.4319400489330292, -0.20683136582374573, -1.4291810989379883, 0.029364418238401413, -0.980793297290802, 0.8767192363739014, -0.5599772334098816, -1.126528024673462, -1.4854953289031982, 0.1839214414358139, -0.1001368910074234, 0.8664791584014893, -1.5667898654937744, -0.14389872550964355, 1.262223482131958, 0.9217676520347595, -0.6651090383529663, 1.0563504695892334, 0.23300395905971527, 0.9950000643730164, 0.8945807218551636, -0.40122658014297485, 0.5169432759284973, 0.1686890870332718, -1.3127448558807373, 0.4061989188194275, 1.2635138034820557, 0.19338561594486237, 1.4417684078216553, -0.6305615305900574, 0.0065694693475961685, 0.3925917446613312, -0.45196259021759033, -0.48599880933761597, -0.616674542427063, 0.697269082069397, -0.015539592131972313, -0.8942368030548096, -0.029343515634536743, -0.056717999279499054, -0.15403448045253754, 0.18982723355293274, -1.5069115161895752, -0.14075808227062225, -0.3772965371608734, -0.6550233960151672, -1.239900827407837, -0.07769390195608139, 1.4157347679138184, -0.8168265223503113, -0.17273521423339844, 0.4819273352622986, 0.3071919083595276, 0.5440335273742676, 0.6889721751213074, -0.6783652305603027, -0.3176833987236023, -0.22001685202121735, -0.33185750246047974, 0.36410197615623474, 1.3759794235229492, -0.0583714134991169, -0.9891014099121094, 0.6583191156387329, -0.3626702129840851, 0.11757372319698334, 1.9378831386566162, 0.06628654897212982, -0.8447335958480835, 0.31971868872642517, -0.7650936245918274, 1.9161765575408936, 1.7263813018798828, 1.402642011642456, -0.0691763311624527, -1.0146961212158203, 0.6092796325683594, -0.30917659401893616, -0.42245304584503174, 0.9722959399223328, 0.46584466099739075, -0.26908907294273376, -1.3350965976715088, 0.7062730193138123, 1.1909196376800537, -0.8725292682647705, -0.8211816549301147, 0.09079714864492416, -0.7838373780250549, 1.1225461959838867, 0.7129600048065186, 0.40064361691474915, 0.26110196113586426, 1.631744384765625, 0.7231099605560303, -0.5377345681190491, 0.552713930606842, 0.4713875353336334, -0.15668465197086334, -2.034956932067871, -1.0969507694244385, 0.3839835524559021, -0.5182960629463196, -1.5632047653198242, 1.4715149402618408, -1.1864707469940186, -0.9399232268333435, 0.5297142267227173, 0.07140599191188812, 1.4022605419158936, 0.3459184169769287, 1.654961109161377, 2.124162435531616, 0.9099466800689697, 0.4132772386074066, 1.2832765579223633, -0.26171231269836426, -0.4161226153373718, 1.7223379611968994, -0.507868766784668, 0.5210220217704773, 1.1002247333526611, -0.36954110860824585, -1.0451202392578125, -0.8057925701141357, -1.2332937717437744, -0.6975513100624084, 1.0636680126190186, 0.10472080856561661, -1.170961618423462, 0.294636994600296, 1.5692734718322754, 0.10738198459148407, -0.22566600143909454, 0.6864076256752014, 0.4047609567642212, -0.7935764789581299, -0.12130996584892273, -1.0017096996307373, 0.5473595261573792, -0.27758610248565674, -0.3664604425430298, 0.2310323566198349, 0.43545499444007874, 1.3012895584106445, -0.008787103928625584, 0.10042501986026764, 1.2928602695465088, -1.4110398292541504, 1.4213013648986816, -0.7707046270370483, 0.31402140855789185, -2.3491382598876953, 1.3929738998413086, -0.8369264602661133, 1.917581558227539, -2.6853678226470947, 0.47323861718177795, -0.5351390242576599, -0.48897823691368103, 0.2925547957420349, -0.2908592224121094, 0.15175220370292664, -0.14583159983158112, -1.1794700622558594, -0.15195252001285553, -0.7607979774475098, 0.5709213614463806, 1.2125942707061768, 1.299018144607544, -1.1088266372680664, -0.28686147928237915, -1.690535306930542, -0.22275590896606445, -0.6788778901100159, 0.3465788662433624, -1.878114938735962, -0.18736977875232697, -1.9246020317077637, -2.466533899307251, -1.2888894081115723, -0.8907179236412048, 1.186004400253296, 0.09699873626232147, -0.9514925479888916, 1.1481082439422607, -0.41458263993263245, -1.8615295886993408, 1.148285150527954, -2.2129175662994385 ]
https://github.com/huggingface/datasets/issues/4520
Failure to hash `dataclasses` - results in functions that cannot be hashed or cached in `.map`
I think this has been fixed by #4516, let me know if you encounter this again :) I re-ran your code in 3.7 and 3.9 and it works fine
Dataclasses cannot be hashed. As a result, they cannot be hashed or cached if used in the `.map` method. Dataclasses are used extensively in Transformers examples scripts: (c.f. [CTC example](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_ctc.py)). Since dataclasses cannot be hashed, one has to define separate variables prior to passing dataclass attributes to the `.map` method: ```python phoneme_language = data_args.phoneme_language ``` in the example https://github.com/huggingface/transformers/blob/3c7e56fbb11f401de2528c1dcf0e282febc031cd/examples/pytorch/speech-recognition/run_speech_recognition_ctc.py#L603-L630 ## Steps to reproduce the bug ```python from dataclasses import dataclass, field from datasets.fingerprint import Hasher @dataclass class DataTrainingArguments: """ Arguments pertaining to what data we are going to input our model for training and eval. """ phoneme_language: str = field( default=None, metadata={"help": "The name of the phoneme language to use."} ) data_args = DataTrainingArguments(phoneme_language ="foo") Hasher.hash(data_args) phoneme_language = data_args.phoneme_language Hasher.hash(phoneme_language) ``` ## Expected results A hash. ## Actual results <details> <summary> Traceback </summary> ``` --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Input In [1], in <cell line: 16>() 10 phoneme_language: str = field( 11 default=None, metadata={"help": "The name of the phoneme language to use."} 12 ) 14 data_args = DataTrainingArguments(phoneme_language ="foo") ---> 16 Hasher.hash(data_args) 18 phoneme_language = data_args. phoneme_language 20 Hasher.hash(phoneme_language) File ~/datasets/src/datasets/fingerprint.py:237, in Hasher.hash(cls, value) 235 return cls.dispatch[type(value)](cls, value) 236 else: --> 237 return cls.hash_default(value) File ~/datasets/src/datasets/fingerprint.py:230, in Hasher.hash_default(cls, value) 228 @classmethod 229 def hash_default(cls, value: Any) -> str: --> 230 return cls.hash_bytes(dumps(value)) File ~/datasets/src/datasets/utils/py_utils.py:564, in dumps(obj) 562 file = StringIO() 563 with _no_cache_fields(obj): --> 564 dump(obj, file) 565 return file.getvalue() File ~/datasets/src/datasets/utils/py_utils.py:539, in dump(obj, file) 537 def dump(obj, file): 538 """pickle an object to a file""" --> 539 Pickler(file, recurse=True).dump(obj) 540 return File ~/hf/lib/python3.8/site-packages/dill/_dill.py:620, in Pickler.dump(self, obj) 618 raise PicklingError(msg) 619 else: --> 620 StockPickler.dump(self, obj) 621 return File /usr/lib/python3.8/pickle.py:487, in _Pickler.dump(self, obj) 485 if self.proto >= 4: 486 self.framer.start_framing() --> 487 self.save(obj) 488 self.write(STOP) 489 self.framer.end_framing() File /usr/lib/python3.8/pickle.py:603, in _Pickler.save(self, obj, save_persistent_id) 599 raise PicklingError("Tuple returned by %s must have " 600 "two to six elements" % reduce) 602 # Save the reduce() output and finally memoize the object --> 603 self.save_reduce(obj=obj, *rv) File /usr/lib/python3.8/pickle.py:687, in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj) 684 raise PicklingError( 685 "args[0] from __newobj__ args has the wrong class") 686 args = args[1:] --> 687 save(cls) 688 save(args) 689 write(NEWOBJ) File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id) 558 f = self.dispatch.get(t) 559 if f is not None: --> 560 f(self, obj) # Call unbound method with explicit self 561 return 563 # Check private dispatch table if any, or else 564 # copyreg.dispatch_table File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1838, in save_type(pickler, obj, postproc_list) 1836 postproc_list = [] 1837 postproc_list.append((setattr, (obj, '__qualname__', obj_name))) -> 1838 _save_with_postproc(pickler, (_create_type, ( 1839 type(obj), obj.__name__, obj.__bases__, _dict 1840 )), obj=obj, postproc_list=postproc_list) 1841 log.info("# %s" % _t) 1842 else: File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1140, in _save_with_postproc(pickler, reduction, is_pickler_dill, obj, postproc_list) 1137 pickler._postproc[id(obj)] = postproc_list 1139 # TODO: Use state_setter in Python 3.8 to allow for faster cPickle implementations -> 1140 pickler.save_reduce(*reduction, obj=obj) 1142 if is_pickler_dill: 1143 # pickler.x -= 1 1144 # print(pickler.x*' ', 'pop', obj, id(obj)) 1145 postproc = pickler._postproc.pop(id(obj)) File /usr/lib/python3.8/pickle.py:692, in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj) 690 else: 691 save(func) --> 692 save(args) 693 write(REDUCE) 695 if obj is not None: 696 # If the object is already in the memo, this means it is 697 # recursive. In this case, throw away everything we put on the 698 # stack, and fetch the object back from the memo. File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id) 558 f = self.dispatch.get(t) 559 if f is not None: --> 560 f(self, obj) # Call unbound method with explicit self 561 return 563 # Check private dispatch table if any, or else 564 # copyreg.dispatch_table File /usr/lib/python3.8/pickle.py:901, in _Pickler.save_tuple(self, obj) 899 write(MARK) 900 for element in obj: --> 901 save(element) 903 if id(obj) in memo: 904 # Subtle. d was not in memo when we entered save_tuple(), so 905 # the process of saving the tuple's elements must have saved (...) 909 # could have been done in the "for element" loop instead, but 910 # recursive tuples are a rare thing. 911 get = self.get(memo[id(obj)][0]) File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id) 558 f = self.dispatch.get(t) 559 if f is not None: --> 560 f(self, obj) # Call unbound method with explicit self 561 return 563 # Check private dispatch table if any, or else 564 # copyreg.dispatch_table File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1251, in save_module_dict(pickler, obj) 1248 if is_dill(pickler, child=False) and pickler._session: 1249 # we only care about session the first pass thru 1250 pickler._first_pass = False -> 1251 StockPickler.save_dict(pickler, obj) 1252 log.info("# D2") 1253 return File /usr/lib/python3.8/pickle.py:971, in _Pickler.save_dict(self, obj) 968 self.write(MARK + DICT) 970 self.memoize(obj) --> 971 self._batch_setitems(obj.items()) File /usr/lib/python3.8/pickle.py:997, in _Pickler._batch_setitems(self, items) 995 for k, v in tmp: 996 save(k) --> 997 save(v) 998 write(SETITEMS) 999 elif n: File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id) 558 f = self.dispatch.get(t) 559 if f is not None: --> 560 f(self, obj) # Call unbound method with explicit self 561 return 563 # Check private dispatch table if any, or else 564 # copyreg.dispatch_table File ~/datasets/src/datasets/utils/py_utils.py:862, in save_function(pickler, obj) 859 if state_dict: 860 state = state, state_dict --> 862 dill._dill._save_with_postproc( 863 pickler, 864 ( 865 dill._dill._create_function, 866 (obj.__code__, globs, obj.__name__, obj.__defaults__, closure), 867 state, 868 ), 869 obj=obj, 870 postproc_list=postproc_list, 871 ) 872 else: 873 closure = obj.func_closure File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1153, in _save_with_postproc(pickler, reduction, is_pickler_dill, obj, postproc_list) 1151 dest, source = reduction[1] 1152 if source: -> 1153 pickler.write(pickler.get(pickler.memo[id(dest)][0])) 1154 pickler._batch_setitems(iter(source.items())) 1155 else: 1156 # Updating with an empty dictionary. Same as doing nothing. KeyError: 140434581781568 ``` </details> ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.3.dev0 - Platform: Linux-5.11.0-1028-gcp-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 8.0.0 - Pandas version: 1.4.2 cc @lhoestq
705
29
Failure to hash `dataclasses` - results in functions that cannot be hashed or cached in `.map` Dataclasses cannot be hashed. As a result, they cannot be hashed or cached if used in the `.map` method. Dataclasses are used extensively in Transformers examples scripts: (c.f. [CTC example](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_ctc.py)). Since dataclasses cannot be hashed, one has to define separate variables prior to passing dataclass attributes to the `.map` method: ```python phoneme_language = data_args.phoneme_language ``` in the example https://github.com/huggingface/transformers/blob/3c7e56fbb11f401de2528c1dcf0e282febc031cd/examples/pytorch/speech-recognition/run_speech_recognition_ctc.py#L603-L630 ## Steps to reproduce the bug ```python from dataclasses import dataclass, field from datasets.fingerprint import Hasher @dataclass class DataTrainingArguments: """ Arguments pertaining to what data we are going to input our model for training and eval. """ phoneme_language: str = field( default=None, metadata={"help": "The name of the phoneme language to use."} ) data_args = DataTrainingArguments(phoneme_language ="foo") Hasher.hash(data_args) phoneme_language = data_args.phoneme_language Hasher.hash(phoneme_language) ``` ## Expected results A hash. ## Actual results <details> <summary> Traceback </summary> ``` --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Input In [1], in <cell line: 16>() 10 phoneme_language: str = field( 11 default=None, metadata={"help": "The name of the phoneme language to use."} 12 ) 14 data_args = DataTrainingArguments(phoneme_language ="foo") ---> 16 Hasher.hash(data_args) 18 phoneme_language = data_args. phoneme_language 20 Hasher.hash(phoneme_language) File ~/datasets/src/datasets/fingerprint.py:237, in Hasher.hash(cls, value) 235 return cls.dispatch[type(value)](cls, value) 236 else: --> 237 return cls.hash_default(value) File ~/datasets/src/datasets/fingerprint.py:230, in Hasher.hash_default(cls, value) 228 @classmethod 229 def hash_default(cls, value: Any) -> str: --> 230 return cls.hash_bytes(dumps(value)) File ~/datasets/src/datasets/utils/py_utils.py:564, in dumps(obj) 562 file = StringIO() 563 with _no_cache_fields(obj): --> 564 dump(obj, file) 565 return file.getvalue() File ~/datasets/src/datasets/utils/py_utils.py:539, in dump(obj, file) 537 def dump(obj, file): 538 """pickle an object to a file""" --> 539 Pickler(file, recurse=True).dump(obj) 540 return File ~/hf/lib/python3.8/site-packages/dill/_dill.py:620, in Pickler.dump(self, obj) 618 raise PicklingError(msg) 619 else: --> 620 StockPickler.dump(self, obj) 621 return File /usr/lib/python3.8/pickle.py:487, in _Pickler.dump(self, obj) 485 if self.proto >= 4: 486 self.framer.start_framing() --> 487 self.save(obj) 488 self.write(STOP) 489 self.framer.end_framing() File /usr/lib/python3.8/pickle.py:603, in _Pickler.save(self, obj, save_persistent_id) 599 raise PicklingError("Tuple returned by %s must have " 600 "two to six elements" % reduce) 602 # Save the reduce() output and finally memoize the object --> 603 self.save_reduce(obj=obj, *rv) File /usr/lib/python3.8/pickle.py:687, in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj) 684 raise PicklingError( 685 "args[0] from __newobj__ args has the wrong class") 686 args = args[1:] --> 687 save(cls) 688 save(args) 689 write(NEWOBJ) File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id) 558 f = self.dispatch.get(t) 559 if f is not None: --> 560 f(self, obj) # Call unbound method with explicit self 561 return 563 # Check private dispatch table if any, or else 564 # copyreg.dispatch_table File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1838, in save_type(pickler, obj, postproc_list) 1836 postproc_list = [] 1837 postproc_list.append((setattr, (obj, '__qualname__', obj_name))) -> 1838 _save_with_postproc(pickler, (_create_type, ( 1839 type(obj), obj.__name__, obj.__bases__, _dict 1840 )), obj=obj, postproc_list=postproc_list) 1841 log.info("# %s" % _t) 1842 else: File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1140, in _save_with_postproc(pickler, reduction, is_pickler_dill, obj, postproc_list) 1137 pickler._postproc[id(obj)] = postproc_list 1139 # TODO: Use state_setter in Python 3.8 to allow for faster cPickle implementations -> 1140 pickler.save_reduce(*reduction, obj=obj) 1142 if is_pickler_dill: 1143 # pickler.x -= 1 1144 # print(pickler.x*' ', 'pop', obj, id(obj)) 1145 postproc = pickler._postproc.pop(id(obj)) File /usr/lib/python3.8/pickle.py:692, in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj) 690 else: 691 save(func) --> 692 save(args) 693 write(REDUCE) 695 if obj is not None: 696 # If the object is already in the memo, this means it is 697 # recursive. In this case, throw away everything we put on the 698 # stack, and fetch the object back from the memo. File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id) 558 f = self.dispatch.get(t) 559 if f is not None: --> 560 f(self, obj) # Call unbound method with explicit self 561 return 563 # Check private dispatch table if any, or else 564 # copyreg.dispatch_table File /usr/lib/python3.8/pickle.py:901, in _Pickler.save_tuple(self, obj) 899 write(MARK) 900 for element in obj: --> 901 save(element) 903 if id(obj) in memo: 904 # Subtle. d was not in memo when we entered save_tuple(), so 905 # the process of saving the tuple's elements must have saved (...) 909 # could have been done in the "for element" loop instead, but 910 # recursive tuples are a rare thing. 911 get = self.get(memo[id(obj)][0]) File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id) 558 f = self.dispatch.get(t) 559 if f is not None: --> 560 f(self, obj) # Call unbound method with explicit self 561 return 563 # Check private dispatch table if any, or else 564 # copyreg.dispatch_table File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1251, in save_module_dict(pickler, obj) 1248 if is_dill(pickler, child=False) and pickler._session: 1249 # we only care about session the first pass thru 1250 pickler._first_pass = False -> 1251 StockPickler.save_dict(pickler, obj) 1252 log.info("# D2") 1253 return File /usr/lib/python3.8/pickle.py:971, in _Pickler.save_dict(self, obj) 968 self.write(MARK + DICT) 970 self.memoize(obj) --> 971 self._batch_setitems(obj.items()) File /usr/lib/python3.8/pickle.py:997, in _Pickler._batch_setitems(self, items) 995 for k, v in tmp: 996 save(k) --> 997 save(v) 998 write(SETITEMS) 999 elif n: File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id) 558 f = self.dispatch.get(t) 559 if f is not None: --> 560 f(self, obj) # Call unbound method with explicit self 561 return 563 # Check private dispatch table if any, or else 564 # copyreg.dispatch_table File ~/datasets/src/datasets/utils/py_utils.py:862, in save_function(pickler, obj) 859 if state_dict: 860 state = state, state_dict --> 862 dill._dill._save_with_postproc( 863 pickler, 864 ( 865 dill._dill._create_function, 866 (obj.__code__, globs, obj.__name__, obj.__defaults__, closure), 867 state, 868 ), 869 obj=obj, 870 postproc_list=postproc_list, 871 ) 872 else: 873 closure = obj.func_closure File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1153, in _save_with_postproc(pickler, reduction, is_pickler_dill, obj, postproc_list) 1151 dest, source = reduction[1] 1152 if source: -> 1153 pickler.write(pickler.get(pickler.memo[id(dest)][0])) 1154 pickler._batch_setitems(iter(source.items())) 1155 else: 1156 # Updating with an empty dictionary. Same as doing nothing. KeyError: 140434581781568 ``` </details> ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 2.3.3.dev0 - Platform: Linux-5.11.0-1028-gcp-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 8.0.0 - Pandas version: 1.4.2 cc @lhoestq I think this has been fixed by #4516, let me know if you encounter this again :) I re-ran your code in 3.7 and 3.9 and it works fine
[ -1.115237832069397, -0.8034270405769348, -0.5559799671173096, 1.4692596197128296, 0.03310147672891617, -1.3377530574798584, 0.10613244026899338, -0.9012338519096375, 1.6227947473526, -0.8178752064704895, 0.36331498622894287, -1.6427061557769775, 0.021834440529346466, -0.5526559352874756, -0.7022373676300049, -0.6677385568618774, -0.35093963146209717, -0.6597728133201599, 1.1507054567337036, 2.4134278297424316, 1.2236770391464233, -1.2651987075805664, 2.752124071121216, 0.6290358304977417, -0.27109983563423157, -0.8668606281280518, 0.3869977295398712, 0.08167146891355515, -1.439397931098938, -0.34336617588996887, -0.9827643632888794, -0.060122981667518616, -0.6329336762428284, -0.5065386295318604, 0.048467639833688736, 0.5114699602127075, -0.1948079913854599, -0.4970846474170685, -0.44473984837532043, -0.8007804155349731, 0.5415900349617004, -0.3244384527206421, 0.8184356689453125, -0.3238619565963745, 1.7800403833389282, -0.6257790923118591, 0.5686712265014648, 0.5532151460647583, 1.2445495128631592, 0.2595856487751007, -0.0017654849216341972, 0.3408106565475464, 0.3124859035015106, -0.01595371775329113, 0.6258440613746643, 1.2204129695892334, 0.704685389995575, 0.46573197841644287, 0.7172470688819885, -2.1705596446990967, 1.3132708072662354, -0.7689240574836731, 0.22328995168209076, 1.296473503112793, -1.072478175163269, 0.4429495930671692, -1.7929822206497192, -0.1864471286535263, 0.4400542974472046, -2.2472355365753174, 0.1271492838859558, -1.2766704559326172, -0.5084149241447449, 1.0535889863967896, 0.26864227652549744, -1.2773891687393188, -0.08066262304782867, -0.378034383058548, 1.0043916702270508, 0.3729103207588196, 1.0639127492904663, -1.6207951307296753, -0.0047397306188941, -0.2514737546443939, 0.22508476674556732, -1.159827709197998, -1.6169564723968506, 0.4926457405090332, 0.6491852402687073, 0.6138250231742859, -0.12264440953731537, 0.9082775712013245, -1.1034852266311646, 0.8306506276130676, -0.9926394820213318, -1.8404269218444824, -1.2946853637695312, -2.355719566345215, -2.357374906539917, 0.8037384748458862, -0.37619277834892273, -0.3932749629020691, 2.1502349376678467, -1.1378992795944214, -1.733516812324524, 0.9874938726425171, 0.2428235113620758, -0.05033610761165619, 2.3239970207214355, 0.20520254969596863, -0.8749353885650635, 0.7079359292984009, -0.8314881324768066, 0.6127625107765198, -0.4301319718360901, 1.316369652748108, 0.39746150374412537, -1.1537566184997559, 1.5819852352142334, -0.3351579010486603, 0.49193090200424194, -0.8492926359176636, -0.37415972352027893, -0.5014338493347168, 0.18189838528633118, 1.9453493356704712, -0.2057223618030548, 1.5195873975753784, -0.1472950130701065, -1.4789005517959595, -1.3878480195999146, 0.7351000905036926, 0.47011470794677734, -0.8213315010070801, 0.20395712554454803, -0.4606119990348816, 0.13883037865161896, 0.09192579984664917, 1.0704816579818726, 1.3173898458480835, 0.8572736382484436, -0.2018776386976242, -0.8946778774261475, 0.07598425447940826, -0.04675763472914696, -0.5326798558235168, -1.764553427696228, -0.2925359010696411, 0.16413845121860504, 0.5972423553466797, -1.2356349229812622, 1.9207805395126343, 0.8531984090805054, 2.0226876735687256, 1.0207592248916626, -0.40358665585517883, 1.561160683631897, 0.0582292266190052, 1.9260270595550537, -0.28092920780181885, 0.7070544362068176, -0.4374889135360718, -1.214088797569275, 0.7074413895606995, -0.34364521503448486, -1.967647671699524, -0.4709416627883911, -0.8353886008262634, -0.12409013509750366, -0.8929849863052368, 0.9933241605758667, -0.14374135434627533, -1.3814573287963867, 0.23138678073883057, -0.7162373065948486, 0.1924101561307907, -1.281935453414917, 0.3722122609615326, 0.7406395673751831, -0.6913314461708069, 0.0692555159330368, -0.41970518231391907, -1.4078006744384766, -0.6884576678276062, 0.44712716341018677, 1.7664639949798584, -0.7291313409805298, 0.9498322010040283, 1.0104626417160034, -0.6501702070236206, -0.05936544016003609, 0.44267722964286804, -0.41811203956604004, 0.9201329946517944, -1.0919978618621826, -0.3944031000137329, 1.1431264877319336, -0.32005104422569275, -0.5655434131622314, 1.3780899047851562, 0.771318793296814, -1.0341711044311523, -0.26122811436653137, -0.0973174050450325, -0.8179532289505005, 0.1363348811864853, -1.6694092750549316, -0.14515313506126404, 0.37807008624076843, -1.508213996887207, -0.44639852643013, -0.034277934581041336, 1.4050542116165161, -0.09560181945562363, 1.373318076133728, -0.19967608153820038, -0.14507395029067993, -0.5514537692070007, -0.5208619236946106, 0.13955821096897125, -0.08736804127693176, -0.6553237438201904, 0.33643510937690735, -0.7373632192611694, 0.22859835624694824, 1.4134700298309326, 0.25662940740585327, 0.04025404155254364, 0.5495170950889587, 1.2327156066894531, 0.3357430696487427, -0.19082386791706085, -0.8390080332756042, -1.7281378507614136, 1.9947184324264526, -1.5691745281219482, 1.9896992444992065, 0.8566668629646301, -0.009627297520637512, -1.7456945180892944, -1.9301812648773193, 1.4131726026535034, 1.084317922592163, 2.5320913791656494, 0.5308071970939636, 0.4593662917613983, -0.7973678112030029, -0.6539468169212341, 0.4777907729148865, -0.8078780174255371, -0.9500203728675842, 0.17976203560829163, 2.3463079929351807, 1.6465414762496948, -0.2923644781112671, -0.21417662501335144, -0.9623823761940002, 1.3034180402755737, -0.20569784939289093, 0.27139028906822205, 1.8973016738891602, -0.3309442698955536, -1.0554773807525635, 1.2449010610580444, -2.422447919845581, 0.28603053092956543, 2.0918567180633545, 0.20712533593177795, 0.027099769562482834, -1.1880111694335938, -0.6660860776901245, -0.1877514272928238, -0.377282053232193, -1.1527096033096313, 0.47411999106407166, -0.1669255495071411, -0.8536620736122131, -1.4183846712112427, 0.03547364100813866, -1.1831300258636475, -1.7221590280532837, 0.33379513025283813, 1.8185399770736694, 2.128959894180298, -0.7766263484954834, 1.3644050359725952, -0.27284523844718933, 0.2787178158760071, 1.1544047594070435, 1.2311475276947021, 3.288970708847046, 1.9565454721450806, -1.2789629697799683, 0.6757316589355469, -0.2073344737291336, -0.5433615446090698, 1.2105016708374023, -1.0762616395950317, 1.2486649751663208, -0.2677258849143982, -1.328343152999878, -1.311885118484497, 0.9608882069587708, 0.448367714881897, -0.022263500839471817, -0.4974105954170227, 1.082298755645752, 0.24026712775230408, 1.4353219270706177, 0.6027917265892029, -0.21028098464012146, 0.5643691420555115, -0.33875489234924316, -0.4723663330078125, 1.5700777769088745, 0.10175462067127228, -1.4630740880966187, -2.3658788204193115, -0.1293371468782425, -1.0302300453186035, 0.011100231669843197, -0.8482431173324585, -1.0456172227859497, 1.5190609693527222, 0.5059401988983154, -0.9920709729194641, -0.16114811599254608, -0.27090612053871155, -0.6304582357406616, 2.676044464111328, -1.3586204051971436, -0.23662544786930084, -0.9537239670753479, -0.6151760816574097, 1.558668613433838, -1.2019844055175781, -0.26994794607162476, -1.044789433479309, -0.44806724786758423, -1.1941797733306885, -0.4101434350013733, -0.015774749219417572, -0.8663252592086792, 0.7263883948326111, 0.026325471699237823, -1.2516120672225952, -0.2541253864765167, -1.0864442586898804, 0.811869740486145, -0.23551546037197113, 0.02982652559876442, 1.7354328632354736, 0.3487977981567383, -0.3941665291786194, 0.8060073852539062, 1.1965458393096924, 0.6101030707359314, -0.4828164279460907, 0.24820765852928162, -0.6896438598632812, 0.42872655391693115, -1.2420706748962402, 0.3464179039001465, -2.8945093154907227, 0.6761212944984436, 0.011535138823091984, -0.053221069276332855, -0.08880633115768433, -1.429140567779541, 0.9927986860275269, 2.43007493019104, -1.1245129108428955, 0.5963577032089233, 0.3022380769252777, 1.169232964515686, -1.5720325708389282, 0.09271393716335297, -0.6029548048973083, 2.0724287033081055, 0.006680370308458805, 1.1950823068618774, -0.5392588973045349, -2.352898597717285, 0.6126880645751953, -1.241117000579834, -1.0559312105178833, 0.76482093334198, -0.8801231384277344, 0.10273666679859161, -1.159866213798523, -0.17968490719795227, -0.8987231254577637, -1.1983592510223389, 0.45280492305755615, 0.009206251241266727, 0.6143953204154968, -0.6614797115325928, 0.30672675371170044, -2.263838291168213, -1.36332106590271, -0.24422334134578705, -0.9268278479576111, 0.4100104570388794, -0.3977362811565399, 0.6732243895530701, -0.20021115243434906, 0.05140744149684906, 0.22731947898864746, 1.4849700927734375, 3.2309587001800537, 0.14219743013381958, 0.31404006481170654, -0.30674275755882263, -1.0479011535644531, 1.5279401540756226, 0.8160519599914551, -0.22402766346931458, -0.6603994965553284, -0.9674808979034424, 1.282278299331665, 1.920042634010315, 1.106157898902893, 0.06528853625059128, -0.9165909290313721, -0.7821519374847412, 0.06168442592024803, 0.18019065260887146, 0.43617215752601624, 1.0171887874603271, 0.14380322396755219, 0.12410565465688705, 1.322930097579956, 1.149242877960205, -0.31675150990486145, 0.4209209680557251, -0.8696471452713013, -0.3801945149898529, 0.4687822461128235, 0.397254079580307, -0.003625128883868456, 0.2053467333316803, -0.9982128739356995, -0.17685534060001373, -0.3427804112434387, -0.9176416397094727, -0.7721824645996094, -0.389430969953537, -0.39780086278915405, 1.704864501953125, -0.07459259778261185, -0.5182562470436096, -0.04279174283146858, -0.7990943789482117, 0.041238028556108475, -0.9813763499259949, 0.31448107957839966, -0.06901649385690689, 0.009697520174086094, -0.1174318715929985, 1.6821496486663818, -1.0287643671035767, -2.1934893131256104, 0.26359283924102783, 0.20581546425819397, -0.3971111476421356, -0.02793840691447258, 1.7911983728408813, 0.5665919184684753, 1.3850162029266357, 1.5875900983810425, 1.080363392829895, -0.6069589853286743, -1.2868114709854126, 0.7217614054679871, 0.9801848530769348, -1.3790769577026367, 0.8402877449989319, -0.14555267989635468, -0.5557147264480591, 0.48594197630882263, 1.2647387981414795, 0.47801774740219116, -1.9465423822402954, 0.8004895448684692, -1.0666624307632446, 0.8805510997772217, 0.8287113904953003, 0.7913344502449036, 0.12076131254434586, 0.8425794243812561, -1.2487293481826782, -0.9775480628013611, -0.5057037472724915, -0.6646310091018677, 1.8787025213241577, -0.29830029606819153, 0.3967374861240387, -0.2299298495054245, -1.2976254224777222, 0.12223359197378159, 0.6692469716072083, 0.33506184816360474, -0.4357649087905884, 0.6964771747589111, -0.6049840450286865, -1.0769816637039185, -1.2948611974716187, -0.45962706208229065, -1.0292692184448242, -0.8592128157615662, 0.982803463935852, 0.7104775309562683, 0.4841654598712921, 1.9770736694335938, 0.6703742146492004, 0.26718831062316895, -2.7030558586120605, 0.8728829622268677, 0.42617523670196533, -0.1596478670835495, 0.8280423283576965, 0.27787935733795166, 1.2227200269699097, -0.1993476003408432, 0.5270169377326965, -2.396977663040161, 2.2429606914520264, -0.19918008148670197, 0.6792773604393005, -0.018230454996228218, 0.06072160229086876, 1.0436736345291138, 0.5238520503044128, 0.568018913269043, -1.0627092123031616, 0.9481204152107239, -0.6551998853683472, 1.2290685176849365, 0.7963640689849854, -0.8891472220420837, 0.06811520457267761, 1.2530673742294312, 0.35616445541381836, -0.5500105619430542, -0.9730004668235779, -0.88919997215271, 0.9007192254066467, 1.7854928970336914, 0.030976351350545883, 0.06145820394158363, 0.8307105302810669, 0.7263924479484558, -1.3439644575119019, -0.03603667393326759, -0.6437199711799622, -0.7032305002212524, 1.7470861673355103, 2.05124831199646, -0.03409450128674507, -0.16069373488426208, -0.7838048934936523, -1.4002999067306519, 0.8626676201820374, 0.0746365636587143, -0.016666272655129433, 0.771044909954071, -0.5965268611907959, 1.1799814701080322, 0.8159864544868469, 0.877447783946991, 0.1898113340139389, 0.11068344861268997, 0.3190443217754364, -0.28176766633987427, -1.273650884628296, -0.29238495230674744, -1.014407992362976, -2.631291389465332, 0.3697730600833893, -0.2727363407611847, -1.4151172637939453, 0.08448290079832077, -0.9455419778823853, 0.7234526872634888, -0.5340815782546997, -1.2244313955307007, -1.3819143772125244, 0.19422368705272675, -0.15042395889759064, 0.7909958362579346, -1.650748372077942, -0.12258949130773544, 1.1254332065582275, 1.0141687393188477, -0.6607508659362793, 0.8944262862205505, 0.2636726200580597, 0.9352924227714539, 0.9365848898887634, -0.41096001863479614, 0.41438353061676025, 0.18306989967823029, -1.3911067247390747, 0.3747524619102478, 1.3602231740951538, 0.1309509128332138, 1.3385826349258423, -0.5674622654914856, -0.037943948060274124, 0.3911137282848358, -0.21885693073272705, -0.604310929775238, -0.6716749668121338, 0.7284097671508789, -0.01904742419719696, -0.9338375329971313, -0.03861427679657936, 0.009462461806833744, -0.09195873141288757, 0.2489127814769745, -1.519819736480713, -0.059375274926424026, -0.3778863847255707, -0.7042237520217896, -1.324398398399353, -0.03633212298154831, 1.2479733228683472, -0.8613200783729553, -0.062053132802248, 0.5089807510375977, 0.14556515216827393, 0.5343320369720459, 0.5695810317993164, -0.7394890189170837, -0.30318355560302734, -0.13006608188152313, -0.40206602215766907, 0.4441783130168915, 1.320249080657959, -0.01642967388033867, -0.8879597187042236, 0.5106639266014099, -0.2570713460445404, 0.2622348964214325, 1.9935039281845093, 0.08278347551822662, -0.8981803059577942, 0.3298676908016205, -0.803310215473175, 1.8675410747528076, 1.6264634132385254, 1.354711651802063, -0.11126143485307693, -0.9951156377792358, 0.6299284100532532, -0.3204270303249359, -0.4118368625640869, 0.8772789835929871, 0.3973391354084015, -0.18319781124591827, -1.3080182075500488, 0.7427977919578552, 1.212483286857605, -0.8052750825881958, -0.8217889070510864, 0.15653949975967407, -0.8401674032211304, 1.222228765487671, 0.6757461428642273, 0.3551945686340332, 0.2521708905696869, 1.6188534498214722, 0.7614823579788208, -0.5263561010360718, 0.49244850873947144, 0.41451507806777954, -0.18076005578041077, -1.999959111213684, -1.1189719438552856, 0.3156585395336151, -0.4909535348415375, -1.529062271118164, 1.494465708732605, -1.337842345237732, -0.9932974576950073, 0.5579861998558044, 0.15923210978507996, 1.4105185270309448, 0.3019268214702606, 1.779625415802002, 2.057985544204712, 0.8715010285377502, 0.4999690651893616, 1.122100591659546, -0.20155677199363708, -0.3028658628463745, 1.6842589378356934, -0.560965359210968, 0.6414161920547485, 1.0348615646362305, -0.4068485498428345, -1.1898449659347534, -0.8679370284080505, -1.178457498550415, -0.7833240032196045, 1.059739589691162, 0.13989070057868958, -1.103469729423523, 0.40064677596092224, 1.6259299516677856, -0.0003662221133708954, -0.13950245082378387, 0.6818490028381348, 0.325583279132843, -0.6755372881889343, -0.08425338566303253, -1.0116534233093262, 0.6571611166000366, -0.3008749783039093, -0.3372294008731842, 0.20688080787658691, 0.5146885514259338, 1.2357484102249146, 0.1591995507478714, 0.08677337318658829, 1.2876229286193848, -1.4287079572677612, 1.2853971719741821, -0.917799174785614, 0.328288197517395, -2.2631072998046875, 1.538036823272705, -0.9799882173538208, 1.8892462253570557, -2.707909107208252, 0.4960300326347351, -0.40472760796546936, -0.5307398438453674, 0.16457225382328033, -0.17844408750534058, 0.06604057550430298, -0.08707142621278763, -1.1115487813949585, -0.19204816222190857, -0.8180426359176636, 0.544459342956543, 1.2493622303009033, 1.3375813961029053, -0.9955911040306091, -0.332992285490036, -1.6818841695785522, -0.16363336145877838, -0.45448240637779236, 0.20909307897090912, -1.794037938117981, -0.2040395885705948, -2.0573620796203613, -2.4244742393493652, -1.2915611267089844, -0.9670186042785645, 1.2967373132705688, 0.12521156668663025, -0.8867626786231995, 1.0807695388793945, -0.41060465574264526, -1.8120002746582031, 1.230823040008545, -2.2093944549560547 ]
https://github.com/huggingface/datasets/issues/4508
cast_storage method from datasets.features
Hi! We've recently added a check to the `ClassLabel` type to ensure the values are in the valid label range `-1, 0, ..., num_classes-1` (-1 is used for missing values). The error in your case happens only if the `labels` column is of type `Sequence(ClassLabel(...))` before the `map` call and can be avoided by calling `dataset = dataset.cast_column("labels", Sequence(Value("int")))` beforehand. The token-classification examples in Transformers introduce a new `labels` column, so their type is also `Sequence(Value("int"))`, which doesn't lead to an error as this type unbounded.
## Describe the bug A bug occurs when mapping a function to a dataset object. I ran the same code with the same data yesterday and it worked just fine. It works when i run locally on an old version of datasets. ## Steps to reproduce the bug Steps are: - load whatever datset - write a preprocessing function such as "tokenize_and_align_labels" written in https://huggingface.co/docs/transformers/tasks/token_classification - map the function on dataset and get "ValueError: Class label -100 less than -1" from cast_storage method from datasets.features # Sample code to reproduce the bug def tokenize_and_align_labels(examples): tokenized_inputs = tokenizer(examples["tokens"], truncation=True, is_split_into_words=True, max_length=38,padding="max_length") labels = [] for i, label in enumerate(examples[f"labels"]): word_ids = tokenized_inputs.word_ids(batch_index=i) # Map tokens to their respective word. previous_word_idx = None label_ids = [] for word_idx in word_ids: # Set the special tokens to -100. if word_idx is None: label_ids.append(-100) elif word_idx != previous_word_idx: # Only label the first token of a given word. label_ids.append(label[word_idx]) else: label_ids.append(-100) previous_word_idx = word_idx labels.append(label_ids) tokenized_inputs["labels"] = labels return tokenized_inputs tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased") dt = dataset.map(tokenize_and_align_labels, batched=True) ## Expected results New dataset objects should load and do on older versions. ## Actual results "ValueError: Class label -100 less than -1" from cast_storage method from datasets.features ## Environment info everything works fine on older installations of datasets/transformers Issue arises when installing datasets on google collab under python3.7 I can't manage to find the exact output you're requirering but version printed is datasets-2.3.2
707
86
cast_storage method from datasets.features ## Describe the bug A bug occurs when mapping a function to a dataset object. I ran the same code with the same data yesterday and it worked just fine. It works when i run locally on an old version of datasets. ## Steps to reproduce the bug Steps are: - load whatever datset - write a preprocessing function such as "tokenize_and_align_labels" written in https://huggingface.co/docs/transformers/tasks/token_classification - map the function on dataset and get "ValueError: Class label -100 less than -1" from cast_storage method from datasets.features # Sample code to reproduce the bug def tokenize_and_align_labels(examples): tokenized_inputs = tokenizer(examples["tokens"], truncation=True, is_split_into_words=True, max_length=38,padding="max_length") labels = [] for i, label in enumerate(examples[f"labels"]): word_ids = tokenized_inputs.word_ids(batch_index=i) # Map tokens to their respective word. previous_word_idx = None label_ids = [] for word_idx in word_ids: # Set the special tokens to -100. if word_idx is None: label_ids.append(-100) elif word_idx != previous_word_idx: # Only label the first token of a given word. label_ids.append(label[word_idx]) else: label_ids.append(-100) previous_word_idx = word_idx labels.append(label_ids) tokenized_inputs["labels"] = labels return tokenized_inputs tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased") dt = dataset.map(tokenize_and_align_labels, batched=True) ## Expected results New dataset objects should load and do on older versions. ## Actual results "ValueError: Class label -100 less than -1" from cast_storage method from datasets.features ## Environment info everything works fine on older installations of datasets/transformers Issue arises when installing datasets on google collab under python3.7 I can't manage to find the exact output you're requirering but version printed is datasets-2.3.2 Hi! We've recently added a check to the `ClassLabel` type to ensure the values are in the valid label range `-1, 0, ..., num_classes-1` (-1 is used for missing values). The error in your case happens only if the `labels` column is of type `Sequence(ClassLabel(...))` before the `map` call and can be avoided by calling `dataset = dataset.cast_column("labels", Sequence(Value("int")))` beforehand. The token-classification examples in Transformers introduce a new `labels` column, so their type is also `Sequence(Value("int"))`, which doesn't lead to an error as this type unbounded.
[ -1.2265558242797852, -1.0050125122070312, -0.6771555542945862, 1.537290334701538, -0.07739172875881195, -1.2159518003463745, 0.1895642727613449, -1.1284466981887817, 1.620404839515686, -0.899160623550415, 0.24085941910743713, -1.6417099237442017, 0.016191864386200905, -0.571190357208252, -0.6523657441139221, -0.8688096404075623, -0.30880290269851685, -0.7337445616722107, 1.1166518926620483, 2.4439303874969482, 1.1785203218460083, -1.3796199560165405, 2.808971643447876, 0.7769787907600403, -0.18672265112400055, -1.0179842710494995, 0.5071828365325928, 0.031157372519373894, -1.366402268409729, -0.378924161195755, -0.9361704587936401, 0.016990438103675842, -0.5285550951957703, -0.383969783782959, 0.02704778127372265, 0.4509637653827667, -0.33808135986328125, -0.46089407801628113, -0.5478403568267822, -0.7844642996788025, 0.4759189784526825, -0.3211643397808075, 0.9120017290115356, -0.3117309510707855, 1.89541494846344, -0.5818337798118591, 0.4717022478580475, 0.6718584299087524, 1.324006199836731, 0.286506325006485, -0.027723392471671104, 0.21878796815872192, 0.29033908247947693, 0.03377426415681839, 0.5057706236839294, 1.1704312562942505, 0.6128003597259521, 0.5466490983963013, 0.693834662437439, -2.1421408653259277, 1.3336493968963623, -0.9916712045669556, 0.3536897301673889, 1.3767262697219849, -0.9566169381141663, 0.4085000157356262, -1.7064622640609741, -0.06017132103443146, 0.6600028276443481, -2.2295308113098145, 0.34936583042144775, -1.2797666788101196, -0.5246434211730957, 1.0470949411392212, 0.3686029016971588, -1.1241081953048706, 0.09472854435443878, -0.5838569402694702, 1.1225152015686035, 0.44691792130470276, 0.9627097249031067, -1.6018633842468262, -0.05934823304414749, -0.1538517326116562, 0.09078508615493774, -1.3234890699386597, -1.5763351917266846, 0.5559719204902649, 0.6407178640365601, 0.5527276992797852, -0.10320570319890976, 1.0752208232879639, -1.0181114673614502, 0.7699018120765686, -0.9685612916946411, -1.6570969820022583, -1.389029622077942, -2.2772040367126465, -2.197164535522461, 0.6783722043037415, -0.44476279616355896, -0.5784317851066589, 2.0097336769104004, -0.9905981421470642, -1.6435314416885376, 1.1617902517318726, 0.1965281367301941, 0.08561532944440842, 2.4188120365142822, 0.20408760011196136, -0.7800605893135071, 0.4714091718196869, -0.7496680021286011, 0.6593373417854309, -0.44284671545028687, 1.3375818729400635, 0.39086049795150757, -0.9832907319068909, 1.4902377128601074, -0.40593722462654114, 0.5932693481445312, -0.7402682900428772, -0.49152156710624695, -0.8104756474494934, 0.2207430750131607, 1.8685319423675537, -0.2858288586139679, 1.5821454524993896, -0.25900131464004517, -1.50784432888031, -1.614715337753296, 0.8378921747207642, 0.43580880761146545, -0.7848032712936401, 0.10336678475141525, -0.5442758202552795, 0.13938376307487488, -0.04649428278207779, 1.2202852964401245, 1.337052583694458, 0.6849159598350525, -0.3358134627342224, -0.7701748609542847, 0.1720290333032608, -0.12887315452098846, -0.6909384727478027, -1.8050199747085571, -0.3104586601257324, 0.18049676716327667, 0.6234899163246155, -1.1726579666137695, 1.6507664918899536, 0.8978722095489502, 1.84228515625, 1.050919771194458, -0.3529122769832611, 1.4750101566314697, 0.09466394782066345, 1.7616432905197144, -0.5132278800010681, 0.6574292778968811, -0.23704856634140015, -1.134927749633789, 0.8013606667518616, -0.3358733654022217, -2.0181219577789307, -0.7890327572822571, -0.7483447790145874, -0.1114848405122757, -0.7545401453971863, 0.9257231950759888, -0.28492650389671326, -1.5002323389053345, 0.205496147274971, -0.7630231976509094, 0.2195921242237091, -1.154157280921936, 0.3068825900554657, 0.7363678216934204, -0.5277742147445679, -0.020235029980540276, -0.20482973754405975, -1.2155413627624512, -0.4476850628852844, 0.4215411841869354, 1.814363718032837, -0.6958382725715637, 0.876257061958313, 1.0825955867767334, -0.666279137134552, 0.14750634133815765, 0.25024861097335815, -0.37090420722961426, 0.9469252228736877, -1.096218228340149, -0.42022594809532166, 1.2197816371917725, -0.30037885904312134, -0.5422787070274353, 1.5519746541976929, 0.7078413963317871, -0.9793606996536255, -0.2685883641242981, -0.06566717475652695, -0.8322479128837585, -0.011558360420167446, -1.545451045036316, -0.12703478336334229, 0.39775463938713074, -1.6050876379013062, -0.4462103247642517, -0.1534356325864792, 1.4264878034591675, -0.1377062201499939, 1.489273190498352, -0.41073891520500183, -0.1822182685136795, -0.27718088030815125, -0.4535597264766693, 0.15320412814617157, -0.3142508268356323, -0.5187126398086548, 0.20585285127162933, -0.8436866402626038, 0.2066832333803177, 1.4729059934616089, 0.39318719506263733, 0.12277106195688248, 0.5231708884239197, 1.063429832458496, 0.4262300133705139, -0.1768939048051834, -0.7588304281234741, -1.6322983503341675, 2.0260415077209473, -1.3725464344024658, 2.098172664642334, 0.8384227752685547, -0.02614849992096424, -1.7595731019973755, -1.901303768157959, 1.292446494102478, 1.0330147743225098, 2.383378028869629, 0.41693541407585144, 0.4355684518814087, -0.8343461751937866, -0.7472392916679382, 0.3326753079891205, -1.0135035514831543, -0.6186572909355164, 0.14438240230083466, 2.3451879024505615, 1.7847055196762085, -0.3388700783252716, -0.20065447688102722, -1.0317708253860474, 1.404788851737976, -0.2794385254383087, 0.20915985107421875, 1.9658013582229614, -0.11949862539768219, -1.0577962398529053, 1.2911629676818848, -2.372485637664795, 0.19610200822353363, 2.0510740280151367, 0.2540603280067444, 0.089274562895298, -1.339964747428894, -0.6143816113471985, -0.3762752413749695, -0.3460523784160614, -1.1921488046646118, 0.46231237053871155, -0.23242175579071045, -0.7451701760292053, -1.4756137132644653, 0.1407860815525055, -1.1630737781524658, -1.6683502197265625, 0.2615565061569214, 1.8612704277038574, 2.118337392807007, -0.7210652828216553, 1.6272814273834229, -0.24483512341976166, 0.06693560630083084, 1.1997534036636353, 1.3209748268127441, 3.1254732608795166, 1.7707768678665161, -1.3670209646224976, 0.5953624844551086, -0.1025041788816452, -0.4745984673500061, 1.031962275505066, -1.2273739576339722, 1.3836103677749634, -0.17225255072116852, -1.2316054105758667, -1.26460599899292, 1.023044466972351, 0.5851663947105408, 0.039180755615234375, -0.5408936738967896, 1.197609543800354, 0.02598811499774456, 1.453066110610962, 0.5445753335952759, -0.39411792159080505, 0.567510187625885, -0.44822806119918823, -0.5985046625137329, 1.4926745891571045, 0.21904034912586212, -1.405637264251709, -2.260420799255371, -0.2657620310783386, -0.816685140132904, 0.04570063203573227, -0.6983672976493835, -1.031365156173706, 1.6501648426055908, 0.3241257965564728, -1.2042948007583618, -0.3703064024448395, -0.38580718636512756, -0.5287666916847229, 2.652388095855713, -1.3259406089782715, -0.10798634588718414, -0.9355048537254333, -0.695070743560791, 1.5955970287322998, -1.257840633392334, -0.32132911682128906, -0.9986298680305481, -0.7144356966018677, -1.1709994077682495, -0.54306560754776, 0.04382098466157913, -0.973912239074707, 0.7471331357955933, 0.13454648852348328, -1.2302992343902588, -0.2512431740760803, -0.8684489130973816, 1.022814154624939, -0.15498784184455872, 0.08335671573877335, 1.827666997909546, 0.26195165514945984, -0.4121931791305542, 0.8299564123153687, 1.1929620504379272, 0.6507574319839478, -0.7183022499084473, 0.07635650038719177, -0.6976088881492615, 0.2883200943470001, -1.2967157363891602, 0.2993350327014923, -2.9534263610839844, 0.6518488526344299, -0.058707110583782196, -0.06565328687429428, -0.034610215574502945, -1.2643672227859497, 1.1286171674728394, 2.661015033721924, -1.170601487159729, 0.5397720336914062, 0.3809913992881775, 1.0819545984268188, -1.633150339126587, 0.2993071377277374, -0.3750722110271454, 1.961745262145996, 0.22340857982635498, 1.303554654121399, -0.44373223185539246, -2.2705962657928467, 0.6761816143989563, -1.2871387004852295, -1.0621345043182373, 0.8297001719474792, -0.9038246870040894, 0.22629165649414062, -1.366688847541809, -0.2700517177581787, -0.8145222663879395, -1.2296226024627686, 0.4383683204650879, 0.07889441400766373, 0.4262559115886688, -0.538741946220398, 0.2625364661216736, -2.2329306602478027, -1.31742525100708, -0.21859560906887054, -1.0284969806671143, 0.4437427818775177, -0.5358648300170898, 0.7414172887802124, -0.1585802435874939, 0.07944440096616745, 0.3704066872596741, 1.4590846300125122, 3.2770113945007324, 0.2629113793373108, 0.25748318433761597, -0.1950993537902832, -0.9333449006080627, 1.443034291267395, 0.860523521900177, -0.15726932883262634, -0.5190379023551941, -0.9739297032356262, 1.3458213806152344, 1.929219365119934, 0.9960637092590332, 0.06672503054141998, -0.8605222702026367, -0.7606171369552612, -0.08578643202781677, 0.15706291794776917, 0.45084333419799805, 0.9334673285484314, 0.0779920294880867, 0.07968094199895859, 1.5613486766815186, 1.1567591428756714, -0.4653509259223938, 0.36919164657592773, -0.897001326084137, -0.4541988670825958, 0.4725813567638397, 0.3094625174999237, -0.11180273443460464, 0.36658579111099243, -0.9869421124458313, -0.10876970738172531, -0.49281343817710876, -0.8654374480247498, -0.6483020782470703, -0.38278627395629883, -0.3885505199432373, 1.6654571294784546, 0.16456814110279083, -0.49787813425064087, -0.11365992575883865, -0.7628206610679626, -0.1628720909357071, -1.179013729095459, 0.3004283905029297, -0.03859274834394455, -0.05507952719926834, -0.15261420607566833, 1.645341396331787, -0.8734050393104553, -2.1368041038513184, 0.17066022753715515, 0.13218507170677185, -0.28528499603271484, 0.09526137262582779, 1.8327391147613525, 0.5046000480651855, 1.4727122783660889, 1.29768705368042, 0.9081509709358215, -0.6674163341522217, -1.288980484008789, 0.7081130743026733, 0.9710542559623718, -1.3779844045639038, 0.8903214931488037, -0.17787551879882812, -0.6011644005775452, 0.5983543395996094, 1.2783544063568115, 0.551551103591919, -1.9917742013931274, 0.8627030849456787, -1.0878784656524658, 0.8079454898834229, 0.7704540491104126, 0.639136791229248, 0.14024275541305542, 0.9084540605545044, -1.2391180992126465, -1.1375772953033447, -0.6594756245613098, -0.6720436811447144, 1.9798576831817627, -0.35005784034729004, 0.5692960023880005, -0.27094754576683044, -1.27485990524292, -0.04158961772918701, 0.7198586463928223, 0.3631570637226105, -0.39436712861061096, 0.8515234589576721, -0.7349672913551331, -1.055512547492981, -1.2422170639038086, -0.38953518867492676, -1.0332163572311401, -0.9141027331352234, 1.123213768005371, 0.6895263195037842, 0.36330917477607727, 1.8591547012329102, 0.694240927696228, 0.41348445415496826, -2.5525577068328857, 0.8146291971206665, 0.35539954900741577, -0.15656405687332153, 0.9008574485778809, 0.2920836806297302, 1.110181450843811, 0.11262992024421692, 0.4674147069454193, -2.467684745788574, 2.3082454204559326, -0.10920444130897522, 0.676478385925293, 0.0460367277264595, -0.1370779126882553, 1.1591899394989014, 0.6151564121246338, 0.5383093953132629, -1.036807894706726, 0.8654889464378357, -0.5697823762893677, 1.1518644094467163, 0.8142025470733643, -0.8014895915985107, -0.08472859114408493, 1.3547630310058594, 0.45384109020233154, -0.6062318086624146, -0.9590272903442383, -0.9706913232803345, 0.9305269122123718, 1.6669400930404663, 0.05238129198551178, 0.01794847846031189, 0.7763672471046448, 0.675085186958313, -1.2965248823165894, 0.05139728635549545, -0.6027019023895264, -0.7218250036239624, 1.6125954389572144, 2.0919127464294434, -0.17073334753513336, -0.19620753824710846, -0.6306973695755005, -1.3668137788772583, 0.7266640663146973, -0.2325519174337387, 0.12906527519226074, 0.581710696220398, -0.6072041392326355, 1.0140273571014404, 0.8144992589950562, 0.9186399579048157, 0.12133332341909409, 0.14317084848880768, 0.412125825881958, -0.3000684082508087, -1.2553528547286987, -0.23319226503372192, -1.007251262664795, -2.4844627380371094, 0.4385022521018982, -0.1454036831855774, -1.5214295387268066, 0.060604602098464966, -1.0129016637802124, 1.0119655132293701, -0.6386507153511047, -1.1006699800491333, -1.5285136699676514, 0.19958090782165527, -0.10439851880073547, 0.9680736660957336, -1.4525994062423706, -0.20853476226329803, 1.164907693862915, 0.8331737518310547, -0.6425892114639282, 1.0396568775177002, 0.155227929353714, 1.0750019550323486, 0.7477445602416992, -0.36322444677352905, 0.47115352749824524, 0.19887986779212952, -1.311179757118225, 0.4293400049209595, 1.2169705629348755, 0.2556132972240448, 1.4972954988479614, -0.440898060798645, 0.004704887978732586, 0.4398336112499237, -0.5948610305786133, -0.5008413791656494, -0.5031014680862427, 0.6165092587471008, -0.06243424862623215, -0.8113756775856018, -0.10232618451118469, -0.11539223790168762, -0.35265907645225525, 0.21777187287807465, -1.6365629434585571, -0.19932369887828827, -0.35215526819229126, -0.631493866443634, -1.2831515073776245, -0.014390908181667328, 1.4188480377197266, -0.727821409702301, -0.2570072114467621, 0.4131179451942444, 0.4457329213619232, 0.580403745174408, 0.6961244940757751, -0.8357532620429993, -0.20271103084087372, -0.2367534041404724, -0.3440295159816742, 0.3050692081451416, 1.3146945238113403, -0.10614949464797974, -0.869494616985321, 0.6251423954963684, -0.37954309582710266, 0.10143919289112091, 2.036245107650757, 0.08244504034519196, -0.734149694442749, 0.20567594468593597, -0.8296871781349182, 1.9931013584136963, 1.69584059715271, 1.3989204168319702, -0.1903439313173294, -0.9601983428001404, 0.5903716683387756, -0.3931025266647339, -0.3680852949619293, 0.9100947380065918, 0.4493749737739563, -0.30852043628692627, -1.4675792455673218, 0.7180860638618469, 1.1420938968658447, -0.8925995230674744, -0.7884578108787537, 0.1595073938369751, -0.7527766823768616, 1.226263165473938, 0.528619110584259, 0.3074277639389038, 0.36940714716911316, 1.639715313911438, 0.7583229541778564, -0.552836000919342, 0.37624818086624146, 0.5149867534637451, -0.17449022829532623, -1.9372506141662598, -1.094400405883789, 0.3737955391407013, -0.6331731081008911, -1.5941565036773682, 1.4206291437149048, -1.1597394943237305, -1.066283941268921, 0.5037684440612793, 0.08642854541540146, 1.3185195922851562, 0.4019024074077606, 1.6213322877883911, 2.0591866970062256, 0.9858571887016296, 0.4114994704723358, 1.190016269683838, -0.15943992137908936, -0.43469682335853577, 1.7978065013885498, -0.40182459354400635, 0.5192483067512512, 1.1285490989685059, -0.35365208983421326, -1.1104896068572998, -0.6956678032875061, -1.2188061475753784, -0.7205635905265808, 1.1221224069595337, 0.20880597829818726, -1.0982966423034668, 0.25899094343185425, 1.6120092868804932, 0.0867353081703186, -0.21788570284843445, 0.7058171033859253, 0.4180019497871399, -0.6904637813568115, -0.036949094384908676, -0.9469499588012695, 0.5269216299057007, -0.22720175981521606, -0.48539862036705017, 0.33074745535850525, 0.5089027285575867, 1.3661844730377197, -0.08445107191801071, 0.12624917924404144, 1.10081148147583, -1.4929115772247314, 1.4830559492111206, -0.7590264678001404, 0.355045348405838, -2.4135453701019287, 1.3798270225524902, -0.7358970642089844, 2.0888829231262207, -2.6673223972320557, 0.48007023334503174, -0.6703792810440063, -0.5686834454536438, 0.2984936833381653, -0.37629562616348267, 0.11037864536046982, -0.09665737301111221, -1.1557199954986572, -0.06369484961032867, -0.7080764770507812, 0.6141497492790222, 1.2162150144577026, 1.2730170488357544, -1.1135578155517578, -0.27432718873023987, -1.6679469347000122, -0.2723987102508545, -0.924332320690155, 0.18453451991081238, -1.922540545463562, -0.1700245440006256, -1.9135730266571045, -2.363975763320923, -1.328602910041809, -0.7769806981086731, 1.1370896100997925, 0.18744370341300964, -0.959408700466156, 1.3006196022033691, -0.3895021080970764, -1.803647518157959, 1.0910218954086304, -2.232133626937866 ]
https://github.com/huggingface/datasets/issues/4507
How to let `load_dataset` return a `Dataset` instead of `DatasetDict` in customized loading script
Hi @liyucheng09. Users can pass the `split` parameter to `load_dataset`. For example, if your split name is "train", ```python ds = load_dataset("dataset_name", split="train") ``` will return a `Dataset` instance.
If the dataset does not need splits, i.e., no training and validation split, more like a table. How can I let the `load_dataset` function return a `Dataset` object directly rather than return a `DatasetDict` object with only one key-value pair. Or I can paraphrase the question in the following way: how to skip `_split_generators` step in `DatasetBuilder` to let `as_dataset` gives a single `Dataset` rather than a list`[Dataset]`? Many thanks for any help.
708
29
How to let `load_dataset` return a `Dataset` instead of `DatasetDict` in customized loading script If the dataset does not need splits, i.e., no training and validation split, more like a table. How can I let the `load_dataset` function return a `Dataset` object directly rather than return a `DatasetDict` object with only one key-value pair. Or I can paraphrase the question in the following way: how to skip `_split_generators` step in `DatasetBuilder` to let `as_dataset` gives a single `Dataset` rather than a list`[Dataset]`? Many thanks for any help. Hi @liyucheng09. Users can pass the `split` parameter to `load_dataset`. For example, if your split name is "train", ```python ds = load_dataset("dataset_name", split="train") ``` will return a `Dataset` instance.
[ -1.0528440475463867, -0.9467352032661438, -0.7736595273017883, 1.3653463125228882, -0.16694362461566925, -1.3322548866271973, 0.3051471412181854, -1.179211974143982, 1.9293094873428345, -0.9292895197868347, 0.43301546573638916, -1.764176607131958, 0.026760997250676155, -0.6908643841743469, -0.8088644742965698, -1.0121879577636719, -0.47573259472846985, -0.7657320499420166, 0.837696373462677, 2.3685739040374756, 1.1399261951446533, -1.243385910987854, 2.4968738555908203, 0.6268271803855896, -0.1884683519601822, -1.0677446126937866, 0.47244423627853394, -0.044256456196308136, -1.1264569759368896, -0.35132864117622375, -0.8627257347106934, -0.1244465559720993, -0.6456947922706604, -0.789167046546936, -0.012565888464450836, 0.5672918558120728, -0.4862384796142578, -0.42490625381469727, -0.37179991602897644, -0.9435359239578247, 0.49120357632637024, -0.3849765956401825, 1.0807486772537231, -0.4594578742980957, 1.8381296396255493, -0.5986632108688354, 0.42648833990097046, 0.7512423396110535, 1.328860878944397, 0.1648329496383667, -0.006335362792015076, 0.09902279078960419, 0.33642733097076416, 0.03789161145687103, 0.38784193992614746, 1.1424800157546997, 0.4881410300731659, 0.6766325831413269, 0.7364188432693481, -2.32611346244812, 1.1860660314559937, -0.9793773889541626, 0.36639681458473206, 1.3293049335479736, -0.8393639922142029, 0.2734534442424774, -1.7526814937591553, -0.057594262063503265, 0.5353376269340515, -2.1898014545440674, 0.3216511607170105, -1.4113692045211792, -0.47780096530914307, 1.0645114183425903, 0.42154350876808167, -1.1287562847137451, 0.29424309730529785, -0.18612781167030334, 1.0136244297027588, 0.5245897173881531, 1.0756062269210815, -1.7208770513534546, 0.026586344465613365, -0.43926241993904114, 0.1618586778640747, -1.3079849481582642, -1.3620483875274658, 0.6226359009742737, 0.6876641511917114, 0.6329324245452881, -0.19184789061546326, 1.0768030881881714, -0.844764769077301, 0.6841285228729248, -1.1356611251831055, -1.7274986505508423, -1.2414416074752808, -2.0252716541290283, -2.4394423961639404, 0.749099612236023, -0.43781906366348267, -0.5317708253860474, 2.0773863792419434, -0.9530590772628784, -1.8538899421691895, 1.1888952255249023, 0.21592740714550018, -0.054101549088954926, 2.239555597305298, 0.2382006198167801, -0.666532039642334, 0.48667362332344055, -0.693855345249176, 0.8534941077232361, -0.32266712188720703, 1.3559445142745972, 0.527726948261261, -1.1767152547836304, 1.5974117517471313, -0.4775656461715698, 0.729173481464386, -0.748924970626831, -0.6179795861244202, -0.7623721361160278, 0.36483094096183777, 1.8677515983581543, -0.30937135219573975, 1.5591241121292114, -0.35471683740615845, -1.5801820755004883, -1.5994839668273926, 0.9428025484085083, 0.45918041467666626, -0.6861504912376404, 0.09896839410066605, -0.27410557866096497, 0.15506647527217865, -0.04870906472206116, 1.3277586698532104, 1.1615281105041504, 0.811969518661499, -0.34841999411582947, -0.7962508201599121, 0.20944517850875854, 0.05363348126411438, -0.8683606386184692, -1.691016435623169, -0.41709911823272705, 0.19402572512626648, 0.47373566031455994, -1.0186035633087158, 1.8626314401626587, 0.869190514087677, 1.9313266277313232, 0.9210377335548401, -0.2165544331073761, 1.4365848302841187, -0.02217867597937584, 2.0385944843292236, -0.3369257152080536, 0.6270211935043335, -0.28885576128959656, -1.0759116411209106, 0.8772105574607849, -0.300995409488678, -1.9688148498535156, -0.8484088778495789, -0.9454905986785889, -0.14209237694740295, -0.6782752275466919, 0.9095489978790283, -0.2971612811088562, -1.5760831832885742, 0.24681487679481506, -0.6402080059051514, 0.05564641207456589, -1.2534441947937012, 0.26797404885292053, 0.6434169411659241, -0.7119779586791992, 0.07484395802021027, -0.27105045318603516, -1.2317311763763428, -0.4710725247859955, 0.24544179439544678, 1.969574213027954, -0.8161510825157166, 0.9374526143074036, 1.0020567178726196, -0.7564439177513123, -0.12157925963401794, 0.30625617504119873, -0.23256619274616241, 0.7541362643241882, -1.1365166902542114, -0.3089096248149872, 1.1773117780685425, -0.03004406951367855, -0.7009040117263794, 1.5577685832977295, 0.6740840077400208, -0.9491427540779114, 0.025279270485043526, -0.2867167890071869, -0.6757096648216248, -0.026369741186499596, -1.5572092533111572, 0.012276960536837578, 0.46896231174468994, -1.334383249282837, -0.5119563341140747, -0.1915024369955063, 1.1242783069610596, -0.22857923805713654, 1.2430564165115356, -0.3905354142189026, -0.3692713975906372, -0.46193838119506836, -0.43425512313842773, 0.08043894171714783, -0.23518653213977814, -0.737078845500946, 0.14340293407440186, -0.6506354212760925, 0.3993443548679352, 1.386337161064148, 0.26188936829566956, 0.08423376083374023, 0.5063066482543945, 1.2984743118286133, 0.2641957104206085, 0.05923691391944885, -0.931668221950531, -1.4348499774932861, 1.8890364170074463, -1.3934937715530396, 1.8431533575057983, 0.5101052522659302, 0.0388471782207489, -1.7381634712219238, -1.876147747039795, 1.4108015298843384, 1.2837470769882202, 2.2968194484710693, 0.6505663990974426, 0.3019801676273346, -0.8727532029151917, -0.5989953875541687, 0.32558244466781616, -1.0681674480438232, -0.64174485206604, 0.242123544216156, 2.3206639289855957, 1.7069200277328491, -0.5625335574150085, -0.2948783040046692, -1.1018482446670532, 1.3936060667037964, -0.20928923785686493, 0.20344968140125275, 2.0401980876922607, -0.4670914113521576, -1.212194561958313, 1.277345895767212, -2.2799861431121826, 0.006960591301321983, 2.000274896621704, 0.14005517959594727, 0.12234238535165787, -1.367775559425354, -0.609295129776001, -0.16307790577411652, -0.4446617364883423, -1.343375325202942, 0.4621097445487976, -0.29773998260498047, -0.5816241502761841, -1.395205020904541, 0.37162113189697266, -0.9959825873374939, -1.6288847923278809, 0.12086295336484909, 1.878503441810608, 1.9711812734603882, -0.684212327003479, 1.6486278772354126, -0.362396240234375, 0.2553764879703522, 1.3424904346466064, 1.214662790298462, 3.0541300773620605, 1.8809975385665894, -1.2057712078094482, 0.783547580242157, -0.14710967242717743, -0.5669173002243042, 1.417953372001648, -1.097381830215454, 1.264459490776062, -0.30578017234802246, -1.1511894464492798, -1.3665056228637695, 0.7583515048027039, 0.4992494285106659, 0.1376682072877884, -0.5185990929603577, 1.2635842561721802, 0.10877610743045807, 1.3066319227218628, 0.5211440324783325, -0.4010620415210724, 0.881984293460846, -0.39037930965423584, -0.48107096552848816, 1.4650996923446655, 0.2784302234649658, -1.23837411403656, -2.323258638381958, -0.25672465562820435, -0.920515239238739, 0.00002801511436700821, -0.4937867522239685, -0.9216803908348083, 1.81046462059021, 0.36807119846343994, -1.4289759397506714, -0.16074712574481964, -0.2304946780204773, -0.5447708368301392, 2.761277914047241, -1.3237165212631226, -0.22128130495548248, -0.9817619919776917, -0.7418882250785828, 1.833329677581787, -1.1734579801559448, -0.2122671902179718, -1.0767440795898438, -0.4813462495803833, -1.4520461559295654, -0.5142560601234436, 0.0729999840259552, -0.9670526385307312, 0.9622128009796143, 0.12900897860527039, -1.294613003730774, -0.2904379665851593, -0.8968552947044373, 0.8552343845367432, -0.200420081615448, 0.3076767921447754, 1.9932979345321655, 0.5544401407241821, -0.43773970007896423, 0.5706550478935242, 1.0493128299713135, 0.5845749378204346, -0.6494322419166565, 0.406792014837265, -0.7573546767234802, 0.19985583424568176, -1.3545191287994385, 0.24418482184410095, -2.853760004043579, 0.6620654463768005, -0.04749969393014908, -0.0948343425989151, -0.003651653416454792, -1.4367759227752686, 0.9735609889030457, 2.6857316493988037, -1.281018853187561, 0.38412749767303467, 0.2032141536474228, 1.2769087553024292, -1.5182279348373413, 0.23634041845798492, -0.37320372462272644, 2.0653128623962402, 0.21640899777412415, 1.1939258575439453, -0.3711061179637909, -2.1754517555236816, 0.5431800484657288, -1.280881404876709, -1.3136178255081177, 0.933779239654541, -0.7660462260246277, -0.017076371237635612, -1.3139396905899048, -0.21564152836799622, -0.8755091428756714, -1.2211151123046875, 0.96040278673172, 0.22551481425762177, 0.5339599251747131, -0.7250676155090332, 0.4034734070301056, -2.179447889328003, -1.3866047859191895, -0.3383442461490631, -0.8737249374389648, 0.40255099534988403, -0.1676032394170761, 0.6497820019721985, -0.2773866355419159, 0.04145605117082596, 0.4177754521369934, 1.470229983329773, 3.4349417686462402, 0.32886138558387756, 0.3261728882789612, -0.20097924768924713, -0.9279330372810364, 1.4935566186904907, 0.9115104675292969, -0.07167644053697586, -0.41314756870269775, -1.0267595052719116, 1.112177848815918, 1.9470043182373047, 1.0019904375076294, 0.009816192090511322, -0.819564163684845, -0.6631568074226379, -0.06396370381116867, 0.11974693089723587, 0.3849215507507324, 0.7000938057899475, 0.2787648141384125, 0.11900540441274643, 1.2918394804000854, 1.0384397506713867, -0.4157959520816803, 0.4436988830566406, -0.8385762572288513, -0.481627881526947, 0.6867522597312927, 0.28459280729293823, 0.15295037627220154, 0.25220298767089844, -0.9786660075187683, -0.23152047395706177, -0.40972670912742615, -0.9991049766540527, -0.7402672171592712, -0.6524490714073181, -0.3597400486469269, 1.5758566856384277, -0.08546258509159088, -0.5032920241355896, -0.09799603372812271, -0.7877854108810425, -0.1031331717967987, -1.0630056858062744, 0.19471241533756256, -0.21918915212154388, -0.24676857888698578, 0.013902178034186363, 1.6868196725845337, -0.9761122465133667, -1.8430057764053345, 0.3539530336856842, 0.2669128477573395, -0.48500698804855347, 0.27825629711151123, 1.5379729270935059, 0.5098562240600586, 1.428736925125122, 1.3193022012710571, 1.0747941732406616, -0.6698487997055054, -1.3317228555679321, 0.5881210565567017, 0.7820674180984497, -1.3955626487731934, 0.8442623615264893, 0.24185004830360413, -0.4567614495754242, 0.640540599822998, 1.1271610260009766, 0.46194538474082947, -1.9880359172821045, 0.5650918483734131, -0.806060791015625, 0.6661154627799988, 0.8672302961349487, 0.7693783640861511, 0.18443721532821655, 0.8454415202140808, -1.0576058626174927, -1.2062913179397583, -0.7017744779586792, -0.6360162496566772, 1.8539884090423584, -0.12548398971557617, 0.672644317150116, -0.2220722734928131, -1.3194077014923096, -0.05928701162338257, 0.786489725112915, 0.521038293838501, -0.6281585693359375, 0.6484853029251099, -0.5794597864151001, -0.8362634778022766, -1.3722314834594727, -0.4894962012767792, -1.1753478050231934, -1.0454516410827637, 0.9885351061820984, 0.873082160949707, 0.27597156167030334, 1.7511186599731445, 0.7816691398620605, 0.2644420564174652, -2.502692937850952, 0.8206784129142761, 0.2615383267402649, 0.0034995758906006813, 0.6881082057952881, 0.4324122965335846, 0.9922338724136353, -0.1517803966999054, 0.7110339999198914, -2.378784656524658, 2.3280839920043945, -0.2596703767776489, 0.45792973041534424, -0.015581920742988586, -0.3384828567504883, 1.0131582021713257, 0.4347728192806244, 0.39472249150276184, -1.1824193000793457, 0.6494143605232239, -0.6406678557395935, 1.2703509330749512, 0.8863804936408997, -0.9117717146873474, 0.034255221486091614, 1.476685881614685, 0.49900373816490173, -0.5219559073448181, -0.849943220615387, -1.0992876291275024, 0.9316303730010986, 1.5553864240646362, -0.15617918968200684, -0.16587074100971222, 1.0248805284500122, 0.7141985893249512, -1.2862813472747803, 0.10348671674728394, -0.7943921685218811, -0.7428726553916931, 1.6316560506820679, 1.9288671016693115, -0.18820875883102417, -0.15060566365718842, -0.8985859155654907, -0.9741724133491516, 0.8986437916755676, 0.23536400496959686, -0.0995081290602684, 0.6859473586082458, -0.6830620765686035, 1.1995784044265747, 0.991919755935669, 0.8680645823478699, 0.3396763503551483, 0.4677071273326874, 0.4054112732410431, -0.2683980464935303, -1.1229214668273926, -0.08820051699876785, -1.0296118259429932, -2.6027584075927734, 0.519885778427124, -0.29154959321022034, -1.3287755250930786, -0.0832378938794136, -1.0722616910934448, 0.9281598925590515, -0.6789334416389465, -1.1534299850463867, -1.5616419315338135, 0.27061113715171814, 0.042639464139938354, 0.9373154044151306, -1.6007425785064697, 0.13007885217666626, 1.2331753969192505, 0.9486218094825745, -0.9129207134246826, 0.9740932583808899, 0.15485073626041412, 1.053029179573059, 0.9603127241134644, -0.45451968908309937, 0.5461374521255493, -0.13367792963981628, -1.3712965250015259, 0.40333420038223267, 1.0001401901245117, 0.18220564723014832, 1.4201894998550415, -0.5624879598617554, 0.06009314954280853, 0.3708149492740631, -0.5187550783157349, -0.5397250652313232, -0.8113505244255066, 0.6998732089996338, 0.10952197760343552, -0.8299728035926819, 0.2040468454360962, 0.1160043403506279, -0.17485852539539337, 0.39116838574409485, -1.4113175868988037, -0.1857898235321045, -0.2725389003753662, -0.6250117421150208, -1.116777777671814, -0.14018584787845612, 1.3659788370132446, -0.5682844519615173, -0.1062665805220604, 0.5483842492103577, 0.3274257481098175, 0.47269341349601746, 0.46883517503738403, -0.699758768081665, -0.3355819880962372, -0.3641170859336853, -0.30732178688049316, 0.27687469124794006, 1.4105345010757446, -0.12781904637813568, -1.0004355907440186, 0.8556510806083679, -0.4017670750617981, -0.005186865571886301, 1.9282580614089966, 0.1300640106201172, -0.8345555663108826, 0.20756331086158752, -0.7267261743545532, 1.8802188634872437, 1.8932920694351196, 1.3535749912261963, 0.05820202827453613, -0.989980936050415, 0.5998471975326538, -0.4318166673183441, -0.4296667277812958, 1.0400636196136475, 0.3729873299598694, -0.11889130622148514, -1.34022855758667, 0.8553391695022583, 1.353117823600769, -0.6943964958190918, -0.9415726661682129, 0.03505074232816696, -0.7946575284004211, 0.9644988775253296, 0.6782965660095215, 0.48754000663757324, 0.3392166197299957, 1.5396411418914795, 0.7182009816169739, -0.302153080701828, 0.6091285943984985, 0.4787508547306061, -0.050194405019283295, -2.150984525680542, -1.3574485778808594, 0.36203187704086304, -0.5089172124862671, -1.708971381187439, 1.3791694641113281, -1.2030061483383179, -0.9590452313423157, 0.57574462890625, 0.1101885512471199, 1.5721838474273682, 0.4035504460334778, 1.4828275442123413, 2.122842788696289, 0.8013416528701782, 0.27059635519981384, 1.3875865936279297, -0.1803412139415741, -0.5251364707946777, 1.8417402505874634, -0.5009315013885498, 0.4288068115711212, 1.0102999210357666, -0.13578301668167114, -1.0588732957839966, -0.8140446543693542, -1.3390249013900757, -0.712770938873291, 1.1587072610855103, 0.09554494917392731, -1.232603669166565, 0.3619161546230316, 1.6918927431106567, -0.03860342130064964, -0.29138103127479553, 0.7968488335609436, 0.29559221863746643, -0.9379463791847229, 0.10375189036130905, -0.9312065839767456, 0.5070090889930725, -0.10907965898513794, -0.23975376784801483, 0.3732541799545288, 0.5017388463020325, 1.3377509117126465, 0.0326986238360405, 0.15424762666225433, 1.1080974340438843, -1.3464546203613281, 1.4466161727905273, -0.6005219221115112, 0.2958768606185913, -2.4593470096588135, 1.3434629440307617, -0.8634099960327148, 1.7872059345245361, -2.6907873153686523, 0.37033629417419434, -0.4599027931690216, -0.5225695967674255, 0.31029877066612244, -0.4605622887611389, 0.178327277302742, -0.09504101425409317, -1.2245627641677856, 0.049442604184150696, -0.797791600227356, 0.6238560080528259, 0.9791346788406372, 1.3996858596801758, -1.2582144737243652, -0.4467698037624359, -1.7717998027801514, -0.05559271574020386, -0.5535154938697815, 0.43199166655540466, -2.0701329708099365, -0.19590380787849426, -1.8969464302062988, -2.510136842727661, -1.2523149251937866, -0.8088914752006531, 0.99387526512146, 0.06885351240634918, -0.8334917426109314, 1.107619285583496, -0.3824339807033539, -1.894534945487976, 1.104826807975769, -2.102238655090332 ]
https://github.com/huggingface/datasets/issues/4506
Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results
Important info: As hashes are generated randomly for functions, it leads to **false identifying some results as already hashed** (mapping function is not executed after a method update) when there's a `pytorch_lightning.seed_everything(123)`
## Describe the bug Sometimes I get messages about not being able to hash a method: `Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset. _map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` Whilst the function looks like this: ```python @staticmethod def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example): speaker_id, dialogue = tuple(zip(*(example["dialogue"]))) example["speaker_id"] = speaker_id example["dialogue"] = dialogue return example ``` This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step. This error is sometimes causing a failure to use cached data, instead of re-running all steps again. ## Steps to reproduce the bug ```python import copy import datasets from datasets import arrow_dataset def main(): dataset = datasets.load_dataset("blended_skill_talk") res = dataset.map(method) print(res) def method(example: arrow_dataset.Example): example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance']) return example if __name__ == '__main__': main() ``` Run with: ``` python -m reproduce_error ``` ## Expected results Dataset is mapped and cached correctly. ## Actual results The code outputs this at some point: `Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: - Platform: Ubuntu 20.04.3 - Python version: 3.9.12 - PyArrow version: 8.0.0 - Datasets version: 2.3.1
709
32
Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results ## Describe the bug Sometimes I get messages about not being able to hash a method: `Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset. _map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` Whilst the function looks like this: ```python @staticmethod def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example): speaker_id, dialogue = tuple(zip(*(example["dialogue"]))) example["speaker_id"] = speaker_id example["dialogue"] = dialogue return example ``` This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step. This error is sometimes causing a failure to use cached data, instead of re-running all steps again. ## Steps to reproduce the bug ```python import copy import datasets from datasets import arrow_dataset def main(): dataset = datasets.load_dataset("blended_skill_talk") res = dataset.map(method) print(res) def method(example: arrow_dataset.Example): example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance']) return example if __name__ == '__main__': main() ``` Run with: ``` python -m reproduce_error ``` ## Expected results Dataset is mapped and cached correctly. ## Actual results The code outputs this at some point: `Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: - Platform: Ubuntu 20.04.3 - Python version: 3.9.12 - PyArrow version: 8.0.0 - Datasets version: 2.3.1 Important info: As hashes are generated randomly for functions, it leads to **false identifying some results as already hashed** (mapping function is not executed after a method update) when there's a `pytorch_lightning.seed_everything(123)`
[ -1.2236682176589966, -0.9719545841217041, -0.6711602210998535, 1.5704116821289062, -0.1607566624879837, -1.2200264930725098, 0.11984287202358246, -1.0986934900283813, 1.6868888139724731, -0.8310468792915344, 0.3015105426311493, -1.673458218574524, -0.02658887393772602, -0.5949078798294067, -0.7658260464668274, -0.832206130027771, -0.39108237624168396, -0.7517399191856384, 1.0681325197219849, 2.4019992351531982, 1.2144354581832886, -1.3896740674972534, 2.75685715675354, 0.7387657761573792, -0.16742350161075592, -1.0075247287750244, 0.5181538462638855, -0.03280489891767502, -1.2779796123504639, -0.49577596783638, -0.9115095138549805, -0.10126730054616928, -0.5323833227157593, -0.4578745663166046, -0.07612830400466919, 0.4621469974517822, -0.307891845703125, -0.48355525732040405, -0.516963541507721, -0.8349295854568481, 0.4523859918117523, -0.3547392785549164, 0.8893911242485046, -0.3095901310443878, 1.8406052589416504, -0.6257010102272034, 0.4416869282722473, 0.7067756056785583, 1.312571406364441, 0.2222893089056015, -0.011248297989368439, 0.3583534359931946, 0.4280993938446045, -0.05000385642051697, 0.4930253028869629, 1.155888319015503, 0.6665478944778442, 0.4757757782936096, 0.7073903679847717, -2.2672667503356934, 1.318882703781128, -1.0404093265533447, 0.341043621301651, 1.2932806015014648, -0.9533101916313171, 0.34829533100128174, -1.6764378547668457, -0.04835011810064316, 0.6767947673797607, -2.15195631980896, 0.29968026280403137, -1.3063935041427612, -0.4382690489292145, 0.9926416277885437, 0.40401312708854675, -1.1805957555770874, 0.08233153820037842, -0.4480675756931305, 1.0722073316574097, 0.35946014523506165, 1.0478729009628296, -1.750827670097351, -0.010968821123242378, -0.2950541079044342, 0.10879890620708466, -1.2619754076004028, -1.546237826347351, 0.510388970375061, 0.6199567317962646, 0.6064279079437256, -0.18467338383197784, 1.1363495588302612, -1.0308393239974976, 0.6941100358963013, -1.059323787689209, -1.6852055788040161, -1.4103294610977173, -2.2731621265411377, -2.2573399543762207, 0.702470064163208, -0.45203328132629395, -0.5543317198753357, 2.0660622119903564, -1.0007364749908447, -1.7415339946746826, 1.1081435680389404, 0.2171517163515091, 0.07874272763729095, 2.3459954261779785, 0.20303934812545776, -0.7198864817619324, 0.4554702639579773, -0.7502601742744446, 0.7499590516090393, -0.4339045584201813, 1.3962500095367432, 0.3817434310913086, -1.0542691946029663, 1.5633103847503662, -0.3419751524925232, 0.6014313697814941, -0.6933509707450867, -0.4947293698787689, -0.7817190885543823, 0.2814810574054718, 1.895348310470581, -0.27360615134239197, 1.5704737901687622, -0.3753986060619354, -1.5319163799285889, -1.56820547580719, 0.8922914862632751, 0.47678959369659424, -0.8136042952537537, 0.10422831028699875, -0.5162355899810791, 0.10743319243192673, -0.10806460678577423, 1.2181816101074219, 1.2209930419921875, 0.7221775054931641, -0.4040035605430603, -0.8205128312110901, 0.12958720326423645, -0.04980103671550751, -0.7497644424438477, -1.7421681880950928, -0.2768758535385132, 0.1264066845178604, 0.6090866923332214, -1.1801732778549194, 1.705127239227295, 0.9375631809234619, 1.8539363145828247, 1.0511566400527954, -0.3597983121871948, 1.447661280632019, 0.09220011532306671, 1.83782160282135, -0.5542925000190735, 0.6501569151878357, -0.30104708671569824, -1.150084376335144, 0.8229352235794067, -0.3243708312511444, -2.032376766204834, -0.7855736613273621, -0.717726469039917, -0.18076708912849426, -0.8189793229103088, 0.8913458585739136, -0.36746805906295776, -1.4334306716918945, 0.18687696754932404, -0.7975472807884216, 0.23246292769908905, -1.074699878692627, 0.31809201836586, 0.7239323854446411, -0.6372407078742981, 0.14452707767486572, -0.22371909022331238, -1.2901686429977417, -0.4425911009311676, 0.41463446617126465, 1.8728818893432617, -0.7237443327903748, 0.8762018084526062, 1.1044808626174927, -0.6016872525215149, -0.020762376487255096, 0.26918846368789673, -0.22504188120365143, 0.8821456432342529, -1.0094038248062134, -0.46997007727622986, 1.301173210144043, -0.2625425159931183, -0.6524279117584229, 1.5587977170944214, 0.6904728412628174, -0.9720749258995056, -0.1746564656496048, -0.13605941832065582, -0.9122357368469238, 0.03522153198719025, -1.5746687650680542, -0.11012313514947891, 0.4920724630355835, -1.588474988937378, -0.46111157536506653, -0.24391120672225952, 1.3029597997665405, -0.1531851887702942, 1.4218125343322754, -0.4038507044315338, -0.17222607135772705, -0.28489890694618225, -0.3222857415676117, 0.14735528826713562, -0.1963188648223877, -0.6226447820663452, 0.13221661746501923, -0.7774423956871033, 0.3532942533493042, 1.4495089054107666, 0.2861005365848541, 0.0212179534137249, 0.5363715887069702, 1.1288208961486816, 0.3876667022705078, -0.040108270943164825, -0.7798987030982971, -1.6017606258392334, 1.9931000471115112, -1.4304380416870117, 2.014348268508911, 0.8075217008590698, -0.020687788724899292, -1.8115431070327759, -1.8783429861068726, 1.2624921798706055, 1.1313285827636719, 2.3047685623168945, 0.4186601936817169, 0.3947567343711853, -0.8567587733268738, -0.6459957361221313, 0.34839215874671936, -0.9962497353553772, -0.6924936771392822, 0.17581287026405334, 2.413195848464966, 1.7643513679504395, -0.37746620178222656, -0.21565325558185577, -1.0129358768463135, 1.4453115463256836, -0.277229368686676, 0.2263784259557724, 1.961346983909607, -0.17173995077610016, -1.0744154453277588, 1.2951527833938599, -2.4023287296295166, 0.20332133769989014, 2.0101070404052734, 0.24132373929023743, 0.10764405876398087, -1.4089391231536865, -0.5849059820175171, -0.330433189868927, -0.31561189889907837, -1.2589991092681885, 0.4839518070220947, -0.2516503632068634, -0.7705848217010498, -1.4382574558258057, 0.19463559985160828, -1.090804934501648, -1.6466432809829712, 0.27935791015625, 1.896215796470642, 2.0322422981262207, -0.7355366945266724, 1.6474608182907104, -0.30007240176200867, 0.19717304408550262, 1.183589220046997, 1.2437677383422852, 3.102341890335083, 1.8320645093917847, -1.358077049255371, 0.5816773176193237, -0.13461650907993317, -0.4822242558002472, 1.1862690448760986, -1.2186686992645264, 1.2854746580123901, -0.17123231291770935, -1.161792516708374, -1.3301002979278564, 1.0331276655197144, 0.5014632940292358, 0.07239522784948349, -0.48669230937957764, 1.211129069328308, 0.0098058320581913, 1.3233777284622192, 0.5884625911712646, -0.3606269359588623, 0.5634105801582336, -0.36763498187065125, -0.5023186206817627, 1.4686778783798218, 0.23374950885772705, -1.3681608438491821, -2.207019567489624, -0.16520603001117706, -0.8183332681655884, 0.08635270595550537, -0.5655059218406677, -1.0133178234100342, 1.648946762084961, 0.3459622263908386, -1.300330638885498, -0.2948453724384308, -0.31363871693611145, -0.5615133047103882, 2.7101783752441406, -1.2170112133026123, -0.24767176806926727, -1.0130592584609985, -0.6629960536956787, 1.7103794813156128, -1.2470329999923706, -0.25240471959114075, -1.0708565711975098, -0.546017050743103, -1.2762895822525024, -0.53146892786026, 0.061013832688331604, -1.0185397863388062, 0.8584590554237366, 0.14793848991394043, -1.2042934894561768, -0.36373603343963623, -0.8595758080482483, 0.9804704189300537, -0.19900117814540863, 0.1146484911441803, 1.8356019258499146, 0.37312549352645874, -0.4049395024776459, 0.8737404346466064, 1.178609013557434, 0.6496304273605347, -0.6077494025230408, 0.19433237612247467, -0.6099799871444702, 0.3318597376346588, -1.3478171825408936, 0.27768439054489136, -2.905200481414795, 0.6045081615447998, -0.024120986461639404, 0.017367271706461906, -0.021042264997959137, -1.3578239679336548, 1.0481311082839966, 2.5584516525268555, -1.2533271312713623, 0.5186822414398193, 0.2984755337238312, 1.1471179723739624, -1.6577365398406982, 0.3793008327484131, -0.4481993615627289, 2.106780529022217, 0.2832088768482208, 1.3064368963241577, -0.4499593675136566, -2.3628923892974854, 0.6491718292236328, -1.3186272382736206, -1.1631501913070679, 0.766388475894928, -0.9321426153182983, 0.1298084855079651, -1.4456262588500977, -0.26609688997268677, -0.8362825512886047, -1.2678542137145996, 0.6353310942649841, 0.20875287055969238, 0.34491509199142456, -0.5884895920753479, 0.30821719765663147, -2.1935157775878906, -1.3087834119796753, -0.2168881595134735, -0.9439920783042908, 0.49347370862960815, -0.46183812618255615, 0.6619694828987122, -0.2256210446357727, -0.003971514292061329, 0.33385351300239563, 1.4994856119155884, 3.4510514736175537, 0.2888385057449341, 0.28112757205963135, -0.2060108333826065, -0.9118542075157166, 1.3956780433654785, 0.8586915135383606, -0.20074476301670074, -0.5430330038070679, -1.0514005422592163, 1.2831966876983643, 1.9728457927703857, 0.9202224612236023, -0.004794707987457514, -0.7997965812683105, -0.7505559921264648, -0.07475648075342178, 0.1598924994468689, 0.47400176525115967, 0.8759167194366455, 0.1230456680059433, 0.09854787588119507, 1.4468430280685425, 1.1294291019439697, -0.39726436138153076, 0.32112276554107666, -0.8336794972419739, -0.4499587118625641, 0.5289591550827026, 0.2819562256336212, -0.0924706682562828, 0.3478464186191559, -1.0294914245605469, -0.25335270166397095, -0.41705361008644104, -0.83735191822052, -0.6796057224273682, -0.432064950466156, -0.34553858637809753, 1.5709255933761597, 0.15008796751499176, -0.5635749101638794, -0.07495073974132538, -0.7008404731750488, -0.12176074832677841, -1.0319432020187378, 0.31156066060066223, -0.09338939189910889, -0.17760208249092102, -0.14938390254974365, 1.7072170972824097, -0.9243481755256653, -2.042313814163208, 0.22215019166469574, 0.18872623145580292, -0.2822483479976654, 0.19173897802829742, 1.7168785333633423, 0.5755175948143005, 1.406846523284912, 1.426003098487854, 0.9356948137283325, -0.6761525273323059, -1.3364031314849854, 0.6358749866485596, 0.9662024974822998, -1.3575819730758667, 0.8111566305160522, -0.05052434653043747, -0.5453405976295471, 0.6230406761169434, 1.3311141729354858, 0.5743732452392578, -1.9732890129089355, 0.7378479838371277, -1.0225028991699219, 0.8247995972633362, 0.8215060234069824, 0.7071459889411926, 0.18517139554023743, 0.7703344225883484, -1.1695160865783691, -1.1480019092559814, -0.7031066417694092, -0.771229088306427, 1.948448896408081, -0.3241686522960663, 0.5790579915046692, -0.22643259167671204, -1.3569310903549194, -0.09703851491212845, 0.7226120233535767, 0.31318002939224243, -0.5874950885772705, 0.8053494691848755, -0.6345045566558838, -1.1106678247451782, -1.265519142150879, -0.4395987391471863, -1.0561414957046509, -0.9535641670227051, 1.0032917261123657, 0.7876846194267273, 0.23966987431049347, 1.8845794200897217, 0.673501193523407, 0.28642207384109497, -2.557234287261963, 0.8515827655792236, 0.3110066056251526, -0.08108733594417572, 0.8516558408737183, 0.32953521609306335, 0.9602731466293335, 0.09357842803001404, 0.589941143989563, -2.4746861457824707, 2.2737009525299072, -0.23540562391281128, 0.7085899710655212, -0.106333889067173, -0.21213677525520325, 1.1635640859603882, 0.5793697237968445, 0.565935492515564, -1.0076818466186523, 0.7148352265357971, -0.5520661473274231, 1.2221362590789795, 0.8583152890205383, -0.8325115442276001, -0.09648536890745163, 1.4412033557891846, 0.42766836285591125, -0.6772122979164124, -0.9655091762542725, -0.9926528930664062, 0.9176314473152161, 1.710060477256775, -0.016795191913843155, 0.006658148020505905, 0.8366166353225708, 0.6717467904090881, -1.2374309301376343, 0.02175530232489109, -0.6834722757339478, -0.7423120737075806, 1.6646339893341064, 2.098597526550293, -0.21291224658489227, -0.1635551154613495, -0.6388502717018127, -1.204470157623291, 0.8095802068710327, -0.11104650795459747, 0.0796862244606018, 0.591893196105957, -0.5349540114402771, 1.0449855327606201, 0.835584819316864, 0.9620591402053833, 0.1476818174123764, 0.27741584181785583, 0.43958333134651184, -0.33699512481689453, -1.2027465105056763, -0.22151069343090057, -1.1038994789123535, -2.5273263454437256, 0.43334174156188965, -0.16950742900371552, -1.442041039466858, 0.09374973922967911, -1.0762869119644165, 0.9827258586883545, -0.5910888314247131, -1.1728659868240356, -1.4647188186645508, 0.12278422713279724, -0.0276356041431427, 0.8914767503738403, -1.542471170425415, -0.08665981888771057, 1.2360583543777466, 0.8591933250427246, -0.6766194701194763, 0.9887366890907288, 0.1931195855140686, 1.1453181505203247, 0.8446999192237854, -0.3622196912765503, 0.5412525534629822, 0.022164205089211464, -1.3370604515075684, 0.45961326360702515, 1.16999089717865, 0.15859416127204895, 1.5232172012329102, -0.5074875950813293, -0.01772664301097393, 0.4519476890563965, -0.6440320014953613, -0.4373990595340729, -0.45412662625312805, 0.6083757877349854, 0.0544993057847023, -0.7786344289779663, -0.01741970330476761, -0.043200574815273285, -0.30666905641555786, 0.16425658762454987, -1.5474319458007812, -0.13075706362724304, -0.4065699279308319, -0.609941303730011, -1.1926261186599731, -0.1310058832168579, 1.4488558769226074, -0.7058762311935425, -0.2857069969177246, 0.5076926946640015, 0.3061421811580658, 0.5644416809082031, 0.6761786341667175, -0.6998218297958374, -0.26964107155799866, -0.21129849553108215, -0.3524008095264435, 0.3887414038181305, 1.4117894172668457, -0.07080540806055069, -0.9019973874092102, 0.7058940529823303, -0.37891775369644165, 0.15770310163497925, 1.8618568181991577, 0.08594389259815216, -0.7679834365844727, 0.27649936079978943, -0.8060621619224548, 1.9288667440414429, 1.7168195247650146, 1.3529834747314453, -0.11118634790182114, -1.000531554222107, 0.6326186060905457, -0.37384626269340515, -0.4287645220756531, 0.8362602591514587, 0.4080980122089386, -0.1469780057668686, -1.3602349758148193, 0.783143162727356, 1.1045931577682495, -0.841982364654541, -0.763515055179596, 0.1310286819934845, -0.7144590020179749, 1.1509026288986206, 0.5629257559776306, 0.38178396224975586, 0.26557672023773193, 1.6799378395080566, 0.7610187530517578, -0.4261120557785034, 0.5343080163002014, 0.5109614729881287, -0.15482690930366516, -2.07415771484375, -1.123383641242981, 0.3503105044364929, -0.5362080335617065, -1.6778874397277832, 1.3849170207977295, -1.1657555103302002, -0.9591770768165588, 0.5592634677886963, 0.025195961818099022, 1.4084151983261108, 0.38183873891830444, 1.5652285814285278, 2.0746190547943115, 0.8475723266601562, 0.4587089717388153, 1.2560869455337524, -0.15260258316993713, -0.5348137021064758, 1.812571406364441, -0.4200064539909363, 0.5127772688865662, 1.108980655670166, -0.31218528747558594, -1.0987087488174438, -0.7354901432991028, -1.232336163520813, -0.7373429536819458, 1.1398478746414185, 0.10811838507652283, -1.1470733880996704, 0.3219306766986847, 1.5342893600463867, 0.13344928622245789, -0.28587594628334045, 0.6629930734634399, 0.3914968967437744, -0.8075166940689087, -0.03998994454741478, -0.9267504215240479, 0.5153114199638367, -0.2396850734949112, -0.3658052086830139, 0.37343621253967285, 0.4311501681804657, 1.3130249977111816, -0.02151661366224289, 0.11104961484670639, 1.1436570882797241, -1.4928313493728638, 1.4507560729980469, -0.7183529138565063, 0.31814879179000854, -2.4281225204467773, 1.377151608467102, -0.7643240690231323, 1.9650654792785645, -2.732077121734619, 0.4798334240913391, -0.5549761056900024, -0.5246121883392334, 0.3129397928714752, -0.285585880279541, 0.12570537626743317, -0.14625605940818787, -1.1652913093566895, 0.01098158024251461, -0.642076313495636, 0.5893160700798035, 1.1833802461624146, 1.3668360710144043, -1.1845520734786987, -0.22442474961280823, -1.711050271987915, -0.16132225096225739, -0.799763023853302, 0.2807985246181488, -1.950317144393921, -0.13266290724277496, -1.9058295488357544, -2.371067762374878, -1.2479007244110107, -0.7706979513168335, 1.0766416788101196, 0.12216685712337494, -0.83450847864151, 1.2545506954193115, -0.38769087195396423, -1.8363536596298218, 1.1411515474319458, -2.1474196910858154 ]
https://github.com/huggingface/datasets/issues/4506
Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results
Hi ! Thanks for reporting. This bug seems to appear in python 3.9 using dill 3.5.1 As a workaround you can use an older version of dill: ``` pip install "dill<0.3.5" ```
## Describe the bug Sometimes I get messages about not being able to hash a method: `Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset. _map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` Whilst the function looks like this: ```python @staticmethod def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example): speaker_id, dialogue = tuple(zip(*(example["dialogue"]))) example["speaker_id"] = speaker_id example["dialogue"] = dialogue return example ``` This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step. This error is sometimes causing a failure to use cached data, instead of re-running all steps again. ## Steps to reproduce the bug ```python import copy import datasets from datasets import arrow_dataset def main(): dataset = datasets.load_dataset("blended_skill_talk") res = dataset.map(method) print(res) def method(example: arrow_dataset.Example): example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance']) return example if __name__ == '__main__': main() ``` Run with: ``` python -m reproduce_error ``` ## Expected results Dataset is mapped and cached correctly. ## Actual results The code outputs this at some point: `Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: - Platform: Ubuntu 20.04.3 - Python version: 3.9.12 - PyArrow version: 8.0.0 - Datasets version: 2.3.1
709
32
Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results ## Describe the bug Sometimes I get messages about not being able to hash a method: `Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset. _map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` Whilst the function looks like this: ```python @staticmethod def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example): speaker_id, dialogue = tuple(zip(*(example["dialogue"]))) example["speaker_id"] = speaker_id example["dialogue"] = dialogue return example ``` This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step. This error is sometimes causing a failure to use cached data, instead of re-running all steps again. ## Steps to reproduce the bug ```python import copy import datasets from datasets import arrow_dataset def main(): dataset = datasets.load_dataset("blended_skill_talk") res = dataset.map(method) print(res) def method(example: arrow_dataset.Example): example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance']) return example if __name__ == '__main__': main() ``` Run with: ``` python -m reproduce_error ``` ## Expected results Dataset is mapped and cached correctly. ## Actual results The code outputs this at some point: `Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: - Platform: Ubuntu 20.04.3 - Python version: 3.9.12 - PyArrow version: 8.0.0 - Datasets version: 2.3.1 Hi ! Thanks for reporting. This bug seems to appear in python 3.9 using dill 3.5.1 As a workaround you can use an older version of dill: ``` pip install "dill<0.3.5" ```
[ -1.2236682176589966, -0.9719545841217041, -0.6711602210998535, 1.5704116821289062, -0.1607566624879837, -1.2200264930725098, 0.11984287202358246, -1.0986934900283813, 1.6868888139724731, -0.8310468792915344, 0.3015105426311493, -1.673458218574524, -0.02658887393772602, -0.5949078798294067, -0.7658260464668274, -0.832206130027771, -0.39108237624168396, -0.7517399191856384, 1.0681325197219849, 2.4019992351531982, 1.2144354581832886, -1.3896740674972534, 2.75685715675354, 0.7387657761573792, -0.16742350161075592, -1.0075247287750244, 0.5181538462638855, -0.03280489891767502, -1.2779796123504639, -0.49577596783638, -0.9115095138549805, -0.10126730054616928, -0.5323833227157593, -0.4578745663166046, -0.07612830400466919, 0.4621469974517822, -0.307891845703125, -0.48355525732040405, -0.516963541507721, -0.8349295854568481, 0.4523859918117523, -0.3547392785549164, 0.8893911242485046, -0.3095901310443878, 1.8406052589416504, -0.6257010102272034, 0.4416869282722473, 0.7067756056785583, 1.312571406364441, 0.2222893089056015, -0.011248297989368439, 0.3583534359931946, 0.4280993938446045, -0.05000385642051697, 0.4930253028869629, 1.155888319015503, 0.6665478944778442, 0.4757757782936096, 0.7073903679847717, -2.2672667503356934, 1.318882703781128, -1.0404093265533447, 0.341043621301651, 1.2932806015014648, -0.9533101916313171, 0.34829533100128174, -1.6764378547668457, -0.04835011810064316, 0.6767947673797607, -2.15195631980896, 0.29968026280403137, -1.3063935041427612, -0.4382690489292145, 0.9926416277885437, 0.40401312708854675, -1.1805957555770874, 0.08233153820037842, -0.4480675756931305, 1.0722073316574097, 0.35946014523506165, 1.0478729009628296, -1.750827670097351, -0.010968821123242378, -0.2950541079044342, 0.10879890620708466, -1.2619754076004028, -1.546237826347351, 0.510388970375061, 0.6199567317962646, 0.6064279079437256, -0.18467338383197784, 1.1363495588302612, -1.0308393239974976, 0.6941100358963013, -1.059323787689209, -1.6852055788040161, -1.4103294610977173, -2.2731621265411377, -2.2573399543762207, 0.702470064163208, -0.45203328132629395, -0.5543317198753357, 2.0660622119903564, -1.0007364749908447, -1.7415339946746826, 1.1081435680389404, 0.2171517163515091, 0.07874272763729095, 2.3459954261779785, 0.20303934812545776, -0.7198864817619324, 0.4554702639579773, -0.7502601742744446, 0.7499590516090393, -0.4339045584201813, 1.3962500095367432, 0.3817434310913086, -1.0542691946029663, 1.5633103847503662, -0.3419751524925232, 0.6014313697814941, -0.6933509707450867, -0.4947293698787689, -0.7817190885543823, 0.2814810574054718, 1.895348310470581, -0.27360615134239197, 1.5704737901687622, -0.3753986060619354, -1.5319163799285889, -1.56820547580719, 0.8922914862632751, 0.47678959369659424, -0.8136042952537537, 0.10422831028699875, -0.5162355899810791, 0.10743319243192673, -0.10806460678577423, 1.2181816101074219, 1.2209930419921875, 0.7221775054931641, -0.4040035605430603, -0.8205128312110901, 0.12958720326423645, -0.04980103671550751, -0.7497644424438477, -1.7421681880950928, -0.2768758535385132, 0.1264066845178604, 0.6090866923332214, -1.1801732778549194, 1.705127239227295, 0.9375631809234619, 1.8539363145828247, 1.0511566400527954, -0.3597983121871948, 1.447661280632019, 0.09220011532306671, 1.83782160282135, -0.5542925000190735, 0.6501569151878357, -0.30104708671569824, -1.150084376335144, 0.8229352235794067, -0.3243708312511444, -2.032376766204834, -0.7855736613273621, -0.717726469039917, -0.18076708912849426, -0.8189793229103088, 0.8913458585739136, -0.36746805906295776, -1.4334306716918945, 0.18687696754932404, -0.7975472807884216, 0.23246292769908905, -1.074699878692627, 0.31809201836586, 0.7239323854446411, -0.6372407078742981, 0.14452707767486572, -0.22371909022331238, -1.2901686429977417, -0.4425911009311676, 0.41463446617126465, 1.8728818893432617, -0.7237443327903748, 0.8762018084526062, 1.1044808626174927, -0.6016872525215149, -0.020762376487255096, 0.26918846368789673, -0.22504188120365143, 0.8821456432342529, -1.0094038248062134, -0.46997007727622986, 1.301173210144043, -0.2625425159931183, -0.6524279117584229, 1.5587977170944214, 0.6904728412628174, -0.9720749258995056, -0.1746564656496048, -0.13605941832065582, -0.9122357368469238, 0.03522153198719025, -1.5746687650680542, -0.11012313514947891, 0.4920724630355835, -1.588474988937378, -0.46111157536506653, -0.24391120672225952, 1.3029597997665405, -0.1531851887702942, 1.4218125343322754, -0.4038507044315338, -0.17222607135772705, -0.28489890694618225, -0.3222857415676117, 0.14735528826713562, -0.1963188648223877, -0.6226447820663452, 0.13221661746501923, -0.7774423956871033, 0.3532942533493042, 1.4495089054107666, 0.2861005365848541, 0.0212179534137249, 0.5363715887069702, 1.1288208961486816, 0.3876667022705078, -0.040108270943164825, -0.7798987030982971, -1.6017606258392334, 1.9931000471115112, -1.4304380416870117, 2.014348268508911, 0.8075217008590698, -0.020687788724899292, -1.8115431070327759, -1.8783429861068726, 1.2624921798706055, 1.1313285827636719, 2.3047685623168945, 0.4186601936817169, 0.3947567343711853, -0.8567587733268738, -0.6459957361221313, 0.34839215874671936, -0.9962497353553772, -0.6924936771392822, 0.17581287026405334, 2.413195848464966, 1.7643513679504395, -0.37746620178222656, -0.21565325558185577, -1.0129358768463135, 1.4453115463256836, -0.277229368686676, 0.2263784259557724, 1.961346983909607, -0.17173995077610016, -1.0744154453277588, 1.2951527833938599, -2.4023287296295166, 0.20332133769989014, 2.0101070404052734, 0.24132373929023743, 0.10764405876398087, -1.4089391231536865, -0.5849059820175171, -0.330433189868927, -0.31561189889907837, -1.2589991092681885, 0.4839518070220947, -0.2516503632068634, -0.7705848217010498, -1.4382574558258057, 0.19463559985160828, -1.090804934501648, -1.6466432809829712, 0.27935791015625, 1.896215796470642, 2.0322422981262207, -0.7355366945266724, 1.6474608182907104, -0.30007240176200867, 0.19717304408550262, 1.183589220046997, 1.2437677383422852, 3.102341890335083, 1.8320645093917847, -1.358077049255371, 0.5816773176193237, -0.13461650907993317, -0.4822242558002472, 1.1862690448760986, -1.2186686992645264, 1.2854746580123901, -0.17123231291770935, -1.161792516708374, -1.3301002979278564, 1.0331276655197144, 0.5014632940292358, 0.07239522784948349, -0.48669230937957764, 1.211129069328308, 0.0098058320581913, 1.3233777284622192, 0.5884625911712646, -0.3606269359588623, 0.5634105801582336, -0.36763498187065125, -0.5023186206817627, 1.4686778783798218, 0.23374950885772705, -1.3681608438491821, -2.207019567489624, -0.16520603001117706, -0.8183332681655884, 0.08635270595550537, -0.5655059218406677, -1.0133178234100342, 1.648946762084961, 0.3459622263908386, -1.300330638885498, -0.2948453724384308, -0.31363871693611145, -0.5615133047103882, 2.7101783752441406, -1.2170112133026123, -0.24767176806926727, -1.0130592584609985, -0.6629960536956787, 1.7103794813156128, -1.2470329999923706, -0.25240471959114075, -1.0708565711975098, -0.546017050743103, -1.2762895822525024, -0.53146892786026, 0.061013832688331604, -1.0185397863388062, 0.8584590554237366, 0.14793848991394043, -1.2042934894561768, -0.36373603343963623, -0.8595758080482483, 0.9804704189300537, -0.19900117814540863, 0.1146484911441803, 1.8356019258499146, 0.37312549352645874, -0.4049395024776459, 0.8737404346466064, 1.178609013557434, 0.6496304273605347, -0.6077494025230408, 0.19433237612247467, -0.6099799871444702, 0.3318597376346588, -1.3478171825408936, 0.27768439054489136, -2.905200481414795, 0.6045081615447998, -0.024120986461639404, 0.017367271706461906, -0.021042264997959137, -1.3578239679336548, 1.0481311082839966, 2.5584516525268555, -1.2533271312713623, 0.5186822414398193, 0.2984755337238312, 1.1471179723739624, -1.6577365398406982, 0.3793008327484131, -0.4481993615627289, 2.106780529022217, 0.2832088768482208, 1.3064368963241577, -0.4499593675136566, -2.3628923892974854, 0.6491718292236328, -1.3186272382736206, -1.1631501913070679, 0.766388475894928, -0.9321426153182983, 0.1298084855079651, -1.4456262588500977, -0.26609688997268677, -0.8362825512886047, -1.2678542137145996, 0.6353310942649841, 0.20875287055969238, 0.34491509199142456, -0.5884895920753479, 0.30821719765663147, -2.1935157775878906, -1.3087834119796753, -0.2168881595134735, -0.9439920783042908, 0.49347370862960815, -0.46183812618255615, 0.6619694828987122, -0.2256210446357727, -0.003971514292061329, 0.33385351300239563, 1.4994856119155884, 3.4510514736175537, 0.2888385057449341, 0.28112757205963135, -0.2060108333826065, -0.9118542075157166, 1.3956780433654785, 0.8586915135383606, -0.20074476301670074, -0.5430330038070679, -1.0514005422592163, 1.2831966876983643, 1.9728457927703857, 0.9202224612236023, -0.004794707987457514, -0.7997965812683105, -0.7505559921264648, -0.07475648075342178, 0.1598924994468689, 0.47400176525115967, 0.8759167194366455, 0.1230456680059433, 0.09854787588119507, 1.4468430280685425, 1.1294291019439697, -0.39726436138153076, 0.32112276554107666, -0.8336794972419739, -0.4499587118625641, 0.5289591550827026, 0.2819562256336212, -0.0924706682562828, 0.3478464186191559, -1.0294914245605469, -0.25335270166397095, -0.41705361008644104, -0.83735191822052, -0.6796057224273682, -0.432064950466156, -0.34553858637809753, 1.5709255933761597, 0.15008796751499176, -0.5635749101638794, -0.07495073974132538, -0.7008404731750488, -0.12176074832677841, -1.0319432020187378, 0.31156066060066223, -0.09338939189910889, -0.17760208249092102, -0.14938390254974365, 1.7072170972824097, -0.9243481755256653, -2.042313814163208, 0.22215019166469574, 0.18872623145580292, -0.2822483479976654, 0.19173897802829742, 1.7168785333633423, 0.5755175948143005, 1.406846523284912, 1.426003098487854, 0.9356948137283325, -0.6761525273323059, -1.3364031314849854, 0.6358749866485596, 0.9662024974822998, -1.3575819730758667, 0.8111566305160522, -0.05052434653043747, -0.5453405976295471, 0.6230406761169434, 1.3311141729354858, 0.5743732452392578, -1.9732890129089355, 0.7378479838371277, -1.0225028991699219, 0.8247995972633362, 0.8215060234069824, 0.7071459889411926, 0.18517139554023743, 0.7703344225883484, -1.1695160865783691, -1.1480019092559814, -0.7031066417694092, -0.771229088306427, 1.948448896408081, -0.3241686522960663, 0.5790579915046692, -0.22643259167671204, -1.3569310903549194, -0.09703851491212845, 0.7226120233535767, 0.31318002939224243, -0.5874950885772705, 0.8053494691848755, -0.6345045566558838, -1.1106678247451782, -1.265519142150879, -0.4395987391471863, -1.0561414957046509, -0.9535641670227051, 1.0032917261123657, 0.7876846194267273, 0.23966987431049347, 1.8845794200897217, 0.673501193523407, 0.28642207384109497, -2.557234287261963, 0.8515827655792236, 0.3110066056251526, -0.08108733594417572, 0.8516558408737183, 0.32953521609306335, 0.9602731466293335, 0.09357842803001404, 0.589941143989563, -2.4746861457824707, 2.2737009525299072, -0.23540562391281128, 0.7085899710655212, -0.106333889067173, -0.21213677525520325, 1.1635640859603882, 0.5793697237968445, 0.565935492515564, -1.0076818466186523, 0.7148352265357971, -0.5520661473274231, 1.2221362590789795, 0.8583152890205383, -0.8325115442276001, -0.09648536890745163, 1.4412033557891846, 0.42766836285591125, -0.6772122979164124, -0.9655091762542725, -0.9926528930664062, 0.9176314473152161, 1.710060477256775, -0.016795191913843155, 0.006658148020505905, 0.8366166353225708, 0.6717467904090881, -1.2374309301376343, 0.02175530232489109, -0.6834722757339478, -0.7423120737075806, 1.6646339893341064, 2.098597526550293, -0.21291224658489227, -0.1635551154613495, -0.6388502717018127, -1.204470157623291, 0.8095802068710327, -0.11104650795459747, 0.0796862244606018, 0.591893196105957, -0.5349540114402771, 1.0449855327606201, 0.835584819316864, 0.9620591402053833, 0.1476818174123764, 0.27741584181785583, 0.43958333134651184, -0.33699512481689453, -1.2027465105056763, -0.22151069343090057, -1.1038994789123535, -2.5273263454437256, 0.43334174156188965, -0.16950742900371552, -1.442041039466858, 0.09374973922967911, -1.0762869119644165, 0.9827258586883545, -0.5910888314247131, -1.1728659868240356, -1.4647188186645508, 0.12278422713279724, -0.0276356041431427, 0.8914767503738403, -1.542471170425415, -0.08665981888771057, 1.2360583543777466, 0.8591933250427246, -0.6766194701194763, 0.9887366890907288, 0.1931195855140686, 1.1453181505203247, 0.8446999192237854, -0.3622196912765503, 0.5412525534629822, 0.022164205089211464, -1.3370604515075684, 0.45961326360702515, 1.16999089717865, 0.15859416127204895, 1.5232172012329102, -0.5074875950813293, -0.01772664301097393, 0.4519476890563965, -0.6440320014953613, -0.4373990595340729, -0.45412662625312805, 0.6083757877349854, 0.0544993057847023, -0.7786344289779663, -0.01741970330476761, -0.043200574815273285, -0.30666905641555786, 0.16425658762454987, -1.5474319458007812, -0.13075706362724304, -0.4065699279308319, -0.609941303730011, -1.1926261186599731, -0.1310058832168579, 1.4488558769226074, -0.7058762311935425, -0.2857069969177246, 0.5076926946640015, 0.3061421811580658, 0.5644416809082031, 0.6761786341667175, -0.6998218297958374, -0.26964107155799866, -0.21129849553108215, -0.3524008095264435, 0.3887414038181305, 1.4117894172668457, -0.07080540806055069, -0.9019973874092102, 0.7058940529823303, -0.37891775369644165, 0.15770310163497925, 1.8618568181991577, 0.08594389259815216, -0.7679834365844727, 0.27649936079978943, -0.8060621619224548, 1.9288667440414429, 1.7168195247650146, 1.3529834747314453, -0.11118634790182114, -1.000531554222107, 0.6326186060905457, -0.37384626269340515, -0.4287645220756531, 0.8362602591514587, 0.4080980122089386, -0.1469780057668686, -1.3602349758148193, 0.783143162727356, 1.1045931577682495, -0.841982364654541, -0.763515055179596, 0.1310286819934845, -0.7144590020179749, 1.1509026288986206, 0.5629257559776306, 0.38178396224975586, 0.26557672023773193, 1.6799378395080566, 0.7610187530517578, -0.4261120557785034, 0.5343080163002014, 0.5109614729881287, -0.15482690930366516, -2.07415771484375, -1.123383641242981, 0.3503105044364929, -0.5362080335617065, -1.6778874397277832, 1.3849170207977295, -1.1657555103302002, -0.9591770768165588, 0.5592634677886963, 0.025195961818099022, 1.4084151983261108, 0.38183873891830444, 1.5652285814285278, 2.0746190547943115, 0.8475723266601562, 0.4587089717388153, 1.2560869455337524, -0.15260258316993713, -0.5348137021064758, 1.812571406364441, -0.4200064539909363, 0.5127772688865662, 1.108980655670166, -0.31218528747558594, -1.0987087488174438, -0.7354901432991028, -1.232336163520813, -0.7373429536819458, 1.1398478746414185, 0.10811838507652283, -1.1470733880996704, 0.3219306766986847, 1.5342893600463867, 0.13344928622245789, -0.28587594628334045, 0.6629930734634399, 0.3914968967437744, -0.8075166940689087, -0.03998994454741478, -0.9267504215240479, 0.5153114199638367, -0.2396850734949112, -0.3658052086830139, 0.37343621253967285, 0.4311501681804657, 1.3130249977111816, -0.02151661366224289, 0.11104961484670639, 1.1436570882797241, -1.4928313493728638, 1.4507560729980469, -0.7183529138565063, 0.31814879179000854, -2.4281225204467773, 1.377151608467102, -0.7643240690231323, 1.9650654792785645, -2.732077121734619, 0.4798334240913391, -0.5549761056900024, -0.5246121883392334, 0.3129397928714752, -0.285585880279541, 0.12570537626743317, -0.14625605940818787, -1.1652913093566895, 0.01098158024251461, -0.642076313495636, 0.5893160700798035, 1.1833802461624146, 1.3668360710144043, -1.1845520734786987, -0.22442474961280823, -1.711050271987915, -0.16132225096225739, -0.799763023853302, 0.2807985246181488, -1.950317144393921, -0.13266290724277496, -1.9058295488357544, -2.371067762374878, -1.2479007244110107, -0.7706979513168335, 1.0766416788101196, 0.12216685712337494, -0.83450847864151, 1.2545506954193115, -0.38769087195396423, -1.8363536596298218, 1.1411515474319458, -2.1474196910858154 ]
https://github.com/huggingface/datasets/issues/4506
Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results
installing `dill<0.3.5` after installing `datasets` by pip results in dependency conflict with the version required for `multiprocess`. It can be solved by installing `pip install datasets "dill<0.3.5"` (simultaneously) on a clean environment
## Describe the bug Sometimes I get messages about not being able to hash a method: `Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset. _map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` Whilst the function looks like this: ```python @staticmethod def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example): speaker_id, dialogue = tuple(zip(*(example["dialogue"]))) example["speaker_id"] = speaker_id example["dialogue"] = dialogue return example ``` This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step. This error is sometimes causing a failure to use cached data, instead of re-running all steps again. ## Steps to reproduce the bug ```python import copy import datasets from datasets import arrow_dataset def main(): dataset = datasets.load_dataset("blended_skill_talk") res = dataset.map(method) print(res) def method(example: arrow_dataset.Example): example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance']) return example if __name__ == '__main__': main() ``` Run with: ``` python -m reproduce_error ``` ## Expected results Dataset is mapped and cached correctly. ## Actual results The code outputs this at some point: `Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: - Platform: Ubuntu 20.04.3 - Python version: 3.9.12 - PyArrow version: 8.0.0 - Datasets version: 2.3.1
709
32
Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results ## Describe the bug Sometimes I get messages about not being able to hash a method: `Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset. _map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` Whilst the function looks like this: ```python @staticmethod def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example): speaker_id, dialogue = tuple(zip(*(example["dialogue"]))) example["speaker_id"] = speaker_id example["dialogue"] = dialogue return example ``` This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step. This error is sometimes causing a failure to use cached data, instead of re-running all steps again. ## Steps to reproduce the bug ```python import copy import datasets from datasets import arrow_dataset def main(): dataset = datasets.load_dataset("blended_skill_talk") res = dataset.map(method) print(res) def method(example: arrow_dataset.Example): example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance']) return example if __name__ == '__main__': main() ``` Run with: ``` python -m reproduce_error ``` ## Expected results Dataset is mapped and cached correctly. ## Actual results The code outputs this at some point: `Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: - Platform: Ubuntu 20.04.3 - Python version: 3.9.12 - PyArrow version: 8.0.0 - Datasets version: 2.3.1 installing `dill<0.3.5` after installing `datasets` by pip results in dependency conflict with the version required for `multiprocess`. It can be solved by installing `pip install datasets "dill<0.3.5"` (simultaneously) on a clean environment
[ -1.2236682176589966, -0.9719545841217041, -0.6711602210998535, 1.5704116821289062, -0.1607566624879837, -1.2200264930725098, 0.11984287202358246, -1.0986934900283813, 1.6868888139724731, -0.8310468792915344, 0.3015105426311493, -1.673458218574524, -0.02658887393772602, -0.5949078798294067, -0.7658260464668274, -0.832206130027771, -0.39108237624168396, -0.7517399191856384, 1.0681325197219849, 2.4019992351531982, 1.2144354581832886, -1.3896740674972534, 2.75685715675354, 0.7387657761573792, -0.16742350161075592, -1.0075247287750244, 0.5181538462638855, -0.03280489891767502, -1.2779796123504639, -0.49577596783638, -0.9115095138549805, -0.10126730054616928, -0.5323833227157593, -0.4578745663166046, -0.07612830400466919, 0.4621469974517822, -0.307891845703125, -0.48355525732040405, -0.516963541507721, -0.8349295854568481, 0.4523859918117523, -0.3547392785549164, 0.8893911242485046, -0.3095901310443878, 1.8406052589416504, -0.6257010102272034, 0.4416869282722473, 0.7067756056785583, 1.312571406364441, 0.2222893089056015, -0.011248297989368439, 0.3583534359931946, 0.4280993938446045, -0.05000385642051697, 0.4930253028869629, 1.155888319015503, 0.6665478944778442, 0.4757757782936096, 0.7073903679847717, -2.2672667503356934, 1.318882703781128, -1.0404093265533447, 0.341043621301651, 1.2932806015014648, -0.9533101916313171, 0.34829533100128174, -1.6764378547668457, -0.04835011810064316, 0.6767947673797607, -2.15195631980896, 0.29968026280403137, -1.3063935041427612, -0.4382690489292145, 0.9926416277885437, 0.40401312708854675, -1.1805957555770874, 0.08233153820037842, -0.4480675756931305, 1.0722073316574097, 0.35946014523506165, 1.0478729009628296, -1.750827670097351, -0.010968821123242378, -0.2950541079044342, 0.10879890620708466, -1.2619754076004028, -1.546237826347351, 0.510388970375061, 0.6199567317962646, 0.6064279079437256, -0.18467338383197784, 1.1363495588302612, -1.0308393239974976, 0.6941100358963013, -1.059323787689209, -1.6852055788040161, -1.4103294610977173, -2.2731621265411377, -2.2573399543762207, 0.702470064163208, -0.45203328132629395, -0.5543317198753357, 2.0660622119903564, -1.0007364749908447, -1.7415339946746826, 1.1081435680389404, 0.2171517163515091, 0.07874272763729095, 2.3459954261779785, 0.20303934812545776, -0.7198864817619324, 0.4554702639579773, -0.7502601742744446, 0.7499590516090393, -0.4339045584201813, 1.3962500095367432, 0.3817434310913086, -1.0542691946029663, 1.5633103847503662, -0.3419751524925232, 0.6014313697814941, -0.6933509707450867, -0.4947293698787689, -0.7817190885543823, 0.2814810574054718, 1.895348310470581, -0.27360615134239197, 1.5704737901687622, -0.3753986060619354, -1.5319163799285889, -1.56820547580719, 0.8922914862632751, 0.47678959369659424, -0.8136042952537537, 0.10422831028699875, -0.5162355899810791, 0.10743319243192673, -0.10806460678577423, 1.2181816101074219, 1.2209930419921875, 0.7221775054931641, -0.4040035605430603, -0.8205128312110901, 0.12958720326423645, -0.04980103671550751, -0.7497644424438477, -1.7421681880950928, -0.2768758535385132, 0.1264066845178604, 0.6090866923332214, -1.1801732778549194, 1.705127239227295, 0.9375631809234619, 1.8539363145828247, 1.0511566400527954, -0.3597983121871948, 1.447661280632019, 0.09220011532306671, 1.83782160282135, -0.5542925000190735, 0.6501569151878357, -0.30104708671569824, -1.150084376335144, 0.8229352235794067, -0.3243708312511444, -2.032376766204834, -0.7855736613273621, -0.717726469039917, -0.18076708912849426, -0.8189793229103088, 0.8913458585739136, -0.36746805906295776, -1.4334306716918945, 0.18687696754932404, -0.7975472807884216, 0.23246292769908905, -1.074699878692627, 0.31809201836586, 0.7239323854446411, -0.6372407078742981, 0.14452707767486572, -0.22371909022331238, -1.2901686429977417, -0.4425911009311676, 0.41463446617126465, 1.8728818893432617, -0.7237443327903748, 0.8762018084526062, 1.1044808626174927, -0.6016872525215149, -0.020762376487255096, 0.26918846368789673, -0.22504188120365143, 0.8821456432342529, -1.0094038248062134, -0.46997007727622986, 1.301173210144043, -0.2625425159931183, -0.6524279117584229, 1.5587977170944214, 0.6904728412628174, -0.9720749258995056, -0.1746564656496048, -0.13605941832065582, -0.9122357368469238, 0.03522153198719025, -1.5746687650680542, -0.11012313514947891, 0.4920724630355835, -1.588474988937378, -0.46111157536506653, -0.24391120672225952, 1.3029597997665405, -0.1531851887702942, 1.4218125343322754, -0.4038507044315338, -0.17222607135772705, -0.28489890694618225, -0.3222857415676117, 0.14735528826713562, -0.1963188648223877, -0.6226447820663452, 0.13221661746501923, -0.7774423956871033, 0.3532942533493042, 1.4495089054107666, 0.2861005365848541, 0.0212179534137249, 0.5363715887069702, 1.1288208961486816, 0.3876667022705078, -0.040108270943164825, -0.7798987030982971, -1.6017606258392334, 1.9931000471115112, -1.4304380416870117, 2.014348268508911, 0.8075217008590698, -0.020687788724899292, -1.8115431070327759, -1.8783429861068726, 1.2624921798706055, 1.1313285827636719, 2.3047685623168945, 0.4186601936817169, 0.3947567343711853, -0.8567587733268738, -0.6459957361221313, 0.34839215874671936, -0.9962497353553772, -0.6924936771392822, 0.17581287026405334, 2.413195848464966, 1.7643513679504395, -0.37746620178222656, -0.21565325558185577, -1.0129358768463135, 1.4453115463256836, -0.277229368686676, 0.2263784259557724, 1.961346983909607, -0.17173995077610016, -1.0744154453277588, 1.2951527833938599, -2.4023287296295166, 0.20332133769989014, 2.0101070404052734, 0.24132373929023743, 0.10764405876398087, -1.4089391231536865, -0.5849059820175171, -0.330433189868927, -0.31561189889907837, -1.2589991092681885, 0.4839518070220947, -0.2516503632068634, -0.7705848217010498, -1.4382574558258057, 0.19463559985160828, -1.090804934501648, -1.6466432809829712, 0.27935791015625, 1.896215796470642, 2.0322422981262207, -0.7355366945266724, 1.6474608182907104, -0.30007240176200867, 0.19717304408550262, 1.183589220046997, 1.2437677383422852, 3.102341890335083, 1.8320645093917847, -1.358077049255371, 0.5816773176193237, -0.13461650907993317, -0.4822242558002472, 1.1862690448760986, -1.2186686992645264, 1.2854746580123901, -0.17123231291770935, -1.161792516708374, -1.3301002979278564, 1.0331276655197144, 0.5014632940292358, 0.07239522784948349, -0.48669230937957764, 1.211129069328308, 0.0098058320581913, 1.3233777284622192, 0.5884625911712646, -0.3606269359588623, 0.5634105801582336, -0.36763498187065125, -0.5023186206817627, 1.4686778783798218, 0.23374950885772705, -1.3681608438491821, -2.207019567489624, -0.16520603001117706, -0.8183332681655884, 0.08635270595550537, -0.5655059218406677, -1.0133178234100342, 1.648946762084961, 0.3459622263908386, -1.300330638885498, -0.2948453724384308, -0.31363871693611145, -0.5615133047103882, 2.7101783752441406, -1.2170112133026123, -0.24767176806926727, -1.0130592584609985, -0.6629960536956787, 1.7103794813156128, -1.2470329999923706, -0.25240471959114075, -1.0708565711975098, -0.546017050743103, -1.2762895822525024, -0.53146892786026, 0.061013832688331604, -1.0185397863388062, 0.8584590554237366, 0.14793848991394043, -1.2042934894561768, -0.36373603343963623, -0.8595758080482483, 0.9804704189300537, -0.19900117814540863, 0.1146484911441803, 1.8356019258499146, 0.37312549352645874, -0.4049395024776459, 0.8737404346466064, 1.178609013557434, 0.6496304273605347, -0.6077494025230408, 0.19433237612247467, -0.6099799871444702, 0.3318597376346588, -1.3478171825408936, 0.27768439054489136, -2.905200481414795, 0.6045081615447998, -0.024120986461639404, 0.017367271706461906, -0.021042264997959137, -1.3578239679336548, 1.0481311082839966, 2.5584516525268555, -1.2533271312713623, 0.5186822414398193, 0.2984755337238312, 1.1471179723739624, -1.6577365398406982, 0.3793008327484131, -0.4481993615627289, 2.106780529022217, 0.2832088768482208, 1.3064368963241577, -0.4499593675136566, -2.3628923892974854, 0.6491718292236328, -1.3186272382736206, -1.1631501913070679, 0.766388475894928, -0.9321426153182983, 0.1298084855079651, -1.4456262588500977, -0.26609688997268677, -0.8362825512886047, -1.2678542137145996, 0.6353310942649841, 0.20875287055969238, 0.34491509199142456, -0.5884895920753479, 0.30821719765663147, -2.1935157775878906, -1.3087834119796753, -0.2168881595134735, -0.9439920783042908, 0.49347370862960815, -0.46183812618255615, 0.6619694828987122, -0.2256210446357727, -0.003971514292061329, 0.33385351300239563, 1.4994856119155884, 3.4510514736175537, 0.2888385057449341, 0.28112757205963135, -0.2060108333826065, -0.9118542075157166, 1.3956780433654785, 0.8586915135383606, -0.20074476301670074, -0.5430330038070679, -1.0514005422592163, 1.2831966876983643, 1.9728457927703857, 0.9202224612236023, -0.004794707987457514, -0.7997965812683105, -0.7505559921264648, -0.07475648075342178, 0.1598924994468689, 0.47400176525115967, 0.8759167194366455, 0.1230456680059433, 0.09854787588119507, 1.4468430280685425, 1.1294291019439697, -0.39726436138153076, 0.32112276554107666, -0.8336794972419739, -0.4499587118625641, 0.5289591550827026, 0.2819562256336212, -0.0924706682562828, 0.3478464186191559, -1.0294914245605469, -0.25335270166397095, -0.41705361008644104, -0.83735191822052, -0.6796057224273682, -0.432064950466156, -0.34553858637809753, 1.5709255933761597, 0.15008796751499176, -0.5635749101638794, -0.07495073974132538, -0.7008404731750488, -0.12176074832677841, -1.0319432020187378, 0.31156066060066223, -0.09338939189910889, -0.17760208249092102, -0.14938390254974365, 1.7072170972824097, -0.9243481755256653, -2.042313814163208, 0.22215019166469574, 0.18872623145580292, -0.2822483479976654, 0.19173897802829742, 1.7168785333633423, 0.5755175948143005, 1.406846523284912, 1.426003098487854, 0.9356948137283325, -0.6761525273323059, -1.3364031314849854, 0.6358749866485596, 0.9662024974822998, -1.3575819730758667, 0.8111566305160522, -0.05052434653043747, -0.5453405976295471, 0.6230406761169434, 1.3311141729354858, 0.5743732452392578, -1.9732890129089355, 0.7378479838371277, -1.0225028991699219, 0.8247995972633362, 0.8215060234069824, 0.7071459889411926, 0.18517139554023743, 0.7703344225883484, -1.1695160865783691, -1.1480019092559814, -0.7031066417694092, -0.771229088306427, 1.948448896408081, -0.3241686522960663, 0.5790579915046692, -0.22643259167671204, -1.3569310903549194, -0.09703851491212845, 0.7226120233535767, 0.31318002939224243, -0.5874950885772705, 0.8053494691848755, -0.6345045566558838, -1.1106678247451782, -1.265519142150879, -0.4395987391471863, -1.0561414957046509, -0.9535641670227051, 1.0032917261123657, 0.7876846194267273, 0.23966987431049347, 1.8845794200897217, 0.673501193523407, 0.28642207384109497, -2.557234287261963, 0.8515827655792236, 0.3110066056251526, -0.08108733594417572, 0.8516558408737183, 0.32953521609306335, 0.9602731466293335, 0.09357842803001404, 0.589941143989563, -2.4746861457824707, 2.2737009525299072, -0.23540562391281128, 0.7085899710655212, -0.106333889067173, -0.21213677525520325, 1.1635640859603882, 0.5793697237968445, 0.565935492515564, -1.0076818466186523, 0.7148352265357971, -0.5520661473274231, 1.2221362590789795, 0.8583152890205383, -0.8325115442276001, -0.09648536890745163, 1.4412033557891846, 0.42766836285591125, -0.6772122979164124, -0.9655091762542725, -0.9926528930664062, 0.9176314473152161, 1.710060477256775, -0.016795191913843155, 0.006658148020505905, 0.8366166353225708, 0.6717467904090881, -1.2374309301376343, 0.02175530232489109, -0.6834722757339478, -0.7423120737075806, 1.6646339893341064, 2.098597526550293, -0.21291224658489227, -0.1635551154613495, -0.6388502717018127, -1.204470157623291, 0.8095802068710327, -0.11104650795459747, 0.0796862244606018, 0.591893196105957, -0.5349540114402771, 1.0449855327606201, 0.835584819316864, 0.9620591402053833, 0.1476818174123764, 0.27741584181785583, 0.43958333134651184, -0.33699512481689453, -1.2027465105056763, -0.22151069343090057, -1.1038994789123535, -2.5273263454437256, 0.43334174156188965, -0.16950742900371552, -1.442041039466858, 0.09374973922967911, -1.0762869119644165, 0.9827258586883545, -0.5910888314247131, -1.1728659868240356, -1.4647188186645508, 0.12278422713279724, -0.0276356041431427, 0.8914767503738403, -1.542471170425415, -0.08665981888771057, 1.2360583543777466, 0.8591933250427246, -0.6766194701194763, 0.9887366890907288, 0.1931195855140686, 1.1453181505203247, 0.8446999192237854, -0.3622196912765503, 0.5412525534629822, 0.022164205089211464, -1.3370604515075684, 0.45961326360702515, 1.16999089717865, 0.15859416127204895, 1.5232172012329102, -0.5074875950813293, -0.01772664301097393, 0.4519476890563965, -0.6440320014953613, -0.4373990595340729, -0.45412662625312805, 0.6083757877349854, 0.0544993057847023, -0.7786344289779663, -0.01741970330476761, -0.043200574815273285, -0.30666905641555786, 0.16425658762454987, -1.5474319458007812, -0.13075706362724304, -0.4065699279308319, -0.609941303730011, -1.1926261186599731, -0.1310058832168579, 1.4488558769226074, -0.7058762311935425, -0.2857069969177246, 0.5076926946640015, 0.3061421811580658, 0.5644416809082031, 0.6761786341667175, -0.6998218297958374, -0.26964107155799866, -0.21129849553108215, -0.3524008095264435, 0.3887414038181305, 1.4117894172668457, -0.07080540806055069, -0.9019973874092102, 0.7058940529823303, -0.37891775369644165, 0.15770310163497925, 1.8618568181991577, 0.08594389259815216, -0.7679834365844727, 0.27649936079978943, -0.8060621619224548, 1.9288667440414429, 1.7168195247650146, 1.3529834747314453, -0.11118634790182114, -1.000531554222107, 0.6326186060905457, -0.37384626269340515, -0.4287645220756531, 0.8362602591514587, 0.4080980122089386, -0.1469780057668686, -1.3602349758148193, 0.783143162727356, 1.1045931577682495, -0.841982364654541, -0.763515055179596, 0.1310286819934845, -0.7144590020179749, 1.1509026288986206, 0.5629257559776306, 0.38178396224975586, 0.26557672023773193, 1.6799378395080566, 0.7610187530517578, -0.4261120557785034, 0.5343080163002014, 0.5109614729881287, -0.15482690930366516, -2.07415771484375, -1.123383641242981, 0.3503105044364929, -0.5362080335617065, -1.6778874397277832, 1.3849170207977295, -1.1657555103302002, -0.9591770768165588, 0.5592634677886963, 0.025195961818099022, 1.4084151983261108, 0.38183873891830444, 1.5652285814285278, 2.0746190547943115, 0.8475723266601562, 0.4587089717388153, 1.2560869455337524, -0.15260258316993713, -0.5348137021064758, 1.812571406364441, -0.4200064539909363, 0.5127772688865662, 1.108980655670166, -0.31218528747558594, -1.0987087488174438, -0.7354901432991028, -1.232336163520813, -0.7373429536819458, 1.1398478746414185, 0.10811838507652283, -1.1470733880996704, 0.3219306766986847, 1.5342893600463867, 0.13344928622245789, -0.28587594628334045, 0.6629930734634399, 0.3914968967437744, -0.8075166940689087, -0.03998994454741478, -0.9267504215240479, 0.5153114199638367, -0.2396850734949112, -0.3658052086830139, 0.37343621253967285, 0.4311501681804657, 1.3130249977111816, -0.02151661366224289, 0.11104961484670639, 1.1436570882797241, -1.4928313493728638, 1.4507560729980469, -0.7183529138565063, 0.31814879179000854, -2.4281225204467773, 1.377151608467102, -0.7643240690231323, 1.9650654792785645, -2.732077121734619, 0.4798334240913391, -0.5549761056900024, -0.5246121883392334, 0.3129397928714752, -0.285585880279541, 0.12570537626743317, -0.14625605940818787, -1.1652913093566895, 0.01098158024251461, -0.642076313495636, 0.5893160700798035, 1.1833802461624146, 1.3668360710144043, -1.1845520734786987, -0.22442474961280823, -1.711050271987915, -0.16132225096225739, -0.799763023853302, 0.2807985246181488, -1.950317144393921, -0.13266290724277496, -1.9058295488357544, -2.371067762374878, -1.2479007244110107, -0.7706979513168335, 1.0766416788101196, 0.12216685712337494, -0.83450847864151, 1.2545506954193115, -0.38769087195396423, -1.8363536596298218, 1.1411515474319458, -2.1474196910858154 ]
https://github.com/huggingface/datasets/issues/4506
Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results
This has been fixed in https://github.com/huggingface/datasets/pull/4516, we will do a new release soon to include the fix :)
## Describe the bug Sometimes I get messages about not being able to hash a method: `Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset. _map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` Whilst the function looks like this: ```python @staticmethod def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example): speaker_id, dialogue = tuple(zip(*(example["dialogue"]))) example["speaker_id"] = speaker_id example["dialogue"] = dialogue return example ``` This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step. This error is sometimes causing a failure to use cached data, instead of re-running all steps again. ## Steps to reproduce the bug ```python import copy import datasets from datasets import arrow_dataset def main(): dataset = datasets.load_dataset("blended_skill_talk") res = dataset.map(method) print(res) def method(example: arrow_dataset.Example): example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance']) return example if __name__ == '__main__': main() ``` Run with: ``` python -m reproduce_error ``` ## Expected results Dataset is mapped and cached correctly. ## Actual results The code outputs this at some point: `Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: - Platform: Ubuntu 20.04.3 - Python version: 3.9.12 - PyArrow version: 8.0.0 - Datasets version: 2.3.1
709
18
Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results ## Describe the bug Sometimes I get messages about not being able to hash a method: `Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset. _map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` Whilst the function looks like this: ```python @staticmethod def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example): speaker_id, dialogue = tuple(zip(*(example["dialogue"]))) example["speaker_id"] = speaker_id example["dialogue"] = dialogue return example ``` This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step. This error is sometimes causing a failure to use cached data, instead of re-running all steps again. ## Steps to reproduce the bug ```python import copy import datasets from datasets import arrow_dataset def main(): dataset = datasets.load_dataset("blended_skill_talk") res = dataset.map(method) print(res) def method(example: arrow_dataset.Example): example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance']) return example if __name__ == '__main__': main() ``` Run with: ``` python -m reproduce_error ``` ## Expected results Dataset is mapped and cached correctly. ## Actual results The code outputs this at some point: `Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: - Platform: Ubuntu 20.04.3 - Python version: 3.9.12 - PyArrow version: 8.0.0 - Datasets version: 2.3.1 This has been fixed in https://github.com/huggingface/datasets/pull/4516, we will do a new release soon to include the fix :)
[ -1.2236682176589966, -0.9719545841217041, -0.6711602210998535, 1.5704116821289062, -0.1607566624879837, -1.2200264930725098, 0.11984287202358246, -1.0986934900283813, 1.6868888139724731, -0.8310468792915344, 0.3015105426311493, -1.673458218574524, -0.02658887393772602, -0.5949078798294067, -0.7658260464668274, -0.832206130027771, -0.39108237624168396, -0.7517399191856384, 1.0681325197219849, 2.4019992351531982, 1.2144354581832886, -1.3896740674972534, 2.75685715675354, 0.7387657761573792, -0.16742350161075592, -1.0075247287750244, 0.5181538462638855, -0.03280489891767502, -1.2779796123504639, -0.49577596783638, -0.9115095138549805, -0.10126730054616928, -0.5323833227157593, -0.4578745663166046, -0.07612830400466919, 0.4621469974517822, -0.307891845703125, -0.48355525732040405, -0.516963541507721, -0.8349295854568481, 0.4523859918117523, -0.3547392785549164, 0.8893911242485046, -0.3095901310443878, 1.8406052589416504, -0.6257010102272034, 0.4416869282722473, 0.7067756056785583, 1.312571406364441, 0.2222893089056015, -0.011248297989368439, 0.3583534359931946, 0.4280993938446045, -0.05000385642051697, 0.4930253028869629, 1.155888319015503, 0.6665478944778442, 0.4757757782936096, 0.7073903679847717, -2.2672667503356934, 1.318882703781128, -1.0404093265533447, 0.341043621301651, 1.2932806015014648, -0.9533101916313171, 0.34829533100128174, -1.6764378547668457, -0.04835011810064316, 0.6767947673797607, -2.15195631980896, 0.29968026280403137, -1.3063935041427612, -0.4382690489292145, 0.9926416277885437, 0.40401312708854675, -1.1805957555770874, 0.08233153820037842, -0.4480675756931305, 1.0722073316574097, 0.35946014523506165, 1.0478729009628296, -1.750827670097351, -0.010968821123242378, -0.2950541079044342, 0.10879890620708466, -1.2619754076004028, -1.546237826347351, 0.510388970375061, 0.6199567317962646, 0.6064279079437256, -0.18467338383197784, 1.1363495588302612, -1.0308393239974976, 0.6941100358963013, -1.059323787689209, -1.6852055788040161, -1.4103294610977173, -2.2731621265411377, -2.2573399543762207, 0.702470064163208, -0.45203328132629395, -0.5543317198753357, 2.0660622119903564, -1.0007364749908447, -1.7415339946746826, 1.1081435680389404, 0.2171517163515091, 0.07874272763729095, 2.3459954261779785, 0.20303934812545776, -0.7198864817619324, 0.4554702639579773, -0.7502601742744446, 0.7499590516090393, -0.4339045584201813, 1.3962500095367432, 0.3817434310913086, -1.0542691946029663, 1.5633103847503662, -0.3419751524925232, 0.6014313697814941, -0.6933509707450867, -0.4947293698787689, -0.7817190885543823, 0.2814810574054718, 1.895348310470581, -0.27360615134239197, 1.5704737901687622, -0.3753986060619354, -1.5319163799285889, -1.56820547580719, 0.8922914862632751, 0.47678959369659424, -0.8136042952537537, 0.10422831028699875, -0.5162355899810791, 0.10743319243192673, -0.10806460678577423, 1.2181816101074219, 1.2209930419921875, 0.7221775054931641, -0.4040035605430603, -0.8205128312110901, 0.12958720326423645, -0.04980103671550751, -0.7497644424438477, -1.7421681880950928, -0.2768758535385132, 0.1264066845178604, 0.6090866923332214, -1.1801732778549194, 1.705127239227295, 0.9375631809234619, 1.8539363145828247, 1.0511566400527954, -0.3597983121871948, 1.447661280632019, 0.09220011532306671, 1.83782160282135, -0.5542925000190735, 0.6501569151878357, -0.30104708671569824, -1.150084376335144, 0.8229352235794067, -0.3243708312511444, -2.032376766204834, -0.7855736613273621, -0.717726469039917, -0.18076708912849426, -0.8189793229103088, 0.8913458585739136, -0.36746805906295776, -1.4334306716918945, 0.18687696754932404, -0.7975472807884216, 0.23246292769908905, -1.074699878692627, 0.31809201836586, 0.7239323854446411, -0.6372407078742981, 0.14452707767486572, -0.22371909022331238, -1.2901686429977417, -0.4425911009311676, 0.41463446617126465, 1.8728818893432617, -0.7237443327903748, 0.8762018084526062, 1.1044808626174927, -0.6016872525215149, -0.020762376487255096, 0.26918846368789673, -0.22504188120365143, 0.8821456432342529, -1.0094038248062134, -0.46997007727622986, 1.301173210144043, -0.2625425159931183, -0.6524279117584229, 1.5587977170944214, 0.6904728412628174, -0.9720749258995056, -0.1746564656496048, -0.13605941832065582, -0.9122357368469238, 0.03522153198719025, -1.5746687650680542, -0.11012313514947891, 0.4920724630355835, -1.588474988937378, -0.46111157536506653, -0.24391120672225952, 1.3029597997665405, -0.1531851887702942, 1.4218125343322754, -0.4038507044315338, -0.17222607135772705, -0.28489890694618225, -0.3222857415676117, 0.14735528826713562, -0.1963188648223877, -0.6226447820663452, 0.13221661746501923, -0.7774423956871033, 0.3532942533493042, 1.4495089054107666, 0.2861005365848541, 0.0212179534137249, 0.5363715887069702, 1.1288208961486816, 0.3876667022705078, -0.040108270943164825, -0.7798987030982971, -1.6017606258392334, 1.9931000471115112, -1.4304380416870117, 2.014348268508911, 0.8075217008590698, -0.020687788724899292, -1.8115431070327759, -1.8783429861068726, 1.2624921798706055, 1.1313285827636719, 2.3047685623168945, 0.4186601936817169, 0.3947567343711853, -0.8567587733268738, -0.6459957361221313, 0.34839215874671936, -0.9962497353553772, -0.6924936771392822, 0.17581287026405334, 2.413195848464966, 1.7643513679504395, -0.37746620178222656, -0.21565325558185577, -1.0129358768463135, 1.4453115463256836, -0.277229368686676, 0.2263784259557724, 1.961346983909607, -0.17173995077610016, -1.0744154453277588, 1.2951527833938599, -2.4023287296295166, 0.20332133769989014, 2.0101070404052734, 0.24132373929023743, 0.10764405876398087, -1.4089391231536865, -0.5849059820175171, -0.330433189868927, -0.31561189889907837, -1.2589991092681885, 0.4839518070220947, -0.2516503632068634, -0.7705848217010498, -1.4382574558258057, 0.19463559985160828, -1.090804934501648, -1.6466432809829712, 0.27935791015625, 1.896215796470642, 2.0322422981262207, -0.7355366945266724, 1.6474608182907104, -0.30007240176200867, 0.19717304408550262, 1.183589220046997, 1.2437677383422852, 3.102341890335083, 1.8320645093917847, -1.358077049255371, 0.5816773176193237, -0.13461650907993317, -0.4822242558002472, 1.1862690448760986, -1.2186686992645264, 1.2854746580123901, -0.17123231291770935, -1.161792516708374, -1.3301002979278564, 1.0331276655197144, 0.5014632940292358, 0.07239522784948349, -0.48669230937957764, 1.211129069328308, 0.0098058320581913, 1.3233777284622192, 0.5884625911712646, -0.3606269359588623, 0.5634105801582336, -0.36763498187065125, -0.5023186206817627, 1.4686778783798218, 0.23374950885772705, -1.3681608438491821, -2.207019567489624, -0.16520603001117706, -0.8183332681655884, 0.08635270595550537, -0.5655059218406677, -1.0133178234100342, 1.648946762084961, 0.3459622263908386, -1.300330638885498, -0.2948453724384308, -0.31363871693611145, -0.5615133047103882, 2.7101783752441406, -1.2170112133026123, -0.24767176806926727, -1.0130592584609985, -0.6629960536956787, 1.7103794813156128, -1.2470329999923706, -0.25240471959114075, -1.0708565711975098, -0.546017050743103, -1.2762895822525024, -0.53146892786026, 0.061013832688331604, -1.0185397863388062, 0.8584590554237366, 0.14793848991394043, -1.2042934894561768, -0.36373603343963623, -0.8595758080482483, 0.9804704189300537, -0.19900117814540863, 0.1146484911441803, 1.8356019258499146, 0.37312549352645874, -0.4049395024776459, 0.8737404346466064, 1.178609013557434, 0.6496304273605347, -0.6077494025230408, 0.19433237612247467, -0.6099799871444702, 0.3318597376346588, -1.3478171825408936, 0.27768439054489136, -2.905200481414795, 0.6045081615447998, -0.024120986461639404, 0.017367271706461906, -0.021042264997959137, -1.3578239679336548, 1.0481311082839966, 2.5584516525268555, -1.2533271312713623, 0.5186822414398193, 0.2984755337238312, 1.1471179723739624, -1.6577365398406982, 0.3793008327484131, -0.4481993615627289, 2.106780529022217, 0.2832088768482208, 1.3064368963241577, -0.4499593675136566, -2.3628923892974854, 0.6491718292236328, -1.3186272382736206, -1.1631501913070679, 0.766388475894928, -0.9321426153182983, 0.1298084855079651, -1.4456262588500977, -0.26609688997268677, -0.8362825512886047, -1.2678542137145996, 0.6353310942649841, 0.20875287055969238, 0.34491509199142456, -0.5884895920753479, 0.30821719765663147, -2.1935157775878906, -1.3087834119796753, -0.2168881595134735, -0.9439920783042908, 0.49347370862960815, -0.46183812618255615, 0.6619694828987122, -0.2256210446357727, -0.003971514292061329, 0.33385351300239563, 1.4994856119155884, 3.4510514736175537, 0.2888385057449341, 0.28112757205963135, -0.2060108333826065, -0.9118542075157166, 1.3956780433654785, 0.8586915135383606, -0.20074476301670074, -0.5430330038070679, -1.0514005422592163, 1.2831966876983643, 1.9728457927703857, 0.9202224612236023, -0.004794707987457514, -0.7997965812683105, -0.7505559921264648, -0.07475648075342178, 0.1598924994468689, 0.47400176525115967, 0.8759167194366455, 0.1230456680059433, 0.09854787588119507, 1.4468430280685425, 1.1294291019439697, -0.39726436138153076, 0.32112276554107666, -0.8336794972419739, -0.4499587118625641, 0.5289591550827026, 0.2819562256336212, -0.0924706682562828, 0.3478464186191559, -1.0294914245605469, -0.25335270166397095, -0.41705361008644104, -0.83735191822052, -0.6796057224273682, -0.432064950466156, -0.34553858637809753, 1.5709255933761597, 0.15008796751499176, -0.5635749101638794, -0.07495073974132538, -0.7008404731750488, -0.12176074832677841, -1.0319432020187378, 0.31156066060066223, -0.09338939189910889, -0.17760208249092102, -0.14938390254974365, 1.7072170972824097, -0.9243481755256653, -2.042313814163208, 0.22215019166469574, 0.18872623145580292, -0.2822483479976654, 0.19173897802829742, 1.7168785333633423, 0.5755175948143005, 1.406846523284912, 1.426003098487854, 0.9356948137283325, -0.6761525273323059, -1.3364031314849854, 0.6358749866485596, 0.9662024974822998, -1.3575819730758667, 0.8111566305160522, -0.05052434653043747, -0.5453405976295471, 0.6230406761169434, 1.3311141729354858, 0.5743732452392578, -1.9732890129089355, 0.7378479838371277, -1.0225028991699219, 0.8247995972633362, 0.8215060234069824, 0.7071459889411926, 0.18517139554023743, 0.7703344225883484, -1.1695160865783691, -1.1480019092559814, -0.7031066417694092, -0.771229088306427, 1.948448896408081, -0.3241686522960663, 0.5790579915046692, -0.22643259167671204, -1.3569310903549194, -0.09703851491212845, 0.7226120233535767, 0.31318002939224243, -0.5874950885772705, 0.8053494691848755, -0.6345045566558838, -1.1106678247451782, -1.265519142150879, -0.4395987391471863, -1.0561414957046509, -0.9535641670227051, 1.0032917261123657, 0.7876846194267273, 0.23966987431049347, 1.8845794200897217, 0.673501193523407, 0.28642207384109497, -2.557234287261963, 0.8515827655792236, 0.3110066056251526, -0.08108733594417572, 0.8516558408737183, 0.32953521609306335, 0.9602731466293335, 0.09357842803001404, 0.589941143989563, -2.4746861457824707, 2.2737009525299072, -0.23540562391281128, 0.7085899710655212, -0.106333889067173, -0.21213677525520325, 1.1635640859603882, 0.5793697237968445, 0.565935492515564, -1.0076818466186523, 0.7148352265357971, -0.5520661473274231, 1.2221362590789795, 0.8583152890205383, -0.8325115442276001, -0.09648536890745163, 1.4412033557891846, 0.42766836285591125, -0.6772122979164124, -0.9655091762542725, -0.9926528930664062, 0.9176314473152161, 1.710060477256775, -0.016795191913843155, 0.006658148020505905, 0.8366166353225708, 0.6717467904090881, -1.2374309301376343, 0.02175530232489109, -0.6834722757339478, -0.7423120737075806, 1.6646339893341064, 2.098597526550293, -0.21291224658489227, -0.1635551154613495, -0.6388502717018127, -1.204470157623291, 0.8095802068710327, -0.11104650795459747, 0.0796862244606018, 0.591893196105957, -0.5349540114402771, 1.0449855327606201, 0.835584819316864, 0.9620591402053833, 0.1476818174123764, 0.27741584181785583, 0.43958333134651184, -0.33699512481689453, -1.2027465105056763, -0.22151069343090057, -1.1038994789123535, -2.5273263454437256, 0.43334174156188965, -0.16950742900371552, -1.442041039466858, 0.09374973922967911, -1.0762869119644165, 0.9827258586883545, -0.5910888314247131, -1.1728659868240356, -1.4647188186645508, 0.12278422713279724, -0.0276356041431427, 0.8914767503738403, -1.542471170425415, -0.08665981888771057, 1.2360583543777466, 0.8591933250427246, -0.6766194701194763, 0.9887366890907288, 0.1931195855140686, 1.1453181505203247, 0.8446999192237854, -0.3622196912765503, 0.5412525534629822, 0.022164205089211464, -1.3370604515075684, 0.45961326360702515, 1.16999089717865, 0.15859416127204895, 1.5232172012329102, -0.5074875950813293, -0.01772664301097393, 0.4519476890563965, -0.6440320014953613, -0.4373990595340729, -0.45412662625312805, 0.6083757877349854, 0.0544993057847023, -0.7786344289779663, -0.01741970330476761, -0.043200574815273285, -0.30666905641555786, 0.16425658762454987, -1.5474319458007812, -0.13075706362724304, -0.4065699279308319, -0.609941303730011, -1.1926261186599731, -0.1310058832168579, 1.4488558769226074, -0.7058762311935425, -0.2857069969177246, 0.5076926946640015, 0.3061421811580658, 0.5644416809082031, 0.6761786341667175, -0.6998218297958374, -0.26964107155799866, -0.21129849553108215, -0.3524008095264435, 0.3887414038181305, 1.4117894172668457, -0.07080540806055069, -0.9019973874092102, 0.7058940529823303, -0.37891775369644165, 0.15770310163497925, 1.8618568181991577, 0.08594389259815216, -0.7679834365844727, 0.27649936079978943, -0.8060621619224548, 1.9288667440414429, 1.7168195247650146, 1.3529834747314453, -0.11118634790182114, -1.000531554222107, 0.6326186060905457, -0.37384626269340515, -0.4287645220756531, 0.8362602591514587, 0.4080980122089386, -0.1469780057668686, -1.3602349758148193, 0.783143162727356, 1.1045931577682495, -0.841982364654541, -0.763515055179596, 0.1310286819934845, -0.7144590020179749, 1.1509026288986206, 0.5629257559776306, 0.38178396224975586, 0.26557672023773193, 1.6799378395080566, 0.7610187530517578, -0.4261120557785034, 0.5343080163002014, 0.5109614729881287, -0.15482690930366516, -2.07415771484375, -1.123383641242981, 0.3503105044364929, -0.5362080335617065, -1.6778874397277832, 1.3849170207977295, -1.1657555103302002, -0.9591770768165588, 0.5592634677886963, 0.025195961818099022, 1.4084151983261108, 0.38183873891830444, 1.5652285814285278, 2.0746190547943115, 0.8475723266601562, 0.4587089717388153, 1.2560869455337524, -0.15260258316993713, -0.5348137021064758, 1.812571406364441, -0.4200064539909363, 0.5127772688865662, 1.108980655670166, -0.31218528747558594, -1.0987087488174438, -0.7354901432991028, -1.232336163520813, -0.7373429536819458, 1.1398478746414185, 0.10811838507652283, -1.1470733880996704, 0.3219306766986847, 1.5342893600463867, 0.13344928622245789, -0.28587594628334045, 0.6629930734634399, 0.3914968967437744, -0.8075166940689087, -0.03998994454741478, -0.9267504215240479, 0.5153114199638367, -0.2396850734949112, -0.3658052086830139, 0.37343621253967285, 0.4311501681804657, 1.3130249977111816, -0.02151661366224289, 0.11104961484670639, 1.1436570882797241, -1.4928313493728638, 1.4507560729980469, -0.7183529138565063, 0.31814879179000854, -2.4281225204467773, 1.377151608467102, -0.7643240690231323, 1.9650654792785645, -2.732077121734619, 0.4798334240913391, -0.5549761056900024, -0.5246121883392334, 0.3129397928714752, -0.285585880279541, 0.12570537626743317, -0.14625605940818787, -1.1652913093566895, 0.01098158024251461, -0.642076313495636, 0.5893160700798035, 1.1833802461624146, 1.3668360710144043, -1.1845520734786987, -0.22442474961280823, -1.711050271987915, -0.16132225096225739, -0.799763023853302, 0.2807985246181488, -1.950317144393921, -0.13266290724277496, -1.9058295488357544, -2.371067762374878, -1.2479007244110107, -0.7706979513168335, 1.0766416788101196, 0.12216685712337494, -0.83450847864151, 1.2545506954193115, -0.38769087195396423, -1.8363536596298218, 1.1411515474319458, -2.1474196910858154 ]
https://github.com/huggingface/datasets/issues/4504
Can you please add the Stanford dog dataset?
would you like to give it a try, @dgrnd4? (maybe with the help of the dataset author?)
## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
710
17
Can you please add the Stanford dog dataset? ## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). would you like to give it a try, @dgrnd4? (maybe with the help of the dataset author?)
[ -1.2314651012420654, -1.0168015956878662, -0.6881980895996094, 1.336774468421936, -0.28165140748023987, -1.416405200958252, 0.10246836394071579, -0.9929340481758118, 1.6658562421798706, -0.5883573889732361, 0.2563953101634979, -1.7226545810699463, -0.0775846466422081, -0.5357686877250671, -0.8543954491615295, -0.8052470088005066, -0.46318575739860535, -0.902288019657135, 0.8259650468826294, 2.4900429248809814, 1.1477068662643433, -1.363701343536377, 2.743913412094116, 0.6941216588020325, -0.21553272008895874, -0.9917505383491516, 0.4744409918785095, 0.14228293299674988, -1.2042453289031982, -0.43397486209869385, -0.9041287899017334, -0.09614215046167374, -0.4556856155395508, -0.52656489610672, 0.1692178100347519, 0.35314059257507324, -0.02874547615647316, -0.3140191435813904, -0.6127726435661316, -0.6142576932907104, 0.47485852241516113, -0.409686803817749, 0.9168370962142944, -0.5385037660598755, 1.7790123224258423, -0.7152784466743469, 0.3744794428348541, 0.597235918045044, 1.3294481039047241, 0.17937326431274414, -0.04079529270529747, 0.3528820872306824, 0.44329559803009033, 0.06132566183805466, 0.4168369472026825, 1.2302422523498535, 0.6586876511573792, 0.572162389755249, 0.7066596746444702, -2.153878688812256, 1.3398540019989014, -0.9296516180038452, 0.4406468868255615, 1.4599055051803589, -1.001976490020752, 0.4108829200267792, -1.7979658842086792, -0.11389043182134628, 0.49300456047058105, -2.4199893474578857, 0.10506634414196014, -1.3247655630111694, -0.7255075573921204, 0.9209547638893127, 0.2069961577653885, -1.2684229612350464, 0.23977509140968323, -0.6469864845275879, 1.0028308629989624, 0.43861183524131775, 1.2097668647766113, -1.7048532962799072, -0.17176975309848785, -0.15859779715538025, 0.015240565873682499, -1.2993766069412231, -1.5955123901367188, 0.7794764041900635, 0.5561895966529846, 0.7135311365127563, -0.13544884324073792, 0.8329125642776489, -0.9602510929107666, 0.9834830164909363, -0.9750872254371643, -1.61477530002594, -1.4817042350769043, -2.275156021118164, -2.265275716781616, 0.983712911605835, -0.42122697830200195, -0.49037179350852966, 1.8565449714660645, -0.939781904220581, -1.7802467346191406, 1.032535433769226, 0.2191632091999054, 0.07396725565195084, 2.297367811203003, 0.23553065955638885, -0.6536349654197693, 0.33655789494514465, -0.7342128753662109, 0.8503201007843018, -0.3520391285419464, 1.460272192955017, 0.5343883037567139, -0.9339516162872314, 1.557141661643982, -0.5664762854576111, 0.47936463356018066, -0.5792756676673889, -0.6237276196479797, -0.8478235602378845, 0.43641936779022217, 1.9277535676956177, -0.34252098202705383, 1.6156005859375, -0.3637616038322449, -1.6550499200820923, -1.438725233078003, 0.7420614957809448, 0.5809211730957031, -0.8241639733314514, 0.03585510700941086, -0.3766494691371918, 0.08643688261508942, -0.04400220140814781, 1.140134572982788, 1.0819823741912842, 0.7257999181747437, -0.4049132466316223, -0.8502220511436462, 0.26469820737838745, -0.04775858670473099, -0.8299654126167297, -1.8509377241134644, -0.36729857325553894, 0.34833642840385437, 0.6223928332328796, -1.337392807006836, 1.5683258771896362, 0.870241105556488, 2.026906728744507, 0.931352436542511, -0.335685133934021, 1.34145188331604, 0.007027267478406429, 1.8258064985275269, -0.6740351915359497, 0.7004298567771912, -0.27923622727394104, -1.010924220085144, 0.7712358236312866, -0.4619719684123993, -2.1399097442626953, -0.7191145420074463, -0.9932329654693604, -0.20163466036319733, -0.7895751595497131, 0.9382553696632385, -0.3333263695240021, -1.2860286235809326, 0.1367143839597702, -0.7302019596099854, 0.20546527206897736, -1.2448245286941528, 0.13062076270580292, 0.9074885249137878, -0.641903281211853, -0.20390667021274567, -0.23500299453735352, -1.3186818361282349, -0.5801191329956055, 0.18734228610992432, 1.971353530883789, -0.67621910572052, 1.0365890264511108, 0.8245263695716858, -0.7497110366821289, 0.09789914637804031, 0.32385775446891785, -0.29451996088027954, 0.8922528624534607, -1.1759575605392456, -0.33111444115638733, 0.9971350431442261, -0.14859235286712646, -0.4377189874649048, 1.6084975004196167, 0.8651495575904846, -0.9622122645378113, -0.2199682742357254, -0.29084280133247375, -0.8102583289146423, -0.10026925802230835, -1.5202924013137817, -0.22991745173931122, 0.10122314840555191, -1.3884912729263306, -0.5673460364341736, -0.2509154975414276, 1.2969372272491455, -0.14809034764766693, 1.2344557046890259, -0.2693122923374176, -0.4838721752166748, -0.48701003193855286, -0.36388352513313293, 0.19106222689151764, -0.26859959959983826, -0.6196097731590271, 0.27308523654937744, -0.8000488877296448, 0.30622023344039917, 1.4786348342895508, 0.552696704864502, 0.020897701382637024, 0.6661261916160583, 1.0600647926330566, 0.2566201686859131, -0.07217755168676376, -0.8800413012504578, -1.51248037815094, 1.976549506187439, -1.4052610397338867, 1.761343002319336, 0.8085821866989136, -0.09798701107501984, -1.776583194732666, -1.8219177722930908, 1.2485077381134033, 1.265669345855713, 2.384979724884033, 0.6184167861938477, 0.4385421872138977, -0.807547390460968, -0.6906328797340393, 0.2578467130661011, -1.0867078304290771, -0.733845591545105, 0.0625385195016861, 2.3548336029052734, 1.9016798734664917, -0.7227009534835815, -0.16221389174461365, -1.0393555164337158, 1.347238540649414, -0.14198201894760132, 0.19156379997730255, 2.043891191482544, -0.3632979094982147, -1.0765154361724854, 1.2979304790496826, -2.238969564437866, 0.2064896821975708, 1.9991722106933594, 0.43901604413986206, 0.050842009484767914, -1.5020939111709595, -0.5926017761230469, -0.3678891956806183, -0.38116830587387085, -1.2170500755310059, 0.520493745803833, -0.30473509430885315, -0.8304432034492493, -1.5178937911987305, 0.0037001073360443115, -1.089167594909668, -1.7063639163970947, 0.4866248071193695, 1.8129669427871704, 1.948835015296936, -0.5885486602783203, 1.3734667301177979, -0.3111599087715149, 0.09942962229251862, 1.2810393571853638, 1.3023922443389893, 3.199402332305908, 2.013451337814331, -1.1240613460540771, 0.765693724155426, -0.1953214555978775, -0.39401087164878845, 1.0340209007263184, -1.0147823095321655, 1.143513798713684, -0.23501154780387878, -1.2430068254470825, -1.107043981552124, 1.0923306941986084, 0.5310682058334351, 0.027703944593667984, -0.6371170878410339, 1.175368070602417, 0.014807703904807568, 1.4689422845840454, 0.6009930968284607, -0.4232535660266876, 0.5588514804840088, -0.40646517276763916, -0.4795430302619934, 1.7149043083190918, 0.21078801155090332, -1.5278332233428955, -2.4079432487487793, -0.24968555569648743, -0.8766083121299744, -0.09239788353443146, -0.5907586216926575, -1.069936752319336, 1.6324856281280518, 0.5505034923553467, -1.2449555397033691, -0.3384135365486145, -0.3686792552471161, -0.718220055103302, 2.63155198097229, -1.4488962888717651, -0.1547580510377884, -0.9564155340194702, -0.44509968161582947, 1.6979531049728394, -1.2237510681152344, -0.18966607749462128, -1.0766569375991821, -0.7431945204734802, -1.2656594514846802, -0.5484930276870728, -0.12541671097278595, -0.8891379833221436, 0.8969926238059998, -0.07061074674129486, -0.9521711468696594, -0.28466716408729553, -0.9105756878852844, 0.8344962000846863, -0.11527211219072342, 0.16013619303703308, 1.9461225271224976, 0.42692041397094727, -0.41891908645629883, 0.5610421299934387, 1.268794298171997, 0.6634928584098816, -0.8001868724822998, 0.10124866664409637, -0.6810983419418335, 0.2739206552505493, -1.3577921390533447, 0.2540922164916992, -2.9878714084625244, 0.6855461597442627, -0.07634344696998596, -0.13569171726703644, -0.015712551772594452, -1.2728784084320068, 1.1574805974960327, 2.4858322143554688, -1.2413502931594849, 0.34304067492485046, 0.3514946699142456, 1.1151540279388428, -1.644822359085083, 0.36000338196754456, -0.4822598397731781, 2.094917058944702, 0.16261732578277588, 1.1797456741333008, -0.6701363325119019, -2.0699949264526367, 0.6503797769546509, -1.0921640396118164, -1.0914251804351807, 0.5804556012153625, -0.847628653049469, 0.2956673800945282, -1.6200236082077026, -0.06184013560414314, -0.9143950343132019, -1.297813057899475, 0.7392396330833435, 0.08746272325515747, 0.3843715190887451, -0.6042954325675964, 0.3127479553222656, -2.1872894763946533, -1.4231585264205933, -0.29225435853004456, -0.8877685070037842, 0.6141097545623779, -0.36504441499710083, 0.6993674039840698, 0.08145199716091156, 0.12095502763986588, 0.3097080886363983, 1.373320460319519, 3.3709514141082764, 0.16697043180465698, 0.2824348509311676, -0.018558461219072342, -0.9569852352142334, 1.3364468812942505, 0.9937480688095093, 0.0898900032043457, -0.5459939241409302, -0.9358149170875549, 1.4027893543243408, 1.9821995496749878, 1.0913597345352173, 0.14531846344470978, -0.8047338724136353, -0.6179648041725159, 0.14414691925048828, 0.31168803572654724, 0.49501538276672363, 0.9937222003936768, 0.01777224987745285, 0.16170096397399902, 1.4229456186294556, 1.2841975688934326, -0.3682979345321655, 0.4608500599861145, -0.8917402625083923, -0.5008019208908081, 0.40303492546081543, 0.3147105276584625, -0.03250431269407272, 0.42548561096191406, -1.1179540157318115, -0.3201546370983124, -0.19099408388137817, -0.9996724128723145, -0.6697771549224854, -0.4914121627807617, -0.4674050211906433, 1.608777642250061, 0.04700043424963951, -0.5169281363487244, -0.10110682249069214, -0.7343708276748657, -0.08576779067516327, -1.0861132144927979, 0.41239529848098755, -0.059192072600126266, 0.004587085917592049, -0.1937393844127655, 1.7482099533081055, -0.838274359703064, -2.0934531688690186, 0.28970736265182495, 0.4092709422111511, -0.6561242938041687, 0.03507501259446144, 1.5411608219146729, 0.6338731050491333, 1.4508379697799683, 1.3214284181594849, 0.963275134563446, -0.5202459096908569, -1.3226174116134644, 0.624183177947998, 0.8678677082061768, -1.4346661567687988, 0.7513390779495239, -0.13057784736156464, -0.4811611473560333, 0.8117823600769043, 1.4646583795547485, 0.29432976245880127, -1.9143073558807373, 0.9011861085891724, -0.7879452705383301, 0.8256085515022278, 0.7316397428512573, 0.7852892875671387, 0.284980446100235, 0.8926957845687866, -1.4543578624725342, -1.0907480716705322, -0.9397057294845581, -0.50960373878479, 2.0341989994049072, -0.1327090859413147, 0.4665912687778473, -0.2643381953239441, -1.1403799057006836, -0.06679541617631912, 0.787644624710083, 0.4929097890853882, -0.3123174011707306, 0.849338710308075, -0.5352308750152588, -1.0688906908035278, -1.2821030616760254, -0.41214075684547424, -0.7498282194137573, -0.8810421228408813, 0.9066267609596252, 1.0017064809799194, 0.5412017703056335, 1.8978806734085083, 0.5536715984344482, 0.23089537024497986, -2.607640504837036, 0.8378469944000244, 0.2401178479194641, 0.04983903840184212, 0.9700021147727966, 0.17835982143878937, 1.1135846376419067, -0.004753944929689169, 0.466971755027771, -2.3172078132629395, 2.1406452655792236, -0.16857728362083435, 0.7024946212768555, 0.049001291394233704, -0.10766522586345673, 1.2706533670425415, 0.5498692989349365, 0.5268604159355164, -1.1120017766952515, 0.7082245945930481, -0.4932258427143097, 1.1706154346466064, 0.8851004242897034, -0.6909719705581665, 0.010143549181520939, 1.3832242488861084, 0.6193795204162598, -0.40717190504074097, -1.0275585651397705, -0.8532540202140808, 1.009074330329895, 1.7870427370071411, -0.022050494328141212, -0.00616887491196394, 0.873583972454071, 0.7404227256774902, -1.2238258123397827, 0.14236187934875488, -0.7770038843154907, -0.5926935076713562, 1.684698224067688, 2.066134452819824, 0.03230883553624153, -0.17905716598033905, -0.6045390963554382, -1.2427128553390503, 0.7489301562309265, 0.041353434324264526, 0.17884978652000427, 0.8491828441619873, -0.6617639660835266, 1.1504528522491455, 0.8323147892951965, 1.0081452131271362, -0.05209095776081085, 0.442015141248703, 0.2847425937652588, -0.2855244576931, -1.1918138265609741, -0.31578513979911804, -1.2093007564544678, -2.4294421672821045, 0.48735660314559937, -0.32148465514183044, -1.3983900547027588, 0.07341838628053665, -1.1002991199493408, 0.8936710953712463, -0.6272270083427429, -1.0982757806777954, -1.6345230340957642, 0.26708629727363586, -0.03777124360203743, 1.0233627557754517, -1.6018083095550537, -0.1391884982585907, 1.2113943099975586, 0.6747617721557617, -0.5002204179763794, 0.9207850098609924, 0.2510634958744049, 0.9798312783241272, 0.7779237031936646, -0.4099929630756378, 0.3191915452480316, 0.11775260418653488, -1.3679394721984863, 0.5714062452316284, 1.1471707820892334, 0.22205278277397156, 1.416351556777954, -0.5846779942512512, 0.24428950250148773, 0.552743136882782, -0.5272617340087891, -0.43174639344215393, -0.5149324536323547, 0.6620156168937683, 0.10776470601558685, -1.06263267993927, -0.007491195574402809, -0.1650298833847046, -0.18349403142929077, 0.25867369771003723, -1.3474825620651245, -0.352448970079422, -0.43117642402648926, -0.5140316486358643, -1.1762192249298096, -0.08710010349750519, 1.3325145244598389, -0.8576287031173706, -0.18337222933769226, 0.5881725549697876, 0.4499145448207855, 0.6542325615882874, 0.64681077003479, -0.6696542501449585, -0.31882160902023315, -0.26471632719039917, -0.22003115713596344, 0.13594597578048706, 1.2179865837097168, -0.16875547170639038, -0.9992482662200928, 0.6751682162284851, -0.4493454098701477, 0.10699892044067383, 2.0503108501434326, 0.056892067193984985, -0.7423803806304932, 0.3904828429222107, -0.7753605842590332, 1.7411880493164062, 1.5445810556411743, 1.315381646156311, 0.0061520421877503395, -0.8769980072975159, 0.3482057452201843, -0.11099732667207718, -0.42798542976379395, 0.8324293494224548, 0.5884642601013184, -0.1661539077758789, -1.3860478401184082, 0.4872603714466095, 1.36652410030365, -1.0434223413467407, -0.7373006343841553, 0.18802925944328308, -0.8208035826683044, 1.1152081489562988, 0.5956960916519165, 0.45907971262931824, 0.26534080505371094, 1.6641255617141724, 0.6234318017959595, -0.43414533138275146, 0.3007090985774994, 0.5793567299842834, -0.2062615156173706, -2.1331989765167236, -1.1600837707519531, 0.24748755991458893, -0.4526621699333191, -1.5303086042404175, 1.2310160398483276, -1.172385334968567, -0.8089146614074707, 0.5316199064254761, 0.27148622274398804, 1.4868474006652832, 0.37018901109695435, 1.7435905933380127, 2.0368213653564453, 0.8736082911491394, 0.17640620470046997, 1.450899600982666, 0.10717210173606873, -0.48761606216430664, 1.8135875463485718, -0.3969106674194336, 0.6551522016525269, 0.956689715385437, -0.4599674344062805, -1.2774957418441772, -0.7348371148109436, -1.1461756229400635, -0.6177738904953003, 1.155650019645691, 0.20439594984054565, -1.192094326019287, 0.09530095756053925, 1.4859492778778076, 0.1817120611667633, -0.25074875354766846, 0.3840547204017639, 0.3533119857311249, -0.7094109654426575, -0.08092117309570312, -1.0351890325546265, 0.4366583228111267, -0.1129833459854126, -0.3735796809196472, 0.11858909577131271, 0.7074268460273743, 1.200429916381836, -0.052275627851486206, 0.09396200627088547, 1.2280642986297607, -1.3401110172271729, 1.5522382259368896, -0.5878599286079407, 0.24521876871585846, -2.5097062587738037, 1.482580542564392, -0.7497903108596802, 1.9093021154403687, -2.6559691429138184, 0.3132163882255554, -0.6093090772628784, -0.37110066413879395, 0.2771063446998596, -0.3773166835308075, 0.2460547834634781, -0.09846831858158112, -1.096833348274231, 0.09509646147489548, -0.8722975254058838, 0.5688777565956116, 1.3199032545089722, 1.4902368783950806, -1.2088813781738281, -0.2736749053001404, -1.7433743476867676, -0.21265816688537598, -0.7231553196907043, 0.41773301362991333, -1.9597139358520508, 0.04936753585934639, -1.7850713729858398, -2.2355360984802246, -1.4751406908035278, -0.9787178635597229, 0.8759927749633789, 0.1549588292837143, -0.9421882033348083, 0.8876826167106628, -0.4195902347564697, -1.6832281351089478, 1.036794662475586, -2.3204705715179443 ]
https://github.com/huggingface/datasets/issues/4504
Can you please add the Stanford dog dataset?
@julien-c i am sorry but I have no idea about how it works: can I add the dataset by myself, following "instructions to add a new dataset"? Can I add a dataset even if it's not mine? (it's public in the link that I wrote on the post)
## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
710
48
Can you please add the Stanford dog dataset? ## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). @julien-c i am sorry but I have no idea about how it works: can I add the dataset by myself, following "instructions to add a new dataset"? Can I add a dataset even if it's not mine? (it's public in the link that I wrote on the post)
[ -1.2732861042022705, -0.9966118335723877, -0.7086484432220459, 1.2951337099075317, -0.24291197955608368, -1.4129444360733032, 0.12572160363197327, -1.008726954460144, 1.7016396522521973, -0.6344324350357056, 0.257525235414505, -1.7034564018249512, -0.05739155411720276, -0.5103915929794312, -0.828234076499939, -0.7974038124084473, -0.4590972065925598, -0.9240302443504333, 0.9033583402633667, 2.4720699787139893, 1.1257649660110474, -1.4426389932632446, 2.7250726222991943, 0.6370593905448914, -0.1691965013742447, -1.0179214477539062, 0.48681148886680603, 0.13225401937961578, -1.1924848556518555, -0.4234165847301483, -0.9220396280288696, -0.09153665602207184, -0.46490541100502014, -0.5071465969085693, 0.15527032315731049, 0.35547804832458496, -0.058338016271591187, -0.359348326921463, -0.5899431705474854, -0.6357386708259583, 0.43171265721321106, -0.37916114926338196, 0.9298334717750549, -0.4982537627220154, 1.755467176437378, -0.6418302059173584, 0.40668216347694397, 0.6212648749351501, 1.341957449913025, 0.21670468151569366, -0.0017614224925637245, 0.31427934765815735, 0.4275277853012085, 0.0131025779992342, 0.40655091404914856, 1.1986994743347168, 0.6315300464630127, 0.5413208603858948, 0.6862443685531616, -2.180177688598633, 1.3100755214691162, -0.9309836626052856, 0.44331657886505127, 1.4857832193374634, -1.0013030767440796, 0.3771110773086548, -1.8238252401351929, -0.09104526787996292, 0.5285438299179077, -2.38499116897583, 0.12201444804668427, -1.2680070400238037, -0.6845667958259583, 0.9250772595405579, 0.19851110875606537, -1.2527250051498413, 0.23477089405059814, -0.5950969457626343, 0.978542149066925, 0.440738320350647, 1.2839550971984863, -1.6850358247756958, -0.14107269048690796, -0.1794760823249817, 0.07240691781044006, -1.2834397554397583, -1.6345432996749878, 0.7388688325881958, 0.5781002044677734, 0.6609834432601929, -0.17832134664058685, 0.8603159785270691, -0.9850571155548096, 0.9785699248313904, -0.9832101464271545, -1.611029028892517, -1.4646642208099365, -2.284900426864624, -2.287278413772583, 0.9560232758522034, -0.43588119745254517, -0.44564276933670044, 1.8856714963912964, -0.9492306709289551, -1.7631452083587646, 1.1030839681625366, 0.2703222930431366, 0.08944068849086761, 2.2747201919555664, 0.2328893393278122, -0.6830048561096191, 0.4079749882221222, -0.7416366338729858, 0.8328551650047302, -0.359323650598526, 1.4574726819992065, 0.5467036962509155, -0.916297972202301, 1.5787782669067383, -0.525503396987915, 0.48808395862579346, -0.5955916047096252, -0.5792505145072937, -0.8681430220603943, 0.44028618931770325, 1.9021544456481934, -0.329074889421463, 1.6481740474700928, -0.356050580739975, -1.7079122066497803, -1.4639689922332764, 0.7465972304344177, 0.5735410451889038, -0.8199634552001953, 0.07143472135066986, -0.3751441240310669, 0.10707858204841614, -0.07369252294301987, 1.0995739698410034, 1.0948646068572998, 0.7273335456848145, -0.4067927896976471, -0.8983969688415527, 0.27584710717201233, -0.07312281429767609, -0.7906415462493896, -1.8327172994613647, -0.3639177978038788, 0.3062898814678192, 0.603972315788269, -1.3385604619979858, 1.623594045639038, 0.8815466165542603, 2.010529041290283, 0.9103515148162842, -0.3744267225265503, 1.3969407081604004, 0.040590137243270874, 1.819716453552246, -0.5920066833496094, 0.6916179060935974, -0.2256515920162201, -1.0142731666564941, 0.790009081363678, -0.46796444058418274, -2.0974373817443848, -0.7492592930793762, -0.9839096069335938, -0.20589670538902283, -0.7759835124015808, 0.8980564475059509, -0.2999936640262604, -1.3448606729507446, 0.17889542877674103, -0.6674823760986328, 0.23873966932296753, -1.25894033908844, 0.17763471603393555, 0.8832043409347534, -0.6663010716438293, -0.17330412566661835, -0.24054937064647675, -1.3364909887313843, -0.554677426815033, 0.1935448944568634, 1.950667142868042, -0.6840083003044128, 1.0423946380615234, 0.8553739786148071, -0.7115305066108704, 0.0999094620347023, 0.31156405806541443, -0.2752552926540375, 0.9132736325263977, -1.1728869676589966, -0.3620351552963257, 1.007684588432312, -0.1459033042192459, -0.40454211831092834, 1.568227767944336, 0.8414527773857117, -0.969228982925415, -0.21123859286308289, -0.256915420293808, -0.8009436130523682, -0.10564658790826797, -1.5067403316497803, -0.2235879898071289, 0.1062391996383667, -1.396296739578247, -0.5776342153549194, -0.2584638297557831, 1.2532291412353516, -0.21336883306503296, 1.2872000932693481, -0.333213746547699, -0.4222356677055359, -0.5089865326881409, -0.37913063168525696, 0.21858592331409454, -0.29616013169288635, -0.6800599694252014, 0.2629413902759552, -0.795354962348938, 0.3249838948249817, 1.435365080833435, 0.5471065640449524, -0.004865583498030901, 0.6642444729804993, 1.0775872468948364, 0.2562319338321686, -0.038139116019010544, -0.836582362651825, -1.4875911474227905, 1.9787813425064087, -1.4158778190612793, 1.8010486364364624, 0.8054871559143066, -0.10523919761180878, -1.756251335144043, -1.7892975807189941, 1.2509088516235352, 1.2531176805496216, 2.3983664512634277, 0.6073192358016968, 0.45541146397590637, -0.8069570660591125, -0.6950242519378662, 0.25449809432029724, -1.0466262102127075, -0.7384383082389832, 0.060167282819747925, 2.3266360759735107, 1.8546603918075562, -0.7045236229896545, -0.13855397701263428, -0.9999979734420776, 1.3322302103042603, -0.1842322051525116, 0.23387204110622406, 2.045013189315796, -0.3528337776660919, -1.0732862949371338, 1.3039463758468628, -2.2539827823638916, 0.24307990074157715, 2.0129153728485107, 0.42629653215408325, 0.05612663924694061, -1.521695613861084, -0.594202995300293, -0.3279654383659363, -0.40182924270629883, -1.2088003158569336, 0.5214317440986633, -0.3228599727153778, -0.8087812066078186, -1.4956059455871582, 0.0380791500210762, -1.1031006574630737, -1.6825482845306396, 0.4142715036869049, 1.804821491241455, 1.9446187019348145, -0.6331527233123779, 1.330773949623108, -0.30487269163131714, 0.13853494822978973, 1.2590720653533936, 1.2604031562805176, 3.1387526988983154, 1.9805742502212524, -1.1567481756210327, 0.7506415247917175, -0.18446123600006104, -0.40977057814598083, 1.0639958381652832, -0.9920116662979126, 1.153005599975586, -0.1840793639421463, -1.248286485671997, -1.0978893041610718, 1.0926635265350342, 0.5319470167160034, 0.027609942480921745, -0.6388170123100281, 1.1908005475997925, 0.007591431960463524, 1.4425510168075562, 0.5769715905189514, -0.42990630865097046, 0.5698782205581665, -0.3835279047489166, -0.5060591101646423, 1.7108577489852905, 0.15193724632263184, -1.5430028438568115, -2.398554801940918, -0.28177765011787415, -0.9033005237579346, -0.07408220320940018, -0.6203389763832092, -1.0660979747772217, 1.6179643869400024, 0.5375550389289856, -1.2374624013900757, -0.3261246681213379, -0.36636748909950256, -0.7442397475242615, 2.6176562309265137, -1.3988908529281616, -0.19069898128509521, -0.928322434425354, -0.4755699932575226, 1.6683920621871948, -1.242005467414856, -0.1898937076330185, -1.0919269323349, -0.7400481700897217, -1.2668808698654175, -0.5693167448043823, -0.09072671830654144, -0.8900212049484253, 0.9098914861679077, -0.008853659965097904, -0.9772223234176636, -0.28200414776802063, -0.9138262867927551, 0.8397974967956543, -0.09682377427816391, 0.17880046367645264, 1.9136626720428467, 0.42475956678390503, -0.4257526397705078, 0.5840821266174316, 1.260481595993042, 0.6543986201286316, -0.7805812358856201, 0.11034992337226868, -0.6934455633163452, 0.29973718523979187, -1.355147123336792, 0.25488248467445374, -2.9827728271484375, 0.7332342863082886, -0.0719943717122078, -0.11835320293903351, -0.04941381514072418, -1.2891970872879028, 1.1398186683654785, 2.4756410121917725, -1.2025316953659058, 0.3751550316810608, 0.3844304382801056, 1.1540437936782837, -1.653220772743225, 0.32813432812690735, -0.47174274921417236, 2.1339383125305176, 0.15036585927009583, 1.1800594329833984, -0.6341519951820374, -2.108049154281616, 0.6186140775680542, -1.1212913990020752, -1.0694446563720703, 0.6434042453765869, -0.8792064189910889, 0.31322184205055237, -1.5903546810150146, -0.12818948924541473, -0.8576664924621582, -1.2676159143447876, 0.7503031492233276, 0.06142103672027588, 0.42144739627838135, -0.6461235284805298, 0.3254965543746948, -2.210599184036255, -1.4231643676757812, -0.28312206268310547, -0.920110285282135, 0.5959991812705994, -0.36635011434555054, 0.7041668891906738, 0.08582832664251328, 0.1081957146525383, 0.27493441104888916, 1.417981505393982, 3.36991548538208, 0.18576020002365112, 0.3294496238231659, -0.03837142139673233, -0.9585798978805542, 1.3964425325393677, 0.9638562202453613, 0.06059451401233673, -0.5534016489982605, -0.9990029335021973, 1.3899375200271606, 1.966713309288025, 1.0865495204925537, 0.08888768404722214, -0.7852545380592346, -0.6226584911346436, 0.07215399295091629, 0.26495376229286194, 0.5350523591041565, 0.991270124912262, 0.004326801747083664, 0.20563751459121704, 1.4587223529815674, 1.250237226486206, -0.39857083559036255, 0.4752176105976105, -0.9037118554115295, -0.553960919380188, 0.40674489736557007, 0.32258450984954834, 0.031956031918525696, 0.48208919167518616, -1.0853897333145142, -0.31806743144989014, -0.18239453434944153, -1.0314313173294067, -0.6306038498878479, -0.5234742164611816, -0.4422301948070526, 1.6257619857788086, 0.059112608432769775, -0.5405464172363281, -0.06106805056333542, -0.7293953895568848, -0.07274995744228363, -1.1227221488952637, 0.35390520095825195, -0.036495890468358994, -0.018878933042287827, -0.16463248431682587, 1.7518718242645264, -0.8250235319137573, -2.1030070781707764, 0.2258141189813614, 0.41073694825172424, -0.6058623790740967, 0.04876378923654556, 1.5813978910446167, 0.5821709632873535, 1.4642583131790161, 1.3319483995437622, 1.0037026405334473, -0.5482582449913025, -1.3139673471450806, 0.6238539814949036, 0.8634447455406189, -1.385852336883545, 0.7793229222297668, -0.08943379670381546, -0.5221017599105835, 0.7827866673469543, 1.4748799800872803, 0.3027324974536896, -1.9477577209472656, 0.9450041651725769, -0.8056976199150085, 0.8314753174781799, 0.7218301296234131, 0.8095605373382568, 0.2502105236053467, 0.906683623790741, -1.4350979328155518, -1.0938618183135986, -0.9218533039093018, -0.5432526469230652, 2.000849485397339, -0.16923414170742035, 0.44451001286506653, -0.29249852895736694, -1.1810961961746216, -0.05927670747041702, 0.7856688499450684, 0.4766201972961426, -0.27783700823783875, 0.7879436612129211, -0.5901476740837097, -1.080569863319397, -1.3150420188903809, -0.3796314001083374, -0.7906592488288879, -0.9202223420143127, 0.9631221890449524, 0.9662067294120789, 0.4982796311378479, 1.8762328624725342, 0.5892944931983948, 0.2106557935476303, -2.611621618270874, 0.8372457027435303, 0.24822503328323364, 0.03748784214258194, 0.945756733417511, 0.19240997731685638, 1.1564663648605347, 0.012601843103766441, 0.4721826910972595, -2.3049559593200684, 2.136411190032959, -0.21485379338264465, 0.7273005247116089, 0.036167338490486145, -0.10268691182136536, 1.2542709112167358, 0.5851847529411316, 0.5256844758987427, -1.173010230064392, 0.6778529286384583, -0.5461311936378479, 1.1246042251586914, 0.9043146371841431, -0.6920436024665833, 0.033385612070560455, 1.3610342741012573, 0.5877976417541504, -0.4383201003074646, -1.0572879314422607, -0.8429092168807983, 1.0307034254074097, 1.7680519819259644, -0.03417084366083145, -0.003612920641899109, 0.8973183631896973, 0.7632158398628235, -1.2776240110397339, 0.14752520620822906, -0.8052759170532227, -0.6374572515487671, 1.69550359249115, 2.065812110900879, 0.017382217571139336, -0.20526480674743652, -0.5938005447387695, -1.2794147729873657, 0.7195714712142944, 0.049067653715610504, 0.1863018125295639, 0.8142622709274292, -0.6953990459442139, 1.1216020584106445, 0.7870401740074158, 0.9956677556037903, -0.007654318120330572, 0.3746345341205597, 0.263390451669693, -0.23543493449687958, -1.1379942893981934, -0.2745479941368103, -1.2070307731628418, -2.457338809967041, 0.43561363220214844, -0.28977084159851074, -1.3946560621261597, 0.0534692257642746, -1.0555565357208252, 0.8967311978340149, -0.6323863863945007, -1.1008292436599731, -1.6361076831817627, 0.2750051021575928, -0.032020166516304016, 0.9805939793586731, -1.5927790403366089, -0.16070689260959625, 1.2195980548858643, 0.7266187071800232, -0.48112109303474426, 0.9415158033370972, 0.25478848814964294, 0.9557718634605408, 0.7849634289741516, -0.4505906403064728, 0.3583546280860901, 0.10499247908592224, -1.361058235168457, 0.5746654868125916, 1.1540989875793457, 0.22592289745807648, 1.4535496234893799, -0.565982460975647, 0.21246115863323212, 0.5375778675079346, -0.5084801912307739, -0.46542033553123474, -0.5475066304206848, 0.6468932032585144, 0.05130267143249512, -1.0706597566604614, 0.00032912101596593857, -0.12277912348508835, -0.19853763282299042, 0.28580620884895325, -1.3564481735229492, -0.28134384751319885, -0.3940816819667816, -0.5035775899887085, -1.2140105962753296, -0.05304277688264847, 1.3541662693023682, -0.8661766648292542, -0.182534322142601, 0.5355321764945984, 0.45655298233032227, 0.6514678597450256, 0.6178096532821655, -0.6843916177749634, -0.3172956705093384, -0.2724643051624298, -0.23815642297267914, 0.13412556052207947, 1.2073700428009033, -0.23911747336387634, -1.0481780767440796, 0.6682076454162598, -0.41867443919181824, 0.09896816313266754, 2.037147045135498, 0.08715196698904037, -0.7126562595367432, 0.3646984398365021, -0.8012101054191589, 1.7492552995681763, 1.5957776308059692, 1.35187566280365, -0.00473215663805604, -0.8894949555397034, 0.3966453969478607, -0.21569187939167023, -0.41951629519462585, 0.849821925163269, 0.5666605830192566, -0.14322873950004578, -1.3875232934951782, 0.5121597051620483, 1.3637440204620361, -1.0129863023757935, -0.7369647026062012, 0.1483852118253708, -0.8606212735176086, 1.145416021347046, 0.6116566061973572, 0.49996238946914673, 0.2589278817176819, 1.6649624109268188, 0.6581895351409912, -0.44833749532699585, 0.3695811331272125, 0.6131367087364197, -0.17873996496200562, -2.093729019165039, -1.1709156036376953, 0.2458401620388031, -0.45908284187316895, -1.536295771598816, 1.2991539239883423, -1.1487839221954346, -0.8365034461021423, 0.5566509366035461, 0.22542345523834229, 1.45220148563385, 0.371209055185318, 1.735373616218567, 2.038496494293213, 0.8804572820663452, 0.19590796530246735, 1.3864530324935913, 0.06162359565496445, -0.4653901755809784, 1.8551914691925049, -0.3860417902469635, 0.5919322371482849, 0.9792130589485168, -0.4505555033683777, -1.2511597871780396, -0.7615424990653992, -1.1335641145706177, -0.6196849346160889, 1.1441713571548462, 0.1871994137763977, -1.197774887084961, 0.12148961424827576, 1.5095926523208618, 0.16491496562957764, -0.2798323333263397, 0.4622061252593994, 0.3914005756378174, -0.7472098469734192, -0.07293431460857391, -1.019986629486084, 0.410308837890625, -0.14400312304496765, -0.35682281851768494, 0.13913753628730774, 0.718807578086853, 1.2281124591827393, -0.027063751593232155, 0.08402767032384872, 1.2971268892288208, -1.3652243614196777, 1.5067589282989502, -0.6135179996490479, 0.2405259758234024, -2.504563570022583, 1.4505083560943604, -0.7798343300819397, 1.9235962629318237, -2.6432676315307617, 0.3520829975605011, -0.6265637874603271, -0.36038514971733093, 0.31425461173057556, -0.41030776500701904, 0.23259563744068146, -0.06256812065839767, -1.14276123046875, 0.03901395946741104, -0.8592424392700195, 0.5487415194511414, 1.2824132442474365, 1.452729344367981, -1.159745693206787, -0.28369006514549255, -1.6888833045959473, -0.17659267783164978, -0.7200775146484375, 0.42105627059936523, -1.9676915407180786, 0.0017667394131422043, -1.8292804956436157, -2.253917932510376, -1.425715684890747, -0.9466609954833984, 0.9037367105484009, 0.16023728251457214, -0.9299398064613342, 0.9490793347358704, -0.41665270924568176, -1.6803793907165527, 1.0559194087982178, -2.2979681491851807 ]
https://github.com/huggingface/datasets/issues/4504
Can you please add the Stanford dog dataset?
Hi! The [ADD NEW DATASET](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md) instructions are indeed the best place to start. It's also perfectly fine to add a dataset if it's public, even if it's not yours. Let me know if you need some additional pointers.
## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
710
38
Can you please add the Stanford dog dataset? ## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Hi! The [ADD NEW DATASET](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md) instructions are indeed the best place to start. It's also perfectly fine to add a dataset if it's public, even if it's not yours. Let me know if you need some additional pointers.
[ -1.2443475723266602, -0.9969714283943176, -0.6728203892707825, 1.3353222608566284, -0.208540141582489, -1.3817976713180542, 0.09872257709503174, -0.981726348400116, 1.6654369831085205, -0.5871869921684265, 0.2545015811920166, -1.7239019870758057, -0.076536625623703, -0.5118688941001892, -0.7988314032554626, -0.83071368932724, -0.44950011372566223, -0.8755781650543213, 0.898567259311676, 2.472043037414551, 1.105159878730774, -1.4432562589645386, 2.7433290481567383, 0.6190630793571472, -0.14779874682426453, -1.0061382055282593, 0.5015258193016052, 0.14871551096439362, -1.2150737047195435, -0.42346012592315674, -0.9055554866790771, -0.07735364884138107, -0.48855888843536377, -0.4733313322067261, 0.1492849886417389, 0.3460100293159485, -0.05534848943352699, -0.3488674461841583, -0.618322491645813, -0.6348913908004761, 0.3981392979621887, -0.3874266743659973, 0.8853012919425964, -0.4797518849372864, 1.7830915451049805, -0.6169764399528503, 0.38737064599990845, 0.5984983444213867, 1.3192704916000366, 0.21063372492790222, 0.02725067362189293, 0.3266453146934509, 0.42269667983055115, 0.04324709624052048, 0.4118892550468445, 1.2238709926605225, 0.6605892777442932, 0.528609573841095, 0.6664514541625977, -2.2115001678466797, 1.32755708694458, -0.9358022212982178, 0.4316105544567108, 1.484287142753601, -0.9853699207305908, 0.3656994104385376, -1.7857707738876343, -0.07629123330116272, 0.5466156005859375, -2.409149646759033, 0.08689048141241074, -1.2737274169921875, -0.6535839438438416, 0.9621348977088928, 0.24523213505744934, -1.2385412454605103, 0.2646285891532898, -0.5870509743690491, 1.0290658473968506, 0.4257637858390808, 1.2471494674682617, -1.6864969730377197, -0.13688459992408752, -0.1485893875360489, 0.049980562180280685, -1.269898533821106, -1.6608318090438843, 0.7293862104415894, 0.6016196608543396, 0.6901171803474426, -0.16282060742378235, 0.8688083291053772, -0.9802329540252686, 0.9890374541282654, -0.9920178651809692, -1.6610617637634277, -1.441924810409546, -2.323878049850464, -2.3129196166992188, 0.9745503664016724, -0.4383429288864136, -0.42370185256004333, 1.850675344467163, -0.9167414307594299, -1.7609413862228394, 1.0464340448379517, 0.28936439752578735, 0.0933573767542839, 2.3052947521209717, 0.20567432045936584, -0.6835325360298157, 0.3466395139694214, -0.7635778784751892, 0.8270223736763, -0.33300530910491943, 1.4361263513565063, 0.5669547915458679, -0.9269283413887024, 1.5580281019210815, -0.5455538034439087, 0.4954066872596741, -0.6041156053543091, -0.589180052280426, -0.8503895998001099, 0.42310962080955505, 1.9064760208129883, -0.36173924803733826, 1.6531747579574585, -0.3891639709472656, -1.6716899871826172, -1.4988311529159546, 0.7340596318244934, 0.536589503288269, -0.8011224269866943, 0.028633572161197662, -0.34624528884887695, 0.1138511523604393, -0.054494213312864304, 1.1032071113586426, 1.1122238636016846, 0.6754123568534851, -0.43842819333076477, -0.8913404941558838, 0.2648310959339142, -0.09470197558403015, -0.7644414901733398, -1.8500837087631226, -0.36572107672691345, 0.3130541145801544, 0.6152423024177551, -1.3354257345199585, 1.6225277185440063, 0.8452683091163635, 2.0300164222717285, 0.922225832939148, -0.40118280053138733, 1.403192162513733, 0.021447807550430298, 1.8747814893722534, -0.6499701142311096, 0.6760612726211548, -0.2354804426431656, -1.017122507095337, 0.7666727900505066, -0.461137980222702, -2.081550359725952, -0.7578948736190796, -0.9802586436271667, -0.20345574617385864, -0.7377726435661316, 0.8847624659538269, -0.31582745909690857, -1.3743125200271606, 0.11498552560806274, -0.6918818354606628, 0.21481472253799438, -1.2505637407302856, 0.1458023488521576, 0.93319171667099, -0.6630957722663879, -0.17763946950435638, -0.2376616895198822, -1.3358229398727417, -0.5519939661026001, 0.2528979182243347, 1.9654289484024048, -0.6388583183288574, 1.0256260633468628, 0.9102603197097778, -0.7366551160812378, 0.132696732878685, 0.2906012237071991, -0.2425251305103302, 0.8981732726097107, -1.1815553903579712, -0.3713671863079071, 1.020407795906067, -0.13260073959827423, -0.49266737699508667, 1.5619195699691772, 0.8653547763824463, -0.9897469878196716, -0.21301601827144623, -0.2450292855501175, -0.7519178986549377, -0.054797329008579254, -1.5342364311218262, -0.2289818972349167, 0.12100797891616821, -1.4240705966949463, -0.5405484437942505, -0.3028523027896881, 1.2844715118408203, -0.2040890008211136, 1.2796179056167603, -0.26761624217033386, -0.41595107316970825, -0.5014687776565552, -0.38242432475090027, 0.1958383321762085, -0.32753604650497437, -0.6582416892051697, 0.2749306857585907, -0.805904746055603, 0.3310452699661255, 1.472914695739746, 0.544062614440918, 0.05591578781604767, 0.6390692591667175, 1.0714962482452393, 0.26608702540397644, -0.05821525678038597, -0.8772329092025757, -1.545997977256775, 1.9805346727371216, -1.378998041152954, 1.831671953201294, 0.794154703617096, -0.1238122433423996, -1.7747902870178223, -1.7955596446990967, 1.267237901687622, 1.211898684501648, 2.4245197772979736, 0.5833950042724609, 0.4477098882198334, -0.8150871992111206, -0.6998497843742371, 0.24020561575889587, -0.9715297818183899, -0.7296280264854431, 0.09445898979902267, 2.3622026443481445, 1.8757270574569702, -0.6856113076210022, -0.11263170838356018, -1.0131429433822632, 1.3680574893951416, -0.16239869594573975, 0.2675662040710449, 2.0375921726226807, -0.33800166845321655, -1.0518298149108887, 1.2967257499694824, -2.2686305046081543, 0.23852840065956116, 2.0237984657287598, 0.41571587324142456, 0.051679421216249466, -1.5208693742752075, -0.5820896029472351, -0.3854512572288513, -0.4134827256202698, -1.2330427169799805, 0.49431830644607544, -0.2903488874435425, -0.8384582996368408, -1.4971319437026978, 0.008512371219694614, -1.1084299087524414, -1.7226645946502686, 0.42628100514411926, 1.8032869100570679, 1.9116721153259277, -0.6427029371261597, 1.3479251861572266, -0.2918902635574341, 0.0767454281449318, 1.246380090713501, 1.2754417657852173, 3.1569008827209473, 2.0000500679016113, -1.159102201461792, 0.7960841059684753, -0.2316945642232895, -0.40857794880867004, 1.0413618087768555, -1.037384033203125, 1.1678986549377441, -0.19777727127075195, -1.2681230306625366, -1.1440913677215576, 1.1256349086761475, 0.5508394241333008, 0.016276445239782333, -0.6481430530548096, 1.199641466140747, 0.028493087738752365, 1.4369800090789795, 0.5651670694351196, -0.44637513160705566, 0.5507515072822571, -0.39630556106567383, -0.5590876936912537, 1.7148559093475342, 0.16626861691474915, -1.5462285280227661, -2.4044761657714844, -0.27933353185653687, -0.9422452449798584, -0.11753381788730621, -0.630267322063446, -1.0729455947875977, 1.619042158126831, 0.5312617421150208, -1.2279350757598877, -0.3192327916622162, -0.3721558153629303, -0.7158370018005371, 2.6184794902801514, -1.377593994140625, -0.14415808022022247, -0.9381080865859985, -0.46139320731163025, 1.6505053043365479, -1.213936686515808, -0.1871328502893448, -1.0825655460357666, -0.7788931727409363, -1.2456815242767334, -0.5175847411155701, -0.07750719040632248, -0.8644265532493591, 0.8777565360069275, -0.007159050554037094, -0.9943724274635315, -0.2822079360485077, -0.9167550802230835, 0.8955613374710083, -0.11453887820243835, 0.16293148696422577, 1.917737603187561, 0.44506514072418213, -0.42494240403175354, 0.5996665358543396, 1.2773191928863525, 0.6601864099502563, -0.8033642172813416, 0.11570291966199875, -0.6898398995399475, 0.28774070739746094, -1.3512609004974365, 0.2109026163816452, -2.996433734893799, 0.7201393246650696, -0.06285499036312103, -0.1126648411154747, -0.03508175536990166, -1.25951087474823, 1.1619924306869507, 2.500850200653076, -1.258532166481018, 0.4118461012840271, 0.435677707195282, 1.1282719373703003, -1.6336947679519653, 0.3417815864086151, -0.4999517798423767, 2.1113860607147217, 0.1512298434972763, 1.1481437683105469, -0.6684882044792175, -2.0563206672668457, 0.5979032516479492, -1.0986690521240234, -1.0581921339035034, 0.6615402102470398, -0.9306578636169434, 0.3356306552886963, -1.5723230838775635, -0.0893249586224556, -0.8647313117980957, -1.3095005750656128, 0.70559161901474, 0.03725223243236542, 0.4003305435180664, -0.6127173900604248, 0.37747013568878174, -2.2089717388153076, -1.4399034976959229, -0.2716977298259735, -0.9480943083763123, 0.6186902523040771, -0.37981855869293213, 0.6757263541221619, 0.11379917711019516, 0.11386781930923462, 0.27196964621543884, 1.3847938776016235, 3.3270840644836426, 0.19440533220767975, 0.29051411151885986, -0.005699529778212309, -1.0177626609802246, 1.3624153137207031, 0.9508207440376282, 0.04836597293615341, -0.4987553060054779, -0.9609631299972534, 1.42347252368927, 2.0057873725891113, 1.1186884641647339, 0.09937340021133423, -0.7954168915748596, -0.6742412447929382, 0.16198395192623138, 0.2835744321346283, 0.5126953125, 0.9610939025878906, -0.03663419187068939, 0.21925762295722961, 1.4208745956420898, 1.3032546043395996, -0.38468483090400696, 0.49392497539520264, -0.9301795959472656, -0.5308453440666199, 0.4118269979953766, 0.2798098921775818, 0.028969265520572662, 0.5050483345985413, -1.1458805799484253, -0.305722713470459, -0.18805767595767975, -1.0103119611740112, -0.633095383644104, -0.5017403364181519, -0.4273214042186737, 1.6016379594802856, 0.04859529063105583, -0.4985559582710266, -0.008412053808569908, -0.7351245284080505, -0.08824477344751358, -1.1039732694625854, 0.36862337589263916, -0.05699719861149788, 0.004265901632606983, -0.16253526508808136, 1.757787823677063, -0.9000946283340454, -2.078589916229248, 0.226226344704628, 0.41097819805145264, -0.6140481233596802, 0.06477705389261246, 1.57637357711792, 0.5847643613815308, 1.4607958793640137, 1.2922067642211914, 1.0026313066482544, -0.5327496528625488, -1.3205549716949463, 0.6346465945243835, 0.891765296459198, -1.32987380027771, 0.8015385866165161, -0.15993164479732513, -0.49368685483932495, 0.7902573943138123, 1.4746304750442505, 0.2782929241657257, -1.9358224868774414, 0.9263295531272888, -0.7716456055641174, 0.850085973739624, 0.7140651941299438, 0.7912744283676147, 0.20091482996940613, 0.9023573398590088, -1.4478700160980225, -1.1121214628219604, -0.9085723757743835, -0.5242560505867004, 1.9861544370651245, -0.11308958381414413, 0.45142003893852234, -0.2505561113357544, -1.1564786434173584, -0.08833689242601395, 0.7852046489715576, 0.5014033317565918, -0.35554081201553345, 0.8751196265220642, -0.5409044623374939, -1.0718446969985962, -1.3275153636932373, -0.4109423756599426, -0.8208752870559692, -0.8846813440322876, 0.9442233443260193, 0.9639661908149719, 0.5192726254463196, 1.888247013092041, 0.5629385709762573, 0.23828952014446259, -2.634089231491089, 0.873181939125061, 0.24591147899627686, 0.010137614794075489, 0.9323562383651733, 0.20238645374774933, 1.1510716676712036, 0.005322860553860664, 0.5058987736701965, -2.2734901905059814, 2.151226282119751, -0.2048715353012085, 0.7280526161193848, 0.03369051218032837, -0.09999576956033707, 1.1873563528060913, 0.5625516176223755, 0.5565526485443115, -1.1748088598251343, 0.7001152634620667, -0.5411702990531921, 1.1198877096176147, 0.8643912076950073, -0.709565281867981, 0.0015085963532328606, 1.3836519718170166, 0.5716083645820618, -0.42921727895736694, -1.0667072534561157, -0.8556919097900391, 1.0430935621261597, 1.753193736076355, -0.019192013889551163, -0.02530175819993019, 0.9003726243972778, 0.7414098978042603, -1.2685774564743042, 0.13521066308021545, -0.7711926698684692, -0.5968630909919739, 1.6897344589233398, 2.07641863822937, 0.01838303729891777, -0.1987154632806778, -0.6131280660629272, -1.2146618366241455, 0.6577655673027039, 0.02982451766729355, 0.17231939733028412, 0.8608250021934509, -0.6508106589317322, 1.1366928815841675, 0.7341399788856506, 1.0002812147140503, -0.04953066632151604, 0.3797544836997986, 0.2762869894504547, -0.2917914390563965, -1.193206548690796, -0.3003794550895691, -1.1865497827529907, -2.4614951610565186, 0.39774569869041443, -0.28524330258369446, -1.4133058786392212, 0.0662873312830925, -1.0581583976745605, 0.8944658637046814, -0.6272547245025635, -1.0969467163085938, -1.5754926204681396, 0.2948020100593567, -0.053757909685373306, 0.9816758632659912, -1.6287165880203247, -0.14954765141010284, 1.2208623886108398, 0.7347758412361145, -0.48113545775413513, 0.9580375552177429, 0.28086283802986145, 0.996919572353363, 0.7847796082496643, -0.4094012975692749, 0.368499755859375, 0.10961953550577164, -1.3589603900909424, 0.5262839198112488, 1.1356970071792603, 0.2626456022262573, 1.4051520824432373, -0.5483847260475159, 0.22084778547286987, 0.5510165691375732, -0.5427004098892212, -0.4476754069328308, -0.5170109272003174, 0.6626534461975098, 0.05397511273622513, -1.082016110420227, 0.028021909296512604, -0.15833330154418945, -0.12776216864585876, 0.262714147567749, -1.3786938190460205, -0.3213573396205902, -0.3847762644290924, -0.49353453516960144, -1.1967120170593262, -0.02185378223657608, 1.3398306369781494, -0.886147141456604, -0.19935815036296844, 0.5515543818473816, 0.42884981632232666, 0.6389568448066711, 0.6544234752655029, -0.6648503541946411, -0.3212513029575348, -0.2779203951358795, -0.21468691527843475, 0.15295739471912384, 1.1685922145843506, -0.22982120513916016, -1.0017999410629272, 0.7031676173210144, -0.45275548100471497, 0.11201538890600204, 1.9947508573532104, 0.06743096560239792, -0.7689473032951355, 0.3617914915084839, -0.7824500203132629, 1.7200911045074463, 1.593368649482727, 1.3791078329086304, -0.03578902408480644, -0.89407879114151, 0.37989097833633423, -0.19449274241924286, -0.41126537322998047, 0.8641670346260071, 0.5752831697463989, -0.13271985948085785, -1.387352466583252, 0.45142993330955505, 1.3664008378982544, -0.9959367513656616, -0.7173128128051758, 0.20229223370552063, -0.8420041799545288, 1.1673661470413208, 0.6200957298278809, 0.451241672039032, 0.2548143267631531, 1.608306884765625, 0.671953022480011, -0.4190114736557007, 0.36907535791397095, 0.5667508244514465, -0.2507822513580322, -2.090045928955078, -1.1334553956985474, 0.2164825201034546, -0.4779624938964844, -1.5468193292617798, 1.2509870529174805, -1.1655912399291992, -0.8237882852554321, 0.5101161003112793, 0.21985964477062225, 1.4549839496612549, 0.35442957282066345, 1.7449402809143066, 2.052426815032959, 0.8960173726081848, 0.19822275638580322, 1.4084694385528564, 0.08563626557588577, -0.46225616335868835, 1.8413316011428833, -0.4067832827568054, 0.6143026351928711, 0.9651473760604858, -0.46622830629348755, -1.2204006910324097, -0.7716274261474609, -1.1720447540283203, -0.5848562717437744, 1.1444872617721558, 0.16421625018119812, -1.1922968626022339, 0.11764304339885712, 1.4784027338027954, 0.16075660288333893, -0.25762930512428284, 0.5227434039115906, 0.37490615248680115, -0.7002538442611694, -0.0873672142624855, -1.0024681091308594, 0.4135515093803406, -0.148197740316391, -0.3224464952945709, 0.12334197759628296, 0.6591705679893494, 1.2147057056427002, -0.024780139327049255, 0.0988844707608223, 1.2448995113372803, -1.3258006572723389, 1.5231633186340332, -0.6328476667404175, 0.2983841598033905, -2.5089354515075684, 1.41203773021698, -0.7566438913345337, 1.8822187185287476, -2.6385140419006348, 0.3768559396266937, -0.5954870581626892, -0.3935614824295044, 0.32875263690948486, -0.4130718410015106, 0.20414599776268005, -0.06634040176868439, -1.1300981044769287, 0.0199001245200634, -0.8619853258132935, 0.5340402722358704, 1.2718805074691772, 1.4482555389404297, -1.1523256301879883, -0.29243627190589905, -1.7569847106933594, -0.166653573513031, -0.7313597202301025, 0.4508277177810669, -1.9640274047851562, 0.014144462533295155, -1.838542103767395, -2.2769110202789307, -1.417686104774475, -0.919481635093689, 0.9022873044013977, 0.154153972864151, -0.9301000237464905, 0.9573053121566772, -0.37591516971588135, -1.689589500427246, 1.0286376476287842, -2.308682918548584 ]
https://github.com/huggingface/datasets/issues/4504
Can you please add the Stanford dog dataset?
@khushmeeet this is the [link](https://huggingface.co/datasets/dgrnd4/stanford_dog_dataset) where I added the dataset already. If you can I would ask you to do this: 1) The dataset it's all in TRAINING SET: can you please divide it in Training,Test and Validation Set? If you can for each class, take the 80% for the Training set and the 10% for Test and 10% Validation 2) The images has different size, can you please resize all the images in 224,224,3? Look even at the last dimension "3" because some images has dimension 4! Thank you!!
## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
710
90
Can you please add the Stanford dog dataset? ## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). @khushmeeet this is the [link](https://huggingface.co/datasets/dgrnd4/stanford_dog_dataset) where I added the dataset already. If you can I would ask you to do this: 1) The dataset it's all in TRAINING SET: can you please divide it in Training,Test and Validation Set? If you can for each class, take the 80% for the Training set and the 10% for Test and 10% Validation 2) The images has different size, can you please resize all the images in 224,224,3? Look even at the last dimension "3" because some images has dimension 4! Thank you!!
[ -1.2045964002609253, -0.9749943614006042, -0.7148303985595703, 1.3799426555633545, -0.1768854260444641, -1.3787188529968262, 0.08205506205558777, -1.0635945796966553, 1.6430895328521729, -0.6384444832801819, 0.22904038429260254, -1.7301057577133179, -0.03694484382867813, -0.49656930565834045, -0.8143166303634644, -0.8805949687957764, -0.46088162064552307, -0.8855032324790955, 0.9259956479072571, 2.4595093727111816, 1.1928602457046509, -1.4330315589904785, 2.7745959758758545, 0.6127620339393616, -0.205010786652565, -1.0062425136566162, 0.5536072850227356, 0.09525115042924881, -1.221785545349121, -0.4052683115005493, -0.8939586877822876, -0.07024706900119781, -0.5035921931266785, -0.46444597840309143, 0.10756982117891312, 0.3686954081058502, -0.07708664983510971, -0.3168707489967346, -0.5555574893951416, -0.6769246459007263, 0.4528311789035797, -0.33364996314048767, 0.9311558604240417, -0.42940473556518555, 1.77934730052948, -0.6117091178894043, 0.3425930440425873, 0.6458982229232788, 1.3083325624465942, 0.14532439410686493, -0.002721977885812521, 0.2694332003593445, 0.40005797147750854, 0.005198260769248009, 0.4025997519493103, 1.2549351453781128, 0.6694343090057373, 0.5807257294654846, 0.6896252036094666, -2.1685566902160645, 1.3455764055252075, -0.9540444016456604, 0.4456842243671417, 1.424920916557312, -0.9513406753540039, 0.39262470602989197, -1.8185569047927856, -0.057851262390613556, 0.518280029296875, -2.331413984298706, 0.10972785949707031, -1.247796893119812, -0.6568336486816406, 0.9774991273880005, 0.2091033160686493, -1.2633217573165894, 0.27832069993019104, -0.577552318572998, 1.0695842504501343, 0.4555356502532959, 1.2290236949920654, -1.6936404705047607, -0.09769848734140396, -0.1714993715286255, 0.030687859281897545, -1.3462307453155518, -1.6638065576553345, 0.6870056986808777, 0.5641369819641113, 0.6517651081085205, -0.12838570773601532, 0.8973734378814697, -0.9926363229751587, 0.9295807480812073, -0.9904302954673767, -1.6240713596343994, -1.5107431411743164, -2.3061256408691406, -2.2815005779266357, 0.9135208129882812, -0.4985625445842743, -0.4563363194465637, 1.9268085956573486, -0.933354377746582, -1.7396193742752075, 1.0987491607666016, 0.27865496277809143, 0.048673927783966064, 2.3218963146209717, 0.22777852416038513, -0.6763326525688171, 0.3815062344074249, -0.7333000898361206, 0.8104526400566101, -0.33448201417922974, 1.4395593404769897, 0.5410717129707336, -0.9538251757621765, 1.5425468683242798, -0.5111271739006042, 0.4554314613342285, -0.6224377751350403, -0.6152753233909607, -0.8715829253196716, 0.3974840044975281, 1.8681750297546387, -0.38278430700302124, 1.613571286201477, -0.3365512192249298, -1.6404987573623657, -1.4763432741165161, 0.7607888579368591, 0.5754007697105408, -0.8284435868263245, 0.021606815978884697, -0.3467559218406677, 0.06762359291315079, -0.025464477017521858, 1.1325477361679077, 1.0989410877227783, 0.7065014839172363, -0.4208117425441742, -0.8810800313949585, 0.27603381872177124, -0.10483527928590775, -0.7239874601364136, -1.8265633583068848, -0.3374533951282501, 0.2909066379070282, 0.6027571558952332, -1.3274328708648682, 1.5601187944412231, 0.9011662006378174, 2.011154890060425, 0.9742582440376282, -0.41195815801620483, 1.388962745666504, 0.037452563643455505, 1.818565011024475, -0.6578583717346191, 0.6372050046920776, -0.27117985486984253, -1.0815924406051636, 0.852609395980835, -0.4321157932281494, -2.090294599533081, -0.7541499733924866, -0.953331708908081, -0.21084636449813843, -0.794126570224762, 0.8918763399124146, -0.31065642833709717, -1.335564374923706, 0.17005640268325806, -0.6724944114685059, 0.16155549883842468, -1.2289550304412842, 0.15976953506469727, 0.8928565382957458, -0.6501691937446594, -0.1486268788576126, -0.2228134423494339, -1.3059536218643188, -0.5620588064193726, 0.24795269966125488, 1.9173942804336548, -0.6354900598526001, 1.0107921361923218, 0.9336006045341492, -0.6989694237709045, 0.03513822704553604, 0.269544780254364, -0.28655216097831726, 0.9706878066062927, -1.123940110206604, -0.47550246119499207, 0.9708628058433533, -0.15006205439567566, -0.5012694001197815, 1.5451035499572754, 0.7814494967460632, -0.9877630472183228, -0.2501245141029358, -0.2409599870443344, -0.8388029336929321, -0.0634118914604187, -1.4743448495864868, -0.2049124836921692, 0.14520765841007233, -1.509221076965332, -0.49784335494041443, -0.2552378177642822, 1.3205963373184204, -0.2330903708934784, 1.3377652168273926, -0.28986039757728577, -0.3910888135433197, -0.5173230171203613, -0.3836361765861511, 0.21518006920814514, -0.24887841939926147, -0.6212093234062195, 0.2640906274318695, -0.8263528943061829, 0.34034478664398193, 1.4470962285995483, 0.49528685212135315, 0.03214418143033981, 0.5981493592262268, 1.0611398220062256, 0.30604463815689087, -0.021842969581484795, -0.8730930685997009, -1.493699073791504, 1.9881973266601562, -1.4657069444656372, 1.8256077766418457, 0.8334429264068604, -0.11882004141807556, -1.8004990816116333, -1.8157368898391724, 1.2957850694656372, 1.2493499517440796, 2.3901264667510986, 0.5619564652442932, 0.44566988945007324, -0.7927305698394775, -0.7192004919052124, 0.28525519371032715, -1.0301021337509155, -0.7288403511047363, 0.09935262799263, 2.336686372756958, 1.8395709991455078, -0.6059924364089966, -0.18964911997318268, -0.9596085548400879, 1.4148565530776978, -0.10015816241502762, 0.1860894113779068, 2.03670072555542, -0.3111325800418854, -1.10872483253479, 1.2611804008483887, -2.2548906803131104, 0.17163167893886566, 2.0363004207611084, 0.43575170636177063, 0.024298274889588356, -1.4666359424591064, -0.5863858461380005, -0.35294756293296814, -0.4743698835372925, -1.2586020231246948, 0.518526017665863, -0.283939927816391, -0.7948071360588074, -1.5601303577423096, 0.0007604090496897697, -1.1491769552230835, -1.7023481130599976, 0.36633366346359253, 1.8546603918075562, 2.011589527130127, -0.6697887182235718, 1.4356815814971924, -0.29984962940216064, 0.13886471092700958, 1.2220375537872314, 1.2752676010131836, 3.150792360305786, 1.9563051462173462, -1.1596497297286987, 0.7134465575218201, -0.15494009852409363, -0.44597548246383667, 1.0454175472259521, -1.0285207033157349, 1.195275902748108, -0.19311121106147766, -1.2485930919647217, -1.1269041299819946, 1.1337158679962158, 0.525436282157898, 0.037397146224975586, -0.6404801607131958, 1.1671826839447021, 0.05630125105381012, 1.3834731578826904, 0.5617480278015137, -0.4125780463218689, 0.5541017651557922, -0.42005103826522827, -0.5485534071922302, 1.70029616355896, 0.1764828860759735, -1.5016831159591675, -2.379926919937134, -0.2756648361682892, -0.8684519529342651, -0.068988136947155, -0.6079447865486145, -1.0700072050094604, 1.5987770557403564, 0.5379295945167542, -1.2691569328308105, -0.3688299357891083, -0.41218942403793335, -0.7221896052360535, 2.619810104370117, -1.4134140014648438, -0.08676798641681671, -0.9333873391151428, -0.48977458477020264, 1.6267218589782715, -1.218700885772705, -0.1800943911075592, -1.0327956676483154, -0.7366012334823608, -1.258948802947998, -0.5628939270973206, -0.04781288653612137, -0.8489087820053101, 0.8292927742004395, -0.003977609798312187, -0.9922263026237488, -0.30157044529914856, -0.8730016350746155, 0.8476514220237732, -0.13947100937366486, 0.19670988619327545, 1.9525911808013916, 0.37242573499679565, -0.4007854759693146, 0.6323518753051758, 1.2238577604293823, 0.6304196715354919, -0.7381907105445862, 0.08247779309749603, -0.7098351716995239, 0.2838878929615021, -1.3096637725830078, 0.2759256362915039, -2.963714599609375, 0.6777857542037964, -0.04144280403852463, -0.06835827231407166, 0.00004282686859369278, -1.268873929977417, 1.0907081365585327, 2.5373759269714355, -1.245330572128296, 0.4075014591217041, 0.37813037633895874, 1.0967490673065186, -1.7086600065231323, 0.30774784088134766, -0.49541357159614563, 2.105353832244873, 0.11433351784944534, 1.1947780847549438, -0.635169267654419, -2.1619231700897217, 0.5576028227806091, -1.1686010360717773, -1.113931655883789, 0.6886048316955566, -0.8752539157867432, 0.27874264121055603, -1.55711030960083, -0.133159339427948, -0.9163461327552795, -1.2971035242080688, 0.7631494998931885, 0.04566625505685806, 0.406463086605072, -0.6062257885932922, 0.3355790078639984, -2.172163724899292, -1.4320952892303467, -0.2527402639389038, -0.8934720158576965, 0.5528996586799622, -0.38187968730926514, 0.7174966335296631, 0.07188204675912857, 0.12150076031684875, 0.26838600635528564, 1.3542697429656982, 3.3711507320404053, 0.17291748523712158, 0.30835264921188354, -0.03445588797330856, -1.011206865310669, 1.3983227014541626, 0.998426079750061, 0.019662028178572655, -0.5556855797767639, -1.0086417198181152, 1.3745352029800415, 1.9697648286819458, 1.0784672498703003, 0.1123400554060936, -0.792361855506897, -0.6544484496116638, 0.10945563018321991, 0.31994664669036865, 0.5431021451950073, 0.9765161871910095, -0.0040736207738518715, 0.22013314068317413, 1.450358271598816, 1.2789855003356934, -0.3971758782863617, 0.43903255462646484, -0.9014350771903992, -0.5353590250015259, 0.35008496046066284, 0.28817346692085266, -0.015447990037500858, 0.47589534521102905, -1.073158621788025, -0.33591002225875854, -0.2905881702899933, -1.037573218345642, -0.6084263324737549, -0.43397021293640137, -0.42352163791656494, 1.612539529800415, 0.0635819062590599, -0.48028433322906494, -0.035669922828674316, -0.7176581621170044, -0.10351062566041946, -1.1303147077560425, 0.3558584749698639, -0.10018416494131088, -0.01355309784412384, -0.1671401709318161, 1.7881958484649658, -0.8190841674804688, -2.1026768684387207, 0.2520446479320526, 0.4112672805786133, -0.5397404432296753, 0.07584584504365921, 1.5644984245300293, 0.5615803599357605, 1.4665583372116089, 1.2921861410140991, 1.014114260673523, -0.5665448307991028, -1.369037389755249, 0.6431476473808289, 1.007702112197876, -1.3754864931106567, 0.7973997592926025, -0.11913499236106873, -0.48147010803222656, 0.7729752063751221, 1.434380054473877, 0.28407207131385803, -2.001573085784912, 0.9203441143035889, -0.8251344561576843, 0.8064982891082764, 0.7222258448600769, 0.7988536357879639, 0.23326991498470306, 0.8819196820259094, -1.4073177576065063, -1.1105637550354004, -0.8603464961051941, -0.5671586394309998, 1.984492301940918, -0.1789523959159851, 0.5288597941398621, -0.29804670810699463, -1.2268176078796387, -0.08998379111289978, 0.7331246733665466, 0.45074376463890076, -0.3239304721355438, 0.8675999045372009, -0.6002309322357178, -1.0896837711334229, -1.3625857830047607, -0.34027811884880066, -0.8320357799530029, -0.9134229421615601, 0.9393725395202637, 0.9158456921577454, 0.4550428092479706, 1.9035513401031494, 0.5574395656585693, 0.21115387976169586, -2.636354684829712, 0.8591291904449463, 0.29933613538742065, -0.011618433520197868, 0.9662196040153503, 0.22855977714061737, 1.1327248811721802, 0.03769771009683609, 0.4654282331466675, -2.278972864151001, 2.2128677368164062, -0.18286676704883575, 0.7691698670387268, 0.05045916885137558, -0.19061556458473206, 1.2007559537887573, 0.5697149038314819, 0.5699561834335327, -1.1241999864578247, 0.6955721974372864, -0.5041775703430176, 1.141087532043457, 0.9139006733894348, -0.720797598361969, 0.003400447778403759, 1.3639357089996338, 0.6186419129371643, -0.4494486153125763, -0.9995004534721375, -0.8726972937583923, 0.9980007410049438, 1.7828115224838257, -0.004260622430592775, 0.02250262163579464, 0.8609994053840637, 0.7397860884666443, -1.2384520769119263, 0.17937487363815308, -0.8119863271713257, -0.6619822978973389, 1.668230652809143, 2.074479818344116, -0.022229613736271858, -0.18547767400741577, -0.6200988292694092, -1.2094470262527466, 0.7531904578208923, -0.009253498166799545, 0.22465603053569794, 0.80040043592453, -0.6588757634162903, 1.1474772691726685, 0.817696213722229, 0.9402770400047302, 0.03096739761531353, 0.35932502150535583, 0.26372650265693665, -0.24783417582511902, -1.1228830814361572, -0.23654185235500336, -1.1413710117340088, -2.476431131362915, 0.45669934153556824, -0.24013030529022217, -1.3536943197250366, 0.037741802632808685, -0.9830132126808167, 0.9057115912437439, -0.5838406085968018, -1.1316072940826416, -1.6105884313583374, 0.27554354071617126, -0.04771372675895691, 0.9973901510238647, -1.6077274084091187, -0.16653549671173096, 1.2300646305084229, 0.7557687163352966, -0.5412447452545166, 0.9704513549804688, 0.24473640322685242, 0.9440596103668213, 0.781821072101593, -0.3963426947593689, 0.40947046875953674, 0.11766555905342102, -1.3708117008209229, 0.5385428071022034, 1.1288104057312012, 0.18782760202884674, 1.3916016817092896, -0.5661614537239075, 0.17007561028003693, 0.5024617910385132, -0.4533812701702118, -0.4243866205215454, -0.5072420835494995, 0.6434274315834045, 0.07841340452432632, -0.9918336868286133, 0.07570663839578629, -0.16352060437202454, -0.2110903114080429, 0.2676948308944702, -1.3897050619125366, -0.3373275399208069, -0.44704845547676086, -0.4899521470069885, -1.256699800491333, -0.0401301234960556, 1.3591623306274414, -0.8270796537399292, -0.22718922793865204, 0.5593934059143066, 0.4533275365829468, 0.6428473591804504, 0.6518199443817139, -0.6645825505256653, -0.3281847834587097, -0.2657262086868286, -0.22052721679210663, 0.15217362344264984, 1.2121763229370117, -0.23876865208148956, -0.9735944867134094, 0.6838797330856323, -0.42830681800842285, 0.06031361222267151, 2.0315916538238525, 0.10000231117010117, -0.7212731838226318, 0.38377663493156433, -0.7443802952766418, 1.7509849071502686, 1.6210442781448364, 1.3695940971374512, -0.07470262795686722, -0.8635339736938477, 0.47776326537132263, -0.1808476597070694, -0.4084970951080322, 0.8935505151748657, 0.5210909247398376, -0.16077522933483124, -1.4628170728683472, 0.5317055583000183, 1.3445472717285156, -0.9996194839477539, -0.7476723194122314, 0.208831325173378, -0.8326356410980225, 1.1354199647903442, 0.6206125020980835, 0.49781885743141174, 0.22710494697093964, 1.6448794603347778, 0.7065312266349792, -0.45333603024482727, 0.3753124177455902, 0.5652849674224854, -0.21583549678325653, -2.0668458938598633, -1.1707864999771118, 0.23471620678901672, -0.5043582916259766, -1.5297417640686035, 1.3061482906341553, -1.165374994277954, -0.9079865217208862, 0.5343763828277588, 0.12197063863277435, 1.441277265548706, 0.3089044988155365, 1.7258145809173584, 2.050395965576172, 0.8805548548698425, 0.26224035024642944, 1.3968831300735474, 0.058609165251255035, -0.43821826577186584, 1.8752739429473877, -0.4182097315788269, 0.5774492025375366, 1.0249903202056885, -0.4439360499382019, -1.1791565418243408, -0.7398290634155273, -1.132563591003418, -0.613055408000946, 1.1467994451522827, 0.14320088922977448, -1.17355477809906, 0.18820814788341522, 1.4882482290267944, 0.17727507650852203, -0.2519405782222748, 0.4849560558795929, 0.4382297098636627, -0.737022876739502, -0.0685199722647667, -0.992487370967865, 0.42625218629837036, -0.1607467383146286, -0.3506612181663513, 0.17795498669147491, 0.6013920903205872, 1.2191401720046997, -0.024922482669353485, 0.10549803823232651, 1.1766343116760254, -1.3581675291061401, 1.4766526222229004, -0.5908756852149963, 0.21366338431835175, -2.5132899284362793, 1.4347575902938843, -0.7265750765800476, 1.918807864189148, -2.6631195545196533, 0.37153860926628113, -0.67596834897995, -0.38285425305366516, 0.3405080735683441, -0.37821128964424133, 0.19436177611351013, -0.14728893339633942, -1.0819091796875, 0.014199554920196533, -0.8228611350059509, 0.6113397479057312, 1.2418620586395264, 1.416671872138977, -1.1517281532287598, -0.28571271896362305, -1.7085200548171997, -0.13427208364009857, -0.6689684987068176, 0.38850507140159607, -1.967166543006897, -0.06089320033788681, -1.8534942865371704, -2.2896947860717773, -1.4015333652496338, -0.9679169058799744, 0.943260908126831, 0.17307636141777039, -0.9761755466461182, 1.0231635570526123, -0.4162561297416687, -1.681823968887329, 1.0916715860366821, -2.257431983947754 ]
https://github.com/huggingface/datasets/issues/4504
Can you please add the Stanford dog dataset?
Hi @khushmeeet! Thanks for the interest. You can self-assign the issue by commenting `#self-assign` on it. Also, I think we can skip @dgrnd4's steps as we try to avoid any custom processing on top of raw data. One can later copy the script and override `_post_process` in it to perform such processing on the generated dataset.
## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
710
56
Can you please add the Stanford dog dataset? ## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Hi @khushmeeet! Thanks for the interest. You can self-assign the issue by commenting `#self-assign` on it. Also, I think we can skip @dgrnd4's steps as we try to avoid any custom processing on top of raw data. One can later copy the script and override `_post_process` in it to perform such processing on the generated dataset.
[ -1.222896933555603, -1.023490071296692, -0.6714375615119934, 1.3657517433166504, -0.258989155292511, -1.4030535221099854, 0.14887969195842743, -1.0528368949890137, 1.689548373222351, -0.6220672726631165, 0.27260249853134155, -1.7090121507644653, -0.06625767797231674, -0.5452932119369507, -0.8134617805480957, -0.8270825743675232, -0.4616800844669342, -0.862426221370697, 0.8839867115020752, 2.470639228820801, 1.1353236436843872, -1.3954710960388184, 2.710777521133423, 0.6381480693817139, -0.20919297635555267, -1.0089867115020752, 0.4812600910663605, 0.1368914544582367, -1.2582355737686157, -0.42586788535118103, -0.8944150805473328, -0.07377070188522339, -0.5034424066543579, -0.479502409696579, 0.1513846516609192, 0.33746281266212463, -0.05996851995587349, -0.36976680159568787, -0.5628820657730103, -0.6227651834487915, 0.42657461762428284, -0.36774978041648865, 0.9204531908035278, -0.5011833906173706, 1.7705096006393433, -0.6949387192726135, 0.4126509130001068, 0.6626808047294617, 1.3333194255828857, 0.21436159312725067, -0.025484520941972733, 0.3289692997932434, 0.4470818042755127, 0.01701607182621956, 0.42540574073791504, 1.1945810317993164, 0.6144223213195801, 0.5586965084075928, 0.6744017004966736, -2.179750680923462, 1.3316519260406494, -0.9160147309303284, 0.4714565873146057, 1.4809798002243042, -0.9833215475082397, 0.4050752818584442, -1.8083986043930054, -0.0868435874581337, 0.5443589687347412, -2.3597307205200195, 0.11524175852537155, -1.2799545526504517, -0.6842858791351318, 0.9552618265151978, 0.22711892426013947, -1.2639890909194946, 0.246608704328537, -0.5828660130500793, 0.9916430115699768, 0.4366542100906372, 1.181526780128479, -1.7170870304107666, -0.12812693417072296, -0.17686471343040466, 0.054725635796785355, -1.3117059469223022, -1.6482833623886108, 0.7206486463546753, 0.6024372577667236, 0.6713001132011414, -0.15929748117923737, 0.846021831035614, -0.9937354922294617, 0.9981467127799988, -0.9892922639846802, -1.6305792331695557, -1.4493470191955566, -2.2770891189575195, -2.288740873336792, 0.9563001990318298, -0.4338667392730713, -0.42702147364616394, 1.923385739326477, -0.9135617017745972, -1.7461351156234741, 1.0719228982925415, 0.22624866664409637, 0.03182550519704819, 2.312178611755371, 0.2429274320602417, -0.6653304696083069, 0.36701762676239014, -0.73654705286026, 0.7924181818962097, -0.3571184575557709, 1.3938076496124268, 0.478764146566391, -0.9726499915122986, 1.543445110321045, -0.5252171754837036, 0.4886382818222046, -0.621802568435669, -0.5848163366317749, -0.8226525783538818, 0.4338030517101288, 1.9311318397521973, -0.30818185210227966, 1.5957410335540771, -0.36180177330970764, -1.6609419584274292, -1.479020595550537, 0.7310105562210083, 0.5874705910682678, -0.7790902853012085, 0.016572579741477966, -0.3365728557109833, 0.1232474148273468, -0.057007014751434326, 1.114723563194275, 1.1353999376296997, 0.7633048295974731, -0.40505510568618774, -0.8560394048690796, 0.25719043612480164, -0.05608949437737465, -0.8270809650421143, -1.79984712600708, -0.3819100856781006, 0.28612735867500305, 0.5976235866546631, -1.3377653360366821, 1.6163545846939087, 0.892524003982544, 1.995460867881775, 0.9398696422576904, -0.3519791066646576, 1.4250664710998535, 0.07009903341531754, 1.8589403629302979, -0.5917633175849915, 0.7043845057487488, -0.29295283555984497, -1.0731245279312134, 0.761088490486145, -0.4429771602153778, -2.0661885738372803, -0.7013636231422424, -0.9584007859230042, -0.18178938329219818, -0.7429762482643127, 0.8965000510215759, -0.3052184581756592, -1.3444716930389404, 0.15921202301979065, -0.6975088119506836, 0.2354106456041336, -1.2582472562789917, 0.17016173899173737, 0.910169780254364, -0.6793392300605774, -0.1252478063106537, -0.23523259162902832, -1.3102517127990723, -0.5959958434104919, 0.2275370955467224, 1.9443787336349487, -0.6724644303321838, 1.0176811218261719, 0.8779613375663757, -0.7267438173294067, 0.05412569269537926, 0.3290189504623413, -0.30050379037857056, 0.8836544156074524, -1.199514389038086, -0.3752233386039734, 1.0281352996826172, -0.17231880128383636, -0.4583100378513336, 1.581440806388855, 0.8249363303184509, -0.984355092048645, -0.2356014847755432, -0.2800980508327484, -0.7752940058708191, -0.06670842319726944, -1.5499932765960693, -0.17952470481395721, 0.128358855843544, -1.425810694694519, -0.551383912563324, -0.24833360314369202, 1.3131296634674072, -0.1805158257484436, 1.2977162599563599, -0.2750524878501892, -0.4126341640949249, -0.49557313323020935, -0.38903748989105225, 0.20006127655506134, -0.3191971778869629, -0.6428937315940857, 0.2820029854774475, -0.7706348896026611, 0.2984101474285126, 1.4827841520309448, 0.49622711539268494, -0.01074291579425335, 0.6070767641067505, 1.0687142610549927, 0.24953338503837585, -0.08087017387151718, -0.9065365195274353, -1.4879201650619507, 1.9948629140853882, -1.3981719017028809, 1.856775164604187, 0.8309729695320129, -0.109920933842659, -1.770620346069336, -1.8342795372009277, 1.2766908407211304, 1.2267869710922241, 2.390479326248169, 0.5823678374290466, 0.45885419845581055, -0.8280466794967651, -0.6704103946685791, 0.2369219958782196, -1.0253798961639404, -0.7732564210891724, 0.12591217458248138, 2.376612424850464, 1.846656322479248, -0.654630184173584, -0.12593640387058258, -1.0619630813598633, 1.363102674484253, -0.14385508000850677, 0.2113231122493744, 2.0444376468658447, -0.3267349600791931, -1.116814136505127, 1.2731198072433472, -2.2384748458862305, 0.2242146134376526, 2.0358846187591553, 0.39407724142074585, 0.021245207637548447, -1.4868299961090088, -0.580100417137146, -0.3324911296367645, -0.3818463683128357, -1.1934789419174194, 0.5249724984169006, -0.2657631039619446, -0.8155839443206787, -1.50652015209198, -0.0021808231249451637, -1.1180579662322998, -1.7104281187057495, 0.4073171019554138, 1.8268574476242065, 1.9371761083602905, -0.6513591408729553, 1.394858479499817, -0.2839750647544861, 0.09312491863965988, 1.2319250106811523, 1.267823576927185, 3.178975820541382, 1.9770933389663696, -1.1649651527404785, 0.7444944977760315, -0.16729582846164703, -0.3817136883735657, 1.0135412216186523, -0.997890830039978, 1.1864653825759888, -0.20453140139579773, -1.2447470426559448, -1.150154709815979, 1.0928105115890503, 0.5436795353889465, -0.0009862668812274933, -0.6131736040115356, 1.1679521799087524, 0.05139053240418434, 1.4652162790298462, 0.5604455471038818, -0.4152897596359253, 0.6032587289810181, -0.396088182926178, -0.5243183970451355, 1.7507517337799072, 0.17606310546398163, -1.5307174921035767, -2.429082155227661, -0.26746809482574463, -0.9231387972831726, -0.07312945276498795, -0.6002442836761475, -1.0379347801208496, 1.604508399963379, 0.5573222041130066, -1.2320258617401123, -0.3258127272129059, -0.3497496247291565, -0.7313071489334106, 2.65971302986145, -1.4029521942138672, -0.14318765699863434, -0.9197792410850525, -0.5201956033706665, 1.6761527061462402, -1.2344177961349487, -0.19636239111423492, -1.092681884765625, -0.7125126719474792, -1.2104060649871826, -0.506836473941803, -0.060600023716688156, -0.9289108514785767, 0.9124941825866699, 0.020996350795030594, -1.0133471488952637, -0.33908939361572266, -0.8979320526123047, 0.8429346084594727, -0.0791178047657013, 0.195521742105484, 1.9035007953643799, 0.4290894567966461, -0.4277344048023224, 0.5998575091362, 1.2474879026412964, 0.6802047491073608, -0.746208131313324, 0.14638978242874146, -0.6851009726524353, 0.28177952766418457, -1.3465825319290161, 0.22069858014583588, -2.984208822250366, 0.6974538564682007, -0.08012192696332932, -0.1216282919049263, -0.022081829607486725, -1.278304100036621, 1.1529101133346558, 2.51424241065979, -1.1887394189834595, 0.40495410561561584, 0.39246660470962524, 1.1298202276229858, -1.6465568542480469, 0.34901610016822815, -0.4571579396724701, 2.1199841499328613, 0.15114238858222961, 1.186597228050232, -0.6304369568824768, -2.127037763595581, 0.6032396554946899, -1.1110321283340454, -1.1018034219741821, 0.6477249264717102, -0.8923431634902954, 0.2571238875389099, -1.5755794048309326, -0.12280500680208206, -0.851577877998352, -1.2969837188720703, 0.7196512818336487, 0.06389939039945602, 0.42895764112472534, -0.6572509407997131, 0.3183731436729431, -2.174253463745117, -1.417840838432312, -0.2727811932563782, -0.9212760925292969, 0.5526602268218994, -0.3711722493171692, 0.7344542741775513, 0.019857387989759445, 0.09864895790815353, 0.27190539240837097, 1.4288897514343262, 3.335824966430664, 0.15906505286693573, 0.2905692458152771, -0.03611898794770241, -0.9428948163986206, 1.3561238050460815, 0.9927434325218201, 0.019007708877325058, -0.5698083639144897, -1.0073730945587158, 1.3610986471176147, 1.9916166067123413, 1.0474263429641724, 0.14428642392158508, -0.7755997180938721, -0.650296688079834, 0.07731062918901443, 0.2743432819843292, 0.5333846211433411, 0.9670195579528809, 0.006688958965241909, 0.17926111817359924, 1.4258348941802979, 1.317384958267212, -0.4056253135204315, 0.4622368812561035, -0.8923874497413635, -0.5446426272392273, 0.41425207257270813, 0.31764382123947144, 0.009139361791312695, 0.3987347483634949, -1.103794813156128, -0.29453903436660767, -0.19811710715293884, -0.9984663724899292, -0.6497865915298462, -0.5011358857154846, -0.46609893441200256, 1.6385259628295898, 0.03807244077324867, -0.49502721428871155, -0.05464603006839752, -0.7296442985534668, -0.04038792476058006, -1.1088130474090576, 0.4114876389503479, -0.07358509302139282, 0.011036655865609646, -0.1673196256160736, 1.7728526592254639, -0.8359912037849426, -2.0693767070770264, 0.24253898859024048, 0.3597383499145508, -0.5874179005622864, 0.07033579796552658, 1.6071388721466064, 0.5881258845329285, 1.4732450246810913, 1.3518261909484863, 1.000129222869873, -0.5368387699127197, -1.3256595134735107, 0.6039961576461792, 0.8820015788078308, -1.3851678371429443, 0.7442143559455872, -0.11287502944469452, -0.48152703046798706, 0.7881835699081421, 1.413525104522705, 0.287509560585022, -1.9883171319961548, 0.9091886878013611, -0.8115686774253845, 0.8324307203292847, 0.7648501396179199, 0.7768235802650452, 0.225529745221138, 0.8787747025489807, -1.3972668647766113, -1.066634178161621, -0.8813129663467407, -0.5364354848861694, 2.0154924392700195, -0.16764482855796814, 0.4504534602165222, -0.22515632212162018, -1.1875778436660767, -0.08289770036935806, 0.7532113194465637, 0.5075547099113464, -0.30561479926109314, 0.8347006440162659, -0.5951439738273621, -1.0690616369247437, -1.2999447584152222, -0.4205789566040039, -0.8319892883300781, -0.9113098978996277, 0.9152135252952576, 0.9931032061576843, 0.5137313008308411, 1.8945497274398804, 0.5887575149536133, 0.2436951994895935, -2.605365514755249, 0.8496206998825073, 0.2768668532371521, -0.039737168699502945, 0.9665217399597168, 0.21485227346420288, 1.1409839391708374, 0.03298624977469444, 0.4620606601238251, -2.3625967502593994, 2.228762149810791, -0.18938606977462769, 0.7359347939491272, 0.05269616097211838, -0.12211176753044128, 1.2703382968902588, 0.5693086385726929, 0.5364888310432434, -1.117851734161377, 0.7073532342910767, -0.5385955572128296, 1.188249111175537, 0.8590646386146545, -0.7435332536697388, -0.019205249845981598, 1.3593406677246094, 0.5749869346618652, -0.42919543385505676, -1.0476182699203491, -0.9261348843574524, 0.9839180111885071, 1.7788718938827515, -0.02758754789829254, -0.004176515154540539, 0.8623773455619812, 0.7177112102508545, -1.2763051986694336, 0.13777793943881989, -0.8232768177986145, -0.6672061681747437, 1.657412052154541, 2.04158616065979, 0.00007354281842708588, -0.19964481890201569, -0.6267610788345337, -1.2251724004745483, 0.7387745976448059, 0.01234267745167017, 0.20021478831768036, 0.7949512004852295, -0.6370615363121033, 1.1093170642852783, 0.8495469689369202, 0.9730227589607239, 0.04138310253620148, 0.39185217022895813, 0.27087077498435974, -0.2932840883731842, -1.208437204360962, -0.23679637908935547, -1.1669511795043945, -2.4560670852661133, 0.4517112374305725, -0.30138078331947327, -1.4326331615447998, 0.05281786620616913, -1.053825855255127, 0.8659242391586304, -0.6041727662086487, -1.1491334438323975, -1.6416372060775757, 0.2605857253074646, -0.09315145015716553, 0.9881187081336975, -1.5889934301376343, -0.13069626688957214, 1.1774396896362305, 0.7226121425628662, -0.4906262755393982, 0.9335272312164307, 0.25864386558532715, 0.9951128363609314, 0.8090572357177734, -0.4107668101787567, 0.3919759690761566, 0.11172068119049072, -1.376294732093811, 0.5138371586799622, 1.1262097358703613, 0.2454315423965454, 1.3995769023895264, -0.5925102233886719, 0.1909019500017166, 0.5280286073684692, -0.49265190958976746, -0.45335739850997925, -0.5266707539558411, 0.6639410257339478, 0.03702283278107643, -1.0597854852676392, 0.01912928745150566, -0.15064316987991333, -0.1654762178659439, 0.288785845041275, -1.393959879875183, -0.3020506203174591, -0.4338553249835968, -0.5149751901626587, -1.2110368013381958, -0.02955542504787445, 1.3087058067321777, -0.8234003782272339, -0.24219322204589844, 0.5516055226325989, 0.45223578810691833, 0.6608682870864868, 0.6547161340713501, -0.693359375, -0.3589010536670685, -0.26153507828712463, -0.24803930521011353, 0.18607671558856964, 1.2495695352554321, -0.21551653742790222, -0.9763418436050415, 0.6429149508476257, -0.437387079000473, 0.12472398579120636, 2.0559773445129395, 0.10318085551261902, -0.7601608037948608, 0.3607214391231537, -0.790659487247467, 1.787550926208496, 1.6085989475250244, 1.3252865076065063, -0.025800086557865143, -0.9822216033935547, 0.38239702582359314, -0.19091841578483582, -0.3977198898792267, 0.836593508720398, 0.5727921724319458, -0.1529308557510376, -1.3958797454833984, 0.5059913992881775, 1.3404661417007446, -0.9332142472267151, -0.7588726878166199, 0.20760668814182281, -0.8114848136901855, 1.1094043254852295, 0.634443998336792, 0.4714173972606659, 0.23625053465366364, 1.6394702196121216, 0.7079145312309265, -0.41316819190979004, 0.3557252585887909, 0.565192699432373, -0.22275233268737793, -2.099982500076294, -1.196250557899475, 0.2431941032409668, -0.4834331274032593, -1.5480037927627563, 1.303390622138977, -1.170133352279663, -0.8406356573104858, 0.5480079650878906, 0.2073952555656433, 1.464255690574646, 0.38671568036079407, 1.724074363708496, 2.023826837539673, 0.897800624370575, 0.19655480980873108, 1.4391640424728394, 0.07443825155496597, -0.5226904153823853, 1.8736900091171265, -0.45899561047554016, 0.5291497111320496, 1.0217089653015137, -0.4405957758426666, -1.2196556329727173, -0.7606111764907837, -1.1333767175674438, -0.6408711075782776, 1.1339727640151978, 0.1601480394601822, -1.1777149438858032, 0.1441638469696045, 1.4767991304397583, 0.13505573570728302, -0.2601800858974457, 0.4911606013774872, 0.35225778818130493, -0.7011135816574097, -0.0785864070057869, -0.9932326674461365, 0.40835684537887573, -0.12734472751617432, -0.3434090316295624, 0.1570267230272293, 0.6220033168792725, 1.2382920980453491, -0.03622855991125107, 0.0774914026260376, 1.231065273284912, -1.3827718496322632, 1.4776629209518433, -0.6359739899635315, 0.2965637445449829, -2.4719488620758057, 1.4390299320220947, -0.7547327280044556, 1.8640341758728027, -2.664288282394409, 0.3678025007247925, -0.6112043261528015, -0.3861555755138397, 0.2785134017467499, -0.378034770488739, 0.2351687252521515, -0.07238449901342392, -1.143959403038025, 0.003605620004236698, -0.854987621307373, 0.5694706439971924, 1.2392100095748901, 1.4113448858261108, -1.1594632863998413, -0.2753942906856537, -1.6943066120147705, -0.15961967408657074, -0.6845647096633911, 0.43790000677108765, -1.9151445627212524, -0.004431481938809156, -1.8272722959518433, -2.242360830307007, -1.4380018711090088, -0.9122363328933716, 0.9179677367210388, 0.14722543954849243, -0.9282516241073608, 0.9638849496841431, -0.3902497887611389, -1.6599953174591064, 1.0528069734573364, -2.3017184734344482 ]
https://github.com/huggingface/datasets/issues/4504
Can you please add the Stanford dog dataset?
Thanks @mariosasko @dgrnd4 As dataset is there on Hub, and preprocessing is not recommended. I am not sure if there is any other task to do. However, I can't seem to find relevant `.py` files for this dataset in GitHub repo.
## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
710
41
Can you please add the Stanford dog dataset? ## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Thanks @mariosasko @dgrnd4 As dataset is there on Hub, and preprocessing is not recommended. I am not sure if there is any other task to do. However, I can't seem to find relevant `.py` files for this dataset in GitHub repo.
[ -1.2232656478881836, -1.0252678394317627, -0.6274358034133911, 1.3298356533050537, -0.26019981503486633, -1.37192964553833, 0.13727553188800812, -1.0441969633102417, 1.6563059091567993, -0.6216607093811035, 0.2724732756614685, -1.7087925672531128, -0.10631324350833893, -0.5276479721069336, -0.8399143218994141, -0.8199466466903687, -0.46938252449035645, -0.8672960996627808, 0.8858417868614197, 2.4950051307678223, 1.1547919511795044, -1.4301515817642212, 2.7184879779815674, 0.6984338164329529, -0.20247189700603485, -1.0353891849517822, 0.47441840171813965, 0.16473488509655, -1.21336829662323, -0.3965061902999878, -0.9095074534416199, -0.11056900769472122, -0.4730476140975952, -0.48422086238861084, 0.1460992991924286, 0.3801681697368622, -0.039546504616737366, -0.3614971935749054, -0.603364884853363, -0.6155901551246643, 0.4342767596244812, -0.41311076283454895, 0.9035630226135254, -0.4603888988494873, 1.7843689918518066, -0.6937199831008911, 0.41307228803634644, 0.660580039024353, 1.3258423805236816, 0.1868850290775299, -0.034633420407772064, 0.32592111825942993, 0.43115463852882385, 0.027469079941511154, 0.38922402262687683, 1.1785062551498413, 0.6535521149635315, 0.5565782785415649, 0.6593382954597473, -2.17594051361084, 1.3372710943222046, -0.9398940801620483, 0.44014373421669006, 1.477567434310913, -1.0234758853912354, 0.41919535398483276, -1.825229525566101, -0.08348778635263443, 0.5180435180664062, -2.3201591968536377, 0.12034518271684647, -1.2931461334228516, -0.6666143536567688, 0.941680908203125, 0.21730419993400574, -1.2984110116958618, 0.23811309039592743, -0.5826805233955383, 0.9751538634300232, 0.4335435926914215, 1.2121899127960205, -1.7063062191009521, -0.13934515416622162, -0.190428227186203, 0.06380897015333176, -1.3147214651107788, -1.6445817947387695, 0.7167981863021851, 0.5796336531639099, 0.6803567409515381, -0.15729781985282898, 0.8199594616889954, -1.0301132202148438, 0.9683058857917786, -0.9862858057022095, -1.6420905590057373, -1.4803836345672607, -2.2889180183410645, -2.2983920574188232, 0.9248366951942444, -0.43011099100112915, -0.476669579744339, 1.8808788061141968, -0.9309348464012146, -1.7577803134918213, 1.0984652042388916, 0.24388568103313446, 0.058478038758039474, 2.3408079147338867, 0.21790851652622223, -0.6687372326850891, 0.3721362054347992, -0.7706512212753296, 0.7770835161209106, -0.3523039221763611, 1.4449959993362427, 0.5314410924911499, -0.9531714916229248, 1.5686867237091064, -0.5231364369392395, 0.46615520119667053, -0.5942023992538452, -0.5830853581428528, -0.8413587808609009, 0.41402360796928406, 1.8952120542526245, -0.3110581040382385, 1.6155471801757812, -0.370513379573822, -1.6496645212173462, -1.4969011545181274, 0.7516221404075623, 0.596599280834198, -0.7861676216125488, 0.03187739849090576, -0.3918214440345764, 0.0820145383477211, -0.058567751199007034, 1.0726016759872437, 1.1029812097549438, 0.7164998054504395, -0.43677082657814026, -0.8580405712127686, 0.26426175236701965, -0.07985031604766846, -0.7685449719429016, -1.870832085609436, -0.34635645151138306, 0.3079860210418701, 0.6235784292221069, -1.3262219429016113, 1.5957180261611938, 0.9043411016464233, 1.9903591871261597, 0.8992568850517273, -0.3793012797832489, 1.380961298942566, 0.039567213505506516, 1.8581042289733887, -0.6289389729499817, 0.7461084723472595, -0.2418971210718155, -1.0090540647506714, 0.8183606863021851, -0.44597330689430237, -2.1242454051971436, -0.7321277856826782, -0.9825384020805359, -0.21313266456127167, -0.7570430040359497, 0.9019599556922913, -0.24529334902763367, -1.3617678880691528, 0.14991258084774017, -0.6857210993766785, 0.21851153671741486, -1.2619801759719849, 0.19358710944652557, 0.8877793550491333, -0.6300675272941589, -0.15507951378822327, -0.2474919706583023, -1.3100401163101196, -0.5512979626655579, 0.22173139452934265, 1.9301954507827759, -0.6860513091087341, 1.0168912410736084, 0.8545485734939575, -0.7126632928848267, 0.11485602706670761, 0.332161545753479, -0.31994736194610596, 0.8883310556411743, -1.1691303253173828, -0.3589251935482025, 1.007185935974121, -0.16741250455379486, -0.4628850519657135, 1.5787088871002197, 0.8555933237075806, -0.9631974697113037, -0.23061706125736237, -0.29904109239578247, -0.7925218343734741, -0.09483425319194794, -1.5572519302368164, -0.2238006293773651, 0.1043100655078888, -1.4032132625579834, -0.5311716794967651, -0.29145073890686035, 1.3224083185195923, -0.2083786576986313, 1.2827036380767822, -0.26764029264450073, -0.42625436186790466, -0.48822179436683655, -0.3569692075252533, 0.2029324471950531, -0.28678634762763977, -0.6079407334327698, 0.30069777369499207, -0.8169417977333069, 0.34945324063301086, 1.4429993629455566, 0.5539585947990417, 0.02105071395635605, 0.6378558874130249, 1.0243901014328003, 0.26195028424263, -0.08024360984563828, -0.8891146183013916, -1.534593939781189, 1.9706655740737915, -1.4236133098602295, 1.8274768590927124, 0.8164531588554382, -0.08369181305170059, -1.7664616107940674, -1.804681420326233, 1.2601488828659058, 1.234350562095642, 2.396095037460327, 0.6201330423355103, 0.4287419319152832, -0.8255380988121033, -0.7016191482543945, 0.25716105103492737, -1.041738748550415, -0.7284688353538513, 0.09444040805101395, 2.3563222885131836, 1.859151840209961, -0.6921727657318115, -0.11971775442361832, -1.0395780801773071, 1.3477084636688232, -0.15313705801963806, 0.23808209598064423, 2.099004030227661, -0.375260591506958, -1.0753076076507568, 1.3084317445755005, -2.286789894104004, 0.2526736259460449, 1.970273733139038, 0.3914979100227356, 0.05236069858074188, -1.5023866891860962, -0.5708710551261902, -0.3279891014099121, -0.39095908403396606, -1.2097663879394531, 0.522889256477356, -0.270263135433197, -0.8292086124420166, -1.5334713459014893, 0.019506774842739105, -1.1164485216140747, -1.7134758234024048, 0.44387152791023254, 1.8250412940979004, 1.9374014139175415, -0.6733405590057373, 1.3748598098754883, -0.26741260290145874, 0.07369177043437958, 1.2366076707839966, 1.2698259353637695, 3.128922462463379, 1.9743777513504028, -1.1581135988235474, 0.7813704013824463, -0.18928256630897522, -0.4220712184906006, 1.0523990392684937, -1.0212498903274536, 1.1395773887634277, -0.2153441607952118, -1.2368521690368652, -1.1293094158172607, 1.1125409603118896, 0.516464114189148, 0.04392329230904579, -0.6242549419403076, 1.1622775793075562, 0.08068198710680008, 1.4939008951187134, 0.5828412175178528, -0.39674922823905945, 0.5969306826591492, -0.4169241487979889, -0.4807925522327423, 1.699177861213684, 0.18872015178203583, -1.5079952478408813, -2.4068686962127686, -0.3080727458000183, -0.9006960391998291, -0.09462641179561615, -0.6158358454704285, -1.0572385787963867, 1.6111876964569092, 0.5364751815795898, -1.232845425605774, -0.31119203567504883, -0.3185914158821106, -0.6920033693313599, 2.597130298614502, -1.3969815969467163, -0.14949464797973633, -0.9375995993614197, -0.4992772936820984, 1.6537755727767944, -1.2219001054763794, -0.16390445828437805, -1.0883947610855103, -0.7304346561431885, -1.2500383853912354, -0.5674689412117004, -0.09455281496047974, -0.8985570669174194, 0.895004391670227, 0.010193810798227787, -0.9984961152076721, -0.31766414642333984, -0.8886557221412659, 0.8664395809173584, -0.06916340440511703, 0.21807439625263214, 1.902883529663086, 0.41510316729545593, -0.4138454794883728, 0.6075895428657532, 1.2416807413101196, 0.6695181727409363, -0.773674488067627, 0.12741397321224213, -0.7157395482063293, 0.2836286425590515, -1.3282980918884277, 0.22805151343345642, -2.988602638244629, 0.689839780330658, -0.06984291225671768, -0.12173708528280258, -0.03286845609545708, -1.3038504123687744, 1.2008535861968994, 2.518437147140503, -1.1890944242477417, 0.4050971269607544, 0.37680545449256897, 1.1471024751663208, -1.6068203449249268, 0.37495848536491394, -0.48326432704925537, 2.164085626602173, 0.16606199741363525, 1.185246467590332, -0.6373239755630493, -2.102074146270752, 0.5942704081535339, -1.1332415342330933, -1.0972063541412354, 0.6330928802490234, -0.8957713842391968, 0.31729698181152344, -1.6256680488586426, -0.11506126075983047, -0.9007031321525574, -1.2919585704803467, 0.7117844820022583, 0.04748805984854698, 0.4061006009578705, -0.6335691213607788, 0.3515970706939697, -2.191220283508301, -1.4201793670654297, -0.29065293073654175, -0.8973090052604675, 0.5874899625778198, -0.30823513865470886, 0.7152834534645081, 0.06275421380996704, 0.11604589968919754, 0.29758545756340027, 1.412044644355774, 3.344031572341919, 0.1773388534784317, 0.3113521337509155, -0.005927209742367268, -0.9755833148956299, 1.3827283382415771, 0.9463185667991638, 0.05870999023318291, -0.5540873408317566, -0.9663654565811157, 1.3683124780654907, 2.0127384662628174, 1.0854922533035278, 0.09775318205356598, -0.7838752865791321, -0.6450225114822388, 0.12411230057477951, 0.2559863030910492, 0.49246686697006226, 1.02266526222229, 0.007416716776788235, 0.1847096085548401, 1.4652358293533325, 1.340996503829956, -0.4307658076286316, 0.495161771774292, -0.9339743852615356, -0.5310075283050537, 0.35228246450424194, 0.28734368085861206, 0.02512528747320175, 0.4183613657951355, -1.1051809787750244, -0.3159818649291992, -0.20443101227283478, -1.0130012035369873, -0.6787273287773132, -0.5008628368377686, -0.47480911016464233, 1.6364428997039795, 0.0482712984085083, -0.5066298842430115, -0.042878780514001846, -0.7180343866348267, -0.058806248009204865, -1.0848890542984009, 0.3814984858036041, -0.06077843904495239, 0.0076242415234446526, -0.17785105109214783, 1.7599694728851318, -0.8556521534919739, -2.0370383262634277, 0.2568824589252472, 0.401401549577713, -0.6295101046562195, 0.08004195988178253, 1.6008020639419556, 0.6051734089851379, 1.493001937866211, 1.3113359212875366, 0.9903430342674255, -0.547524631023407, -1.32635498046875, 0.6183754205703735, 0.8821512460708618, -1.3784661293029785, 0.7669846415519714, -0.08466120809316635, -0.470152348279953, 0.7588609457015991, 1.482859492301941, 0.30733245611190796, -1.9595189094543457, 0.9171789884567261, -0.794403612613678, 0.8373565077781677, 0.7169721722602844, 0.7715268135070801, 0.21813221275806427, 0.8370464444160461, -1.3866939544677734, -1.058850646018982, -0.940207302570343, -0.5043108463287354, 2.041402816772461, -0.16308869421482086, 0.4737130105495453, -0.22769543528556824, -1.1807492971420288, -0.06285393238067627, 0.7751700282096863, 0.49689722061157227, -0.32131603360176086, 0.8208291530609131, -0.494686096906662, -1.0969780683517456, -1.28606379032135, -0.3734186589717865, -0.8323085308074951, -0.8713518977165222, 0.9229416251182556, 0.9766033887863159, 0.5151876211166382, 1.8761886358261108, 0.5479616522789001, 0.26464587450027466, -2.645054340362549, 0.8868641257286072, 0.25903940200805664, -0.006033420562744141, 0.958698570728302, 0.16010887920856476, 1.1287577152252197, -0.0063695902936160564, 0.5096259713172913, -2.3126635551452637, 2.1754541397094727, -0.17078785598278046, 0.7253111600875854, 0.06590059399604797, -0.11315178126096725, 1.260982632637024, 0.5577865242958069, 0.552664577960968, -1.1495856046676636, 0.6994752287864685, -0.5303592681884766, 1.1439013481140137, 0.8687684535980225, -0.7189182639122009, -0.003466580994427204, 1.315893292427063, 0.5648968815803528, -0.4042564928531647, -1.063238501548767, -0.8772069215774536, 0.9931750297546387, 1.762679934501648, -0.07547379285097122, -0.04631759598851204, 0.8610563278198242, 0.7345638871192932, -1.2607146501541138, 0.1509609967470169, -0.8112660050392151, -0.6005823016166687, 1.6779210567474365, 2.0826308727264404, -0.00422740587964654, -0.22557681798934937, -0.6091479659080505, -1.2552688121795654, 0.7528343200683594, 0.017773829400539398, 0.20738358795642853, 0.8050128221511841, -0.644985020160675, 1.1342997550964355, 0.7986313104629517, 1.0277597904205322, 0.020397603511810303, 0.39280736446380615, 0.2400178164243698, -0.27180126309394836, -1.1114346981048584, -0.24529975652694702, -1.2103102207183838, -2.4473745822906494, 0.4473130404949188, -0.30481886863708496, -1.3950204849243164, 0.05062192678451538, -1.0647369623184204, 0.8988467454910278, -0.6118553280830383, -1.1163746118545532, -1.6287610530853271, 0.26098504662513733, -0.07792870700359344, 0.984961211681366, -1.6012732982635498, -0.11991942673921585, 1.21152663230896, 0.700534999370575, -0.4902045726776123, 0.9638493061065674, 0.270786851644516, 0.9918253421783447, 0.7898063063621521, -0.38499245047569275, 0.3572840690612793, 0.10864149034023285, -1.3295928239822388, 0.5705198645591736, 1.1632251739501953, 0.21878460049629211, 1.4356378316879272, -0.5581107139587402, 0.21810133755207062, 0.5294443964958191, -0.5272824168205261, -0.45021340250968933, -0.47375085949897766, 0.6804396510124207, 0.04093487560749054, -1.0856704711914062, 0.013543159700930119, -0.1510234773159027, -0.12991704046726227, 0.2591951787471771, -1.3892077207565308, -0.3012791872024536, -0.41131025552749634, -0.5020314455032349, -1.1879066228866577, -0.07165234535932541, 1.3400133848190308, -0.8398404121398926, -0.2246537208557129, 0.5434842705726624, 0.4377993941307068, 0.6380671262741089, 0.6605499386787415, -0.6534214615821838, -0.36947596073150635, -0.26525792479515076, -0.22822903096675873, 0.18590198457241058, 1.2073464393615723, -0.23532895743846893, -1.0072916746139526, 0.6489863991737366, -0.4406040608882904, 0.10996361821889877, 2.0462770462036133, 0.07080760598182678, -0.7589246034622192, 0.394640177488327, -0.7439121603965759, 1.7337573766708374, 1.603332757949829, 1.348202109336853, 0.016668472439050674, -0.9169419407844543, 0.3952346742153168, -0.1956666111946106, -0.403967022895813, 0.868262767791748, 0.5954383015632629, -0.13619202375411987, -1.3577889204025269, 0.491815984249115, 1.3857027292251587, -0.9774311184883118, -0.7243143320083618, 0.1763080209493637, -0.832736074924469, 1.1458942890167236, 0.6298589706420898, 0.4676588475704193, 0.25297221541404724, 1.6011956930160522, 0.6425642371177673, -0.434048056602478, 0.3500133752822876, 0.5378149747848511, -0.26045697927474976, -2.083362340927124, -1.1538968086242676, 0.2493750900030136, -0.4915190637111664, -1.5391391515731812, 1.2470382452011108, -1.196617603302002, -0.834376335144043, 0.5361554026603699, 0.2409856766462326, 1.470455288887024, 0.3808727264404297, 1.7574728727340698, 2.0274641513824463, 0.9123682379722595, 0.19278322160243988, 1.4148967266082764, 0.08080976456403732, -0.5278685688972473, 1.841801404953003, -0.4273439645767212, 0.5600185990333557, 1.0062907934188843, -0.4421186149120331, -1.2375749349594116, -0.8084677457809448, -1.097334384918213, -0.6225171685218811, 1.1935944557189941, 0.16389787197113037, -1.2152142524719238, 0.12819892168045044, 1.509006381034851, 0.13387057185173035, -0.2906914949417114, 0.4374062716960907, 0.3795069754123688, -0.7213632464408875, -0.09394913911819458, -0.9603132009506226, 0.39819803833961487, -0.14761531352996826, -0.33535507321357727, 0.13141530752182007, 0.6617445945739746, 1.2085072994232178, -0.0509207546710968, 0.09937082976102829, 1.225022554397583, -1.3604018688201904, 1.5306220054626465, -0.5969858765602112, 0.2615143060684204, -2.501157283782959, 1.4480016231536865, -0.7728109955787659, 1.9155018329620361, -2.6735177040100098, 0.3402644097805023, -0.5958311557769775, -0.34874600172042847, 0.2521860599517822, -0.4062573313713074, 0.22787460684776306, -0.09400483965873718, -1.143462896347046, -0.007763244211673737, -0.8802066445350647, 0.542223334312439, 1.2222583293914795, 1.3932607173919678, -1.1704485416412354, -0.272762268781662, -1.716474175453186, -0.22400960326194763, -0.7338165044784546, 0.44613829255104065, -1.9306988716125488, 0.013603082858026028, -1.8368531465530396, -2.234168767929077, -1.434650182723999, -0.9525405168533325, 0.8916528224945068, 0.13478559255599976, -0.9339537620544434, 0.9246401190757751, -0.402306467294693, -1.7259777784347534, 1.1070913076400757, -2.285902261734009 ]
https://github.com/huggingface/datasets/issues/4504
Can you please add the Stanford dog dataset?
@khushmeeet @mariosasko The point is that the images must be processed and must have the same size in order to can be used for things for example "Training".
## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
710
28
Can you please add the Stanford dog dataset? ## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). @khushmeeet @mariosasko The point is that the images must be processed and must have the same size in order to can be used for things for example "Training".
[ -1.2423310279846191, -1.002421498298645, -0.671787679195404, 1.3546736240386963, -0.2669266164302826, -1.4129387140274048, 0.12318282574415207, -1.041369915008545, 1.6633377075195312, -0.6315522193908691, 0.2399180382490158, -1.7286921739578247, -0.06566568464040756, -0.5196679830551147, -0.8505061864852905, -0.8010281920433044, -0.4568629562854767, -0.9014702439308167, 0.8698816299438477, 2.472411870956421, 1.2024983167648315, -1.3729947805404663, 2.7315127849578857, 0.6825019717216492, -0.2167390137910843, -0.9990347623825073, 0.49222949147224426, 0.14275406301021576, -1.2042325735092163, -0.41735756397247314, -0.9087982773780823, -0.0809565931558609, -0.4839085042476654, -0.4924846589565277, 0.17694228887557983, 0.34846484661102295, -0.06617831438779831, -0.3266347050666809, -0.6180877089500427, -0.6048960089683533, 0.43314915895462036, -0.3700241148471832, 0.9045128226280212, -0.5484350919723511, 1.7967461347579956, -0.7256457209587097, 0.3567270040512085, 0.6013941764831543, 1.3301516771316528, 0.16504277288913727, -0.019802238792181015, 0.29838991165161133, 0.4183719754219055, 0.030225113034248352, 0.4144511818885803, 1.2246038913726807, 0.6495256423950195, 0.5665849447250366, 0.6922772526741028, -2.122925281524658, 1.3693599700927734, -0.9123982191085815, 0.3942617177963257, 1.4671921730041504, -0.9871601462364197, 0.40113547444343567, -1.7986212968826294, -0.0965631753206253, 0.4835471510887146, -2.4018423557281494, 0.08753916621208191, -1.278513789176941, -0.726819634437561, 0.9111814498901367, 0.16097316145896912, -1.2771868705749512, 0.2754247486591339, -0.6562262773513794, 0.9952114224433899, 0.450655460357666, 1.2066473960876465, -1.7023060321807861, -0.15556266903877258, -0.1473449021577835, 0.001996244303882122, -1.3324604034423828, -1.6370185613632202, 0.7749451398849487, 0.5766640901565552, 0.6968092918395996, -0.16374747455120087, 0.8474854826927185, -0.9952098727226257, 0.9899146556854248, -0.9734489321708679, -1.6163896322250366, -1.466135859489441, -2.283231019973755, -2.243945598602295, 0.9741504788398743, -0.4283377528190613, -0.49776989221572876, 1.8838738203048706, -0.9158062934875488, -1.7651424407958984, 1.0353690385818481, 0.25241532921791077, 0.09168616682291031, 2.315598964691162, 0.24201111495494843, -0.6332828402519226, 0.33177974820137024, -0.7270582318305969, 0.8293941617012024, -0.38655152916908264, 1.4686399698257446, 0.5217830538749695, -0.9465997815132141, 1.560383915901184, -0.5238538980484009, 0.4771048426628113, -0.5731328129768372, -0.5971599221229553, -0.8439592123031616, 0.4052150547504425, 1.9251174926757812, -0.3641854226589203, 1.6167240142822266, -0.32092851400375366, -1.6601542234420776, -1.4639955759048462, 0.7147378921508789, 0.5777278542518616, -0.8298462629318237, 0.05725206434726715, -0.3654988408088684, 0.08690264821052551, -0.06289147585630417, 1.1097549200057983, 1.104830026626587, 0.754063606262207, -0.41049712896347046, -0.8602752685546875, 0.24832291901111603, -0.09088488668203354, -0.8097563982009888, -1.8405228853225708, -0.335913747549057, 0.35465314984321594, 0.6206355690956116, -1.357735276222229, 1.556476354598999, 0.8849624395370483, 2.0005228519439697, 0.9434468150138855, -0.34729403257369995, 1.3562926054000854, 0.030755523592233658, 1.8280740976333618, -0.6697254776954651, 0.6971219182014465, -0.28066587448120117, -1.0139687061309814, 0.7980824708938599, -0.48021039366722107, -2.1019716262817383, -0.7482351064682007, -0.9783377647399902, -0.21575647592544556, -0.7828660011291504, 0.9151610732078552, -0.29846617579460144, -1.2921971082687378, 0.13211385905742645, -0.6946781277656555, 0.21547143161296844, -1.2454150915145874, 0.1471557319164276, 0.898911714553833, -0.6410923600196838, -0.19372910261154175, -0.26391565799713135, -1.3140212297439575, -0.5974734425544739, 0.17506524920463562, 1.9645394086837769, -0.676985502243042, 1.044207215309143, 0.8342341780662537, -0.7655318975448608, 0.07730117440223694, 0.3321254253387451, -0.3246290981769562, 0.9154378771781921, -1.1839933395385742, -0.41626816987991333, 0.9802259802818298, -0.14501093327999115, -0.4298820197582245, 1.5762690305709839, 0.8726574182510376, -0.9500125050544739, -0.21784010529518127, -0.2915298342704773, -0.8082147836685181, -0.09654892235994339, -1.5130788087844849, -0.2521732449531555, 0.08440901339054108, -1.4298529624938965, -0.5460639595985413, -0.2489715963602066, 1.3129271268844604, -0.21628782153129578, 1.259132981300354, -0.24037283658981323, -0.4864334464073181, -0.48119989037513733, -0.3736129701137543, 0.18250373005867004, -0.2486674189567566, -0.6342442035675049, 0.2912444770336151, -0.8200210332870483, 0.3211381733417511, 1.448366403579712, 0.526559591293335, -0.006784333381801844, 0.6672013401985168, 1.046484112739563, 0.2588300406932831, -0.08434068411588669, -0.8843817710876465, -1.5171316862106323, 1.9601078033447266, -1.414092779159546, 1.797948956489563, 0.8024787902832031, -0.09003498405218124, -1.8021650314331055, -1.804978370666504, 1.2509865760803223, 1.283366322517395, 2.396536350250244, 0.6342843770980835, 0.43644776940345764, -0.7864766120910645, -0.7199344635009766, 0.25889742374420166, -1.0557074546813965, -0.6902222037315369, 0.08497362583875656, 2.3239991664886475, 1.89105224609375, -0.7506645917892456, -0.1585998237133026, -1.0156739950180054, 1.3605899810791016, -0.1423565149307251, 0.20104412734508514, 2.0309853553771973, -0.38675037026405334, -1.029411792755127, 1.3121906518936157, -2.2581899166107178, 0.21254785358905792, 1.9942047595977783, 0.4358501732349396, 0.01158090028911829, -1.48331880569458, -0.5948277115821838, -0.36913159489631653, -0.40422478318214417, -1.1993540525436401, 0.4799526035785675, -0.2613416314125061, -0.8263370990753174, -1.5559468269348145, -0.008402942679822445, -1.1000274419784546, -1.7001702785491943, 0.47014784812927246, 1.8291925191879272, 1.9539955854415894, -0.6289448142051697, 1.393524408340454, -0.29610249400138855, 0.07356955111026764, 1.2669246196746826, 1.2731901407241821, 3.1844699382781982, 1.986523985862732, -1.136107087135315, 0.7887328267097473, -0.20432522892951965, -0.3847688138484955, 1.0430293083190918, -1.0008701086044312, 1.1565358638763428, -0.23117807507514954, -1.2524895668029785, -1.117444396018982, 1.1222927570343018, 0.5250229835510254, 0.021535836160182953, -0.6247193813323975, 1.1850121021270752, 0.039580993354320526, 1.4930955171585083, 0.5798526406288147, -0.4151094853878021, 0.5554929375648499, -0.40753790736198425, -0.4756409823894501, 1.7403757572174072, 0.19010961055755615, -1.523077368736267, -2.3986093997955322, -0.26901906728744507, -0.86433345079422, -0.1002642959356308, -0.5990138053894043, -1.08242928981781, 1.622385859489441, 0.5631834268569946, -1.2439916133880615, -0.314897745847702, -0.35988038778305054, -0.7381641268730164, 2.613440752029419, -1.452685832977295, -0.1317671239376068, -0.93910813331604, -0.4486963152885437, 1.6772249937057495, -1.2362779378890991, -0.17014895379543304, -1.0553157329559326, -0.711004912853241, -1.2855159044265747, -0.549690842628479, -0.0955144464969635, -0.8791881203651428, 0.8902618288993835, -0.04499783366918564, -0.9401202201843262, -0.30342715978622437, -0.87799471616745, 0.8282180428504944, -0.10376320034265518, 0.18091009557247162, 1.9212620258331299, 0.45582669973373413, -0.4268339276313782, 0.5822389125823975, 1.267723798751831, 0.6571090221405029, -0.7836379408836365, 0.10103695094585419, -0.707156777381897, 0.26717609167099, -1.33436119556427, 0.26277658343315125, -2.965000867843628, 0.6896108984947205, -0.0733317956328392, -0.11876098811626434, -0.011443885043263435, -1.2933247089385986, 1.1508512496948242, 2.5124905109405518, -1.2210839986801147, 0.360107958316803, 0.3590462803840637, 1.11277174949646, -1.6179333925247192, 0.35215678811073303, -0.47281214594841003, 2.079752206802368, 0.13934923708438873, 1.1805068254470825, -0.6630703210830688, -2.075862407684326, 0.6242381930351257, -1.095947265625, -1.0803838968276978, 0.6111398339271545, -0.8571765422821045, 0.32843896746635437, -1.6195992231369019, -0.09668422490358353, -0.9191263318061829, -1.3112798929214478, 0.7507766485214233, 0.07383345812559128, 0.3848012387752533, -0.6224769353866577, 0.33992987871170044, -2.170672655105591, -1.4104994535446167, -0.27112939953804016, -0.8703476190567017, 0.6200259327888489, -0.366730660200119, 0.7101742029190063, 0.07891122251749039, 0.14764422178268433, 0.2657828629016876, 1.3915497064590454, 3.355107069015503, 0.14846336841583252, 0.284178763628006, -0.03231433779001236, -0.9717769622802734, 1.3492562770843506, 0.957612156867981, 0.1030062809586525, -0.5570669770240784, -0.9664298892021179, 1.3541239500045776, 1.968714714050293, 1.074721097946167, 0.14627718925476074, -0.8216336369514465, -0.6286052465438843, 0.13033616542816162, 0.3163194954395294, 0.5148907899856567, 1.0046114921569824, -0.0016547953709959984, 0.19410251080989838, 1.4246279001235962, 1.3397096395492554, -0.4113497734069824, 0.44361793994903564, -0.9008997678756714, -0.5138435363769531, 0.37740543484687805, 0.33319342136383057, 0.008427322842180729, 0.428449422121048, -1.0900851488113403, -0.32877349853515625, -0.21303167939186096, -1.0384316444396973, -0.6273384094238281, -0.5043336153030396, -0.4636884927749634, 1.6010115146636963, 0.05571798235177994, -0.5101448893547058, -0.10085329413414001, -0.7600806355476379, -0.05207611620426178, -1.0961576700210571, 0.37656858563423157, -0.039315808564424515, -0.017187651246786118, -0.18438230454921722, 1.7468692064285278, -0.8489269614219666, -2.097364664077759, 0.26308009028434753, 0.4048326313495636, -0.6382856369018555, 0.02410094439983368, 1.588606357574463, 0.604203462600708, 1.4807428121566772, 1.322794795036316, 0.984572172164917, -0.5480348467826843, -1.3558995723724365, 0.6039139032363892, 0.8578260540962219, -1.416334629058838, 0.7882810235023499, -0.11954514682292938, -0.491472989320755, 0.7749258279800415, 1.4559288024902344, 0.27118074893951416, -1.9294439554214478, 0.8864824771881104, -0.7924362421035767, 0.8014200329780579, 0.7192144393920898, 0.8167855739593506, 0.2830559313297272, 0.8995735049247742, -1.433075189590454, -1.0703822374343872, -0.9471171498298645, -0.48612213134765625, 2.0167646408081055, -0.16196900606155396, 0.4691120386123657, -0.24668851494789124, -1.159867525100708, -0.07930894941091537, 0.7951470613479614, 0.4894833266735077, -0.2861678898334503, 0.8568503856658936, -0.5481002330780029, -1.0701713562011719, -1.2950729131698608, -0.3855626583099365, -0.7660762071609497, -0.8967500329017639, 0.9535024762153625, 1.0384970903396606, 0.5186083912849426, 1.9270684719085693, 0.5429757237434387, 0.2394305020570755, -2.6164402961730957, 0.8331885933876038, 0.2543535530567169, 0.031038574874401093, 0.9672492742538452, 0.19070404767990112, 1.130601167678833, -0.011367173865437508, 0.4439009428024292, -2.308459997177124, 2.150137186050415, -0.15408816933631897, 0.7138524055480957, 0.051320429891347885, -0.10091623663902283, 1.30033278465271, 0.5646938681602478, 0.5307443737983704, -1.1213113069534302, 0.6966868042945862, -0.48977789282798767, 1.1444424390792847, 0.9154262542724609, -0.6829655170440674, 0.006609621457755566, 1.3706194162368774, 0.6101936101913452, -0.3974885046482086, -1.053310751914978, -0.8532243967056274, 0.9797110557556152, 1.7760626077651978, -0.02510986104607582, -0.006498239003121853, 0.8643812537193298, 0.7465083003044128, -1.2814288139343262, 0.1724349409341812, -0.8067092299461365, -0.6051239371299744, 1.6778638362884521, 2.054997205734253, 0.021543871611356735, -0.1860099732875824, -0.6011192798614502, -1.2335231304168701, 0.7566421627998352, 0.026598546653985977, 0.2224985808134079, 0.814436674118042, -0.6788890957832336, 1.1405078172683716, 0.8273517489433289, 1.0056281089782715, -0.044224005192518234, 0.45093247294425964, 0.2722964584827423, -0.2644461393356323, -1.1533164978027344, -0.2588810622692108, -1.202769160270691, -2.452575922012329, 0.4838475286960602, -0.30647122859954834, -1.4041705131530762, 0.05467097461223602, -1.0596461296081543, 0.8779627084732056, -0.6117656230926514, -1.1179065704345703, -1.6469643115997314, 0.2661343216896057, -0.07004628330469131, 1.0082201957702637, -1.5978256464004517, -0.1414710134267807, 1.224443793296814, 0.6864306330680847, -0.44818586111068726, 0.9688625335693359, 0.28072965145111084, 0.9831674695014954, 0.783865749835968, -0.4016580879688263, 0.3292269706726074, 0.10092509537935257, -1.3627769947052002, 0.5326772928237915, 1.141766905784607, 0.223308265209198, 1.4215052127838135, -0.5690141320228577, 0.25514596700668335, 0.5789457559585571, -0.5150260329246521, -0.435197651386261, -0.49534451961517334, 0.664587676525116, 0.09008973836898804, -1.0698673725128174, -0.016272341832518578, -0.18028447031974792, -0.17660106718540192, 0.263187438249588, -1.362560749053955, -0.3221643269062042, -0.4343315064907074, -0.5202622413635254, -1.2022514343261719, -0.03026357665657997, 1.3342784643173218, -0.8541346192359924, -0.19996914267539978, 0.557846188545227, 0.4100015163421631, 0.6601939797401428, 0.5990157723426819, -0.6955835819244385, -0.3323650062084198, -0.27384456992149353, -0.2332768589258194, 0.15114444494247437, 1.2032134532928467, -0.22982905805110931, -0.998930811882019, 0.6680874228477478, -0.4314715564250946, 0.09174390137195587, 2.0847887992858887, 0.06041727215051651, -0.7320733070373535, 0.39357152581214905, -0.769956111907959, 1.7365492582321167, 1.5779622793197632, 1.3424124717712402, -0.0017105708830058575, -0.8973445892333984, 0.37930625677108765, -0.11959032714366913, -0.4112856984138489, 0.8432487845420837, 0.6038482785224915, -0.16275203227996826, -1.4101024866104126, 0.4659293591976166, 1.3569433689117432, -1.040820598602295, -0.7071042656898499, 0.2001257687807083, -0.8530988693237305, 1.1270569562911987, 0.5998244881629944, 0.4651636779308319, 0.2858079969882965, 1.6412475109100342, 0.6451438665390015, -0.4300672709941864, 0.32387757301330566, 0.5785841941833496, -0.21868817508220673, -2.08005952835083, -1.1397714614868164, 0.2763252258300781, -0.48041850328445435, -1.5595463514328003, 1.2445119619369507, -1.1930046081542969, -0.813565731048584, 0.5185433626174927, 0.27863073348999023, 1.4600492715835571, 0.35727131366729736, 1.7451976537704468, 2.029146194458008, 0.8837644457817078, 0.17083978652954102, 1.429640769958496, 0.10683415085077286, -0.4993126690387726, 1.8629047870635986, -0.452375203371048, 0.6060965657234192, 0.9991547465324402, -0.4336116909980774, -1.258300542831421, -0.7396178245544434, -1.0956841707229614, -0.6185703277587891, 1.1988493204116821, 0.21823836863040924, -1.175600528717041, 0.11324027925729752, 1.4803487062454224, 0.18195293843746185, -0.26383519172668457, 0.408637672662735, 0.3964384198188782, -0.6997225880622864, -0.09031045436859131, -0.9829094409942627, 0.4244286119937897, -0.11676093935966492, -0.36004695296287537, 0.14298352599143982, 0.6786777973175049, 1.1879857778549194, -0.06253430992364883, 0.09272244572639465, 1.2349143028259277, -1.3868931531906128, 1.537838101387024, -0.5698371529579163, 0.22345270216464996, -2.5311357975006104, 1.475826382637024, -0.7453634738922119, 1.9218441247940063, -2.6510753631591797, 0.34253817796707153, -0.5957415699958801, -0.3411768078804016, 0.2685239017009735, -0.4143049120903015, 0.23793350160121918, -0.10024496167898178, -1.102831482887268, 0.05764451622962952, -0.871203601360321, 0.5726553201675415, 1.2854030132293701, 1.4376485347747803, -1.2142679691314697, -0.24974903464317322, -1.7217053174972534, -0.20339763164520264, -0.7190787196159363, 0.4158606231212616, -1.94492506980896, 0.02093924954533577, -1.8176344633102417, -2.2575595378875732, -1.4816356897354126, -0.9452635645866394, 0.8602861762046814, 0.13686752319335938, -0.9397740364074707, 0.9211887121200562, -0.44393327832221985, -1.6856895685195923, 1.093221664428711, -2.284278392791748 ]
https://github.com/huggingface/datasets/issues/4504
Can you please add the Stanford dog dataset?
@dgrnd4 Yes, but this can be done after loading (`map` to resize images and `train_test_split` to create extra splits) @khushmeeet The linked version is implemented as a no-code dataset and is generated directly from the ZIP archive, but our "GitHub" datasets (these are datasets without a user/org namespace on the Hub) need a generation script, and you can find one [here](https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/image_classification/stanford_dogs.py). `datasets` started as a fork of TFDS, so we share similar script structure, which makes it trivial to adapt it.
## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
710
81
Can you please add the Stanford dog dataset? ## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). @dgrnd4 Yes, but this can be done after loading (`map` to resize images and `train_test_split` to create extra splits) @khushmeeet The linked version is implemented as a no-code dataset and is generated directly from the ZIP archive, but our "GitHub" datasets (these are datasets without a user/org namespace on the Hub) need a generation script, and you can find one [here](https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/image_classification/stanford_dogs.py). `datasets` started as a fork of TFDS, so we share similar script structure, which makes it trivial to adapt it.
[ -1.1963353157043457, -1.0222859382629395, -0.657524824142456, 1.3688817024230957, -0.21313869953155518, -1.3679145574569702, 0.08775295317173004, -1.0285773277282715, 1.6661571264266968, -0.6353380680084229, 0.2597121000289917, -1.716856837272644, -0.06882958114147186, -0.53580641746521, -0.8263927102088928, -0.8062641620635986, -0.4483222961425781, -0.8953888416290283, 0.9257974028587341, 2.493368625640869, 1.1916548013687134, -1.400254726409912, 2.740152359008789, 0.6584734320640564, -0.18673409521579742, -0.9628214836120605, 0.5084035396575928, 0.11272069066762924, -1.2665566205978394, -0.4255363941192627, -0.8637481927871704, -0.0573883131146431, -0.4793078899383545, -0.5130568742752075, 0.09821774065494537, 0.3975714445114136, -0.10994208604097366, -0.36680305004119873, -0.6116248965263367, -0.6298955082893372, 0.4355798363685608, -0.3574802875518799, 0.9416676163673401, -0.40639030933380127, 1.8037320375442505, -0.6512051820755005, 0.38519036769866943, 0.6080918312072754, 1.3049571514129639, 0.21753525733947754, 0.012798657640814781, 0.3298991322517395, 0.4024295210838318, -0.028698019683361053, 0.46376538276672363, 1.2638323307037354, 0.7084878087043762, 0.5727205276489258, 0.7092738747596741, -2.1764938831329346, 1.3540513515472412, -0.9245915412902832, 0.4381881356239319, 1.4121344089508057, -0.9342344999313354, 0.4091915488243103, -1.776220440864563, -0.11166983842849731, 0.5142178535461426, -2.3349485397338867, 0.1457168459892273, -1.2567322254180908, -0.6506380438804626, 0.9326291680335999, 0.24976013600826263, -1.2200713157653809, 0.27893131971359253, -0.5776025056838989, 1.0256403684616089, 0.4282628893852234, 1.2244441509246826, -1.695829153060913, -0.11985621601343155, -0.16758407652378082, 0.01474057137966156, -1.2684369087219238, -1.7037938833236694, 0.6678343415260315, 0.5704691410064697, 0.722694993019104, -0.16781125962734222, 0.8975208401679993, -1.0079231262207031, 0.9108614921569824, -0.9865309000015259, -1.6406917572021484, -1.4413340091705322, -2.273136854171753, -2.294154167175293, 0.9131377339363098, -0.4333055019378662, -0.48523664474487305, 1.9292880296707153, -0.9203367829322815, -1.7534966468811035, 1.0619317293167114, 0.3025500178337097, 0.015443703159689903, 2.3366990089416504, 0.2760794162750244, -0.6767641305923462, 0.4013128876686096, -0.7258688807487488, 0.8617377281188965, -0.3417093753814697, 1.4211225509643555, 0.5210946202278137, -0.9650384783744812, 1.5590369701385498, -0.49083954095840454, 0.5183215737342834, -0.6321537494659424, -0.5765440464019775, -0.8217499256134033, 0.37716901302337646, 1.8972877264022827, -0.3538280129432678, 1.610592246055603, -0.3654577136039734, -1.6462371349334717, -1.5321887731552124, 0.7558825016021729, 0.5602100491523743, -0.8124518990516663, 0.002949339337646961, -0.39344674348831177, 0.09696874767541885, -0.016578232869505882, 1.1576789617538452, 1.1329047679901123, 0.7076817154884338, -0.44401323795318604, -0.8787283301353455, 0.2266629934310913, -0.07384539395570755, -0.7782536149024963, -1.7896584272384644, -0.32642459869384766, 0.3040095567703247, 0.550554096698761, -1.312400221824646, 1.6247575283050537, 0.9034316539764404, 2.0185649394989014, 0.9224699139595032, -0.3771313428878784, 1.3773753643035889, 0.0064920540899038315, 1.8308006525039673, -0.617168664932251, 0.6488597393035889, -0.2829378843307495, -1.0886000394821167, 0.8392314314842224, -0.43759340047836304, -2.111414670944214, -0.749194860458374, -0.9464327692985535, -0.20076590776443481, -0.747089684009552, 0.8565114140510559, -0.2969680428504944, -1.3831983804702759, 0.08524930477142334, -0.7262752056121826, 0.17225337028503418, -1.2361887693405151, 0.13696728646755219, 0.861712634563446, -0.6968902945518494, -0.14212767779827118, -0.19653140008449554, -1.301874041557312, -0.563840925693512, 0.27342015504837036, 1.9494611024856567, -0.6556938290596008, 1.015309453010559, 0.9503501653671265, -0.7535440921783447, 0.11381129920482635, 0.2893819212913513, -0.31200355291366577, 0.900205671787262, -1.1796249151229858, -0.3701716661453247, 1.0853525400161743, -0.14340843260288239, -0.5015395283699036, 1.5648510456085205, 0.8249865174293518, -1.0005614757537842, -0.2304299771785736, -0.18145576119422913, -0.7983401417732239, -0.07138484716415405, -1.510242223739624, -0.22179126739501953, 0.18019957840442657, -1.4383705854415894, -0.5408465266227722, -0.3017418384552002, 1.300622820854187, -0.23045139014720917, 1.287821650505066, -0.2702770233154297, -0.38563239574432373, -0.4677836298942566, -0.43917012214660645, 0.15672466158866882, -0.29971855878829956, -0.5951616764068604, 0.25732946395874023, -0.8160170912742615, 0.3114938735961914, 1.5151607990264893, 0.4485984444618225, 0.04911419004201889, 0.5663581490516663, 1.0941073894500732, 0.317358136177063, -0.08020485937595367, -0.8577116131782532, -1.5182076692581177, 1.9635542631149292, -1.4087541103363037, 1.8391592502593994, 0.8227336406707764, -0.061911650002002716, -1.7855134010314941, -1.8558449745178223, 1.2793244123458862, 1.2375500202178955, 2.4249775409698486, 0.5212346315383911, 0.38991814851760864, -0.7935868501663208, -0.7144122123718262, 0.26888126134872437, -1.0509414672851562, -0.7164156436920166, 0.09433990716934204, 2.3309853076934814, 1.8674678802490234, -0.6340579986572266, -0.1964709460735321, -1.047828197479248, 1.3809870481491089, -0.1595449298620224, 0.20877668261528015, 2.061556816101074, -0.3334517478942871, -1.0617011785507202, 1.3438433408737183, -2.2820210456848145, 0.23615626990795135, 1.987847089767456, 0.40681737661361694, 0.03830065205693245, -1.455777883529663, -0.6083520650863647, -0.3464144468307495, -0.42072463035583496, -1.2003964185714722, 0.5218012928962708, -0.2543987035751343, -0.8194009065628052, -1.5193541049957275, 0.02007165737450123, -1.125655174255371, -1.7188782691955566, 0.4023556709289551, 1.8473693132400513, 1.9791922569274902, -0.6844826936721802, 1.4131149053573608, -0.3045084476470947, 0.0626135766506195, 1.2227553129196167, 1.2939373254776, 3.144503355026245, 1.9236290454864502, -1.1754478216171265, 0.7332095503807068, -0.18503671884536743, -0.4112095832824707, 1.0765694379806519, -1.0493934154510498, 1.1947975158691406, -0.23618024587631226, -1.24566650390625, -1.1531223058700562, 1.0760201215744019, 0.5351516604423523, 0.05947856605052948, -0.5884727835655212, 1.156022310256958, 0.07480982691049576, 1.4035348892211914, 0.599673867225647, -0.41564303636550903, 0.604258120059967, -0.36337924003601074, -0.5422592163085938, 1.6747018098831177, 0.18205992877483368, -1.5173190832138062, -2.381801128387451, -0.2541787624359131, -0.9071810245513916, -0.03428974747657776, -0.6314904689788818, -1.0555647611618042, 1.638479232788086, 0.5117420554161072, -1.2502464056015015, -0.29828864336013794, -0.3047632575035095, -0.6410499215126038, 2.623387098312378, -1.361141324043274, -0.14154979586601257, -0.9606183171272278, -0.4997774362564087, 1.6338937282562256, -1.1853818893432617, -0.23449794948101044, -1.0552740097045898, -0.7087031006813049, -1.2496962547302246, -0.5249150395393372, -0.0057429056614637375, -0.9067650437355042, 0.8477087616920471, -0.002202445175498724, -1.0050004720687866, -0.2851923704147339, -0.9036762714385986, 0.9113227725028992, -0.14845366775989532, 0.1782858669757843, 1.927999496459961, 0.4300163984298706, -0.39463406801223755, 0.6451053023338318, 1.2890894412994385, 0.6646119952201843, -0.7500556111335754, 0.11232294142246246, -0.70234215259552, 0.28958404064178467, -1.3570518493652344, 0.21172286570072174, -2.949300527572632, 0.6636483669281006, -0.08417104184627533, -0.1297646462917328, 0.020734988152980804, -1.2973939180374146, 1.138785719871521, 2.5043387413024902, -1.2454280853271484, 0.4214273691177368, 0.35355615615844727, 1.0875436067581177, -1.6144737005233765, 0.32212114334106445, -0.44985073804855347, 2.073406934738159, 0.16804492473602295, 1.199942708015442, -0.6578903794288635, -2.1398825645446777, 0.62612384557724, -1.1592968702316284, -1.0739063024520874, 0.6701639890670776, -0.8747532963752747, 0.2673734426498413, -1.542126178741455, -0.12113241851329803, -0.9032776951789856, -1.286904215812683, 0.6876994371414185, 0.035511650145053864, 0.38514387607574463, -0.59599369764328, 0.3377012014389038, -2.182607650756836, -1.4058350324630737, -0.2755369544029236, -0.9632889032363892, 0.6151702404022217, -0.3891376256942749, 0.6753362417221069, 0.012567831203341484, 0.08014263212680817, 0.29471659660339355, 1.402182936668396, 3.3704636096954346, 0.18711037933826447, 0.27776187658309937, -0.05032212287187576, -1.0198694467544556, 1.3488564491271973, 0.9691306948661804, 0.013397883623838425, -0.5565323233604431, -1.008235216140747, 1.3573909997940063, 2.013495922088623, 1.1373636722564697, 0.06671793013811111, -0.805420994758606, -0.7102965712547302, 0.10507602244615555, 0.28639233112335205, 0.46909087896347046, 0.9679145812988281, -0.01563689485192299, 0.17489659786224365, 1.3965964317321777, 1.284187912940979, -0.3909902572631836, 0.4454911947250366, -0.9182155132293701, -0.5029045939445496, 0.3873988389968872, 0.28383225202560425, 0.0281134694814682, 0.44197916984558105, -1.1220484972000122, -0.29762977361679077, -0.28875046968460083, -0.9723231792449951, -0.672966480255127, -0.48931884765625, -0.4290146231651306, 1.601058006286621, 0.040988244116306305, -0.5029746294021606, -0.02108187787234783, -0.7100327610969543, -0.09094303846359253, -1.053926944732666, 0.3790559768676758, -0.09792355448007584, -0.036619335412979126, -0.1673944592475891, 1.7507870197296143, -0.8680623769760132, -2.076507329940796, 0.2771788239479065, 0.3657798767089844, -0.5529423356056213, 0.0724279060959816, 1.630423903465271, 0.5984793901443481, 1.4632916450500488, 1.3230366706848145, 1.003927230834961, -0.5644397735595703, -1.3188066482543945, 0.6595682501792908, 0.9145210981369019, -1.315895915031433, 0.7869148850440979, -0.1322437822818756, -0.48493683338165283, 0.7872108221054077, 1.4425396919250488, 0.3338034749031067, -1.9857933521270752, 0.879741370677948, -0.8002558946609497, 0.8482465147972107, 0.7325223088264465, 0.8039656281471252, 0.21075810492038727, 0.8157488107681274, -1.4062471389770508, -1.0873435735702515, -0.8391679525375366, -0.5674435496330261, 1.9945584535598755, -0.15278828144073486, 0.513697624206543, -0.24901488423347473, -1.206995964050293, -0.07531391084194183, 0.7751266956329346, 0.4812011122703552, -0.4253620505332947, 0.8350961208343506, -0.5477094054222107, -1.0550836324691772, -1.3379632234573364, -0.38978928327560425, -0.8631488084793091, -0.8837388753890991, 0.9370550513267517, 0.9097684025764465, 0.4728127717971802, 1.9220517873764038, 0.5987308621406555, 0.2865201234817505, -2.623666524887085, 0.8756505250930786, 0.269366979598999, -0.018367208540439606, 0.9346411228179932, 0.2221849262714386, 1.0608177185058594, -0.01799781247973442, 0.5185390710830688, -2.327077865600586, 2.2132716178894043, -0.14055199921131134, 0.7383654117584229, 0.04745013639330864, -0.14894399046897888, 1.2564424276351929, 0.5663411617279053, 0.5091737508773804, -1.1810486316680908, 0.710141658782959, -0.4993244409561157, 1.1202043294906616, 0.8557551503181458, -0.7670354843139648, -0.00023815035820007324, 1.4132575988769531, 0.5556079149246216, -0.40117281675338745, -1.002947449684143, -0.8937364816665649, 1.0183216333389282, 1.7634025812149048, -0.045161664485931396, 0.015414658933877945, 0.8971263766288757, 0.718700110912323, -1.264289140701294, 0.11113182455301285, -0.7384567260742188, -0.6226134896278381, 1.6725231409072876, 2.0291616916656494, -0.03203631192445755, -0.18817362189292908, -0.6147869825363159, -1.2428655624389648, 0.7494838237762451, 0.03186317905783653, 0.17021186649799347, 0.7797666788101196, -0.6514427661895752, 1.172606110572815, 0.8052035570144653, 0.9305899739265442, 0.010473048314452171, 0.3618384003639221, 0.3217412233352661, -0.30601781606674194, -1.1535459756851196, -0.2947691082954407, -1.1468968391418457, -2.4679551124572754, 0.41130948066711426, -0.24574317038059235, -1.4289023876190186, 0.02336062490940094, -1.0593727827072144, 0.8958591818809509, -0.6049495339393616, -1.101422905921936, -1.622786045074463, 0.30914193391799927, -0.09192181378602982, 0.9910271167755127, -1.5970487594604492, -0.19027923047542572, 1.1931943893432617, 0.7334737777709961, -0.5302625894546509, 0.9318110346794128, 0.216617614030838, 0.9433204531669617, 0.7955235242843628, -0.3944823145866394, 0.3980295658111572, 0.13787131011486053, -1.3647065162658691, 0.4723386764526367, 1.1676411628723145, 0.18693120777606964, 1.389557957649231, -0.524361252784729, 0.18294262886047363, 0.5015231370925903, -0.5132434964179993, -0.4686075448989868, -0.46627891063690186, 0.6432527899742126, 0.05824077129364014, -1.050499439239502, -0.02321477048099041, -0.10757896304130554, -0.18666765093803406, 0.2792157530784607, -1.408739686012268, -0.3005533218383789, -0.41187965869903564, -0.49669063091278076, -1.1925634145736694, -0.0293900016695261, 1.3792378902435303, -0.845331609249115, -0.23195450007915497, 0.5706587433815002, 0.39957374334335327, 0.6301101446151733, 0.6630691885948181, -0.6809762120246887, -0.2866731882095337, -0.27027571201324463, -0.2655591368675232, 0.18069979548454285, 1.2449994087219238, -0.173147514462471, -0.9754533767700195, 0.6936334371566772, -0.46474403142929077, 0.11949843168258667, 1.9889650344848633, 0.06726566702127457, -0.7773675322532654, 0.38063621520996094, -0.7334674000740051, 1.7775956392288208, 1.6572803258895874, 1.3422107696533203, 0.0024581030011177063, -0.9354404807090759, 0.42661088705062866, -0.1687821000814438, -0.39332807064056396, 0.9235597252845764, 0.47644078731536865, -0.21558885276317596, -1.40233314037323, 0.5286335945129395, 1.3734298944473267, -0.9599053263664246, -0.7556487321853638, 0.17873895168304443, -0.8488634824752808, 1.1412204504013062, 0.5817426443099976, 0.4496977925300598, 0.24943168461322784, 1.6191784143447876, 0.6872286796569824, -0.38123375177383423, 0.40093666315078735, 0.5661535859107971, -0.20339974761009216, -2.0975165367126465, -1.1378065347671509, 0.24397487938404083, -0.49868714809417725, -1.538061261177063, 1.2941691875457764, -1.154106616973877, -0.8899574875831604, 0.5164702534675598, 0.16760575771331787, 1.4694550037384033, 0.3686652183532715, 1.709003210067749, 2.1018972396850586, 0.8606342077255249, 0.20846636593341827, 1.3809555768966675, 0.019853079691529274, -0.4589107632637024, 1.8732140064239502, -0.45180749893188477, 0.5541179776191711, 0.9654092788696289, -0.43214815855026245, -1.2112197875976562, -0.7319833636283875, -1.1619027853012085, -0.6767046451568604, 1.1762745380401611, 0.1447257101535797, -1.1534343957901, 0.1644044816493988, 1.5483001470565796, 0.17543843388557434, -0.2580174207687378, 0.5220229029655457, 0.38783514499664307, -0.738366961479187, -0.09484252333641052, -0.9725737571716309, 0.4399402141571045, -0.11634117364883423, -0.32084542512893677, 0.14683625102043152, 0.6185141801834106, 1.215242862701416, -0.02127055451273918, 0.068099245429039, 1.1595076322555542, -1.3967729806900024, 1.5562543869018555, -0.6090676784515381, 0.2622625231742859, -2.512990951538086, 1.4612362384796143, -0.7204976677894592, 1.9118515253067017, -2.6433920860290527, 0.3821556568145752, -0.5950456261634827, -0.418488085269928, 0.30004918575286865, -0.378229558467865, 0.22145146131515503, -0.1293189972639084, -1.0947219133377075, -0.016335975378751755, -0.8148469924926758, 0.5786490440368652, 1.2609528303146362, 1.4126431941986084, -1.1544607877731323, -0.3197398781776428, -1.7247397899627686, -0.17090347409248352, -0.7128838896751404, 0.4043036699295044, -1.9380056858062744, -0.0642705038189888, -1.8006253242492676, -2.2998061180114746, -1.3932675123214722, -0.9392727017402649, 0.9283352494239807, 0.14987584948539734, -0.9601461291313171, 1.049312710762024, -0.43936091661453247, -1.744631290435791, 1.113458514213562, -2.2969253063201904 ]
https://github.com/huggingface/datasets/issues/4504
Can you please add the Stanford dog dataset?
@mariosasko The point is that if I use something like this: x_train, x_test = train_test_split(dataset, test_size=0.1) to get Train 90% and Test 10%, and then to get the Validation Set (10% of the whole 100%): ``` train_ratio = 0.80 validation_ratio = 0.10 test_ratio = 0.10 x_train, x_test, y_train, y_test = train_test_split(dataX, dataY, test_size=1 - train_ratio) x_val, x_test, y_val, y_test = train_test_split(x_test, y_test, test_size=test_ratio/(test_ratio + validation_ratio)) ``` The point is that the structure of the data is: ``` DatasetDict({ train: Dataset({ features: ['image', 'label'], num_rows: 20580 }) }) ``` So how to extract images and labels? EDIT --> Split of the dataset in Train-Test-Validation: ``` import datasets from datasets.dataset_dict import DatasetDict from datasets import Dataset percentage_divison_test = int(len(dataset['train'])/100 *10) # 10% --> 2058 percentage_divison_validation = int(len(dataset['train'])/100 *20) # 20% --> 4116 dataset_ = datasets.DatasetDict({"train": Dataset.from_dict({ 'image': dataset['train'][0 : len(dataset['train']) ]['image'], 'labels': dataset['train'][0 : len(dataset['train']) ]['label'] }), "test": Dataset.from_dict({ #20580-4116 (validation) ,20580-2058 (test) 'image': dataset['train'][len(dataset['train']) - percentage_divison_validation : len(dataset['train']) - percentage_divison_test]['image'], 'labels': dataset['train'][len(dataset['train']) - percentage_divison_validation : len(dataset['train']) - percentage_divison_test]['label'] }), "validation": Dataset.from_dict({ # 20580-2058 (test) 'image': dataset['train'][len(dataset['train']) - percentage_divison_test : len(dataset['train'])]['image'], 'labels': dataset['train'][len(dataset['train']) - percentage_divison_test : len(dataset['train'])]['label'] }), }) ```
## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
710
188
Can you please add the Stanford dog dataset? ## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). @mariosasko The point is that if I use something like this: x_train, x_test = train_test_split(dataset, test_size=0.1) to get Train 90% and Test 10%, and then to get the Validation Set (10% of the whole 100%): ``` train_ratio = 0.80 validation_ratio = 0.10 test_ratio = 0.10 x_train, x_test, y_train, y_test = train_test_split(dataX, dataY, test_size=1 - train_ratio) x_val, x_test, y_val, y_test = train_test_split(x_test, y_test, test_size=test_ratio/(test_ratio + validation_ratio)) ``` The point is that the structure of the data is: ``` DatasetDict({ train: Dataset({ features: ['image', 'label'], num_rows: 20580 }) }) ``` So how to extract images and labels? EDIT --> Split of the dataset in Train-Test-Validation: ``` import datasets from datasets.dataset_dict import DatasetDict from datasets import Dataset percentage_divison_test = int(len(dataset['train'])/100 *10) # 10% --> 2058 percentage_divison_validation = int(len(dataset['train'])/100 *20) # 20% --> 4116 dataset_ = datasets.DatasetDict({"train": Dataset.from_dict({ 'image': dataset['train'][0 : len(dataset['train']) ]['image'], 'labels': dataset['train'][0 : len(dataset['train']) ]['label'] }), "test": Dataset.from_dict({ #20580-4116 (validation) ,20580-2058 (test) 'image': dataset['train'][len(dataset['train']) - percentage_divison_validation : len(dataset['train']) - percentage_divison_test]['image'], 'labels': dataset['train'][len(dataset['train']) - percentage_divison_validation : len(dataset['train']) - percentage_divison_test]['label'] }), "validation": Dataset.from_dict({ # 20580-2058 (test) 'image': dataset['train'][len(dataset['train']) - percentage_divison_test : len(dataset['train'])]['image'], 'labels': dataset['train'][len(dataset['train']) - percentage_divison_test : len(dataset['train'])]['label'] }), }) ```
[ -1.2331582307815552, -0.9793913960456848, -0.6155678629875183, 1.4400904178619385, -0.23420031368732452, -1.2979180812835693, 0.12485389411449432, -0.9963434338569641, 1.6574463844299316, -0.7141925096511841, 0.2891702353954315, -1.6672042608261108, -0.036995209753513336, -0.6349377036094666, -0.7806603908538818, -0.801133394241333, -0.4836214780807495, -0.8300374150276184, 1.0485255718231201, 2.4100871086120605, 1.2250005006790161, -1.377210021018982, 2.765458345413208, 0.7032381296157837, -0.2186582237482071, -1.0098425149917603, 0.48714742064476013, 0.0026930440217256546, -1.2553988695144653, -0.4027756452560425, -0.857379138469696, -0.11598995327949524, -0.5595691800117493, -0.4189888536930084, 0.011351412162184715, 0.4517561197280884, -0.18538716435432434, -0.3527188003063202, -0.5229387283325195, -0.7038103938102722, 0.5088699460029602, -0.40802279114723206, 0.8728009462356567, -0.39402827620506287, 1.7704225778579712, -0.6185570955276489, 0.4247192144393921, 0.6749908328056335, 1.294488787651062, 0.16299274563789368, -0.06234433501958847, 0.34019216895103455, 0.36314234137535095, 0.059368643909692764, 0.5252042412757874, 1.2392762899398804, 0.6548292636871338, 0.5748971104621887, 0.7423246502876282, -2.2833166122436523, 1.3176484107971191, -1.0091257095336914, 0.40931424498558044, 1.4179967641830444, -0.9690096378326416, 0.3794025480747223, -1.7703183889389038, -0.026652121916413307, 0.5946651101112366, -2.279733896255493, 0.2087247520685196, -1.3218306303024292, -0.6183986663818359, 0.9244534373283386, 0.3194190561771393, -1.1516960859298706, 0.21576139330863953, -0.5595157146453857, 1.1027815341949463, 0.4330631196498871, 1.0584535598754883, -1.7028568983078003, -0.13104695081710815, -0.2125963717699051, 0.07639133930206299, -1.3489335775375366, -1.6361225843429565, 0.7054581046104431, 0.6375253200531006, 0.6662722229957581, -0.19081835448741913, 1.0441747903823853, -1.0694530010223389, 0.8351373076438904, -1.138183355331421, -1.6710909605026245, -1.5134278535842896, -2.259209394454956, -2.2415926456451416, 0.7577019929885864, -0.439948171377182, -0.5235787034034729, 1.9670841693878174, -0.9501802921295166, -1.6898270845413208, 1.1106719970703125, 0.2750815451145172, 0.049809880554676056, 2.3376381397247314, 0.1740935891866684, -0.6906817555427551, 0.38695359230041504, -0.8106936812400818, 0.7985296845436096, -0.2685448229312897, 1.3738341331481934, 0.4351775348186493, -1.0297129154205322, 1.611789584159851, -0.40535637736320496, 0.5823285579681396, -0.5581084489822388, -0.6019620299339294, -0.741076648235321, 0.26250818371772766, 1.8836020231246948, -0.2849061191082001, 1.5143033266067505, -0.35759755969047546, -1.5477808713912964, -1.529378056526184, 0.8603622913360596, 0.4763828217983246, -0.8271701335906982, 0.03562072664499283, -0.41804420948028564, 0.1606007069349289, -0.14030800759792328, 1.1642229557037354, 1.1996952295303345, 0.7465662360191345, -0.38751959800720215, -0.7865716814994812, 0.17683902382850647, -0.07029609382152557, -0.7498385310173035, -1.8160845041275024, -0.34019842743873596, 0.15921851992607117, 0.5687351822853088, -1.1366510391235352, 1.7271041870117188, 0.9410427808761597, 1.9487956762313843, 0.9531081318855286, -0.38507726788520813, 1.318931221961975, 0.05312308296561241, 1.8220837116241455, -0.6675359010696411, 0.6431015729904175, -0.3585144579410553, -1.0483812093734741, 0.9190540313720703, -0.37655743956565857, -2.0799310207366943, -0.7068656086921692, -0.8129559755325317, -0.2600472569465637, -0.7699171304702759, 0.8513408899307251, -0.2617802023887634, -1.4072003364562988, 0.1126779168844223, -0.6473397016525269, 0.26390549540519714, -1.2185341119766235, 0.22164808213710785, 0.8213181495666504, -0.629683792591095, -0.03151053935289383, -0.2573278248310089, -1.252360463142395, -0.5818952322006226, 0.32184097170829773, 1.894369125366211, -0.6291521191596985, 0.9152311682701111, 0.9882895350456238, -0.7345640659332275, 0.04287383332848549, 0.25772377848625183, -0.18732917308807373, 0.78770911693573, -1.0775017738342285, -0.4076440632343292, 1.0876054763793945, -0.26775258779525757, -0.601222813129425, 1.5567502975463867, 0.8191526532173157, -1.0164129734039307, -0.2452685683965683, -0.24994495511054993, -0.8432000875473022, 0.05603492632508278, -1.505128026008606, -0.10730290412902832, 0.398502916097641, -1.5052293539047241, -0.4269614517688751, -0.24420887231826782, 1.3457437753677368, -0.24583353102207184, 1.3231137990951538, -0.28127068281173706, -0.3637075424194336, -0.34563058614730835, -0.4336073696613312, 0.17020198702812195, -0.19680742919445038, -0.559543251991272, 0.1312568187713623, -0.8207054138183594, 0.35764357447624207, 1.510813593864441, 0.349127858877182, 0.06650331616401672, 0.47939470410346985, 1.1042962074279785, 0.32389160990715027, -0.09794439375400543, -0.9246571063995361, -1.4762331247329712, 1.995335578918457, -1.4527491331100464, 1.8996822834014893, 0.7585980296134949, -0.02124936506152153, -1.784853219985962, -1.7785083055496216, 1.2536920309066772, 1.1910343170166016, 2.334651470184326, 0.546074628829956, 0.4260714650154114, -0.8447157740592957, -0.7132874727249146, 0.24806179106235504, -0.9861214756965637, -0.6969150900840759, 0.11938869953155518, 2.4134624004364014, 1.8104212284088135, -0.5368881821632385, -0.1680573970079422, -0.9880366921424866, 1.4762616157531738, -0.16783399879932404, 0.31868112087249756, 2.0183379650115967, -0.3419586420059204, -1.0580885410308838, 1.3410626649856567, -2.3633787631988525, 0.1950882375240326, 2.0476765632629395, 0.35904091596603394, 0.07495436072349548, -1.3904094696044922, -0.591576874256134, -0.3337017297744751, -0.4196375608444214, -1.3226561546325684, 0.46780213713645935, -0.3178271949291229, -0.7562877535820007, -1.4747021198272705, 0.09701737761497498, -1.1396467685699463, -1.6451361179351807, 0.306050568819046, 1.854530930519104, 2.0112252235412598, -0.6334002017974854, 1.4719593524932861, -0.3627863824367523, 0.10725493729114532, 1.213760256767273, 1.3434377908706665, 3.1346421241760254, 1.91874098777771, -1.1703416109085083, 0.7179678678512573, -0.2575816512107849, -0.4551349878311157, 1.0362058877944946, -1.1601446866989136, 1.1666241884231567, -0.17503409087657928, -1.2909753322601318, -1.2074670791625977, 1.0887218713760376, 0.5206609964370728, 0.12122906744480133, -0.5558377504348755, 1.1421095132827759, 0.06728561222553253, 1.3866267204284668, 0.594891369342804, -0.3894045054912567, 0.5946886539459229, -0.41361525654792786, -0.5725841522216797, 1.6457399129867554, 0.2327335625886917, -1.4781451225280762, -2.3186354637145996, -0.2978050112724304, -0.9085984230041504, 0.031143013387918472, -0.587512195110321, -1.017183542251587, 1.6750973463058472, 0.4081101715564728, -1.3081856966018677, -0.22433258593082428, -0.2692619860172272, -0.6440230011940002, 2.6894795894622803, -1.2739474773406982, -0.2001139521598816, -0.9712361693382263, -0.611382246017456, 1.7114607095718384, -1.2046480178833008, -0.24260540306568146, -1.0229313373565674, -0.585899293422699, -1.213157057762146, -0.4874154329299927, -0.016474414616823196, -0.8742509484291077, 0.9519595503807068, 0.011389784514904022, -1.1720325946807861, -0.344362735748291, -0.9176664352416992, 0.9317589998245239, -0.23089222609996796, 0.14996019005775452, 1.8711472749710083, 0.339092493057251, -0.40458768606185913, 0.7006363272666931, 1.1763256788253784, 0.7238717079162598, -0.6962640881538391, 0.10710814595222473, -0.623044490814209, 0.37537458539009094, -1.236612319946289, 0.3122899830341339, -2.9519593715667725, 0.7036512494087219, -0.03816377744078636, -0.09628976881504059, -0.04144591838121414, -1.4280606508255005, 1.0610687732696533, 2.564512014389038, -1.2253093719482422, 0.4311523139476776, 0.40242546796798706, 1.1678705215454102, -1.6632153987884521, 0.3120275139808655, -0.5350430011749268, 2.088731288909912, 0.18869473040103912, 1.2194443941116333, -0.5597691535949707, -2.302703857421875, 0.5660961866378784, -1.2102553844451904, -1.1395312547683716, 0.7440564632415771, -0.8850074410438538, 0.2375493049621582, -1.5063337087631226, -0.1832635998725891, -1.0129637718200684, -1.206839919090271, 0.6484240889549255, 0.14798392355442047, 0.4340076446533203, -0.6696651577949524, 0.26222479343414307, -2.247253179550171, -1.3563077449798584, -0.2371552288532257, -0.8541704416275024, 0.5881029367446899, -0.43276265263557434, 0.663350522518158, 0.01989336684346199, 0.03666850924491882, 0.31969428062438965, 1.5618646144866943, 3.389404773712158, 0.15144920349121094, 0.23251187801361084, -0.16561537981033325, -0.9239041209220886, 1.426253080368042, 0.8644319772720337, 0.05683397874236107, -0.4834538698196411, -1.0450177192687988, 1.290517807006836, 1.9867265224456787, 1.0266369581222534, -0.016556335613131523, -0.8394201993942261, -0.6849080324172974, 0.021298930048942566, 0.2375192940235138, 0.5450578927993774, 0.9702727198600769, 0.05250899866223335, 0.1667826920747757, 1.3889669179916382, 1.2275315523147583, -0.4731294512748718, 0.3762758672237396, -0.8845524787902832, -0.47758015990257263, 0.35992431640625, 0.3272486627101898, -0.0317402109503746, 0.4025563597679138, -1.0995240211486816, -0.2702295184135437, -0.3235900104045868, -0.9203899502754211, -0.7219620943069458, -0.4063834547996521, -0.4825277626514435, 1.5973328351974487, 0.09888271987438202, -0.532008945941925, -0.0013840124011039734, -0.7040311694145203, -0.18293848633766174, -1.1660600900650024, 0.35970592498779297, -0.16432395577430725, -0.069525808095932, -0.2410593181848526, 1.697539210319519, -0.8518698811531067, -2.0460214614868164, 0.2710780203342438, 0.311430960893631, -0.41136664152145386, 0.12880824506282806, 1.6489715576171875, 0.5133509039878845, 1.5012400150299072, 1.363265037536621, 0.9852029085159302, -0.5695913434028625, -1.2926130294799805, 0.7177269458770752, 0.9165158271789551, -1.3541126251220703, 0.799040675163269, -0.10616791248321533, -0.5104482769966125, 0.7545987963676453, 1.3480830192565918, 0.39063560962677, -2.0738770961761475, 0.8447743058204651, -0.9678680896759033, 0.7981173396110535, 0.8080479502677917, 0.6740763187408447, 0.2436160296201706, 0.928922176361084, -1.2414700984954834, -1.135014533996582, -0.7810506820678711, -0.6527353525161743, 1.9561771154403687, -0.2694200873374939, 0.6407057046890259, -0.24714496731758118, -1.2477797269821167, -0.08409857749938965, 0.8238952159881592, 0.4706912338733673, -0.4788217842578888, 0.7755551338195801, -0.6018604636192322, -1.087391972541809, -1.2664506435394287, -0.4432255029678345, -0.9657430648803711, -0.9829230308532715, 0.9291598796844482, 0.830077588558197, 0.48524102568626404, 1.8676438331604004, 0.6408165097236633, 0.2888927459716797, -2.539095401763916, 0.8450368642807007, 0.2116292417049408, -0.062066223472356796, 0.9031153321266174, 0.310636967420578, 1.0224597454071045, 0.0647927075624466, 0.5309597253799438, -2.362912893295288, 2.3123879432678223, -0.13880014419555664, 0.6719960570335388, -0.029628993943333626, -0.16106687486171722, 1.1760749816894531, 0.574985146522522, 0.41796770691871643, -1.0436971187591553, 0.7278912663459778, -0.5084541440010071, 1.1441726684570312, 0.7781882882118225, -0.7211447358131409, 0.03500368073582649, 1.3712214231491089, 0.46998509764671326, -0.5340036153793335, -1.0173369646072388, -0.9104452729225159, 0.9894596338272095, 1.6797237396240234, -0.06394767761230469, -0.08865849673748016, 0.8516411781311035, 0.7450373768806458, -1.1606923341751099, 0.06909395754337311, -0.631956934928894, -0.6090243458747864, 1.6353485584259033, 2.023688316345215, -0.13414065539836884, -0.0610901303589344, -0.6758163571357727, -1.2723679542541504, 0.7550011873245239, 0.016084523871541023, 0.03386634960770607, 0.7280425429344177, -0.5917665362358093, 1.03847074508667, 0.7831264138221741, 0.955559492111206, 0.06757991015911102, 0.39168164134025574, 0.38603878021240234, -0.41580691933631897, -1.2025142908096313, -0.31704115867614746, -1.1466096639633179, -2.455885410308838, 0.4292232394218445, -0.2575564980506897, -1.3928691148757935, 0.0675387978553772, -1.0492161512374878, 0.882969081401825, -0.6531202793121338, -1.0728893280029297, -1.6037225723266602, 0.32130640745162964, -0.0003937622532248497, 0.9752402901649475, -1.6090798377990723, -0.10363197326660156, 1.1329474449157715, 0.6819493174552917, -0.6289840936660767, 0.9539770483970642, 0.24454255402088165, 1.0259873867034912, 0.7942366600036621, -0.3859006464481354, 0.5253021121025085, 0.047157902270555496, -1.430605411529541, 0.4314361810684204, 1.1623356342315674, 0.18457558751106262, 1.4443738460540771, -0.5067943930625916, 0.09724672138690948, 0.5112555027008057, -0.5868883728981018, -0.4576914608478546, -0.4565565884113312, 0.6474639773368835, -0.026595937088131905, -0.9630919098854065, 0.009594680741429329, -0.10431797802448273, -0.2969111204147339, 0.2746557295322418, -1.3605388402938843, -0.19709119200706482, -0.4418889582157135, -0.481814980506897, -1.3130476474761963, -0.05106807127594948, 1.4426134824752808, -0.7218689322471619, -0.19542595744132996, 0.5561859607696533, 0.40261033177375793, 0.5553470849990845, 0.6773436069488525, -0.6819483637809753, -0.25990623235702515, -0.20399752259254456, -0.23636744916439056, 0.29154983162879944, 1.3168193101882935, -0.14523403346538544, -0.9661918878555298, 0.7411293387413025, -0.4478401839733124, 0.07409606873989105, 1.9903104305267334, 0.0703173577785492, -0.7510223984718323, 0.3640110492706299, -0.7773188948631287, 1.84660005569458, 1.7267730236053467, 1.3166848421096802, -0.07357057929039001, -0.885189950466156, 0.5647681355476379, -0.30515921115875244, -0.39534467458724976, 0.8535958528518677, 0.4054325520992279, -0.2533787786960602, -1.4300252199172974, 0.7362267971038818, 1.3872148990631104, -0.9182575941085815, -0.8010537028312683, 0.27786391973495483, -0.8122931718826294, 1.1544173955917358, 0.5648357272148132, 0.449716180562973, 0.2823273837566376, 1.6185108423233032, 0.7309721112251282, -0.3546409606933594, 0.4340398609638214, 0.6077232360839844, -0.22923561930656433, -2.2050650119781494, -1.2881056070327759, 0.3045925796031952, -0.5822024345397949, -1.627137541770935, 1.3180391788482666, -1.1706445217132568, -0.9594983458518982, 0.5593249797821045, 0.11004988849163055, 1.410014033317566, 0.39487534761428833, 1.654527187347412, 2.0347201824188232, 0.8461085557937622, 0.3923981487751007, 1.4082989692687988, -0.08564168214797974, -0.5068820118904114, 1.8406891822814941, -0.4589935839176178, 0.5207475423812866, 1.1093240976333618, -0.32925093173980713, -1.227134108543396, -0.7667161226272583, -1.1138445138931274, -0.6890428066253662, 1.2724732160568237, 0.13109901547431946, -1.1944923400878906, 0.2609246075153351, 1.4713243246078491, 0.11544539034366608, -0.23402224481105804, 0.5617465376853943, 0.35532069206237793, -0.7746337652206421, -0.02983422577381134, -0.9422005414962769, 0.5584143996238708, -0.2987230122089386, -0.30575716495513916, 0.26703816652297974, 0.6006137132644653, 1.2769501209259033, -0.07368375360965729, 0.11766798794269562, 1.056422233581543, -1.396904468536377, 1.4852392673492432, -0.6497104167938232, 0.30364638566970825, -2.4209096431732178, 1.3568480014801025, -0.6993378400802612, 1.9372437000274658, -2.6765949726104736, 0.3519192337989807, -0.5502879619598389, -0.4940486550331116, 0.3006763160228729, -0.2930452525615692, 0.11999277770519257, -0.06631037592887878, -1.1054075956344604, 0.05141172930598259, -0.7637625932693481, 0.5854064226150513, 1.1872178316116333, 1.4834479093551636, -1.1690020561218262, -0.3176296055316925, -1.736283302307129, -0.18342415988445282, -0.7380505800247192, 0.38263973593711853, -2.041163444519043, -0.07598504424095154, -1.8779056072235107, -2.307206153869629, -1.3097933530807495, -0.9499115943908691, 0.9726558327674866, 0.15119574964046478, -0.8140873312950134, 1.188195824623108, -0.371426522731781, -1.752627968788147, 1.0571900606155396, -2.1417131423950195 ]
https://github.com/huggingface/datasets/issues/4504
Can you please add the Stanford dog dataset?
@mariosasko in order to resize images I'm trying this method: ``` for i in range(0,len(dataset['train'])): #len(dataset['train']) ex = dataset['train'][i] #i image = ex['image'] image = image.convert("RGB") # <class 'PIL.Image.Image'> <PIL.Image.Image image mode=RGB size=500x333 at 0x7F84F1948150> image_resized = image.resize(size_to_resize) # <PIL.Image.Image image mode=RGB size=224x224 at 0x7F84F17885D0> dataset['train'][i]['image'] = image_resized ``` Because the DatasetDict is formed by arrows that are immutable, the changing assignment in the last line of code, doesn't work! Do you have any idea in order to get a valid result?
## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
710
82
Can you please add the Stanford dog dataset? ## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). @mariosasko in order to resize images I'm trying this method: ``` for i in range(0,len(dataset['train'])): #len(dataset['train']) ex = dataset['train'][i] #i image = ex['image'] image = image.convert("RGB") # <class 'PIL.Image.Image'> <PIL.Image.Image image mode=RGB size=500x333 at 0x7F84F1948150> image_resized = image.resize(size_to_resize) # <PIL.Image.Image image mode=RGB size=224x224 at 0x7F84F17885D0> dataset['train'][i]['image'] = image_resized ``` Because the DatasetDict is formed by arrows that are immutable, the changing assignment in the last line of code, doesn't work! Do you have any idea in order to get a valid result?
[ -1.2950514554977417, -1.024236798286438, -0.7201957702636719, 1.3978880643844604, -0.26804548501968384, -1.2396366596221924, 0.12324036657810211, -1.035119891166687, 1.7327709197998047, -0.6730470061302185, 0.2156851440668106, -1.6822835206985474, -0.04499085620045662, -0.5766178965568542, -0.7934162020683289, -0.809048593044281, -0.4219611883163452, -0.8627028465270996, 1.0304464101791382, 2.4635744094848633, 1.2082808017730713, -1.4126988649368286, 2.7674779891967773, 0.7238030433654785, -0.17009267210960388, -0.9837196469306946, 0.4818320870399475, 0.09575001895427704, -1.3063074350357056, -0.4477074146270752, -0.9095284342765808, -0.015306844376027584, -0.5300650000572205, -0.4799330234527588, 0.025294631719589233, 0.3338478207588196, -0.15115661919116974, -0.44802147150039673, -0.5824388861656189, -0.6103620529174805, 0.3803718686103821, -0.43868303298950195, 0.8860296607017517, -0.35693371295928955, 1.7795650959014893, -0.6609366536140442, 0.32429444789886475, 0.6733697652816772, 1.3299988508224487, 0.16082549095153809, -0.008504445664584637, 0.3840005397796631, 0.40660035610198975, -0.020737992599606514, 0.4585384130477905, 1.2514398097991943, 0.6850141286849976, 0.5130434036254883, 0.7261366248130798, -2.2454771995544434, 1.26460862159729, -0.9767885208129883, 0.38358497619628906, 1.408336877822876, -0.935705840587616, 0.43556737899780273, -1.8133004903793335, -0.005593608133494854, 0.6133257746696472, -2.3078131675720215, 0.2478438764810562, -1.3639038801193237, -0.6478291153907776, 0.9142986536026001, 0.2737126350402832, -1.1992721557617188, 0.2107076346874237, -0.6101853251457214, 1.0523489713668823, 0.4093313217163086, 1.2132980823516846, -1.7229399681091309, -0.14383499324321747, -0.24535885453224182, 0.11746732890605927, -1.2663781642913818, -1.6017917394638062, 0.66538006067276, 0.5931292772293091, 0.709677517414093, -0.17327837646007538, 0.9879749417304993, -0.9826293587684631, 0.8557922840118408, -0.978083074092865, -1.7124519348144531, -1.457650065422058, -2.253413200378418, -2.1878745555877686, 0.7955379486083984, -0.4271208643913269, -0.493303120136261, 1.9719009399414062, -0.9367344975471497, -1.8185046911239624, 1.1094558238983154, 0.285305380821228, 0.05254748836159706, 2.3241453170776367, 0.20541498064994812, -0.7084267735481262, 0.38957440853118896, -0.7760111093521118, 0.849276602268219, -0.330457866191864, 1.4625215530395508, 0.3866851329803467, -0.9475111365318298, 1.59171724319458, -0.4696969985961914, 0.5640643835067749, -0.6783692836761475, -0.4923285245895386, -0.8554781079292297, 0.3353694677352905, 1.9206700325012207, -0.30364692211151123, 1.5861223936080933, -0.4436182975769043, -1.6549298763275146, -1.5534414052963257, 0.8086369633674622, 0.561100423336029, -0.7844154238700867, 0.07227054983377457, -0.3774467706680298, 0.14406713843345642, -0.03815946727991104, 1.182931900024414, 1.215397834777832, 0.7517117857933044, -0.37489932775497437, -0.8869430422782898, 0.17426130175590515, -0.06418813765048981, -0.8039886355400085, -1.8442447185516357, -0.32093167304992676, 0.22834761440753937, 0.6312594413757324, -1.3453383445739746, 1.573775053024292, 0.8455522060394287, 1.9633320569992065, 1.0109597444534302, -0.4171353578567505, 1.420958161354065, 0.14847983419895172, 1.7367470264434814, -0.6091590523719788, 0.7021316289901733, -0.27856022119522095, -1.0776965618133545, 0.8077191114425659, -0.33818888664245605, -2.08656907081604, -0.773945152759552, -0.8275327682495117, -0.23083378374576569, -0.7577519416809082, 0.8640176057815552, -0.3915708065032959, -1.3644181489944458, 0.1998547911643982, -0.7200402021408081, 0.192409947514534, -1.1735154390335083, 0.16396835446357727, 0.8114861249923706, -0.5842248201370239, -0.018343636766076088, -0.2621297240257263, -1.2957396507263184, -0.5359585881233215, 0.2704976201057434, 1.8585128784179688, -0.6655340194702148, 0.9448086023330688, 1.0331213474273682, -0.6935946941375732, 0.050670988857746124, 0.2612946033477783, -0.2345084398984909, 0.867894172668457, -1.1151371002197266, -0.4518887400627136, 1.0385260581970215, -0.14879359304904938, -0.5047369003295898, 1.5427912473678589, 0.7957442998886108, -1.0008975267410278, -0.2394857257604599, -0.18112921714782715, -0.8009865283966064, -0.09333772957324982, -1.5435528755187988, -0.19906975328922272, 0.30833250284194946, -1.4828311204910278, -0.5353318452835083, -0.3304978013038635, 1.3206263780593872, -0.1815584897994995, 1.3231656551361084, -0.3112807273864746, -0.3125249147415161, -0.3664950132369995, -0.3794160485267639, 0.2562313675880432, -0.24888546764850616, -0.65848308801651, 0.16066846251487732, -0.803860068321228, 0.3363800644874573, 1.4681742191314697, 0.48700302839279175, 0.004782717674970627, 0.5212720632553101, 1.0494017601013184, 0.30456429719924927, -0.005840301513671875, -0.8891738653182983, -1.5215959548950195, 1.9242424964904785, -1.416666865348816, 1.8825187683105469, 0.818156898021698, -0.03298269212245941, -1.8223800659179688, -1.8315362930297852, 1.3300951719284058, 1.2115752696990967, 2.4074366092681885, 0.6293630599975586, 0.4597988724708557, -0.7935771346092224, -0.6814122200012207, 0.19542282819747925, -0.9818501472473145, -0.7807900309562683, 0.1594676375389099, 2.357194662094116, 1.8789288997650146, -0.5745862126350403, -0.09866020083427429, -1.014541506767273, 1.4140570163726807, -0.1746860146522522, 0.2841445803642273, 1.976786732673645, -0.2709164619445801, -1.1019402742385864, 1.269707441329956, -2.2559289932250977, 0.18632668256759644, 1.9751194715499878, 0.29412728548049927, 0.06773523986339569, -1.4334723949432373, -0.6371767520904541, -0.32724469900131226, -0.41961395740509033, -1.2470985651016235, 0.4952201843261719, -0.30959010124206543, -0.7703896164894104, -1.5446778535842896, 0.09689299762248993, -1.0925496816635132, -1.616050124168396, 0.3471029996871948, 1.8979098796844482, 1.9426318407058716, -0.7236172556877136, 1.5108188390731812, -0.3455424904823303, 0.12390531599521637, 1.218491792678833, 1.261648178100586, 3.0776212215423584, 1.9253278970718384, -1.19960618019104, 0.6874043345451355, -0.20804736018180847, -0.40957456827163696, 1.062704086303711, -1.0650750398635864, 1.2182618379592896, -0.187034010887146, -1.18983793258667, -1.1702296733856201, 1.0985307693481445, 0.5832640528678894, 0.02208220772445202, -0.5774875283241272, 1.2012081146240234, 0.0065616704523563385, 1.3473633527755737, 0.5697423219680786, -0.429559588432312, 0.6284352540969849, -0.37044841051101685, -0.4951772689819336, 1.6284245252609253, 0.10474847257137299, -1.4670220613479614, -2.329030752182007, -0.2588902711868286, -0.8281159996986389, 0.02723655104637146, -0.5545599460601807, -1.1009252071380615, 1.6959888935089111, 0.4366315007209778, -1.2457910776138306, -0.3081921935081482, -0.36784374713897705, -0.6690661907196045, 2.6356208324432373, -1.3318763971328735, -0.2062174677848816, -0.9267127513885498, -0.5385945439338684, 1.6459053754806519, -1.1564838886260986, -0.18136516213417053, -0.9933643341064453, -0.6378399133682251, -1.3157951831817627, -0.5613486170768738, -0.042355015873909, -0.8860503435134888, 0.8954552412033081, 0.13278703391551971, -1.0243797302246094, -0.33709365129470825, -0.9120634198188782, 0.9075807332992554, -0.1516619175672531, 0.14757142961025238, 1.9984878301620483, 0.4328158497810364, -0.3718690276145935, 0.7464944124221802, 1.1746675968170166, 0.631375253200531, -0.710110068321228, 0.16338877379894257, -0.70515376329422, 0.3035884499549866, -1.3259813785552979, 0.24705667793750763, -2.947068214416504, 0.6788609027862549, 0.00026883091777563095, -0.012369782663881779, 0.02512499690055847, -1.2469693422317505, 1.1282590627670288, 2.5587713718414307, -1.2545509338378906, 0.4004386067390442, 0.3607255220413208, 1.18023681640625, -1.6033247709274292, 0.28519558906555176, -0.4608001112937927, 2.0975892543792725, 0.18866759538650513, 1.2395591735839844, -0.5867711901664734, -2.2414543628692627, 0.6019725799560547, -1.1320866346359253, -1.123762607574463, 0.6662558913230896, -0.8933563828468323, 0.25235414505004883, -1.634316325187683, -0.24653790891170502, -0.9227219223976135, -1.2410571575164795, 0.7127711176872253, 0.13552306592464447, 0.37335002422332764, -0.664309561252594, 0.3171561360359192, -2.179657220840454, -1.435117483139038, -0.23037895560264587, -0.9170153141021729, 0.5891929864883423, -0.3486037254333496, 0.722106397151947, -0.0024734269827604294, 0.09667164087295532, 0.29886841773986816, 1.4278366565704346, 3.373645305633545, 0.15351754426956177, 0.294927179813385, -0.094322070479393, -0.9131050705909729, 1.3469250202178955, 0.9678102731704712, -0.00788331963121891, -0.5251150131225586, -1.1413851976394653, 1.352588176727295, 2.000601053237915, 0.968824028968811, 0.09953206032514572, -0.832176923751831, -0.6963592767715454, 0.049524758011102676, 0.22185328602790833, 0.46396899223327637, 0.9167532920837402, 0.0852993056178093, 0.17101143300533295, 1.4368783235549927, 1.2218811511993408, -0.4488949775695801, 0.46405982971191406, -0.9027457237243652, -0.5669724345207214, 0.3723832368850708, 0.28229719400405884, -0.028001395985484123, 0.38397490978240967, -1.1389926671981812, -0.23683319985866547, -0.30666494369506836, -0.9254905581474304, -0.628449559211731, -0.3482804298400879, -0.35228610038757324, 1.5375709533691406, 0.1517324000597, -0.5272327065467834, -0.05998958647251129, -0.6666802167892456, -0.07919962704181671, -1.0394052267074585, 0.3089107275009155, -0.18824192881584167, -0.023228567093610764, -0.1769355684518814, 1.7710819244384766, -0.8236873149871826, -1.9828588962554932, 0.22355157136917114, 0.3461136221885681, -0.4504281282424927, 0.20060884952545166, 1.6662416458129883, 0.6703386306762695, 1.486777424812317, 1.30071222782135, 0.9818971753120422, -0.5756260752677917, -1.311252236366272, 0.6148331165313721, 0.9408664703369141, -1.3428282737731934, 0.7271631956100464, -0.09744276851415634, -0.5828081965446472, 0.7680437564849854, 1.4540655612945557, 0.3520846962928772, -2.0430140495300293, 0.8636675477027893, -0.8757259845733643, 0.8118739128112793, 0.7604616284370422, 0.7370781898498535, 0.25138407945632935, 0.869462251663208, -1.2837506532669067, -1.1105540990829468, -0.8359678387641907, -0.6144939661026001, 1.9831410646438599, -0.24068240821361542, 0.48773592710494995, -0.28935712575912476, -1.2384016513824463, -0.06902158260345459, 0.6765332818031311, 0.44545888900756836, -0.3946600556373596, 0.8104331493377686, -0.5648565888404846, -1.153753638267517, -1.2936644554138184, -0.41899871826171875, -0.8225885629653931, -0.9320919513702393, 0.9239826202392578, 0.9295557141304016, 0.4236680865287781, 1.892306923866272, 0.5639074444770813, 0.14043383300304413, -2.599825382232666, 0.8599581718444824, 0.2542133331298828, -0.034339338541030884, 0.9676101207733154, 0.2531782388687134, 1.0435833930969238, 0.038169536739587784, 0.4481624960899353, -2.3068737983703613, 2.2015295028686523, -0.19800664484500885, 0.763632595539093, -0.059372201561927795, -0.11163511127233505, 1.2173025608062744, 0.5347252488136292, 0.5525341629981995, -1.0634599924087524, 0.6637894511222839, -0.5198209285736084, 1.2413060665130615, 0.8793707489967346, -0.7081875205039978, -0.0839422345161438, 1.3963432312011719, 0.4786314368247986, -0.5113688707351685, -0.9604209661483765, -0.9646854996681213, 0.9922142028808594, 1.7902251482009888, -0.0344192236661911, 0.027829542756080627, 0.8576145172119141, 0.6879019141197205, -1.3108927011489868, 0.06062978506088257, -0.7468159794807434, -0.6210113763809204, 1.692183256149292, 2.1277852058410645, -0.12307105213403702, -0.23139604926109314, -0.6407123804092407, -1.3131295442581177, 0.7846347689628601, -0.05234687030315399, 0.174028679728508, 0.7768214344978333, -0.6959602236747742, 1.0863618850708008, 0.841469407081604, 0.9522324800491333, 0.033801645040512085, 0.41139543056488037, 0.35815566778182983, -0.3788449764251709, -1.1757597923278809, -0.24208350479602814, -1.1201871633529663, -2.3474719524383545, 0.3687981367111206, -0.16171543300151825, -1.411789894104004, 0.0625351294875145, -1.062605619430542, 0.925904393196106, -0.5374883413314819, -1.1061939001083374, -1.557050108909607, 0.24872474372386932, -0.014666300266981125, 0.9738100171089172, -1.5467933416366577, -0.10637574642896652, 1.2232216596603394, 0.8533055782318115, -0.6182370781898499, 1.001146912574768, 0.2494090050458908, 0.9790903329849243, 0.8608613610267639, -0.3941364884376526, 0.37903618812561035, 0.014952817931771278, -1.2579383850097656, 0.44349008798599243, 1.1089409589767456, 0.2391994744539261, 1.4449535608291626, -0.5951549410820007, 0.07356522232294083, 0.47741299867630005, -0.4575445055961609, -0.4265955090522766, -0.4554852843284607, 0.5345951914787292, 0.0548519492149353, -0.9157209396362305, 0.012707309797406197, -0.07600519061088562, -0.22650960087776184, 0.28357017040252686, -1.4508615732192993, -0.19030098617076874, -0.4280856251716614, -0.5269600749015808, -1.1927082538604736, 0.01738460548222065, 1.444124460220337, -0.7632075548171997, -0.28300583362579346, 0.5978030562400818, 0.3787173628807068, 0.6359338760375977, 0.6742744445800781, -0.6970499157905579, -0.3675699830055237, -0.2053915411233902, -0.3026478886604309, 0.2220240980386734, 1.2788918018341064, -0.22851699590682983, -1.0084823369979858, 0.6615532636642456, -0.4511321187019348, 0.06215023249387741, 1.9751524925231934, 0.03604010492563248, -0.7984335422515869, 0.31051599979400635, -0.8180935382843018, 1.8472068309783936, 1.6645984649658203, 1.3452600240707397, -0.07312764972448349, -0.9410890340805054, 0.4606785178184509, -0.2109253704547882, -0.4550224542617798, 0.8362686634063721, 0.5322442054748535, -0.1640210896730423, -1.4129611253738403, 0.5754863619804382, 1.3257324695587158, -1.0087666511535645, -0.7534778118133545, 0.2087576687335968, -0.7913230657577515, 1.1352720260620117, 0.6657777428627014, 0.44239580631256104, 0.24512352049350739, 1.6811524629592896, 0.7697374224662781, -0.4926411509513855, 0.4171983003616333, 0.6237905621528625, -0.21632571518421173, -2.136746883392334, -1.2297226190567017, 0.23457209765911102, -0.48269081115722656, -1.683665156364441, 1.2810428142547607, -1.1512598991394043, -0.9206137657165527, 0.5538991689682007, 0.1865788996219635, 1.3597099781036377, 0.3450300097465515, 1.6113582849502563, 2.073686122894287, 0.8875037431716919, 0.2666832208633423, 1.3262639045715332, -0.06183714419603348, -0.5326666831970215, 1.8656138181686401, -0.4681752920150757, 0.5318686962127686, 1.0075322389602661, -0.4134865999221802, -1.1630055904388428, -0.7481698989868164, -1.2452118396759033, -0.6792882680892944, 1.2045135498046875, 0.16508029401302338, -1.1821298599243164, 0.1719987392425537, 1.4744453430175781, 0.15614640712738037, -0.3702961206436157, 0.6176478862762451, 0.4184163212776184, -0.8161154985427856, -0.10978862643241882, -0.9848400354385376, 0.49010246992111206, -0.14773891866207123, -0.3427671790122986, 0.19637592136859894, 0.581857442855835, 1.2805588245391846, -0.04135619103908539, 0.0751584991812706, 1.2428802251815796, -1.3226802349090576, 1.5045491456985474, -0.6220619678497314, 0.3322424292564392, -2.513969659805298, 1.4326077699661255, -0.7250356674194336, 1.956482172012329, -2.683549165725708, 0.42451614141464233, -0.6783086061477661, -0.330705463886261, 0.26613670587539673, -0.2981693148612976, 0.19147808849811554, -0.08030115813016891, -1.1199772357940674, -0.016498656943440437, -0.7910381555557251, 0.5323336124420166, 1.2148313522338867, 1.4571672677993774, -1.1878083944320679, -0.19796967506408691, -1.7299273014068604, -0.18773995339870453, -0.752232015132904, 0.43153131008148193, -2.026454210281372, -0.15125596523284912, -1.7922565937042236, -2.3381712436676025, -1.405082106590271, -0.8762036561965942, 0.9525435566902161, 0.11282616853713989, -0.8714472055435181, 1.0842976570129395, -0.3828110694885254, -1.8020325899124146, 1.0558236837387085, -2.2213003635406494 ]
https://github.com/huggingface/datasets/issues/4504
Can you please add the Stanford dog dataset?
I have raised PR for adding stanford-dog dataset. I have not added any data preprocessing code. Only dataset generation script is there. Let me know any changes required, or anything to add to README.
## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
710
34
Can you please add the Stanford dog dataset? ## Adding a Dataset - **Name:** *Stanford dog dataset* - **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/* - **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)* - **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose * Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). I have raised PR for adding stanford-dog dataset. I have not added any data preprocessing code. Only dataset generation script is there. Let me know any changes required, or anything to add to README.
[ -1.2533478736877441, -1.0282591581344604, -0.6380853652954102, 1.324013590812683, -0.29141494631767273, -1.4047945737838745, 0.1252468377351761, -1.0112887620925903, 1.644260287284851, -0.6053470969200134, 0.24855178594589233, -1.72145414352417, -0.07194596529006958, -0.4900326430797577, -0.8246137499809265, -0.8316485285758972, -0.4789849519729614, -0.8959593176841736, 0.8816603422164917, 2.4564428329467773, 1.1383053064346313, -1.4292815923690796, 2.7214927673339844, 0.6771199703216553, -0.21828925609588623, -1.0412489175796509, 0.4988440275192261, 0.18063077330589294, -1.2325338125228882, -0.40459439158439636, -0.9370259642601013, -0.09056204557418823, -0.4923989474773407, -0.48839136958122253, 0.1963944137096405, 0.3681856393814087, -0.02664704993367195, -0.3497947156429291, -0.5804663896560669, -0.6159294247627258, 0.4443562924861908, -0.40402868390083313, 0.8891655802726746, -0.5276889204978943, 1.7995134592056274, -0.7078861594200134, 0.4112086296081543, 0.6387655138969421, 1.3442459106445312, 0.20071937143802643, -0.04218706488609314, 0.34086310863494873, 0.4587914049625397, 0.05191875249147415, 0.3736640512943268, 1.1651980876922607, 0.6324790716171265, 0.5525716543197632, 0.6620084643363953, -2.128729820251465, 1.3391969203948975, -0.917658269405365, 0.44306251406669617, 1.4874025583267212, -1.0272325277328491, 0.39718180894851685, -1.8355664014816284, -0.09483493119478226, 0.49677354097366333, -2.361732006072998, 0.0883672684431076, -1.2878485918045044, -0.6960751414299011, 0.9402621984481812, 0.19539940357208252, -1.2833294868469238, 0.2648313343524933, -0.6488911509513855, 0.9659755229949951, 0.4222760498523712, 1.2187913656234741, -1.6661297082901, -0.15327294170856476, -0.2089226394891739, 0.03286682814359665, -1.2886735200881958, -1.6374437808990479, 0.7571600079536438, 0.5783925652503967, 0.6843628287315369, -0.16054080426692963, 0.8105785250663757, -0.9863022565841675, 1.0064890384674072, -0.9984982013702393, -1.6463552713394165, -1.4528169631958008, -2.3003878593444824, -2.294959545135498, 0.9637742042541504, -0.44109898805618286, -0.47194162011146545, 1.8620647192001343, -0.9421924948692322, -1.7562305927276611, 1.064893126487732, 0.2552884519100189, 0.07708609104156494, 2.29641056060791, 0.2174035906791687, -0.6638492941856384, 0.33223894238471985, -0.7608147263526917, 0.8034150004386902, -0.35469678044319153, 1.4698023796081543, 0.5538618564605713, -0.9181368350982666, 1.560044765472412, -0.5095815658569336, 0.4695965349674225, -0.5844959020614624, -0.6198335886001587, -0.8339186310768127, 0.4378746449947357, 1.9296796321868896, -0.3180409073829651, 1.6343361139297485, -0.37387698888778687, -1.6766191720962524, -1.4597091674804688, 0.73136967420578, 0.5960469245910645, -0.815306544303894, 0.042265795171260834, -0.37141528725624084, 0.09449712932109833, -0.029686985537409782, 1.0885508060455322, 1.1194185018539429, 0.7373345494270325, -0.4203806519508362, -0.8941712379455566, 0.23420630395412445, -0.06126197427511215, -0.7885353565216064, -1.8660657405853271, -0.36987003684043884, 0.3166290819644928, 0.6344277262687683, -1.3521591424942017, 1.5759097337722778, 0.8757049441337585, 2.017744302749634, 0.9200731515884399, -0.3806670308113098, 1.3830667734146118, 0.036096423864364624, 1.8480805158615112, -0.6788288950920105, 0.7117968797683716, -0.2513318955898285, -1.0098718404769897, 0.7892706990242004, -0.4615849554538727, -2.13269305229187, -0.7394956946372986, -0.9880486130714417, -0.20694035291671753, -0.7560545206069946, 0.9237474799156189, -0.27440986037254333, -1.3259224891662598, 0.17341060936450958, -0.7059108018875122, 0.20206470787525177, -1.2582670450210571, 0.1588239222764969, 0.8992622494697571, -0.6504135727882385, -0.15722082555294037, -0.26806163787841797, -1.3083733320236206, -0.5736518502235413, 0.2015945315361023, 1.9283671379089355, -0.6911072134971619, 1.0676016807556152, 0.8309796452522278, -0.7341420650482178, 0.09426561743021011, 0.3252931833267212, -0.30262380838394165, 0.9123868346214294, -1.1806666851043701, -0.357568621635437, 1.0056952238082886, -0.13567766547203064, -0.4410124123096466, 1.5530967712402344, 0.8417194485664368, -0.9659691452980042, -0.19697831571102142, -0.2982615828514099, -0.8050550222396851, -0.08330297470092773, -1.5433987379074097, -0.23444028198719025, 0.08876731991767883, -1.4016506671905518, -0.5285841822624207, -0.2476915568113327, 1.307080626487732, -0.13881921768188477, 1.2329671382904053, -0.24736112356185913, -0.4825615882873535, -0.49791958928108215, -0.3719605803489685, 0.20916041731834412, -0.31114840507507324, -0.6266506910324097, 0.28574010729789734, -0.8584516048431396, 0.32123371958732605, 1.4654555320739746, 0.5494855642318726, 0.0030516674742102623, 0.6737514138221741, 1.0395214557647705, 0.23934686183929443, -0.1086336001753807, -0.8898159265518188, -1.5309560298919678, 1.9505265951156616, -1.4046659469604492, 1.7747218608856201, 0.7957055568695068, -0.10433773696422577, -1.7885297536849976, -1.7926424741744995, 1.2492854595184326, 1.2202507257461548, 2.4086263179779053, 0.6603012084960938, 0.42102381587028503, -0.8108004927635193, -0.6842990517616272, 0.28407424688339233, -1.0600093603134155, -0.7430204749107361, 0.06679793447256088, 2.34330153465271, 1.8445886373519897, -0.7239378094673157, -0.1264428198337555, -1.012556552886963, 1.3710466623306274, -0.14220666885375977, 0.23145611584186554, 2.0743789672851562, -0.37183743715286255, -1.0542683601379395, 1.2894659042358398, -2.2576189041137695, 0.2502690553665161, 1.9772237539291382, 0.4294528067111969, 0.031230228021740913, -1.52839994430542, -0.6032121181488037, -0.34414005279541016, -0.40353840589523315, -1.1917630434036255, 0.480934739112854, -0.2996220886707306, -0.833400309085846, -1.5286260843276978, -0.003940863534808159, -1.1182827949523926, -1.6958534717559814, 0.4635835289955139, 1.8328824043273926, 1.9405391216278076, -0.6229296326637268, 1.3454718589782715, -0.29589489102363586, 0.1052616685628891, 1.2581994533538818, 1.255575180053711, 3.1466712951660156, 2.010564088821411, -1.1191790103912354, 0.7945918440818787, -0.18495513498783112, -0.3777090013027191, 1.0503009557724, -0.9958519339561462, 1.1547654867172241, -0.23553554713726044, -1.262902855873108, -1.108139991760254, 1.1395518779754639, 0.5399956703186035, 0.023789068683981895, -0.632655680179596, 1.1870230436325073, 0.03933064639568329, 1.501025676727295, 0.5806866884231567, -0.42096829414367676, 0.5810855031013489, -0.4081622362136841, -0.49216654896736145, 1.7400357723236084, 0.20223569869995117, -1.533437728881836, -2.4108705520629883, -0.2943096160888672, -0.8785365223884583, -0.08732184022665024, -0.618739664554596, -1.0910521745681763, 1.6152366399765015, 0.5151110291481018, -1.230564832687378, -0.323239803314209, -0.3526259660720825, -0.7215575575828552, 2.5846617221832275, -1.3730477094650269, -0.12275534123182297, -0.930990993976593, -0.4517858624458313, 1.6458954811096191, -1.2437251806259155, -0.1586412489414215, -1.0869086980819702, -0.7515718340873718, -1.2419873476028442, -0.551094114780426, -0.10384095460176468, -0.900542676448822, 0.8918975591659546, -0.08605378866195679, -0.9527737498283386, -0.2769072949886322, -0.9004195928573608, 0.8505335450172424, -0.06333816051483154, 0.20146715641021729, 1.9218839406967163, 0.45349040627479553, -0.3847392201423645, 0.5765277147293091, 1.2508606910705566, 0.6639924645423889, -0.8001875877380371, 0.10324615240097046, -0.6889743208885193, 0.2536873519420624, -1.3231507539749146, 0.26872336864471436, -2.989593744277954, 0.7001087069511414, -0.0540066733956337, -0.11932775378227234, -0.018938865512609482, -1.2900168895721436, 1.1921985149383545, 2.513521194458008, -1.1950880289077759, 0.37555983662605286, 0.3964996039867401, 1.101095199584961, -1.5789177417755127, 0.38417285680770874, -0.4966091513633728, 2.1239986419677734, 0.1504564732313156, 1.2067383527755737, -0.6857351660728455, -2.057931661605835, 0.6420532464981079, -1.0759607553482056, -1.0836018323898315, 0.596245527267456, -0.8756422400474548, 0.30913713574409485, -1.637216567993164, -0.10448989272117615, -0.9035483002662659, -1.3081893920898438, 0.7199051380157471, 0.08797001838684082, 0.4044385552406311, -0.5839642286300659, 0.35897040367126465, -2.206470489501953, -1.431639552116394, -0.2664293646812439, -0.9010956883430481, 0.6194915175437927, -0.3312143385410309, 0.7103070616722107, 0.09142333269119263, 0.1475585401058197, 0.2922484874725342, 1.3724251985549927, 3.3414831161499023, 0.16617979109287262, 0.2730199694633484, -0.00370035320520401, -0.9827089905738831, 1.3980276584625244, 0.9646845459938049, 0.09411923587322235, -0.552518904209137, -0.9666136503219604, 1.3579143285751343, 2.0359511375427246, 1.10732102394104, 0.10678564012050629, -0.823775589466095, -0.6383705735206604, 0.15595470368862152, 0.29569360613822937, 0.4981037974357605, 0.9978934526443481, 0.009120495989918709, 0.19478128850460052, 1.4362174272537231, 1.3134770393371582, -0.4043430984020233, 0.4689500629901886, -0.9139330387115479, -0.53316330909729, 0.38659700751304626, 0.3164401650428772, 0.04504713416099548, 0.4020233452320099, -1.1268174648284912, -0.29723772406578064, -0.1912948191165924, -1.0075865983963013, -0.6627553701400757, -0.5255933403968811, -0.4902491569519043, 1.6092201471328735, 0.05138447880744934, -0.5036293268203735, -0.088124118745327, -0.7090126276016235, -0.0478062629699707, -1.1072280406951904, 0.40449270606040955, -0.033588968217372894, 0.007559932768344879, -0.18924517929553986, 1.7858871221542358, -0.8675246238708496, -2.0855231285095215, 0.28341683745384216, 0.4069138467311859, -0.6483889222145081, 0.04344608634710312, 1.56696617603302, 0.6204947233200073, 1.4565168619155884, 1.3131763935089111, 0.9902750849723816, -0.5210080742835999, -1.3168940544128418, 0.5996134281158447, 0.850128710269928, -1.3796733617782593, 0.7618352770805359, -0.1113256886601448, -0.4953945577144623, 0.8017643690109253, 1.466373085975647, 0.2808840572834015, -1.9445242881774902, 0.9258173108100891, -0.7564952373504639, 0.8316398859024048, 0.7076334953308105, 0.8052431344985962, 0.23860765993595123, 0.8842890858650208, -1.434725284576416, -1.060146689414978, -0.9220580458641052, -0.47491100430488586, 2.0375795364379883, -0.139073446393013, 0.45900553464889526, -0.25427791476249695, -1.1463673114776611, -0.07568777352571487, 0.7931998372077942, 0.49858254194259644, -0.29728415608406067, 0.8217631578445435, -0.5086702704429626, -1.081835150718689, -1.3076444864273071, -0.393880695104599, -0.7562662363052368, -0.8835145235061646, 0.9130358099937439, 1.0000149011611938, 0.5662997961044312, 1.8823200464248657, 0.5233537554740906, 0.23185747861862183, -2.666905164718628, 0.8599509596824646, 0.2595629394054413, 0.015247505158185959, 0.9501250386238098, 0.15882745385169983, 1.135036826133728, -0.03002878464758396, 0.4650549590587616, -2.2914090156555176, 2.161567211151123, -0.1887577623128891, 0.7237909436225891, 0.06681046634912491, -0.05982385575771332, 1.2865368127822876, 0.5763598084449768, 0.5543092489242554, -1.1197725534439087, 0.6990206837654114, -0.5224228501319885, 1.1356714963912964, 0.8608847260475159, -0.6891931295394897, 0.011275675147771835, 1.3398195505142212, 0.6024335026741028, -0.4079078137874603, -1.0772017240524292, -0.843700647354126, 1.005569338798523, 1.7871772050857544, -0.06491673737764359, -0.02085210010409355, 0.8555017709732056, 0.7270771265029907, -1.2757558822631836, 0.13291828334331512, -0.7851680517196655, -0.5855163931846619, 1.6713635921478271, 2.0805907249450684, 0.01863950677216053, -0.19971422851085663, -0.6122427582740784, -1.2672209739685059, 0.7243276834487915, 0.020947584882378578, 0.21210692822933197, 0.7987992763519287, -0.6431024074554443, 1.1517442464828491, 0.7685614228248596, 1.0318571329116821, -0.016051121056079865, 0.4168511629104614, 0.22799237072467804, -0.2516433298587799, -1.1700875759124756, -0.30640703439712524, -1.1861984729766846, -2.434870958328247, 0.44226938486099243, -0.3365940451622009, -1.4153029918670654, 0.06483971327543259, -1.0786429643630981, 0.8855870962142944, -0.6310409307479858, -1.1036837100982666, -1.6480697393417358, 0.27437809109687805, -0.0695066973567009, 1.0046333074569702, -1.622349500656128, -0.10037919133901596, 1.191806674003601, 0.6922992467880249, -0.468219131231308, 0.9783594608306885, 0.30377888679504395, 0.9597257375717163, 0.7867806553840637, -0.4045405387878418, 0.3308365046977997, 0.15137013792991638, -1.3328914642333984, 0.5545604228973389, 1.1460484266281128, 0.2363886535167694, 1.4340757131576538, -0.5624775886535645, 0.23290158808231354, 0.5562394261360168, -0.538626492023468, -0.42593464255332947, -0.503715991973877, 0.6485464572906494, 0.08324781060218811, -1.1239831447601318, -0.024848725646734238, -0.1534552276134491, -0.12962092459201813, 0.2862703800201416, -1.3577388525009155, -0.34695813059806824, -0.40759631991386414, -0.5007238984107971, -1.1717904806137085, -0.05556522309780121, 1.375610589981079, -0.8569842576980591, -0.1755804717540741, 0.5665128231048584, 0.44100290536880493, 0.6486192345619202, 0.6551016569137573, -0.6501016020774841, -0.3443833887577057, -0.266669899225235, -0.21249331533908844, 0.13533681631088257, 1.1871262788772583, -0.21929007768630981, -1.0051809549331665, 0.6637558341026306, -0.4233153760433197, 0.10234668105840683, 2.060853958129883, 0.06815260648727417, -0.7585569620132446, 0.3956415355205536, -0.7678923010826111, 1.7309857606887817, 1.560646414756775, 1.3575694561004639, 0.012945814058184624, -0.9205847382545471, 0.342191219329834, -0.13198737800121307, -0.4190218448638916, 0.8298550248146057, 0.6391138434410095, -0.1433069109916687, -1.3452813625335693, 0.4764304757118225, 1.3815759420394897, -1.043626070022583, -0.7543385624885559, 0.203800231218338, -0.8336697816848755, 1.1233148574829102, 0.6146248579025269, 0.5049287676811218, 0.23054496943950653, 1.6186537742614746, 0.6296718716621399, -0.4572232663631439, 0.3381464183330536, 0.5387908816337585, -0.21070550382137299, -2.1001360416412354, -1.1333714723587036, 0.2860811948776245, -0.4846065640449524, -1.560456395149231, 1.2528786659240723, -1.2067698240280151, -0.8201740980148315, 0.5261846780776978, 0.2650817930698395, 1.4755253791809082, 0.39015233516693115, 1.7931588888168335, 2.013259172439575, 0.9135262370109558, 0.17319245636463165, 1.4397364854812622, 0.12284193933010101, -0.4902057349681854, 1.838006854057312, -0.4185069501399994, 0.6066703200340271, 0.9991236925125122, -0.4382820129394531, -1.2371282577514648, -0.7525203824043274, -1.1009464263916016, -0.5938707590103149, 1.153175950050354, 0.21685658395290375, -1.203534483909607, 0.1160203069448471, 1.5093369483947754, 0.1267867088317871, -0.2553187310695648, 0.3985131084918976, 0.36346226930618286, -0.7033897042274475, -0.1064460352063179, -0.9960150122642517, 0.3657674491405487, -0.12944425642490387, -0.35798966884613037, 0.10256560146808624, 0.6920143365859985, 1.1940934658050537, -0.06203397363424301, 0.09119179099798203, 1.268860936164856, -1.3491864204406738, 1.529428482055664, -0.5840833187103271, 0.2606038451194763, -2.483367919921875, 1.455056071281433, -0.7799130082130432, 1.8906586170196533, -2.678373098373413, 0.31561046838760376, -0.6124330759048462, -0.35090336203575134, 0.23153848946094513, -0.3850843906402588, 0.19956491887569427, -0.10180138051509857, -1.1262239217758179, 0.014260673895478249, -0.8823279142379761, 0.5479964017868042, 1.2738476991653442, 1.438056468963623, -1.1884913444519043, -0.2702682316303253, -1.7372334003448486, -0.21234147250652313, -0.7094660401344299, 0.4586154520511627, -1.9449021816253662, 0.02536836825311184, -1.8267796039581299, -2.2532873153686523, -1.4880561828613281, -0.9487670660018921, 0.8759235143661499, 0.11447617411613464, -0.9413638710975647, 0.892455518245697, -0.40099838376045227, -1.6977438926696777, 1.0722404718399048, -2.2999727725982666 ]
https://github.com/huggingface/datasets/issues/4502
Logic bug in arrow_writer?
Hi @cccntu you're right, as when `batch_examples={}` the current if-statement won't be triggered as the condition won't be satisfied, I'll prepare a PR to address it as well as add the regression tests so that this issue is handled properly.
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488 I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows: ``` - if batch_examples and len(next(iter(batch_examples.values()))) == 0: + if not batch_examples or len(next(iter(batch_examples.values()))) == 0: return ``` @lhoestq
711
40
Logic bug in arrow_writer? https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488 I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows: ``` - if batch_examples and len(next(iter(batch_examples.values()))) == 0: + if not batch_examples or len(next(iter(batch_examples.values()))) == 0: return ``` @lhoestq Hi @cccntu you're right, as when `batch_examples={}` the current if-statement won't be triggered as the condition won't be satisfied, I'll prepare a PR to address it as well as add the regression tests so that this issue is handled properly.
[ -1.2829291820526123, -0.8939511775970459, -0.7546863555908203, 1.5642458200454712, -0.10539555549621582, -1.2421108484268188, 0.10614028573036194, -0.9985769391059875, 1.6021429300308228, -0.8319441676139832, 0.4183957874774933, -1.6635444164276123, 0.05250796675682068, -0.6828747987747192, -0.7626842856407166, -0.8163648247718811, -0.31036046147346497, -0.7547628879547119, 1.084206223487854, 2.5553576946258545, 1.1506562232971191, -1.4432820081710815, 2.795064926147461, 0.6257683038711548, -0.2483779788017273, -1.0667952299118042, 0.46809452772140503, -0.025300290435552597, -1.1262973546981812, -0.510313868522644, -1.0123827457427979, 0.017190005630254745, -0.5291224122047424, -0.5396412014961243, 0.04984632134437561, 0.3994651138782501, -0.24342699348926544, -0.36076194047927856, -0.48229753971099854, -0.8270174264907837, 0.5084583163261414, -0.34945788979530334, 0.9062556624412537, -0.30901315808296204, 1.7996281385421753, -0.538863480091095, 0.3607286810874939, 0.6063445210456848, 1.5200762748718262, 0.21742486953735352, -0.07075975090265274, 0.40613678097724915, 0.34153011441230774, 0.031946927309036255, 0.5389603972434998, 1.1649258136749268, 0.5947453379631042, 0.4889514446258545, 0.713869035243988, -2.2569007873535156, 1.3475773334503174, -1.0923818349838257, 0.16581527888774872, 1.2500327825546265, -1.0995044708251953, 0.25909993052482605, -1.7739945650100708, -0.07451000809669495, 0.4703504145145416, -2.2534241676330566, 0.2837923467159271, -1.2984657287597656, -0.43749159574508667, 1.0083379745483398, 0.35637596249580383, -1.2948634624481201, 0.12082430720329285, -0.34207817912101746, 1.0654809474945068, 0.3982888162136078, 1.0168699026107788, -1.7588798999786377, 0.027830859646201134, -0.3380647599697113, 0.09072612226009369, -1.3801558017730713, -1.5543203353881836, 0.48991864919662476, 0.6160658597946167, 0.5644134283065796, -0.06828898191452026, 1.0293382406234741, -1.0140637159347534, 0.7653657793998718, -0.9541239738464355, -1.6236281394958496, -1.4349956512451172, -2.274564743041992, -2.268324613571167, 0.7069588899612427, -0.47744694352149963, -0.5952410697937012, 1.995705008506775, -1.0367732048034668, -1.7436798810958862, 1.1802762746810913, 0.23301100730895996, -0.06177983433008194, 2.3212196826934814, 0.22302502393722534, -0.7592836022377014, 0.44580286741256714, -0.778715968132019, 0.8586078882217407, -0.34530049562454224, 1.426208734512329, 0.5636747479438782, -0.9365652203559875, 1.6730109453201294, -0.3851734697818756, 0.4331788420677185, -0.6513615846633911, -0.5373724699020386, -0.8673959970474243, 0.43376103043556213, 2.0927250385284424, -0.32383084297180176, 1.56157386302948, -0.3470838963985443, -1.5201412439346313, -1.5114498138427734, 0.9571820497512817, 0.5217543840408325, -0.7612741589546204, 0.1906726360321045, -0.4701513350009918, 0.24544742703437805, -0.00038897618651390076, 1.120202660560608, 1.3158119916915894, 0.5908384919166565, -0.26451459527015686, -0.950005292892456, 0.27592790126800537, -0.0834568440914154, -0.5489736199378967, -1.8155163526535034, -0.33895835280418396, 0.1672402173280716, 0.7045649886131287, -1.1417536735534668, 1.7664259672164917, 0.8690806031227112, 1.8161660432815552, 1.0239423513412476, -0.1479891836643219, 1.4884949922561646, -0.03324805572628975, 1.9123485088348389, -0.47932446002960205, 0.6948877573013306, -0.37476155161857605, -1.1390318870544434, 0.8194794058799744, -0.44353482127189636, -2.014988660812378, -0.7350770831108093, -0.8996453285217285, -0.18755757808685303, -0.8379283547401428, 0.9888558387756348, -0.3704962134361267, -1.4474765062332153, 0.2753998041152954, -0.667512834072113, 0.21271046996116638, -1.2493250370025635, 0.35801202058792114, 0.7140538096427917, -0.6712375283241272, 0.03374875336885452, -0.24699243903160095, -1.2806947231292725, -0.47926703095436096, 0.2228125035762787, 2.050976276397705, -0.7342886924743652, 0.9099010825157166, 0.9987162947654724, -0.7113232612609863, -0.02010420709848404, 0.372632771730423, -0.34156468510627747, 0.8644378185272217, -1.0757548809051514, -0.31792908906936646, 1.218431830406189, -0.16983240842819214, -0.5705190896987915, 1.4495147466659546, 0.9009099006652832, -1.0148353576660156, -0.22395974397659302, -0.20991085469722748, -0.8261899948120117, 0.08901258558034897, -1.596248745918274, -0.21761275827884674, 0.3968387246131897, -1.488651990890503, -0.5253388285636902, -0.14308105409145355, 1.327573537826538, -0.18985825777053833, 1.441515564918518, -0.32504570484161377, -0.2078450471162796, -0.29067176580429077, -0.4299141466617584, 0.13829313218593597, -0.06634671986103058, -0.6066538691520691, 0.24549806118011475, -0.7812114357948303, 0.36156773567199707, 1.4209327697753906, 0.4066827893257141, 0.07282043993473053, 0.5411484837532043, 1.1477922201156616, 0.3283524513244629, -0.002368710935115814, -0.8939772844314575, -1.6155809164047241, 2.0309157371520996, -1.4752086400985718, 2.0281405448913574, 0.7511839270591736, 0.031144259497523308, -1.6777352094650269, -1.7530776262283325, 1.3987793922424316, 1.1878710985183716, 2.301102876663208, 0.5720570683479309, 0.34850797057151794, -0.82802414894104, -0.6199183464050293, 0.4039015769958496, -1.054000735282898, -0.7945516109466553, 0.1538666933774948, 2.3820559978485107, 1.7749112844467163, -0.4513776898384094, -0.22988684475421906, -0.9626879096031189, 1.2334420680999756, -0.2255503237247467, 0.2631947994232178, 1.8679308891296387, -0.2687819302082062, -1.2253297567367554, 1.1990240812301636, -2.411994695663452, 0.1082523837685585, 2.0977556705474854, 0.32685595750808716, 0.13163582980632782, -1.3430038690567017, -0.6603364944458008, -0.171624094247818, -0.4302208125591278, -1.2355523109436035, 0.6194894313812256, -0.2978969216346741, -0.8187253475189209, -1.3278051614761353, 0.23476335406303406, -1.175642490386963, -1.7004402875900269, 0.3249790072441101, 1.8609453439712524, 2.0866029262542725, -0.8230141401290894, 1.5968695878982544, -0.23630289733409882, 0.4003441631793976, 1.2835462093353271, 1.2619937658309937, 3.106703281402588, 1.8769011497497559, -1.2433980703353882, 0.7062610983848572, -0.17037615180015564, -0.5954554080963135, 1.3311458826065063, -1.2069385051727295, 1.2163262367248535, -0.08126074820756912, -1.2037581205368042, -1.2900028228759766, 0.8495495319366455, 0.4762996733188629, -0.08049462735652924, -0.4533536434173584, 1.1305056810379028, 0.0760439783334732, 1.2611511945724487, 0.5454902648925781, -0.3237716853618622, 0.5672670602798462, -0.46315404772758484, -0.46930453181266785, 1.558254599571228, 0.15817567706108093, -1.4299018383026123, -2.26876163482666, -0.11015573143959045, -0.7712688446044922, -0.002351808361709118, -0.6492056250572205, -1.0585453510284424, 1.5468432903289795, 0.2981688976287842, -1.1576437950134277, -0.24965497851371765, -0.38593655824661255, -0.6043037176132202, 2.5456998348236084, -1.380016565322876, -0.2846479117870331, -1.0072665214538574, -0.6766896843910217, 1.5869617462158203, -1.192775011062622, -0.25397688150405884, -0.9446178674697876, -0.5454892516136169, -1.3247147798538208, -0.49149152636528015, -0.13479958474636078, -0.8460177779197693, 0.6409783959388733, 0.19015350937843323, -1.163480520248413, -0.3715987503528595, -0.8352851867675781, 0.8281564712524414, -0.16958189010620117, 0.24811944365501404, 1.825055718421936, 0.34736812114715576, -0.40769171714782715, 0.777061402797699, 1.2051247358322144, 0.5221443772315979, -0.5470289587974548, 0.2812177538871765, -0.6639615893363953, 0.2530058026313782, -1.4076886177062988, 0.3402779698371887, -2.859107732772827, 0.6711477041244507, -0.043735623359680176, -0.11443191766738892, -0.055540986359119415, -1.339733600616455, 1.1792864799499512, 2.6095292568206787, -1.2370967864990234, 0.5256145000457764, 0.3091094195842743, 1.260213851928711, -1.5961936712265015, 0.23717562854290009, -0.3936871290206909, 2.168369770050049, 0.2170405089855194, 1.2741235494613647, -0.4654536843299866, -2.276599407196045, 0.5996272563934326, -1.2207728624343872, -1.1641350984573364, 0.7009453773498535, -0.8496527671813965, 0.08791601657867432, -1.354689598083496, -0.27393779158592224, -0.9726006388664246, -1.1721612215042114, 0.7600274682044983, 0.07579100877046585, 0.39835095405578613, -0.5948576331138611, 0.32610729336738586, -2.179245710372925, -1.3362958431243896, -0.11617936939001083, -1.0094696283340454, 0.43256616592407227, -0.3319830596446991, 0.6253983378410339, -0.18169568479061127, 0.0695597231388092, 0.34335166215896606, 1.5295796394348145, 3.45625901222229, 0.21444258093833923, 0.44593340158462524, -0.1545500010251999, -0.8218269348144531, 1.489621639251709, 0.9526963829994202, -0.17533548176288605, -0.5324307680130005, -1.0763540267944336, 1.3431657552719116, 1.828412652015686, 0.9847068786621094, 0.07889559119939804, -0.7711341977119446, -0.7258530259132385, -0.05387366563081741, 0.11230231821537018, 0.4486003816127777, 0.9876525402069092, 0.12978622317314148, 0.012167809531092644, 1.2635163068771362, 1.1422220468521118, -0.5148530602455139, 0.3737228512763977, -0.9100109934806824, -0.31471607089042664, 0.4140583872795105, 0.23820514976978302, -0.05117340385913849, 0.3993602693080902, -0.8897320032119751, -0.25084996223449707, -0.27567392587661743, -0.9838804602622986, -0.7573257684707642, -0.5044028162956238, -0.3083246648311615, 1.6568843126296997, 0.08642788231372833, -0.5532814860343933, -0.1592298001050949, -0.8481093645095825, -0.15582378208637238, -1.0720462799072266, 0.12032502889633179, -0.0553714781999588, -0.20693355798721313, -0.168254554271698, 1.67630136013031, -0.9275591969490051, -2.1715729236602783, 0.2861728370189667, 0.2678643763065338, -0.33545494079589844, 0.19837455451488495, 1.6672956943511963, 0.47298744320869446, 1.4100502729415894, 1.3556137084960938, 0.9941790699958801, -0.5936791300773621, -1.222115159034729, 0.746940016746521, 0.8425236344337463, -1.4272652864456177, 0.8633618354797363, -0.010243570432066917, -0.4137459695339203, 0.6082409620285034, 1.2511942386627197, 0.5169342160224915, -1.9129040241241455, 0.7470923662185669, -0.9004736542701721, 0.7525396347045898, 0.6920792460441589, 0.7513077855110168, 0.26450037956237793, 0.9153726100921631, -1.153447151184082, -1.1735533475875854, -0.7267759442329407, -0.7467243075370789, 1.9950400590896606, -0.22085516154766083, 0.5397316217422485, -0.20648005604743958, -1.2227853536605835, -0.12136363983154297, 0.7378188371658325, 0.25044524669647217, -0.44324931502342224, 0.8541697263717651, -0.7028952836990356, -1.0827056169509888, -1.4546500444412231, -0.5004937052726746, -0.9969258308410645, -0.9777623414993286, 1.0151199102401733, 0.7349357604980469, 0.27394023537635803, 1.9172099828720093, 0.6797515749931335, 0.2133859097957611, -2.548776149749756, 0.8743553757667542, 0.34316134452819824, -0.02970566228032112, 0.8805884122848511, 0.2491832673549652, 1.0940024852752686, -0.07032153755426407, 0.5429980754852295, -2.3239738941192627, 2.239464282989502, -0.30430400371551514, 0.6937205791473389, -0.09211248904466629, -0.18755875527858734, 1.1302435398101807, 0.525887668132782, 0.5949723124504089, -1.1762504577636719, 0.7266908884048462, -0.6881735324859619, 1.202832818031311, 0.9823942184448242, -0.91001957654953, 0.01399952545762062, 1.3998746871948242, 0.33724555373191833, -0.5531042814254761, -0.9326503872871399, -0.877734899520874, 0.9780197739601135, 1.6667330265045166, -0.016971848905086517, -0.047254979610443115, 0.8102970719337463, 0.6802660822868347, -1.2244060039520264, 0.06974596530199051, -0.7007772922515869, -0.8513360619544983, 1.7831056118011475, 2.0624332427978516, -0.12577946484088898, -0.2825241982936859, -0.7460252642631531, -1.2085298299789429, 0.8258141875267029, 0.05543677508831024, 0.0644039437174797, 0.6658589243888855, -0.6393921375274658, 1.1471153497695923, 0.862591564655304, 0.9467935562133789, 0.13929778337478638, 0.21075697243213654, 0.382252961397171, -0.2682684361934662, -1.0954972505569458, -0.3382633328437805, -1.2113087177276611, -2.618317127227783, 0.46136215329170227, -0.30437201261520386, -1.3652178049087524, 0.12489496171474457, -0.943889856338501, 0.9026790857315063, -0.61244136095047, -1.0715471506118774, -1.4504543542861938, 0.1582472324371338, -0.13784056901931763, 0.8493472337722778, -1.6682713031768799, -0.07370331883430481, 1.3065836429595947, 0.981779158115387, -0.6190334558486938, 1.0415254831314087, 0.25113895535469055, 1.0727484226226807, 0.8962191343307495, -0.45367157459259033, 0.5396130681037903, 0.04745569825172424, -1.3208208084106445, 0.5735130906105042, 1.2219945192337036, 0.14622347056865692, 1.569118857383728, -0.38988035917282104, -0.020008176565170288, 0.4086463749408722, -0.6070712804794312, -0.46629393100738525, -0.6522110104560852, 0.758369505405426, 0.07675019651651382, -0.8824020624160767, -0.005697247572243214, -0.0271956417709589, -0.16141913831233978, 0.16179771721363068, -1.6118232011795044, -0.17334137856960297, -0.3323184549808502, -0.6064369678497314, -1.278566598892212, -0.13319723308086395, 1.3368266820907593, -0.8423163890838623, -0.179005429148674, 0.4368616044521332, 0.41546258330345154, 0.4804248511791229, 0.6078276634216309, -0.6744274497032166, -0.38320720195770264, -0.30736973881721497, -0.3801262676715851, 0.3398903012275696, 1.1655113697052002, -0.10539601743221283, -0.989815890789032, 0.67085200548172, -0.19737647473812103, 0.060115501284599304, 1.7983760833740234, -0.028858941048383713, -0.776334285736084, 0.29054099321365356, -0.6771652698516846, 1.9596203565597534, 1.6410261392593384, 1.2501603364944458, -0.14537182450294495, -0.8861592411994934, 0.6674425601959229, -0.3032718300819397, -0.35873764753341675, 0.8687492609024048, 0.4461823105812073, -0.18910007178783417, -1.4316939115524292, 0.6480295658111572, 1.2529438734054565, -0.8556051254272461, -0.7596227526664734, -0.06385800242424011, -0.7639581561088562, 1.0935859680175781, 0.6169079542160034, 0.30629247426986694, 0.28717127442359924, 1.6912651062011719, 0.6297609806060791, -0.4922855496406555, 0.5343922972679138, 0.5054832696914673, -0.11829156428575516, -2.194591522216797, -1.1607896089553833, 0.31279703974723816, -0.43437275290489197, -1.5460646152496338, 1.3236937522888184, -1.1024001836776733, -0.9410628080368042, 0.6401960849761963, 0.13828545808792114, 1.4877818822860718, 0.26589199900627136, 1.6585144996643066, 2.0703909397125244, 0.7530778050422668, 0.37663406133651733, 1.168412446975708, -0.136019766330719, -0.37227433919906616, 1.8038511276245117, -0.4385402202606201, 0.5293081998825073, 1.0371828079223633, -0.2993015646934509, -1.0500003099441528, -0.8759293556213379, -1.3371366262435913, -0.6914467215538025, 1.0788064002990723, 0.03720036894083023, -1.1750239133834839, 0.18491655588150024, 1.6294649839401245, 0.10990259796380997, -0.22496135532855988, 0.62409508228302, 0.4272552728652954, -0.714693009853363, -0.031238749623298645, -0.8951139450073242, 0.5775311589241028, -0.21512039005756378, -0.3259475529193878, 0.3494667410850525, 0.5059776306152344, 1.2321467399597168, -0.023168571293354034, 0.08483537286520004, 1.2684990167617798, -1.4335181713104248, 1.4610177278518677, -0.6279211044311523, 0.28504079580307007, -2.3511548042297363, 1.4264222383499146, -0.9403825998306274, 1.9723765850067139, -2.678687334060669, 0.4865957498550415, -0.6040171384811401, -0.5414837002754211, 0.3839971125125885, -0.3814954161643982, 0.11117356270551682, -0.16333024203777313, -1.0066837072372437, -0.11223439872264862, -0.6111085414886475, 0.5601100921630859, 1.17264723777771, 1.2890315055847168, -1.021849513053894, -0.2020697146654129, -1.8128631114959717, -0.11435458064079285, -0.5643028020858765, 0.271511048078537, -2.082921028137207, -0.15059514343738556, -2.034381151199341, -2.3122918605804443, -1.3167887926101685, -0.79899662733078, 1.1000980138778687, 0.15741321444511414, -0.8106657266616821, 1.152569055557251, -0.329245924949646, -1.7259151935577393, 1.0426576137542725, -2.060410499572754 ]
https://github.com/huggingface/datasets/issues/4502
Logic bug in arrow_writer?
Hi @alvarobartt , Thanks for answering. Do you know when and why an empty batch is passed to this function? This only happened to me when processing with multiple workers, while chunking examples, I think.
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488 I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows: ``` - if batch_examples and len(next(iter(batch_examples.values()))) == 0: + if not batch_examples or len(next(iter(batch_examples.values()))) == 0: return ``` @lhoestq
711
35
Logic bug in arrow_writer? https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488 I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows: ``` - if batch_examples and len(next(iter(batch_examples.values()))) == 0: + if not batch_examples or len(next(iter(batch_examples.values()))) == 0: return ``` @lhoestq Hi @alvarobartt , Thanks for answering. Do you know when and why an empty batch is passed to this function? This only happened to me when processing with multiple workers, while chunking examples, I think.
[ -1.3052595853805542, -0.8977344036102295, -0.7497586607933044, 1.586374044418335, -0.09717543423175812, -1.2714086771011353, 0.15626981854438782, -1.0310698747634888, 1.605894923210144, -0.8343203067779541, 0.4128228724002838, -1.6418843269348145, 0.043650273233652115, -0.6165339350700378, -0.7932498455047607, -0.891986608505249, -0.32183754444122314, -0.7917430996894836, 1.0729632377624512, 2.606825113296509, 1.1996827125549316, -1.4074900150299072, 2.7712292671203613, 0.6034242510795593, -0.2677999436855316, -1.0736645460128784, 0.5448961853981018, -0.03247222304344177, -1.207817554473877, -0.48730918765068054, -1.020959734916687, -0.03850004822015762, -0.5515936017036438, -0.5351710915565491, 0.06409332156181335, 0.40557006001472473, -0.194159597158432, -0.2989882528781891, -0.5051950812339783, -0.8428048491477966, 0.5093472003936768, -0.34981244802474976, 0.9097279906272888, -0.32790693640708923, 1.7837320566177368, -0.5442150235176086, 0.43423134088516235, 0.6145120859146118, 1.5682988166809082, 0.18125797808170319, -0.11525194346904755, 0.3791264295578003, 0.33453232049942017, 0.027950648218393326, 0.45527446269989014, 1.1525896787643433, 0.5864157676696777, 0.48309096693992615, 0.671841025352478, -2.240283250808716, 1.3770147562026978, -1.0739456415176392, 0.20278476178646088, 1.2368229627609253, -1.0998284816741943, 0.20905007421970367, -1.804571509361267, -0.1438463181257248, 0.46764692664146423, -2.2754225730895996, 0.2676072120666504, -1.252413034439087, -0.4738132655620575, 1.0382336378097534, 0.3537289500236511, -1.318110704421997, 0.0735781341791153, -0.4152977764606476, 0.9906136989593506, 0.41728538274765015, 1.0160295963287354, -1.7937219142913818, 0.023574847728013992, -0.4156053066253662, 0.0487445592880249, -1.3395273685455322, -1.5621473789215088, 0.5370972752571106, 0.6169821619987488, 0.5604833364486694, -0.07494793832302094, 0.9693235754966736, -0.9929538369178772, 0.8105403184890747, -0.9227850437164307, -1.613572597503662, -1.435567855834961, -2.2768688201904297, -2.230032205581665, 0.6769728064537048, -0.505849301815033, -0.5599085092544556, 2.0193097591400146, -1.0822399854660034, -1.6865564584732056, 1.1375993490219116, 0.19735905528068542, -0.06353256106376648, 2.3031816482543945, 0.2629390358924866, -0.6795883178710938, 0.4216875731945038, -0.8149794340133667, 0.8139957189559937, -0.3692171275615692, 1.4360285997390747, 0.49286121129989624, -1.0045639276504517, 1.6250320672988892, -0.37684687972068787, 0.4564044177532196, -0.6730971932411194, -0.5527309775352478, -0.8751514554023743, 0.44606152176856995, 2.027352809906006, -0.33401063084602356, 1.5774509906768799, -0.34507882595062256, -1.5135993957519531, -1.4895681142807007, 0.931260347366333, 0.5754643082618713, -0.7116919755935669, 0.17643766105175018, -0.5155267715454102, 0.148169606924057, 0.03825538977980614, 1.0883283615112305, 1.3039538860321045, 0.6201403141021729, -0.28641536831855774, -0.9401615858078003, 0.26407942175865173, -0.060428865253925323, -0.5816066861152649, -1.8306854963302612, -0.38708925247192383, 0.10013940930366516, 0.7278488278388977, -1.162460446357727, 1.7619765996932983, 0.8805633187294006, 1.8592398166656494, 1.0540003776550293, -0.18436840176582336, 1.4473456144332886, -0.012874314561486244, 1.8872164487838745, -0.514575183391571, 0.7249016165733337, -0.36907869577407837, -1.1246569156646729, 0.8146107792854309, -0.4332578778266907, -2.0335724353790283, -0.760071337223053, -0.8713866472244263, -0.18988724052906036, -0.837175190448761, 1.0464097261428833, -0.3963053226470947, -1.4290177822113037, 0.23920157551765442, -0.703290581703186, 0.15097421407699585, -1.277039885520935, 0.3587486743927002, 0.6892772316932678, -0.6603229641914368, 0.041151322424411774, -0.3253764510154724, -1.2604966163635254, -0.46932893991470337, 0.21058224141597748, 2.049989938735962, -0.7144666314125061, 0.9718892574310303, 0.9849750399589539, -0.6923630833625793, 0.00921301543712616, 0.3696886897087097, -0.3652905225753784, 0.9152600765228271, -1.088468313217163, -0.3161015510559082, 1.2520966529846191, -0.16878631711006165, -0.5922217965126038, 1.464518666267395, 0.8166271448135376, -1.003379464149475, -0.20842032134532928, -0.21512730419635773, -0.8180591464042664, 0.12464694678783417, -1.6322247982025146, -0.2046331912279129, 0.403023898601532, -1.4853107929229736, -0.5284374356269836, -0.1350301206111908, 1.3363888263702393, -0.13627319037914276, 1.4110300540924072, -0.29352444410324097, -0.21594052016735077, -0.32770025730133057, -0.40388771891593933, 0.12631747126579285, -0.06934209167957306, -0.5813644528388977, 0.3260933756828308, -0.8118255734443665, 0.3522112965583801, 1.4651334285736084, 0.38768118619918823, 0.10036252439022064, 0.5662575960159302, 1.0453628301620483, 0.34629613161087036, -0.0702122151851654, -0.8773064017295837, -1.6723438501358032, 2.068821430206299, -1.4655414819717407, 1.9834833145141602, 0.8437076210975647, -0.015874702483415604, -1.6663999557495117, -1.7364345788955688, 1.3615283966064453, 1.165461778640747, 2.3036656379699707, 0.5741848945617676, 0.37982773780822754, -0.7893620133399963, -0.6031043529510498, 0.3816068470478058, -1.0832418203353882, -0.800966739654541, 0.15633761882781982, 2.438537120819092, 1.695612907409668, -0.461394339799881, -0.2039579451084137, -1.0065828561782837, 1.1720432043075562, -0.14641313254833221, 0.2673393785953522, 1.863912582397461, -0.2733744978904724, -1.1977612972259521, 1.1234983205795288, -2.328373908996582, 0.13384276628494263, 2.076509475708008, 0.3394232988357544, 0.09086155891418457, -1.3654025793075562, -0.59987473487854, -0.1762164831161499, -0.43144410848617554, -1.2293912172317505, 0.6267791390419006, -0.23188439011573792, -0.8670597076416016, -1.3434587717056274, 0.15015064179897308, -1.1794120073318481, -1.694102168083191, 0.36013486981391907, 1.8717485666275024, 2.0943267345428467, -0.7836575508117676, 1.5982286930084229, -0.2603833079338074, 0.34601709246635437, 1.2145154476165771, 1.2597894668579102, 3.0813701152801514, 1.8514447212219238, -1.2691794633865356, 0.7536887526512146, -0.1415041834115982, -0.5570858716964722, 1.2883319854736328, -1.145620346069336, 1.2371574640274048, -0.11185543239116669, -1.1859732866287231, -1.2613201141357422, 0.8883569836616516, 0.4679180383682251, -0.06817177683115005, -0.45363229513168335, 1.1561135053634644, 0.11330646276473999, 1.2171106338500977, 0.5301366448402405, -0.27440232038497925, 0.580417275428772, -0.46357759833335876, -0.5277906060218811, 1.5840524435043335, 0.22982968389987946, -1.4287302494049072, -2.3294358253479004, -0.13088157773017883, -0.7731937766075134, 0.0038392385467886925, -0.6437805891036987, -1.036588191986084, 1.5907611846923828, 0.33376845717430115, -1.1497633457183838, -0.26655280590057373, -0.3810630142688751, -0.6231582760810852, 2.5372602939605713, -1.33596670627594, -0.27032211422920227, -0.9771161675453186, -0.6563308835029602, 1.5706887245178223, -1.266281247138977, -0.19684316217899323, -0.9587885141372681, -0.5846754312515259, -1.2814933061599731, -0.46715247631073, -0.05464375019073486, -0.8900496363639832, 0.6267627477645874, 0.17684932053089142, -1.1677932739257812, -0.3395259380340576, -0.8439136743545532, 0.9040453433990479, -0.1293136179447174, 0.2405375838279724, 1.8014777898788452, 0.413840651512146, -0.42965853214263916, 0.792950451374054, 1.2148269414901733, 0.5302019715309143, -0.6216607093811035, 0.22713404893875122, -0.6871223449707031, 0.20569691061973572, -1.3541381359100342, 0.36706027388572693, -2.8585779666900635, 0.6387086510658264, -0.02630835399031639, -0.16365347802639008, -0.05447399988770485, -1.342580795288086, 1.1950092315673828, 2.5901002883911133, -1.206470251083374, 0.5423398613929749, 0.3224218785762787, 1.1544877290725708, -1.5496255159378052, 0.3148476779460907, -0.4306364059448242, 2.162761688232422, 0.280346542596817, 1.266094446182251, -0.5387812256813049, -2.1939916610717773, 0.6220986843109131, -1.2303595542907715, -1.1225919723510742, 0.670557975769043, -0.8421173691749573, 0.10656493902206421, -1.3336971998214722, -0.2008909434080124, -0.9576180577278137, -1.1811524629592896, 0.7648043036460876, 0.07716932892799377, 0.39542022347450256, -0.5955819487571716, 0.35093942284584045, -2.1528518199920654, -1.3394371271133423, -0.11986374855041504, -1.0113805532455444, 0.4259922206401825, -0.34536802768707275, 0.6516307592391968, -0.1604088991880417, 0.1004745215177536, 0.4046792685985565, 1.485884666442871, 3.4854896068573, 0.1689603626728058, 0.38571128249168396, -0.17039582133293152, -0.8457291126251221, 1.5363757610321045, 0.938461422920227, -0.13579052686691284, -0.5785048007965088, -1.0693068504333496, 1.387312889099121, 1.9102364778518677, 1.0084335803985596, 0.09109681844711304, -0.8530818223953247, -0.7284688949584961, -0.03637033700942993, 0.13990803062915802, 0.44974836707115173, 0.9592638611793518, 0.09747329354286194, 0.019904324784874916, 1.3308162689208984, 1.2003077268600464, -0.5301461219787598, 0.40440478920936584, -0.9098995923995972, -0.2844373881816864, 0.38483455777168274, 0.25058838725090027, -0.005730440374463797, 0.3962969183921814, -0.9031280875205994, -0.30428555607795715, -0.2723843455314636, -0.9708678722381592, -0.7469825744628906, -0.5081233382225037, -0.36379683017730713, 1.7156825065612793, 0.0378861278295517, -0.514107346534729, -0.11088728904724121, -0.8270023465156555, -0.12454740703105927, -1.0971002578735352, 0.1333594173192978, -0.048623159527778625, -0.15417589247226715, -0.15730705857276917, 1.7534986734390259, -0.9565196633338928, -2.2377471923828125, 0.3126014173030853, 0.20570684969425201, -0.3817000091075897, 0.1744832843542099, 1.6520768404006958, 0.5202456116676331, 1.3994863033294678, 1.298782229423523, 0.9990648627281189, -0.6116559505462646, -1.2301820516586304, 0.7220834493637085, 0.8494291305541992, -1.4352173805236816, 0.8956183195114136, -0.017800934612751007, -0.4683574438095093, 0.6750843524932861, 1.1998120546340942, 0.530921995639801, -1.911263108253479, 0.7950342893600464, -0.8490808606147766, 0.8182392120361328, 0.6758601665496826, 0.7703146934509277, 0.26450324058532715, 0.911322832107544, -1.1954880952835083, -1.160425066947937, -0.7375528216362, -0.7271929383277893, 2.048952579498291, -0.21988530457019806, 0.5380558371543884, -0.19597503542900085, -1.2299245595932007, -0.1166134774684906, 0.7200794816017151, 0.2352990061044693, -0.4536202847957611, 0.8154023289680481, -0.6739333868026733, -1.1014610528945923, -1.4494622945785522, -0.5256245732307434, -1.013230562210083, -1.0325721502304077, 1.0016614198684692, 0.6797463297843933, 0.3777332305908203, 1.9422662258148193, 0.6437297463417053, 0.25531309843063354, -2.4907679557800293, 0.9028384685516357, 0.35510560870170593, 0.0005280189216136932, 0.9111289978027344, 0.26120635867118835, 1.1292473077774048, -0.04428296908736229, 0.5745135545730591, -2.318751573562622, 2.2580320835113525, -0.29006415605545044, 0.6896533966064453, -0.009218605235219002, -0.19067874550819397, 1.1748119592666626, 0.5310069918632507, 0.5994256734848022, -1.1753445863723755, 0.6818936467170715, -0.6883590817451477, 1.1979901790618896, 0.9379709362983704, -0.9128097891807556, 0.0017529912292957306, 1.367542028427124, 0.40212565660476685, -0.5320844650268555, -0.9254679083824158, -0.8840864300727844, 0.9927625060081482, 1.6238347291946411, -0.051160167902708054, 0.018687870353460312, 0.7417086958885193, 0.6518093943595886, -1.239882469177246, 0.028251420706510544, -0.7419970035552979, -0.8257613182067871, 1.7670526504516602, 2.081573009490967, -0.13404685258865356, -0.2711847126483917, -0.6970417499542236, -1.2179192304611206, 0.8688777685165405, -0.053753241896629333, 0.10638615489006042, 0.6609787344932556, -0.6036754250526428, 1.1209659576416016, 0.9024356007575989, 0.9948320984840393, 0.13929027318954468, 0.19943057000637054, 0.40543970465660095, -0.28376147150993347, -1.0490602254867554, -0.3222532272338867, -1.2244232892990112, -2.6594512462615967, 0.46877095103263855, -0.3359384536743164, -1.356279730796814, 0.07516270875930786, -0.9672271013259888, 0.9084358811378479, -0.6173893213272095, -1.012351632118225, -1.4522746801376343, 0.13785849511623383, -0.19735559821128845, 0.877627968788147, -1.7422033548355103, -0.07858295738697052, 1.2785791158676147, 0.9467175006866455, -0.6131415963172913, 1.0668224096298218, 0.2185414582490921, 1.045918345451355, 0.846282958984375, -0.398720920085907, 0.5187410712242126, 0.08503603935241699, -1.299193024635315, 0.5387190580368042, 1.2189480066299438, 0.16695177555084229, 1.5522361993789673, -0.3668394088745117, 0.020763445645570755, 0.4441903531551361, -0.5736194849014282, -0.4846535325050354, -0.5949205756187439, 0.7263687252998352, 0.05202958360314369, -0.8867127299308777, -0.014340424910187721, -0.099149689078331, -0.13117705285549164, 0.13637322187423706, -1.5822595357894897, -0.18077678978443146, -0.29547953605651855, -0.5894181728363037, -1.3213852643966675, -0.16874492168426514, 1.3411403894424438, -0.8009071350097656, -0.16436302661895752, 0.4330187737941742, 0.4839368164539337, 0.48823443055152893, 0.6573514342308044, -0.7080749869346619, -0.4080393612384796, -0.29316383600234985, -0.3479502499103546, 0.38259997963905334, 1.1791841983795166, -0.07106685638427734, -0.9395123720169067, 0.6697047352790833, -0.2235148549079895, 0.13533800840377808, 1.840730905532837, -0.01624887064099312, -0.7917518615722656, 0.27785050868988037, -0.6603944897651672, 1.9789623022079468, 1.5825154781341553, 1.2788441181182861, -0.1363830268383026, -0.8625582456588745, 0.6463918685913086, -0.2508687674999237, -0.3927341103553772, 0.8532620072364807, 0.4454787075519562, -0.166471928358078, -1.4159588813781738, 0.6212159991264343, 1.2658724784851074, -0.8380312919616699, -0.7982537746429443, -0.029972853139042854, -0.7728219032287598, 1.097853183746338, 0.5929466485977173, 0.31723928451538086, 0.287240594625473, 1.6555864810943604, 0.6598560214042664, -0.4939868152141571, 0.5244925618171692, 0.4682433307170868, -0.1348847597837448, -2.1907544136047363, -1.1383719444274902, 0.3433021306991577, -0.4517578184604645, -1.5116153955459595, 1.3117737770080566, -1.1069014072418213, -0.9731355905532837, 0.629681408405304, 0.17455603182315826, 1.4958964586257935, 0.32018008828163147, 1.6812307834625244, 2.0483009815216064, 0.766621470451355, 0.38028690218925476, 1.260053038597107, -0.0840851217508316, -0.4052605628967285, 1.757251501083374, -0.44289055466651917, 0.5185530185699463, 1.0555895566940308, -0.3134230375289917, -1.1028468608856201, -0.9284427762031555, -1.2991503477096558, -0.7431286573410034, 1.103833556175232, 0.04041312262415886, -1.2047295570373535, 0.18338412046432495, 1.6471961736679077, 0.14407296478748322, -0.21251888573169708, 0.5864238142967224, 0.41837653517723083, -0.7009545564651489, -0.028461627662181854, -0.9252803325653076, 0.5222446918487549, -0.2282995879650116, -0.41257190704345703, 0.2835766077041626, 0.5146290063858032, 1.2188973426818848, -0.07027413696050644, 0.10826356709003448, 1.2306209802627563, -1.4413748979568481, 1.4454647302627563, -0.5594910383224487, 0.3015211224555969, -2.3369245529174805, 1.4466722011566162, -0.8162128329277039, 1.9177615642547607, -2.748181104660034, 0.4486728310585022, -0.5746349096298218, -0.5648466348648071, 0.3304390609264374, -0.3607654869556427, 0.1537877917289734, -0.194777250289917, -0.9518954157829285, -0.1379678100347519, -0.6307235956192017, 0.5586631894111633, 1.1841894388198853, 1.2040255069732666, -1.0077786445617676, -0.16475209593772888, -1.816461443901062, -0.0961260199546814, -0.5143030881881714, 0.21601766347885132, -2.062920570373535, -0.1563953161239624, -2.008078098297119, -2.294686794281006, -1.3254761695861816, -0.7884249687194824, 1.119267463684082, 0.16855011880397797, -0.804509699344635, 1.140763282775879, -0.3549799919128418, -1.7356520891189575, 1.0081088542938232, -2.165069818496704 ]
https://github.com/huggingface/datasets/issues/4502
Logic bug in arrow_writer?
> Hi @alvarobartt , Thanks for answering. Do you know when and why an empty batch is passed to this function? This only happened to me when processing with multiple workers, while chunking examples, I think. So it depends on how you're actually chunking the data as if you're not handling empty chunks `batch_examples={}` or `batch_examples=None`, you may end up running into this issue. So you could check the chunks before you actually call `ArrowWriter.write_batch`, but anyway the fix you proposed I think improves the logic of `write_batch` to avoid running into these issues.
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488 I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows: ``` - if batch_examples and len(next(iter(batch_examples.values()))) == 0: + if not batch_examples or len(next(iter(batch_examples.values()))) == 0: return ``` @lhoestq
711
94
Logic bug in arrow_writer? https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488 I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows: ``` - if batch_examples and len(next(iter(batch_examples.values()))) == 0: + if not batch_examples or len(next(iter(batch_examples.values()))) == 0: return ``` @lhoestq > Hi @alvarobartt , Thanks for answering. Do you know when and why an empty batch is passed to this function? This only happened to me when processing with multiple workers, while chunking examples, I think. So it depends on how you're actually chunking the data as if you're not handling empty chunks `batch_examples={}` or `batch_examples=None`, you may end up running into this issue. So you could check the chunks before you actually call `ArrowWriter.write_batch`, but anyway the fix you proposed I think improves the logic of `write_batch` to avoid running into these issues.
[ -1.2619308233261108, -0.8826978802680969, -0.7379077076911926, 1.53938627243042, -0.08468739688396454, -1.2701174020767212, 0.18120893836021423, -1.0603195428848267, 1.6442363262176514, -0.8252147436141968, 0.4088292717933655, -1.634225606918335, 0.06367906928062439, -0.6276199221611023, -0.8191531300544739, -0.8870611190795898, -0.3796738386154175, -0.7862348556518555, 1.0239862203598022, 2.528303623199463, 1.1918801069259644, -1.422892689704895, 2.7367823123931885, 0.5812557339668274, -0.17780853807926178, -1.0617191791534424, 0.5081340074539185, -0.0738459974527359, -1.1932885646820068, -0.48746582865715027, -0.9729994535446167, -0.038911137729883194, -0.593451201915741, -0.5613459944725037, 0.02337833121418953, 0.4084897041320801, -0.2561444342136383, -0.38020628690719604, -0.4443598985671997, -0.8414279818534851, 0.5128704309463501, -0.390783429145813, 0.8741781711578369, -0.31184595823287964, 1.7864803075790405, -0.5492589473724365, 0.46447765827178955, 0.7210981249809265, 1.4817579984664917, 0.26238933205604553, -0.06944623589515686, 0.3788481056690216, 0.35710635781288147, 0.018140748143196106, 0.49613431096076965, 1.185135841369629, 0.621795117855072, 0.49156031012535095, 0.6946794986724854, -2.2688708305358887, 1.3102068901062012, -1.1010253429412842, 0.19670002162456512, 1.2562068700790405, -1.0361106395721436, 0.23369011282920837, -1.826686143875122, -0.07186843454837799, 0.5124194622039795, -2.3052310943603516, 0.3036888837814331, -1.2655994892120361, -0.43181413412094116, 1.05954909324646, 0.353009432554245, -1.296709656715393, 0.10327097028493881, -0.36533573269844055, 1.0240085124969482, 0.446370393037796, 0.9960029721260071, -1.7749351263046265, -0.046817999333143234, -0.3655708432197571, 0.10189470648765564, -1.3110407590866089, -1.5951509475708008, 0.48730963468551636, 0.6163291931152344, 0.5090535283088684, -0.1016659066081047, 1.0287370681762695, -0.9925809502601624, 0.8022938966751099, -0.9790189266204834, -1.6249659061431885, -1.4742519855499268, -2.194880962371826, -2.2510197162628174, 0.6828016042709351, -0.5245031714439392, -0.5257079005241394, 2.0262575149536133, -1.0481103658676147, -1.6908669471740723, 1.197930932044983, 0.2529680132865906, -0.05363371968269348, 2.2884092330932617, 0.24353662133216858, -0.7387502789497375, 0.4544028043746948, -0.8047342896461487, 0.7483322024345398, -0.3719523251056671, 1.3876358270645142, 0.4690546691417694, -0.9766508340835571, 1.663206696510315, -0.40028005838394165, 0.44541817903518677, -0.7111708521842957, -0.522297203540802, -0.8582680821418762, 0.43462878465652466, 2.014692783355713, -0.34941810369491577, 1.5804200172424316, -0.355814665555954, -1.5136258602142334, -1.5542947053909302, 0.9399771690368652, 0.5002007484436035, -0.7439900636672974, 0.15311434864997864, -0.4426129460334778, 0.2098814696073532, -0.04984006658196449, 1.080166220664978, 1.3184982538223267, 0.6359501481056213, -0.3402157425880432, -0.9049175977706909, 0.29512667655944824, -0.08710625767707825, -0.6073625087738037, -1.7967147827148438, -0.4030979871749878, 0.1323729306459427, 0.6678318977355957, -1.1637585163116455, 1.7781180143356323, 0.855222225189209, 1.8613576889038086, 1.0539426803588867, -0.26351481676101685, 1.4492332935333252, 0.05672137811779976, 1.9417659044265747, -0.4863896667957306, 0.7100178003311157, -0.35693272948265076, -1.1105469465255737, 0.8340411186218262, -0.3708685636520386, -2.0244383811950684, -0.7200925946235657, -0.8700281381607056, -0.1930771768093109, -0.804970920085907, 1.0176072120666504, -0.3392261266708374, -1.4381438493728638, 0.27097901701927185, -0.6838663220405579, 0.15923073887825012, -1.2941598892211914, 0.39085695147514343, 0.7236447334289551, -0.6847999095916748, 0.0934191420674324, -0.27458932995796204, -1.2741891145706177, -0.43718862533569336, 0.2520018219947815, 2.0280332565307617, -0.7041716575622559, 0.9219876527786255, 0.9852800369262695, -0.7094112038612366, -0.029444359242916107, 0.3904384970664978, -0.34861430525779724, 0.8801089525222778, -1.0776031017303467, -0.345962256193161, 1.2849353551864624, -0.20501786470413208, -0.6202072501182556, 1.4285753965377808, 0.8085691332817078, -0.9919794201850891, -0.1882823407649994, -0.22396430373191833, -0.833256721496582, 0.12401241809129715, -1.5961735248565674, -0.1510225385427475, 0.4593866765499115, -1.5384615659713745, -0.5071849226951599, -0.1153649315237999, 1.3509621620178223, -0.2013518065214157, 1.4513530731201172, -0.32169777154922485, -0.12433408945798874, -0.3188416361808777, -0.35548684000968933, 0.1451401710510254, -0.10123113542795181, -0.622788667678833, 0.24845701456069946, -0.7964798808097839, 0.3485983610153198, 1.420271635055542, 0.3713366687297821, 0.06736285239458084, 0.5284454226493835, 1.106506109237671, 0.3187567889690399, -0.02431487664580345, -0.8857684135437012, -1.5951963663101196, 2.0811259746551514, -1.4282358884811401, 2.047574758529663, 0.7932524085044861, -0.060565829277038574, -1.6898688077926636, -1.7353515625, 1.3884299993515015, 1.0886441469192505, 2.3409206867218018, 0.5627385973930359, 0.42518386244773865, -0.8161454796791077, -0.6128113865852356, 0.3603123426437378, -1.0748629570007324, -0.8210285902023315, 0.18126779794692993, 2.4344537258148193, 1.6980416774749756, -0.4204569458961487, -0.19349342584609985, -0.9970619678497314, 1.254396677017212, -0.18026643991470337, 0.2892616093158722, 1.8492380380630493, -0.21501938998699188, -1.1644123792648315, 1.1505463123321533, -2.3620688915252686, 0.12831714749336243, 2.0636708736419678, 0.29522013664245605, 0.09883926808834076, -1.3303817510604858, -0.5848308801651001, -0.17876479029655457, -0.41799360513687134, -1.2131458520889282, 0.5783509016036987, -0.23338940739631653, -0.8752037882804871, -1.335107445716858, 0.14987653493881226, -1.1286842823028564, -1.6660693883895874, 0.3154374361038208, 1.9054068326950073, 2.04358172416687, -0.7796100378036499, 1.6472582817077637, -0.2607553005218506, 0.32289057970046997, 1.2231961488723755, 1.2556073665618896, 3.0999996662139893, 1.85439932346344, -1.2830119132995605, 0.6473254561424255, -0.16300591826438904, -0.5784420967102051, 1.2717658281326294, -1.1753251552581787, 1.2522237300872803, -0.12023039907217026, -1.1840972900390625, -1.2471064329147339, 0.9101234674453735, 0.5105724334716797, -0.03676339611411095, -0.496472030878067, 1.1894840002059937, 0.09812583029270172, 1.271233081817627, 0.5455505847930908, -0.29022517800331116, 0.6275820136070251, -0.46719232201576233, -0.5697848200798035, 1.5987368822097778, 0.19535097479820251, -1.3836541175842285, -2.321744441986084, -0.12381680309772491, -0.8437157869338989, 0.027016904205083847, -0.5879604816436768, -1.0232285261154175, 1.5819854736328125, 0.3433896005153656, -1.2067221403121948, -0.3165720999240875, -0.3751662075519562, -0.625227153301239, 2.61710262298584, -1.3254871368408203, -0.27154070138931274, -0.9907702803611755, -0.6426545977592468, 1.5945230722427368, -1.2567718029022217, -0.20580649375915527, -0.9786476492881775, -0.6014584898948669, -1.2926594018936157, -0.520393431186676, -0.062129031866788864, -0.84638911485672, 0.6873278021812439, 0.2618483603000641, -1.1894285678863525, -0.37029939889907837, -0.8684757947921753, 0.8319818377494812, -0.18103165924549103, 0.24602103233337402, 1.8003367185592651, 0.37960362434387207, -0.41059809923171997, 0.7697648406028748, 1.1717191934585571, 0.5617998838424683, -0.5882184505462646, 0.2700992822647095, -0.6528178453445435, 0.2345476895570755, -1.367429256439209, 0.29493993520736694, -2.867799758911133, 0.6339524984359741, -0.03960530832409859, -0.12240379303693771, -0.08879683166742325, -1.330736517906189, 1.1700972318649292, 2.6105575561523438, -1.1944173574447632, 0.5435131788253784, 0.3829216957092285, 1.2383968830108643, -1.578660488128662, 0.29734769463539124, -0.4376644790172577, 2.1883957386016846, 0.25659990310668945, 1.2657251358032227, -0.4834010601043701, -2.2364206314086914, 0.5803008079528809, -1.2098296880722046, -1.2203561067581177, 0.7591022849082947, -0.9180351495742798, 0.10366792231798172, -1.370401382446289, -0.267034113407135, -0.9427490234375, -1.2032374143600464, 0.776412844657898, 0.06683769077062607, 0.4137355089187622, -0.6184169054031372, 0.3538684546947479, -2.1401453018188477, -1.3500499725341797, -0.1613524854183197, -1.0056692361831665, 0.3816164433956146, -0.3056814968585968, 0.7031532526016235, -0.18911664187908173, 0.02836807817220688, 0.4397681653499603, 1.5052186250686646, 3.4041531085968018, 0.25549641251564026, 0.394178181886673, -0.2005198448896408, -0.8427462577819824, 1.503989577293396, 0.920788586139679, -0.15333877503871918, -0.5274835228919983, -1.0666685104370117, 1.3537356853485107, 1.908956527709961, 0.9863836765289307, 0.07612153887748718, -0.8184354305267334, -0.7266620993614197, -0.025471176952123642, 0.07245948165655136, 0.4418151080608368, 0.9194563627243042, 0.12891456484794617, 0.05031401664018631, 1.2787785530090332, 1.1913660764694214, -0.4858200252056122, 0.43821534514427185, -0.8858357071876526, -0.3318121135234833, 0.43404000997543335, 0.2700051963329315, 0.017715945839881897, 0.3830677270889282, -0.9540289640426636, -0.26933553814888, -0.3166554570198059, -0.9054925441741943, -0.7272115349769592, -0.5260259509086609, -0.31134501099586487, 1.7134225368499756, 0.05100744590163231, -0.48920607566833496, -0.06264811009168625, -0.8590977787971497, -0.08924421668052673, -1.0841559171676636, 0.16194240748882294, -0.07462109625339508, -0.16729134321212769, -0.13871045410633087, 1.7497084140777588, -0.9046644568443298, -2.1582155227661133, 0.29121923446655273, 0.21590417623519897, -0.3815152645111084, 0.17206113040447235, 1.675808072090149, 0.467386931180954, 1.398046612739563, 1.3484126329421997, 0.99076908826828, -0.622139573097229, -1.1806954145431519, 0.761225700378418, 0.8740699887275696, -1.4156596660614014, 0.8921614289283752, 0.003359321504831314, -0.4687363803386688, 0.6198627948760986, 1.18070650100708, 0.46045148372650146, -1.937614917755127, 0.7915504574775696, -0.8599898815155029, 0.8212111592292786, 0.6985328793525696, 0.7302237153053284, 0.24278464913368225, 0.9172267317771912, -1.1901137828826904, -1.1812059879302979, -0.712269127368927, -0.7210050821304321, 2.0272531509399414, -0.2075328826904297, 0.5447285175323486, -0.1395368129014969, -1.2756882905960083, -0.11452195048332214, 0.7390425801277161, 0.30336233973503113, -0.46258121728897095, 0.8074781894683838, -0.6751235723495483, -1.0801485776901245, -1.4313524961471558, -0.523265540599823, -1.0635004043579102, -0.9935412406921387, 0.9898702502250671, 0.7100865244865417, 0.34528347849845886, 1.8919222354888916, 0.7093899846076965, 0.23873594403266907, -2.542656183242798, 0.935495138168335, 0.3410591185092926, -0.0702788233757019, 0.8869654536247253, 0.3029523193836212, 1.042382001876831, -0.029721111059188843, 0.5485191345214844, -2.425344705581665, 2.269444227218628, -0.3202430009841919, 0.714992105960846, -0.043036773800849915, -0.22566623985767365, 1.0886898040771484, 0.527590274810791, 0.5617544651031494, -1.151691198348999, 0.6950960755348206, -0.6787908673286438, 1.2351034879684448, 0.9736000299453735, -0.9402454495429993, -0.0005202535539865494, 1.3707317113876343, 0.3712399899959564, -0.5488899946212769, -0.9300971031188965, -0.9112633466720581, 0.9706827998161316, 1.6610171794891357, -0.019463911652565002, -0.03389037027955055, 0.8274375200271606, 0.7026122212409973, -1.218948245048523, 0.09776917845010757, -0.771430253982544, -0.9062634110450745, 1.7463102340698242, 2.0620317459106445, -0.14029204845428467, -0.26072171330451965, -0.730688214302063, -1.239369511604309, 0.8424252271652222, -0.0412895567715168, 0.1254694163799286, 0.644009530544281, -0.6365494728088379, 1.0770046710968018, 0.8786588311195374, 0.9302716851234436, 0.1677040159702301, 0.19066104292869568, 0.3811855614185333, -0.3383685052394867, -1.0763921737670898, -0.2662457227706909, -1.1958887577056885, -2.6510138511657715, 0.4804990887641907, -0.24670229852199554, -1.367705225944519, 0.10696133226156235, -0.9162982106208801, 0.9015520811080933, -0.5999885201454163, -1.0655510425567627, -1.4550249576568604, 0.1723436713218689, -0.14936275780200958, 0.8986533880233765, -1.6712849140167236, -0.04366772621870041, 1.2277079820632935, 0.9252241253852844, -0.6246935129165649, 1.0183753967285156, 0.23909299075603485, 1.0953209400177002, 0.8592475056648254, -0.4517965614795685, 0.5004040598869324, 0.045477092266082764, -1.331933617591858, 0.5199312567710876, 1.1921104192733765, 0.15322718024253845, 1.5999016761779785, -0.3979083299636841, -0.04154607281088829, 0.3901878297328949, -0.5964546203613281, -0.47290730476379395, -0.6299936175346375, 0.727813184261322, 0.04122346639633179, -0.8927662372589111, 0.00443898793309927, -0.09588630497455597, -0.08020495623350143, 0.13980130851268768, -1.5721018314361572, -0.12242653965950012, -0.2862440347671509, -0.6184000372886658, -1.2427090406417847, -0.1831735521554947, 1.3587027788162231, -0.7738354206085205, -0.18450334668159485, 0.45949670672416687, 0.410414457321167, 0.5025069713592529, 0.6044139862060547, -0.6505212783813477, -0.41934266686439514, -0.28548309206962585, -0.3567153811454773, 0.3809039890766144, 1.2027130126953125, -0.0911468118429184, -0.8977487087249756, 0.672835648059845, -0.2619914710521698, 0.058899398893117905, 1.8263517618179321, 0.04899267479777336, -0.7904678583145142, 0.29609060287475586, -0.6440951228141785, 1.945643424987793, 1.6557623147964478, 1.3020126819610596, -0.14419865608215332, -0.9533444046974182, 0.6277370452880859, -0.3701663315296173, -0.4435202479362488, 0.8442612886428833, 0.42951780557632446, -0.15620312094688416, -1.4403702020645142, 0.6449522376060486, 1.2268940210342407, -0.8421915769577026, -0.8318419456481934, 0.00648909155279398, -0.7269701361656189, 1.1267073154449463, 0.6346001625061035, 0.344554603099823, 0.2522408366203308, 1.6474616527557373, 0.7324167490005493, -0.45757269859313965, 0.5432535409927368, 0.5035843849182129, -0.1670197993516922, -2.1980996131896973, -1.2249833345413208, 0.3319458067417145, -0.44509637355804443, -1.5109666585922241, 1.3700186014175415, -1.099341630935669, -0.9814570546150208, 0.5828078389167786, 0.13893459737300873, 1.4646680355072021, 0.3303574025630951, 1.6504480838775635, 2.0594780445098877, 0.772333562374115, 0.34793782234191895, 1.2409640550613403, -0.10117069631814957, -0.4520801305770874, 1.7895265817642212, -0.48265084624290466, 0.49538275599479675, 1.051133394241333, -0.3178466856479645, -1.0973973274230957, -0.8933778405189514, -1.3387303352355957, -0.719633936882019, 1.1128262281417847, -0.025632794946432114, -1.1578022241592407, 0.22376824915409088, 1.679668664932251, 0.09264592826366425, -0.2723191976547241, 0.6648344397544861, 0.4204994738101959, -0.6641992926597595, 0.002207438461482525, -0.8813852667808533, 0.5530258417129517, -0.23671779036521912, -0.4017656445503235, 0.3278407156467438, 0.4813050627708435, 1.2692214250564575, -0.06646722555160522, 0.0754149779677391, 1.2150352001190186, -1.4492145776748657, 1.430816411972046, -0.6165946125984192, 0.3184634745121002, -2.3326292037963867, 1.3949635028839111, -0.8157699108123779, 1.8693199157714844, -2.690540075302124, 0.4833804666996002, -0.5880184769630432, -0.5377727150917053, 0.3763132393360138, -0.3997359573841095, 0.1480732411146164, -0.19201652705669403, -1.075147271156311, -0.145879328250885, -0.6437876224517822, 0.5687517523765564, 1.1207940578460693, 1.2867531776428223, -1.0312026739120483, -0.19177940487861633, -1.7906399965286255, -0.059845685958862305, -0.5867530703544617, 0.2884367108345032, -2.018994092941284, -0.16292837262153625, -2.0358903408050537, -2.244107246398926, -1.303095817565918, -0.778418242931366, 1.1042046546936035, 0.1461644172668457, -0.8249515295028687, 1.160374641418457, -0.35182470083236694, -1.7569923400878906, 1.020682454109192, -2.1232306957244873 ]
https://github.com/huggingface/datasets/issues/4502
Logic bug in arrow_writer?
Thanks, I added a if-print and I found it does return an empty examples in the chunking function that is passed to `.map()`.
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488 I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows: ``` - if batch_examples and len(next(iter(batch_examples.values()))) == 0: + if not batch_examples or len(next(iter(batch_examples.values()))) == 0: return ``` @lhoestq
711
23
Logic bug in arrow_writer? https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488 I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows: ``` - if batch_examples and len(next(iter(batch_examples.values()))) == 0: + if not batch_examples or len(next(iter(batch_examples.values()))) == 0: return ``` @lhoestq Thanks, I added a if-print and I found it does return an empty examples in the chunking function that is passed to `.map()`.
[ -1.2652238607406616, -0.850648045539856, -0.765190064907074, 1.6063741445541382, -0.05150546506047249, -1.2553069591522217, 0.16969507932662964, -0.9892906546592712, 1.6834157705307007, -0.8581629991531372, 0.4384101629257202, -1.6442954540252686, 0.041343286633491516, -0.6277647614479065, -0.7898712158203125, -0.8594962358474731, -0.3439084589481354, -0.7715949416160583, 1.1066818237304688, 2.5711781978607178, 1.1899700164794922, -1.424859881401062, 2.763850212097168, 0.6100783348083496, -0.28388693928718567, -1.0478730201721191, 0.5217938423156738, -0.02266664057970047, -1.1879948377609253, -0.47263458371162415, -1.0475003719329834, -0.013442343100905418, -0.5592730641365051, -0.5637012720108032, 0.07273983955383301, 0.3983055651187897, -0.2204381823539734, -0.3849300444126129, -0.4675723910331726, -0.846603274345398, 0.4693448841571808, -0.3229164779186249, 0.8921979665756226, -0.336466521024704, 1.800543189048767, -0.5198715925216675, 0.4021119177341461, 0.603507399559021, 1.5521025657653809, 0.19918274879455566, -0.1301838457584381, 0.45383304357528687, 0.32050037384033203, 0.04481162503361702, 0.4769684672355652, 1.1992013454437256, 0.5342944264411926, 0.5039224624633789, 0.7050111889839172, -2.2628142833709717, 1.3783705234527588, -1.0640884637832642, 0.17283901572227478, 1.2028356790542603, -1.102844476699829, 0.17183977365493774, -1.80270516872406, -0.0947389006614685, 0.4783031642436981, -2.284848213195801, 0.27567237615585327, -1.2790695428848267, -0.48511138558387756, 1.038710594177246, 0.3721347451210022, -1.2855561971664429, 0.050981007516384125, -0.3626030385494232, 1.0138335227966309, 0.39344653487205505, 1.0591471195220947, -1.778862714767456, 0.012194976210594177, -0.4091641902923584, 0.06907732784748077, -1.3257639408111572, -1.553659200668335, 0.5450610518455505, 0.6405923366546631, 0.6087784171104431, -0.07441738247871399, 1.0023576021194458, -0.9817720651626587, 0.8102920055389404, -0.8909728527069092, -1.669151782989502, -1.4468494653701782, -2.2607102394104004, -2.223111867904663, 0.6798033714294434, -0.4893592298030853, -0.5515280961990356, 2.0292437076568604, -1.0846797227859497, -1.6946148872375488, 1.1162610054016113, 0.22714045643806458, -0.09013482183218002, 2.27813982963562, 0.26352566480636597, -0.7406004667282104, 0.4513392746448517, -0.8004697561264038, 0.8288423418998718, -0.31561779975891113, 1.4407633543014526, 0.508971631526947, -0.9868364930152893, 1.623127818107605, -0.33906370401382446, 0.45734837651252747, -0.638314962387085, -0.5155558586120605, -0.8626116514205933, 0.41181570291519165, 2.0794105529785156, -0.3241054117679596, 1.5818146467208862, -0.3211842477321625, -1.523000955581665, -1.4727404117584229, 0.9447846412658691, 0.5659773349761963, -0.6851504445075989, 0.1985359489917755, -0.5103286504745483, 0.16667136549949646, 0.06580359488725662, 1.1577478647232056, 1.3498514890670776, 0.6001091599464417, -0.2527484595775604, -0.9641017317771912, 0.27126362919807434, -0.048841409385204315, -0.6034418940544128, -1.8016629219055176, -0.42372065782546997, 0.11549989879131317, 0.6980430483818054, -1.131719946861267, 1.7761693000793457, 0.8750435709953308, 1.8555158376693726, 1.0602912902832031, -0.14559650421142578, 1.4846363067626953, -0.0012759026139974594, 1.9130117893218994, -0.45000186562538147, 0.7024815678596497, -0.3791479170322418, -1.1598957777023315, 0.7902350425720215, -0.46937450766563416, -2.0383963584899902, -0.7623692154884338, -0.9030378460884094, -0.16404300928115845, -0.820905327796936, 1.0504529476165771, -0.4005323350429535, -1.453891634941101, 0.2410430908203125, -0.7161951065063477, 0.16445237398147583, -1.3017067909240723, 0.3728833794593811, 0.702657163143158, -0.6807330846786499, 0.06906479597091675, -0.29388752579689026, -1.2737421989440918, -0.47157686948776245, 0.2220015525817871, 2.0474581718444824, -0.7098875641822815, 0.9991089105606079, 1.0165315866470337, -0.7310802936553955, 0.006256340071558952, 0.37831106781959534, -0.3608546853065491, 0.9317438006401062, -1.1053849458694458, -0.28999829292297363, 1.259929895401001, -0.1544184684753418, -0.5940325856208801, 1.4454563856124878, 0.8323826193809509, -0.9744394421577454, -0.17784589529037476, -0.21012988686561584, -0.7700449228286743, 0.1558735966682434, -1.5701661109924316, -0.20919987559318542, 0.42643433809280396, -1.4669902324676514, -0.5697876214981079, -0.16202178597450256, 1.3169960975646973, -0.1639900803565979, 1.3950203657150269, -0.258541077375412, -0.19533467292785645, -0.3211086094379425, -0.3926837742328644, 0.11628696322441101, -0.06525526195764542, -0.6264451742172241, 0.33911052346229553, -0.7516583800315857, 0.37504416704177856, 1.432877779006958, 0.3909233808517456, 0.08484158664941788, 0.585571825504303, 1.0672944784164429, 0.3381291329860687, -0.06372269988059998, -0.8795223832130432, -1.6719260215759277, 2.0829274654388428, -1.4299589395523071, 1.9737703800201416, 0.8101315498352051, -0.0132468082010746, -1.6885188817977905, -1.7604618072509766, 1.3955250978469849, 1.1743543148040771, 2.319981575012207, 0.6166967153549194, 0.3851611018180847, -0.7698432207107544, -0.6176837682723999, 0.41444385051727295, -1.0315682888031006, -0.8287962079048157, 0.16745662689208984, 2.425941228866577, 1.7143712043762207, -0.42443758249282837, -0.21366354823112488, -0.9879755973815918, 1.1888465881347656, -0.205786794424057, 0.23232576251029968, 1.8118654489517212, -0.26312217116355896, -1.2366011142730713, 1.1401574611663818, -2.2975711822509766, 0.11083439737558365, 2.1168603897094727, 0.3299679756164551, 0.08939700573682785, -1.4155925512313843, -0.6379290223121643, -0.1755332350730896, -0.44415023922920227, -1.1972994804382324, 0.5991732478141785, -0.24179598689079285, -0.859035849571228, -1.3475708961486816, 0.1916944980621338, -1.1640267372131348, -1.7173545360565186, 0.31929776072502136, 1.8894133567810059, 2.069855213165283, -0.774681806564331, 1.5527355670928955, -0.2566317319869995, 0.3770301938056946, 1.1958885192871094, 1.2731231451034546, 3.1236345767974854, 1.8231045007705688, -1.2741143703460693, 0.7110280990600586, -0.1299072802066803, -0.6004728674888611, 1.3465092182159424, -1.182842493057251, 1.2483158111572266, -0.09994571655988693, -1.169822335243225, -1.2797613143920898, 0.8433921933174133, 0.49742284417152405, -0.07204116880893707, -0.4947100281715393, 1.124799132347107, 0.07294239103794098, 1.2157944440841675, 0.5174407958984375, -0.27405619621276855, 0.563687801361084, -0.4447488486766815, -0.4602735638618469, 1.5775920152664185, 0.1796298623085022, -1.4234062433242798, -2.2997825145721436, -0.11125870048999786, -0.7705134153366089, 0.008382132276892662, -0.6635684370994568, -1.0254344940185547, 1.5749561786651611, 0.32195961475372314, -1.1119563579559326, -0.27780261635780334, -0.36586427688598633, -0.6319194436073303, 2.5326480865478516, -1.2960678339004517, -0.26879236102104187, -0.9696019887924194, -0.681739330291748, 1.588762879371643, -1.2043185234069824, -0.20096531510353088, -1.0081480741500854, -0.5495079159736633, -1.2658623456954956, -0.4924045205116272, -0.041447289288043976, -0.8588887453079224, 0.6247448921203613, 0.13734054565429688, -1.1895170211791992, -0.3134073317050934, -0.8545495867729187, 0.9097060561180115, -0.16186276078224182, 0.1779380440711975, 1.7951743602752686, 0.42598089575767517, -0.4165476858615875, 0.7679863572120667, 1.2368093729019165, 0.5146434903144836, -0.5678335428237915, 0.267614483833313, -0.673465371131897, 0.22911745309829712, -1.4074817895889282, 0.3745572865009308, -2.8589792251586914, 0.643949031829834, -0.05312442407011986, -0.1421186625957489, -0.04996116831898689, -1.3063828945159912, 1.166243076324463, 2.6070475578308105, -1.234246015548706, 0.5539013743400574, 0.3083460330963135, 1.1938339471817017, -1.5667328834533691, 0.2392311990261078, -0.4543744921684265, 2.1895759105682373, 0.2588188946247101, 1.2612911462783813, -0.5220813155174255, -2.1993603706359863, 0.6365475654602051, -1.2192885875701904, -1.114167332649231, 0.7005997896194458, -0.8788261413574219, 0.07241430878639221, -1.2823004722595215, -0.24447771906852722, -0.9162036776542664, -1.137270450592041, 0.7610806226730347, 0.09049884974956512, 0.4425966739654541, -0.6100751161575317, 0.35562506318092346, -2.171876907348633, -1.3785486221313477, -0.11087600886821747, -1.051107406616211, 0.43368077278137207, -0.32487985491752625, 0.6276068091392517, -0.13789507746696472, 0.07019917666912079, 0.4153599739074707, 1.5265345573425293, 3.470510959625244, 0.1732196807861328, 0.3756682872772217, -0.15285643935203552, -0.8479377031326294, 1.5334975719451904, 0.9579049944877625, -0.14559561014175415, -0.5679389834403992, -1.0740638971328735, 1.3437933921813965, 1.888411045074463, 1.0295238494873047, 0.08749738335609436, -0.8291938304901123, -0.7638804316520691, -0.053672004491090775, 0.1083504855632782, 0.46810182929039, 0.9233658909797668, 0.1351134181022644, 0.031572822481393814, 1.3207907676696777, 1.1332648992538452, -0.5438017249107361, 0.4549959599971771, -0.893934428691864, -0.3309336006641388, 0.40418341755867004, 0.24618211388587952, -0.013584543950855732, 0.40172675251960754, -0.9277473092079163, -0.2821120023727417, -0.27294832468032837, -0.9481074213981628, -0.736807107925415, -0.4978697597980499, -0.3057038187980652, 1.6927942037582397, 0.010312182828783989, -0.5331456661224365, -0.12511196732521057, -0.8768458962440491, -0.13394659757614136, -1.0975656509399414, 0.14102593064308167, -0.0717310905456543, -0.17801207304000854, -0.138726145029068, 1.7047442197799683, -0.9688490629196167, -2.2414090633392334, 0.2751505970954895, 0.19486254453659058, -0.40669921040534973, 0.16255858540534973, 1.6396516561508179, 0.5130365490913391, 1.3806109428405762, 1.340056300163269, 1.0054352283477783, -0.5954546928405762, -1.2091727256774902, 0.7209954261779785, 0.8117639422416687, -1.4162352085113525, 0.8611894249916077, -0.04941533878445625, -0.4956720471382141, 0.6364814639091492, 1.2089715003967285, 0.5299322605133057, -1.8837963342666626, 0.7855563759803772, -0.8606212735176086, 0.8093676567077637, 0.6554454565048218, 0.7706127762794495, 0.23750680685043335, 0.9143276810646057, -1.177112102508545, -1.157605767250061, -0.7451063394546509, -0.7844434380531311, 2.0185177326202393, -0.24019277095794678, 0.48766028881073, -0.24479079246520996, -1.2301607131958008, -0.11854389309883118, 0.7169819474220276, 0.2481130063533783, -0.4467354118824005, 0.8310088515281677, -0.7114803791046143, -1.1102430820465088, -1.481103777885437, -0.5314608812332153, -0.9811028242111206, -0.9956603646278381, 0.9575754404067993, 0.653960645198822, 0.3714355528354645, 1.9422341585159302, 0.6560185551643372, 0.2059381902217865, -2.4931538105010986, 0.8712307810783386, 0.36117255687713623, -0.018056798726320267, 0.898800253868103, 0.27532193064689636, 1.153395414352417, -0.06530222296714783, 0.5615831613540649, -2.272420644760132, 2.2043240070343018, -0.2716679573059082, 0.6647619009017944, 0.002672444097697735, -0.22471988201141357, 1.128426432609558, 0.5405207872390747, 0.61826491355896, -1.192798376083374, 0.7349151372909546, -0.6901444792747498, 1.1908941268920898, 0.9198273420333862, -0.9028650522232056, 0.00526200607419014, 1.4152649641036987, 0.36436760425567627, -0.5339403748512268, -0.9348053336143494, -0.8839601874351501, 1.018878698348999, 1.5842540264129639, -0.056817617267370224, 0.000624542124569416, 0.7908951044082642, 0.6681894659996033, -1.2645227909088135, 0.025526035577058792, -0.7303010821342468, -0.8355701565742493, 1.7476403713226318, 2.100559711456299, -0.12196190655231476, -0.2750498354434967, -0.7370747923851013, -1.229200005531311, 0.8445799946784973, -0.023276349529623985, 0.04659373685717583, 0.6537806391716003, -0.6172757744789124, 1.1298238039016724, 0.9194521307945251, 0.9853715300559998, 0.11974634975194931, 0.19585874676704407, 0.3907834589481354, -0.25827839970588684, -1.0956056118011475, -0.35664376616477966, -1.1695815324783325, -2.6300034523010254, 0.44776618480682373, -0.3140324354171753, -1.3517495393753052, 0.11902869492769241, -0.9751542210578918, 0.8783268332481384, -0.6229524612426758, -0.9820426106452942, -1.4384533166885376, 0.12514382600784302, -0.1801186501979828, 0.8708922863006592, -1.6934102773666382, -0.10321987420320511, 1.3115211725234985, 0.9651286005973816, -0.6430687308311462, 1.054905891418457, 0.19845283031463623, 1.0587146282196045, 0.9502304792404175, -0.46670618653297424, 0.5350534319877625, 0.07416487485170364, -1.302146553993225, 0.5084465146064758, 1.2009172439575195, 0.18416094779968262, 1.571374535560608, -0.3721686005592346, -0.0691603422164917, 0.4400411546230316, -0.5436597466468811, -0.46206289529800415, -0.6529456973075867, 0.7135875225067139, 0.06359536945819855, -0.9204026460647583, -0.014693636447191238, -0.02438315562903881, -0.13596615195274353, 0.1721796989440918, -1.6193697452545166, -0.15667909383773804, -0.2627887427806854, -0.6180596351623535, -1.3261088132858276, -0.16486015915870667, 1.3456753492355347, -0.8481736183166504, -0.18134421110153198, 0.4037703275680542, 0.45981788635253906, 0.4769720137119293, 0.6297390460968018, -0.749424159526825, -0.39413389563560486, -0.28603652119636536, -0.36980000138282776, 0.38406187295913696, 1.1621297597885132, -0.1095949113368988, -0.9541931748390198, 0.6311158537864685, -0.18625420331954956, 0.12491676956415176, 1.8335011005401611, -0.020584048703312874, -0.8026523590087891, 0.21226653456687927, -0.6725710034370422, 1.9950040578842163, 1.5810647010803223, 1.2955994606018066, -0.143058180809021, -0.8664385676383972, 0.6481810212135315, -0.2773014008998871, -0.38157227635383606, 0.8560712337493896, 0.4283255934715271, -0.13744837045669556, -1.4516563415527344, 0.6185150146484375, 1.2919398546218872, -0.8870483636856079, -0.797074019908905, -0.03374096006155014, -0.7801864743232727, 1.1205300092697144, 0.6499670743942261, 0.30166441202163696, 0.27423161268234253, 1.6814285516738892, 0.6578625440597534, -0.4693969786167145, 0.5236737728118896, 0.48471900820732117, -0.11801990121603012, -2.197094440460205, -1.139657974243164, 0.3114953935146332, -0.44876277446746826, -1.5225528478622437, 1.3124403953552246, -1.1286487579345703, -0.9498258233070374, 0.6311548948287964, 0.13258320093154907, 1.5234347581863403, 0.28118017315864563, 1.6945172548294067, 2.026566982269287, 0.8047407865524292, 0.3751758337020874, 1.2182724475860596, -0.09980574250221252, -0.3574282228946686, 1.7471754550933838, -0.4457698166370392, 0.5202005505561829, 1.0467252731323242, -0.33488166332244873, -1.0960997343063354, -0.8907572031021118, -1.3494497537612915, -0.7500008344650269, 1.0715876817703247, 0.03983283415436745, -1.2422473430633545, 0.17889562249183655, 1.5999377965927124, 0.1407402753829956, -0.16981884837150574, 0.617918074131012, 0.4442659020423889, -0.7492358088493347, -0.011749787256121635, -0.9465457797050476, 0.5178039073944092, -0.18889188766479492, -0.41277265548706055, 0.29816415905952454, 0.5171220302581787, 1.222493052482605, -0.060047831386327744, 0.07427085936069489, 1.2938190698623657, -1.4170308113098145, 1.4423620700836182, -0.6366769671440125, 0.27955177426338196, -2.3285281658172607, 1.4333354234695435, -0.9030776023864746, 1.932397484779358, -2.7268261909484863, 0.505129873752594, -0.5598186254501343, -0.5671284198760986, 0.3449987471103668, -0.3346593379974365, 0.152002215385437, -0.17579889297485352, -0.9918550252914429, -0.18319454789161682, -0.6629647612571716, 0.5478269457817078, 1.1879746913909912, 1.2458761930465698, -1.0011837482452393, -0.18761315941810608, -1.7981417179107666, -0.0997699499130249, -0.4926322102546692, 0.20981988310813904, -2.037276268005371, -0.15245649218559265, -2.0183475017547607, -2.346048355102539, -1.2882325649261475, -0.7685459852218628, 1.1042873859405518, 0.16851076483726501, -0.7984077334403992, 1.1286386251449585, -0.337065190076828, -1.6929891109466553, 1.0237493515014648, -2.131812572479248 ]
https://github.com/huggingface/datasets/issues/4502
Logic bug in arrow_writer?
Hi ! We consider an empty batch to look like this: ```python empty_batch = { "column_1": [], "column_2": [], ... } ``` While `{}` corresponds to a batch with no columns. Therefore calling this code should fail, because the two batches don't have the same columns: ```python writer.write_batch({"a": [1, 2, 3]}) writer.write_batch({}) ``` If you want to write an empty batch, you should do this instead: ```python writer.write_batch({"a": [1, 2, 3]}) writer.write_batch({"a": []}) ```
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488 I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows: ``` - if batch_examples and len(next(iter(batch_examples.values()))) == 0: + if not batch_examples or len(next(iter(batch_examples.values()))) == 0: return ``` @lhoestq
711
74
Logic bug in arrow_writer? https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488 I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows: ``` - if batch_examples and len(next(iter(batch_examples.values()))) == 0: + if not batch_examples or len(next(iter(batch_examples.values()))) == 0: return ``` @lhoestq Hi ! We consider an empty batch to look like this: ```python empty_batch = { "column_1": [], "column_2": [], ... } ``` While `{}` corresponds to a batch with no columns. Therefore calling this code should fail, because the two batches don't have the same columns: ```python writer.write_batch({"a": [1, 2, 3]}) writer.write_batch({}) ``` If you want to write an empty batch, you should do this instead: ```python writer.write_batch({"a": [1, 2, 3]}) writer.write_batch({"a": []}) ```
[ -1.1938804388046265, -0.7810389399528503, -0.7738050222396851, 1.6197813749313354, -0.1294981986284256, -1.2352138757705688, 0.23166970908641815, -1.064195156097412, 1.7009401321411133, -0.7667961120605469, 0.41254666447639465, -1.605815052986145, 0.13495853543281555, -0.6867053508758545, -0.8374532461166382, -0.8573646545410156, -0.38051384687423706, -0.654181182384491, 0.986902117729187, 2.5508968830108643, 1.128708839416504, -1.4426543712615967, 2.678440809249878, 0.7088245749473572, -0.17856284976005554, -0.9646263718605042, 0.48295509815216064, -0.039009302854537964, -1.1779369115829468, -0.4023827910423279, -0.8991201519966125, -0.10522688925266266, -0.5353994965553284, -0.633425772190094, -0.05367739871144295, 0.4823370575904846, -0.3604164123535156, -0.479482501745224, -0.5196965932846069, -0.8764240741729736, 0.45827916264533997, -0.3645764887332916, 0.9275632500648499, -0.351874977350235, 1.7590826749801636, -0.5712684392929077, 0.4785296618938446, 0.6516417860984802, 1.4739371538162231, 0.23883607983589172, 0.023615024983882904, 0.41538023948669434, 0.3974471688270569, 0.014164016582071781, 0.5148579478263855, 1.177573323249817, 0.6510232090950012, 0.49957016110420227, 0.7513231039047241, -2.2388265132904053, 1.2341388463974, -1.1879303455352783, 0.20523904263973236, 1.209898591041565, -0.9649749994277954, 0.2068656086921692, -1.7768913507461548, -0.021570829674601555, 0.5313352346420288, -2.23869252204895, 0.33141911029815674, -1.3095043897628784, -0.40081822872161865, 1.1183686256408691, 0.38889220356941223, -1.2628459930419922, 0.10350978374481201, -0.2769751250743866, 1.0509717464447021, 0.36788660287857056, 1.037726879119873, -1.715435266494751, 0.03157557547092438, -0.3799792230129242, 0.1364862620830536, -1.2478649616241455, -1.537483811378479, 0.5139555931091309, 0.5933972001075745, 0.5311333537101746, -0.10546168684959412, 1.0081655979156494, -1.004942536354065, 0.7463546395301819, -1.053297996520996, -1.7103854417800903, -1.483031153678894, -2.1516830921173096, -2.233319044113159, 0.6997811198234558, -0.5216238498687744, -0.5018513798713684, 1.9596320390701294, -0.9308452606201172, -1.6622167825698853, 1.1132736206054688, 0.3364250361919403, -0.04156121239066124, 2.2179806232452393, 0.20070935785770416, -0.7557812929153442, 0.474971741437912, -0.8505662083625793, 0.7553170323371887, -0.35106104612350464, 1.372711420059204, 0.47404417395591736, -1.0063841342926025, 1.6205434799194336, -0.3825361430644989, 0.522529125213623, -0.7134168148040771, -0.50287264585495, -0.7676177620887756, 0.4401348829269409, 2.029407024383545, -0.34183430671691895, 1.5471280813217163, -0.285157710313797, -1.4432260990142822, -1.466932773590088, 1.0146644115447998, 0.5561739802360535, -0.7200485467910767, 0.1567031890153885, -0.44632506370544434, 0.21751628816127777, -0.16052564978599548, 1.1792101860046387, 1.3185220956802368, 0.7288109064102173, -0.3270640969276428, -0.9094788432121277, 0.23165255784988403, -0.05947313830256462, -0.7300395369529724, -1.7525808811187744, -0.34300416707992554, 0.15620802342891693, 0.5841978192329407, -1.1553481817245483, 1.8029083013534546, 0.7331527471542358, 1.8172012567520142, 1.0620554685592651, -0.2814498543739319, 1.503296136856079, 0.10486320406198502, 1.969893455505371, -0.4881967008113861, 0.6602059602737427, -0.4075135290622711, -1.1597996950149536, 0.8785545229911804, -0.3741567134857178, -2.146036148071289, -0.7180219888687134, -0.8049220442771912, -0.14813703298568726, -0.8215981721878052, 0.9637466669082642, -0.30236560106277466, -1.4874749183654785, 0.2795414924621582, -0.7572821378707886, 0.05524498224258423, -1.2489725351333618, 0.36312398314476013, 0.7472316026687622, -0.6623864769935608, 0.130501851439476, -0.20790572464466095, -1.2717753648757935, -0.4419305622577667, 0.2084486037492752, 2.0015621185302734, -0.7748711705207825, 0.9251087307929993, 1.0848662853240967, -0.6885935068130493, -0.07347751408815384, 0.3678564429283142, -0.4035434126853943, 0.8980865478515625, -1.098785400390625, -0.451099693775177, 1.2441235780715942, -0.11198683083057404, -0.5998578667640686, 1.400565505027771, 0.7907658219337463, -0.940240740776062, -0.21720169484615326, -0.13763251900672913, -0.800159215927124, 0.17632102966308594, -1.6125367879867554, -0.08772812783718109, 0.4631672203540802, -1.5165579319000244, -0.5707343816757202, -0.1358235627412796, 1.2773369550704956, -0.22981715202331543, 1.3963762521743774, -0.28690284490585327, -0.10029502958059311, -0.4031077027320862, -0.3743846118450165, 0.03958176448941231, -0.1545695960521698, -0.6426235437393188, 0.22729353606700897, -0.7281026840209961, 0.446894109249115, 1.3132197856903076, 0.29287317395210266, 0.07374762743711472, 0.5085509419441223, 1.0929718017578125, 0.3374840021133423, 0.030613914132118225, -0.8779736757278442, -1.5636885166168213, 2.0342929363250732, -1.386504054069519, 2.0567967891693115, 0.7761607766151428, 0.011453169398009777, -1.6698040962219238, -1.8666117191314697, 1.4428865909576416, 1.1029820442199707, 2.3263156414031982, 0.5337002277374268, 0.4154024124145508, -0.7782256007194519, -0.601195216178894, 0.321511834859848, -1.0200331211090088, -0.7549059391021729, 0.23302297294139862, 2.46208119392395, 1.6750253438949585, -0.4021141529083252, -0.21832141280174255, -1.0578534603118896, 1.3083359003067017, -0.16487902402877808, 0.24170951545238495, 1.8886973857879639, -0.19009816646575928, -1.173585295677185, 1.2157365083694458, -2.3548879623413086, 0.10568481683731079, 2.098482131958008, 0.29811784625053406, 0.09686769545078278, -1.3189486265182495, -0.607319712638855, -0.21471160650253296, -0.44225743412971497, -1.2226461172103882, 0.5452726483345032, -0.15412136912345886, -0.836716890335083, -1.3233948945999146, 0.21526354551315308, -1.1669087409973145, -1.6869478225708008, 0.2446065992116928, 1.8801578283309937, 1.9807968139648438, -0.7947889566421509, 1.6344397068023682, -0.3002781271934509, 0.2981586158275604, 1.2515664100646973, 1.2661054134368896, 3.1543095111846924, 1.8730347156524658, -1.2794697284698486, 0.6401059031486511, -0.22933261096477509, -0.5709468722343445, 1.327919602394104, -1.2859660387039185, 1.281968116760254, -0.07153432816267014, -1.1371076107025146, -1.2679400444030762, 0.8297641277313232, 0.5148796439170837, 0.017300739884376526, -0.4557085633277893, 1.0845893621444702, 0.10432548820972443, 1.2710291147232056, 0.5638620257377625, -0.2499643862247467, 0.633367657661438, -0.4288455843925476, -0.4523586928844452, 1.5716743469238281, 0.1799585372209549, -1.3205262422561646, -2.3613345623016357, -0.10449076443910599, -0.8973373770713806, 0.017765119671821594, -0.6348520517349243, -1.0653355121612549, 1.7070212364196777, 0.2940686047077179, -1.1878535747528076, -0.2740393877029419, -0.3628682792186737, -0.5914468169212341, 2.6747043132781982, -1.389401912689209, -0.2842343747615814, -1.0081039667129517, -0.7364763617515564, 1.619336724281311, -1.1694068908691406, -0.22494298219680786, -0.9594284296035767, -0.5148034691810608, -1.2919032573699951, -0.5479221343994141, -0.055863842368125916, -0.8741281032562256, 0.7581332325935364, 0.22362454235553741, -1.2599900960922241, -0.3995261788368225, -0.8284360766410828, 0.8490941524505615, -0.16096188127994537, 0.22897543013095856, 1.8544588088989258, 0.45080727338790894, -0.3059096336364746, 0.805321455001831, 1.1878842115402222, 0.572867751121521, -0.5659459233283997, 0.3486376404762268, -0.5980402827262878, 0.20815397799015045, -1.4107590913772583, 0.3009144365787506, -2.782296895980835, 0.6039426922798157, -0.04179012030363083, -0.0797039344906807, -0.03977320343255997, -1.3493292331695557, 1.159260869026184, 2.691588878631592, -1.1392004489898682, 0.4810909330844879, 0.35393229126930237, 1.1804176568984985, -1.539296269416809, 0.2272333800792694, -0.4069689214229584, 2.1889467239379883, 0.23332905769348145, 1.2108937501907349, -0.45301488041877747, -2.320772409439087, 0.6049212217330933, -1.3560383319854736, -1.222168207168579, 0.782467246055603, -0.8542935848236084, 0.06655968725681305, -1.3545020818710327, -0.28965479135513306, -0.921428918838501, -1.1772027015686035, 0.7418013215065002, 0.026456177234649658, 0.4044274091720581, -0.609879195690155, 0.38404756784439087, -2.218912363052368, -1.371854543685913, -0.16625018417835236, -1.0194453001022339, 0.3881271183490753, -0.29015591740608215, 0.7016409635543823, -0.1627892255783081, -0.0066953422501683235, 0.3871350884437561, 1.5214691162109375, 3.4712750911712646, 0.2611081004142761, 0.36431410908699036, -0.2282220870256424, -0.8777239322662354, 1.470686435699463, 0.9188411235809326, -0.1321006417274475, -0.5809832215309143, -1.0718380212783813, 1.305573582649231, 1.9438871145248413, 1.0129848718643188, -0.019219309091567993, -0.8603383302688599, -0.7844054102897644, -0.059289053082466125, 0.07441706955432892, 0.34886738657951355, 0.8806014657020569, 0.15051978826522827, 0.013141144998371601, 1.3173004388809204, 1.1185661554336548, -0.45650991797447205, 0.3366331160068512, -0.8685734868049622, -0.3453802764415741, 0.5327538847923279, 0.3047701120376587, 0.06976129859685898, 0.3858133852481842, -0.9751635789871216, -0.32629868388175964, -0.36007848381996155, -0.8587002754211426, -0.6830587387084961, -0.5571544170379639, -0.3100254237651825, 1.673581838607788, 0.03912792727351189, -0.4837134778499603, -0.1331787109375, -0.8555117249488831, -0.08225029706954956, -1.0334901809692383, 0.1395612359046936, -0.10459072887897491, -0.1510142683982849, -0.16622939705848694, 1.7001148462295532, -0.9099535346031189, -2.121412515640259, 0.24683384597301483, 0.20944678783416748, -0.39725589752197266, 0.20931057631969452, 1.6786412000656128, 0.5142918825149536, 1.4025969505310059, 1.3101884126663208, 0.9428179264068604, -0.639337420463562, -1.2852280139923096, 0.6680448651313782, 0.946527361869812, -1.3795931339263916, 0.7965426445007324, 0.04834998399019241, -0.4032845199108124, 0.5829010009765625, 1.1858230829238892, 0.5072132349014282, -1.9730076789855957, 0.6535634398460388, -0.8827069401741028, 0.7871915102005005, 0.7258835434913635, 0.6173680424690247, 0.21218477189540863, 0.8039493560791016, -1.2005372047424316, -1.138310194015503, -0.7465493679046631, -0.7159446477890015, 2.006693124771118, -0.31388407945632935, 0.6028250455856323, -0.1915273368358612, -1.3410643339157104, -0.15799975395202637, 0.7235875129699707, 0.3621918857097626, -0.5931835770606995, 0.7927471399307251, -0.6366686820983887, -1.0511085987091064, -1.3564987182617188, -0.5110240578651428, -1.021573543548584, -1.0068738460540771, 0.9861058592796326, 0.7547150254249573, 0.4230228662490845, 1.8988124132156372, 0.8003666400909424, 0.22295083105564117, -2.563530445098877, 0.868026077747345, 0.36661258339881897, -0.09652255475521088, 0.8404368758201599, 0.3698103725910187, 1.009283423423767, -0.08360982686281204, 0.6518294811248779, -2.4131104946136475, 2.300286054611206, -0.1976180225610733, 0.6677191853523254, -0.008712113834917545, -0.2413673996925354, 1.026811122894287, 0.4568237066268921, 0.4638407826423645, -1.181580901145935, 0.5779996514320374, -0.6510850191116333, 1.233210802078247, 0.8425273895263672, -0.8563019633293152, -0.0923166498541832, 1.3799052238464355, 0.4116765558719635, -0.4721429646015167, -0.9292249083518982, -0.8985483050346375, 0.9830877184867859, 1.6096454858779907, -0.05798974633216858, -0.04460364580154419, 0.9361485242843628, 0.6567431092262268, -1.2387754917144775, 0.04239897057414055, -0.8261898159980774, -0.8198534250259399, 1.7971696853637695, 2.111367702484131, -0.15690508484840393, -0.2192314714193344, -0.7683202028274536, -1.2620288133621216, 0.8677031993865967, -0.0730808898806572, 0.0804014801979065, 0.5714318752288818, -0.5815736651420593, 1.085139274597168, 0.9204908609390259, 0.9639394283294678, 0.18681365251541138, 0.23381419479846954, 0.36604180932044983, -0.3621799051761627, -1.1170457601547241, -0.32508471608161926, -1.1144112348556519, -2.572497606277466, 0.484420508146286, -0.26289811730384827, -1.392811894416809, 0.06929301470518112, -0.9548927545547485, 0.903441309928894, -0.5932202339172363, -1.0036276578903198, -1.4109467267990112, 0.21447144448757172, -0.019158417358994484, 0.9611305594444275, -1.6934304237365723, -0.041039180010557175, 1.2730836868286133, 0.9203097224235535, -0.6928386688232422, 0.9487320184707642, 0.2097834050655365, 1.0853054523468018, 0.9735615849494934, -0.39069312810897827, 0.5316150188446045, 0.04545522481203079, -1.3077903985977173, 0.5275511145591736, 1.1794986724853516, 0.1642957627773285, 1.6239835023880005, -0.42424070835113525, -0.000022020190954208374, 0.3736895024776459, -0.6103513836860657, -0.46411964297294617, -0.6934580206871033, 0.6589952111244202, 0.13034187257289886, -0.93369060754776, -0.029521048069000244, 0.03528515249490738, -0.11953404545783997, 0.13467228412628174, -1.4990334510803223, -0.0686550959944725, -0.20090921223163605, -0.6680532693862915, -1.1740467548370361, -0.18386419117450714, 1.3233551979064941, -0.7872951030731201, -0.15389738976955414, 0.5103785395622253, 0.31849098205566406, 0.4655184745788574, 0.6017060875892639, -0.6602333188056946, -0.4806258976459503, -0.29247012734413147, -0.36335477232933044, 0.40768685936927795, 1.2750749588012695, -0.06741157919168472, -0.9227397441864014, 0.7238531708717346, -0.29285767674446106, 0.028714902698993683, 1.82004976272583, 0.026811886578798294, -0.8103228807449341, 0.3509971797466278, -0.6296145915985107, 1.968316674232483, 1.744462013244629, 1.2720224857330322, -0.1254974901676178, -0.9697114825248718, 0.6566324830055237, -0.4648704528808594, -0.4194280803203583, 0.8104262351989746, 0.3338891863822937, -0.202305406332016, -1.4347831010818481, 0.6550620794296265, 1.3334814310073853, -0.9029095768928528, -0.915480375289917, 0.12126784771680832, -0.7816818356513977, 1.072964072227478, 0.6314396262168884, 0.29197531938552856, 0.32298338413238525, 1.6530946493148804, 0.8025170564651489, -0.42441344261169434, 0.5701794624328613, 0.5550753474235535, -0.11965806037187576, -2.198082447052002, -1.2563700675964355, 0.39631354808807373, -0.4641193151473999, -1.5639218091964722, 1.3782070875167847, -1.1315903663635254, -1.0219411849975586, 0.6030856966972351, 0.08670967817306519, 1.450206995010376, 0.3137277066707611, 1.5987510681152344, 2.0248608589172363, 0.7765219807624817, 0.40836969017982483, 1.170599102973938, -0.12608155608177185, -0.5063023567199707, 1.7520077228546143, -0.4368360936641693, 0.4777792692184448, 1.0396732091903687, -0.2348777949810028, -1.1037219762802124, -0.8939223885536194, -1.4070388078689575, -0.8621668219566345, 1.1332296133041382, 0.05559002608060837, -1.1978917121887207, 0.24796472489833832, 1.7303497791290283, 0.02571064978837967, -0.31035834550857544, 0.6339827179908752, 0.4365791976451874, -0.811546266078949, -0.01613045670092106, -0.8661963939666748, 0.5895469784736633, -0.15462906658649445, -0.29298636317253113, 0.3095175325870514, 0.5175437927246094, 1.259718894958496, -0.04818420484662056, 0.08239183574914932, 1.0659722089767456, -1.5169602632522583, 1.512392282485962, -0.6298314332962036, 0.3153660297393799, -2.370600938796997, 1.3739209175109863, -0.873590886592865, 1.8893877267837524, -2.672312021255493, 0.518101692199707, -0.5251338481903076, -0.49841150641441345, 0.32361021637916565, -0.39893239736557007, 0.14734488725662231, -0.13814668357372284, -1.1148793697357178, -0.15808308124542236, -0.6621169447898865, 0.5855945944786072, 1.0966365337371826, 1.3180263042449951, -1.0832109451293945, -0.2520086169242859, -1.727814793586731, -0.03949873894453049, -0.44573038816452026, 0.18496590852737427, -1.957717776298523, -0.1694432497024536, -1.9703236818313599, -2.275587320327759, -1.3200721740722656, -0.7291298508644104, 1.0724081993103027, 0.06789463013410568, -0.8409264087677002, 1.1573972702026367, -0.40841448307037354, -1.846435785293579, 1.1429885625839233, -2.1209073066711426 ]
https://github.com/huggingface/datasets/issues/4502
Logic bug in arrow_writer?
Makes sense, then the if-statement should remain the same or is it better to handle both cases separately using `if not batch_examples or len(next(iter(batch_examples.values()))) == 0: ...`? Updating the regressions tests with an empty batch formatted as `{"col_1": [], "col_2": []}` instead of `{}` works fine with the current if, and also with the one proposed by @cccntu.
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488 I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows: ``` - if batch_examples and len(next(iter(batch_examples.values()))) == 0: + if not batch_examples or len(next(iter(batch_examples.values()))) == 0: return ``` @lhoestq
711
58
Logic bug in arrow_writer? https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488 I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows: ``` - if batch_examples and len(next(iter(batch_examples.values()))) == 0: + if not batch_examples or len(next(iter(batch_examples.values()))) == 0: return ``` @lhoestq Makes sense, then the if-statement should remain the same or is it better to handle both cases separately using `if not batch_examples or len(next(iter(batch_examples.values()))) == 0: ...`? Updating the regressions tests with an empty batch formatted as `{"col_1": [], "col_2": []}` instead of `{}` works fine with the current if, and also with the one proposed by @cccntu.
[ -1.292722463607788, -0.8142279386520386, -0.7793194055557251, 1.6008081436157227, -0.06748953461647034, -1.2570797204971313, 0.2246926724910736, -1.0111887454986572, 1.642088532447815, -0.8116609454154968, 0.4203687906265259, -1.6297036409378052, 0.10546629875898361, -0.6458873152732849, -0.8203773498535156, -0.8264977931976318, -0.37459996342658997, -0.7209151387214661, 1.1054438352584839, 2.545314073562622, 1.2218022346496582, -1.4359441995620728, 2.7256407737731934, 0.6388038992881775, -0.2429448962211609, -1.0433398485183716, 0.464688241481781, -0.025898948311805725, -1.1684430837631226, -0.45986026525497437, -0.9905688762664795, 0.0038868775591254234, -0.5642678737640381, -0.5828188061714172, 0.04785092920064926, 0.4056714177131653, -0.302462637424469, -0.4379003942012787, -0.5136153101921082, -0.8611744046211243, 0.4770323634147644, -0.3481867015361786, 0.8836438059806824, -0.3534640073776245, 1.8374574184417725, -0.5561940670013428, 0.4445667862892151, 0.6478308439254761, 1.56284499168396, 0.24054808914661407, -0.06888230890035629, 0.4716249108314514, 0.33568692207336426, 0.04897470027208328, 0.5191016793251038, 1.1886438131332397, 0.6251986622810364, 0.4570113718509674, 0.7174355983734131, -2.2428927421569824, 1.3046082258224487, -1.1124030351638794, 0.15202389657497406, 1.2642467021942139, -1.0788142681121826, 0.18878765404224396, -1.7650872468948364, -0.07762689888477325, 0.526459276676178, -2.300457239151001, 0.2922089993953705, -1.2903739213943481, -0.41197213530540466, 1.0759978294372559, 0.39572206139564514, -1.26398766040802, 0.11734914034605026, -0.3792732059955597, 1.005264401435852, 0.3840908110141754, 1.0763846635818481, -1.7648518085479736, -0.007212961558252573, -0.3532811105251312, 0.12721160054206848, -1.3195856809616089, -1.5938341617584229, 0.48379358649253845, 0.6081365942955017, 0.5394965410232544, -0.08216188102960587, 1.0440948009490967, -1.01327383518219, 0.7998848557472229, -0.9719254374504089, -1.6472218036651611, -1.4987977743148804, -2.2074685096740723, -2.2198543548583984, 0.6831841468811035, -0.4707726240158081, -0.5906839966773987, 2.031592845916748, -0.9957053661346436, -1.6618541479110718, 1.128411054611206, 0.2697337865829468, -0.10639646649360657, 2.3137149810791016, 0.18552999198436737, -0.7398057579994202, 0.45460519194602966, -0.791507363319397, 0.795197606086731, -0.3372613191604614, 1.3732093572616577, 0.4955401122570038, -1.0011329650878906, 1.6337318420410156, -0.3584488332271576, 0.4823700487613678, -0.6444587707519531, -0.5027632117271423, -0.8136893510818481, 0.3741001784801483, 2.024739980697632, -0.31703364849090576, 1.5809329748153687, -0.3042081296443939, -1.479114055633545, -1.5384066104888916, 1.0084558725357056, 0.502658486366272, -0.7053386569023132, 0.16633738577365875, -0.46866291761398315, 0.23116520047187805, -0.04508669674396515, 1.108163595199585, 1.3067420721054077, 0.6103400588035583, -0.30868640542030334, -0.9190707802772522, 0.24687443673610687, -0.05662309378385544, -0.6233581304550171, -1.7833954095840454, -0.3835963308811188, 0.13598261773586273, 0.6703035235404968, -1.1545989513397217, 1.777605414390564, 0.8037330508232117, 1.8318891525268555, 1.0138627290725708, -0.2228689342737198, 1.5099351406097412, 0.016419341787695885, 1.8890421390533447, -0.4546491205692291, 0.7083874344825745, -0.3447495400905609, -1.164487361907959, 0.7866825461387634, -0.439654141664505, -2.1003310680389404, -0.7667151093482971, -0.8192013502120972, -0.14913669228553772, -0.8344886302947998, 1.0120601654052734, -0.31025633215904236, -1.4670681953430176, 0.27474871277809143, -0.6867849826812744, 0.15817539393901825, -1.3118786811828613, 0.40473097562789917, 0.7173410058021545, -0.6733849048614502, 0.07689997553825378, -0.21963948011398315, -1.248047947883606, -0.4368596374988556, 0.18769171833992004, 2.044322967529297, -0.738875150680542, 0.9667301177978516, 1.0275779962539673, -0.7049594521522522, -0.012425519526004791, 0.3723675608634949, -0.39304259419441223, 0.9231309294700623, -1.0411337614059448, -0.3747154176235199, 1.2489573955535889, -0.15843553841114044, -0.5736364126205444, 1.4621379375457764, 0.8097929358482361, -0.9421452283859253, -0.18423207104206085, -0.16234754025936127, -0.8281199932098389, 0.1496557593345642, -1.5764933824539185, -0.18532313406467438, 0.438204288482666, -1.5079219341278076, -0.5491874814033508, -0.12042398750782013, 1.311242938041687, -0.2479649782180786, 1.47281813621521, -0.3512791097164154, -0.14935249090194702, -0.3136694133281708, -0.33376336097717285, 0.06667380779981613, -0.03858280926942825, -0.6645945310592651, 0.2838510274887085, -0.7507340312004089, 0.37527620792388916, 1.3492095470428467, 0.4298412799835205, 0.07006676495075226, 0.5386939644813538, 1.119579553604126, 0.3062593638896942, -0.034276410937309265, -0.8966923952102661, -1.6456071138381958, 2.052659749984741, -1.3783249855041504, 2.0623199939727783, 0.8176298141479492, -0.03762892633676529, -1.640090823173523, -1.7586643695831299, 1.391554355621338, 1.169360637664795, 2.3247718811035156, 0.5757455229759216, 0.39434313774108887, -0.7913345098495483, -0.6316854953765869, 0.36175307631492615, -1.0361653566360474, -0.7894132733345032, 0.15627869963645935, 2.396174192428589, 1.6947948932647705, -0.3786346912384033, -0.18398040533065796, -1.0393248796463013, 1.2298671007156372, -0.23212707042694092, 0.24966047704219818, 1.8243216276168823, -0.2224220186471939, -1.133545994758606, 1.1583592891693115, -2.384761333465576, 0.13824698328971863, 2.1218008995056152, 0.3166183531284332, 0.05842328071594238, -1.323904037475586, -0.5822515487670898, -0.2461523413658142, -0.4254666268825531, -1.1880953311920166, 0.531873881816864, -0.23046472668647766, -0.8440251350402832, -1.3218841552734375, 0.19346456229686737, -1.1611758470535278, -1.6673767566680908, 0.30537083745002747, 1.9025543928146362, 2.0402674674987793, -0.8012466430664062, 1.564357042312622, -0.28363198041915894, 0.3150794506072998, 1.231188416481018, 1.3213801383972168, 3.1705639362335205, 1.8101812601089478, -1.3189150094985962, 0.6860294342041016, -0.16612054407596588, -0.5596431493759155, 1.3109887838363647, -1.2833201885223389, 1.2440810203552246, -0.039003487676382065, -1.2027522325515747, -1.2839957475662231, 0.8667757511138916, 0.5175979137420654, -0.047767624258995056, -0.45693543553352356, 1.068596363067627, 0.05178096890449524, 1.2957905530929565, 0.5592517852783203, -0.25442641973495483, 0.5370842218399048, -0.40532517433166504, -0.47944703698158264, 1.5831421613693237, 0.14746467769145966, -1.3852226734161377, -2.346165180206299, -0.1395791918039322, -0.792388916015625, 0.05150222033262253, -0.6898758411407471, -1.0554556846618652, 1.637362003326416, 0.28724876046180725, -1.134902834892273, -0.29192104935646057, -0.3880428671836853, -0.6065226197242737, 2.5871005058288574, -1.381088137626648, -0.2543123960494995, -1.0125904083251953, -0.7196402549743652, 1.5950168371200562, -1.1773825883865356, -0.23056606948375702, -0.9389463663101196, -0.5841315388679504, -1.2946668863296509, -0.5345985889434814, -0.06815175712108612, -0.8611993193626404, 0.6535256505012512, 0.1942777931690216, -1.2097985744476318, -0.39682960510253906, -0.8575399518013, 0.8511465787887573, -0.18863873183727264, 0.21044449508190155, 1.8104064464569092, 0.4026319980621338, -0.37849774956703186, 0.7628108263015747, 1.213752031326294, 0.5534221529960632, -0.5257604122161865, 0.27185308933258057, -0.650758683681488, 0.264973908662796, -1.3667680025100708, 0.34357258677482605, -2.7908294200897217, 0.63743656873703, -0.06724090129137039, -0.0953516960144043, -0.0653136819601059, -1.3292914628982544, 1.1988837718963623, 2.6312131881713867, -1.1887327432632446, 0.526421308517456, 0.34201160073280334, 1.1849292516708374, -1.6193286180496216, 0.21833130717277527, -0.4243050217628479, 2.1836416721343994, 0.2651142477989197, 1.2592403888702393, -0.47058379650115967, -2.2459065914154053, 0.6102930903434753, -1.2543085813522339, -1.1577725410461426, 0.7712225317955017, -0.8609933257102966, 0.11207102239131927, -1.32591712474823, -0.299960196018219, -0.9087117910385132, -1.0979926586151123, 0.697866678237915, 0.024357149377465248, 0.4305495619773865, -0.6211956143379211, 0.33577921986579895, -2.210780382156372, -1.3306578397750854, -0.12286826968193054, -1.0555318593978882, 0.44685980677604675, -0.3370453417301178, 0.6324735879898071, -0.15455162525177002, 0.010626578703522682, 0.4389607310295105, 1.5174859762191772, 3.4367427825927734, 0.2733559310436249, 0.3446671962738037, -0.20653408765792847, -0.8419475555419922, 1.5356589555740356, 0.8983684182167053, -0.1727939248085022, -0.5410900115966797, -1.0627641677856445, 1.3588330745697021, 1.8496075868606567, 1.0191240310668945, 0.014252914115786552, -0.8291447758674622, -0.734192430973053, -0.05331744998693466, 0.0791008248925209, 0.451163649559021, 0.9454574584960938, 0.12688924372196198, 0.03664880990982056, 1.3329386711120605, 1.167149305343628, -0.5244268774986267, 0.44212809205055237, -0.8953539133071899, -0.378950834274292, 0.41094833612442017, 0.2389094978570938, -0.005198352038860321, 0.4255533218383789, -0.9347339272499084, -0.2986692190170288, -0.3385675847530365, -0.9114418029785156, -0.749913215637207, -0.48327845335006714, -0.31440141797065735, 1.7011024951934814, 0.05711232125759125, -0.48850032687187195, -0.15094248950481415, -0.889086902141571, -0.11960740387439728, -1.0758183002471924, 0.18805086612701416, -0.0423220694065094, -0.1779826581478119, -0.16748158633708954, 1.6733239889144897, -0.9051892757415771, -2.1648964881896973, 0.2545801103115082, 0.20269644260406494, -0.37065109610557556, 0.1678883284330368, 1.685752272605896, 0.4771782457828522, 1.4261285066604614, 1.3749271631240845, 0.9412791132926941, -0.6149935722351074, -1.2509372234344482, 0.719836950302124, 0.867146909236908, -1.430731177330017, 0.8422215580940247, -0.005868866108357906, -0.4929695129394531, 0.5853883624076843, 1.219290852546692, 0.535210132598877, -1.959668755531311, 0.8034112453460693, -0.9372938871383667, 0.786790132522583, 0.6593137383460999, 0.6785098314285278, 0.2587282955646515, 0.9075856804847717, -1.2071492671966553, -1.1542060375213623, -0.7150734066963196, -0.7487269639968872, 1.9832749366760254, -0.2568877339363098, 0.53547602891922, -0.19614455103874207, -1.2442998886108398, -0.13779285550117493, 0.6969269514083862, 0.28249236941337585, -0.45427238941192627, 0.8522776961326599, -0.6670470237731934, -1.1089298725128174, -1.4351555109024048, -0.4883995056152344, -0.9948012232780457, -0.9567047953605652, 1.0043171644210815, 0.7306361794471741, 0.29123952984809875, 1.901342511177063, 0.6925202012062073, 0.2043851613998413, -2.5218124389648438, 0.879947304725647, 0.3434579372406006, -0.13775290548801422, 0.8593586087226868, 0.28719663619995117, 1.0610424280166626, -0.022680964320898056, 0.551243245601654, -2.3565614223480225, 2.2728567123413086, -0.2198818176984787, 0.6750931143760681, -0.03303142264485359, -0.1776215136051178, 1.1246025562286377, 0.5585146546363831, 0.5359444618225098, -1.1778782606124878, 0.6785333752632141, -0.7002174854278564, 1.2332708835601807, 0.8973750472068787, -0.8792345523834229, -0.031542323529720306, 1.4081155061721802, 0.3548922538757324, -0.5033957362174988, -0.9605259299278259, -0.8945972323417664, 0.9915878772735596, 1.6039588451385498, 0.013871243223547935, -0.014731572940945625, 0.8340253829956055, 0.7143909335136414, -1.2696678638458252, 0.08878402411937714, -0.7369986176490784, -0.8640350103378296, 1.761936068534851, 2.1293020248413086, -0.14475375413894653, -0.30790597200393677, -0.7180812954902649, -1.2418148517608643, 0.8426688313484192, -0.05647795647382736, 0.11800006777048111, 0.646987795829773, -0.6559073328971863, 1.1067159175872803, 0.9264445304870605, 0.9748008251190186, 0.15756240487098694, 0.14861395955085754, 0.3250308930873871, -0.260626882314682, -1.0906445980072021, -0.26822996139526367, -1.1626938581466675, -2.563814163208008, 0.4494757354259491, -0.30491504073143005, -1.3545293807983398, 0.1533394753932953, -0.9562979340553284, 0.8841415643692017, -0.6021901965141296, -1.0088138580322266, -1.462454080581665, 0.14090071618556976, -0.09011324495077133, 0.8924586772918701, -1.6660492420196533, -0.10221122205257416, 1.2686265707015991, 0.908835232257843, -0.582076370716095, 0.9936304688453674, 0.22998164594173431, 1.053637146949768, 0.9155028462409973, -0.4229014813899994, 0.5122460126876831, 0.06748553365468979, -1.3053096532821655, 0.5540454983711243, 1.2081378698349, 0.18780311942100525, 1.6782236099243164, -0.36574164032936096, -0.01624806597828865, 0.3948821723461151, -0.5937439799308777, -0.4814113676548004, -0.631740391254425, 0.7214349508285522, 0.04359900951385498, -0.9276887774467468, 0.016578994691371918, -0.02206364832818508, -0.17217005789279938, 0.14020423591136932, -1.5818188190460205, -0.1134558767080307, -0.27263301610946655, -0.6528785824775696, -1.246631383895874, -0.13228896260261536, 1.3754175901412964, -0.866879940032959, -0.18944154679775238, 0.4195343554019928, 0.4260304272174835, 0.47684723138809204, 0.6412308216094971, -0.6926137804985046, -0.41150331497192383, -0.26624131202697754, -0.34601423144340515, 0.35046079754829407, 1.1873544454574585, -0.13763661682605743, -0.9385536909103394, 0.6510739922523499, -0.23866330087184906, 0.050503335893154144, 1.8141471147537231, 0.018672563135623932, -0.7330527901649475, 0.28159892559051514, -0.676569938659668, 1.9807474613189697, 1.6759428977966309, 1.2926335334777832, -0.13032469153404236, -0.9679453372955322, 0.6607687473297119, -0.38517025113105774, -0.37633904814720154, 0.8000593781471252, 0.41019463539123535, -0.1620369702577591, -1.4402408599853516, 0.6076958775520325, 1.262031078338623, -0.8978514075279236, -0.8175973296165466, 0.025512108579277992, -0.7878289222717285, 1.0840028524398804, 0.6090999841690063, 0.2552058696746826, 0.2804827094078064, 1.6548882722854614, 0.679728090763092, -0.4400927424430847, 0.49304696917533875, 0.5022964477539062, -0.16738905012607574, -2.196298837661743, -1.1635818481445312, 0.3356409966945648, -0.4440924823284149, -1.5384937524795532, 1.3493008613586426, -1.0808414220809937, -0.9365223050117493, 0.6167588829994202, 0.12387894839048386, 1.483477234840393, 0.30414271354675293, 1.6748428344726562, 2.0222277641296387, 0.8395859003067017, 0.3762664794921875, 1.1857616901397705, -0.08987656235694885, -0.421237051486969, 1.7521666288375854, -0.4453974962234497, 0.4990277588367462, 1.0471211671829224, -0.31655848026275635, -1.08597993850708, -0.8961984515190125, -1.4046207666397095, -0.7742257714271545, 1.1294664144515991, 0.024004338309168816, -1.1620842218399048, 0.17739877104759216, 1.6179759502410889, 0.07524936646223068, -0.2370426505804062, 0.6065499186515808, 0.4718197286128998, -0.7424991726875305, -0.01190732792019844, -0.8714461326599121, 0.5675912499427795, -0.2181447148323059, -0.39794275164604187, 0.3110159635543823, 0.4874404966831207, 1.2693160772323608, -0.06425246596336365, 0.10174369066953659, 1.2439358234405518, -1.4584251642227173, 1.500370979309082, -0.6613108515739441, 0.2869948446750641, -2.3489937782287598, 1.43626070022583, -0.9059889316558838, 1.9627761840820312, -2.660269021987915, 0.5311576128005981, -0.6149967908859253, -0.505612313747406, 0.3799760043621063, -0.4124380052089691, 0.18340089917182922, -0.1657474786043167, -1.07258141040802, -0.1644764393568039, -0.6521050333976746, 0.5314231514930725, 1.1235195398330688, 1.3209481239318848, -1.057431697845459, -0.23916584253311157, -1.7742440700531006, -0.12006238847970963, -0.5202985405921936, 0.2465382069349289, -1.9832899570465088, -0.16395880281925201, -2.051447629928589, -2.3267745971679688, -1.2883319854736328, -0.7313970923423767, 1.0921562910079956, 0.13443560898303986, -0.8179655075073242, 1.1671680212020874, -0.3972732722759247, -1.7395055294036865, 1.0762906074523926, -2.1105244159698486 ]
https://github.com/huggingface/datasets/issues/4502
Logic bug in arrow_writer?
> Makes sense, then the if-statement should remain the same or is it better to handle both cases separately using if not batch_examples or len(next(iter(batch_examples.values()))) == 0: ...? There's a check later in the code that makes sure that the columns are the right ones, so I don't think we need to check for `{}` here In particular the check `if not batch_examples or len(next(iter(batch_examples.values()))) == 0:` doesn't raise an error while it should, that why the old `if` is fine IMO > Updating the regressions tests with an empty batch formatted as {"col_1": [], "col_2": []} instead of {} works fine with the current if, and also with the one proposed by @cccntu. Cool ! If you want you can update your PR to add the regression tests, to make sure that `{"col_1": [], "col_2": []}` works but not `{}`
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488 I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows: ``` - if batch_examples and len(next(iter(batch_examples.values()))) == 0: + if not batch_examples or len(next(iter(batch_examples.values()))) == 0: return ``` @lhoestq
711
141
Logic bug in arrow_writer? https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488 I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows: ``` - if batch_examples and len(next(iter(batch_examples.values()))) == 0: + if not batch_examples or len(next(iter(batch_examples.values()))) == 0: return ``` @lhoestq > Makes sense, then the if-statement should remain the same or is it better to handle both cases separately using if not batch_examples or len(next(iter(batch_examples.values()))) == 0: ...? There's a check later in the code that makes sure that the columns are the right ones, so I don't think we need to check for `{}` here In particular the check `if not batch_examples or len(next(iter(batch_examples.values()))) == 0:` doesn't raise an error while it should, that why the old `if` is fine IMO > Updating the regressions tests with an empty batch formatted as {"col_1": [], "col_2": []} instead of {} works fine with the current if, and also with the one proposed by @cccntu. Cool ! If you want you can update your PR to add the regression tests, to make sure that `{"col_1": [], "col_2": []}` works but not `{}`
[ -1.2754716873168945, -0.8574045896530151, -0.784101128578186, 1.5711853504180908, -0.0806826502084732, -1.2433329820632935, 0.19451574981212616, -1.0775750875473022, 1.647283673286438, -0.7659718990325928, 0.40199434757232666, -1.6408859491348267, 0.10028275847434998, -0.6662980318069458, -0.8078239560127258, -0.845024824142456, -0.38931378722190857, -0.7638506889343262, 1.0733206272125244, 2.515927791595459, 1.2329955101013184, -1.4732964038848877, 2.717512845993042, 0.6421642899513245, -0.22259418666362762, -1.0143173933029175, 0.5015572905540466, -0.08601945638656616, -1.1704883575439453, -0.5033748745918274, -0.9724364280700684, -0.021582942456007004, -0.5478202104568481, -0.5640191435813904, -0.0062500108033418655, 0.3991406559944153, -0.2924601435661316, -0.44599589705467224, -0.5686705708503723, -0.855743408203125, 0.4460708498954773, -0.3397873342037201, 0.8972252011299133, -0.3075990080833435, 1.8315393924713135, -0.5142093896865845, 0.4238464832305908, 0.664342999458313, 1.521212100982666, 0.2553887367248535, -0.024065332487225533, 0.42672765254974365, 0.35930901765823364, -0.0502864345908165, 0.5332847237586975, 1.1750335693359375, 0.6756321787834167, 0.45691823959350586, 0.7211595177650452, -2.265504837036133, 1.284130573272705, -1.1213473081588745, 0.16786664724349976, 1.289984941482544, -1.0289779901504517, 0.25035175681114197, -1.7711646556854248, -0.074490025639534, 0.5381897687911987, -2.286432981491089, 0.27342918515205383, -1.2750786542892456, -0.4228096604347229, 1.0641212463378906, 0.38565582036972046, -1.2378193140029907, 0.12067046016454697, -0.33182293176651, 1.0275752544403076, 0.32253795862197876, 1.0981477499008179, -1.7352670431137085, -0.003040843643248081, -0.33090612292289734, 0.14398275315761566, -1.2804337739944458, -1.6287312507629395, 0.5161429643630981, 0.5849551558494568, 0.5077301859855652, -0.10888484120368958, 1.0838415622711182, -1.0248411893844604, 0.788432776927948, -0.9699086546897888, -1.7007818222045898, -1.4770735502243042, -2.2395386695861816, -2.230116605758667, 0.7195934653282166, -0.4935333728790283, -0.5794222354888916, 2.0663745403289795, -0.9794530868530273, -1.638705849647522, 1.1250510215759277, 0.26446133852005005, -0.0994216799736023, 2.3469247817993164, 0.14128421247005463, -0.7376080751419067, 0.4641945958137512, -0.7744895815849304, 0.8200225234031677, -0.29800087213516235, 1.3826534748077393, 0.4457859694957733, -1.015561580657959, 1.6474175453186035, -0.34790611267089844, 0.4890895485877991, -0.6371829509735107, -0.5028035044670105, -0.7844013571739197, 0.37511521577835083, 1.992241621017456, -0.32331085205078125, 1.5742127895355225, -0.3317965567111969, -1.4791181087493896, -1.5761512517929077, 0.9910295009613037, 0.5118728876113892, -0.7625917792320251, 0.15252074599266052, -0.4466409981250763, 0.20708906650543213, -0.05655093491077423, 1.1336841583251953, 1.3538380861282349, 0.6181855201721191, -0.31806379556655884, -0.9058088660240173, 0.20086564123630524, -0.07288270443677902, -0.6512095332145691, -1.743918538093567, -0.3794402480125427, 0.13979972898960114, 0.6609799861907959, -1.167464017868042, 1.7756274938583374, 0.8385739326477051, 1.8402471542358398, 1.0437778234481812, -0.273576945066452, 1.5073353052139282, 0.06275401264429092, 1.8238835334777832, -0.4573357105255127, 0.6615574955940247, -0.38423952460289, -1.1910046339035034, 0.8378363251686096, -0.40917307138442993, -2.051276445388794, -0.7653436064720154, -0.7857367992401123, -0.18296751379966736, -0.794554591178894, 0.9376850724220276, -0.30460324883461, -1.4182778596878052, 0.28316348791122437, -0.680424690246582, 0.15048034489154816, -1.2630795240402222, 0.4467047452926636, 0.6977564096450806, -0.6748980283737183, 0.12209498137235641, -0.2234037071466446, -1.2464475631713867, -0.44653695821762085, 0.20964953303337097, 2.024324417114258, -0.7334713339805603, 0.9312612414360046, 1.0868570804595947, -0.7025230526924133, -0.016926169395446777, 0.36420586705207825, -0.3676517605781555, 0.9193218946456909, -1.0425262451171875, -0.4575972855091095, 1.1772119998931885, -0.16918522119522095, -0.5656400322914124, 1.4294832944869995, 0.7671446204185486, -0.9580206274986267, -0.24096445739269257, -0.11693435162305832, -0.8599987626075745, 0.14317543804645538, -1.591188907623291, -0.21575666964054108, 0.4132644236087799, -1.5620490312576294, -0.5655577778816223, -0.15694250166416168, 1.3119508028030396, -0.21030908823013306, 1.463053822517395, -0.3598842918872833, -0.11819514632225037, -0.33203262090682983, -0.35368895530700684, 0.0519629642367363, -0.06417546421289444, -0.6294118762016296, 0.2536991238594055, -0.7367773652076721, 0.37489235401153564, 1.3353774547576904, 0.3658076822757721, 0.06366708874702454, 0.46601712703704834, 1.1602200269699097, 0.38883233070373535, -0.02103252522647381, -0.887450098991394, -1.5962613821029663, 2.046104669570923, -1.40872323513031, 2.061537981033325, 0.8369867205619812, -0.01625124178826809, -1.668433427810669, -1.784959316253662, 1.4189139604568481, 1.1673641204833984, 2.3171324729919434, 0.5612601637840271, 0.41559329628944397, -0.7960725426673889, -0.6167339086532593, 0.3667904734611511, -1.0082627534866333, -0.7874908447265625, 0.14981065690517426, 2.409977674484253, 1.6948058605194092, -0.3905569314956665, -0.16958676278591156, -0.9965659976005554, 1.2536993026733398, -0.23134452104568481, 0.23749449849128723, 1.859298825263977, -0.21020714938640594, -1.1438175439834595, 1.19503915309906, -2.399582624435425, 0.10933414846658707, 2.0962164402008057, 0.30911341309547424, 0.06692741811275482, -1.315428614616394, -0.5579066276550293, -0.22490938007831573, -0.46725812554359436, -1.217401146888733, 0.5404208898544312, -0.2370530068874359, -0.8118138909339905, -1.348948359489441, 0.21181504428386688, -1.1772301197052002, -1.616167426109314, 0.25986501574516296, 1.930107831954956, 2.0436789989471436, -0.8304910659790039, 1.590857744216919, -0.3025520145893097, 0.26173463463783264, 1.2256076335906982, 1.3149110078811646, 3.1803362369537354, 1.8751487731933594, -1.3301746845245361, 0.5957934260368347, -0.1596999615430832, -0.5532907247543335, 1.293176293373108, -1.2631280422210693, 1.2605814933776855, -0.03856583684682846, -1.2264964580535889, -1.2369948625564575, 0.8745685815811157, 0.49607759714126587, -0.050142280757427216, -0.44476431608200073, 1.0611423254013062, 0.08454746007919312, 1.2584290504455566, 0.5123096108436584, -0.26226505637168884, 0.5774697065353394, -0.44554853439331055, -0.50508052110672, 1.5731117725372314, 0.13257253170013428, -1.3690851926803589, -2.322181463241577, -0.13709358870983124, -0.813807487487793, 0.10144238919019699, -0.7238224148750305, -1.0505481958389282, 1.6098226308822632, 0.2703324556350708, -1.1834193468093872, -0.3110945522785187, -0.4148659408092499, -0.60516756772995, 2.562366008758545, -1.373780369758606, -0.2527559697628021, -1.0143839120864868, -0.7277559041976929, 1.596420407295227, -1.1907074451446533, -0.23638015985488892, -0.9347916841506958, -0.561262845993042, -1.2374411821365356, -0.5259716510772705, -0.04322049021720886, -0.8446251749992371, 0.7047885656356812, 0.2606847882270813, -1.2019007205963135, -0.36637941002845764, -0.8551713228225708, 0.859342634677887, -0.22970344126224518, 0.19879329204559326, 1.853515625, 0.3597182631492615, -0.37903517484664917, 0.7607331275939941, 1.2249011993408203, 0.5574965476989746, -0.5113146901130676, 0.282259464263916, -0.6248689293861389, 0.3132222592830658, -1.3374074697494507, 0.3389662802219391, -2.7760720252990723, 0.6601113080978394, -0.03370249271392822, -0.061368003487586975, 0.008693430572748184, -1.3103002309799194, 1.1430586576461792, 2.628795862197876, -1.203999400138855, 0.5384423732757568, 0.3265813887119293, 1.1818022727966309, -1.6235573291778564, 0.18736790120601654, -0.4468705356121063, 2.1835012435913086, 0.21087324619293213, 1.2180362939834595, -0.458575963973999, -2.3135244846343994, 0.5964901447296143, -1.2163317203521729, -1.1715195178985596, 0.7446486353874207, -0.8955847024917603, 0.10452105849981308, -1.3377337455749512, -0.3183782398700714, -0.8691951632499695, -1.0552990436553955, 0.6835362911224365, 0.016020063310861588, 0.4326818883419037, -0.6419891715049744, 0.318530410528183, -2.209249496459961, -1.3341983556747437, -0.11221101135015488, -1.0470175743103027, 0.4807727336883545, -0.3630514442920685, 0.6446564197540283, -0.14574891328811646, 0.019025059416890144, 0.3921215236186981, 1.5091153383255005, 3.4361228942871094, 0.2462792843580246, 0.35704246163368225, -0.23334838449954987, -0.8726069331169128, 1.4938690662384033, 0.8983651399612427, -0.16694003343582153, -0.5319964289665222, -1.1297627687454224, 1.3374505043029785, 1.8785450458526611, 1.0032833814620972, -0.0021972069516777992, -0.8265389204025269, -0.7499819993972778, -0.0802353098988533, 0.14586138725280762, 0.4571278691291809, 0.9645445346832275, 0.10662878304719925, 0.07369966804981232, 1.3347071409225464, 1.1646744012832642, -0.5070493221282959, 0.39643463492393494, -0.8943604826927185, -0.4061228036880493, 0.39135122299194336, 0.24005673825740814, -0.015500659123063087, 0.3864428400993347, -0.9093604683876038, -0.3004295527935028, -0.36496588587760925, -0.9073940515518188, -0.7300576567649841, -0.4110194444656372, -0.27112579345703125, 1.680936574935913, 0.09881487488746643, -0.5195900201797485, -0.10090278089046478, -0.8710453510284424, -0.13259698450565338, -1.068807601928711, 0.18533602356910706, -0.05236632376909256, -0.19731059670448303, -0.15590010583400726, 1.6864105463027954, -0.9079651236534119, -2.126554250717163, 0.22505474090576172, 0.20033293962478638, -0.32594794034957886, 0.2143303006887436, 1.6832683086395264, 0.4977150559425354, 1.4573103189468384, 1.3837816715240479, 0.9642658829689026, -0.6364083290100098, -1.2739534378051758, 0.7060033082962036, 0.8932398557662964, -1.395758867263794, 0.8338919281959534, -0.016105670481920242, -0.4702897071838379, 0.582984209060669, 1.249572515487671, 0.5633289813995361, -1.988252878189087, 0.8472400307655334, -0.972667932510376, 0.8049243688583374, 0.664463222026825, 0.6720897555351257, 0.23392707109451294, 0.8763209581375122, -1.1746184825897217, -1.1892114877700806, -0.6724352836608887, -0.7673877477645874, 1.9962127208709717, -0.2916896641254425, 0.5636146664619446, -0.23153160512447357, -1.3256051540374756, -0.15243011713027954, 0.7113091349601746, 0.28316399455070496, -0.48368337750434875, 0.8104926347732544, -0.6830807328224182, -1.118551254272461, -1.4499882459640503, -0.4664234519004822, -1.0372090339660645, -0.9402763247489929, 1.018835425376892, 0.7478576302528381, 0.2831116318702698, 1.942154884338379, 0.6932761669158936, 0.19822977483272552, -2.5303213596343994, 0.8908339738845825, 0.3790383040904999, -0.18044884502887726, 0.9034260511398315, 0.35161927342414856, 1.0386704206466675, 0.003341878764331341, 0.5519101023674011, -2.3411812782287598, 2.3214104175567627, -0.20112398266792297, 0.7299582362174988, -0.032353974878787994, -0.19352783262729645, 1.0899721384048462, 0.5644760727882385, 0.576629102230072, -1.137926697731018, 0.6765000820159912, -0.6492230296134949, 1.20071280002594, 0.9022247791290283, -0.8466306924819946, -0.02673003263771534, 1.402296781539917, 0.3894321918487549, -0.5295692086219788, -0.9627687931060791, -0.9271386861801147, 0.9726625680923462, 1.6753652095794678, 0.01862792670726776, 0.01488308236002922, 0.8248966336250305, 0.6715018153190613, -1.2634403705596924, 0.09677878767251968, -0.7431877851486206, -0.8916239142417908, 1.7116119861602783, 2.090608835220337, -0.17166905105113983, -0.2989509403705597, -0.6840818524360657, -1.2954063415527344, 0.8542519211769104, -0.04842086136341095, 0.11326733976602554, 0.6304543614387512, -0.652090311050415, 1.1301469802856445, 0.9526681900024414, 0.9345299601554871, 0.1862281858921051, 0.15639114379882812, 0.3881337642669678, -0.31108421087265015, -1.0237586498260498, -0.236845463514328, -1.1141880750656128, -2.5423290729522705, 0.41171860694885254, -0.2318304479122162, -1.3540406227111816, 0.07750555127859116, -0.930272102355957, 0.9151653051376343, -0.5658636689186096, -1.019942283630371, -1.4919207096099854, 0.15669631958007812, -0.061533041298389435, 0.9419091939926147, -1.6582354307174683, -0.12786416709423065, 1.2496320009231567, 0.9338570237159729, -0.6374731063842773, 0.9752858877182007, 0.23897860944271088, 1.058019995689392, 0.8999993801116943, -0.43444326519966125, 0.488360196352005, 0.03563731908798218, -1.3085548877716064, 0.5179058313369751, 1.2122570276260376, 0.15956537425518036, 1.6215121746063232, -0.373883992433548, -0.03807380422949791, 0.37432605028152466, -0.5532336831092834, -0.47265002131462097, -0.6012560725212097, 0.6707059144973755, 0.036524899303913116, -0.8909090757369995, 0.008993113413453102, -0.012940013781189919, -0.1870747208595276, 0.11746037751436234, -1.555129885673523, -0.09999488294124603, -0.3327257037162781, -0.6200821399688721, -1.2591484785079956, -0.13479462265968323, 1.4096474647521973, -0.826485276222229, -0.19991369545459747, 0.46015703678131104, 0.4096282422542572, 0.42049211263656616, 0.6091470718383789, -0.6637411713600159, -0.41718271374702454, -0.24850837886333466, -0.3702338635921478, 0.3427034318447113, 1.212719202041626, -0.13964785635471344, -0.9205714464187622, 0.665102481842041, -0.2460792064666748, 0.03810534626245499, 1.8000410795211792, 0.015589741989970207, -0.7288539409637451, 0.2794078588485718, -0.6594956517219543, 1.9513837099075317, 1.7216386795043945, 1.3066078424453735, -0.14089351892471313, -0.9778828024864197, 0.6959629654884338, -0.42832663655281067, -0.3537222445011139, 0.8422766923904419, 0.36623722314834595, -0.1763913929462433, -1.4658318758010864, 0.6258774995803833, 1.2662663459777832, -0.8947373032569885, -0.7881719470024109, 0.03885260969400406, -0.7819057106971741, 1.0756638050079346, 0.599503755569458, 0.2730284035205841, 0.2614530622959137, 1.6569081544876099, 0.7228994965553284, -0.41394898295402527, 0.5466979742050171, 0.5327758193016052, -0.17760314047336578, -2.1928517818450928, -1.2194236516952515, 0.29295676946640015, -0.45902732014656067, -1.547329306602478, 1.384668231010437, -1.11056387424469, -0.9956554770469666, 0.5769779682159424, 0.03661903738975525, 1.438330888748169, 0.27180981636047363, 1.639852523803711, 2.049806594848633, 0.8285805583000183, 0.4169144034385681, 1.1690753698349, -0.1365545392036438, -0.39231905341148376, 1.7796061038970947, -0.4623461365699768, 0.4355035126209259, 1.0496504306793213, -0.291983425617218, -1.0604194402694702, -0.8790780901908875, -1.3727093935012817, -0.7970730066299438, 1.115342140197754, -0.05847424268722534, -1.1180603504180908, 0.23456014692783356, 1.6483625173568726, 0.08455730974674225, -0.2908872663974762, 0.5771911144256592, 0.5047456622123718, -0.7703110575675964, -0.03415542095899582, -0.8561246395111084, 0.5995751023292542, -0.20870336890220642, -0.3618895411491394, 0.35328978300094604, 0.46069347858428955, 1.337032437324524, -0.05177338421344757, 0.09336059540510178, 1.1963101625442505, -1.4757215976715088, 1.5292824506759644, -0.6435054540634155, 0.270921528339386, -2.3759710788726807, 1.4245531558990479, -0.81221604347229, 2.0007917881011963, -2.6618618965148926, 0.5556977987289429, -0.6154844760894775, -0.47216707468032837, 0.3741634488105774, -0.37162160873413086, 0.1799946427345276, -0.1783815175294876, -1.0681135654449463, -0.14756791293621063, -0.604209840297699, 0.5303524732589722, 1.1379741430282593, 1.3219903707504272, -0.9985535740852356, -0.23844023048877716, -1.7478179931640625, -0.0571170300245285, -0.5240122079849243, 0.20946621894836426, -1.9851728677749634, -0.1918647289276123, -2.0246121883392334, -2.3394110202789307, -1.2592333555221558, -0.7452294230461121, 1.0849287509918213, 0.1313449591398239, -0.8570330142974854, 1.219114065170288, -0.4113720655441284, -1.7820358276367188, 1.0956929922103882, -2.0889744758605957 ]